{"version":3,"sources":["webpack:///./src/project/project-shared.ts","webpack:///./src/project/project.ts","webpack:///./src/services/request-handler.ts","webpack:///./src/shared/controls/online-form/question/question-base.ts","webpack:///./src/services/notifier.ts","webpack:///./src/shared/controls/custom-validation.ts","webpack:///./src/services/profile-service.ts","webpack:///./src/services/data-service.ts","webpack:///./src/base-class.ts","webpack:///./src/shared/controls/select-input/selectize-plugin-clear.ts","webpack:///./src/services/featured-grant-service.ts","webpack:///./src/shared/utils/to-title-case.ts","webpack:///./src/utils/server-appender.ts","webpack:///./src/utils/store.ts","webpack:///./src/services/file-service.ts","webpack:///./src/shared/controls/online-form/form-dependency-service.ts","webpack:///./src/utils/messages.ts","webpack:///./src/models/broadcast-events.ts","webpack:///./src/utils/string-insert.ts","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./assets/images/the-territory-logo-white.svg","webpack:///./src/auth/auth-manager.ts","webpack:///./src/config/config.ts","webpack:///./src/shared/utils/download-file-service.ts","webpack:///./src/shared/utils/client-validation-error.ts","webpack:///./src/shared/controls/confirm-modal/confirm.ts","webpack:///./src/shared/utils/SharedBroadcastEvents.ts","webpack:///./src/shared/controls/online-form/form-utils.ts","webpack:///./src/shared/utils/deep-observer.ts","webpack:///./src/shared/controls/validation-error.ts","webpack:///./src/shared/utils/address-utils.ts","webpack:///./src/services/assesment-service.ts","webpack:///./src/shared/controls/online-form/question/code-list-service.ts","webpack:///./src/services/application-form-service.ts","webpack:///./src/shared/utils/utils.ts","webpack:///./src/shared/controls/online-form/request-additional-information/shared-request-additional-information-services.ts","webpack:///./src/utils/router-constants.ts","webpack:///./src/services/url-generators.ts","webpack:///./src/services/auth-service.ts","webpack:///./src/shared/controls/permission-error.ts","webpack:///./src/services/online-form-service.ts","webpack:///./src/shared/utils/version-mismatch-service.ts","webpack:///./src/shared/utils/validation-renderer.ts","webpack:///./src/shared/utils/base-64-to-blob.ts","webpack:///./src/services/notification-service.ts","webpack:///./src/shared/controls/breadcrumb/breadcrumb-service.ts","webpack:///./src/services/address-service.ts","webpack:///./src/services/subscription-service.ts","webpack:///./src/services/utility-service.ts","webpack:///./src/shared/controls/online-form/form-navigation-services.ts","webpack:///./assets/images/ntg-logo-white.png","webpack:///./src/services/application-service.ts","webpack:///./src/services/acquittal-service.ts","webpack:///./src/services/additional-info-service.ts","webpack:///./src/services/organisation-document-service.ts","webpack:///./src/shared/utils/control-id-generator.ts","webpack:///./src/shared/utils/voucher-number-validation.ts","webpack:///./src/shared/controls/concurrent-access-error.ts","webpack:///./src/models/active-profile.ts","webpack:///./src/account-management/login-view.ts","webpack:///./src/account-management/login-view.html","webpack:///./src/account-management/message/message-bar.ts","webpack:///./src/account-management/message/message-bar.html","webpack:///./src/account-management/notification/notification-bar.ts","webpack:///./src/account-management/notification/notification-bar.html","webpack:///./src/account-registration/divider/divider.ts","webpack:///./src/account-registration/divider/divider.html","webpack:///./src/acquittal/modals/outstanding-acquittal-profile-modal/outstanding-acquittal-profile-modal.ts","webpack:///./src/acquittal/modals/outstanding-acquittal-profile-modal/outstanding-acquittal-profile-modal.html","webpack:///./src/assessments/additional-information-modal.ts","webpack:///./src/assessments/additional-information-modal.html","webpack:///./src/assessments/application-view.ts","webpack:///./src/assessments/application-view.html","webpack:///./src/assessments/assessments.ts","webpack:///./src/assessments/assessments.html","webpack:///./src/assessments/conflict-of-interest-modal.ts","webpack:///./src/assessments/conflict-of-interest-modal.html","webpack:///./src/assessments/edit.ts","webpack:///./src/assessments/edit.html","webpack:///./src/assessments/list.ts","webpack:///./src/shared/utils/assessments/assessment-status-label-map.ts","webpack:///./src/assessments/list.html","webpack:///./src/assessments/view.ts","webpack:///./src/assessments/view.html","webpack:///./src/account-management/assessor/assessor-invite-response.ts?a0f3","webpack:///./src/account-management/manage.ts?bec5","webpack:///./src/account-management/manage-account/confirm-new-username.ts?d891","webpack:///./src/account-management/password-reset.ts?3926","webpack:///./src/account-registration/registration/registration.ts?2eb8","webpack:///./src/grants/router.ts?f643","webpack:///./src/grants/suppliers/supplier-details.ts?8e43","webpack:///./src/grants/suppliers/supplier-portal.ts?7f56","webpack:///./src/help/help.ts?e446","webpack:///./src/help/help/FAQ.ts?66a0","webpack:///./src/help/help/applyForGrant/applyForGrant.ts?fed4","webpack:///./src/help/help/applyForGrant/applyForGrantLanding.ts?e193","webpack:///./src/help/help/applyForGrant/grantEnquiry.ts?21b7","webpack:///./src/help/help/applyForGrant/grantSearch.ts?1339","webpack:///./src/help/help/applyForGrant/grantSubscription.ts?6225","webpack:///./src/help/help/compHelp/compHelp.ts?6edb","webpack:///./src/help/help/introduction.ts?f1a0","webpack:///./src/help/help/manageGrant/applicationManagement.ts?5812","webpack:///./src/help/help/manageGrant/correspondence.ts?9584","webpack:///./src/help/help/manageGrant/manageGrantLanding.ts?2ac6","webpack:///./src/help/help/manageGrant/reporting.ts?e261","webpack:///./src/help/help/manageGrant/roi.ts?f681","webpack:///./src/help/help/manageGrant/viewAwarded.ts?2a0c","webpack:///./src/help/help/setup/createOrgProfile.ts?b310","webpack:///./src/help/help/setup/joinAnOrg.ts?5aae","webpack:///./src/help/help/setup/manageProfileAccess.ts?fb27","webpack:///./src/help/help/setup/orgUserAccess.ts?8800","webpack:///./src/help/help/setup/setupLanding.ts?9d36","webpack:///./src/login-registration/login.ts?0093","webpack:///./src/login-registration/profile-select.ts?6976","webpack:///./src/login-registration/recover-password.ts?c4a9","webpack:///./src/login-registration/register-request.ts?33de","webpack:///./src/manage/manage.ts?8ba9","webpack:///./src/profile/organisation/invite-response.ts?01d7","webpack:///./src/profile/organisation/organisation-profile.ts?9406","webpack:///./src/vouchers/router.ts?f2b1","webpack:///./src/welcome.ts?6862","webpack:///./src/controls/address-search/address-search.ts","webpack:///./src/controls/address-search/address-search.html","webpack:///./src/controls/card.html","webpack:///./src/controls/file-view.html","webpack:///./src/controls/index.ts","webpack:///./src/controls/modal.html","webpack:///./src/controls/panel.html","webpack:///./src/controls/password-strength.ts","webpack:///./src/controls/password-strength.html","webpack:///./src/controls/recaptcha.ts","webpack:///./src/controls/table/table-data-attribute.ts","webpack:///./src/controls/table/table-data-pagination.ts","webpack:///./src/controls/table/table-data-pagination.html","webpack:///./src/controls/table/table-data-sort-attribute.ts","webpack:///./src/grants/modals/apply-now-modal/apply-now-modal.ts","webpack:///./src/grants/modals/apply-now-modal/apply-now-modal.html","webpack:///./src/grants/modals/login-or-register-modal/login-or-register-modal.ts","webpack:///./src/grants/modals/login-or-register-modal/login-or-register-modal.html","webpack:///./src/grants/modals/organisation-individual-can-apply-modal/organisation-individual-can-apply-modal.ts","webpack:///./src/grants/modals/organisation-individual-can-apply-modal/organisation-individual-can-apply-modal.html","webpack:///./src/grants/suppliers/supplier-router.ts","webpack:///./src/grants/suppliers/supplier-router.html","webpack:///./src/layouts/default-layout.ts","webpack:///./src/layouts/default-layout.html","webpack:///./src/login-registration/change-password.ts","webpack:///./src/login-registration/change-password.html","webpack:///./src/main.ts","webpack:///./src/profile/individual/bank-details/bank-details.ts","webpack:///./src/profile/individual/bank-details/bank-details.html","webpack:///./src/profile/individual/bank-details/edit/bank-details-edit.ts","webpack:///./src/profile/individual/bank-details/edit/bank-details-edit.html","webpack:///./src/profile/individual/bank-details/list/bank-details-list.ts","webpack:///./src/profile/individual/bank-details/list/bank-details-list.html","webpack:///./src/profile/individual/change-password/edit/change-password-edit.ts","webpack:///./src/profile/individual/change-password/edit/change-password-edit.html","webpack:///./src/profile/individual/change-username/edit/change-username-edit.ts","webpack:///./src/profile/individual/change-username/edit/change-username-edit.html","webpack:///./src/profile/individual/contact-information/edit/contact-information-edit.ts","webpack:///./src/profile/individual/contact-information/edit/contact-information-edit.html","webpack:///./src/profile/individual/contact-information/view/contact-information-view.ts","webpack:///./src/profile/individual/contact-information/view/contact-information-view.html","webpack:///./src/profile/individual/control/change-password-form/change-password-form.ts","webpack:///./src/profile/individual/control/change-password-form/change-password-form.html","webpack:///./src/profile/individual/control/left-sidebar/left-sidebar.ts","webpack:///./src/profile/individual/control/left-sidebar/left-sidebar.html","webpack:///./src/profile/individual/detail.ts","webpack:///./src/profile/individual/detail.html","webpack:///./src/profile/individual/subscription/edit/subscription-edit.ts","webpack:///./src/profile/individual/subscription/edit/subscription-edit.html","webpack:///./src/profile/subscriptions.ts","webpack:///./src/profile/subscriptions.html","webpack:///./src/shared/attributes/gnt-element-height.ts","webpack:///./src/shared/attributes/grants-tooltip.ts","webpack:///./src/shared/controls/abn/abn.ts","webpack:///./src/shared/controls/abn/abn.html","webpack:///./src/shared/controls/acn/acn.ts","webpack:///./src/shared/controls/acn/acn.html","webpack:///./src/shared/controls/address/address.ts","webpack:///./src/shared/controls/address/address.html","webpack:///./src/shared/controls/address/validate-address-modal.ts","webpack:///./src/shared/controls/address/validate-address-modal.html","webpack:///./src/shared/controls/aurelia-file-uploader/file-display.ts","webpack:///./src/shared/controls/aurelia-file-uploader/file-display.html","webpack:///./src/shared/controls/aurelia-file-uploader/file-uploader.ts","webpack:///./src/shared/controls/aurelia-file-uploader/file-uploader.html","webpack:///./src/shared/controls/breadcrumb/breadcrumb.ts","webpack:///./src/shared/controls/breadcrumb/breadcrumb.html","webpack:///./src/shared/controls/checkbox-list/checkbox-list.ts","webpack:///./src/shared/controls/checkbox-list/checkbox-list.html","webpack:///./src/shared/controls/confirm-modal/confirm-modal.ts","webpack:///./src/shared/controls/confirm-modal/confirm-modal.html","webpack:///./src/shared/controls/currency/currency.ts","webpack:///./src/shared/controls/currency/currency-change.ts","webpack:///./src/shared/controls/currency/currency-change.html","webpack:///./src/shared/controls/currency/currency.html","webpack:///./src/shared/controls/date-picker/date-picker.ts","webpack:///./src/shared/controls/date-picker/date-picker.html","webpack:///./src/shared/controls/date-picker/date-time-picker.ts","webpack:///./src/shared/controls/date-picker/date-time-picker.html","webpack:///./src/shared/controls/decimal/decimal.ts","webpack:///./src/shared/controls/decimal/decimal.html","webpack:///./src/shared/controls/email-input/email-input.ts","webpack:///./src/shared/controls/email-input/email-input.html","webpack:///./src/shared/controls/featured-grants/featured-grants.ts","webpack:///./src/shared/controls/featured-grants/featured-grants.html","webpack:///./src/shared/controls/gnt-textarea/gnt-textarea.ts","webpack:///./src/shared/controls/gnt-textarea/gnt-textarea.html","webpack:///./src/shared/controls/help-text/help-text.ts","webpack:///./src/shared/controls/help-text/help-text.html","webpack:///./src/shared/controls/index.ts","webpack:///./src/shared/controls/location/location.ts","webpack:///./src/shared/controls/location/location.html","webpack:///./src/services/system-notification-service.ts","webpack:///./src/shared/controls/notification/banner.ts","webpack:///./src/shared/controls/notification/banner.html","webpack:///./src/shared/controls/online-form/application-form.ts","webpack:///./src/shared/controls/online-form/application-form.html","webpack:///./src/shared/controls/online-form/controls/department-block.ts","webpack:///./src/shared/controls/online-form/controls/department-block.html","webpack:///./src/shared/controls/online-form/controls/q-head-help.ts","webpack:///./src/shared/controls/online-form/controls/q-head-help.html","webpack:///./src/shared/controls/online-form/controls/q-label.ts","webpack:///./src/shared/controls/online-form/controls/q-label.html","webpack:///./src/shared/controls/online-form/controls/q-tail-help.ts","webpack:///./src/shared/controls/online-form/controls/q-tail-help.html","webpack:///./src/shared/controls/online-form/declaration/document-declaration.ts","webpack:///./src/shared/controls/online-form/declaration/document-declaration.html","webpack:///./src/shared/controls/online-form/declaration/form-declaration.ts","webpack:///./src/shared/controls/online-form/declaration/form-declaration.html","webpack:///./src/shared/controls/online-form/intro/form-intro.ts","webpack:///./src/shared/controls/online-form/intro/form-intro.html","webpack:///./src/shared/controls/online-form/nav/nav-section-group.ts","webpack:///./src/shared/controls/online-form/nav/nav-section-group.html","webpack:///./src/shared/controls/online-form/nav/nav-step.ts","webpack:///./src/shared/controls/online-form/nav/nav-step.html","webpack:///./src/shared/controls/online-form/question/abn-lookup/form-abn-lookup.ts","webpack:///./src/shared/controls/online-form/question/abn-lookup/form-abn-lookup.html","webpack:///./src/shared/controls/online-form/question/address/form-address.ts","webpack:///./src/shared/controls/online-form/question/address/form-address.html","webpack:///./src/shared/controls/online-form/question/business/form-business.ts","webpack:///./src/shared/controls/online-form/question/business/form-business.html","webpack:///./src/shared/controls/online-form/question/child/form-child.ts","webpack:///./src/shared/controls/online-form/question/child/form-child.html","webpack:///./src/shared/controls/online-form/question/contact/form-contact.ts","webpack:///./src/shared/controls/online-form/question/contact/form-contact.html","webpack:///./src/shared/controls/online-form/question/date-range/form-date-range.ts","webpack:///./src/shared/controls/online-form/question/date-range/form-date-range.html","webpack:///./src/shared/controls/online-form/question/date/form-date.ts","webpack:///./src/shared/controls/online-form/question/date/form-date.html","webpack:///./src/shared/controls/online-form/question/decimal/form-decimal.ts","webpack:///./src/shared/controls/online-form/question/decimal/form-decimal.html","webpack:///./src/shared/controls/online-form/question/file-upload/document-source-value-converter.ts","webpack:///./src/shared/controls/online-form/question/file-upload/form-file-upload.ts","webpack:///./src/shared/controls/online-form/question/file-upload/form-file-upload.html","webpack:///./src/shared/controls/online-form/question/form-question-group.ts","webpack:///./src/shared/controls/online-form/question/form-question-group.html","webpack:///./src/shared/controls/online-form/question/location/form-location.ts","webpack:///./src/shared/controls/online-form/question/location/form-location.html","webpack:///./src/shared/controls/online-form/question/multi-select-list/form-multi-select-list.ts","webpack:///./src/shared/controls/online-form/question/multi-select-list/form-multi-select-list.html","webpack:///./src/shared/controls/online-form/question/multiline-text/form-multiline-text.ts","webpack:///./src/shared/controls/online-form/question/multiline-text/form-multiline-text.html","webpack:///./src/shared/controls/online-form/question/number/form-number.ts","webpack:///./src/shared/controls/online-form/question/number/form-number.html","webpack:///./src/shared/controls/online-form/question/opening-hours/form-opening-hours.ts","webpack:///./src/shared/controls/online-form/question/opening-hours/form-opening-hours.html","webpack:///./src/shared/controls/online-form/question/person/form-person.ts","webpack:///./src/shared/controls/online-form/question/person/form-person.html","webpack:///./src/shared/controls/online-form/question/requested-amount/form-requested-amount.ts","webpack:///./src/shared/controls/online-form/question/requested-amount/form-requested-amount.html","webpack:///./src/shared/controls/online-form/question/single-select-list/form-single-select-list.ts","webpack:///./src/shared/controls/online-form/question/single-select-list/form-single-select-list.html","webpack:///./src/shared/controls/online-form/question/singleline-text/form-singleline-text.ts","webpack:///./src/shared/controls/online-form/question/singleline-text/form-singleline-text.html","webpack:///./src/shared/controls/online-form/question/text-block/form-text-block.ts","webpack:///./src/shared/controls/online-form/question/text-block/form-text-block.html","webpack:///./src/shared/controls/online-form/question/yesno-toggle/form-yesno-toggle.ts","webpack:///./src/shared/controls/online-form/question/yesno-toggle/form-yesno-toggle.html","webpack:///./src/shared/controls/online-form/request-additional-information/request-additional-information.ts","webpack:///./src/shared/controls/online-form/request-additional-information/request-additional-information-modal/request-additional-information-modal.ts","webpack:///./src/shared/controls/online-form/request-additional-information/request-additional-information-modal/request-additional-information-modal.html","webpack:///./src/shared/controls/online-form/request-additional-information/request-additional-information.html","webpack:///./src/shared/controls/online-form/section/form-section.ts","webpack:///./src/shared/controls/online-form/section/form-section-group.ts","webpack:///./src/shared/controls/online-form/section/form-section-group.html","webpack:///./src/shared/controls/online-form/section/form-section.html","webpack:///./src/shared/controls/online-form/step/form-step.ts","webpack:///./src/shared/controls/online-form/step/form-step.html","webpack:///./src/shared/controls/optional-attribute.ts","webpack:///./src/shared/controls/organisation-document/organisation-document.ts","webpack:///./src/shared/controls/organisation-document/organisation-document.html","webpack:///./src/shared/controls/phone-number/phone-number.ts","webpack:///./src/shared/controls/phone-number/phone-number.html","webpack:///./src/shared/controls/radio-button-list/radio-button-list.ts","webpack:///./src/shared/controls/radio-button-list/radio-button-list.html","webpack:///./src/shared/controls/select-input/select-input.ts","webpack:///./src/shared/controls/select-input/select-input.html","webpack:///./src/shared/controls/table/inline-table-field/inline-table-field.ts","webpack:///./src/shared/controls/table/inline-table-field/inline-table-field.html","webpack:///./src/shared/controls/text-editor/text-editor.ts","webpack:///./src/shared/controls/text-editor/text-editor.html","webpack:///./src/shared/controls/validation-summary/validation-summary.ts","webpack:///./src/shared/controls/validation-summary/validation-summary.html","webpack:///./src/shared/controls/wizard/wizard.ts","webpack:///./src/shared/controls/wizard/wizard-tab.ts","webpack:///./src/shared/controls/wizard/wizard-tab.html","webpack:///./src/shared/controls/wizard/wizard.html","webpack:///./src/shared/controls/yesno/yesno.ts","webpack:///./src/shared/controls/yesno/yesno.html","webpack:///./src/shared/controls/yesnomaybe/yesnomaybe.ts","webpack:///./src/shared/controls/yesnomaybe/yesnomaybe.html","webpack:///./src/shared/value-converters/abn-value-converter.ts","webpack:///./src/shared/value-converters/blob-to-url-value-converter.ts","webpack:///./src/shared/value-converters/currency-value-converter.ts","webpack:///./src/shared/value-converters/date-format-value-converter.ts","webpack:///./src/shared/value-converters/description-value-converter.ts","webpack:///./src/shared/value-converters/duration-value-converter.ts","webpack:///./src/shared/value-converters/ensure-http-value-converter.ts","webpack:///./src/shared/value-converters/file-size-value-converter.ts","webpack:///./src/shared/value-converters/highlight-value-converter.ts","webpack:///./src/shared/value-converters/length-value-converter.ts","webpack:///./src/shared/value-converters/lower-case-value-converter.ts","webpack:///./src/shared/value-converters/no-protocol-value-converter.ts","webpack:///./src/shared/value-converters/numeric-value-converter.ts","webpack:///./src/shared/value-converters/strip-html-value-converter.ts","webpack:///./src/shared/value-converters/synopsis-value-converter.ts","webpack:///./src/shared/value-converters/title-case-value-converter.ts","webpack:///./src/shared/value-converters/truthy-value-converter.ts","webpack:///./src/shell.ts","webpack:///./src/shell.html"],"names":["SharedDto","Constants","ErrorType","SortDirection","LocalityType","QuestionType","HelpTextLocation","CriteriaOperation","LogicalOperator","QuestionConfigurationType","StateTerritory","PublicContentSectionType","QuestionCodeListType","PhoneType","ApplicationDocumentSource","RegulatoryAuthority","ReportingRequirementType","ApplicationFormStatus","ApplicationHistoryType","TargetLateInvitationTransition","TargetLateInvitationStatus","TargetApplicationType","AssessmentCheckStatus","AssessmentCheckResponseStatus","FileUploadCategory","FormProfileType","LocationType","SystemQuestion","SystemPrepopulatedField","PublicContentType","AdditionalInformationRequestStatus","Dto","ExternalPageRoutes","AddressValidationMatchResult","OrgUserAccessActivity","OrganisationUserStatus","OrganisationAuditCategory","ExternalApplicationFormTransition","ExternalApplicationFormStatus","ReportingRequirementGroup","ReportingRequirementOutcome","ExternalReportingRequirementStatus","ReportingFrequency","ReportingRequirementTransition","ExternalAcquittalRequirementStatus","AcquittalRequirementTransition","AcquittalDeliverableType","AdditionalInformationRequestQuestionType","LegalEntityType","VariationType","VariationAssessmentOutcome","ExternalVariationStatus","SlugType","ExternalVoucherStatus","VoucherCheckResult","ApplicationSubmissionResponseType","SupplierStatus","AccountStatus","ReviewOutcomeResult","EligibilityOutcome","authManager","eventAggregator","httpClient","router","notifier","dialogService","versionMismatchService","cache","refreshTokenPromise","get","url","cacheAge","this","processRequest","options","method","headers","post","body","request","patch","put","delete","isRetry","isGetRequest","toLowerCase","indexOf","Math","round","Date","getTime","toString","req","Request","baseUrl","append","applicationVersion","accessToken","fetchOrCache","fetch","then","response","clone","checkVersion","checkResponse","text","t","JSON","parse","catch","reason","status","json","Error","error","errorType","ValidationErrors","message","errors","ConcurrentAccess","hasOwnProperty","refreshAuthToken","data","refreshToken","logout","clientId","refresh_token","access_token","publish","loginStateChanged","refreshed","warning","closeAll","nextRouteInstruction","currentRoute","fragment","queryString","navigateToRoute","Login","redirect","q","currentInstruction","redirectToLogin","result","ok","cacheSeconds","fetchRequest","cached","fetchedOn","undefined","responsePromise","bustCache","RequestHandler","controlIdGenerator","questionId","getNextId","bind","bindingContext","overrideContext","attached","setupValidation","console","log","questionTemplate","questionType","detached","off","questionInstance","helpTextLocation","PlaceHolder","helpText","visible","stepVisibility","sectionVisibility","mandatory","repeatable","repeatMin","questionIndex","defaultBindingMode","toView","initialViewLoaded","delayedToasts","opts","closeButton","debug","newestOnTop","progressBar","positionClass","preventDuplicates","showDuration","hideDuration","timeOut","extendedTimeOut","showEasing","hideEasing","showMethod","hideMethod","viewLoaded","forEach","x","clear","Array","info","title","toast","Info","success","Success","Warning","standardMessage","type","fn","push","Notifier","WebsiteAddressRule","VendorIdRule","PersonNameRule","BusinessNameRule","DateOfBirthRule","GenericPhoneNumberRule","NotAPOBox","NumericRule","NonNegativeNumberRule","PositiveNumberRule","DateComparison","AlphaNumericRule","HasElementsRule","VoucherNumberRule","SetupCustomValidation","customRule","value","test","isNaN","object","comparitor","otherDateSelector","otherDisplayName","thisDate","otherDate","words","length","toLocaleLowerCase","startsWith","inputDate","now","getFullYear","getMonth","getDate","myDate","getDay","requestHandler","store","confirm","cachedAccount","loginStateListener","subscribe","getAccount","profileDataChanged","setActiveProfile","profile","account","profileKey","keyActiveProfile","accountId","setl","profileChanged","changeActiveProfile","userDetails","organisationId","organisation","userOrganisationProfiles","find","profileType","profileIdentifier","profileDisplayName","legalName","profileUserFullname","fullName","profileUserId","profileAccountStatus","accountStatus","allowedRoutes","individualProfileId","getActiveProfile","isLoggedIn","getl","Promise","resolve","getProfileNavigation","selectDefaultProfile","continueRoute","navigate","Welcome","activeProfile","ProfileSelect","refreshActiveProfile","org","profileRefreshed","expiry","accPromise","newExpiry","setSeconds","getSeconds","getIndividualProfile","updateIndividualProfile","model","getIndividualBankDetails","getIndividualBankDetailsById","bankDetailsId","addIndividualBankDetails","updateIndividualBankDetails","deleteIndividualBankDetails","updateUsername","newUserName","verifyNewUsername","verificationCode","deactivate","dispose","hasOrgActivity","activities","orgProfile","activity","confirmProfileChange","switchProfileIfRequired","showConfirmation","valueOf","confirmed","ProfileService","cacheDuration","getRoundVouchersByQuestion","getSupplierLocationTypes","getSupplierStatuses","getSupplierCategories","getSupplierLocations","getSuppliers","publicOnly","getBeneficiaries","getReviewOutcomes","getBeneficiariesTopLevel","map","id","beneficiaryId","description","display","code","getEligibilityOutcomes","getAgencies","getFinancialYearList","checkRouteAccess","route","getCategoryByLevel","level","getCategoryChildren","categoryId","getRecaptchaKey","getTitles","getStates","getCountries","getLegalEntities","getVoucherStatuses","getTaxExemptionCategories","getDurationOperatingInNt","getOrganisationUserAccessActivities","getDocumentTypes","getOrganisationRoles","getLocationTypes","getLocationsByType","getLocalityTypes","getFilteredLocalityOptions","getOrganisationAuditCategories","getDocumentSources","getSchools","getApplicationStatuses","getPaymentStatuses","getReportingTypes","getReportingGroups","getReportingRequirementStatuses","getAcquittalTypes","getAcquittalRequirementStatuses","getDurationsOperatingInNt","getOrganisationContactRoles","getFundingRecommendationOutcomes","getGrantVariationTypes","getApplicationContactRoles","DataService","dataService","controllerFactory","enableScroll","controller","createForCurrentScope","addRenderer","ValidationBase","define","$","extend","label","className","hideWhenEmpty","leaveOpen","original","self","$html","replace","setup","apply","arguments","$wrapper","$input","hideShowClrBtn","$inpt","val","show","hide","change","on","e","preventDefault","isLocked","$control_input","focus","getFeaturedGrant","limit","previewMode","generateImageUrl","featuredGrantId","FeaturedGrantService","toTitleCase","str","split","i","charAt","toUpperCase","slice","join","window","onerror","source","line","column","report","stack","location","href","requestedUrl","logger","messageOrError","stringify","rest","warn","ServerAppender","initialise","key","storage","getStorage","obj","getItem","setItem","removel","removeItem","gets","sets","removes","localStorage","sessionStorage","cacheStorage","CacheStore","keyAccessToken","keyRefreshToken","keyRememberMe","splice","item","index","idx","findIndex","uploadFile","file","formData","FormData","deleteFile","guid","FileService","bindingEngine","formInstance","dependencyRule","questionTemplates","formControlId","questionsWatchers","questionCriteria","criteria","questionTemplateInfo","FindQuestionTemplate","formQuestionId","sectionRepeatable","CriteriaAndDependantInSameSection","FindQuestions","question","DependencyCriteria","sectionIndex","SetupObservers","pop","RunRule","channelName","EvalRule","questions","GetEventChannelName","YesNoToggle","Money","Number","Decimal","RadioButton","SingleSelectList","CreateQuestionWatcher","CheckBoxList","MultiSelectList","CreateQuestionWatcherCollection","selectedOptionItemIds","propertyName","watcher","propertyObserver","collection","collectionObserver","sectionId","formStepId","formSectionId","FindQuestion","steps","sectionGroups","sectionGroup","sections","questionGroups","questionGroup","templateQuestionId","ret","section","criteriaId","dependencyId","dependency","cIndex","template","evalResult","Eval","logicOperator","And","Or","FormDependencyService","EvalYesNoQuestion","EvalDecimalQuestion","EvalNumberQuestion","EvalSingleSelectQuestion","EvalMultiSelectQuestion","EvalDateQuestion","valueToCheckAgainst","optionItemId","codeItemId","criteriaOperation","Equals","answer","so","boolValue","decimalValue","GreaterThan","LessThan","questionDate","isValid","criteriaDate","dateValue","isSame","isAfter","isBefore","numberValue","MessageType","Message","voucherDataChanged","String","prototype","insert","string","substring","webpackContext","webpackContextResolve","__webpack_require__","keys","Object","module","exports","_","clearAuthTokens","rememberMe","login","payload","AuthManager","ReleaseInfo","version","FileSaver","downloadFromBlob","blob","fileContents","saveAs","fileName","downloadFile","fileId","DownloadFileService","validationResult","setPrototypeOf","okButtonText","cancelButtonText","warnings","open","viewModel","whenClosed","wasCancelled","continue","showCancel","Confirm","allFilesSaved","downloadApplicationDocument","tabVisibilityChanged","additionalInformationResquested","additionalInformationDocumentDownload","StepVisibilityChannelName","formId","SectionVisibilityChannelName","QuestionVisibilityChannelName","channel","observeWithDebounce","target","property","callback","debouceMs","debouncedCallback","observe","subscriptions","root","children","newValue","oldValue","name","recurse","disconnect","path","sub","p","changedRecords","n","o","DeepObserver","validationErrors","addressToSingleLineString","address","states","countries","line1","line2","suburb","countryId","country","nonAustralianState","state","australianStateTerritory","postCode","addressArrayToString","australianStateTerritoryDescription","countryDescription","postcode","downloadFileService","searchAssessments","getAssessment","assessmentCheckId","saveAssessment","submit","conflictOfInterest","comment","downloadHelpDocument","downloadFundingRecomendationAttachment","downloadNumericResponseAttachment","numericResponseId","downloadQAResponseAttachment","qaResponseId","AssessmentService","onlineFormService","getDataList","codeListType","sortAlphabeticallyRule","OptionItems","getOptionItemList","mapForeignKeyList","Title","getTitlelist","DurationInNT","getDurationsInNt","OrganisationContactRole","getLegalEntityTypes","BusinessActivityCategory","getBusinessCategories","BusinessActivityCategoryMoreSpecific","getBusinessCategoriesMoreSpecific","Beneficiary","ApplicationContactRole","Schools","Suppliers","SupplierCategories","SupplierLocations","RoundVouchers","getRoundVouchers","ReviewOutcomes","filter","y","SkipStep","mapEnumList","EligibilityOutcomes","list","active","getOptionItems","sort","a","b","sortOrder","c","CodeListService","profileService","organisationDocumentService","individual","preview","organisationDocuments","getOrganisationDocumentsByOrganisation","generateAttachmentDownloadUrl","applicationNumber","link","ApplicationFormService","CurrencyFormatter","decimalPoints","toFixed","getAdditionalInfoRequest","applicationId","additionalInformationRequestId","createAndSubmitAdditionalInfoRequest","getAttachmentDocumentUrl","additionalInformationRequestItemId","attachmentId","downloadAdditionalInformationRequestAttachment","downloadAdditionalInformationRequestSubmittedByAgencyAttachment","SharedRequestAdditionalInformationServices","ROUTE_GRANTS_DIRECTORY","ROUTE_APPLICATIONS","ROUTE_APPLICATION_OUTCOME_SUMMARY","ROUTE_VOUCHERS","ROUTE_VOUCHER_DASHBOARD","ROUTE_VOUCHER_REDEMPTION","ROUTE_VOUCHER_ENTER","ROUTE_VOUCHER_BULK_ENTRY","ROUTE_VOUCHER_SUPPLIER_VOUCHER_LIST","ROUTE_VOUCHER_REDEMPTION_REQUESTS","ROUTE_VOUCHER_REDEMPTION_NEW_REQUEST","ROUTE_VOUCHER_REDEMPTION_REQUEST_DETAIL","ROUTE_VOUCHER_SUPPLIER","ROUTE_APPLICATIONS_IN_PROGRESS","ApplicationsInProgress","ROUTE_APPLICATIONS_AWARDED_GRANTS","ApplicationsAwardedGrants","ROUTE_APPLICATIONS_AWARDED_SUPPLIERS","ApplicationsSupplierRegistrations","ROUTE_APPLICATIONS_AWARDED_SUPPLIER","AwardedSupplier","ROUTE_APPLICATIONS_REPORTING","ApplicationsReporting","ROUTE_APPLICATIONS_ACQUITTAL","ApplicationsAcquittal","ROUTE_APPLICATIONS_ACQUITTAL_NEW","ApplicationsAcquittalList","ROUTE_APPLICATIONS_PAYMENTS","ApplicationsPayments","ROUTE_APPLICATIONS_INVITE","ApplicationsInvite","ROUTE_APPLICATIONS_CORRESPONDENCE","ApplicationsCorrespondence","ROUTE_APPLICATIONS_REQUEST_FOR_INFORMATION","ApplicationsRequestForInformation","generateGrantUrl","contentIdentifier","generateApplyUrl","roundIdentifier","generateApplicationUrl","username","password","authToken","encodeURIComponent","requestPasswordReset","getPasswordReset","uniqueCode","updatePasswordFromReset","recaptchaResponse","updatePassword","oldPassword","newPassword","needPasswordChange","email","AuthService","getOrganisationFormTemplate","getIndividualFormTemplate","getNewIndividualForm","getNewOrganisationForm","getDeclarationDocument","applicationFormId","OnlineFormService","notify","reload","VersionNumber","versionMismatchLastNotification","timeSinceLastMismatchNotification","abs","VersionMismatchService","render","instruction","unrender","elements","remove","valid","add","highest","topOffset","element","instr","HTMLInputElement","parentElement","theOffset","top","nodeName","getNodeParentElement","parentNode","classList","parent","closest","document","createElement","textContent","formGroupParent","appendChild","div","node","HTMLElement","removeHasError","querySelector","removeChild","nodeType","base64toBlob","base64Data","contentType","byteCharacters","atob","bytesLength","slicesCount","ceil","byteArrays","sliceIndex","begin","end","min","bytes","offset","charCodeAt","Uint8Array","Blob","getUnreadNotifications","searchNotifications","getNotification","notificationId","markAsRead","markAllAsRead","NotificationService","crumbs","processInstruction","getParentInstructions","parentInstruction","concat","navInstruction","parentInstructions","getAllInstructions","config","settings","breadCrumb","BreadCrumbItem","params","assign","childRoute","routeConfig","generate","breadcrumb","parentBreadcrumbs","parentRouteConfig","routes","newParams","requiredParams","identifyPathParams","paramName","substr","matches","match","BreadcrumbService","validateAddresses","searchAddress","query","addressSearch","AddressService","getSubscriptionOptions","getOrganisationSubscriptionOptions","updateSubscriptionOptions","subscriptionOptions","SubscriptionService","getSystemNotifications","abrLookup","abn","UtilityService","getNextIndex","buttonNavigationState","hasIntroduction","nextStepIndex","getCurrentIndex","nextIndex","previousIndex","highlightFirstStep","sideBar","highlightLastStep","highlightNextStep","next","removeAllHightlight","highlightPreviousStep","previous","previousStepIndex","highlightJumpStep","stepCount","FormNavigationServices","getBlankApplication","publicContentId","grantRoundId","orgIdQuery","getBlankApplicationBySlugOrId","publicContentIdentification","grantRoundIdentification","createApplicationBySlug","form","publicContentIdentifier","grantRoundIdentifier","downloadApplicationAsPdf","reject","getExistingApplication","createApplication","updateApplication","application","getApplications","searchRequest","transitionApplication","transition","ApplicationActions","orgIdAsQuery","getApplicationHistory","loggedInWithCorrectProfileCheck","isNew","availableOrganisationProfiles","redirectUrl","loginOrRegister","loggedInCheckResult","isIndividualEligible","isOrganisationEligible","applyNowCondition","OrganisationIndividualCanApply","OnlyIndividualCanApply","OnlyOrganisationCanApply","serverError","content","output","applicationFormState","ApplicationService","getAcquittalRequirement","acquittalRequirementId","createSubmission","submission","updateSubmission","filterAcquittal","getOutstandingAcquittalProfileSummary","getAcquittalForPayment","paymentId","downloadSubmissionDocument","fileStorageId","downloadTemplateDocument","downloadSupportingFile","AcquittalService","getAdditionalInfoList","getRespondedAdditionalInfoRequest","saveAdditionalInfoRequest","saveAndSubmitAdditionalInfoRequest","downloadQuestionDocument","downloadSubmittedAgencyDocument","AdditionalInfoService","getOrganisationDocument","documentId","createOrganisationDocument","updateOrganisationDocument","deleteOrganisationDocument","organisationDocumentId","downloadOrganisationDocument","OrganisationDocumentService","currentId","ControlIdGenerator","symbolsDictionary","Map","symbols","set","valdiateVoucherParts","parts","tempCode","part","partLength","checkDigitAlg1","partiallyValidateVoucherNumber","validateVoucherNumber","check","routeApplications","updateUserDetails","hasMultipleProfiles","unbind","isActive","setIndividualActiveProfile","setOrganisationActiveProfile","register","Register","twoWay","ActiveProfile","LoginView","notificationService","deepObserver","max_notification_count","loading","NotificationEvents","NotificationRead","AllNotificationsRead","removeAllItems","results","viewInbox","totalRecords","items","MessageBar","acquittalService","dialogController","outstandingAcquittalSummaries","outstandingAcquittals","markAndAction","viewAll","openOutstandingAcquittalModal","summary","individualName","cancel","NotificationBar","Divider","activate","navigateToOutstandingAcquittals","summaryInfo","close","OutstandingAcquittalProfileModal","additionalInfoService","downloadDocument","AdditionalInformationModal","applicationService","applicationFormService","isGeneratingPdf","promises","isIndividual","existingApplication","all","exportAsPdf","findSystemQuestionTemplate","temp","formTemplate","systemQuestion","findQuestionAnswer","applicationForm","ApplicationView","configureRouter","moduleId","validationControllerFactory","assessmentService","modal","isBusy","comments","ConflictOfInterestModal","fundingRecommendations","ensure","maxLength","required","when","submitting","fundingRecommendationOutcome","requiresFundingReccomendation","numericTypeList","numericQuestion","numericResult","questionTypeList","helpAttachment","validate","saving","validationHasErrors","validationError","save","viewApplication","AssessmentEdit","page","pageSize","sortDirection","Asc","sortColumn","search","viewAssessmentUrl","viewApplicationUrl","viewAdditionalInfo","filterWatcher","searching","getStatusLabelClass","applicationStatus","Completed","InProgress","Pending","AwaitingPreviousStep","AssessmentCheckStatusLabelClassMap","assessmentCheckResponseStatus","AssessmentList","canActivate","navigationInstruction","edit","backToList","conflict","modalModel","downloadQuestionAttachment","assessmentCheckResponseQAId","downloadNumericQuestionAttachment","assessmentCheckResponseNumericId","downloadOutcomeAttachment","AssessmentsView","cb","require","addressService","searchInputMode","noPoBox","debugLog","originalAddress","allResults","init","that","selectElement","selectize","valueField","labelField","plugins","openOnFocus","selectOnTab","score","loadThrottle","closeAfterSelect","load","selectizeApi","clearOptions","uuid","formatAddress","finally","addOption","setValue","itemSelected","itemRemoved","setTimeout","inputelement","autocomplete","changeToManual","changeToSearch","newAddress","destroy","selectedValuesObserver","AddressSearch","Element","configure","aurelia","globalResources","validationController","upperCase","RegExp","lowerCase","numbers","special","satisfies","rulesMet","passedNumberRule","passedUpperCaseRule","passedLowerCaseRule","passedSpecialCharacterRule","passedMinLengthRule","withMessage","passwordChanged","strengthPercentage","passwordStrengthMessage","barColour","passwordStrengthPercentage","PasswordStrength","ready","script","src","async","defer","head","theme","isSet","sitekey","reset","widgetId","grecaptcha","verified","Recaptcha","TableDataAttribute","recordCount","numberOfPageButtons","showFirstLastButtons","showJumpButtons","canNavigate","nextDisabled","prevDisabled","pageCount","pages","changePage","can","cap","createPages","recordCountChanged","resetPageIfNotEnoughResults","pageChanged","numToRender","indicatorPosition","firstPageNumber","lastPageNumber","dif","updateButtons","last","nextJump","prev","prevJump","first","TableDataPagination","tableData","getSortColumn","setSortColumn","getSortDirection","setSortDirection","direction","filterColumnObserver","refreshCssClass","filterDirectionObserver","addEventListener","currentColumn","currentDirection","Desc","None","primaryProperty","TableDataSortAttribute","IApplyNowModalConditionsEnum","subtitle","canIndividual","canOrganisation","canIndividualOrganisation","dividerWord","contentSlug","grantRoundSlug","nonAvailableOrganisationProfiles","getNonAvailableOrganisationProfiles","isThereNonAvailableOrganisationProfiles","applyNowState","organisations","organisationIds","includes","switchToPersonalAccount","user","checkResult","registerAnOrganisation","OrganisationProfile","modalOk","ApplyNowModal","hideModal","loginLink","registerUrl","LoginOrRegisterModal","applicationState","OrganisationIndividualCanApplyModal","SupplierRoute","nav","GrantsDetail","auth","layoutView","layoutViewModel","DefaultLayout","authService","resetPasswordFields","confirmPassword","ChangePassword","use","standardConfiguration","plugin","feature","start","container","setRoot","longStackTraces","editRedirectNavStrategy","IndividualBankDetailsList","navigationStrategy","IndividualProfile","IndividualBankDetailsEdit","accountNumber","accountName","bsb","branchLocation","bankInstitution","bt","displayName","satisfiesRule","OrganisationBankDetailsEdit","bankDetails","bankDetailId","ChangePasswordEdit","validateTrigger","manual","m","newEmailAddress","rules","newUsernameRules","ChangeUsernameEdit","residentialAddressChanged","residentialAddressManualInput","postalAddressChanged","postalAddressManualInput","postalAddressIsDifferent","residentialAddressLabel","postalAddressLabel","titlePromise","titleList","profilePromise","postalSameAsResidentialAddress","postalAddressIsDifferentChanged","revalidatePhoneNumbers","titleId","familyName","givenName","middleName","mobilePhoneNumber","residentialAddress","postalAddress","saveIndividualProfile","IndividualProfileView","contactLabel","workPhoneNumber","homePhoneNumber","ContactInformationEdit","ContactInformationView","ChangePasswordForm","menu","MmenuLight","offCanvasElement","drawer","offcanvas","position","toggleChanged","openFilter","LeftSidebar","toggle","showSidebar","IndividualProfileEdit","BankDetailsView","ManageAccountChangePassword","ManageAccountChangeUsername","Subscription","AccountDetailsModule","subscriptionService","entity","watchers","busy","unsubscribe","categories","categoryIds","receiveEmails","subscribeIndividual","subscribeOrganisation","orgId","s","category","selected","unsubscribeAll","optin","SubcriptionEdit","Subscriptions","taskQueue","eventNameSpace","queueTask","setControlsHeight","minHeight","heightOffset","minimumHeight","newheight","innerWidth","innerHeight","documentElement","clientWidth","clientHeight","getElementsByTagName","height","GntElementHeight","placement","titleChanged","attr","tooltip","GrantsTooltip","disabled","autoUnmask","postValidation","evt","createEvent","initEvent","abnInput","dispatchEvent","mask","Abn","acnInput","Acn","controlId","clearReadonly","countryList","countryListLoaded","stateListLoaded","countryCodes","countryData","australia","stateCodes","stateData","stateList","readonly","minLength","found","countryUpdated","ensureAddressValid","matchResult","ExactMatch","isVerified","addresstype","rejectOnCancel","pickedAddress","showStateSelect","readonlyChanged","AddressInput","addressLiner","addressLine","ValidateAddressModal","fileService","download","FileDisplay","multiple","uploadInProgress","fileMode","allowedExtensions","allowUploadLimit","uploadLimit","draggingOver","random","files","uploader","deleteWithoutQuestion","f","fireInputEvents","retry","startedUploadingCallback","uploadError","finishedUploadingCallback","fileListChanged","uploadMultipleFiles","fileList","uploadSingleFile","deleteFileOnReplace","filePromises","fileArray","aFileWasRemoved","totalFileSize","size","isAllowedFileExtension","notifyOfFileSizeError","thisFile","fileSizeBytes","lastModifiedBy","lastModifiedTime","toISOString","isAllowedFileSize","notifyOfExtensionError","deleteMultiple","deleteSingle","createCustomEvent","extension","drop","ev","dataTransfer","dragOver","dragEnter","dragLeave","oneTime","Function","FileUploader","breadcrumbService","Breadcrumb","inline","displayProperty","idProperty","internalOptionSelectedObservers","mapOptionsToInternal","optionsChanged","internalOptions","option","intOption","CheckboxListOption","selectedValues","selectedValuesChanged","internalOptionsChanged","subscription","updateSelected","CheckboxList","ConfirmModal","precision","digits","placeholder","currencyInput","valueChanged","alias","rightAlign","integerDigits","clearMaskOnLostFocus","unmaskAsNumber","event","customEvent","CustomEvent","detail","bubbles","Currency","previousValue","CurrencyChange","defaultOptions","allowInput","clickOpens","dateFormat","enableTime","static","pickerOptions","_momentDateFormat","_momentDateTimeFormat","onChange","selectedDates","dateStr","instance","_stringToDate","_isNullOrEmpty","_dateSyncedWithInput","_dateSyncedWithFlatPickr","_flatpickr","setDate","_cloneDate","d","onValueUpdate","onClose","minDate","toDate","_loadPicker","newDate","isArray","pickerInput","view","modelDates","modelDate","v","viewDate","trim","date","inputStr","format","readonlyFieldClass","DatePicker","prefix","DecimalInput","topResults","checkEmails","maxMisspelled","lengthDiffMax","domains","emailChecker","correctValue","correctEmail","EmailInput","featuredGrantService","featuredGrant","FeaturedGrants","rows","updateStyle","textAreaElementChanged","textAreaElement","style","overflowY","GntTextArea","icon","HelpText","idGenerator","stacked","includeNtRegions","includeInterstateInternational","l","selectedType","selectedLocations","All","selectedLocationsChanged","loadingLocationTypes","types","locationTypes","NTRegions","InterstateInternational","loadingLocations","locations","selectedTypeChanged","newVal","oldVal","allNtSelected","Location","SystemNotificationService","systemNotificationService","res","messages","Banner","formDependencyFactory","formNavigationServices","showSubmit","allowAdditionalInfoRequests","stepTemplates","onSubmitValidation","declarationErrors","requiredDocumentErrors","changeOrBlur","showValidationErrorCount","showDeclaration","showIntro","setupNav","stepInstance","stepTemplate","stepId","templateStepId","showIntroPage","navToSection","determineSectionNavigation","showApplicationNumber","attachment","actionedByAgencyFileStorage","generateDependencyServices","questionTemplateArray","step","dependencyServices","dependencyRules","disposeDependencyServices","sectionAddedCallback","validateForSave","jumpToErrorSection","validateForSubmit","scroll","setActiveStep","sectionName","templateSectionId","sectionElement","getElementById","scrollToElement","mainContent","queueMicroTask","align","showRequiredDocuments","activeStep","showDeclarationPage","showRequiredDocumentsPage","navigateForm","navigateNextStep","navigatePreviousStep","createdByAgencyId","ApplicationFormCustomElement","of","lines","lineHeight","departmentChanged","renderedDepartment","contentsInStrong","broken","orangeHeightUnit","AboveAnswer","ToolTip","QLabelCustomElement","BelowAnswer","formService","fi","documentDeclaration","defaultBinding","DocumentDeclaration","showStep","tl","declared","equals","dateOfBirth","dateOfDeclaration","declaration","FormDeclaration","FormIntro","sectionGroupTemplates","buildNav","sgt","sectionGroupInstance","NavStepCustomElement","utilsService","checkingAbr","abnValidated","notActive","details","abnResult","visibility","isMandatory","validateAbn","retrievedBy","retrievedOn","FormAbnLookup","loadingStates","loadingCountries","nt","NT","builder","isNullOrEmpty","FormAddress","abnChanged","abnFormatValid","abrLookupValidation","businessName","lookupAlreadyPerformed","vm","oneFieldEntered","allFieldsEntered","clearExistingValidation","mainTradingName","FormBusiness","codeListService","schools","lastName","schoolRequired","schoolId","middleNameRequired","dateOfBirthRequired","maxAgeRequired","setFullYear","minAgeRequired","configurationOptions","configurationType","ShowSelectSchool","ShowSelectMiddleName","ShowSelectDateOfBirth","ShowSelectUPN","ShowSelectPreviousSchool","MaximumAge","MinimumAge","FormChild","loadingRoles","applicationContactRoles","contact","contactName","emailAddress","phoneNumber","applicationContactRoleId","roleRequired","SpecifyContactRole","FormContact","dateValueConverter","removeObject","dateFrom","dateTo","minDateRule","MinDate","valueEntered","maxDateRule","MaxDate","maxDate","FormDateRange","comparatorQuestion","ProjectEndDate","context","parentOverrideContext","ProjectStartDate","addObject","FormDate","showMoney","showDecimal","decimalPrefix","minDecimalRule","MinDecimal","maxDecimalRule","MaxDecimal","DecimalPlaces","FormDecimalCustomElement","uploadOnly","readOnly","Profile","ExternalSystem","Upload","Comment","NoSelection","FileUpload","RequiredDocument","loadingDocuments","documents","canUpload","allowFileUploads","internal","isPreview","documentSource","checkDocumentSource","fromProfile","fromExternalSystem","fromUpload","fromComment","documentSources","documentTypes","profileFileId","extensions","fileCategoryConfigs","fileUploadCategory","Document","Image","Audio","Video","Presentation","Compressed","Spreadsheet","UploadOnly","rechoose","profileDocumentTitle","profileDocumentTypeDesc","FormFileUpload","requestAdditionalInfoService","showSingleLineText","showMultiLineText","showYesNoToggle","showNumber","showAddress","showDate","showDateRange","showSingleSelectList","showMultiSelectList","showLocation","showFileUpload","showRequestedFundingAmounts","showContact","showChild","showOpeningHours","showText","showPerson","showBusiness","showAbnLookup","showRequestAdditionalInformation","SingleLineText","URL","SocialMediaLink","Email","PhoneNumber","MultiLineText","Address","DateRange","RequestedFundingAmount","Contact","Child","OpeningHours","TextOnly","Person","Business","ABNLookup","instancesNeededToBeCreated","addQuestionInstance","updateQuestionValues","visibleStatus","canAddQuestion","repeatMax","canDeleteQuestion","removeQuestionInstance","requestAdditionalInformationModal","grantId","grantIdOrNew","roundId","roundIdOrNew","formInstanceId","formInstanceAnswerId","additionalInformationRequest","toggleRequestAdditionalInformation","lockAnswer","FormQuestionGroup","locationTypeList","localityList","observers","loadingTypes","singleAnswerChanged","answers","showSingleSelect","singleAnswer","AllowedLocalityType","locationType","refreshLocations","minSelectedOptionsRule","MinSelectedOptions","maxSelectedOptionsRule","MaxSelectedOptions","multiSelectOption","MultiSelect","localityId","FormLocation","showDropDownList","showCheckBoxList","optionList","OptionsList","questionCodeListType","SortAlphabetically","codeOptions","checkBoxOptions","minSelectedOptions","maxSelectedOptions","FormMultiSelectList","minCharacterRule","MinCharacters","maxCharacterRule","MaxCharacters","maxAllowedCharacters","FormMultilineText","minIntegerRule","MinInteger","maxIntegerRule","MaxInteger","FormNumber","sunday","monday","tuesday","wednesday","thursday","friday","saturday","FormOpeningHours","FormPerson","totalRequestedAmount","recalculateTotal","financialYearDescription","financialYearId","finId","amount","recurringAmount","total","requestedAmount","toNumber","FormRequestedAmount","showRadioButtonList","activeOptions","answerIsActive","val1","val2","FormSingleSelectList","showUrl","showEmail","showPhone","FormSingleLineTextCustomElement","FormTextBlock","FormYesNoToggle","responded","Responded","hasAnswer","answerText","actionedByAgencyDate","getAnswer","actionedByAgencyComment","hasAttachment","getAttachment","downloadAdditionalInformationDocument","RequestAdditionalInformation","isSubmitting","additionalInformationRequestItems","send","visibleToAssessors","requestQuestionTypeDescription","questionText","requestQuestionType","RequestAdditionalInformationModal","canDelete","questionGroupTemplates","sectionInstance","buildQuestion","qgt","questionGroupInstance","sectionTemplate","FormSection","addSectionButtonText","addSectionButtonOverrideText","addSectionInstance","updateInstanceValues","canAddInstance","canDeleteInstance","newSortOrder","newSectionInstance","allowAdditionalInformation","removeSectionInstance","FormSectionGroup","theOrder","buildSection","cr","FormStep","_flagSet","innerHTML","OptionalAttribute","registrations","ACNC","ORIC","allowUpload","fixedDocumentType","existingDocuments","documentLocation","acncRegistered","oricRegistered","documentTypesList","mode","docTypeAdditionalInfo","additionalInfoRequired","documentFoundOnACNC","documentFoundOnORIC","expiryDate","documentTypeId","docTypeWatcher","documentTitle","documentTypeOther","docType","additionalDetailsRequired","documentLocationChanged","OrganisationDocument","phoneNumberType","inputMask","phoneInput","created","forceUiUpdate","RadioButtonList","multiselect","valueProperty","canCreateOption","sortProperty","allowEmptyOption","disabledField","sortField","field","maxItems","create","input","initSelectizeApi","disable","selectedValueChanged","disabledChanged","enable","valueIsNumeric","selectedValue","addItem","valueString","registerSelectedValuesObserver","changes","addedCount","addedValue","removed","removedValue","removedValueString","optionsObserver","syncOptions","removedObject","removeOption","refreshItems","opt","SelectInput","InlineTableField","convertUrls","menuBar","toolBar","statusBar","insertImageParams","categoriseMergeField","editor","cachedValue","setContent","owningView","removeNodes","call","enableFontFamily","mergeFields","setMode","textEditorId","selector","font_formats","menubar","statusbar","content_style","toolbar","link_list","internalLinks","skin","content_css","convert_urls","getContent","mergeFieldCategories","mergeField","catName","catMergeField","getSubmenuItems","onAction","insertContent","ui","registry","addMenuButton","showCategory","activeEditor","getBody","setAttribute","TextEditor","validationErrorChanged","ValidationSummaryComponent","activeTabChanged","tabsChanged","setSelected","jumpToFirstTabWithErrors","tab","tabs","activeTab","tabName","selectTab","targets","firstTabWithError","Wizard","hidden","yesText","noText","YesNo","maybeText","YesNoMaybe","formattedValue","inputBlob","createObjectURL","inclGst","getOnlyGst","amountExclGst","gstValue","greaterThan","times","toDecimalPlaces","ROUND_HALF_UP","noValueString","formatString","ago","momentDate","diff","keyProp","descProp","DurationSignalUpdate","signals","difference","calculateDifference","toHours","toDays","toMonths","toYears","dt1","timeDiff","dt2","diffTime","minutes","hour","day","month","year","textToHighlight","splitAndKeepDelimiters","delimiter","fromView","parseInt","tmp","innerText","stringCount","trimmedString","breadCrumbService","environmentLabel","appVersion","appLastUpdated","lastUpdated","homeRoute","isNavigating","appName","pushState","addPipelineStep","GrantsAuthorizeStep","GrantsPostNavigationRender","rts","FAQ","Help","HelpIntroduction","SetupAccount","ManageProfileAccess","CreateManageOrgAccess","OrgUserAccess","JoinAnOrg","GrantApplication","GrantSearch","GrantEnquiry","SubmitApplication","ManageGrant","ApplicationManagement","ViewAwardedGrants","Reports","UpdateCorrespondence","ROI","PasswordAndComputerProblems","OrganisationInviteAccept","acceptingInvite","OrganisationInviteReject","RegisterRequest","RecoverPassword","ResetPassword","ManageAccount","ManageAccountChangeUsernameConfirm","ChangePasswordRequired","AssessorInviteAccept","AssessorInviteDecline","IndividualSubscriptions","mapUnknownRoutes","fallbackRoute","Shell","run","canAccess","some","mainNavCollapseQuery","mainNavCollapse","contains","scrollTo"],"mappings":"wFAy/BO,IAAOA,EAz/Bd,kCAy/BA,SAAcA,IAAU,SAAAC,IACvB,SAAYC,GACX,2BACA,iCACA,qDACA,yCACA,2CACA,uDACA,uCACA,iDACA,iDACA,mDACA,8CACA,oCACA,4CACA,4CACA,0CACA,4CACA,gDAjBD,CAAY,EAAAA,YAAA,EAAAA,UAAS,KAmBrB,SAAYC,GACX,iBACA,mBACA,mBAHD,CAAY,EAAAA,gBAAA,EAAAA,cAAa,KAKzB,SAAYC,GACX,uBACA,6BACA,2BACA,uBACA,iDACA,mCACA,qBACA,2CACA,2BACA,0DAVD,CAAY,EAAAA,eAAA,EAAAA,aAAY,KAYxB,SAAYC,GACX,uCACA,qCACA,iCACA,iCACA,2CACA,yCACA,+BACA,mBACA,6BACA,sBACA,0BACA,wBACA,kCACA,sBACA,kBACA,0BACA,4BACA,oCACA,wDACA,0BACA,sBACA,0CACA,oCACA,4BACA,4CACA,wBACA,4BACA,8BA5BD,CAAY,EAAAA,eAAA,EAAAA,aAAY,KA8BxB,SAAYC,GACX,yBACA,iCACA,iCACA,iCAJD,CAAY,EAAAA,mBAAA,EAAAA,iBAAgB,KAM5B,SAAYC,GACX,uBACA,2BACA,iCAHD,CAAY,EAAAA,oBAAA,EAAAA,kBAAiB,KAK7B,SAAYC,GACX,iBACA,eAFD,CAAY,EAAAA,kBAAA,EAAAA,gBAAe,KAI3B,SAAYC,GACX,yBACA,yBACA,6CACA,6CACA,+BACA,+BACA,qCACA,qCACA,+BACA,gCACA,gDACA,gDACA,gDACA,kCACA,kDACA,kCACA,oDACA,gDACA,sCACA,gDACA,4CACA,4DACA,sDACA,gCACA,gCACA,oDACA,sCACA,oCACA,gCACA,gEA9BD,CAAY,EAAAA,4BAAA,EAAAA,0BAAyB,KAgCrC,SAAYC,GACX,eACA,iBACA,iBACA,iBACA,eACA,iBACA,iBACA,eARD,CAAY,EAAAA,iBAAA,EAAAA,eAAc,KAU1B,SAAYC,GACX,iCACA,mCACA,2CACA,yCACA,2CACA,uCACA,+BACA,qCACA,2BACA,kDACA,gDACA,kCACA,wCACA,4BAdD,CAAY,EAAAA,2BAAA,EAAAA,yBAAwB,KAgBpC,SAAYC,GACX,iCACA,qBACA,mCACA,yDACA,yCACA,2DACA,mFACA,iCACA,uDACA,0BACA,8BACA,gDACA,8CACA,sCACA,wCACA,kDAhBD,CAAY,EAAAA,uBAAA,EAAAA,qBAAoB,KAkBhC,SAAYC,GACX,qDACA,2DAFD,CAAY,EAAAA,YAAA,EAAAA,UAAS,KAIrB,SAAYC,GACX,yBACA,uBACA,yBACA,uCACA,iCALD,CAAY,EAAAA,4BAAA,EAAAA,0BAAyB,KAOrC,SAAYC,GACX,mBACA,mBAFD,CAAY,EAAAA,sBAAA,EAAAA,oBAAmB,KAI/B,SAAYC,GACX,yBACA,yCACA,uCACA,6CACA,6CACA,6CACA,2CACA,qCACA,mCACA,8BACA,0CACA,wCACA,8CACA,4CACA,gDACA,0DACA,sCACA,wBACA,4CAnBD,CAAY,EAAAA,2BAAA,EAAAA,yBAAwB,KAqBpC,SAAYC,GACX,qBACA,6BACA,6CACA,yBACA,iCACA,mEACA,6CACA,2DACA,mEACA,4CACA,8BACA,wCACA,4CACA,wCACA,kDACA,sDACA,kEACA,oEACA,kDACA,wEACA,8DACA,kEACA,8EACA,gFACA,sGACA,8DACA,wDACA,4DACA,wDACA,8DACA,kEACA,8DACA,sCACA,sEACA,4CACA,4CACA,sCACA,oCACA,oCACA,0DACA,gCACA,4CACA,0FACA,4BACA,kCACA,wBACA,wCACA,4BACA,wDACA,gEACA,oEACA,4DApDD,CAAY,EAAAA,wBAAA,EAAAA,sBAAqB,KAsDjC,SAAYC,GACX,mCACA,+CACA,2CACA,2BACA,+CACA,6BACA,6BACA,iCARD,CAAY,EAAAA,yBAAA,EAAAA,uBAAsB,KAUlC,SAAYC,GACX,qBACA,yBACA,uBACA,2BACA,uBALD,CAAY,EAAAA,iCAAA,EAAAA,+BAA8B,KAO1C,SAAYC,GACX,mBACA,2BACA,yBACA,yBACA,6BALD,CAAY,EAAAA,6BAAA,EAAAA,2BAA0B,KAOtC,SAAYC,GACX,2BACA,mBAFD,CAAY,EAAAA,wBAAA,EAAAA,sBAAqB,KAIjC,SAAYC,GACX,yBACA,+BACA,6BAHD,CAAY,EAAAA,wBAAA,EAAAA,sBAAqB,KAKjC,SAAYC,GACX,mDACA,yBACA,+BACA,6BACA,+CALD,CAAY,EAAAA,gCAAA,EAAAA,8BAA6B,KAOzC,SAAYC,GACX,2BACA,qBACA,qBACA,qBACA,mCACA,iCACA,+BAPD,CAAY,EAAAA,qBAAA,EAAAA,mBAAkB,KAS9B,SAAYC,GACX,+BACA,mCAFD,CAAY,EAAAA,kBAAA,EAAAA,gBAAe,KAI3B,SAAYC,GACX,iBACA,iCACA,6BACA,uCACA,6BACA,yDAND,CAAY,EAAAA,eAAA,EAAAA,aAAY,KAQxB,SAAYC,GACX,iDACA,2CACA,uCACA,uCACA,yDACA,6DACA,+DACA,mEACA,mEACA,8CACA,wDACA,sDACA,oDACA,wCACA,sCACA,wEACA,kFACA,8CACA,4CACA,4CACA,8CACA,kDACA,8CACA,8CACA,kDACA,kEACA,8DACA,sFACA,wFACA,4EACA,sFACA,0DACA,8DACA,sCACA,wDACA,8CACA,8DACA,gDACA,kEACA,wDACA,wEACA,4CACA,sCA3CD,CAAY,EAAAA,iBAAA,EAAAA,eAAc,KA6C1B,SAAYC,GACX,iDACA,uDACA,+DAHD,CAAY,EAAAA,0BAAA,EAAAA,wBAAuB,KAKnC,SAAYC,GACX,6BACA,+CACA,iDAHD,CAAY,EAAAA,oBAAA,EAAAA,kBAAiB,KAK7B,SAAYC,GACX,qBACA,+BACA,qBACA,6BACA,yBALD,CAAY,EAAAA,qCAAA,EAAAA,mCAAkC,KA5WvB,GAAA7B,YAAA,EAAAA,UAAS,KAAjC,CAAcD,MAAS,M,+BCmShB,IAAO+B,EAAd,2CAAcA,IAAI,SAAA9B,IACjB,SAAY+B,GACX,qCACA,mDACA,iEACA,iEACA,+EACA,iDACA,qCACA,6CACA,qDACA,sDACA,0DACA,oCACA,gCACA,oCACA,oBACA,4BACA,sBACA,0BACA,sBACA,0CACA,0CACA,4BACA,sCACA,4DACA,4DACA,gDACA,4CACA,4CACA,4CACA,kDACA,0EACA,kEACA,oEACA,sEACA,wEACA,oCACA,wDACA,8DACA,8EACA,sDACA,oDACA,sDACA,8DACA,gEACA,wEACA,8EACA,kDACA,gDACA,8CACA,kCACA,oCACA,kDACA,0DACA,8DACA,8DACA,gEACA,wEACA,wEACA,sFACA,0EACA,0CACA,wDACA,gEACA,oEACA,oEACA,sEACA,8EACA,8EACA,4FACA,gFACA,8BACA,sCACA,sCACA,sDACA,8DACA,8DACA,8BACA,sCACA,sCACA,sCACA,0BACA,kCACA,kCACA,wCACA,wCACA,wCACA,wBACA,0CACA,8CACA,8DACA,8DACA,oDACA,sDACA,wBACA,0BACA,oBACA,kBACA,kEACA,4CACA,qCACA,mDACA,mDACA,uDACA,uCACA,+BACA,6CACA,mCACA,qCACA,+CACA,qCACA,mCACA,uDACA,+CACA,2BACA,qDACA,mBACA,6CACA,+BACA,mCACA,6BACA,yDAzHD,CAAY,EAAAA,qBAAA,EAAAA,mBAAkB,KA2H9B,SAAYtB,GACX,eACA,iBACA,iBACA,iBACA,eACA,iBACA,iBACA,eARD,CAAY,EAAAA,iBAAA,EAAAA,eAAc,KAU1B,SAAYuB,GACX,yBACA,qDACA,uCACA,iCACA,+BALD,CAAY,EAAAA,+BAAA,EAAAA,6BAA4B,KAOxC,SAAYC,GACX,iCACA,6DACA,iEACA,6BACA,2BALD,CAAY,EAAAA,wBAAA,EAAAA,sBAAqB,KAOjC,SAAYC,GACX,yBACA,uBACA,2BACA,mCAJD,CAAY,EAAAA,yBAAA,EAAAA,uBAAsB,KAMlC,SAAY/B,GACX,uBACA,6BACA,2BACA,uBACA,iDACA,mCACA,qBACA,2CACA,2BACA,0DAVD,CAAY,EAAAA,eAAA,EAAAA,aAAY,KAYxB,SAAYgC,GACX,iDACA,+DACA,yDACA,uEACA,uEACA,yDACA,yDACA,iEACA,+DACA,kEACA,wEACA,wEACA,4EACA,sEAdD,CAAY,EAAAA,4BAAA,EAAAA,0BAAyB,KAgBrC,SAAYC,GACX,2BACA,uBACA,mBACA,uBACA,+CACA,2CACA,uDACA,yCACA,qDACA,8DACA,oEACA,0DACA,4CACA,wBAdD,CAAY,EAAAA,oCAAA,EAAAA,kCAAiC,KAgB7C,SAAYC,GACX,qBACA,6BACA,yBACA,6BACA,mEACA,6CACA,2DACA,mEACA,2CACA,oDACA,4BACA,oCACA,oCACA,gCACA,4BACA,kCACA,wDACA,gEACA,4DACA,oEACA,4BACA,wBAtBD,CAAY,EAAAA,gCAAA,EAAAA,8BAA6B,KAwBzC,SAAYtB,GACX,yBACA,yCACA,uCACA,6CACA,6CACA,6CACA,2CACA,qCACA,mCACA,8BACA,0CACA,wCACA,8CACA,4CACA,gDACA,0DACA,sCACA,wBACA,4CAnBD,CAAY,EAAAA,2BAAA,EAAAA,yBAAwB,KAqBpC,SAAYuB,GACX,iCACA,yBACA,yBACA,uBACA,6BALD,CAAY,EAAAA,4BAAA,EAAAA,0BAAyB,KAOrC,SAAYC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M/xC,IATH,EAAK/1B,YAAYgO,YACjB,EAAK5N,SAASkD,MAAM,wDACbyyB,EAAK+H,OAAO,IAAI,IAAgB,IAAIzhC,UAAU+B,mBAAmB,IAAI/B,UAAU+B,mBAAmBoQ,aAEzG,EAAKpO,SAASwI,QACd,EAAKxI,SAASkD,MAAM,6DACbyyB,EAAK+H,OAAO,IAAI,IAAgB,IAAIzhC,UAAU+B,mBAAmB,IAAI/B,UAAU+B,mBAAmB0G,OAAQ,CAAEC,SAAUL,EAAcM,EAAGJ,MAMtJ,OAAOmxB,QArCXn1B,KAAKR,SAASmE,QAAQ,yCACfwxB,EAAK+H,OAAO,IAAI,IAAgB,IAAIzhC,UAAU+B,mBAAmB,IAAI/B,UAAU+B,mBAAmB0G,OAAQ,CAAEC,SAAUL,EAAcM,EAAGJ,MAXvImxB,KAjBbyvC,EAAmB,GADxB,I,uBAIwC,IACH,IACG,IACR,IACE,OAP7BA,GAAN,GAsEA,2BAiBA,OAhBI,YAAAqC,IAAA,SAAIplC,EAA8C1M,GAG9C,IAAIiyC,EAAuBnzD,EAAE,sBAC7B,GAAImzD,EAAqB58D,OAAS,EAAG,CACjC,IAAI68D,EAAkBD,EAAqB,GACvCC,EAAgBh4C,UAAUi4C,SAAS,OACnCD,EAAgBh4C,UAAUd,OAAO,MAOzC,OAFA7X,OAAO6wD,SAAS,EAAG,GAEZpyC,KAEf,EAjBA,I,+CCjrBApV,EAAOC,QAAU,2qBAA+qB,EAAQ,IAAyC,kiBAA0iB,EAAQ,KAAmD,6wBAAmxB,EAAQ,IAAyC,yY","file":"assets/js/app.56c410e11a9ce55097ed.chunk.js","sourcesContent":["// This code was generated by a Reinforced.Typings tool. \r\n// Changes to this file may cause incorrect behavior and will be lost if\r\n// the code is regenerated.\r\n\r\nexport module SharedDto.Agreement {\r\n\texport interface IAcquittalInformationDto\r\n\t{\r\n\t\tapplicationFormId: number;\r\n\t\tfundedAmount: number;\r\n\t\tpaymentsMade: number;\r\n\t\tacquittedFunds: number;\r\n\t\tnonAcquittedFunds: number;\r\n\t\treportingPeriodFrom: string;\r\n\t\treportingPeriodTo: string;\r\n\t\tpaymentsInReportingPeriod: number;\r\n\t\tpreviouslyUnacquitted: number;\r\n\t\trepurposedFunds: number;\r\n\t\tfundsToAcquit: number;\r\n\t}\r\n}\r\nexport module SharedDto.Forms {\r\n\texport interface IQuestionAndAnswerDto\r\n\t{\r\n\t\tanswer: SharedDto.OnlineForm.Application.IAnswerDto;\r\n\t\tquestion: SharedDto.OnlineForm.Form.IQuestionDto;\r\n\t}\r\n}\r\nexport module SharedDto {\r\n\texport interface IAbnDetailsDto\r\n\t{\r\n\t\tabn: string;\r\n\t\tactive: boolean;\r\n\t\tgstRegistered: boolean;\r\n\t\tmainTradingName: string;\r\n\t\tbusinessName: string;\r\n\t\ttradingNames: string[];\r\n\t\tstatus: SharedDto.IAbnActiveStatusDto;\r\n\t\tabnRegisteredFrom: string;\r\n\t\tentityType: string;\r\n\t\ttaxConcessions: SharedDto.ITaxConcessionDto[];\r\n\t\tdgrEndorsements: SharedDto.IDGRItemDto[];\r\n\t\tacncRegistration: SharedDto.IACNCRegistrationDto;\r\n\t\tbusinessNames: SharedDto.IActiveNameDto[];\r\n\t\tmainBusinessPostCode: string;\r\n\t\tmainBusinessState: string;\r\n\t\tkey: any;\r\n\t\tasicNumber: string;\r\n\t}\r\n\texport interface IACNCRegistrationDto\r\n\t{\r\n\t\tfrom: string;\r\n\t\tcharityType: string;\r\n\t}\r\n\texport interface ITaxConcessionDto\r\n\t{\r\n\t\tconcession: string;\r\n\t\tfrom: string;\r\n\t}\r\n\texport interface IDGRItemDto\r\n\t{\r\n\t\ttype: string;\r\n\t\tfrom: string;\r\n\t}\r\n\texport interface IAbnActiveStatusDto\r\n\t{\r\n\t\tactive: boolean;\r\n\t\tstatus: string;\r\n\t\teffectiveFromDate?: string;\r\n\t\teffectToDate?: string;\r\n\t}\r\n\texport interface IActiveNameDto\r\n\t{\r\n\t\tname: string;\r\n\t\tfrom: string;\r\n\t}\r\n\texport interface IBankDetailsDto\r\n\t{\r\n\t\tbankDetailsId: number;\r\n\t\tdescription: string;\r\n\t\tbsb: string;\r\n\t\tbankInstitution: string;\r\n\t\tbranchLocation: string;\r\n\t\taccountNumber: string;\r\n\t\taccountName: string;\r\n\t}\r\n\texport interface IAddressDto extends SharedDto.IAddressUpdateDto\r\n\t{\r\n\t\tcountryDescription?: string;\r\n\t\tdisplay?: string;\r\n\t\taustralianStateTerritoryDescription?: string;\r\n\t\tisVerified: boolean;\r\n\t\tmatchType?: string;\r\n\t}\r\n\texport interface IAddressUpdateDto\r\n\t{\r\n\t\taddressId: number;\r\n\t\tline1: string;\r\n\t\tline2: string;\r\n\t\tsuburb: string;\r\n\t\tnonAustralianState: string;\r\n\t\taustralianStateTerritory?: SharedDto.Constants.StateTerritory;\r\n\t\tpostcode: string;\r\n\t\tcountryId?: number;\r\n\t}\r\n\texport interface IEmailBccRecipientsDto\r\n\t{\r\n\t\tdisplayName: string;\r\n\t\temailAddress: string;\r\n\t}\r\n\texport interface IEmailDto\r\n\t{\r\n\t\tsubject: string;\r\n\t\tbody: string;\r\n\t\tfrom: SharedDto.IEmailRecipientDto;\r\n\t\trecipients: SharedDto.IEmailRecipientDto[];\r\n\t\tccRecipients: SharedDto.IEmailCcRecipientsDto[];\r\n\t\tbccRecipients: SharedDto.IEmailBccRecipientsDto[];\r\n\t}\r\n\texport interface IEmailCcRecipientsDto\r\n\t{\r\n\t\tdisplayName: string;\r\n\t\temailAddress: string;\r\n\t}\r\n\texport interface IEmailRecipientDto\r\n\t{\r\n\t\tdisplayName: string;\r\n\t\temailAddress: string;\r\n\t}\r\n\texport interface IErrorResponse\r\n\t{\r\n\t\terrorType: SharedDto.Constants.ErrorType;\r\n\t\tmessage: string;\r\n\t\terrors: string[];\r\n\t}\r\n\texport interface IJavascriptError\r\n\t{\r\n\t\tmessage: string;\r\n\t\tstack: string;\r\n\t\turl: string;\r\n\t\trequestedUrl: string;\r\n\t\tdata: string;\r\n\t}\r\n\texport interface IPagedResult\r\n\t{\r\n\t\ttotalRecords: number;\r\n\t\titems: T[];\r\n\t}\r\n\texport interface IPagingFilter\r\n\t{\r\n\t\tpageSize: number;\r\n\t\tpage: number;\r\n\t\tsortColumn: string;\r\n\t\tsortDirection: SharedDto.Constants.SortDirection;\r\n\t}\r\n\texport interface ISystemNotificationDto\r\n\t{\r\n\t\tsystemNotificationId: number;\r\n\t\tmessage: string;\r\n\t\tpublishDate?: string;\r\n\t\tunpublishDate?: string;\r\n\t\tversionAffected: string;\r\n\t\tdisplayLocation: any;\r\n\t\tdisplayLocationDisplay: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\tactive: boolean;\r\n\t}\r\n\texport interface ICreateUpdateOrganisationDocumentDto\r\n\t{\r\n\t\torganisationDocumentId?: number;\r\n\t\torganisationId: number;\r\n\t\tdocumentTitle: string;\r\n\t\texpiryDate?: string;\r\n\t\tdocumentTypeId?: number;\r\n\t\tdocumentTypeOther: string;\r\n\t\tdocumentFoundOnORIC: boolean;\r\n\t\tdocumentFoundOnACNC: boolean;\r\n\t\texpiryNotificationSentDate?: string;\r\n\t\tfile: SharedDto.IFileUpdateDto;\r\n\t}\r\n\texport interface IOrganisationAuditSharedDto\r\n\t{\r\n\t\torganisationAuditId: number;\r\n\t\torganisationId: number;\r\n\t\tcreatedOn: string;\r\n\t\torganisationAuditCategoryCode: any;\r\n\t\tactionDescription: string;\r\n\t\texternalUserId?: number;\r\n\t\texternalUser: any;\r\n\t\tinternalUserId?: number;\r\n\t\tinternalUser: any;\r\n\t\tfileStorage: SharedDto.IFilePropertiesDto;\r\n\t\tuserType: any;\r\n\t\tfullName: string;\r\n\t}\r\n\texport interface IOrganisationContactRoleDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\tadditionalDetailsRequired: boolean;\r\n\t}\r\n\texport interface IOrganisationDocumentDto extends SharedDto.ICreateUpdateOrganisationDocumentDto\r\n\t{\r\n\t\tdocumentTypeDesc: string;\r\n\t\tfileName: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\tfile: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IOrganisationUserInviteSharedDto\r\n\t{\r\n\t\torganisationId: number;\r\n\t\temailAddress: string;\r\n\t\tisOrganisationAdministrator: boolean;\r\n\t\tcanViewPayment: boolean;\r\n\t\tnotes: string;\r\n\t\tfileStorage: SharedDto.IFilePropertiesDto;\r\n\t\taccess: SharedDto.IOrganisationUserAccessSharedDto[];\r\n\t}\r\n\texport interface IOrganisationUserAccessSharedDto\r\n\t{\r\n\t\torganisationUserAccessId?: number;\r\n\t\torgUserAccessActivity: any;\r\n\t\torgUserAccessActivityDesc: string;\r\n\t\tcanCreateEditSubmit: boolean;\r\n\t\tcanApprove: boolean;\r\n\t}\r\n\texport interface IOrganisationSharedDto\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\taustralianBusinessNumber: string;\r\n\t\taustralianCompanyNumber: string;\r\n\t\tindigenousCorporationNumber: string;\r\n\t\tincorporatedAssociationNumber: string;\r\n\t\tvendorId: string;\r\n\t\tregisteredTrainingOrganisationNumber: string;\r\n\t\tlegalName: string;\r\n\t\tbusinessName: string;\r\n\t\tnotForProfitFlag: boolean;\r\n\t\tlegalEntityTypeId: number;\r\n\t\tgstRegistered: boolean;\r\n\t\tphoneNumber: string;\r\n\t\temailAddress: string;\r\n\t\tfax: string;\r\n\t\twebsite: string;\r\n\t\tstreetAddress: SharedDto.IAddressDto;\r\n\t\tpostalSameAsStreetAddress: boolean;\r\n\t\tpostalAddress: SharedDto.IAddressDto;\r\n\t\tprimaryContact: SharedDto.Profiles.IOrganisationContactDto;\r\n\t\tprimaryActivityId?: number;\r\n\t\tsubActivityId?: number;\r\n\t\tprimaryLocationType?: SharedDto.Constants.LocationType;\r\n\t\tprimaryLocationTypeDescription: string;\r\n\t\tprimaryLocationId?: number;\r\n\t\tsecondaryLocationType?: SharedDto.Constants.LocationType;\r\n\t\tsecondaryLocationTypeDescription: string;\r\n\t\tsecondaryLocations: number[];\r\n\t\tprimaryLocationDescription: string;\r\n\t\tsecondaryLocationsDescription: string;\r\n\t\tdurationOperatingInNTId: number;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IOrganisationUserSharedDto\r\n\t{\r\n\t\texternalUserId?: number;\r\n\t\torganisationUserId: number;\r\n\t\torganisationId: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tfullName: string;\r\n\t\temailAddress: string;\r\n\t\torganisationEmailIsAccountEmail: boolean;\r\n\t\torganisationUserStatus: any;\r\n\t\torganisationUserStatusDesc: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\tisOrganisationAdministrator: boolean;\r\n\t\tcanViewPayment: boolean;\r\n\t\taccess: SharedDto.IOrganisationUserAccessSharedDto[];\r\n\t}\r\n\texport interface IValidateAbnRequest\r\n\t{\r\n\t\tabn: string;\r\n\t\torganisationId: number;\r\n\t}\r\n\texport interface IValidateAbnResponse\r\n\t{\r\n\t\tabn: string;\r\n\t\torganisationName: string;\r\n\t\tbusinessName: string;\r\n\t\tgstRegistered: boolean;\r\n\t\tphoneNumber: string;\r\n\t\temailAddress: string;\r\n\t\tfax: string;\r\n\t\twebsite: string;\r\n\t\tbusinessAddress: SharedDto.IAddressDto;\r\n\t\tpostalAddress: SharedDto.IAddressDto;\r\n\t}\r\n\texport interface IQuestionConfigurationDto\r\n\t{\r\n\t\tquestionConfigurationId: number;\r\n\t\tquestionId: number;\r\n\t\tconfigurationType: SharedDto.Constants.QuestionConfigurationType;\r\n\t\tboolValue?: boolean;\r\n\t\tnumberValue?: number;\r\n\t\tdecimalValue?: number;\r\n\t\tdateValue?: string;\r\n\t\tquestionCodeListType: SharedDto.Constants.QuestionCodeListType;\r\n\t\tlocationType: SharedDto.Constants.LocationType;\r\n\t\tphoneType: SharedDto.Constants.PhoneType;\r\n\t\tfileUploadCategory: SharedDto.Constants.FileUploadCategory;\r\n\t\tfinancialYearId?: number;\r\n\t}\r\n\texport interface IFormInstanceAndTemplateDto\r\n\t{\r\n\t\tformInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n\t\tformTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n\t}\r\n\texport interface ITemporaryFileDto extends SharedDto.IFileDto\r\n\t{\r\n\t\tguid: any;\r\n\t}\r\n\texport interface IFileDto extends SharedDto.IFilePropertiesDto\r\n\t{\r\n\t\tfileContents: number[];\r\n\t\tfileSizeBytes: number;\r\n\t}\r\n\texport interface IFilePropertiesDto extends SharedDto.IFileUpdateDto\r\n\t{\r\n\t\tfileSizeBytes: number;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IFileUpdateDto\r\n\t{\r\n\t\tfileStorageId: number;\r\n\t\tfileName: string;\r\n\t\tguid: string;\r\n\t}\r\n\texport interface IAdvertisingMethodDto\r\n\t{\r\n\t\tadvertisingMethodId: number;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\t\tdetailsNeeded: boolean;\r\n\t\tactive: boolean;\r\n\t}\r\n\texport interface IApplicationProcessDto\r\n\t{\r\n\t\tid: number;\r\n\t\tcode: string;\r\n\t\tname: string;\r\n\t\tdescription: string;\r\n\t}\r\n\texport interface IBeneficiaryDto\r\n\t{\r\n\t\tbeneficiaryId: number;\r\n\t\tcode: string;\r\n\t\tdisplay: string;\r\n\t\tdescription: string;\r\n\t\tlevel: number;\r\n\t\troot: number;\r\n\t\tactive: boolean;\r\n\t\tparentId?: number;\r\n\t}\r\n\texport interface ICategoryDto\r\n\t{\r\n\t\tcategoryId: number;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\t\tlevel: number;\r\n\t\troot: number;\r\n\t\tactive: boolean;\r\n\t\tparentId?: number;\r\n\t}\r\n\texport interface ICodeListItemDto\r\n\t{\r\n\t\tid: number;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\t\tactive: boolean;\r\n\t}\r\n\texport interface ICodeTreeStructureDto\r\n\t{\r\n\t\tid: number;\r\n\t\ttext: string;\r\n\t\tchildren: SharedDto.ICodeTreeStructureDto[];\r\n\t}\r\n\texport interface ICountryDto\r\n\t{\r\n\t\tcountryId: number;\r\n\t\tcode: string;\r\n\t\tname: string;\r\n\t}\r\n\texport interface IDocumentGroupDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\tdocumentTypes: SharedDto.IDocumentTypeDto[];\r\n\t}\r\n\texport interface IDocumentTypeDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\tadditionalDetailsRequired: boolean;\r\n\t\thelpText: string;\r\n\t\tapplicableEntities: string;\r\n\t\thasExpiration: boolean;\r\n\t\tcanRequest: boolean;\r\n\t}\r\n\texport interface IFinancialYearDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\tstartingYear: number;\r\n\t}\r\n\texport interface IInitiativeDto\r\n\t{\r\n\t\tinitiativeId: number;\r\n\t\tdisplay: string;\r\n\t\tdescription: string;\r\n\t\tactive: boolean;\r\n\t\tparentId?: number;\r\n\t}\r\n\texport interface ILegalEntityTypeDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\tlegalEntityType: any;\r\n\t}\r\n\texport interface ILocalityFilterDto\r\n\t{\r\n\t\ttypes: SharedDto.Constants.LocalityType[];\r\n\t\tkeyword: string;\r\n\t}\r\n\texport interface ILocalityOptionDto\r\n\t{\r\n\t\tlocalityId: number;\r\n\t\tname: string;\r\n\t\tdescription: string;\r\n\t\talias: string;\r\n\t\tlocalityType: SharedDto.Constants.LocalityType;\r\n\t\tlocationType?: SharedDto.Constants.LocationType;\r\n\t}\r\n\texport interface INonCashAwardTypeDto\r\n\t{\r\n\t\tnonCashAwardTypeId: number;\r\n\t\tdescription: string;\r\n\t\tactive: boolean;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IOrganisationTypeListItem\r\n\t{\r\n\t\torganisationTypeId: number;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\t\tabrEntityTypeCodes: string[];\r\n\t}\r\n\texport interface IReportingRequirementTypeDto extends SharedDto.ICodeListItemDto\r\n\t{\r\n\t\treportingRequirementType: SharedDto.Constants.ReportingRequirementType;\r\n\t\tgroup: SharedDto.ICodeListItemDto;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IStructureAncestryDto extends SharedDto.IStructureBaseDto\r\n\t{\r\n\t\tparent: SharedDto.IStructureAncestryDto;\r\n\t}\r\n\texport interface IStructureBaseDto\r\n\t{\r\n\t\tstructureId: number;\r\n\t\tagencyId: number;\r\n\t\tstructureTypeCode: string;\r\n\t\tparentId?: number;\r\n\t\tactive: boolean;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IStructureTreeDto extends SharedDto.IStructureBaseDto\r\n\t{\r\n\t\tchildren: SharedDto.IStructureTreeDto[];\r\n\t}\r\n}\r\nexport module SharedDto.Applications {\r\n\texport interface IApplicantNamesDto\r\n\t{\r\n\t\tapplicantName: string;\r\n\t\tgivenName: string;\r\n\t\tmiddleName: string;\r\n\t\tfamilyName: string;\r\n\t\tlegalName: string;\r\n\t}\r\n}\r\nexport module SharedDto.Reporting {\r\n\texport interface IOutcomeMeasureDto extends SharedDto.Reporting.IOutcomeMeasureUpdateDto\r\n\t{\r\n\t\tunitsOfMeasure: SharedDto.Reporting.IOutcomeUnitOfMeasureDto[];\r\n\t}\r\n\texport interface IOutcomeMeasureUpdateDto\r\n\t{\r\n\t\toutcomeMeasureId: number;\r\n\t\tmeasure: string;\r\n\t\tinstructions: string;\r\n\t\tunitsOfMeasure: SharedDto.Reporting.IOutcomeUnitOfMeasureUpdateDto[];\r\n\t}\r\n\texport interface IOutcomeUnitOfMeasureDto extends SharedDto.Reporting.IOutcomeUnitOfMeasureUpdateDto\r\n\t{\r\n\t\ttemplate: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IOutcomeUnitOfMeasureUpdateDto\r\n\t{\r\n\t\tunitOfMeasureId: number;\r\n\t\tunitOfMeasure: string;\r\n\t\tnumber: boolean;\r\n\t\ttext: boolean;\r\n\t\tfile: boolean;\r\n\t\ttemplate: SharedDto.IFileUpdateDto;\r\n\t}\r\n\texport interface IOutputMeasureDto extends SharedDto.Reporting.IOutputMeasureUpdateDto\r\n\t{\r\n\t\treportingRequirementOutputMeasureId: number;\r\n\t\treportingRequirementId: number;\r\n\t\toutputGroupName: string;\r\n\t\toutputServiceName: string;\r\n\t\toutputDescription: string;\r\n\t\tcountingExample: string;\r\n\t\toutputMeasure: string;\r\n\t\tlocationDescription: string;\r\n\t}\r\n\texport interface IOutputMeasureUpdateDto\r\n\t{\r\n\t\toutputId?: number;\r\n\t\tlocationId?: number;\r\n\t\tlocationType?: SharedDto.Constants.LocationType;\r\n\t\toutputCodeNumber: string;\r\n\t}\r\n}\r\nexport module SharedDto.PublicContent {\r\n\texport interface IPublicContentDetailViewDto\r\n\t{\r\n\t\tpublicContentId: number;\r\n\t\tgrantName: string;\r\n\t\tactiveRoundTitle: string;\r\n\t\tapplicationsOpen?: string;\r\n\t\tapplicationsClose?: string;\r\n\t\tapplyNow: any;\r\n\t\tcanPotentiallyApplyNow: boolean;\r\n\t\tnonConcurrentAndStillProcessing: boolean;\r\n\t\tcontentSlug: string;\r\n\t\tgrantRoundSlug: string;\r\n\t\tapplicationFormId?: number;\r\n\t\troundId?: number;\r\n\t\texistingApplicationId?: number;\r\n\t\tagency: string;\r\n\t\tisIndividualEligible: boolean;\r\n\t\tisOrganisationEligible: boolean;\r\n\t\toverviewHtml: string;\r\n\t\tshowGlobalMaxFunding: boolean;\r\n\t\tglobalFundingMax?: number;\r\n\t\tcategories: string[];\r\n\t\tsections: SharedDto.PublicContent.IPublicContentSectionDto[];\r\n\t\texistingApplications: number[];\r\n\t\tsupplierContentTitle: string;\r\n\t\tsupplierPublicContentId?: number;\r\n\t\tsupplierSlug: string;\r\n\t\tpublicContentType: SharedDto.Constants.PublicContentType;\r\n\t}\r\n\texport interface IPublicContentSectionDto\r\n\t{\r\n\t\tsectionName: string;\r\n\t\tsectionHtml: string;\r\n\t}\r\n\texport interface IPublicContentSummaryViewDto\r\n\t{\r\n\t\tpublicContentId: number;\r\n\t\ttitle: string;\r\n\t\tapplicationsOpen?: string;\r\n\t\tapplicationsClose?: string;\r\n\t\tslug: string;\r\n\t\tgrantRoundSlug: string;\r\n\t\tagency: string;\r\n\t\tisIndividualEligible: boolean;\r\n\t\tisOrganisationEligible: boolean;\r\n\t\tshowGlobalMaxFunding: boolean;\r\n\t\tglobalFundingMax?: number;\r\n\t\toverviewHtml: string;\r\n\t\tcategories: string[];\r\n\t\tpublicContentType: SharedDto.Constants.PublicContentType;\r\n\t\tpublicContentTypeDescription: string;\r\n\t\tthirdParty: boolean;\r\n\t\tsupplierContentTitle: string;\r\n\t\tsupplierPublicContentId?: number;\r\n\t}\r\n}\r\nexport module SharedDto.SupplierPortal {\r\n\texport interface ISupplierPortalSearchRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tgrantDetailId: number;\r\n\t\tkeyword: string;\r\n\t\tlocalityIds: number[];\r\n\t\tcategoryIds: number[];\r\n\t}\r\n\texport interface ISupplierPortalDetailDto\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tsupplierName: string;\r\n\t\taboutSection: string;\r\n\t\twebsite: string;\r\n\t\tcontactPhone: string;\r\n\t\tcontactEmail: string;\r\n\t\tsingleLineAddress: string;\r\n\t\tmondayTradingHours: string;\r\n\t\ttuesdayTradingHours: string;\r\n\t\twednesdayTradingHours: string;\r\n\t\tthursdayTradingHours: string;\r\n\t\tfridayTradingHours: string;\r\n\t\tsaturdayTradingHours: string;\r\n\t\tsundayTradingHours: string;\r\n\t\tsocialMediaLinks: string[];\r\n\t\tcategories: string[];\r\n\t\tlocations: string[];\r\n\t}\r\n\texport interface ISupplierPortalSummaryDto\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tsupplierName: string;\r\n\t\taboutSection: string;\r\n\t\tcategories: string[];\r\n\t}\r\n}\r\nexport module SharedDto.Profiles {\r\n\texport interface IOrganisationContactDto\r\n\t{\r\n\t\torganisationContactId: number;\r\n\t\ttitleId: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tphone: string;\r\n\t\tmobile: string;\r\n\t\temail: string;\r\n\t\tfax: string;\r\n\t\torganisationContactRoleId: number;\r\n\t\troleOther: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n}\r\nexport module SharedDto.OnlineForm.Form {\r\n\texport interface IFormTemplateDto\r\n\t{\r\n\t\tsteps: SharedDto.OnlineForm.Form.IStepDto[];\r\n\t\tdependencyRules: SharedDto.OnlineForm.Form.IDependencyDto[];\r\n\t\tformType: any;\r\n\t}\r\n\texport interface IApplicationFormTemplateDto extends SharedDto.OnlineForm.Form.IFormTemplateDto\r\n\t{\r\n\t\tdepartment: string;\r\n\t\tshowIntroPage: boolean;\r\n\t\tintroContent: string;\r\n\t\tprivacyStatementHtml: string;\r\n\t\tdeclarationStatementHtml: string;\r\n\t\tadminBodyQuestionId: number;\r\n\t\tgrantName: string;\r\n\t\tsystemSetProjectServiceTitle: boolean;\r\n\t}\r\n\texport interface IFormListDto\r\n\t{\r\n\t\tformId: number;\r\n\t\tformStatus: any;\r\n\t\ttitle: string;\r\n\t\tdescription: string;\r\n\t\tcreatedById: number;\r\n\t\tcreatedOn: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface ISectionDto\r\n\t{\r\n\t\tsectionId: number;\r\n\t\tstepId: number;\r\n\t\tname: string;\r\n\t\tshowName: boolean;\r\n\t\tsortOrder: number;\r\n\t\trepeatable: boolean;\r\n\t\trepeatMin?: number;\r\n\t\trepeatMax?: number;\r\n\t\tvisible: boolean;\r\n\t\tnavigation: boolean;\r\n\t\tcontentTop: string;\r\n\t\tcontentBottom: string;\r\n\t\taddSectionButtonOverrideText: string;\r\n\t\tremoveSectionButtonOverrideText: string;\r\n\t\tquestions: SharedDto.OnlineForm.Form.IQuestionDto[];\r\n\t}\r\n\texport interface IStepDto\r\n\t{\r\n\t\tstepId: number;\r\n\t\tformId: number;\r\n\t\tdescription: string;\r\n\t\tsortOrder: number;\r\n\t\tvisible: boolean;\r\n\t\tcontentTop: string;\r\n\t\tcontentBottom: string;\r\n\t\tsections: SharedDto.OnlineForm.Form.ISectionDto[];\r\n\t}\r\n\texport interface IOptionItemDto\r\n\t{\r\n\t\toptionItemId: number;\r\n\t\tquestionId: number;\r\n\t\tsortOrder: number;\r\n\t\tdescription: string;\r\n\t\tactive: boolean;\r\n\t}\r\n\texport interface IQuestionDto\r\n\t{\r\n\t\tquestionId: number;\r\n\t\tsectionId: number;\r\n\t\tquestionType: SharedDto.Constants.QuestionType;\r\n\t\tmandatory: boolean;\r\n\t\trepeatable: boolean;\r\n\t\trepeatMin?: number;\r\n\t\trepeatMax?: number;\r\n\t\tquestionText: string;\r\n\t\thelpText: string;\r\n\t\thelpTextLocation?: SharedDto.Constants.HelpTextLocation;\r\n\t\tprepopulatedByIndividualProfile: boolean;\r\n\t\tprepopulatedByOrganisationProfile: boolean;\r\n\t\tsystemPrepopulatedField?: SharedDto.Constants.SystemPrepopulatedField;\r\n\t\tsystemQuestion?: SharedDto.Constants.SystemQuestion;\r\n\t\tsortOrder: number;\r\n\t\tvisible: boolean;\r\n\t\tcontentTop: string;\r\n\t\tcontentBottom: string;\r\n\t\tlockAnswer: boolean;\r\n\t\tconfigurationOptions: SharedDto.IQuestionConfigurationDto[];\r\n\t}\r\n\texport interface IDependencyCriteriaDto\r\n\t{\r\n\t\tformQuestionId: number;\r\n\t\tcriteriaOperation: SharedDto.Constants.CriteriaOperation;\r\n\t\toptionItemId?: number;\r\n\t\tboolValue?: boolean;\r\n\t\tnumberValue?: number;\r\n\t\tdecimalValue?: number;\r\n\t\tdateValue?: string;\r\n\t\tcodeItemId?: number;\r\n\t}\r\n\texport interface IDependencyDto\r\n\t{\r\n\t\tformDependencyId: number;\r\n\t\tformStepId?: number;\r\n\t\tformSectionId?: number;\r\n\t\tformQuestionId?: number;\r\n\t\tvisible: boolean;\r\n\t\tlogicOperator: SharedDto.Constants.LogicalOperator;\r\n\t\tcriteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto[];\r\n\t}\r\n}\r\nexport module SharedDto.OnlineForm.Application {\r\n\texport interface IApplicationDeclarationDto\r\n\t{\r\n\t\tfullName: string;\r\n\t\tdeclared: boolean;\r\n\t\tlocation: string;\r\n\t\ttitleId?: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tdateOfBirth?: string;\r\n\t\tdateOfDeclaration?: string;\r\n\t}\r\n\texport interface IApplicationFormDto\r\n\t{\r\n\t\tapplicationId: number;\r\n\t\tformTemplateId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\tcreatedByAgencyId?: number;\r\n\t\tcreatedByInternalUserId?: number;\r\n\t\tcreatedByInternalUser: string;\r\n\t\tformProfileType: SharedDto.Constants.FormProfileType;\r\n\t\tstatus: SharedDto.Constants.ApplicationFormStatus;\r\n\t\tdeclaration: SharedDto.OnlineForm.Application.IApplicationDeclarationDto;\r\n\t\tdocumentDeclaration: SharedDto.IFilePropertiesDto;\r\n\t\tapplicationsOpen: boolean;\r\n\t\trowVersion: number[];\r\n\t\tprofileId?: number;\r\n\t\toriginalProfileId?: number;\r\n\t\tadminBodyOrgId?: number;\r\n\t\tisPreapproved: boolean;\r\n\t\tformInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n\t\tadditionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\r\n\t}\r\n\texport interface IExistingApplicationDto\r\n\t{\r\n\t\tindividualProfileId?: number;\r\n\t\torganisationId?: number;\r\n\t\tapplicationForm: SharedDto.OnlineForm.Application.IApplicationFormDto;\r\n\t\tformTemplate: SharedDto.OnlineForm.Form.IApplicationFormTemplateDto;\r\n\t}\r\n\texport interface IFormInstanceQuestionGroupDto\r\n\t{\r\n\t\ttemplateQuestionId: number;\r\n\t\tvisible: boolean;\r\n\t\tsortOrder: number;\r\n\t\tallowAdditionalInformation: boolean;\r\n\t\tquestions: SharedDto.OnlineForm.Application.IAnswerDto[];\r\n\t}\r\n\texport interface IFormInstanceSectionDto\r\n\t{\r\n\t\tsectionId: number;\r\n\t\ttemplateSectionId: number;\r\n\t\tsortOrder: number;\r\n\t\tvisible: boolean;\r\n\t\tquestionGroups: SharedDto.OnlineForm.Application.IFormInstanceQuestionGroupDto[];\r\n\t}\r\n\texport interface IFormInstanceSectionGroupDto\r\n\t{\r\n\t\tsectionId: number;\r\n\t\ttemplateSectionId: number;\r\n\t\tvisible: boolean;\r\n\t\tsortOrder: number;\r\n\t\tsections: SharedDto.OnlineForm.Application.IFormInstanceSectionDto[];\r\n\t}\r\n\texport interface IFormInstanceStepDto\r\n\t{\r\n\t\tstepId: number;\r\n\t\ttemplateStepId: number;\r\n\t\tvisible: boolean;\r\n\t\tsortOrder: number;\r\n\t\tsectionGroups: SharedDto.OnlineForm.Application.IFormInstanceSectionGroupDto[];\r\n\t}\r\n\texport interface IFormInstanceDto\r\n\t{\r\n\t\tformInstanceId: number;\r\n\t\tformId: number;\r\n\t\tsteps: SharedDto.OnlineForm.Application.IFormInstanceStepDto[];\r\n\t}\r\n\texport interface IBusinessAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tabn: string;\r\n\t\tbusinessName: string;\r\n\t\tlegalName: string;\r\n\t}\r\n\texport interface IPersonAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tgivenName: string;\r\n\t\tmiddleName: string;\r\n\t\tlastName: string;\r\n\t}\r\n\texport interface IOpeningHoursAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tmonday: string;\r\n\t\ttuesday: string;\r\n\t\twednesday: string;\r\n\t\tthursday: string;\r\n\t\tfriday: string;\r\n\t\tsaturday: string;\r\n\t\tsunday: string;\r\n\t}\r\n\texport interface IChildAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tgivenName: string;\r\n\t\tmiddleName: string;\r\n\t\tlastName: string;\r\n\t\tdateOfBirth?: string;\r\n\t\tschoolId?: number;\r\n\t\tpreviousSchoolId?: number;\r\n\t\tupn: string;\r\n\t}\r\n\texport interface IAddressAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tline1: string;\r\n\t\tline2: string;\r\n\t\tsuburb: string;\r\n\t\taustralianStateTerritory?: SharedDto.Constants.StateTerritory;\r\n\t\tnonAustralianState: string;\r\n\t\tcountryId?: number;\r\n\t\tpostCode: string;\r\n\t}\r\n\texport interface IContactAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tcontactName: string;\r\n\t\tphoneNumber: string;\r\n\t\temailAddress: string;\r\n\t\tapplicationContactRoleId?: number;\r\n\t}\r\n\texport interface IDateAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer?: string;\r\n\t}\r\n\texport interface IDateRangeAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tdateFrom?: string;\r\n\t\tdateTo?: string;\r\n\t}\r\n\texport interface IFileUploadAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tfile: SharedDto.IFilePropertiesDto;\r\n\t\tdocumentSource: SharedDto.Constants.ApplicationDocumentSource;\r\n\t\tcomment: string;\r\n\t\torganisationDocument: SharedDto.ICreateUpdateOrganisationDocumentDto;\r\n\t\tprofileFileId?: number;\r\n\t\tprofileDocumentTitle: string;\r\n\t\tprofileDocumentTypeDesc: string;\r\n\t}\r\n\texport interface ILocationAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswers: number[];\r\n\t\tlocationType?: SharedDto.Constants.LocationType;\r\n\t}\r\n\texport interface IDecimalAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer?: number;\r\n\t}\r\n\texport interface IMultiLineTextAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer: string;\r\n\t}\r\n\texport interface IMultiSelectListAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tselectedOptionItemIds: string[];\r\n\t\tquestionCodeListType: SharedDto.Constants.QuestionCodeListType;\r\n\t}\r\n\texport interface INumberAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer?: number;\r\n\t}\r\n\texport interface IAnswerDto\r\n\t{\r\n\t\tquestionType: SharedDto.Constants.QuestionType;\r\n\t\tquestionId: number;\r\n\t\ttemplateQuestionId: number;\r\n\t}\r\n\texport interface IRequestedFundingAmountDto\r\n\t{\r\n\t\tfinancialYearId: number;\r\n\t\tfinancialYearDescription: string;\r\n\t\tamount?: number;\r\n\t\trecurringAmount?: number;\r\n\t}\r\n\texport interface IRequestedFundingAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswers: SharedDto.OnlineForm.Application.IRequestedFundingAmountDto[];\r\n\t}\r\n\texport interface ISingleLineTextAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer: string;\r\n\t}\r\n\texport interface ISingleSelectListAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer: string;\r\n\t\tquestionCodeListType: SharedDto.Constants.QuestionCodeListType;\r\n\t}\r\n\texport interface IAbnLookupAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tabn: string;\r\n\t\tkey?: any;\r\n\t\tdetails: SharedDto.IAbnDetailsDto;\r\n\t\tretrievedBy: string;\r\n\t\tretrievedOn?: string;\r\n\t}\r\n\texport interface IYesNoAnswerDto extends SharedDto.OnlineForm.Application.IAnswerDto\r\n\t{\r\n\t\tanswer?: boolean;\r\n\t}\r\n}\r\nexport module SharedDto.FeaturedGrant {\r\n\texport interface IExternalHomePageFeaturedGrantDto\r\n\t{\r\n\t\tlabel: string;\r\n\t\timage: SharedDto.IFileDto;\r\n\t\ttitle: string;\r\n\t\tdescription: string;\r\n\t\tgrantRoundId: number;\r\n\t\tpublicContentId: number;\r\n\t\tslug: string;\r\n\t\tfeaturedGrantId: number;\r\n\t}\r\n}\r\nexport module SharedDto.Applications.AdditionalInfo {\r\n\texport interface IAdditionalInformationRequestItemSharedDto extends SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemUpdateSharedDto\r\n\t{\r\n\t\trequestQuestionTypeDescription: string;\r\n\t\tanswerText: string;\r\n\t\tanswerBoolean?: boolean;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t\tactionedByAgencyDisplayName: string;\r\n\t\tactionedByAgencyComment: string;\r\n\t\tactionedByAgencyDate?: string;\r\n\t\tactionedByAgencyFileStorage: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IAdditionalInformationRequestItemUpdateSharedDto\r\n\t{\r\n\t\tadditionalInformationRequestItemId?: number;\r\n\t\trequestQuestionType: any;\r\n\t\tquestionText: string;\r\n\t\tanswerText: string;\r\n\t\tanswerBoolean?: boolean;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IAdditionalInformationRequestSharedDto extends SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestUpdateSharedDto\r\n\t{\r\n\t\trequestStatusDescription: string;\r\n\t\trequestStatus: SharedDto.Constants.AdditionalInformationRequestStatus;\r\n\t\tsubmittedDate?: string;\r\n\t\tsubmittedBy: string;\r\n\t\tresponseDate?: string;\r\n\t\trespondedBy: string;\r\n\t\tdueDate?: string;\r\n\t\tsendReminderBefore: number;\r\n\t\tadditionalInformationRequestItems: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto[];\r\n\t\tcanEdit: boolean;\r\n\t}\r\n\texport interface IAdditionalInformationRequestUpdateSharedDto\r\n\t{\r\n\t\tadditionalInformationRequestId?: number;\r\n\t\tdescription: string;\r\n\t\tvisibleToAssessors: boolean;\r\n\t\tformInstanceId?: number;\r\n\t\tformInstanceAnswerId?: number;\r\n\t\tformQuestionId?: number;\r\n\t}\r\n}\r\nexport module SharedDto.Constants {\r\n\texport enum ErrorType { \r\n\t\tNotFound = 0, \r\n\t\tLoginFailed = 1, \r\n\t\tTwoFactorAuthRequired = 2, \r\n\t\tInvalidClientId = 3, \r\n\t\tPermissionDenied = 4, \r\n\t\tChangePasswordRequired = 5, \r\n\t\tInvalidRequest = 6, \r\n\t\tUnprocessableEntity = 7, \r\n\t\tInternalServerError = 8, \r\n\t\tUnsupportedMediaType = 9, \r\n\t\tUnparseableResult = 10, \r\n\t\tUnauthorised = 11, \r\n\t\tUnspecifiedError = 12, \r\n\t\tValidationErrors = 13, \r\n\t\tVersionMismatch = 14, \r\n\t\tConcurrentAccess = 15, \r\n\t\tGrantsGeneralError = 16, \r\n\t}\r\n\texport enum SortDirection { \r\n\t\tAsc = 1, \r\n\t\tDesc = 2, \r\n\t\tNone = 3, \r\n\t}\r\n\texport enum LocalityType { \r\n\t\tRegion = 1, \r\n\t\tSubRegion = 2, \r\n\t\tLocality = 3, \r\n\t\tSuburb = 4, \r\n\t\tAboriginalCommunity = 5, \r\n\t\tMunicipality = 6, \r\n\t\tShire = 7, \r\n\t\tGovernmentRegion = 8, \r\n\t\tNTRegion = 9, \r\n\t\tInterstateInternational = 10, \r\n\t}\r\n\texport enum QuestionType { \r\n\t\tSingleLineText = 1, \r\n\t\tMultiLineText = 2, \r\n\t\tYesNoToggle = 3, \r\n\t\tRadioButton = 4, \r\n\t\tSingleSelectList = 5, \r\n\t\tMultiSelectList = 6, \r\n\t\tFileUpload = 7, \r\n\t\tDate = 8, \r\n\t\tDateRange = 9, \r\n\t\tMoney = 10, \r\n\t\tDecimal = 11, \r\n\t\tNumber = 12, \r\n\t\tPhoneNumber = 13, \r\n\t\tEmail = 14, \r\n\t\tURL = 15, \r\n\t\tAddress = 16, \r\n\t\tLocation = 17, \r\n\t\tCheckBoxList = 18, \r\n\t\tRequestedFundingAmount = 19, \r\n\t\tContact = 20, \r\n\t\tChild = 21, \r\n\t\tSocialMediaLink = 22, \r\n\t\tOpeningHours = 23, \r\n\t\tTextOnly = 24, \r\n\t\tRequiredDocument = 25, \r\n\t\tPerson = 26, \r\n\t\tBusiness = 27, \r\n\t\tABNLookup = 28, \r\n\t}\r\n\texport enum HelpTextLocation { \r\n\t\tToolTip = 1, \r\n\t\tPlaceHolder = 2, \r\n\t\tBelowAnswer = 3, \r\n\t\tAboveAnswer = 4, \r\n\t}\r\n\texport enum CriteriaOperation { \r\n\t\tEquals = 1, \r\n\t\tLessThan = 2, \r\n\t\tGreaterThan = 3, \r\n\t}\r\n\texport enum LogicalOperator { \r\n\t\tAnd = 1, \r\n\t\tOr = 2, \r\n\t}\r\n\texport enum QuestionConfigurationType { \r\n\t\tMinDate = 1, \r\n\t\tMaxDate = 2, \r\n\t\tMinimumYearOffset = 3, \r\n\t\tMaximumYearOffset = 4, \r\n\t\tMinInteger = 5, \r\n\t\tMaxInteger = 6, \r\n\t\tMinCharacters = 7, \r\n\t\tMaxCharacters = 8, \r\n\t\tMinDecimal = 9, \r\n\t\tMaxDecimal = 10, \r\n\t\tSortAlphabetically = 11, \r\n\t\tMinSelectedOptions = 12, \r\n\t\tMaxSelectedOptions = 13, \r\n\t\tOptionsList = 14, \r\n\t\tAllowedLocalityType = 15, \r\n\t\tMultiSelect = 16, \r\n\t\tFundingFinancialYear = 17, \r\n\t\tSpecifyContactRole = 18, \r\n\t\tDecimalPlaces = 19, \r\n\t\tFileUploadCategory = 20, \r\n\t\tShowSelectSchool = 21, \r\n\t\tShowSelectPreviousSchool = 22, \r\n\t\tShowSelectDateOfBirth = 23, \r\n\t\tMaximumAge = 24, \r\n\t\tMinimumAge = 25, \r\n\t\tShowSelectMiddleName = 26, \r\n\t\tShowSelectUPN = 27, \r\n\t\tDocumentType = 28, \r\n\t\tUploadOnly = 29, \r\n\t\tVoucherDefinitionDataField = 30, \r\n\t}\r\n\texport enum StateTerritory { \r\n\t\tNT = 1, \r\n\t\tACT = 2, \r\n\t\tNSW = 3, \r\n\t\tQLD = 4, \r\n\t\tSA = 5, \r\n\t\tTAS = 6, \r\n\t\tVIC = 7, \r\n\t\tWA = 8, \r\n\t}\r\n\texport enum PublicContentSectionType { \r\n\t\tWhoCanApply = 1, \r\n\t\tWhoCantApply = 2, \r\n\t\tAvailableFunding = 3, \r\n\t\tWhatCanBeFunded = 4, \r\n\t\tWhatCantBeFunded = 5, \r\n\t\tBeforeYouApply = 6, \r\n\t\tHowToApply = 7, \r\n\t\tAfterYouApply = 8, \r\n\t\tKeyDates = 9, \r\n\t\tSupportingDocuments = 10, \r\n\t\tFurtherInformation = 11, \r\n\t\tUsefulLinks = 12, \r\n\t\tContactDetails = 13, \r\n\t\tApplyNow = 14, \r\n\t}\r\n\texport enum QuestionCodeListType { \r\n\t\tOptionItems = 1, \r\n\t\tTitle = 2, \r\n\t\tDurationInNT = 3, \r\n\t\tOrganisationContactRole = 4, \r\n\t\tLegalEntityType = 5, \r\n\t\tBusinessActivityCategory = 6, \r\n\t\tBusinessActivityCategoryMoreSpecific = 7, \r\n\t\tBeneficiary = 8, \r\n\t\tApplicationContactRole = 9, \r\n\t\tSchools = 10, \r\n\t\tSuppliers = 11, \r\n\t\tSupplierCategories = 12, \r\n\t\tSupplierLocations = 13, \r\n\t\tRoundVouchers = 14, \r\n\t\tReviewOutcomes = 15, \r\n\t\tEligibilityOutcomes = 16, \r\n\t}\r\n\texport enum PhoneType { \r\n\t\tAustralianPhoneNumber = 1, \r\n\t\tInternationalPhoneNumber = 2, \r\n\t}\r\n\texport enum ApplicationDocumentSource { \r\n\t\tProfile = 1, \r\n\t\tUpload = 2, \r\n\t\tComment = 3, \r\n\t\tExternalSystem = 4, \r\n\t\tNoSelection = 5, \r\n\t}\r\n\texport enum RegulatoryAuthority { \r\n\t\tACNC = 1, \r\n\t\tORIC = 2, \r\n\t}\r\n\texport enum ReportingRequirementType { \r\n\t\tInvoice = 1, \r\n\t\tSignedAgreement = 2, \r\n\t\tProgressReport = 3, \r\n\t\tDeliveryMaterials = 4, \r\n\t\tPerformanceReport = 5, \r\n\t\tBeneficiarySurvey = 6, \r\n\t\tQuarterlyMeeting = 7, \r\n\t\tAnnualMeeting = 8, \r\n\t\tFinalMeeting = 9, \r\n\t\tSiteVisit = 10, \r\n\t\tOutcomeMeasures = 11, \r\n\t\tOutputMeasures = 12, \r\n\t\tVoucherRedemption = 13, \r\n\t\tRequiredDocument = 14, \r\n\t\tFinancialStatement = 15, \r\n\t\tAnnualAuditedFinancials = 16, \r\n\t\tAcquittalForm = 17, \r\n\t\tReport = 18, \r\n\t\tFundingAcquittal = 19, \r\n\t}\r\n\texport enum ApplicationFormStatus { \r\n\t\tDraft = 1, \r\n\t\tWithdrawn = 2, \r\n\t\tWithdrawnTerminal = 3, \r\n\t\tExpired = 4, \r\n\t\tToBeDeleted = 5, \r\n\t\tRequiresAdminBodyEndorsement = 6, \r\n\t\tAdminBodyEndorsed = 7, \r\n\t\tAdminBodyRequiresUpdates = 8, \r\n\t\tExternalSubmittedForApproval = 9, \r\n\t\tExternalApproved = 10, \r\n\t\tSubmitted = 11, \r\n\t\tReviewRequired = 12, \r\n\t\tReviewInProgress = 13, \r\n\t\tReviewComplete = 14, \r\n\t\tEligibilityRequired = 15, \r\n\t\tEligibilityInProgress = 16, \r\n\t\tEligibilityApprovalRequired = 17, \r\n\t\tEligibilityApprovalRequested = 18, \r\n\t\tEligibilityComplete = 19, \r\n\t\tSportsVoucherAutomatchRequired = 20, \r\n\t\tVoucherAssessmentRequired = 21, \r\n\t\tVoucherAssessmentInProgress = 22, \r\n\t\tVoucherAssessmentApprovalRequired = 23, \r\n\t\tVoucherAssessmentApprovalRequested = 24, \r\n\t\tVoucherAssessmentAwaitingSupplierRegistration = 25, \r\n\t\tVoucherAssessmentComplete = 26, \r\n\t\tAssessmentStepRequired = 27, \r\n\t\tAssessmentStepInProgress = 28, \r\n\t\tAssessmentStepComplete = 29, \r\n\t\tAssessmentOutcomeRequired = 30, \r\n\t\tAssessmentOutcomeInProgress = 31, \r\n\t\tAssessmentOutcomeComplete = 32, \r\n\t\tApprovalPhase = 33, \r\n\t\tRequiresFundingRecommendation = 34, \r\n\t\tAwaitingApproval = 35, \r\n\t\tPendingAgreement = 36, \r\n\t\tAgreementSent = 37, \r\n\t\tDoNotProceed = 38, \r\n\t\tUnsuccessful = 39, \r\n\t\tUnsuccessfulNonTerminal = 40, \r\n\t\tSuccessful = 41, \r\n\t\tPendingAcquittal = 42, \r\n\t\tPaymentsCompleteOutstandingRequirements = 43, \r\n\t\tDeclined = 44, \r\n\t\tNotApproved = 45, \r\n\t\tOnHold = 46, \r\n\t\tUpdatesPending = 47, \r\n\t\tComplete = 48, \r\n\t\tCompleteFullyAcquitted = 49, \r\n\t\tCompleteApplicantWithdrawn = 50, \r\n\t\tCompleteOutstandingAcquittal = 51, \r\n\t\tCompleteFundingWithdrawn = 52, \r\n\t}\r\n\texport enum ApplicationHistoryType { \r\n\t\tStatusChange = 1, \r\n\t\tApplicationCreated = 2, \r\n\t\tApplicationSaved = 3, \r\n\t\tAssigned = 4, \r\n\t\tConflictOfInterest = 5, \r\n\t\tAutomatch = 6, \r\n\t\tPutOnHold = 7, \r\n\t\tTakeOffHold = 8, \r\n\t}\r\n\texport enum TargetLateInvitationTransition { \r\n\t\tStart = 1, \r\n\t\tDecline = 2, \r\n\t\tExpire = 3, \r\n\t\tWithdraw = 4, \r\n\t\tReopen = 5, \r\n\t}\r\n\texport enum TargetLateInvitationStatus { \r\n\t\tOpen = 1, \r\n\t\tDeclined = 2, \r\n\t\tStarted = 3, \r\n\t\tExpired = 4, \r\n\t\tWithdrawn = 5, \r\n\t}\r\n\texport enum TargetApplicationType { \r\n\t\tTargeted = 1, \r\n\t\tLate = 2, \r\n\t}\r\n\texport enum AssessmentCheckStatus { \r\n\t\tPending = 1, \r\n\t\tInProgress = 2, \r\n\t\tCompleted = 3, \r\n\t}\r\n\texport enum AssessmentCheckResponseStatus { \r\n\t\tAwaitingPreviousStep = 1, \r\n\t\tPending = 2, \r\n\t\tInProgress = 3, \r\n\t\tCompleted = 4, \r\n\t\tConflictOfInterest = 5, \r\n\t}\r\n\texport enum FileUploadCategory { \r\n\t\tDocument = 1, \r\n\t\tImage = 2, \r\n\t\tVideo = 3, \r\n\t\tAudio = 4, \r\n\t\tPresentation = 5, \r\n\t\tSpreadsheet = 6, \r\n\t\tCompressed = 7, \r\n\t}\r\n\texport enum FormProfileType { \r\n\t\tIndividual = 1, \r\n\t\tOrganisation = 2, \r\n\t}\r\n\texport enum LocationType { \r\n\t\tAll = 1, \r\n\t\tCommunities = 2, \r\n\t\tLocations = 3, \r\n\t\tLocalGovtAreas = 4, \r\n\t\tNTRegions = 5, \r\n\t\tInterstateInternational = 6, \r\n\t}\r\n\texport enum SystemQuestion { \r\n\t\tProjectServiceTitle = 1, \r\n\t\tProjectStartDate = 2, \r\n\t\tProjectEndDate = 3, \r\n\t\tFundsRequested = 4, \r\n\t\tDeliveryLocationsSingle = 5, \r\n\t\tDeliveryLocationsMultiple = 6, \r\n\t\tBenefittingLocationPrimary = 7, \r\n\t\tBenefittingLocationSecondary = 8, \r\n\t\tBenefittingLocationsMultiple = 9, \r\n\t\tAdministeringBody = 10, \r\n\t\tAdministeringBodyEmail = 11, \r\n\t\tAdministeringBodyName = 12, \r\n\t\tAdministeringBodyABN = 13, \r\n\t\tPrimaryContact = 14, \r\n\t\tOtherContacts = 15, \r\n\t\tOrganisationPrimaryContactRole = 16, \r\n\t\tOrganisationPrimaryContactRoleOther = 17, \r\n\t\tSupplierLocations = 18, \r\n\t\tSupplierServices = 19, \r\n\t\tSupplierListName = 20, \r\n\t\tSupplierListAbout = 21, \r\n\t\tSupplierListAddress = 22, \r\n\t\tSupplierListPhone = 23, \r\n\t\tSupplierListEmail = 24, \r\n\t\tSupplierListWebsite = 25, \r\n\t\tSupplierListSocialMediaLink = 26, \r\n\t\tSupplierListBusinessHours = 27, \r\n\t\tSportsVoucherEligibilityChildQuestion = 28, \r\n\t\tSportsVoucherEligibilityChildRankScore = 29, \r\n\t\tSportsVoucherEligibilityChildOID = 30, \r\n\t\tSportsVoucherEligibilityChildVouchers = 31, \r\n\t\tNominatedSupplierSelect = 32, \r\n\t\tNominatedSupplierBusiness = 33, \r\n\t\tReviewOutcome = 34, \r\n\t\tReviewInternalComments = 35, \r\n\t\tReviewAttachments = 36, \r\n\t\tReviewCommentsToApplicant = 37, \r\n\t\tEligibilityOutcome = 38, \r\n\t\tEligibilityInternalComments = 39, \r\n\t\tEligibilityAttachments = 40, \r\n\t\tEligibilityCommentsToApplicant = 41, \r\n\t\tVoucherIssuedFor = 42, \r\n\t\tVoucherAmount = 43, \r\n\t}\r\n\texport enum SystemPrepopulatedField { \r\n\t\tProjectServiceTitle = 1, \r\n\t\tSportsVoucherOnboardId = 2, \r\n\t\tSportsVoucherAutomatchRank = 3, \r\n\t}\r\n\texport enum PublicContentType { \r\n\t\tApplicant = 1, \r\n\t\tThirdPartySupplier = 2, \r\n\t\tThirdPartyApplicant = 3, \r\n\t}\r\n\texport enum AdditionalInformationRequestStatus { \r\n\t\tSaved = 1, \r\n\t\tNotStarted = 2, \r\n\t\tDraft = 3, \r\n\t\tResponded = 4, \r\n\t\tOverDue = 5, \r\n\t}\r\n}\r\n","import {SharedDto} from \"./project-shared\";\r\n// This code was generated by a Reinforced.Typings tool. \r\n// Changes to this file may cause incorrect behavior and will be lost if\r\n// the code is regenerated.\r\n\r\nexport module Dto {\r\n\texport interface IAcceptVoucherRequestDto\r\n\t{\r\n\t\tvoucherNumber: string;\r\n\t\tredeemedAmount: number;\r\n\t}\r\n\texport interface IApplicantVoucherListItemDto\r\n\t{\r\n\t\tvoucherNumber: string;\r\n\t\tvoucherValidFrom?: string;\r\n\t\tvoucherExpiry: string;\r\n\t\tdateOfIssue?: string;\r\n\t\tvoucherStatus: Dto.Constants.ExternalVoucherStatus;\r\n\t\tvoucherStatusDescription: string;\r\n\t\tamountIsFixed: boolean;\r\n\t\tamount?: number;\r\n\t\tredeemedAmount?: number;\r\n\t\tvoucherName: string;\r\n\t\tissuedFor: string;\r\n\t\tgrantRoundId: number;\r\n\t\tgrantRoundTitle: string;\r\n\t\tgrantTitle: string;\r\n\t\tapplicationFormId: number;\r\n\t\tacceptedBySupplierId?: number;\r\n\t\tacceptedBySupplierName: string;\r\n\t\tgrantRoundVoucherRedemptionSettingsId?: number;\r\n\t\tconfirmCompletionDeclarationHtml: string;\r\n\t\tcanConfirmCompletion: boolean;\r\n\t\tassociatedSupplierName: string;\r\n\t\tworksCompletedInformationRequired?: boolean;\r\n\t\tworksCompletedInformationRequiredHtml: string;\r\n\t\tapplicationNumber: string;\r\n\t}\r\n\texport interface IApplicantVoucherSearchRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tindividualProfileId?: number;\r\n\t\torganisationId?: number;\r\n\t\tshowAll: boolean;\r\n\t\tkeyword: string;\r\n\t\texternalVoucherStatus: Dto.Constants.ExternalVoucherStatus[];\r\n\t}\r\n\texport interface IExternalRedemptionSupplierDto\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tcontactEmail: string;\r\n\t\tcontactPhone: string;\r\n\t\tsupplierName: string;\r\n\t\tsupplierDescription: string;\r\n\t\tsupplierStatusCode: Dto.Constants.SupplierStatus;\r\n\t\torganisationId: number;\r\n\t\tgrantDetailId: number;\r\n\t\texternalGrantTitle: string;\r\n\t\tgrantRoundId: number;\r\n\t\texternalRoundTitle: string;\r\n\t\tlocalities: string[];\r\n\t\tcategories: string[];\r\n\t}\r\n\texport interface IExternalSupplierRoundDto\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tgrantDetailId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tgrantRoundVoucherRedemptionSettingsId: number;\r\n\t\tmultipleVouchersPerRequest: boolean;\r\n\t\tsupplierDeclarationRequired: boolean;\r\n\t\tsupplierDeclarationHtml: string;\r\n\t\tactiveFormId?: number;\r\n\t\tredemptionTitle: string;\r\n\t\tredemptionOverviewHtml: string;\r\n\t\tacceptedVoucherCount: number;\r\n\t\tacceptedVoucherValue: number;\r\n\t\tsubmittedVoucherCount: number;\r\n\t\tsubmittedVoucherValue: number;\r\n\t\tpaidVoucherCount: number;\r\n\t\tpaidVoucherValue: number;\r\n\t\tredemptionClosedVoucherCount: number;\r\n\t\tredemptionClosedVoucherValue: number;\r\n\t\tcanAcceptVouchers: boolean;\r\n\t\tprePopulatedRedemptionAmount: boolean;\r\n\t\tenableCommentsAndDocuments: boolean;\r\n\t\tenableCommentsAndDocumentsHtml: string;\r\n\t\ttotalCostOfWorksRequired: boolean;\r\n\t\ttotalCostOfWorksHelpText: string;\r\n\t\tpreventSupplierManualAccept: boolean;\r\n\t}\r\n\texport interface IExternalSupplierRoundSearchRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tsupplierId: number;\r\n\t}\r\n\texport interface IExternalVoucherRedemptionRequestFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tredemptionSettingsId: number;\r\n\t}\r\n\texport interface IExternalVoucherRedemptionRequestListItemDto\r\n\t{\r\n\t\treportingScheduleRequirementId: number;\r\n\t\treportingRequirementStatusCode: string;\r\n\t\tsupplierId?: number;\r\n\t\tsubmissionDate?: string;\r\n\t\tvoucherCount?: number;\r\n\t\tsubmittedById?: number;\r\n\t\tsubmittedByName: string;\r\n\t\treportingScheduleRequirementSubmissionId?: number;\r\n\t\tgrantRoundVoucherRedemptionSettingsId?: number;\r\n\t\treportingRequirementOutcome?: Dto.Constants.ReportingRequirementOutcome;\r\n\t\treportingRequirementOutcomeDescription: string;\r\n\t\tformInstanceId?: number;\r\n\t\texternalComments: string;\r\n\t\tinvoiceNumber: string;\r\n\t\tredemptionDeclarationDate?: string;\r\n\t\tredemptionDeclarationHtml: string;\r\n\t\tvoucherAmountTotal?: number;\r\n\t\ttotalCostOfWork?: number;\r\n\t}\r\n\texport interface ISupplierUpdateVoucherRequestDto\r\n\t{\r\n\t\tredeemedAmount?: number;\r\n\t}\r\n\texport interface ISupplierDto\r\n\t{\r\n\t\tsupplierId: number;\r\n\t\tsupplierListId: number;\r\n\t\torganisationId: number;\r\n\t\tapplicationFormId: number;\r\n\t\tsupplierName: string;\r\n\t\tcontactPhone: string;\r\n\t\tcontactEmail: string;\r\n\t}\r\n\texport interface ISupplierVoucherListItemDto\r\n\t{\r\n\t\tvoucherName: string;\r\n\t\tvoucherNumber: string;\r\n\t\tvoucherExpiry: string;\r\n\t\tvoucherStatus: Dto.Constants.ExternalVoucherStatus;\r\n\t\tvoucherStatusDescription: string;\r\n\t\tissuedFor: string;\r\n\t\tapplicantName: string;\r\n\t\tdateRedeemed?: string;\r\n\t\tdateAccepted?: string;\r\n\t\tdatePaid?: string;\r\n\t\tamount?: number;\r\n\t\tamountFixed: boolean;\r\n\t\tredeemedAmount?: number;\r\n\t\tapprovedAmount?: number;\r\n\t}\r\n\texport interface ISupplierVoucherListExportItemDto\r\n\t{\r\n\t\tvoucherName: string;\r\n\t\tvoucherNumber: string;\r\n\t\tamount?: number;\r\n\t\tvoucherExpiry: string;\r\n\t\tvoucherStatus: string;\r\n\t\tissuedFor: string;\r\n\t\tapplicantName: string;\r\n\t\tdateAccepted?: string;\r\n\t\tdateRedeemed?: string;\r\n\t\tdatePaid?: string;\r\n\t\tredeemedAmount?: number;\r\n\t}\r\n\texport interface ISupplierVoucherSearchRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tkeyword: string;\r\n\t\tsupplierId: number;\r\n\t\tredemptionSettingsId: number;\r\n\t\tvoucherStatus?: Dto.Constants.ExternalVoucherStatus;\r\n\t\treportingRequirementSubmissionId?: number;\r\n\t\tincludeExpired: boolean;\r\n\t}\r\n\texport interface IWorkCompleteRequestDto\r\n\t{\r\n\t\tredemptionSettingId: number;\r\n\t\tvoucherNumber: string;\r\n\t\tdeclarationChecked: boolean;\r\n\t\tdeclarationContent: string;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IVoucherRedemptionRequestDto\r\n\t{\r\n\t\tvoucherRedemptionSettingId: number;\r\n\t\tsupplierId: number;\r\n\t\tvoucherNumbers: string[];\r\n\t\tallPendingVouchers: boolean;\r\n\t\tdeclarationChecked: boolean;\r\n\t\tdeclarationContent: string;\r\n\t\tsupplierComment: string;\r\n\t\ttotalCostOfWork?: number;\r\n\t\tsupplierAttachDocuments: SharedDto.IFilePropertiesDto[];\r\n\t}\r\n\texport interface IVoucherRedemptionStatusDto\r\n\t{\r\n\t\tallowRedemption: boolean;\r\n\t\tapplicationId: number;\r\n\t\tdocumentsExpiring: Dto.IVoucherRedemptionRequiredDocumentDto[];\r\n\t\tdocumentsExpired: Dto.IVoucherRedemptionRequiredDocumentDto[];\r\n\t\tdocumentsInvalid: Dto.IVoucherRedemptionRequiredDocumentDto[];\r\n\t}\r\n\texport interface IVoucherRedemptionRequiredDocumentDto\r\n\t{\r\n\t\tdocumentTypeName: string;\r\n\t\texpiry: string;\r\n\t\tcheckId: number;\r\n\t\treportId: number;\r\n\t}\r\n\texport interface IAddressValidationDto\r\n\t{\r\n\t\tmatches: SharedDto.IAddressDto[];\r\n\t\tmatchResult: Dto.Constants.AddressValidationMatchResult;\r\n\t}\r\n\texport interface ISubscriptionOptionsDto\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\treceiveEmails: boolean;\r\n\t\tcategoryIds: number[];\r\n\t\tsubscribeIndividual: boolean;\r\n\t\tsubscribeOrganisation: boolean;\r\n\t}\r\n\texport interface IUserOrganisationProfile\r\n\t{\r\n\t\torganisationId: number;\r\n\t\temail: string;\r\n\t\tlegalName: string;\r\n\t\tbusinessName: string;\r\n\t\tabn: string;\r\n\t\tacn: string;\r\n\t\tisOrganisationAdministrator: boolean;\r\n\t\tallowedRoutes: Dto.Constants.ExternalPageRoutes[];\r\n\t\tactivities: Dto.Constants.OrgUserAccessActivity[];\r\n\t}\r\n\texport interface IChangePasswordFromResetRequest\r\n\t{\r\n\t\tpassword: string;\r\n\t\trecaptchaResponse: string;\r\n\t}\r\n\texport interface IPasswordResetRequest\r\n\t{\r\n\t\tusername: string;\r\n\t\trecaptchaResponse: string;\r\n\t}\r\n\texport interface IUserResponse\r\n\t{\r\n\t\taccountId: number;\r\n\t\tindividualProfileId: number;\r\n\t\tusername: string;\r\n\t\temailAddress: string;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tfullName: string;\r\n\t\tauthenticationType: string;\r\n\t\taccountStatus: Dto.Constants.AccountStatus;\r\n\t\tuserOrganisationProfiles: Dto.IUserOrganisationProfile[];\r\n\t\tisAssessor: boolean;\r\n\t\tisValid: boolean;\r\n\t}\r\n\texport interface IExternalUserInviteValidationResponseDto\r\n\t{\r\n\t\ttokenValid: boolean;\r\n\t\temailAddress: string;\r\n\t}\r\n\texport interface ICompleteRegistrationRequestDto\r\n\t{\r\n\t\tcode: string;\r\n\t\temailAddress: string;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tpassword: string;\r\n\t\tconfirmPassword: string;\r\n\t\trecaptchaResponse: string;\r\n\t}\r\n\texport interface IExternalUserRegisterRequestDto\r\n\t{\r\n\t\temailAddress: string;\r\n\t\trecaptchaResponse: string;\r\n\t}\r\n\texport interface IApplyNowCheckResponseDto\r\n\t{\r\n\t\tcanApplyNow: boolean;\r\n\t\texistingApplicationId?: number;\r\n\t\thasValidIndividualProfile: boolean;\r\n\t}\r\n\texport interface IPublicContentEnquiryDto\r\n\t{\r\n\t\tcontactEmail: string;\r\n\t\tcontactName: string;\r\n\t\tcontactPhone: string;\r\n\t\tenquiry: string;\r\n\t\trecaptchaResponse: string;\r\n\t\torganisationId?: number;\r\n\t}\r\n\texport interface IPublicContentSearchResultItemDto\r\n\t{\r\n\t\tgrantId: number;\r\n\t\tcontentTitle: string;\r\n\t\tgrantTitle: string;\r\n\t\texternalGrantTitle: string;\r\n\t\toverviewHtml: string;\r\n\t\tagency: string;\r\n\t\tisIndividualEligible: boolean;\r\n\t\tisOrganisationEligible: boolean;\r\n\t\tisOrganisationForProfitEligible: boolean;\r\n\t\tisOrganisationNonProfitEligible: boolean;\r\n\t\teligibilityDisplay: string;\r\n\t\tgrantContactName: string;\r\n\t\tcontactType: string;\r\n\t\tgrantContactPhone: string;\r\n\t\tgrantContactEmail: string;\r\n\t\tavailableFunding: number;\r\n\t\tgrantMaximumFunding: number;\r\n\t\tapplicationsOpen?: string;\r\n\t\tapplicationsClose?: string;\r\n\t\tpublicContentType: Dto.Constants.PublicContentType;\r\n\t\tpublicContentTypeDescription: string;\r\n\t\tthirdParty: boolean;\r\n\t}\r\n\texport interface IPublicContentSearchResultsDto\r\n\t{\r\n\t\ttotalRecords: number;\r\n\t\tresults: SharedDto.PublicContent.IPublicContentSummaryViewDto[];\r\n\t}\r\n\texport interface IPublicContentSearchFilterRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tpublishDateFrom?: string;\r\n\t\tpublishDateTo?: string;\r\n\t\tapplicationsOpenFrom?: string;\r\n\t\tapplicationsOpenTo?: string;\r\n\t\tcontentSlug: string;\r\n\t\tagencies: number[];\r\n\t\tbeneficiaries: number[];\r\n\t\tcategories: number[];\r\n\t\tindividualsCanApply?: boolean;\r\n\t\tnonProfitCanApply?: boolean;\r\n\t\tforProfitCanApply?: boolean;\r\n\t\tkeywords: string;\r\n\t\tpublicContentTypes: Dto.Constants.PublicContentType[];\r\n\t}\r\n\texport interface IAssessorInviteValidationResponseDto\r\n\t{\r\n\t\tgrantName: string;\r\n\t\tinvitedByGivenName: string;\r\n\t\tinvitedByFamilyName: string;\r\n\t\ttokenValid: boolean;\r\n\t}\r\n\texport interface IPersonalProfileDto\r\n\t{\r\n\t\ttitleId?: number;\r\n\t\ttitle: string;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tmiddleName: string;\r\n\t\tresidentialAddress: SharedDto.IAddressDto;\r\n\t\tpostalAddress: SharedDto.IAddressDto;\r\n\t\tpostalSameAsResidentialAddress: boolean;\r\n\t\taborigionalTsiFlag: number;\r\n\t\tcitizenPermResidentFlag?: boolean;\r\n\t\tmobilePhoneNumber: string;\r\n\t\thomePhoneNumber: string;\r\n\t\tworkPhoneNumber: string;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\temailAddress: string;\r\n\t}\r\n\texport interface IOrganisationUserDto\r\n\t{\r\n\t\torganisationUserId: number;\r\n\t\torganisationId: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tfullName: string;\r\n\t\temailAddress: string;\r\n\t\torganisationUserStatus: Dto.Constants.OrganisationUserStatus;\r\n\t\torganisationUserStatusDesc: string;\r\n\t\tinviteCodeExpiry?: string;\r\n\t\taccess: Dto.IOrganisationUserAccessDto[];\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\tisOrganisationAdministrator: boolean;\r\n\t\tcanViewPayment: boolean;\r\n\t}\r\n\texport interface IOrganisationValidationDto\r\n\t{\r\n\t\terrors: string[];\r\n\t\tbankDetails: SharedDto.IBankDetailsDto;\r\n\t}\r\n\texport interface IOrganisationApproverDto\r\n\t{\r\n\t\torganisationUserId: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tfullName: string;\r\n\t\torganisationUserStatus: Dto.Constants.OrganisationUserStatus;\r\n\t\torganisationUserStatusDesc: string;\r\n\t}\r\n\texport interface IOrganisationAuditResponseDto\r\n\t{\r\n\t\tresults: Dto.IOrganisationAuditResponseItemDto[];\r\n\t\ttotalRecords: number;\r\n\t}\r\n\texport interface IOrganisationAuditResponseItemDto\r\n\t{\r\n\t\torganisationAuditCategoryCode: string;\r\n\t\tcreatedOn: string;\r\n\t\tactionDescription: string;\r\n\t\tfileStorage: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IOrganisationAuditRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\torganisationId: number;\r\n\t\torganisationAuditCategories: Dto.Constants.OrganisationAuditCategory[];\r\n\t}\r\n\texport interface IOrganisationDto\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\taustralianBusinessNumber: string;\r\n\t\taustralianCompanyNumber: string;\r\n\t\tindigenousCorporationNumber: string;\r\n\t\tincorporatedAssociationNumber: string;\r\n\t\tvendorId: string;\r\n\t\tregisteredTrainingOrganisationNumber: string;\r\n\t\tlegalName: string;\r\n\t\tbusinessName: string;\r\n\t\tnotForProfitFlag: boolean;\r\n\t\tlegalEntityTypeId: number;\r\n\t\tlegalEntityType: Dto.Constants.LegalEntityType;\r\n\t\tgstRegistered: boolean;\r\n\t\tphoneNumber: string;\r\n\t\temailAddress: string;\r\n\t\tfax: string;\r\n\t\twebsite: string;\r\n\t\tstreetAddress: SharedDto.IAddressDto;\r\n\t\tpostalSameAsStreetAddress: boolean;\r\n\t\tpostalAddress: SharedDto.IAddressDto;\r\n\t\tprimaryContact: SharedDto.Profiles.IOrganisationContactDto;\r\n\t\tprimaryActivityId?: number;\r\n\t\tsubActivityId?: number;\r\n\t\tprimaryLocationType?: any;\r\n\t\tprimaryLocationTypeDescription: string;\r\n\t\tprimaryLocationId?: number;\r\n\t\tsecondaryLocationType?: any;\r\n\t\tsecondaryLocationTypeDescription: string;\r\n\t\tsecondaryLocations: number[];\r\n\t\tprimaryLocationDescription: string;\r\n\t\tsecondaryLocationsDescription: string;\r\n\t\tdurationOperatingInNTId: number;\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t}\r\n\texport interface IOrganisationInviteValidationResponseDto\r\n\t{\r\n\t\torganisationId: number;\r\n\t\tlegalName: string;\r\n\t\ttradingName: string;\r\n\t\tinvitedByGivenName: string;\r\n\t\tinvitedByFamilyName: string;\r\n\t\ttokenValid: boolean;\r\n\t}\r\n\texport interface IOrganisationUserAccessDto\r\n\t{\r\n\t\torganisationUserAccessId?: number;\r\n\t\torgUserAccessActivity: Dto.Constants.OrgUserAccessActivity;\r\n\t\torgUserAccessActivityDesc: string;\r\n\t\tcanCreateEditSubmit: boolean;\r\n\t\tcanApprove: boolean;\r\n\t}\r\n\texport interface IOrganisationUserInviteDto\r\n\t{\r\n\t\torganisationId: number;\r\n\t\temailAddress: string;\r\n\t\tisOrganisationAdministrator: boolean;\r\n\t\tcanViewPayment: boolean;\r\n\t\taccess: Dto.IOrganisationUserAccessDto[];\r\n\t}\r\n\texport interface IProfileDashboardInfoDto\r\n\t{\r\n\t\tawardedGrantCount: number;\r\n\t\tsupplierRegistrationCount: number;\r\n\t\treportingCount: number;\r\n\t\tacquittalCount: number;\r\n\t\tpaymentCount: number;\r\n\t\tinviteCount: number;\r\n\t\tcorrespondenceCount: number;\r\n\t\trequestForInformationCount: number;\r\n\t}\r\n\texport interface IChangePasswordRequest\r\n\t{\r\n\t\toldPassword: string;\r\n\t\tnewPassword: string;\r\n\t}\r\n\texport interface IGlobalConfigurationDto\r\n\t{\r\n\t\toutstandingAcquittalsEnabled: boolean;\r\n\t}\r\n\texport interface ITermsOfAccessAndUseDto\r\n\t{\r\n\t\tversion: number;\r\n\t\tcontent: string;\r\n\t}\r\n\texport interface IAccountDto\r\n\t{\r\n\t\tcode: string;\r\n\t\temailAddress: string;\r\n\t\ttitle: number;\r\n\t\tgivenName: string;\r\n\t\tfamilyName: string;\r\n\t\tphoneNumber: string;\r\n\t\tresidentialAddress: SharedDto.IAddressDto;\r\n\t\tpostalAddress: SharedDto.IAddressDto;\r\n\t\tpassword: string;\r\n\t\tconfirmPassword: string;\r\n\t\trecaptchaResponse: string;\r\n\t\tacceptedTermsOfAccessAndUse: boolean;\r\n\t\tacceptedTermsOfAccessAndUseVersion: string;\r\n\t}\r\n\texport interface INotification\r\n\t{\r\n\t\tsuccessful: boolean;\r\n\t\terrors: string[];\r\n\t\twarnings: string[];\r\n\t}\r\n}\r\nexport module Dto.Voucher {\r\n\texport interface IVoucherCheckResponseDto\r\n\t{\r\n\t\tissuedVoucher: Dto.IApplicantVoucherListItemDto;\r\n\t\tvoucherNumber: string;\r\n\t\tcheckResult: Dto.Constants.VoucherCheckResult;\r\n\t}\r\n\texport interface IExportVoucherCheckResponseDto\r\n\t{\r\n\t\tvoucherNumber: string;\r\n\t\tcheckResult: Dto.Constants.VoucherCheckResult;\r\n\t\tdetails: string;\r\n\t}\r\n}\r\nexport module Dto.Variations {\r\n\texport interface IVariationRequestDto extends Dto.Variations.IVariationRequestUpdateDto\r\n\t{\r\n\t\tvariationRequestId: number;\r\n\t\tvariationReferenceNumber: string;\r\n\t\tvariationStatus: Dto.Constants.ExternalVariationStatus;\r\n\t\tvariationStatusDescription: string;\r\n\t\trecipientHelpText: string;\r\n\t\trequestedByInternalUserId?: number;\r\n\t\trequestedByInternalUserName: string;\r\n\t\trequestedByExternalUserId?: number;\r\n\t\trequestedByExternalUserName: string;\r\n\t\toutcomeComment: string;\r\n\t\tvariationOutcome?: Dto.Constants.VariationAssessmentOutcome;\r\n\t\tvariationOutcomeDescription: string;\r\n\t\trequestDocuments: SharedDto.IFilePropertiesDto[];\r\n\t\trequestOutcomeDocuments: SharedDto.IFilePropertiesDto[];\r\n\t\trecipientHelpDocuments: SharedDto.IFilePropertiesDto[];\r\n\t\tgrantDetailVariationVariationTypes: Dto.Constants.VariationType[];\r\n\t}\r\n\texport interface IVariationRequestSaveRequestDto\r\n\t{\r\n\t\tvariation: Dto.Variations.IVariationRequestUpdateDto;\r\n\t\tsubmitting: boolean;\r\n\t}\r\n\texport interface IVariationRequestUpdateDto\r\n\t{\r\n\t\tapplicationFormId: number;\r\n\t\trequestDetails: string;\r\n\t\trequestedVariationTypes: Dto.Constants.VariationType[];\r\n\t\trequestDocuments: SharedDto.IFileUpdateDto[];\r\n\t}\r\n\texport interface IVariationSearchResultItemDto\r\n\t{\r\n\t\tapplicationFormId: number;\r\n\t\tapplicationReferenceNumber: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tgrantDetailId: number;\r\n\t\tvariationRequestId: number;\r\n\t\tvariationReferenceNumber: string;\r\n\t\trequestedVariationTypes: Dto.Constants.VariationType[];\r\n\t\trequestedVariationTypeDescriptions: string[];\r\n\t\tsubmittedDate: string;\r\n\t\trequestDetails: string;\r\n\t\tvariationStatus: Dto.Constants.ExternalVariationStatus;\r\n\t\tvariationStatusDescription: string;\r\n\t\tassignedUserId?: number;\r\n\t\tassignedUserName: string;\r\n\t\trequestedByInternalUserName: string;\r\n\t\trequestedByExternalUserId?: number;\r\n\t\trequestedByExternalUserName: string;\r\n\t}\r\n\texport interface IVariationsSearchFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tapplicationFormId?: number;\r\n\t\tvariationNumber: string;\r\n\t\tapplicationReferenceNumber: string;\r\n\t}\r\n}\r\nexport module Dto.OnlineForm.Application {\r\n\texport interface IApplicationFormSubmissionDto\r\n\t{\r\n\t\tapplication: SharedDto.OnlineForm.Application.IApplicationFormDto;\r\n\t\torganisationId?: number;\r\n\t}\r\n}\r\nexport module Dto.Reporting {\r\n\texport interface IAcquittalScheduleRequirementDto\r\n\t{\r\n\t\tacquittalScheduleRequirementId: number;\r\n\t\tdescription: string;\r\n\t\ttype: any;\r\n\t\ttypeDescription: string;\r\n\t\tfiles: SharedDto.IFilePropertiesDto[];\r\n\t}\r\n\texport interface IAcquittalScheduleItemDto extends Dto.Reporting.IPerformanceRequirementDto\r\n\t{\r\n\t\tacquittalScheduleId: number;\r\n\t\tacquittalDeliverableType: Dto.Constants.AcquittalDeliverableType;\r\n\t\tacquittalDeliverableTypeDescription: string;\r\n\t\tfinancialYearId?: number;\r\n\t\tfinancialYearDescription: string;\r\n\t\tfrequency: any;\r\n\t\tfrequencyDescription: string;\r\n\t\tstatus: Dto.Constants.ExternalAcquittalRequirementStatus;\r\n\t\tstatusDescription: string;\r\n\t\tcurrentSubmission: Dto.Reporting.IAcquittalSubmissionDto;\r\n\t\tsubmissions: Dto.Reporting.IAcquittalSubmissionDto[];\r\n\t\ttemplate: SharedDto.IFilePropertiesDto;\r\n\t\tactions: SharedDto.ICodeListItemDto[];\r\n\t\trequirements: Dto.Reporting.IAcquittalScheduleRequirementDto[];\r\n\t\tcanStartDetails: Dto.INotification;\r\n\t\treportName: string;\r\n\t}\r\n\texport interface IAcquittalSubmissionDto extends Dto.Reporting.IAcquittalSubmissionUpdateDto\r\n\t{\r\n\t\tdocuments: SharedDto.IFilePropertiesDto[];\r\n\t\tsubmittedByName: string;\r\n\t\tacquittalDeliverableType: Dto.Constants.AcquittalDeliverableType;\r\n\t\tsubmissionDate?: string;\r\n\t\tacquittalRequirementOutcome?: any;\r\n\t\texternalComments: string;\r\n\t\tapprovedAcquittedAmount: number;\r\n\t\tacquittalRequirementOutcomeDescription: string;\r\n\t}\r\n\texport interface IAcquittalSubmissionUpdateDto\r\n\t{\r\n\t\tdocuments: SharedDto.IFileUpdateDto[];\r\n\t\tcomments: string;\r\n\t\tacquittalAmount?: number;\r\n\t}\r\n\texport interface IExternalAcquittalViewDto extends Dto.Reporting.IExternalPerformanceViewDto\r\n\t{\r\n\t\tacquittalScheduleId: number;\r\n\t\tacquittalRequirementTypeId: number;\r\n\t\tacquittalDeliverableType: Dto.Constants.AcquittalDeliverableType;\r\n\t\tacquittalDeliverableTypeDescription: string;\r\n\t\tacquittalRequirementStatus: Dto.Constants.ExternalAcquittalRequirementStatus;\r\n\t\tacquittalRequirementStatusDescription: string;\r\n\t\toutstanding: boolean;\r\n\t\treportingPeriodFrom: string;\r\n\t\treportingPeriodTo: string;\r\n\t}\r\n\texport interface IExternalAcquittalViewFilterDto extends Dto.Reporting.IExternalPerformanceFilterDto\r\n\t{\r\n\t\tacquittalRequirementStatus?: Dto.Constants.ExternalAcquittalRequirementStatus;\r\n\t\tacquittalDeliverableType?: Dto.Constants.AcquittalDeliverableType;\r\n\t\toutstanding: boolean;\r\n\t}\r\n\texport interface IExternalPerformanceFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\tawardedGrantId?: number;\r\n\t\tfinancialYearId: number[];\r\n\t}\r\n\texport interface IExternalPerformanceViewDto\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\tapplicationId: number;\r\n\t\tapplicationNumber: string;\r\n\t\tgrantName: string;\r\n\t\tgrantRoundTitle: string;\r\n\t\tagencyName: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tdueDate?: string;\r\n\t\tgrantDetailId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tagencyId: number;\r\n\t\tawardedGrantId: number;\r\n\t\tindividualProfileId?: number;\r\n\t\tadminBodyOrganisationId?: number;\r\n\t\tadminBodyOriginalExternalUserName: string;\r\n\t\tadminBodyOriginalOrganisationName: string;\r\n\t\treportName: string;\r\n\t}\r\n\texport interface IExternalReportingViewDto extends Dto.Reporting.IExternalPerformanceViewDto\r\n\t{\r\n\t\treportingRequirementId: number;\r\n\t\treportingRequirementTypeId: number;\r\n\t\treportingRequirementType: Dto.Constants.ReportingRequirementType;\r\n\t\treportingRequirementTypeDescription: string;\r\n\t\treportingRequirementGroup: Dto.Constants.ReportingRequirementGroup;\r\n\t\treportingRequirementGroupDescription: string;\r\n\t\treportingRequirementStatus: Dto.Constants.ExternalReportingRequirementStatus;\r\n\t\treportingRequirementStatusDescription: string;\r\n\t}\r\n\texport interface IExternalReportingViewFilterDto extends Dto.Reporting.IExternalPerformanceFilterDto\r\n\t{\r\n\t\treportingRequirementStatus?: Dto.Constants.ExternalReportingRequirementStatus;\r\n\t\treportingTypeId?: number;\r\n\t}\r\n\texport interface IOutstandingAcquittalProfileSummaryItemDto\r\n\t{\r\n\t\tindividualProfileId?: number;\r\n\t\torganisationId?: number;\r\n\t\tlegalName: string;\r\n\t\tindividualName: string;\r\n\t\toutstandingCount: number;\r\n\t}\r\n\texport interface IPerformanceRequirementDto\r\n\t{\r\n\t\tprojectServiceTitle: string;\r\n\t\tgrantName: string;\r\n\t\tgrantRoundTitle: string;\r\n\t\tgrantId: number;\r\n\t\tagencyName: string;\r\n\t\tdescription: string;\r\n\t\tperiodFrom?: string;\r\n\t\tperiodTo?: string;\r\n\t\tdueDate?: string;\r\n\t\tlinkedPayments: Dto.Reporting.IReportingRequirementLinkedPaymentDto[];\r\n\t\tlastModifiedBy: string;\r\n\t\tlastModifiedTime: string;\r\n\t\tcanEdit: boolean;\r\n\t\treportName: string;\r\n\t\tdocumentTypeName: string;\r\n\t}\r\n\texport interface IReportingRequirementDocumentDto extends Dto.Reporting.IReportingRequirementDto\r\n\t{\r\n\t\ttemplate: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IReportingRequirementDocumentSubmissionDto extends Dto.Reporting.IReportingRequirementDocumentSubmissionUpdateDto\r\n\t{\r\n\t\tdocuments: SharedDto.IFilePropertiesDto[];\r\n\t\tsubmittedComments: string;\r\n\t}\r\n\texport interface IReportingRequirementDocumentSubmissionUpdateDto extends Dto.Reporting.IReportingRequirementSubmissionDto\r\n\t{\r\n\t\tdocuments: SharedDto.IFileUpdateDto[];\r\n\t\tinvoiceNumber: string;\r\n\t\tgasInvoiceNumberLength: number;\r\n\t\tinvoiceDate?: string;\r\n\t\tcomments: string;\r\n\t}\r\n\texport interface IReportingRequirementDto extends Dto.Reporting.IPerformanceRequirementDto\r\n\t{\r\n\t\treportingRequirementId: number;\r\n\t\ttype: SharedDto.IReportingRequirementTypeDto;\r\n\t\tfrequency: Dto.Constants.ReportingFrequency;\r\n\t\tfrequencyDescription: string;\r\n\t\tstatus: Dto.Constants.ExternalReportingRequirementStatus;\r\n\t\tstatusDescription: string;\r\n\t\tcurrentSubmission: Dto.Reporting.IReportingRequirementSubmissionDto;\r\n\t\tsubmissions: Dto.Reporting.IReportingRequirementSubmissionDto[];\r\n\t\tactions: SharedDto.ICodeListItemDto[];\r\n\t}\r\n\texport interface IReportingRequirementLinkedPaymentDto\r\n\t{\r\n\t\tdueDate: string;\r\n\t\tamountExclGst: number;\r\n\t\tpaymentScheduleItemStatus: string;\r\n\t\tconditions: Dto.Reporting.IRequirementConditionDto[];\r\n\t}\r\n\texport interface IReportingRequirementOutcomeDto extends Dto.Reporting.IReportingRequirementDto\r\n\t{\r\n\t\toutcomeMeasures: SharedDto.Reporting.IOutcomeMeasureDto[];\r\n\t}\r\n\texport interface IReportingRequirementOutcomeMeasuresDto extends Dto.Reporting.IReportingRequirementOutcomeMeasuresUpdateDto\r\n\t{\r\n\t\tsubmittedDocument: SharedDto.IFilePropertiesDto;\r\n\t\tunitOfMeasure: SharedDto.Reporting.IOutcomeUnitOfMeasureDto;\r\n\t}\r\n\texport interface IReportingRequirementOutcomeMeasuresUpdateDto\r\n\t{\r\n\t\treportingScheduleRequirementSubmissionOutcomeMeasureId: number;\r\n\t\treportingScheduleRequirementOutcomeMeasureId: number;\r\n\t\treportingScheduleRequirementOutcomeUnitOfMeasureId: number;\r\n\t\tsubmittedDocument: SharedDto.IFileUpdateDto;\r\n\t\tnumberOfUnits?: number;\r\n\t\tsubmittedComments: string;\r\n\t}\r\n\texport interface IReportingRequirementOutputDto extends Dto.Reporting.IReportingRequirementDto\r\n\t{\r\n\t\toutputMeasures: SharedDto.Reporting.IOutputMeasureDto[];\r\n\t}\r\n\texport interface IReportingRequirementOutputMeasuresDto extends Dto.Reporting.IReportingRequirementOutputMeasuresUpdateDto\r\n\t{\r\n\t\tsubmittedDocument: SharedDto.IFilePropertiesDto;\r\n\t\tunitOfMeasure: SharedDto.Reporting.IOutputMeasureDto;\r\n\t}\r\n\texport interface IReportingRequirementOutputMeasuresUpdateDto\r\n\t{\r\n\t\treportingScheduleRequirementOutputMeasureId: number;\r\n\t\tnumberOfUnits?: number;\r\n\t\tsubmittedComments: string;\r\n\t\tsubmittedDocument: SharedDto.IFileUpdateDto;\r\n\t}\r\n\texport interface IReportingRequirementOutputSubmissionDto extends Dto.Reporting.IReportingRequirementOutputSubmissionUpdateDto\r\n\t{\r\n\t\toutputMeasures: Dto.Reporting.IReportingRequirementOutputMeasuresDto[];\r\n\t}\r\n\texport interface IReportingRequirementOutputSubmissionUpdateDto extends Dto.Reporting.IReportingRequirementSubmissionDto\r\n\t{\r\n\t\toutputMeasures: Dto.Reporting.IReportingRequirementOutputMeasuresUpdateDto[];\r\n\t}\r\n\texport interface IReportingRequirementSubmissionDto\r\n\t{\r\n\t\tsubmittedByName: string;\r\n\t\tsubmissionDate?: string;\r\n\t\treportingRequirementOutcome?: Dto.Constants.ReportingRequirementOutcome;\r\n\t\treportingRequirementOutcomeDescription: string;\r\n\t\texternalComments: string;\r\n\t}\r\n\texport interface IRequirementConditionDto\r\n\t{\r\n\t\tdescription: string;\r\n\t\tdueDate?: string;\r\n\t\tstatus: string;\r\n\t\toutcome: string;\r\n\t}\r\n\texport interface IReportingRequirementOutcomeSubmissionDto extends Dto.Reporting.IReportingRequirementOutcomeSubmissionUpdateDto\r\n\t{\r\n\t\toutcomeMeasures: Dto.Reporting.IReportingRequirementOutcomeMeasuresDto[];\r\n\t}\r\n\texport interface IReportingRequirementOutcomeSubmissionUpdateDto extends Dto.Reporting.IReportingRequirementSubmissionDto\r\n\t{\r\n\t\toutcomeMeasures: Dto.Reporting.IReportingRequirementOutcomeMeasuresUpdateDto[];\r\n\t}\r\n}\r\nexport module Dto.Payments {\r\n\texport interface IExternalPaymentDetailViewDto\r\n\t{\r\n\t\tapplicationNumber: string;\r\n\t\tgrantTitle: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\ttotalApprovedFundingExclGst: number;\r\n\t\tpaymentsMade: number;\r\n\t\tremaining: number;\r\n\t\tfundingPeriodFrom: string;\r\n\t\tfundingPeriodTo: string;\r\n\t\tpaymentAmountExclGst: number;\r\n\t\tplannedPaymentDate: string;\r\n\t\tpaymentStatus: string;\r\n\t\tconditions: Dto.Payments.IPaymentDetailConditionDto[];\r\n\t\tcontacts: Dto.Payments.IPaymentDetailContactDto[];\r\n\t}\r\n\texport interface IPaymentDetailContactDto\r\n\t{\r\n\t\tcontactName: string;\r\n\t\temailAddress: string;\r\n\t\tphoneNumber: string;\r\n\t}\r\n\texport interface IPaymentDetailConditionDto\r\n\t{\r\n\t\tconditionTitle: string;\r\n\t\tconditionStatus: string;\r\n\t\tacquittalScheduleId?: number;\r\n\t\treportingScheduleRequirementId?: number;\r\n\t}\r\n\texport interface IExternalPaymentsViewDto\r\n\t{\r\n\t\tawardedGrantId: number;\r\n\t\tpaymentScheduleItemId: number;\r\n\t\torganisationId?: number;\r\n\t\tapplicationId: number;\r\n\t\tapplicationNumber: string;\r\n\t\tgrantName: string;\r\n\t\tgrantRoundTitle: string;\r\n\t\tagencyName: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tpaymentScheduleItemStatusDescription: string;\r\n\t\tdueDate: string;\r\n\t\tamountExcludingGst: number;\r\n\t\tgrantDetailId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tagencyId: number;\r\n\t\thasNop: boolean;\r\n\t\thasRcti: boolean;\r\n\t\tdisplayDocumentDownloads: boolean;\r\n\t\thasConditon: boolean;\r\n\t\tadminBodyOrganisationId?: number;\r\n\t\tadminBodyOriginalExternalUserName: string;\r\n\t\tadminBodyOriginalOrganisationName: string;\r\n\t}\r\n\texport interface IExternalPaymentsViewFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\tawardedGrantId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\tstatus?: any;\r\n\t}\r\n}\r\nexport module Dto.Notification {\r\n\texport interface INotificationDto\r\n\t{\r\n\t\tnotificationId: number;\r\n\t\tnotificationTemplateId: number;\r\n\t\texternalUserId: number;\r\n\t\torganisationId?: number;\r\n\t\theader: string;\r\n\t\tbody: string;\r\n\t\turl: string;\r\n\t\temailSubject: string;\r\n\t\temailBody: string;\r\n\t\tsent: string;\r\n\t\tread?: string;\r\n\t}\r\n\texport interface INotificationListItemDto\r\n\t{\r\n\t\tnotificationId: number;\r\n\t\tnotificationTemplateId: number;\r\n\t\texternalUserId: number;\r\n\t\torganisationId?: number;\r\n\t\theader: string;\r\n\t\tbody: string;\r\n\t\turl: string;\r\n\t\tsent: string;\r\n\t\tread?: string;\r\n\t}\r\n\texport interface INotificationSearchFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\texternalUserId: number;\r\n\t\tindividualProfileId?: number;\r\n\t\torganisationId?: number;\r\n\t\tunreadOnly: boolean;\r\n\t}\r\n}\r\nexport module Dto.Invitation {\r\n\texport interface IInvitationListDto\r\n\t{\r\n\t\tinvitationId: number;\r\n\t\tpublicContentId: number;\r\n\t\tgrantName: string;\r\n\t\troundName: string;\r\n\t\tagency: string;\r\n\t\tcloseDate?: string;\r\n\t\tstatus: any;\r\n\t\tstatusDescription: string;\r\n\t\ttype: any;\r\n\t\ttypeDescription: string;\r\n\t\tdateCreated: string;\r\n\t\tdateAccepted?: string;\r\n\t\tdateDeclined?: string;\r\n\t\taccepted: boolean;\r\n\t\tdeclined: boolean;\r\n\t\tallowedTransitions: SharedDto.ICodeListItemDto[];\r\n\t}\r\n}\r\nexport module Dto.Correspondence {\r\n\texport interface IExternalCorrespondenceDetailDto\r\n\t{\r\n\t\texternalCorrespondenceId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tisEmail: boolean;\r\n\t\tcorrespondenceSubject: any;\r\n\t\temailRecipients: SharedDto.IEmailRecipientDto[];\r\n\t\temailSubject: string;\r\n\t\temailBody: string;\r\n\t\tsentDate?: string;\r\n\t\treceivedDate?: string;\r\n\t\tattachments: SharedDto.IFilePropertiesDto[];\r\n\t}\r\n\texport interface IExternalCorrespondenceSearchRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tapplicationFormId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\torganisationId?: number;\r\n\t\tcorrespondenceSubject?: any;\r\n\t}\r\n\texport interface IExternalCorrespondenceSearchResponseDto\r\n\t{\r\n\t\tcorrespondenceId: number;\r\n\t\tisEmail: boolean;\r\n\t\tapplicationNumber: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tcorrespondenceSubject?: any;\r\n\t\tsentDate?: string;\r\n\t\treceivedDate?: string;\r\n\t}\r\n}\r\nexport module Dto.Assessment {\r\n\texport interface IApplicationAssessmentSearchFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tapplicationNumber: string;\r\n\t}\r\n\texport interface IApplicationAssessmentSearchResultItemDto\r\n\t{\r\n\t\tassessmentCheckResponseId: number;\r\n\t\tapplicationId: number;\r\n\t\tapplicationReference: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tgrantName: string;\r\n\t\troundTitle: string;\r\n\t\tapplicantName: string;\r\n\t\tassessmentCheckStatus: any;\r\n\t\tassessmentCheckStatusDescription: string;\r\n\t\tassessmentCheckResponseStatus: any;\r\n\t\tassessmentCheckResponseStatusDescription: string;\r\n\t\tcanViewApplication: boolean;\r\n\t\tshowAdditionalInformation: boolean;\r\n\t}\r\n\texport interface IAssessmentCheckResponseDto extends Dto.Assessment.IAssessmentCheckResponseUpdateDto\r\n\t{\r\n\t\tapplicationId: number;\r\n\t\tassessmentCheckResponseStatus: any;\r\n\t\tassessmentCheckResponseStatusDescription: string;\r\n\t\tfundingRecommendationOutcomeDescription: string;\r\n\t\trequiresFundingReccomendation: boolean;\r\n\t\tconflictOfInterestComment: string;\r\n\t\thelpText: string;\r\n\t\thelpAttachments: SharedDto.IFilePropertiesDto[];\r\n\t\tquestionTypeList: Dto.Assessment.IAssessmentCheckResponseQuestionDto[];\r\n\t\tnumericTypeList: Dto.Assessment.IAssessmentCheckResponseNumericDto[];\r\n\t\tcanEdit: boolean;\r\n\t\tassessorLastUpdatedBy: string;\r\n\t\tassessorLastUpdatedTime?: string;\r\n\t}\r\n\texport interface IAssessmentCheckResponseFundingRecommendationUpdateDto\r\n\t{\r\n\t\tfinancialYear: SharedDto.IFinancialYearDto;\r\n\t\trecommendedAmount?: number;\r\n\t}\r\n\texport interface IAssessmentCheckResponseNumericDto extends Dto.Assessment.IAssessmentCheckResponseNumericUpdateDto\r\n\t{\r\n\t\tassessmentCriteria: string;\r\n\t\thelpText: string;\r\n\t\tmandatory: boolean;\r\n\t\tminimumScore?: number;\r\n\t\tweighting: number;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t\tquestionScoreList: Dto.Assessment.INumericQuestionScoreDto[];\r\n\t}\r\n\texport interface IAssessmentCheckResponseNumericUpdateDto\r\n\t{\r\n\t\tassessmentCheckResponseNumericId: number;\r\n\t\tcomment: string;\r\n\t\tattachment: SharedDto.IFileUpdateDto;\r\n\t\tnumericResult?: number;\r\n\t}\r\n\texport interface IAssessmentCheckResponseQuestionDto extends Dto.Assessment.IAssessmentCheckResponseQuestionUpdateDto\r\n\t{\r\n\t\tquestionText: string;\r\n\t\thelpText: string;\r\n\t\tsortOrder: number;\r\n\t}\r\n\texport interface IAssessmentCheckResponseQuestionUpdateDto\r\n\t{\r\n\t\tassessmentCheckResponseQAId: number;\r\n\t\tresult: string;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IAssessmentCheckResponseUpdateDto\r\n\t{\r\n\t\tassessmentCheckResponseId: number;\r\n\t\tfundingRecommendationOutcome?: any;\r\n\t\tcomments: string;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t\tfundingRecommendations: Dto.Assessment.IAssessmentCheckResponseFundingRecommendationUpdateDto[];\r\n\t\tquestionTypeList: Dto.Assessment.IAssessmentCheckResponseQuestionUpdateDto[];\r\n\t\tnumericTypeList: Dto.Assessment.IAssessmentCheckResponseNumericUpdateDto[];\r\n\t}\r\n\texport interface INumericQuestionScoreDto\r\n\t{\r\n\t\tscoreNumber: number;\r\n\t\tquestionText: string;\r\n\t}\r\n}\r\nexport module Dto.Administer {\r\n\texport interface IExternalApplicationAdministerDto\r\n\t{\r\n\t\tcodeExpiryDate: string;\r\n\t\tcode: string;\r\n\t\texpired: boolean;\r\n\t\tstatus: any;\r\n\t\tadministeringBodyBusinessName: string;\r\n\t\tsubmittedByOrganisationLegalName: string;\r\n\t\tsubmittedByOrganisationBusinessName: string;\r\n\t\tsubmittedByIndividualName: string;\r\n\t\tgrantTitle: string;\r\n\t\troundTitle: string;\r\n\t\tisIndividual: boolean;\r\n\t}\r\n}\r\nexport module Dto.AdditionalInfo {\r\n\texport interface IAdditionalInfoRequestListDto\r\n\t{\r\n\t\tadditionalInformationRequestId: number;\r\n\t\tapplicationId: number;\r\n\t\tadditionalInformationRequestStatus: Dto.Constants.AdditionalInformationRequestStatus;\r\n\t\tadditionalInformationRequestStatusDescription: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tapplicationReferenceNumber: string;\r\n\t\tapplicantName: string;\r\n\t\tdescription: string;\r\n\t\tsubmittedDate?: string;\r\n\t\tresponseDate?: string;\r\n\t\tdueDate?: string;\r\n\t}\r\n\texport interface IAdditionalInfoRequestFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\tapplicationId?: number;\r\n\t\torganisationId?: number;\r\n\t}\r\n\texport interface IAdditionalInformationRequestDto extends Dto.AdditionalInfo.IAdditionalInformationRequestUpdateDto\r\n\t{\r\n\t\tdescription: string;\r\n\t\trequestStatusDescription: string;\r\n\t\trequestStatus: Dto.Constants.AdditionalInformationRequestStatus;\r\n\t\tsubmittedDate?: string;\r\n\t\tsubmittedBy: string;\r\n\t\tresponseDate?: string;\r\n\t\trespondedBy: string;\r\n\t\tformInstanceId?: number;\r\n\t\tformQuestionId?: number;\r\n\t\tdueDate?: string;\r\n\t\tadditionalInformationRequestItems: Dto.AdditionalInfo.IAdditionalInformationRequestItemDto[];\r\n\t\tcanEdit: boolean;\r\n\t}\r\n\texport interface IAdditionalInformationRequestUpdateDto\r\n\t{\r\n\t\tadditionalInformationRequestId: number;\r\n\t\tadditionalInformationRequestItems: Dto.AdditionalInfo.IAdditionalInformationRequestItemUpdateDto[];\r\n\t}\r\n\texport interface IAdditionalInformationRequestItemDto extends Dto.AdditionalInfo.IAdditionalInformationRequestItemUpdateDto\r\n\t{\r\n\t\trequestQuestionTypeDescription: string;\r\n\t\trequestQuestionType: Dto.Constants.AdditionalInformationRequestQuestionType;\r\n\t\tquestionText: string;\r\n\t\tactionedByAgencyDisplayName: string;\r\n\t\tactionedByAgencyComment: string;\r\n\t\tactionedByAgencyDate?: string;\r\n\t\tactionedByAgencyFileStorage: SharedDto.IFilePropertiesDto;\r\n\t}\r\n\texport interface IAdditionalInformationRequestItemUpdateDto\r\n\t{\r\n\t\tadditionalInformationRequestItemId: number;\r\n\t\tanswerText: string;\r\n\t\tanswerBoolean?: boolean;\r\n\t\tattachment: SharedDto.IFilePropertiesDto;\r\n\t}\r\n}\r\nexport module Dto.AwardedGrants {\r\n\texport interface IExternalAwardedSupplierViewDto\r\n\t{\r\n\t\tawardedGrantId: number;\r\n\t\torganisationId?: number;\r\n\t\tapplicationId: number;\r\n\t\tapplicationNumber: string;\r\n\t\tgrantName: string;\r\n\t\tgrantRoundTitle: string;\r\n\t\tagencyName: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tgrantDetailId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tagencyId: number;\r\n\t\tadminBodyOrganisationId?: number;\r\n\t\tadminBodyOriginalExternalUserName: string;\r\n\t\tadminBodyOriginalOrganisationName: string;\r\n\t\tsupplierId: number;\r\n\t}\r\n\texport interface IGrantAgreementContactDto\r\n\t{\r\n\t\tgrantAgreementContactId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tcontactName: string;\r\n\t\temailAddress: string;\r\n\t\tphoneNumber: string;\r\n\t\tapplicationContactRole?: any;\r\n\t}\r\n\texport interface IExternalAwardedGrantsViewDto\r\n\t{\r\n\t\tawardedGrantId: number;\r\n\t\torganisationId?: number;\r\n\t\tapplicationId: number;\r\n\t\tapplicationNumber: string;\r\n\t\tgrantName: string;\r\n\t\tgrantRoundTitle: string;\r\n\t\tagencyName: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tfundedFrom: string;\r\n\t\tfundedTo: string;\r\n\t\tcommencementDate?: string;\r\n\t\tendDate?: string;\r\n\t\tgrantDetailId: number;\r\n\t\tgrantRoundId: number;\r\n\t\tagencyId: number;\r\n\t\tadminBodyOrganisationId?: number;\r\n\t\tadminBodyOriginalExternalUserName: string;\r\n\t\tadminBodyOriginalOrganisationName: string;\r\n\t}\r\n\texport interface IExternalAwardedGrantsViewFilterDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\tawardedGrantId?: number;\r\n\t}\r\n\texport interface IExternalProjectDetailsDto\r\n\t{\r\n\t\ttitle: string;\r\n\t\tcommencementDate?: string;\r\n\t\tendDate?: string;\r\n\t\tdescription: string;\r\n\t\tfundedFrom: string;\r\n\t\tfundedTo: string;\r\n\t\tfinalAcquittalDate?: string;\r\n\t\tkeyPersonnelName: string;\r\n\t\tkeyPersonnelRole: string;\r\n\t\tkeyPersonnelPhone: string;\r\n\t\tkeyPersonnelEmail: string;\r\n\t}\r\n\texport interface IAwardedGrantFundingInformationDto\r\n\t{\r\n\t\tapplicationFormId: number;\r\n\t\tfinancialYearDescription: string;\r\n\t\tfundedAmount: number;\r\n\t\tpaymentsMade: number;\r\n\t\tacquittedFunds: number;\r\n\t\tnonAcquittedFunds: number;\r\n\t}\r\n}\r\nexport module Dto.Application {\r\n\texport interface IApplicationSubmissionResponseDto\r\n\t{\r\n\t\tresponseType: Dto.Constants.ApplicationSubmissionResponseType;\r\n\t\tissuedVouchers: Dto.IApplicantVoucherListItemDto[];\r\n\t\tfurtherProcessing: string[];\r\n\t\tdeclinedVouchers: string[];\r\n\t\tsuccess: boolean;\r\n\t\terrors: string[];\r\n\t}\r\n\texport interface IApplicationActionsDto\r\n\t{\r\n\t\tcanEdit: boolean;\r\n\t\tcanView: boolean;\r\n\t}\r\n\texport interface IApplicationUpdateResponseDto\r\n\t{\r\n\t\trowVersion: number[];\r\n\t\tapplicationForm: Dto.Application.IExternalApplicationFormDto;\r\n\t}\r\n\texport interface IExternalApplicationFormDto extends SharedDto.OnlineForm.Application.IApplicationFormDto\r\n\t{\r\n\t\tactions: SharedDto.ICodeListItemDto[];\r\n\t\texternalStatus: Dto.Constants.ExternalApplicationFormStatus;\r\n\t}\r\n\texport interface IApplicationFormHistoryDto\r\n\t{\r\n\t\tapplicationFormHistoryId: number;\r\n\t\tapplicationFormStatus: Dto.Constants.ExternalApplicationFormStatus;\r\n\t\tapplicationFormStatusDescription: string;\r\n\t\taction: string;\r\n\t\tdate: string;\r\n\t\tdescription: string;\r\n\t\tcreatedByName: string;\r\n\t\tcomments: string;\r\n\t}\r\n\texport interface IExternalExistingApplicationDto extends SharedDto.OnlineForm.Application.IExistingApplicationDto\r\n\t{\r\n\t\tapplicationForm: Dto.Application.IExternalApplicationFormDto;\r\n\t}\r\n\texport interface IApplicationTransitionRequestDto\r\n\t{\r\n\t\ttransition: Dto.Constants.ExternalApplicationFormTransition;\r\n\t\torganisationId?: number;\r\n\t\tcomments: string;\r\n\t}\r\n\texport interface IExternalApplicationRequestDto extends SharedDto.IPagingFilter\r\n\t{\r\n\t\torganisationId?: number;\r\n\t\tapplicationNumber: string;\r\n\t\troundId?: number;\r\n\t\tapplicationStatus?: Dto.Constants.ExternalApplicationFormStatus;\r\n\t}\r\n\texport interface IExternalApplicationResponseDto\r\n\t{\r\n\t\tgrantApplicationId: number;\r\n\t\tapplicationNumber: string;\r\n\t\tgrantTitle: string;\r\n\t\troundTitle: string;\r\n\t\tprojectServiceTitle: string;\r\n\t\tapplicationSubject: string;\r\n\t\tapplicationFormStatus: Dto.Constants.ExternalApplicationFormStatus;\r\n\t\tapplicationFormStatusDescription: string;\r\n\t\tcanEdit: boolean;\r\n\t\tcanView: boolean;\r\n\t\tagencyId: number;\r\n\t\tagencyName: string;\r\n\t\tdateSubmitted?: string;\r\n\t\tadminBodyOrganisationId?: number;\r\n\t\tadminBodyOriginalExternalUserName: string;\r\n\t\tadminBodyOriginalOrganisationName: string;\r\n\t}\r\n}\r\nexport module Dto.Constants {\r\n\texport enum ExternalPageRoutes { \r\n\t\tManageAccount = 1, \r\n\t\tManageAccountDetails = 2, \r\n\t\tManageAccountChangePassword = 3, \r\n\t\tManageAccountChangeUsername = 4, \r\n\t\tManageAccountChangeUsernameConfirm = 5, \r\n\t\tManageNotifications = 6, \r\n\t\tResetPassword = 7, \r\n\t\tIndividualProfile = 8, \r\n\t\tIndividualProfileView = 9, \r\n\t\tIndividualProfileEdit = 10, \r\n\t\tIndividualSubscriptions = 11, \r\n\t\tGrantsDetail = 12, \r\n\t\tGrantsList = 13, \r\n\t\tGrantsSearch = 14, \r\n\t\tHelp = 15, \r\n\t\tMoreInfo = 16, \r\n\t\tApply = 17, \r\n\t\tPreview = 18, \r\n\t\tLogin = 19, \r\n\t\tRecoverPassword = 20, \r\n\t\tRegisterRequest = 21, \r\n\t\tRegister = 22, \r\n\t\tProfileSelect = 23, \r\n\t\tOrganisationInviteAccept = 24, \r\n\t\tOrganisationInviteReject = 25, \r\n\t\tOrganisationCreate = 26, \r\n\t\tOrganisationEdit = 27, \r\n\t\tOrganisationView = 28, \r\n\t\tOrganisationUser = 29, \r\n\t\tOrganisationProfile = 30, \r\n\t\tOrganisationProfileDetailModule = 31, \r\n\t\tOrganisationDocumentsModule = 32, \r\n\t\tOrganisationUserAccessModule = 33, \r\n\t\tOrganisationBankDetailsModule = 34, \r\n\t\tOrganisationAuditHistoryModule = 35, \r\n\t\tApplications = 36, \r\n\t\tApplicationsInProgress = 37, \r\n\t\tApplicationsAwardedGrants = 38, \r\n\t\tApplicationsSupplierRegistrations = 39, \r\n\t\tApplicationsReporting = 40, \r\n\t\tApplicationsPayments = 41, \r\n\t\tApplicationsAcquittal = 42, \r\n\t\tApplicationsAcquittalList = 43, \r\n\t\tApplicationsCorrespondence = 44, \r\n\t\tApplicationsCorrespondenceView = 45, \r\n\t\tApplicationsRequestForInformation = 46, \r\n\t\tApplicationsHistory = 47, \r\n\t\tApplicationsInvite = 48, \r\n\t\tAdminBodyResponse = 49, \r\n\t\tApplication = 50, \r\n\t\tAwardedGrant = 51, \r\n\t\tAwardedGrantDetails = 52, \r\n\t\tAwardedGrantPaymentList = 53, \r\n\t\tAwardedGrantReportingList = 54, \r\n\t\tAwardedGrantAcquittalList = 55, \r\n\t\tAwardedGrantVariationsList = 56, \r\n\t\tAwardedGrantCorrespondenceList = 57, \r\n\t\tAwardedGrantCorrespondenceView = 58, \r\n\t\tAwardedGrantRequestForInformationList = 59, \r\n\t\tAwardedGrantApplicationContacts = 60, \r\n\t\tAwardedSupplier = 61, \r\n\t\tAwardedSupplierDetails = 62, \r\n\t\tAwardedSupplierPaymentList = 63, \r\n\t\tAwardedSupplierReportingList = 64, \r\n\t\tAwardedSupplierAcquittalList = 65, \r\n\t\tAwardedSupplierVariationsList = 66, \r\n\t\tAwardedSupplierCorrespondenceList = 67, \r\n\t\tAwardedSupplierCorrespondenceView = 68, \r\n\t\tAwardedSupplierRequestForInformationList = 69, \r\n\t\tAwardedSupplierApplicationContacts = 70, \r\n\t\tReporting = 71, \r\n\t\tReportingView = 72, \r\n\t\tReportingEdit = 73, \r\n\t\tRequestForInformation = 74, \r\n\t\tRequestForInformationView = 75, \r\n\t\tRequestForInformationEdit = 76, \r\n\t\tAcquittal = 77, \r\n\t\tAcquittalList = 78, \r\n\t\tAcquittalView = 79, \r\n\t\tAcquittalEdit = 80, \r\n\t\tPayment = 81, \r\n\t\tPaymentView = 82, \r\n\t\tPaymentEdit = 83, \r\n\t\tVariationsList = 84, \r\n\t\tVariationsView = 85, \r\n\t\tVariationsEdit = 86, \r\n\t\tInvite = 87, \r\n\t\tBankDetailsView = 88, \r\n\t\tBankDetailsUpdate = 89, \r\n\t\tIndividualBankDetailsList = 90, \r\n\t\tIndividualBankDetailsEdit = 91, \r\n\t\tAssessorInviteAccept = 92, \r\n\t\tAssessorInviteDecline = 93, \r\n\t\tVerify = 94, \r\n\t\tWelcome = 95, \r\n\t\tNews = 96, \r\n\t\tFAQ = 97, \r\n\t\tPasswordAndComputerProblems = 98, \r\n\t\tHelpIntroduction = 99, \r\n\t\tSetupAccount = 100, \r\n\t\tAccountRegistration = 101, \r\n\t\tManageProfileAccess = 102, \r\n\t\tCreateManageOrgAccess = 103, \r\n\t\tOrgUserAccess = 104, \r\n\t\tJoinAnOrg = 105, \r\n\t\tGrantApplication = 106, \r\n\t\tGrantSearch = 107, \r\n\t\tGrantEnquiry = 108, \r\n\t\tSubmitApplication = 109, \r\n\t\tSubscription = 110, \r\n\t\tManageGrant = 111, \r\n\t\tApplicationManagement = 112, \r\n\t\tViewAwardedGrants = 113, \r\n\t\tReports = 114, \r\n\t\tUpdateCorrespondence = 115, \r\n\t\tROI = 116, \r\n\t\tSlugGrantsDetail = 117, \r\n\t\tSlugApply = 118, \r\n\t\tSlugPreview = 119, \r\n\t\tVouchers = 120, \r\n\t\tChangePasswordRequired = 121, \r\n\t}\r\n\texport enum StateTerritory { \r\n\t\tNT = 1, \r\n\t\tACT = 2, \r\n\t\tNSW = 3, \r\n\t\tQLD = 4, \r\n\t\tSA = 5, \r\n\t\tTAS = 6, \r\n\t\tVIC = 7, \r\n\t\tWA = 8, \r\n\t}\r\n\texport enum AddressValidationMatchResult { \r\n\t\tNoMatch = 1, \r\n\t\tNonStreetAddressMatch = 2, \r\n\t\tPartialMatches = 3, \r\n\t\tSingleMatch = 4, \r\n\t\tExactMatch = 5, \r\n\t}\r\n\texport enum OrgUserAccessActivity { \r\n\t\tApplication = 1, \r\n\t\tProgressPerformanceReport = 2, \r\n\t\tFinancialReportAndAcquittal = 3, \r\n\t\tVariation = 4, \r\n\t\tVouchers = 5, \r\n\t}\r\n\texport enum OrganisationUserStatus { \r\n\t\tInvited = 1, \r\n\t\tActive = 2, \r\n\t\tInactive = 3, \r\n\t\tResendInvite = 4, \r\n\t}\r\n\texport enum LocalityType { \r\n\t\tRegion = 1, \r\n\t\tSubRegion = 2, \r\n\t\tLocality = 3, \r\n\t\tSuburb = 4, \r\n\t\tAboriginalCommunity = 5, \r\n\t\tMunicipality = 6, \r\n\t\tShire = 7, \r\n\t\tGovernmentRegion = 8, \r\n\t\tNTRegion = 9, \r\n\t\tInterstateInternational = 10, \r\n\t}\r\n\texport enum OrganisationAuditCategory { \r\n\t\tOrganisationCreated = 1, \r\n\t\tOrganisationProfileUpdated = 2, \r\n\t\tOrganisationUserInvited = 3, \r\n\t\tOrganisationUserInviteAccepted = 4, \r\n\t\tOrganisationUserInviteRejected = 5, \r\n\t\tOrganisationUserUpdated = 6, \r\n\t\tOrganisationUserDeleted = 7, \r\n\t\tOrganisationDocumentUpdated = 8, \r\n\t\tOrganisationDocumentDelete = 9, \r\n\t\tOrganisationDocumentCreated = 10, \r\n\t\tOrganisationBankDetailsCreated = 11, \r\n\t\tOrganisationBankDetailsUpdated = 12, \r\n\t\tOrganisationUserResendInvitation = 13, \r\n\t\tOrganisationUserResetPassword = 14, \r\n\t}\r\n\texport enum ExternalApplicationFormTransition { \r\n\t\tWithdraw = 1, \r\n\t\tSubmit = 2, \r\n\t\tEdit = 3, \r\n\t\tDelete = 4, \r\n\t\tSubmitViaAdminBody = 5, \r\n\t\tAdminBodyDecline = 6, \r\n\t\tAdminBodyRequireUpdate = 7, \r\n\t\tAdminBodyAccept = 8, \r\n\t\tWithdrawFromAdminBody = 9, \r\n\t\tExternalSubmitForApproval = 10, \r\n\t\tExternalWithdrawFromApproval = 11, \r\n\t\tExternalUpdatesRequired = 12, \r\n\t\tExternalApproved = 13, \r\n\t\tExpire = 14, \r\n\t}\r\n\texport enum ExternalApplicationFormStatus { \r\n\t\tDraft = 1, \r\n\t\tWithdrawn = 2, \r\n\t\tExpired = 3, \r\n\t\tSubmitted = 4, \r\n\t\tRequiresAdminBodyEndorsement = 5, \r\n\t\tAdminBodyEndorsed = 6, \r\n\t\tAdminBodyRequiresUpdates = 7, \r\n\t\tExternalSubmittedForApproval = 8, \r\n\t\tExternalApproved = 9, \r\n\t\tAssessmentInProgress = 10, \r\n\t\tApproved = 11, \r\n\t\tGrantOffered = 12, \r\n\t\tUnsuccessful = 13, \r\n\t\tSuccessful = 14, \r\n\t\tDeclined = 15, \r\n\t\tNotApproved = 16, \r\n\t\tCompleteFullyAcquitted = 17, \r\n\t\tCompleteApplicantWithdrawn = 18, \r\n\t\tCompleteFundingWithdrawn = 19, \r\n\t\tCompleteOutstandingAcquittal = 20, \r\n\t\tComplete = 21, \r\n\t\tOnHold = 22, \r\n\t}\r\n\texport enum ReportingRequirementType { \r\n\t\tInvoice = 1, \r\n\t\tSignedAgreement = 2, \r\n\t\tProgressReport = 3, \r\n\t\tDeliveryMaterials = 4, \r\n\t\tPerformanceReport = 5, \r\n\t\tBeneficiarySurvey = 6, \r\n\t\tQuarterlyMeeting = 7, \r\n\t\tAnnualMeeting = 8, \r\n\t\tFinalMeeting = 9, \r\n\t\tSiteVisit = 10, \r\n\t\tOutcomeMeasures = 11, \r\n\t\tOutputMeasures = 12, \r\n\t\tVoucherRedemption = 13, \r\n\t\tRequiredDocument = 14, \r\n\t\tFinancialStatement = 15, \r\n\t\tAnnualAuditedFinancials = 16, \r\n\t\tAcquittalForm = 17, \r\n\t\tReport = 18, \r\n\t\tFundingAcquittal = 19, \r\n\t}\r\n\texport enum ReportingRequirementGroup { \r\n\t\tDeliverable = 1, \r\n\t\tMeeting = 2, \r\n\t\tOutcome = 3, \r\n\t\tOutput = 4, \r\n\t\tFinancial = 5, \r\n\t}\r\n\texport enum ReportingRequirementOutcome { \r\n\t\tMeetsRequirement = 1, \r\n\t\tDoesNotMeetRequirement = 2, \r\n\t\tAdditionalInformationRequired = 3, \r\n\t\tWithdrawn = 4, \r\n\t\tDraft = 5, \r\n\t\tPaid = 6, \r\n\t}\r\n\texport enum ExternalReportingRequirementStatus { \r\n\t\tNotStarted = 1, \r\n\t\tDraft = 2, \r\n\t\tOverdue = 3, \r\n\t\tSubmitted = 4, \r\n\t\tUnderAssessment = 5, \r\n\t\tAdditionalInformationRequired = 6, \r\n\t\tAssessmentComplete = 7, \r\n\t}\r\n\texport enum ReportingFrequency { \r\n\t\tOneOff = 1, \r\n\t\tMonthly = 2, \r\n\t\tQuarterly = 3, \r\n\t\tSixMonthly = 4, \r\n\t\tAnnually = 5, \r\n\t}\r\n\texport enum ReportingRequirementTransition { \r\n\t\tStart = 1, \r\n\t\tSubmit = 2, \r\n\t\tOverdue = 3, \r\n\t\tStartAssessment = 4, \r\n\t\tCompleteAssessment = 5, \r\n\t\tEndorseOutcome = 6, \r\n\t\tRejectOutcome = 7, \r\n\t\tAssignForReview = 8, \r\n\t\tRequestAdditionalInformation = 9, \r\n\t\tCancel = 10, \r\n\t\tWithdraw = 11, \r\n\t\tPutOnHold = 12, \r\n\t\tTakeOffHold = 13, \r\n\t\tAutoCancel = 14, \r\n\t\tMarkAsPaid = 15, \r\n\t\tAutoProcess = 16, \r\n\t\tRecall = 17, \r\n\t}\r\n\texport enum ExternalAcquittalRequirementStatus { \r\n\t\tNotStarted = 1, \r\n\t\tDraft = 2, \r\n\t\tOverdue = 3, \r\n\t\tSubmitted = 4, \r\n\t\tUnderAssessment = 5, \r\n\t\tAssessmentComplete = 6, \r\n\t\tAdditionalInformationRequired = 7, \r\n\t}\r\n\texport enum AcquittalRequirementTransition { \r\n\t\tStart = 1, \r\n\t\tSubmit = 2, \r\n\t\tOverdue = 3, \r\n\t\tStartAssessment = 4, \r\n\t\tCompleteAssessment = 5, \r\n\t\tAssignForReview = 6, \r\n\t\tEndorseOutcome = 7, \r\n\t\tRejectOutcome = 8, \r\n\t\tRequestAdditionalInformation = 9, \r\n\t\tCancel = 10, \r\n\t\tWithdraw = 11, \r\n\t\tPutOnHold = 12, \r\n\t\tTakeOffHold = 13, \r\n\t\tAutoCancel = 14, \r\n\t}\r\n\texport enum AcquittalDeliverableType { \r\n\t\tFinancialStatement = 1, \r\n\t\tAnnualAuditedFinancials = 2, \r\n\t\tFundingAcquittal = 3, \r\n\t\tAcquittalForm = 4, \r\n\t\tReport = 5, \r\n\t\tAcquittal = 6, \r\n\t}\r\n\texport enum AdditionalInformationRequestQuestionType { \r\n\t\tFileUpload = 1, \r\n\t\tText = 2, \r\n\t\tFileUploadOrText = 3, \r\n\t\tYesNo = 4, \r\n\t}\r\n\texport enum AdditionalInformationRequestStatus { \r\n\t\tSaved = 1, \r\n\t\tNotStarted = 2, \r\n\t\tDraft = 3, \r\n\t\tResponded = 4, \r\n\t\tOverDue = 5, \r\n\t}\r\n\texport enum LegalEntityType { \r\n\t\tAC = 1, \r\n\t\tIC = 2, \r\n\t\tLGE = 3, \r\n\t\tPropCo = 4, \r\n\t\tPubCo = 5, \r\n\t\tOIE = 6, \r\n\t\tT = 7, \r\n\t\tUE = 8, \r\n\t\tST = 9, \r\n\t\tP = 10, \r\n\t\tTE = 11, \r\n\t}\r\n\texport enum VariationType { \r\n\t\tScopeOrPurpose = 1, \r\n\t\tBudget = 2, \r\n\t\tTimeframe = 3, \r\n\t\tSpecialConditions = 4, \r\n\t}\r\n\texport enum VariationAssessmentOutcome { \r\n\t\tSuccessful = 1, \r\n\t\tNotSuccessful = 2, \r\n\t\tAdditionalInformationRequired = 3, \r\n\t}\r\n\texport enum ExternalVariationStatus { \r\n\t\tDraft = 1, \r\n\t\tSubmittedForAssessment = 2, \r\n\t\tAdditionalInformationRequired = 3, \r\n\t\tSuccessful = 4, \r\n\t\tNotSuccessful = 5, \r\n\t}\r\n\texport enum SystemPrepopulatedField { \r\n\t\tProjectServiceTitle = 1, \r\n\t\tSportsVoucherOnboardId = 2, \r\n\t\tSportsVoucherAutomatchRank = 3, \r\n\t}\r\n\texport enum PublicContentType { \r\n\t\tApplicant = 1, \r\n\t\tThirdPartySupplier = 2, \r\n\t\tThirdPartyApplicant = 3, \r\n\t}\r\n\texport enum SlugType { \r\n\t\tPublicContent = 1, \r\n\t\tGrantRound = 2, \r\n\t}\r\n\texport enum ExternalVoucherStatus { \r\n\t\tIssued = 1, \r\n\t\tAccepted = 2, \r\n\t\tSubmittedForPayment = 3, \r\n\t\tPaid = 4, \r\n\t\tExpired = 5, \r\n\t\tCancelled = 6, \r\n\t\tRedemptionClosed = 7, \r\n\t}\r\n\texport enum VoucherCheckResult { \r\n\t\tReady = 1, \r\n\t\tSupplierAlreadyAccepted = 2, \r\n\t\tAcceptedByAnotherSupplier = 3, \r\n\t\tVoucherExpired = 4, \r\n\t\tVoucherCancelled = 5, \r\n\t\tVoucherNumberDoesNotExist = 6, \r\n\t\tInvalidRedemptionPortal = 7, \r\n\t\tRepeatedVoucherNumber = 8, \r\n\t\tInvalidVoucherNumber = 9, \r\n\t\tSupplierNotTheNominatedSupplier = 10, \r\n\t\tApplicantMustConfirm = 11, \r\n\t\tBeforeValidityDate = 12, \r\n\t}\r\n\texport enum ApplicationSubmissionResponseType { \r\n\t\tVoucher = 1, \r\n\t\tFurtherProcessing = 2, \r\n\t\tOther = 3, \r\n\t}\r\n\texport enum SupplierStatus { \r\n\t\tDraft = 1, \r\n\t\tApproved = 2, \r\n\t\tSuspended = 3, \r\n\t\tSupplierWithdrawn = 4, \r\n\t\tAgencyCancelled = 5, \r\n\t}\r\n\texport enum AccountStatus { \r\n\t\tInactive = 1, \r\n\t\tRegistered = 2, \r\n\t\tChangePassword = 3, \r\n\t}\r\n\texport enum ReviewOutcomeResult { \r\n\t\tPassed = 1, \r\n\t\tConditionallyPassed = 2, \r\n\t\tAdditionalInformationRequired = 3, \r\n\t\tFailed = 4, \r\n\t\tDoNotProceed = 5, \r\n\t\tSkipStep = 6, \r\n\t}\r\n\texport enum EligibilityOutcome { \r\n\t\tEligible = 1, \r\n\t\tConditionallyEligible = 2, \r\n\t\tAdditionalInformationRequired = 3, \r\n\t\tIneligible = 4, \r\n\t\tDoNotProceed = 5, \r\n\t\tSkipStep = 6, \r\n\t}\r\n}\r\n","import { DialogService } from \"aurelia-dialog\";\r\nimport { EventAggregator } from \"aurelia-event-aggregator\";\r\nimport { HttpClient, json } from \"aurelia-fetch-client\";\r\nimport { autoinject } from \"aurelia-framework\";\r\nimport { NavigationInstruction, Router } from \"aurelia-router\";\r\nimport { AuthManager } from \"auth/auth-manager\";\r\nimport { Config } from \"config/config\";\r\nimport { BroadcastEvents } from \"models/broadcast-events\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { ConcurrentAccessError } from \"shared/controls/concurrent-access-error\";\r\nimport { PermissionError } from \"shared/controls/permission-error\";\r\nimport { ValidationError } from \"shared/controls/validation-error\";\r\nimport { VersionMismatchService } from \"shared/utils/version-mismatch-service\";\r\nimport { Notifier } from \"./notifier\";\r\n\r\nclass CachedResponse {\r\n fetchedOn: Date;\r\n responsePromise: Promise;\r\n}\r\n\r\n@autoinject\r\nexport class RequestHandler {\r\n\r\n cache: { [url: string]: CachedResponse; } = {};\r\n constructor(private readonly authManager: AuthManager,\r\n private readonly eventAggregator: EventAggregator,\r\n private readonly httpClient: HttpClient,\r\n private readonly router: Router,\r\n private readonly notifier: Notifier,\r\n private readonly dialogService: DialogService,\r\n private readonly versionMismatchService: VersionMismatchService) {\r\n }\r\n \r\n /**\r\n * Get the resource at the given the URL.\r\n * @param url url to 'get' from\r\n */\r\n get(url: string, cacheAge?: number): Promise {\r\n return this.processRequest({ url: url, options: { method: 'get', headers: { 'Content-Type': 'application/json' } } }, false, cacheAge);\r\n }\r\n\r\n /**\r\n * Post (e.g. ADD) the resource to the given URL, and return the given type\r\n * @param url\r\n * @param body\r\n */\r\n post(url: string, body?: TRequest): Promise {\r\n let request: IRequest = { url: url, options: { method: 'post', headers: { 'Content-Type': 'application/json' } } };\r\n if (body) {\r\n request.options.body = json(body);\r\n }\r\n return this.processRequest(request);\r\n }\r\n\r\n /**\r\n * Patch (e.g. partial update) the resource to the given URL, and return the given type\r\n * @param url\r\n * @param body\r\n */\r\n patch(url: string, body?: TRequest): Promise {\r\n let request: IRequest = { url: url, options: { method: 'patch', headers: { 'Content-Type': 'application/json' } } };\r\n if (body) {\r\n request.options.body = json(body);\r\n }\r\n return this.processRequest(request);\r\n }\r\n\r\n /**\r\n * Put (e.g. UPDATE) the resource at the given URL, and return the given type\r\n * @param url\r\n * @param body\r\n */\r\n put(url: string, body?: TRequest): Promise {\r\n let request: IRequest = { url: url, options: { method: 'put', headers: { 'Content-Type': 'application/json' } } };\r\n if (body) {\r\n request.options.body = json(body);\r\n }\r\n return this.processRequest(request);\r\n }\r\n\r\n /**\r\n * Delete the resource at the given URL\r\n * @param url\r\n */\r\n delete(url: string): Promise {\r\n return this.processRequest({ url: url, options: { method: 'delete', headers: { 'Content-Type': 'application/json' } } });\r\n }\r\n\r\n processRequest(request: IRequest, isRetry?: boolean, cacheAge?: number): Promise {\r\n let url = request.url;\r\n let isGetRequest = (request.options == null || request.options.method == null || request.options.method.toLowerCase() === \"get\");\r\n\r\n if (isGetRequest) {\r\n url += (url.indexOf(\"?\") === -1) ? \"?\" : \"&\";\r\n url += Math.round(new Date().getTime() / 1000).toString();\r\n }\r\n\r\n const req = new Request(`${Config.baseUrl}${url}`, request.options);\r\n req.headers.append('ClientVersion', Config.applicationVersion);\r\n\r\n const accessToken = this.authManager.accessToken;\r\n if (accessToken != null) {\r\n req.headers.append(\"Authorization\", `Bearer ${accessToken}`);\r\n }\r\n\r\n var fetchPromise: Promise;\r\n\r\n if (cacheAge != null && isGetRequest) {\r\n fetchPromise = this.fetchOrCache(cacheAge, request.url, () => this.httpClient.fetch(req));\r\n } else {\r\n fetchPromise = this.httpClient.fetch(req);\r\n }\r\n\r\n return fetchPromise\r\n .then((response: Response) => {\r\n // we can't reuse Reponse objects, so clone it before it's ever used\r\n return (cacheAge && isGetRequest) ? response.clone() : response;\r\n }).then((response) => {\r\n return this.versionMismatchService.checkVersion(response);\r\n })\r\n .then((response) => {\r\n return this.checkResponse(response);\r\n }).then((response: Response) => {\r\n return response.text().then(t => {\r\n return t ? JSON.parse(t) : null;\r\n })\r\n }).catch((reason: any) => {\r\n // WARNING: this retries PUT/POST/DELETE requests too, which may not be\r\n // desirable. auth regularly fails if you only enable this for get requests though.\r\n if ((reason.status === 401 || reason.status === 403) && !isRetry) {\r\n return this.refreshAuthToken().then((data: boolean) => {\r\n if (data) {\r\n return this.processRequest(request, true);\r\n }\r\n });\r\n } else if (reason.status === 403 && isRetry) {\r\n throw new PermissionError(\"User does not have required permissions to access this resource.\");\r\n } else {\r\n if (!reason.json) {\r\n throw new Error(reason);\r\n }\r\n return reason.json().then((error: SharedDto.IErrorResponse) => {\r\n if (error.errorType == SharedDto.Constants.ErrorType.ValidationErrors) {\r\n throw new ValidationError(error.message, error.errors);\r\n }\r\n else if (error.errorType == SharedDto.Constants.ErrorType.ConcurrentAccess) {\r\n throw new ConcurrentAccessError(error.message);\r\n }\r\n else if (error.hasOwnProperty('error_description')) {\r\n throw new Error(error['error_description']);\r\n }\r\n else if (error.hasOwnProperty('message')) {\r\n throw new Error(error.message);\r\n }\r\n throw new Error(\"Unspecified error.\");\r\n });\r\n }\r\n });\r\n }\r\n\r\n nextRouteInstruction: NavigationInstruction;\r\n\r\n //cache the refresh token promise for subsequence callers until it is finished to avoid multiple calls\r\n private refreshTokenPromise: Promise = null;\r\n\r\n refreshAuthToken(): Promise {\r\n const refreshToken = this.authManager.refreshToken;\r\n\r\n if (refreshToken == null) {\r\n this.authManager.logout();\r\n throw new Error(\"No refresh token to refresh user session.\");\r\n }\r\n\r\n let redirectToLogin = () => {\r\n this.authManager.logout();\r\n this.eventAggregator.publish(BroadcastEvents.loginStateChanged);\r\n this.dialogService.closeAll();\r\n\r\n if (this.router && this.nextRouteInstruction) {\r\n //this is needed if request handler is called during activate() where the current instruction is not set for the route.\r\n //the router authorise pipeline step provides us this information.\r\n const currentRoute = this.nextRouteInstruction.fragment;\r\n const queryString = this.nextRouteInstruction.queryString;\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\r\n return;\r\n }\r\n if (this.router && this.router.currentInstruction) {\r\n const currentRoute = this.router.currentInstruction.fragment;\r\n const queryString = this.router.currentInstruction.queryString;\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\r\n return;\r\n }\r\n }\r\n\r\n if (this.refreshTokenPromise == null) {\r\n this.refreshTokenPromise = this.httpClient.fetch(`${Config.baseUrl}token`, {\r\n method: \"post\",\r\n body: `refresh_token=${refreshToken}&grant_type=refresh_token&client_id=${Config.clientId}`\r\n }).then((response: Response) => {\r\n if (response.status === 400) {\r\n throw new Error(\"Logged Out\");\r\n }\r\n return response.json();\r\n }).then((data: IAuthResponse) => {\r\n this.authManager.refreshToken = data.refresh_token;\r\n this.authManager.accessToken = data.access_token;\r\n this.eventAggregator.publish(BroadcastEvents.loginStateChanged);\r\n return { refreshed: true };\r\n }).catch(error => {\r\n this.notifier.warning(\"Your session has expired. You need to log into the system again.\");\r\n redirectToLogin();\r\n return { error: error }\r\n }).then((result: any) => {\r\n // this code runs no matter what happened to the promise above\r\n this.refreshTokenPromise = null;\r\n\r\n if (result && result.refreshed) {\r\n return true;\r\n }\r\n else {\r\n if (result.error instanceof Error) {\r\n throw result.error;\r\n }\r\n throw new Error(\"Logged Out\");\r\n }\r\n });\r\n }\r\n\r\n return this.refreshTokenPromise;\r\n }\r\n\r\n private checkResponse(response: Response): Response {\r\n if (response.ok) {\r\n return response;\r\n }\r\n throw response;\r\n }\r\n\r\n private fetchOrCache(cacheSeconds: number, url: string, fetchRequest: () => Promise): Promise {\r\n let cached: CachedResponse = this.cache[url];\r\n if (cached) {\r\n if ((new Date().getTime() - cached.fetchedOn.getTime()) > cacheSeconds * 1000) {\r\n delete this.cache[url];\r\n cached = undefined;\r\n }\r\n }\r\n if (cached == undefined) {\r\n cached = this.cache[url] = {\r\n responsePromise: fetchRequest(),\r\n fetchedOn: new Date()\r\n };\r\n }\r\n return cached.responsePromise;\r\n }\r\n\r\n private bustCache(url: string) {\r\n if (this.cache[url] !== undefined) {\r\n delete this.cache[url];\r\n }\r\n }\r\n}\r\n\r\ninterface IRequest {\r\n url: string;\r\n options?: RequestInit;\r\n}\r\n","import { bindable, bindingMode } from 'aurelia-framework';\r\n\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { ControlIdGenerator } from \"../../../utils/control-id-generator\";\r\nimport { computedFrom } from 'aurelia-binding';\r\nimport { ValidationRules } from 'aurelia-validation';\r\n\r\nexport abstract class QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) questionTemplate: SharedDto.OnlineForm.Form.IQuestionDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) questionIndex: number;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) visible: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stepVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sortOrder: number;\r\n @bindable() delete;\r\n @bindable() canDelete: boolean;\r\n\r\n questionInstance: SharedDto.OnlineForm.Application.IAnswerDto;\r\n questionId: string;\r\n\r\n constructor(controlIdGenerator: ControlIdGenerator) {\r\n this.questionId = 'questionInstance-' + controlIdGenerator.getNextId();\r\n }\r\n\r\n bind(bindingContext: Object = null, overrideContext: Object = null) {\r\n //removing this could result in Changed methods being called in child questions. Be mindful if you are going to remove this.\r\n }\r\n\r\n attached() {\r\n this.setupValidation();\r\n }\r\n\r\n setupValidation() {\r\n console.log('ERROR: Question type ' + SharedDto.Constants.QuestionType[this.questionTemplate.questionType] + ' has not setup a setupValidation() method');\r\n }\r\n\r\n detached() {\r\n ValidationRules.off(this.questionInstance);\r\n }\r\n\r\n @computedFrom('questionTemplate.helpTextLocation', 'questionTemplate.helpText')\r\n get placeHolderHelpText() {\r\n return this.questionTemplate !== undefined && this.questionTemplate.helpTextLocation == SharedDto.Constants.HelpTextLocation.PlaceHolder\r\n ? this.questionTemplate.helpText\r\n : \"\";\r\n }\r\n\r\n @computedFrom('visible', 'stepVisibility', 'sectionVisibility')\r\n get visibility(): boolean {\r\n return this.visible && this.stepVisibility && this.sectionVisibility;\r\n }\r\n\r\n @computedFrom(\"questionTemplate\")\r\n get isMandatory() {\r\n return this.questionTemplate.mandatory || (this.questionTemplate.repeatable && this.questionTemplate.repeatMin < this.questionIndex);\r\n }\r\n}\r\n","import { singleton } from \"aurelia-framework\";\r\nimport * as toastr from \"toastr\";\r\nimport { Message, MessageType } from \"utils/messages\";\r\n\r\n@singleton()\r\nexport class Notifier {\r\n\r\n initialViewLoaded = false;\r\n delayedToasts: Function[] = [];\r\n\r\n constructor() {\r\n //toasts are queued until the first page is loaded (shell.ts::activate()) to avoid them getting removed from the page by aurelia.\r\n //probably a better way to implement this, but can't find it right now...\r\n }\r\n\r\n private opts = {\r\n closeButton: true,\r\n debug: false,\r\n newestOnTop: true,\r\n progressBar: true,\r\n positionClass: \"toast-top-right\",\r\n preventDuplicates: false,\r\n showDuration: 150,\r\n hideDuration: 150,\r\n timeOut: 10000,\r\n extendedTimeOut: 10000,\r\n showEasing: \"swing\",\r\n hideEasing: \"linear\",\r\n showMethod: \"fadeIn\",\r\n hideMethod: \"fadeOut\"\r\n } as ToastrOptions;\r\n\r\n viewLoaded() {\r\n this.initialViewLoaded = true;\r\n\r\n this.delayedToasts.forEach(x => {\r\n x();\r\n })\r\n }\r\n\r\n clear() {\r\n this.delayedToasts = Array();\r\n toastr.remove();\r\n }\r\n\r\n info(message: string, title?: string) {\r\n this.toast(message, MessageType.Info, title);\r\n }\r\n\r\n success(message: string, title?: string) {\r\n this.toast(message, MessageType.Success, title);\r\n }\r\n\r\n warning(message: string, title?: string) {\r\n this.toast(message, MessageType.Warning, title);\r\n }\r\n\r\n error(message: string, title?: string) {\r\n this.toast(message, MessageType.Error, title);\r\n }\r\n\r\n standardMessage(message: Message) {\r\n this.toast(message.message, message.type);\r\n }\r\n\r\n private toast(message: string, type: MessageType, title?: string) {\r\n var fn;\r\n switch (type) {\r\n case MessageType.Success:\r\n fn = toastr.success;\r\n break;\r\n\r\n case MessageType.Info:\r\n fn = toastr.info;\r\n break;\r\n\r\n case MessageType.Warning:\r\n fn = toastr.warning;\r\n break;\r\n\r\n case MessageType.Error:\r\n default:\r\n fn = toastr.error;\r\n break;\r\n }\r\n if (this.initialViewLoaded) {\r\n fn(message, title, this.opts);\r\n } else {\r\n this.delayedToasts.push(() => {\r\n fn(message, title, this.opts);\r\n });\r\n }\r\n }\r\n}\r\n","import { ValidationRules } from \"aurelia-validation\";\r\nimport { partiallyValidateVoucherNumber, valdiateVoucherParts, validateVoucherNumber } from \"shared/utils/voucher-number-validation\";\r\n\r\nexport var WebsiteAddressRule = \"websiteAddressRule\";\r\nexport var StartsWithHttpOrHttps = \"startsWithHttpOrHttps\";\r\nexport var VendorIdRule = \"vendorIdRule\";\r\nexport var PersonNameRule = \"personName\";\r\nexport var BusinessNameRule = \"businessName\";\r\nexport var DateOfBirthRule = \"dateOfBirth\";\r\nexport var GenericPhoneNumberRule = \"genericPhoneNumberRule\"\r\nexport var NotAPOBox = \"notPoBoxRule\";\r\nexport var NumericRule = \"numericRule\";\r\nexport var NonNegativeNumberRule = \"nonNegativeNumberRule\";\r\nexport var PositiveNumberRule = \"positiveNumberRule\";\r\nexport var PositiveWholeNumberRule = \"positiveWholeNumberRule\";\r\nexport var DomainFormatRule = \"domainFormatRule\";\r\nexport var DateComparison = \"dateComparison\";\r\nexport var AlphaNumericRule = \"alphaNumericRule\";\r\nexport var HasElementsRule = \"hasElements\";\r\nexport var FutureDateRule = \"futureDateRule\";\r\nexport var FutureTimeRule = \"futureTimeRule\";\r\nexport var TodayOrLaterRule = \"todayOrLaterRule\";\r\nexport var TodayOrEarlierRule = \"todayOrEarlierRule\";\r\nexport var HtmlNotEmpty = \"htmlNotEmpty\";\r\nexport var WorkingDays = \"workingDays\";\r\nexport var VoucherNumberRule = \"voucherNumberRule\";\r\n\r\nexport function SetupCustomValidation() {\r\n ValidationRules.customRule(AlphaNumericRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return /^[A-Za-z0-9]*$/.test(value);\r\n }, \"${$displayName} can only contain letters and numbers.\");\r\n\r\n ValidationRules.customRule(WebsiteAddressRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return /^(http(s)?:\\/\\/.)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$/.test(value);\r\n }, \"Not a valid URL\");\r\n\r\n ValidationRules.customRule(VendorIdRule, (value) => {\r\n if (value == undefined || value == null || value == '') {\r\n return true;\r\n }\r\n return /^[A-Za-z0-9]*$/.test(value);\r\n }, \"${$displayName} can only contain characters and numbers.\");\r\n\r\n ValidationRules.customRule(PersonNameRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return /^[A-Za-z'\\s-]*$/.test(value);\r\n }, \"${$displayName} can only contain characters, spaces, apostrophes, and hyphens.\");\r\n\r\n ValidationRules.customRule(BusinessNameRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return /^[\\dA-Za-z'\\s\\-!\\\"#\\$\\%\\&\\(\\)\\*\\,\\.\\/\\{\\|\\}\\:\\;\\=\\?\\@\\\\\\\\_]*$/.test(value);\r\n }, \"${$displayName} can only contain spaces, alphanumeric characters or the following symbols: ! \\\" # $ % & ' ( ) * , - . / : ; = ? @ \\ _ { | }\");\r\n\r\n ValidationRules.customRule(DateOfBirthRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n var dateOfBirth = new Date(value);\r\n var now = new Date();\r\n return dateOfBirth < now;\r\n }, \"${$displayName} can not be a future date.\");\r\n\r\n ValidationRules.customRule(GenericPhoneNumberRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return /^[0-9]+$/.test(value);\r\n }, \"${$displayName} must be digits.\");\r\n\r\n ValidationRules.customRule(NotAPOBox, (value: string) => {\r\n //checks for a match of P, followed by optional period, followed by O, optional period, space, and \"Box\".\r\n //e.g. PO Box, P.O. Box, P.O Box\r\n //note: apply to line1 and line2 of an address.\r\n if (!value) {\r\n return true;\r\n }\r\n return !/\\bP(ost|ostal)?([ \\.]*(O|0)(ffice)?)?([ \\.]*Box)?\\b/i.test(value);\r\n }, \"${$displayName} cannot be a Post Office Box.\");\r\n\r\n ValidationRules.customRule(NumericRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n } else {\r\n return !isNaN(value);\r\n }\r\n }, \"${$displayName} must only contain numbers.\");\r\n\r\n ValidationRules.customRule(PositiveNumberRule, (value) => { \r\n if (value === undefined || value === null || value === '') { \r\n return true;\r\n } else { \r\n return +value > 0;\r\n }\r\n }, \"${$displayName} must be a positive number.\");\r\n\r\n ValidationRules.customRule(NonNegativeNumberRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n } else {\r\n return +value >= 0;\r\n }\r\n }, \"${$displayName} must not be a negative number.\");\r\n\r\n ValidationRules.customRule(PositiveWholeNumberRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n } else {\r\n return value % 1 === 0 && +value > 0;\r\n }\r\n }, \"${$displayName} must be a positive whole number.\");\r\n\r\n ValidationRules.customRule(DomainFormatRule, (value) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n } else {\r\n return value.indexOf(\"\\\\\") > -1;\r\n }\r\n }, \"${$displayName} must be prefixed with a domain and a backward slash. Example: \\\"domain\\\\username\\\"\");\r\n\r\n /**\r\n * Usage:\r\n * .ensure(r => r.dateA)\r\n * .displayName(\"display name for date A\")\r\n * .satisfiesRule(DateComparison, \"<=\", o => o.dateB, \"display name for date B\")\r\n *\r\n * This would ensure that dateA is less than or equal to dateB. Comparitors are <, <=, =, >=, >.\r\n */\r\n ValidationRules.customRule(DateComparison,\r\n (value: string, object: object, comparitor: string, otherDateSelector: (object: object) => string, otherDisplayName) => { \r\n if (value == null || otherDateSelector == null || otherDateSelector(object) == null || comparitor == null || comparitor === \"\") { \r\n return true;\r\n }\r\n let thisDate = new Date(value);\r\n let otherDate = new Date(otherDateSelector(object)); \r\n switch (comparitor) {\r\n case \"<\": return thisDate < otherDate;\r\n case \">\": return thisDate > otherDate;\r\n case \"=\": return thisDate.getTime() === otherDate.getTime();\r\n case \"<=\": return thisDate <= otherDate;\r\n case \">=\": return thisDate >= otherDate;\r\n default:\r\n throw new Error(`unknown comparitor (${comparitor} in date comparison rule`);\r\n }\r\n }, \"${$displayName} must be ${$config.words} ${$config.otherDisplayName}\",\r\n (comparitor, otherDateSelector, otherDisplayName) => {\r\n var words: string;\r\n switch (comparitor) {\r\n case \"<\": words = \"before\"; break;\r\n case \">\": words = \"after\"; break;\r\n case \"=\": words = \"equal to\"; break;\r\n case \"<=\": words = \"on or before\"; break;\r\n case \">=\": words = \"on or after\"; break;\r\n default:\r\n throw new Error(`unknown comparitor (${comparitor} in date comparison rule`);\r\n }\r\n return { words, otherDisplayName };\r\n });\r\n\r\n ValidationRules.customRule(HasElementsRule,\r\n (value: any[], object) => {\r\n return value && value.length > 0;\r\n },\r\n `At least one \\${$displayName} is required`);\r\n\r\n ValidationRules.customRule(StartsWithHttpOrHttps,\r\n (value: string, object) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n return value.toLocaleLowerCase().startsWith(\"http://\") || value.toLocaleLowerCase().startsWith(\"https://\");\r\n },\r\n `The URL must begin with http:// or https://`);\r\n\r\n ValidationRules.customRule(FutureDateRule,\r\n (value: string, object) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n var inputDate = new Date(value);\r\n var now = new Date();\r\n var midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);\r\n return inputDate >= midnight;\r\n },\r\n \"${$displayName} must be a future date.\");\r\n\r\n\r\n ValidationRules.customRule(FutureTimeRule,\r\n (value: string, object) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n var inputDate = new Date(value);\r\n var now = new Date();\r\n return inputDate >= now;\r\n },\r\n \"${$displayName} must be in the future.\");\r\n\r\n\r\n ValidationRules.customRule(TodayOrLaterRule,\r\n (value: string, object) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n var inputDate = new Date(value);\r\n var now = new Date();\r\n var startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\r\n return inputDate >= startOfToday;\r\n },\r\n \"${$displayName} must be today or later.\");\r\n\r\n ValidationRules.customRule(TodayOrEarlierRule,\r\n (value: string, object) => {\r\n if (value === undefined || value === null || value === '') {\r\n return true;\r\n }\r\n var inputDate = new Date(value);\r\n var now = new Date();\r\n var startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\r\n return inputDate <= startOfToday;\r\n },\r\n \"${$displayName} must be a today or earlier.\"); \r\n\r\n ValidationRules.customRule(HtmlNotEmpty,\r\n (value: string, object) => {\r\n //A check against having an empty string in a rich text editor\r\n if (value === undefined || value === null) {\r\n return true;\r\n }\r\n return value.indexOf(\"<\") > -1 && value.indexOf(\">\") > -1;\r\n }, \"${$displayName} must not be empty.\");\r\n\r\n\r\n ValidationRules.customRule(WorkingDays,\r\n (value: string, object) => {\r\n //A check against having an empty string in a rich text editor\r\n if (value === undefined || value === null) {\r\n return true;\r\n }\r\n var myDate = new Date(value);\r\n\r\n return !(myDate.getDay() == 6 || myDate.getDay() == 0);\r\n }, \"${$displayName} payment date can not be set to a Saturday or Sunday\");\r\n\r\n ValidationRules.customRule(VoucherNumberRule,\r\n (value: string) => {\r\n //A check against having an empty string in a rich text editor\r\n if (value === undefined || value === null || value.length === 0) {\r\n return true;\r\n }\r\n return partiallyValidateVoucherNumber(value);\r\n }, \"${$displayName} is not a valid voucher number and may have been entered incorrectly\");\r\n\r\n}\r\n","import { autoinject, singleton, Disposable } from \"aurelia-framework\";\r\nimport { EventAggregator } from \"aurelia-event-aggregator\"\r\nimport { Router, RedirectToRoute } from \"aurelia-router\";\r\n\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { Dto } from \"project/project\";\r\nimport { ActiveProfile } from \"models/active-profile\";\r\nimport { Store } from \"utils/store\";\r\nimport { BroadcastEvents } from \"models/broadcast-events\"\r\nimport { AuthManager } from \"auth/auth-manager\";\r\nimport { Notifier } from \"./notifier\";\r\nimport {SharedDto} from \"../project/project-shared\";\r\nimport IBankDetailsDto = SharedDto.IBankDetailsDto;\r\nimport {Confirm} from \"../shared/controls/confirm-modal/confirm\";\r\n\r\n@autoinject\r\n@singleton()\r\nexport class ProfileService {\r\n loginStateListener: Disposable;\r\n\r\n cachedAccount: {\r\n expiry: Date;\r\n account: Promise;\r\n } = null;\r\n\r\n constructor(private readonly requestHandler: RequestHandler,\r\n private readonly store: Store,\r\n private readonly eventAggregator: EventAggregator,\r\n private readonly authManager: AuthManager,\r\n private notifier: Notifier,\r\n private readonly router: Router,\r\n private readonly confirm: Confirm) {\r\n\r\n this.loginStateListener = this.eventAggregator.subscribe(BroadcastEvents.loginStateChanged, () => { this.getAccount(true); });\r\n this.loginStateListener = this.eventAggregator.subscribe(BroadcastEvents.profileDataChanged, () => { this.getAccount(); });\r\n }\r\n\r\n //todo.. this should probably be abstracted to just providing an Identifier and Profile Type - let the profile service handle the details instead of the calling code.\r\n setActiveProfile(profile: ActiveProfile): Promise {\r\n return this.getAccount().then(account => {\r\n var profileKey = Store.keyActiveProfile + \"-\" + account.accountId;\r\n this.store.setl(profileKey, profile);\r\n this.eventAggregator.publish(BroadcastEvents.profileChanged);\r\n });\r\n }\r\n \r\n changeActiveProfile(userDetails: Dto.IUserResponse, organisationId: number = null): Promise {\r\n if (organisationId) {\r\n let organisation = userDetails.userOrganisationProfiles.find(x => x.organisationId == organisationId);\r\n if (!organisation) {\r\n return;\r\n }\r\n return this.setActiveProfile({\r\n profileType: \"Organisation\",\r\n profileIdentifier: organisation.organisationId,\r\n profileDisplayName: organisation.legalName,\r\n profileUserFullname: userDetails.fullName,\r\n profileUserId: userDetails.accountId,\r\n profileAccountStatus: userDetails.accountStatus,\r\n allowedRoutes: organisation.allowedRoutes\r\n });\r\n }\r\n return this.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: userDetails.individualProfileId,\r\n profileDisplayName: null,\r\n profileUserFullname: userDetails.fullName,\r\n profileUserId: userDetails.accountId,\r\n profileAccountStatus: userDetails.accountStatus,\r\n allowedRoutes: null\r\n });\r\n\r\n }\r\n\r\n async getActiveProfile(bustCache: boolean = false): Promise {\r\n if (this.authManager.isLoggedIn) {\r\n return this.getAccount(bustCache).then(account => {\r\n var profileKey = Store.keyActiveProfile + \"-\" + account.accountId;\r\n return this.store.getl(profileKey) as ActiveProfile;\r\n });\r\n } else {\r\n return Promise.resolve(null);\r\n }\r\n }\r\n \r\n async getProfileNavigation(): Promise {\r\n let profile = await this.getActiveProfile(true);\r\n return this.requestHandler.get(`profile/account/menu/${profile.profileType}/${profile.profileIdentifier}`);\r\n }\r\n \r\n selectDefaultProfile(redirect?: string, bustCache: boolean = false) {\r\n let continueRoute = () => {\r\n if (redirect) {\r\n this.router.navigate(redirect);\r\n } else {\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome]);\r\n }\r\n }\r\n //based on stored profile, decide whether to redirect, go to welcome page, or profile selection page.\r\n this.getAccount(bustCache).then(account => {\r\n if (account.userOrganisationProfiles && account.userOrganisationProfiles.length > 0) {\r\n this.getActiveProfile().then(activeProfile => {\r\n if (activeProfile == null) {\r\n //set current profile as individual and send to selection\r\n this.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: account.individualProfileId,\r\n profileDisplayName: null,\r\n profileUserFullname: account.fullName,\r\n profileUserId: account.accountId,\r\n profileAccountStatus: account.accountStatus,\r\n allowedRoutes: null\r\n });\r\n this.eventAggregator.publish(BroadcastEvents.profileChanged);\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ProfileSelect], { redirect: redirect });\r\n } else if (activeProfile.profileType === \"Organisation\") {\r\n var org = account.userOrganisationProfiles.find(x => x.organisationId === activeProfile.profileIdentifier);\r\n if (org !== null) {\r\n continueRoute();\r\n } else {\r\n //they've been removed from an organisation since last login and will need to select a new profile\r\n this.eventAggregator.publish(BroadcastEvents.profileChanged);\r\n this.setActiveProfile(null);\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ProfileSelect], { redirect: redirect });\r\n }\r\n } else {\r\n continueRoute();\r\n }\r\n });\r\n } else {\r\n //user only has an individual profile. select it and continue with redirect or welcome page.\r\n this.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: account.individualProfileId,\r\n profileDisplayName: null,\r\n profileUserFullname: account.fullName,\r\n profileUserId: account.accountId,\r\n profileAccountStatus: account.accountStatus,\r\n allowedRoutes: null\r\n });\r\n this.eventAggregator.publish(BroadcastEvents.profileChanged);\r\n continueRoute();\r\n }\r\n });\r\n }\r\n\r\n private refreshActiveProfile(account: Dto.IUserResponse): void {\r\n if (account) {\r\n this.getActiveProfile().then(activeProfile => {\r\n if (activeProfile !== null) { \r\n if (activeProfile.profileType === \"Individual\") {\r\n this.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: account.individualProfileId,\r\n profileDisplayName: null,\r\n profileUserFullname: account.fullName,\r\n profileUserId: account.accountId,\r\n profileAccountStatus: account.accountStatus,\r\n allowedRoutes: null\r\n });\r\n } else if (activeProfile.profileType === \"Organisation\") {\r\n const org = account.userOrganisationProfiles.find(x => x.organisationId === activeProfile.profileIdentifier);\r\n if (org) {\r\n this.setActiveProfile({\r\n profileType: \"Organisation\",\r\n profileIdentifier: org.organisationId,\r\n profileDisplayName: org.legalName,\r\n profileUserFullname: account.fullName,\r\n profileUserId: account.accountId,\r\n profileAccountStatus: account.accountStatus,\r\n allowedRoutes: org.allowedRoutes\r\n });\r\n } else {\r\n //for now, set as individual profile.\r\n this.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: account.individualProfileId,\r\n profileDisplayName: null,\r\n profileUserFullname: account.fullName,\r\n profileUserId: account.accountId,\r\n profileAccountStatus: account.accountStatus,\r\n allowedRoutes: null\r\n });\r\n }\r\n } else {\r\n throw new Error(\"A new profile type is not being handled in the ProfileService.refreshActiveProfile() function.\");\r\n }\r\n this.eventAggregator.publish(BroadcastEvents.profileRefreshed);\r\n }\r\n });\r\n } else {\r\n this.eventAggregator.publish(BroadcastEvents.profileRefreshed);\r\n }\r\n }\r\n\r\n getAccount(bustCache = false): Promise {\r\n //note:getting the account has it's own caching implemented here because we need to know when the cache doesn't resolve the account.\r\n if (bustCache) {\r\n this.cachedAccount = null;\r\n }\r\n if (this.cachedAccount != null && this.cachedAccount.expiry >= new Date()) {\r\n return this.cachedAccount.account;\r\n } else {\r\n if (this.authManager.isLoggedIn) {\r\n var accPromise = this.requestHandler.get(\"security/user\").then((data: Dto.IUserResponse) => {\r\n this.refreshActiveProfile(data);\r\n return data;\r\n });\r\n\r\n var newExpiry = new Date();\r\n newExpiry.setSeconds(newExpiry.getSeconds() + 60);\r\n this.cachedAccount = {\r\n expiry: newExpiry,\r\n account: accPromise\r\n };\r\n return accPromise;\r\n } else {\r\n this.cachedAccount = null;\r\n this.refreshActiveProfile(null);\r\n return Promise.resolve(null);\r\n }\r\n }\r\n }\r\n\r\n getIndividualProfile(): Promise {\r\n return this.requestHandler.get(\"profile/individual\");\r\n }\r\n\r\n updateIndividualProfile(model: Dto.IPersonalProfileDto): Promise {\r\n return this.requestHandler.put(`profile/individual`, model);\r\n }\r\n\r\n getIndividualBankDetails(): Promise {\r\n return this.requestHandler.get(`profile/individual/bank-details`);\r\n }\r\n\r\n getIndividualBankDetailsById(bankDetailsId: number): Promise {\r\n return this.requestHandler.get(`profile/individual/bank-details/${bankDetailsId}`);\r\n }\r\n\r\n addIndividualBankDetails(request: SharedDto.IBankDetailsDto) {\r\n return this.requestHandler.post(`profile/individual/bank-details`, request);\r\n }\r\n\r\n updateIndividualBankDetails(bankDetailsId: number, request: SharedDto.IBankDetailsDto) {\r\n return this.requestHandler.put(`profile/individual/bank-details/${bankDetailsId}`, request);\r\n }\r\n\r\n deleteIndividualBankDetails(bankDetailsId: number) {\r\n return this.requestHandler.delete(`profile/individual/bank-details/${bankDetailsId}`);\r\n }\r\n \r\n updateUsername(newUserName: string): Promise {\r\n return this.requestHandler.post(`profile/account/update-username`, newUserName);\r\n }\r\n\r\n verifyNewUsername(verificationCode: string): Promise {\r\n return this.requestHandler.post(`profile/account/verify-new-username`, verificationCode);\r\n }\r\n\r\n \r\n \r\n deactivate() {\r\n this.loginStateListener.dispose();\r\n }\r\n\r\n async hasOrgActivity(...activities: Dto.Constants.OrgUserAccessActivity[]) {\r\n if (!activities || activities.length === 0) {\r\n throw new Error(\"Invalid arguments\");\r\n }\r\n\r\n let profile = await this.getActiveProfile();\r\n if (profile.profileType !== \"Organisation\") {\r\n return false;\r\n }\r\n\r\n let account = await this.getAccount();\r\n if (!account.userOrganisationProfiles) {\r\n return;\r\n }\r\n\r\n let orgProfile = account.userOrganisationProfiles.find(x => x.organisationId == profile.profileIdentifier);\r\n if (!orgProfile || !orgProfile.activities) {\r\n return false;\r\n }\r\n\r\n for (let activity of activities) {\r\n if (orgProfile.activities.indexOf(activity) > -1) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n confirmProfileChange(message: string, title: string) : Promise {\r\n return this.confirm.confirm(message, title);\r\n }\r\n\r\n async switchProfileIfRequired(organisationId: number, showConfirmation: boolean = true, message?: string, title?: string) : Promise{\r\n let profile = await this.getActiveProfile(false);\r\n \r\n message = message == null ? 'You are currently using a different profile. Would you like to change profile?' : message;\r\n title = title == null ? 'Confirm change of profile' : title;\r\n \r\n if (organisationId != null){\r\n if (profile.profileIdentifier != organisationId.valueOf()){\r\n let confirmed = true;\r\n \r\n if (showConfirmation){\r\n confirmed = await this.confirmProfileChange(message, title);\r\n }\r\n\r\n if (confirmed) {\r\n await this.changeActiveProfile(await this.cachedAccount.account, organisationId);\r\n }\r\n \r\n return confirmed;\r\n }\r\n }\r\n else {\r\n // changing to an individual, we only need to check that the current profile is not the individual profile to know that\r\n // we need to switch accounts.\r\n if (profile.profileType != 'Individual') {\r\n let confirmed = true;\r\n \r\n if (showConfirmation){\r\n confirmed = await this.confirmProfileChange(message, title);\r\n }\r\n\r\n if (confirmed) {\r\n await this.changeActiveProfile(await this.cachedAccount.account, null);\r\n }\r\n \r\n return confirmed;\r\n }\r\n }\r\n\r\n // we didn't need to change the active profile\r\n return true;\r\n }\r\n \r\n}\r\n","import { autoinject } from \"aurelia-framework\";\r\n\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { IDataService } from \"shared/interfaces/idata-service\";\r\n\r\n@autoinject\r\nexport class DataService implements IDataService {\r\n private readonly cacheDuration = 3600; //1 hour, these codes should not be changing enough to warrant a shorter cache duration\r\n constructor(private readonly requestHandler: RequestHandler) {\r\n }\r\n\r\n getRoundVouchersByQuestion(questionId: number): Promise {\r\n return this.requestHandler.get(`code/round-vouchers-question/${questionId}`, this.cacheDuration);\r\n }\r\n\r\n getSupplierLocationTypes(): Promise {\r\n return this.requestHandler.get(`code/supplier-location-types`, this.cacheDuration);\r\n }\r\n\r\n getSupplierStatuses(): Promise {\r\n return this.requestHandler.get(`code/supplier-statuses`, this.cacheDuration);\r\n }\r\n\r\n getSupplierCategories(questionId: number): Promise {\r\n return this.requestHandler.get(`code/supplier-categories/${questionId}`, this.cacheDuration);\r\n }\r\n\r\n getSupplierLocations(questionId: number): Promise {\r\n return this.requestHandler.get(`code/supplier-locations/${questionId}`, this.cacheDuration);\r\n }\r\n\r\n getSuppliers(questionId: number, publicOnly: boolean = true) {\r\n return this.requestHandler.get(`code/suppliers/${questionId}`);\r\n }\r\n \r\n getBeneficiaries(): Promise> {\r\n return this.requestHandler.get>(`code/beneficiaries`, this.cacheDuration);\r\n }\r\n\r\n getReviewOutcomes(): Promise {\r\n return this.requestHandler.get(\"code/review-outcomes\", this.cacheDuration);\r\n }\r\n\r\n getBeneficiariesTopLevel(): Promise> {\r\n return this.getBeneficiaries().then(data => {\r\n return data.map(x => {\r\n return { id: x.beneficiaryId, description: x.display, code: null }\r\n })\r\n });\r\n }\r\n\r\n getEligibilityOutcomes(): Promise {\r\n return this.requestHandler.get(\"code/eligibility-outcomes\", this.cacheDuration);\r\n }\r\n\r\n getAgencies(): Promise> {\r\n return this.requestHandler.get>(`code/agencies`, this.cacheDuration);\r\n }\r\n\r\n getFinancialYearList(): Promise {\r\n return this.requestHandler.get(\"code/financial-year\");\r\n }\r\n\r\n checkRouteAccess(route: string): Promise {\r\n return Promise.resolve();//this.requestHandler.get(`security/canaccess/${Config.clientId}/${route}`);\r\n }\r\n\r\n getCategoryByLevel(level: number): Promise {\r\n return this.requestHandler.get(`code/category-by-level/${level}`, this.cacheDuration);\r\n }\r\n\r\n getCategoryChildren(categoryId: number): Promise {\r\n return this.requestHandler.get(`code/category-children/${categoryId}`, this.cacheDuration);\r\n }\r\n\r\n getRecaptchaKey(): Promise<{ value: string, enabled: boolean }> {\r\n return this.requestHandler.get<{ value: string, enabled: boolean }>(\"code/recaptchakey\");\r\n }\r\n\r\n getTitles(): Promise {\r\n return this.requestHandler.get(`code/title`, this.cacheDuration);\r\n }\r\n\r\n getStates(): Promise {\r\n return this.requestHandler.get(`code/state`, this.cacheDuration);\r\n }\r\n\r\n getCountries(): Promise {\r\n return this.requestHandler.get(`code/country`, this.cacheDuration);\r\n }\r\n\r\n getLegalEntities(): Promise {\r\n return this.requestHandler.get(`code/legal-entity-type`, this.cacheDuration);\r\n }\r\n\r\n getVoucherStatuses(): Promise {\r\n return this.requestHandler.get(`code/voucher-statuses`, this.cacheDuration);\r\n }\r\n\r\n getTaxExemptionCategories(): Promise {\r\n return this.requestHandler.get(`code/tax-exemption-category`, this.cacheDuration);\r\n }\r\n\r\n getDurationOperatingInNt(): Promise {\r\n return this.requestHandler.get(`code/operating-in-the-nt`, this.cacheDuration);\r\n }\r\n\r\n getOrganisationUserAccessActivities(): Promise {\r\n return this.requestHandler.get(`code/organisation-user-access-activity`, this.cacheDuration);\r\n }\r\n\r\n getDocumentTypes(): Promise {\r\n return this.requestHandler.get(`code/document-types`, this.cacheDuration);\r\n }\r\n\r\n getOrganisationRoles(): Promise {\r\n return this.requestHandler.get(`code/organisation-contact-role`, this.cacheDuration);\r\n }\r\n\r\n getLocationTypes(): Promise {\r\n return this.requestHandler.get(\"code/locations\", this.cacheDuration);\r\n }\r\n\r\n getLocationsByType(type: SharedDto.Constants.LocationType): Promise {\r\n return this.requestHandler.get(`code/locations/${type}`, this.cacheDuration);\r\n }\r\n\r\n getLocalityTypes(): Promise {\r\n return this.requestHandler.get(`code/locality-types`, this.cacheDuration);\r\n }\r\n\r\n getFilteredLocalityOptions(model: SharedDto.ILocalityFilterDto): Promise {\r\n return this.requestHandler.post(\r\n 'code/localities', model);\r\n }\r\n\r\n getOrganisationAuditCategories(): Promise {\r\n return this.requestHandler.get(\"code/organisation-audit-categories\", this.cacheDuration);\r\n }\r\n\r\n getDocumentSources(): Promise {\r\n return this.requestHandler.get(\"code/document-sources\", this.cacheDuration);\r\n }\r\n\r\n getSchools(): Promise {\r\n return this.requestHandler.get(\"code/schools\", this.cacheDuration);\r\n }\r\n\r\n getApplicationStatuses(): Promise {\r\n return this.requestHandler.get(\"code/application-statuses\", this.cacheDuration);\r\n }\r\n\r\n getPaymentStatuses(): Promise {\r\n return this.requestHandler.get(\"code/payment-statuses\", this.cacheDuration);\r\n }\r\n\r\n getReportingTypes(): Promise {\r\n return this.requestHandler.get(\"code/monitoring-reporting-types\", this.cacheDuration);\r\n }\r\n\r\n getReportingGroups(): Promise {\r\n return this.requestHandler.get(\"code/monitoring-reporting-groups\", this.cacheDuration);\r\n }\r\n\r\n getReportingRequirementStatuses(): Promise {\r\n return this.requestHandler.get(\"code/reporting-requirement-statuses\", this.cacheDuration);\r\n }\r\n\r\n\r\n getAcquittalTypes(): Promise {\r\n return this.requestHandler.get(\"code/acquittal-types\", this.cacheDuration);\r\n }\r\n\r\n getAcquittalRequirementStatuses(): Promise {\r\n return this.requestHandler.get(\"code/acquittal-statuses\", this.cacheDuration);\r\n }\r\n\r\n getDurationsOperatingInNt(): Promise {\r\n return this.requestHandler.get(\"code/durations-operating-in-nt\", this.cacheDuration);\r\n }\r\n\r\n getOrganisationContactRoles(): Promise {\r\n return this.requestHandler.get(\"code/organisation-contact-role\", this.cacheDuration);\r\n }\r\n\r\n getFundingRecommendationOutcomes(): Promise {\r\n return this.requestHandler.get(\"code/funding-recommendations\", this.cacheDuration);\r\n }\r\n\r\n getGrantVariationTypes(): Promise {\r\n return this.requestHandler.get(\"code/variations\", this.cacheDuration);\r\n }\r\n\r\n getApplicationContactRoles(): Promise {\r\n return this.requestHandler.get(\"code/application-contact-roles\", this.cacheDuration);\r\n }\r\n}\r\n","import { ValidationController, ValidationControllerFactory } from \"aurelia-validation\";\r\nimport { DataService } from \"./services/data-service\";\r\nimport { ValidationRenderer } from \"./shared/utils/validation-renderer\";\r\n\r\nexport class ModuleBase {\r\n protected dataService: DataService;\r\n\r\n constructor(dataService: DataService) {\r\n this.dataService = dataService;\r\n }\r\n}\r\n\r\n/** custom elements that need to declare their own validation scope should inherit from this class */\r\nexport class ValidationBase {\r\n protected controller: ValidationController;\r\n\r\n constructor(controllerFactory: ValidationControllerFactory,\r\n enableScroll: boolean = true) {\r\n\r\n this.controller = controllerFactory.createForCurrentScope();\r\n this.controller.addRenderer(new ValidationRenderer(enableScroll));\r\n }\r\n}\r\n\r\n/** Top-level pages/elements that have a form submit/save should extend from this class */\r\nexport class ValidationModuleBase extends ValidationBase {\r\n\r\n constructor(\r\n controllerFactory: ValidationControllerFactory,\r\n enableScroll: boolean = true) {\r\n\r\n super(controllerFactory, enableScroll);\r\n }\r\n}\r\n","let Selectize = require(\"selectize\")\n\nSelectize.define('clear_button', function (options) {\n /**\n * Escapes a string for use within HTML.\n *\n * @param {string} str\n * @returns {string}\n */\n var escape_html = function (str) {\n return (str + '')\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n\n options = $.extend({\n label: '×',\n title: 'Remove',\n className: 'clearAll',\n append: true,\n hideWhenEmpty: true,\n leaveOpen: false\n }, options);\n\n var self = this,\n $html = $('' +\n options.label +\n '');\n\n\n this.setup = (function () {\n var original = self.setup;\n return function () {\n // override the item rendering method to add the button to each\n original.apply(this, arguments);\n\n this.$wrapper.append($html);\n\n if (options.hideWhenEmpty) {\n var $input = this.$input;\n var hideShowClrBtn = function ($inpt) {\n var val = $inpt.val();\n if (val) {\n $html.show();\n } else {\n $html.hide();\n }\n }\n\n hideShowClrBtn($input);\n $input.change(function () {\n hideShowClrBtn($input);\n });\n }\n\n // add event listener\n this.$wrapper.on('click', '.' + options.className, function (e) {\n e.preventDefault();\n if (self.isLocked) return;\n self.clear(false);\n\n if (options.leaveOpen) {\n self.$control_input.focus();\n }\n });\n };\n })();\n});\n","import { autoinject } from 'aurelia-framework';\nimport { RequestHandler } from \"./request-handler\";\nimport { Dto } from 'project/project';\nimport { SharedDto } from 'project/project-shared';\nimport { Config } from 'config/config';\n\n@autoinject\nexport class FeaturedGrantService {\n constructor(private requestHandler: RequestHandler) {\n }\n\n getFeaturedGrant(limit: number = 5, previewMode: boolean): Promise {\n return this.requestHandler.get(`featured-grant/view/${limit}/${previewMode}`);\n } \n\n generateImageUrl(featuredGrantId: number) {\n return `${Config.baseUrl}/featured-grant/image/${featuredGrantId}`\n }\n}\n\n","export function toTitleCase(str) {\n str = str.toLowerCase().split(' ');\n for (var i = 0; i < str.length; i++) {\n str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1);\n }\n return str.join(' ');\n}\n","import { Logger } from \"aurelia-logging/dist/aurelia-logging\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\nimport { json } from 'aurelia-fetch-client';\r\nimport { autoinject, inject } from \"aurelia-dependency-injection\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { AuthManager } from \"auth/auth-manager\";\r\n\r\n@autoinject\r\nexport class ServerAppender {\r\n constructor(private readonly requestHandler: RequestHandler, private readonly authManager: AuthManager) {\r\n //additional handling for errors that happen outside the aurelia framework.\r\n window.onerror = function (message, source, line, column, error) {\r\n var report: SharedDto.IJavascriptError = {\r\n message: message as string,\r\n stack: error ? error.stack : '',\r\n url: window.location.href,\r\n requestedUrl: '',\r\n data: ''\r\n };\r\n\r\n requestHandler.post('error', report);\r\n console.error(error);\r\n };\r\n }\r\n\r\n debug(logger: Logger, data: any) {\r\n //do nothing\r\n }\r\n\r\n error(logger: Logger, messageOrError: string | Error, ...rest: any[]) {\r\n console.log(messageOrError);\r\n if (messageOrError instanceof Error) {\r\n var report: SharedDto.IJavascriptError = {\r\n message: messageOrError.message,\r\n stack: messageOrError.stack,\r\n url: window.location.href,\r\n requestedUrl: (messageOrError).requestedUrl,\r\n data: ''\r\n };\r\n this.requestHandler.post(`error`, report);\r\n return;\r\n }\r\n\r\n var report: SharedDto.IJavascriptError = {\r\n message: messageOrError,\r\n stack: '',\r\n url: window.location.href,\r\n requestedUrl: '',\r\n data: JSON.stringify(rest)\r\n };\r\n this.requestHandler.post(`error`, report);\r\n }\r\n\r\n info(logger: Logger, data: any) {\r\n //do nothing\r\n }\r\n\r\n warn(logger: Logger, data: any) {\r\n //do nothing\r\n }\r\n}","export class Store {\r\n\r\n private localStorage: Storage;\r\n private sessionStorage: Storage;\r\n private cacheStorage: Storage;\r\n\r\n static keyAccessToken = \"gms-auth-access-token\";\r\n static keyRefreshToken = \"gms-auth-refresh-token\";\r\n static keyRememberMe = \"gms-auth-remember-me\";\r\n static keyActiveProfile = \"gms-active-profile\";\r\n\r\n constructor() {\r\n this.initialise();\r\n }\r\n\r\n /**\r\n * Retrieves value from Local (Persistant) Storage if available, otherwise retrieves from Session (Transient) Storage.\r\n * If neither are available then a local cache is used.\r\n * @param key\r\n */\r\n getl(key: string): T {\r\n const storage = this.getStorage(\"l\");\r\n if (storage != null) {\r\n const obj = storage.getItem(key);\r\n return (JSON.parse(obj)) as T;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Stores value into Local (Persistant) Storage if available, otherwise stores to Session (Transient) Storage.\r\n * If neither are available then a local cache is used.\r\n * @param key\r\n */\r\n setl(key: string, value: T): any {\r\n const storage = this.getStorage(\"l\");\r\n if (storage != null) {\r\n return storage.setItem(key, JSON.stringify(value));\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Removes stored value from Local (Persistant) Storage if available, otherwise removes from Session (Transient) Storage.\r\n * If neither are available then a local cache is used.\r\n * @param key\r\n */\r\n removel(key: string): any {\r\n const storage = this.getStorage(\"l\");\r\n if (storage != null) {\r\n storage.removeItem(key);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Retrieves value from Session (Transient) Storage.\r\n * If not available then a local cache is used.\r\n * @param key\r\n */\r\n gets(key: string): T {\r\n const storage = this.getStorage(\"s\");\r\n if (storage != null) {\r\n const obj = storage.getItem(key);\r\n return (JSON.parse(obj)) as T;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Stores value into Session (Transient) Storage.\r\n * If not available then a local cache is used.\r\n * @param key\r\n */\r\n sets(key: string, value: T): any {\r\n const storage = this.getStorage(\"s\");\r\n if (storage != null) {\r\n return storage.setItem(key, JSON.stringify(value));\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Removes stored value from Session (Transient) Storage.\r\n * If not available then a local cache is used.\r\n * @param key\r\n */\r\n removes(key: string): any {\r\n const storage = this.getStorage(\"s\");\r\n if (storage != null) {\r\n storage.removeItem(key);\r\n }\r\n return null;\r\n }\r\n\r\n private getStorage(type: string): Storage {\r\n switch (type) {\r\n case \"l\":\r\n if (this.localStorage != null) {\r\n return this.localStorage;\r\n } else if (this.sessionStorage != null) {\r\n return this.sessionStorage;\r\n } else {\r\n return this.cacheStorage;\r\n }\r\n\r\n case \"s\":\r\n if (this.sessionStorage != null) {\r\n return this.sessionStorage;\r\n } else {\r\n return this.cacheStorage;\r\n }\r\n\r\n default:\r\n return undefined;\r\n }\r\n }\r\n\r\n private initialise(): void {\r\n this.localStorage = null;\r\n this.sessionStorage = null;\r\n this.cacheStorage = null;\r\n\r\n if (\"localStorage\" in window && window.localStorage !== null) {\r\n this.localStorage = window.localStorage;\r\n }\r\n if (\"sessionStorage\" in window && window.sessionStorage !== null) {\r\n this.sessionStorage = window.sessionStorage;\r\n }\r\n\r\n if (this.localStorage == null && this.sessionStorage == null) {\r\n this.cacheStorage = new CacheStore();\r\n }\r\n }\r\n}\r\n\r\ninterface ICacheItem {\r\n key: string;\r\n value: string;\r\n}\r\n\r\nclass CacheStore implements Storage {\r\n\r\n private cache: ICacheItem[];\r\n\r\n constructor () {\r\n this.cache = [];\r\n }\r\n\r\n [index: number]: string;\r\n\r\n clear (): void {\r\n this.cache.splice(0, this.cache.length);\r\n }\r\n\r\n getItem (key: string): any {\r\n const obj = this.cache.find((item: ICacheItem): boolean => {\r\n return item.key === key;\r\n });\r\n\r\n if (obj != null) {\r\n return obj.value;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n key(index: number): string {\r\n if (index < this.cache.length - 1) {\r\n return this.cache[index].key;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n removeItem (key: string): void {\r\n const idx = this.cache.findIndex((item: ICacheItem): boolean => {\r\n return item.key === key;\r\n });\r\n\r\n if (idx != null) {\r\n this.cache.splice(idx, 1);\r\n }\r\n }\r\n\r\n setItem (key: string, data: string): void {\r\n const obj = this.cache.find((item: ICacheItem): boolean => {\r\n return item.key === key;\r\n });\r\n\r\n if (obj != null) {\r\n obj.value = data;\r\n } else {\r\n this.cache.push({ key: key, value: data });\r\n }\r\n }\r\n\r\n get length (): number {\r\n return this.cache.length;\r\n }\r\n}\r\n","import { autoinject } from 'aurelia-framework';\r\n\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { IFileService } from 'shared/interfaces/ifile-service';\r\n\r\n@autoinject\r\nexport class FileService implements IFileService {\r\n constructor(private requestHandler: RequestHandler) {\r\n }\r\n\r\n uploadFile(file: File): Promise {\r\n var formData = new FormData();\r\n formData.append('file', file);\r\n return this.requestHandler.processRequest({\r\n url: 'file',\r\n options: {\r\n method: \"post\",\r\n body: formData\r\n }\r\n });\r\n }\r\n\r\n deleteFile(guid: string): Promise {\r\n // return this.requestHandler.delete(`file/${guid}`);\r\n return this.requestHandler.delete(`file/${guid}`);\r\n }\r\n}","import { BindingEngine, Disposable } from \"aurelia-binding\";\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { inject } from \"aurelia-dependency-injection\";\r\nimport * as moment from \"moment\";\r\nimport { StepVisibilityChannelName, SectionVisibilityChannelName, QuestionVisibilityChannelName } from \"./form-utils\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Rules } from \"aurelia-validation\";\r\n\r\n// this needs a factory, so only inject the aurelia stuff, the rest is provided later\r\n\r\ninterface QuestionTemplateInfo {\r\n sectionRepeatable: boolean;\r\n question: SharedDto.OnlineForm.Form.IQuestionDto\r\n}\r\n\r\ninterface QuestionAndSection {\r\n sectionIndex: number;\r\n question: SharedDto.OnlineForm.Application.IAnswerDto;\r\n}\r\n\r\n@inject(BindingEngine, EventAggregator)\r\nexport class FormDependencyService implements Disposable {\r\n\r\n private questionsWatchers: Disposable[] = [];\r\n private questionCriteria: DependencyCriteria[] = [];\r\n\r\n constructor(\r\n private bindingEngine: BindingEngine,\r\n private eventAggregator: EventAggregator,\r\n private formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto,\r\n private dependencyRule: SharedDto.OnlineForm.Form.IDependencyDto,\r\n private questionTemplates: QuestionTemplateInfo[],\r\n private formControlId: number) {\r\n\r\n\r\n //This needs to be done before SetupObservers() as it uses this string when events need to be sent. \r\n\r\n this.dependencyRule.criteria.forEach(criteria => {\r\n let questionTemplateInfo = this.FindQuestionTemplate(criteria.formQuestionId);\r\n if (questionTemplateInfo.sectionRepeatable) {\r\n if (!this.CriteriaAndDependantInSameSection(criteria.formQuestionId, this.dependencyRule.formQuestionId)) {\r\n return;\r\n }\r\n else {\r\n\r\n }\r\n }\r\n var questions = this.FindQuestions(criteria.formQuestionId);\r\n for (var question of questions) {\r\n this.questionCriteria.push(\r\n new DependencyCriteria(question.question, criteria, questionTemplateInfo.question.questionType, question.sectionIndex)\r\n );\r\n }\r\n });\r\n\r\n this.SetupObservers();\r\n }\r\n\r\n dispose(): void {\r\n while (this.questionsWatchers.length > 0) {\r\n this.questionsWatchers.pop().dispose();\r\n }\r\n }\r\n\r\n RunRule(channelName: string) { \r\n var evalResult = this.EvalRule(channelName);\r\n if (evalResult == true) {\r\n this.eventAggregator.publish(channelName, this.dependencyRule.visible);\r\n }\r\n else {\r\n this.eventAggregator.publish(channelName, !this.dependencyRule.visible);\r\n }\r\n }\r\n\r\n private SetupObservers() { \r\n this.dependencyRule.criteria.forEach(criteria => {\r\n var questions = this.FindQuestions(criteria.formQuestionId);\r\n var questionTemplate = this.FindQuestionTemplate(criteria.formQuestionId);\r\n for (var question of questions) {\r\n let channelName = this.GetEventChannelName(questionTemplate.sectionRepeatable ? question.sectionIndex : null);\r\n switch (questionTemplate.question.questionType) {\r\n case SharedDto.Constants.QuestionType.YesNoToggle:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.Money:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.Number:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.Decimal:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.RadioButton:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName);\r\n break;\r\n case SharedDto.Constants.QuestionType.SingleSelectList:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.CheckBoxList:\r\n this.CreateQuestionWatcher(question.question, \"selectedOptionItemIds\", channelName);\r\n // seems weird right? should be the same as below but the way the checkbox-list custom element is built,\r\n // it replaces the property rather than adds to the collection - so we need to watch the property.\r\n break;\r\n case SharedDto.Constants.QuestionType.MultiSelectList:\r\n this.CreateQuestionWatcherCollection((question.question as SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto).selectedOptionItemIds, channelName)\r\n break;\r\n case SharedDto.Constants.QuestionType.Date:\r\n this.CreateQuestionWatcher(question.question, \"answer\", channelName)\r\n break;\r\n default:\r\n throw new Error('Question type of ' + questionTemplate.question.questionType + 'is now allowed in SetupObservers');\r\n }\r\n }\r\n });\r\n }\r\n\r\n private CreateQuestionWatcher(question: SharedDto.OnlineForm.Application.IAnswerDto, propertyName: string, channelName: string) {\r\n var watcher = this.bindingEngine\r\n .propertyObserver(question, propertyName)\r\n .subscribe(() => {\r\n this.RunRule(channelName);\r\n });\r\n this.questionsWatchers.push(watcher);\r\n }\r\n\r\n private CreateQuestionWatcherCollection(collection: any[], channelName: string) {\r\n var watcher = this.bindingEngine\r\n .collectionObserver(collection)\r\n .subscribe(() => {\r\n this.RunRule(channelName);\r\n });\r\n this.questionsWatchers.push(watcher);\r\n }\r\n\r\n private GetEventChannelName(sectionId: number = null): string {\r\n if (this.dependencyRule.formStepId) {\r\n return StepVisibilityChannelName(this.formControlId, this.dependencyRule.formStepId);\r\n }\r\n if (this.dependencyRule.formSectionId) {\r\n return SectionVisibilityChannelName(this.formControlId, this.dependencyRule.formSectionId);\r\n }\r\n if (this.dependencyRule.formQuestionId) {\r\n return QuestionVisibilityChannelName(this.formControlId, this.dependencyRule.formQuestionId, sectionId);\r\n }\r\n throw new Error('Could not get online forms message channel name.');\r\n }\r\n\r\n private FindQuestion(questionId: number): SharedDto.OnlineForm.Application.IAnswerDto {\r\n for (var step of this.formInstance.steps) {\r\n for (var sectionGroup of step.sectionGroups) {\r\n if (sectionGroup.sections.length > 1) {\r\n //Rules are not allowed in repeating sections.\r\n // they will be, but not now. \r\n // also if this is a break they're apparently not allowed in a step AFTER a repeating section\r\n // which seems silly, so lets continue instead.\r\n // they are now but this is staying here because who knows what will break if i remove it\r\n continue;\r\n }\r\n for (var questionIndex = 0; questionIndex < sectionGroup.sections[0].questionGroups.length; questionIndex++) {\r\n var questionGroup = sectionGroup.sections[0].questionGroups[questionIndex];\r\n if (questionGroup.templateQuestionId == questionId) {\r\n return questionGroup.questions[0];\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private FindQuestions(questionId: number): QuestionAndSection[] {\r\n var ret: QuestionAndSection[] = [];\r\n for (var step of this.formInstance.steps) {\r\n for (var sectionGroup of step.sectionGroups) {\r\n for (var i = 0; i < sectionGroup.sections.length; i++) {\r\n let section = sectionGroup.sections[i];\r\n for (var questionIndex = 0; questionIndex < section.questionGroups.length; questionIndex++) {\r\n var questionGroup = section.questionGroups[questionIndex];\r\n if (questionGroup.templateQuestionId == questionId) {\r\n ret.push({ sectionIndex: i, question: questionGroup.questions[0] })\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n\r\n\r\n private CriteriaAndDependantInSameSection(criteriaId: number, dependencyId: number) {\r\n let criteria = this.FindQuestionTemplate(criteriaId).question;\r\n let dependency = this.FindQuestionTemplate(dependencyId).question;\r\n\r\n return criteria.sectionId == dependency.sectionId;\r\n }\r\n\r\n private FindQuestionTemplate(questionId: number): QuestionTemplateInfo {\r\n return this.questionTemplates.find((question: QuestionTemplateInfo): boolean => {\r\n return question.question.questionId == questionId;\r\n });\r\n }\r\n\r\n private EvalRule(channelName: string): boolean {\r\n for (var cIndex = 0; cIndex < this.questionCriteria.length; cIndex++) {\r\n let template = this.FindQuestionTemplate(this.dependencyRule.formQuestionId);\r\n let criteriaChannelName: string = null;\r\n if (template && template.sectionRepeatable) {\r\n criteriaChannelName = this.GetEventChannelName(this.questionCriteria[cIndex].sectionIndex)\r\n }\r\n else {\r\n criteriaChannelName = this.GetEventChannelName();\r\n }\r\n if (criteriaChannelName != channelName) {\r\n continue;\r\n }\r\n\r\n var evalResult = this.questionCriteria[cIndex].Eval();\r\n\r\n switch (this.dependencyRule.logicOperator) {\r\n case SharedDto.Constants.LogicalOperator.And:\r\n //first false we return false\r\n if (evalResult == false) {\r\n return false;\r\n }\r\n break;\r\n case SharedDto.Constants.LogicalOperator.Or:\r\n //First true result we can return true.\r\n if (evalResult == true) {\r\n return true;\r\n }\r\n break;\r\n default:\r\n throw new Error('Logical operator ' + this.dependencyRule.logicOperator + 'is not supported');\r\n }\r\n }\r\n\r\n switch (this.dependencyRule.logicOperator) {\r\n case SharedDto.Constants.LogicalOperator.And:\r\n //all the rules matched.\r\n return true;\r\n case SharedDto.Constants.LogicalOperator.Or:\r\n //No rules matched\r\n return false;\r\n default:\r\n throw new Error('Logical operator ' + this.dependencyRule.logicOperator + 'is not supported');\r\n }\r\n }\r\n}\r\n\r\nclass DependencyCriteria implements Disposable {\r\n\r\n\r\n constructor(private question: SharedDto.OnlineForm.Application.IAnswerDto,\r\n private criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto,\r\n private questionType: SharedDto.Constants.QuestionType,\r\n public sectionIndex: number) {\r\n\r\n if (!question) {\r\n throw new Error('Question could not be found');\r\n }\r\n\r\n if (question.templateQuestionId != criteria.formQuestionId) {\r\n throw new Error('QuestionGroup found has the wrong template question id');\r\n }\r\n }\r\n\r\n dispose(): void {\r\n this.question = null;\r\n this.criteria = null;\r\n this.questionType = null;\r\n }\r\n\r\n public Eval(): boolean {\r\n switch (this.questionType) {\r\n case SharedDto.Constants.QuestionType.YesNoToggle:\r\n return this.EvalYesNoQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.Money:\r\n return this.EvalDecimalQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.Decimal:\r\n return this.EvalDecimalQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.Number:\r\n return this.EvalNumberQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.SingleSelectList:\r\n case SharedDto.Constants.QuestionType.RadioButton:\r\n return this.EvalSingleSelectQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.CheckBoxList:\r\n case SharedDto.Constants.QuestionType.MultiSelectList:\r\n return this.EvalMultiSelectQuestion(this.question, this.criteria);\r\n case SharedDto.Constants.QuestionType.Date:\r\n return this.EvalDateQuestion(this.question, this.criteria);\r\n default:\r\n throw new Error('Question Type ' + this.questionType + ' is not implemented yet for EvalRule()');\r\n }\r\n }\r\n\r\n\r\n private EvalSingleSelectQuestion(questionInstance: SharedDto.OnlineForm.Application.ISingleSelectListAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n var valueToCheckAgainst: number;\r\n if (criteria.optionItemId) {\r\n valueToCheckAgainst = criteria.optionItemId;\r\n }\r\n\r\n if (criteria.codeItemId) {\r\n valueToCheckAgainst = criteria.codeItemId;\r\n }\r\n\r\n if (valueToCheckAgainst) {\r\n switch (criteria.criteriaOperation) {\r\n\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n return questionInstance.answer == valueToCheckAgainst.toString();\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a SingleSelectListQuestion question.');\r\n }\r\n }\r\n }\r\n\r\n private EvalMultiSelectQuestion(questionInstance: SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n var valueToCheckAgainst: number;\r\n if (criteria.optionItemId) {\r\n valueToCheckAgainst = criteria.optionItemId;\r\n }\r\n\r\n if (criteria.codeItemId) {\r\n valueToCheckAgainst = criteria.codeItemId;\r\n }\r\n\r\n if (valueToCheckAgainst) {\r\n switch (criteria.criteriaOperation) {\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n //return questionInstance.selectedOptionItemIds.includes(valueToCheckAgainst);\r\n return questionInstance.selectedOptionItemIds.find(so => so == valueToCheckAgainst.toString()) != undefined;\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a MultiSelectListQuestion question.');\r\n }\r\n }\r\n }\r\n\r\n private EvalYesNoQuestion(questionInstance: SharedDto.OnlineForm.Application.IYesNoAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n switch (criteria.criteriaOperation) {\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n return questionInstance.answer == criteria.boolValue;\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a YesNo question.');\r\n }\r\n }\r\n\r\n private EvalDecimalQuestion(questionInstance: SharedDto.OnlineForm.Application.IDecimalAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n switch (criteria.criteriaOperation) {\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n return questionInstance.answer == criteria.decimalValue;\r\n case SharedDto.Constants.CriteriaOperation.GreaterThan:\r\n return questionInstance.answer > criteria.decimalValue;\r\n case SharedDto.Constants.CriteriaOperation.LessThan:\r\n return questionInstance.answer < criteria.decimalValue;\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a Decimal question.');\r\n }\r\n }\r\n\r\n private EvalDateQuestion(questionInstance: SharedDto.OnlineForm.Application.IDateAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n let questionDate = moment(questionInstance.answer);\r\n if (questionDate.isValid()) {\r\n let criteriaDate = moment(criteria.dateValue);\r\n switch (criteria.criteriaOperation) {\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n return questionDate.isSame(criteriaDate, 'day');\r\n case SharedDto.Constants.CriteriaOperation.GreaterThan:\r\n return questionDate.isAfter(criteriaDate, 'day');\r\n case SharedDto.Constants.CriteriaOperation.LessThan:\r\n return questionDate.isBefore(criteriaDate, 'day');\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a Decimal question.');\r\n }\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n private EvalNumberQuestion(questionInstance: SharedDto.OnlineForm.Application.INumberAnswerDto, criteria: SharedDto.OnlineForm.Form.IDependencyCriteriaDto): boolean {\r\n switch (criteria.criteriaOperation) {\r\n case SharedDto.Constants.CriteriaOperation.Equals:\r\n return questionInstance.answer == criteria.numberValue;\r\n case SharedDto.Constants.CriteriaOperation.GreaterThan:\r\n return questionInstance.answer > criteria.numberValue;\r\n case SharedDto.Constants.CriteriaOperation.LessThan:\r\n return questionInstance.answer < criteria.numberValue;\r\n default:\r\n throw new Error('Operation ' + criteria.criteriaOperation + 'is not allowed for a Number question.');\r\n }\r\n }\r\n}\r\n","export class Message {\r\n constructor(public message: string, public type: MessageType) { }\r\n}\r\n\r\nexport enum MessageType {\r\n Success,\r\n Info,\r\n Warning,\r\n Error\r\n}\r\n\r\nexport class Messages {\r\n\r\n static get recordUpdatedSuccess(): Message {\r\n return new Message(\"Record successfully updated.\", MessageType.Success);\r\n }\r\n\r\n static get recordCreatedSuccess(): Message {\r\n return new Message(\"Record created successfully.\", MessageType.Success);\r\n }\r\n\r\n static get recordDeletedSuccess(): Message {\r\n return new Message(\"Record successfully deleted.\", MessageType.Success);\r\n }\r\n\r\n static get unableToUpdate(): Message {\r\n return new Message(\"Unable to update record.\", MessageType.Error);\r\n }\r\n\r\n static get validationHasErrors(): Message {\r\n return new Message(\"There were errors validating this form. Please correct any errors and try again.\", MessageType.Error);\r\n }\r\n\r\n static get serverError(): Message {\r\n return new Message(\"An unexpected error has occurred.\", MessageType.Error);\r\n }\r\n\r\n static get downloadFailed(): Message {\r\n return new Message(\"The request to download the document failed.\", MessageType.Error);\r\n }\r\n\r\n // TODO: Make sure this isn't used anywhere before the end arrives :)\r\n static get notImplementedYet(): Message {\r\n return new Message(\"Not implemented yet...\", MessageType.Info);\r\n }\r\n \r\n}\r\n","//used for listing all constants of broad cast events\r\nexport class BroadcastEvents {\r\n static loginStateChanged = \"login-state-changed\";\r\n \r\n static profileChanged = \"profile-changed\";//for logic of profile swapping\r\n static profileRefreshed = \"profile-refreshed\";//for views to re-render\r\n static profileDataChanged = \"profile-data-changed\";//for sub components to let others know they've updated details stored in profiles\r\n\r\n static voucherDataChanged = \"voucher-data-changed\";//for sub components to let others know they've updated details stored in profiles\r\n}\r\n","//implements insert on the string prototype.\r\nString.prototype.insert = function (index, string) {\r\n if (index > 0)\r\n return this.substring(0, index) + string + this.substring(index, this.length);\r\n else\r\n return string + this;\r\n};","var map = {\n\t\"./af\": 99,\n\t\"./af.js\": 99,\n\t\"./ar\": 100,\n\t\"./ar-dz\": 101,\n\t\"./ar-dz.js\": 101,\n\t\"./ar-kw\": 102,\n\t\"./ar-kw.js\": 102,\n\t\"./ar-ly\": 103,\n\t\"./ar-ly.js\": 103,\n\t\"./ar-ma\": 104,\n\t\"./ar-ma.js\": 104,\n\t\"./ar-sa\": 105,\n\t\"./ar-sa.js\": 105,\n\t\"./ar-tn\": 106,\n\t\"./ar-tn.js\": 106,\n\t\"./ar.js\": 100,\n\t\"./az\": 107,\n\t\"./az.js\": 107,\n\t\"./be\": 108,\n\t\"./be.js\": 108,\n\t\"./bg\": 109,\n\t\"./bg.js\": 109,\n\t\"./bn\": 110,\n\t\"./bn.js\": 110,\n\t\"./bo\": 111,\n\t\"./bo.js\": 111,\n\t\"./br\": 112,\n\t\"./br.js\": 112,\n\t\"./bs\": 113,\n\t\"./bs.js\": 113,\n\t\"./ca\": 114,\n\t\"./ca.js\": 114,\n\t\"./cs\": 115,\n\t\"./cs.js\": 115,\n\t\"./cv\": 116,\n\t\"./cv.js\": 116,\n\t\"./cy\": 117,\n\t\"./cy.js\": 117,\n\t\"./da\": 118,\n\t\"./da.js\": 118,\n\t\"./de\": 119,\n\t\"./de-at\": 120,\n\t\"./de-at.js\": 120,\n\t\"./de-ch\": 121,\n\t\"./de-ch.js\": 121,\n\t\"./de.js\": 119,\n\t\"./dv\": 122,\n\t\"./dv.js\": 122,\n\t\"./el\": 123,\n\t\"./el.js\": 123,\n\t\"./en-au\": 124,\n\t\"./en-au.js\": 124,\n\t\"./en-ca\": 125,\n\t\"./en-ca.js\": 125,\n\t\"./en-gb\": 126,\n\t\"./en-gb.js\": 126,\n\t\"./en-ie\": 127,\n\t\"./en-ie.js\": 127,\n\t\"./en-nz\": 128,\n\t\"./en-nz.js\": 128,\n\t\"./eo\": 129,\n\t\"./eo.js\": 129,\n\t\"./es\": 130,\n\t\"./es-do\": 131,\n\t\"./es-do.js\": 131,\n\t\"./es.js\": 130,\n\t\"./et\": 132,\n\t\"./et.js\": 132,\n\t\"./eu\": 133,\n\t\"./eu.js\": 133,\n\t\"./fa\": 134,\n\t\"./fa.js\": 134,\n\t\"./fi\": 135,\n\t\"./fi.js\": 135,\n\t\"./fo\": 136,\n\t\"./fo.js\": 136,\n\t\"./fr\": 137,\n\t\"./fr-ca\": 138,\n\t\"./fr-ca.js\": 138,\n\t\"./fr-ch\": 139,\n\t\"./fr-ch.js\": 139,\n\t\"./fr.js\": 137,\n\t\"./fy\": 140,\n\t\"./fy.js\": 140,\n\t\"./gd\": 141,\n\t\"./gd.js\": 141,\n\t\"./gl\": 142,\n\t\"./gl.js\": 142,\n\t\"./gom-latn\": 143,\n\t\"./gom-latn.js\": 143,\n\t\"./he\": 144,\n\t\"./he.js\": 144,\n\t\"./hi\": 145,\n\t\"./hi.js\": 145,\n\t\"./hr\": 146,\n\t\"./hr.js\": 146,\n\t\"./hu\": 147,\n\t\"./hu.js\": 147,\n\t\"./hy-am\": 148,\n\t\"./hy-am.js\": 148,\n\t\"./id\": 149,\n\t\"./id.js\": 149,\n\t\"./is\": 150,\n\t\"./is.js\": 150,\n\t\"./it\": 151,\n\t\"./it.js\": 151,\n\t\"./ja\": 152,\n\t\"./ja.js\": 152,\n\t\"./jv\": 153,\n\t\"./jv.js\": 153,\n\t\"./ka\": 154,\n\t\"./ka.js\": 154,\n\t\"./kk\": 155,\n\t\"./kk.js\": 155,\n\t\"./km\": 156,\n\t\"./km.js\": 156,\n\t\"./kn\": 157,\n\t\"./kn.js\": 157,\n\t\"./ko\": 158,\n\t\"./ko.js\": 158,\n\t\"./ky\": 159,\n\t\"./ky.js\": 159,\n\t\"./lb\": 160,\n\t\"./lb.js\": 160,\n\t\"./lo\": 161,\n\t\"./lo.js\": 161,\n\t\"./lt\": 162,\n\t\"./lt.js\": 162,\n\t\"./lv\": 163,\n\t\"./lv.js\": 163,\n\t\"./me\": 164,\n\t\"./me.js\": 164,\n\t\"./mi\": 165,\n\t\"./mi.js\": 165,\n\t\"./mk\": 166,\n\t\"./mk.js\": 166,\n\t\"./ml\": 167,\n\t\"./ml.js\": 167,\n\t\"./mr\": 168,\n\t\"./mr.js\": 168,\n\t\"./ms\": 169,\n\t\"./ms-my\": 170,\n\t\"./ms-my.js\": 170,\n\t\"./ms.js\": 169,\n\t\"./my\": 171,\n\t\"./my.js\": 171,\n\t\"./nb\": 172,\n\t\"./nb.js\": 172,\n\t\"./ne\": 173,\n\t\"./ne.js\": 173,\n\t\"./nl\": 174,\n\t\"./nl-be\": 175,\n\t\"./nl-be.js\": 175,\n\t\"./nl.js\": 174,\n\t\"./nn\": 176,\n\t\"./nn.js\": 176,\n\t\"./pa-in\": 177,\n\t\"./pa-in.js\": 177,\n\t\"./pl\": 178,\n\t\"./pl.js\": 178,\n\t\"./pt\": 179,\n\t\"./pt-br\": 180,\n\t\"./pt-br.js\": 180,\n\t\"./pt.js\": 179,\n\t\"./ro\": 181,\n\t\"./ro.js\": 181,\n\t\"./ru\": 182,\n\t\"./ru.js\": 182,\n\t\"./sd\": 183,\n\t\"./sd.js\": 183,\n\t\"./se\": 184,\n\t\"./se.js\": 184,\n\t\"./si\": 185,\n\t\"./si.js\": 185,\n\t\"./sk\": 186,\n\t\"./sk.js\": 186,\n\t\"./sl\": 187,\n\t\"./sl.js\": 187,\n\t\"./sq\": 188,\n\t\"./sq.js\": 188,\n\t\"./sr\": 189,\n\t\"./sr-cyrl\": 190,\n\t\"./sr-cyrl.js\": 190,\n\t\"./sr.js\": 189,\n\t\"./ss\": 191,\n\t\"./ss.js\": 191,\n\t\"./sv\": 192,\n\t\"./sv.js\": 192,\n\t\"./sw\": 193,\n\t\"./sw.js\": 193,\n\t\"./ta\": 194,\n\t\"./ta.js\": 194,\n\t\"./te\": 195,\n\t\"./te.js\": 195,\n\t\"./tet\": 196,\n\t\"./tet.js\": 196,\n\t\"./th\": 197,\n\t\"./th.js\": 197,\n\t\"./tl-ph\": 198,\n\t\"./tl-ph.js\": 198,\n\t\"./tlh\": 199,\n\t\"./tlh.js\": 199,\n\t\"./tr\": 200,\n\t\"./tr.js\": 200,\n\t\"./tzl\": 201,\n\t\"./tzl.js\": 201,\n\t\"./tzm\": 202,\n\t\"./tzm-latn\": 203,\n\t\"./tzm-latn.js\": 203,\n\t\"./tzm.js\": 202,\n\t\"./uk\": 204,\n\t\"./uk.js\": 204,\n\t\"./ur\": 205,\n\t\"./ur.js\": 205,\n\t\"./uz\": 206,\n\t\"./uz-latn\": 207,\n\t\"./uz-latn.js\": 207,\n\t\"./uz.js\": 206,\n\t\"./vi\": 208,\n\t\"./vi.js\": 208,\n\t\"./x-pseudo\": 209,\n\t\"./x-pseudo.js\": 209,\n\t\"./yo\": 210,\n\t\"./yo.js\": 210,\n\t\"./zh-cn\": 211,\n\t\"./zh-cn.js\": 211,\n\t\"./zh-hk\": 212,\n\t\"./zh-hk.js\": 212,\n\t\"./zh-tw\": 213,\n\t\"./zh-tw.js\": 213\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 247;","module.exports = __webpack_public_path__ + \"assets/fonts/the-territory-logo-white.svg\";","import { autoinject } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Store } from 'utils/store';\r\nimport { BroadcastEvents } from \"models/broadcast-events\"\r\n\r\n@autoinject\r\nexport class AuthManager {\r\n\r\n constructor(private eventAggregator: EventAggregator,\r\n private store: Store) {\r\n }\r\n\r\n get isLoggedIn(): boolean {\r\n try {\r\n const rememberMe = this.store.getl(Store.keyRememberMe);\r\n if (rememberMe) {\r\n return (this.store.getl(Store.keyRefreshToken) || '') !== '';\r\n }\r\n return (this.store.gets(Store.keyAccessToken) || '') !== '';\r\n } catch (_) {\r\n this.clearAuthTokens();\r\n return false;\r\n }\r\n }\r\n\r\n get accessToken(): string {\r\n try {\r\n const accessToken = this.store.gets(Store.keyAccessToken);\r\n if (accessToken != null) {\r\n return accessToken;\r\n }\r\n return null;\r\n } catch (_) {\r\n this.clearAuthTokens();\r\n return null;\r\n }\r\n }\r\n\r\n set accessToken(value: string) {\r\n try {\r\n this.store.sets(Store.keyAccessToken, value);\r\n } catch (_) {\r\n this.clearAuthTokens();\r\n }\r\n }\r\n\r\n get refreshToken(): string {\r\n try {\r\n const rememberMe = this.store.getl(Store.keyRememberMe);\r\n let refreshToken: string;\r\n if (rememberMe) {\r\n refreshToken = this.store.getl(Store.keyRefreshToken);\r\n } else {\r\n refreshToken = this.store.gets(Store.keyRefreshToken);\r\n }\r\n if (refreshToken != null) {\r\n return refreshToken;\r\n }\r\n return null;\r\n } catch (_) {\r\n this.clearAuthTokens();\r\n return null;\r\n }\r\n }\r\n\r\n set refreshToken(value: string) {\r\n try {\r\n const rememberMe = this.store.getl(Store.keyRememberMe);\r\n if (rememberMe) {\r\n this.store.setl(Store.keyRefreshToken, value);\r\n } else {\r\n this.store.sets(Store.keyRefreshToken, value);\r\n }\r\n } catch (_) {\r\n this.clearAuthTokens();\r\n }\r\n }\r\n\r\n logout() {\r\n this.clearAuthTokens();\r\n this.eventAggregator.publish(BroadcastEvents.loginStateChanged);\r\n }\r\n\r\n login(payload: IAuthResponse) {\r\n this.refreshToken = payload.refresh_token;\r\n this.accessToken = payload.access_token;\r\n this.eventAggregator.publish(BroadcastEvents.loginStateChanged);\r\n }\r\n\r\n private clearAuthTokens() {\r\n this.store.removel(Store.keyRefreshToken);\r\n this.store.removel(Store.keyRememberMe);\r\n this.store.removes(Store.keyRefreshToken);\r\n this.store.removes(Store.keyAccessToken);\r\n }\r\n}\r\n","export class Config {\r\n static get appName(): string { return __APP_NAME__; }\r\n static get baseUrl(): string { return __APP_BASE_URL__; }\r\n static get clientId(): string { return \"extWebApp\"; }\r\n static get applicationVersion(): string { return ReleaseInfo.version; }\r\n}\r\n","import { autoinject } from \"aurelia-framework\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\nimport { base64toBlob } from \"shared/utils/base-64-to-blob\";\r\n\r\nlet FileSaver = require('file-saver');\r\n\r\n@autoinject\r\nexport class DownloadFileService {\r\n\r\n constructor(private requestHandler: RequestHandler) {\r\n }\r\n\r\n downloadFromBlob(file: SharedDto.IFileDto) {\r\n var blob = base64toBlob(file.fileContents, null);\r\n FileSaver.saveAs(blob, file.fileName);\r\n }\r\n\r\n async downloadFile(fileId: number) {\r\n let response = await this.requestHandler.get(`file/${fileId}/download`);\r\n return this.downloadFromBlob(response);\r\n }\r\n\r\n}","import { ControllerValidateResult } from \"aurelia-validation\";\r\n\r\n/** An error class used for passing around Aurelia validation failure messages/state */\r\nexport class ClientValidationError extends Error {\r\n constructor(public validationResult: ControllerValidateResult) {\r\n super(\"Client validation failed\");\r\n Object.setPrototypeOf(this, new.target.prototype);\r\n }\r\n}","import { DialogService } from \"aurelia-dialog\";\r\nimport { autoinject, singleton } from \"aurelia-dependency-injection\";\r\nimport { PLATFORM } from \"aurelia-pal\";\r\nimport { ConfirmModal } from \".//confirm-modal\";\r\n\r\nPLATFORM.moduleName(\"./confirm-modal\")\r\n\r\n@singleton()\r\n@autoinject\r\nexport class Confirm {\r\n\r\n constructor(private readonly dialogService: DialogService) {\r\n\r\n }\r\n\r\n confirm(message: string, title?: string, okButtonText?: string, cancelButtonText?: string, warnings?: string[]): Promise {\r\n return this.dialogService.open({\r\n viewModel: ConfirmModal,\r\n model: {\r\n message: message,\r\n title: title,\r\n okButtonText: okButtonText,\r\n cancelButtonText: cancelButtonText,\r\n warnings: warnings\r\n }\r\n }).whenClosed(result => {\r\n if (result.wasCancelled) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n \r\n continue(message: string) {\r\n return this.dialogService.open({\r\n viewModel: ConfirmModal,\r\n model: {\r\n message: message,\r\n title: null,\r\n okButtonText: \"Continue\",\r\n showCancel: false,\r\n }\r\n }).whenClosed(result => {\r\n if (result.wasCancelled) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n}","export class SharedBroadcastEvents {\r\n static allFilesSaved = 'all-files-saved';\r\n static downloadApplicationDocument = 'download-application-document';\r\n //used for textareas that dynamically grow to inspect themselves and adjust their height (calculatiaon requires being visible)\r\n static tabVisibilityChanged = 'tab-visibility-changed';\r\n static additionalInformationResquested = 'additional-information-requested';\r\n static additionalInformationDocumentDownload = 'additional-information-document-download';\r\n}\r\n","//rename this to form utils?\n\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\n\nexport function StepVisibilityChannelName(formId: number, id: number): string {\n return \"step-visibility-changed-\" + formId + \"-\" + id;\n}\nexport function SectionVisibilityChannelName(formId: number, id: number): string {\n return \"section-visibility-changed-\" + formId + \"-\" + id;\n}\nexport function QuestionVisibilityChannelName(formId: number, id: number, sectionIndex: number = null): string {\n let channel = \"question-visibility-changed-\" + formId + \"-\" + id;\n if (sectionIndex != null) {\n channel += '-' + sectionIndex;\n }\n return channel;\n}\n\nexport function findAnswerBySystemQuestion(formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto,\n formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto,\n systemQuestion: SharedDto.Constants.SystemQuestion)\n : SharedDto.OnlineForm.Application.IAnswerDto {\n\n let questionTempltes = formTemplate.steps.flatMap(x => x.sections).flatMap(x => x.questions);\n let questionTemplate = questionTempltes.find(x => x.systemQuestion === systemQuestion);\n if (questionTemplate == null) {\n return null;\n }\n let answers = formInstance.steps.flatMap(x => x.sectionGroups).flatMap(x => x.sections).flatMap(x => x.questionGroups).flatMap(x => x.questions);\n return answers.find(x => x.templateQuestionId == questionTemplate.questionId);\n}\n","import { autoinject, BindingEngine } from \"aurelia-framework\";\r\nimport { Disposable } from \"aurelia-binding\";\r\nimport debounce from 'debounce-promise';\r\n\r\n@autoinject\r\nexport class DeepObserver {\r\n\r\n private bindingEngine: BindingEngine;\r\n\r\n constructor(bindingEngine: BindingEngine) {\r\n this.bindingEngine = bindingEngine;\r\n }\r\n\r\n observeWithDebounce(target: Object, property: string, callback: (newValue: any, oldValue: any, name: string) => void, debouceMs: number = 100): Disposable {\r\n let debouncedCallback = debounce(callback, debouceMs);\r\n return this.observe(target, property, () => {\r\n debouncedCallback();\r\n });\r\n }\r\n\r\n observe(target: Object, property: string, callback: (newValue: any, oldValue: any, name: string) => void): Disposable {\r\n\r\n const subscriptions: { root: any, children: any[] } = { root: null, children: [] };\r\n\r\n subscriptions.root = (this.bindingEngine.propertyObserver(target, property).subscribe((newValue, oldValue) => callback(newValue, oldValue, name)));\r\n this.recurse(target, property, subscriptions.children, callback, property);\r\n\r\n return {\r\n dispose: () => {\r\n this.disconnect(subscriptions.children);\r\n subscriptions.root.dispose();\r\n }\r\n };\r\n }\r\n\r\n private disconnect(subscriptions) {\r\n while (subscriptions.length) {\r\n subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private recurse(target, property, subscriptions, callback, path) {\r\n let sub = target[property];\r\n\r\n if (typeof sub === \"object\") {\r\n for (let p in sub) {\r\n if (sub.hasOwnProperty(p)) {\r\n this.recurse(sub, p, subscriptions, callback, `${path}${sub instanceof Array ? \"[\" + p + \"]\" : \".\" + p}`);\r\n }\r\n }\r\n }\r\n\r\n if (sub instanceof Array) {\r\n subscriptions.push(this.bindingEngine.collectionObserver(sub).subscribe((changedRecords) => callback(null, null, path)));\r\n }\r\n\r\n if (target != property) {\r\n subscriptions.push(this.bindingEngine.propertyObserver(target, property).subscribe((n, o) => callback(n, o, path)));\r\n }\r\n }\r\n}\r\n","export class ValidationError extends Error {\r\n \r\n errors: string[];\r\n message: string;\r\n\r\n constructor(message?: string, validationErrors?: string[]) {\r\n super(message); // 'Error' breaks prototype chain here\r\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\r\n this.errors = validationErrors;\r\n this.message = message;\r\n }\r\n\r\n}","import { SharedDto } from \"project/project-shared\";\n\nexport function addressToSingleLineString(address: SharedDto.OnlineForm.Application.IAddressAnswerDto,\n states: SharedDto.ICodeListItemDto[], countries: SharedDto.ICodeListItemDto[]) {\n\n if (!address) {\n return \"\";\n }\n\n let result = address.line1;\n\n if (address.line2) {\n result += \", \" + address.line2;\n }\n\n if (address.suburb) {\n result += \", \" + address.suburb;\n }\n\n if (address.countryId) {\n let country = countries.find(x => x.id === address.countryId);\n if (country && country.code !== \"au\" && address.nonAustralianState) {\n result += \", \" + address.nonAustralianState;\n result += \", \" + country.description;\n }\n if (country && country.code === \"au\") {\n let state = states.find(x => x.id === address.australianStateTerritory);\n if (state) {\n result += \", \" + state.description;\n }\n result += \", \" + country.description;\n }\n }\n if (address.postCode) {\n result += \" \" + address.postCode;\n }\n\n return result;\n}\n\nexport function addressArrayToString(address: SharedDto.IAddressDto) {\n if (!address) {\n return \"\";\n }\n\n let result = address.line1;\n\n if (address.line2) {\n result += \", \" + address.line2;\n }\n\n if (address.suburb) {\n result += \", \" + address.suburb;\n }\n\n if (address.australianStateTerritoryDescription) {\n result += \", \" + address.australianStateTerritoryDescription;\n }\n\n if (address.countryDescription) {\n result += \" \" + address.countryDescription;\n }\n\n if (address.postcode) {\n result += \" \" + address.postcode;\n }\n\n return result;\n}\n","import { autoinject } from \"aurelia-framework\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { Config } from \"config/config\";\r\nimport { Logger } from \"aurelia-logging\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\n\r\n@autoinject\r\nexport class AssessmentService {\r\n\r\n constructor(private readonly requestHandler: RequestHandler,\r\n private readonly downloadFileService: DownloadFileService,\r\n private readonly logger: Logger) { }\r\n\r\n searchAssessments(request: Dto.Assessment.IApplicationAssessmentSearchFilterDto):\r\n Promise> {\r\n\r\n return this.requestHandler.post(`assessment/search`, request);\r\n }\r\n\r\n getAssessment(assessmentCheckId: number): Promise {\r\n return this.requestHandler.get(`assessment/${assessmentCheckId}`);\r\n }\r\n\r\n saveAssessment(assessmentCheckId: number, request: Dto.Assessment.IAssessmentCheckResponseUpdateDto, submit: boolean): Promise {\r\n return this.requestHandler.post(`assessment/${assessmentCheckId}${submit ? '/submit' : ''}`, request);\r\n }\r\n\r\n conflictOfInterest(assessmentCheckId: number, comment: string): Promise {\r\n return this.requestHandler.post(`assessment/${assessmentCheckId}/conflict`, comment);\r\n }\r\n\r\n downloadHelpDocument(assessmentCheckId: number, fileId: number): void {\r\n this.requestHandler.get(`assessment/${assessmentCheckId}/help-document/${fileId}`).then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n this.logger.error(error);\r\n });\r\n }\r\n\r\n downloadFundingRecomendationAttachment(assessmentCheckId: number): void {\r\n this.requestHandler.get(`assessment/${assessmentCheckId}/funding-recommendation-document`).then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n this.logger.error(error);\r\n });\r\n }\r\n\r\n downloadNumericResponseAttachment(assessmentCheckId: number, numericResponseId: number): void {\r\n this.requestHandler.get(`assessment/${assessmentCheckId}/numeric-question/${numericResponseId}/attachment`).then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n this.logger.error(error);\r\n });\r\n }\r\n\r\n downloadQAResponseAttachment(assessmentCheckId: number, qaResponseId: number): void {\r\n this.requestHandler.get(`assessment/${assessmentCheckId}/question-answer-question/${qaResponseId}/attachment`).then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n this.logger.error(error);\r\n });\r\n }\r\n}","import { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from 'services/data-service';\r\nimport { OnlineFormService } from 'services/online-form-service';\r\nimport { autoinject } from \"aurelia-framework\";\r\nimport { Logger } from \"../../../../../node_modules/aurelia-logging\";\r\nimport { Dto } from \"project/project\";\r\n\r\n@autoinject\r\nexport class CodeListService {\r\n\r\n constructor(private readonly dataService: DataService,\r\n private readonly logger: Logger,\r\n private readonly onlineFormService: OnlineFormService) {\r\n }\r\n\r\n public getDataList(questionId: number, codeListType: SharedDto.Constants.QuestionCodeListType, sortAlphabeticallyRule: boolean): Promise {\r\n switch (codeListType) {\r\n case SharedDto.Constants.QuestionCodeListType.OptionItems:\r\n return this.getOptionItemList(questionId, sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.Title:\r\n return this.getTitlelist(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.DurationInNT:\r\n return this.getDurationsInNt(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.OrganisationContactRole:\r\n return this.getOrganisationContactRoles(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.LegalEntityType:\r\n return this.getLegalEntityTypes(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.BusinessActivityCategory:\r\n return this.getBusinessCategories(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.BusinessActivityCategoryMoreSpecific:\r\n return this.getBusinessCategoriesMoreSpecific(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.Beneficiary:\r\n return this.getBeneficiaries(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.ApplicationContactRole:\r\n return this.getApplicationContactRoles(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.Schools:\r\n return this.getSchools(sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.Suppliers:\r\n return this.getSuppliers(questionId, sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.SupplierCategories:\r\n return this.getSupplierCategories(questionId, sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.SupplierLocations:\r\n return this.getSupplierLocations(questionId, sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.RoundVouchers:\r\n return this.getRoundVouchers(questionId, sortAlphabeticallyRule).then(this.mapForeignKeyList);\r\n case SharedDto.Constants.QuestionCodeListType.ReviewOutcomes:\r\n // we don't want to return 'Skip Step' as a selectable option in a question.\r\n return this.getReviewOutcomes(questionId, sortAlphabeticallyRule)\r\n .then(x => x.filter(y => y.id != Dto.Constants.ReviewOutcomeResult.SkipStep))\r\n .then(this.mapEnumList);\r\n case SharedDto.Constants.QuestionCodeListType.EligibilityOutcomes:\r\n // we don't want to return 'Skip Step' as a selectable option in a question.\r\n return this.getEligibilityOutcomes(questionId, sortAlphabeticallyRule)\r\n .then(x => x.filter(y => y.id != Dto.Constants.EligibilityOutcome.SkipStep))\r\n .then(this.mapEnumList);\r\n default:\r\n let error = new Error(\"Code list not implemented in form controls!\");\r\n this.logger.error(error as any);\r\n throw error;\r\n }\r\n }\r\n\r\n\r\n private mapForeignKeyList(list: SharedDto.ICodeListItemDto[]): FormOption[] {\r\n return list.map(x => {\r\n return {\r\n value: x.id.toString(),\r\n description: x.description,\r\n active: x.active,\r\n }\r\n });\r\n }\r\n\r\n private mapEnumList(list: SharedDto.ICodeListItemDto[]): FormOption[] {\r\n return list.map(x => {\r\n return {\r\n value: x.code,\r\n description: x.description,\r\n active: x.active\r\n }\r\n });\r\n }\r\n\r\n private getOptionItemList(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.onlineFormService.getOptionItems(questionId).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n else {\r\n data = data.sort((a, b) => a.sortOrder - b.sortOrder);\r\n }\r\n return data.map((code) => {\r\n let c = {} as SharedDto.ICodeListItemDto;\r\n c.id = code.optionItemId;\r\n c.description = code.description;\r\n c.active = true;\r\n return c;\r\n })\r\n });\r\n }\r\n\r\n private getRoundVouchers(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getRoundVouchersByQuestion(questionId).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getReviewOutcomes(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getReviewOutcomes().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getEligibilityOutcomes(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getEligibilityOutcomes().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getSupplierCategories(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getSupplierCategories(questionId).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getSupplierLocations(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getSupplierLocations(questionId).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getSuppliers(questionId: number, sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getSuppliers(questionId, false).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getTitlelist(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getTitles().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getBeneficiaries(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getBeneficiariesTopLevel().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n public getSchools(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getSchools().then(data => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getDurationsInNt(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getDurationsOperatingInNt().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getOrganisationContactRoles(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getOrganisationContactRoles().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getLegalEntityTypes(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getLegalEntities().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getBusinessCategories(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getCategoryByLevel(1).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n private getBusinessCategoriesMoreSpecific(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getCategoryByLevel(2).then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n\r\n public getApplicationContactRoles(sortAlphabeticallyRule: boolean): Promise {\r\n return this.dataService.getApplicationContactRoles().then((data) => {\r\n if (sortAlphabeticallyRule) {\r\n data = data.sort((a, b) => {\r\n if (a.description < b.description) return -1;\r\n if (a.description > b.description) return 1;\r\n return 0;\r\n });\r\n }\r\n return data;\r\n });\r\n }\r\n}\r\n\r\nexport interface FormOption {\r\n value: string;\r\n description: string;\r\n active: boolean;\r\n}\r\n","import { autoinject } from \"aurelia-framework\";\r\n\r\nimport { IApplicationFormService } from \"shared/interfaces/iapplication-form-service\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { Dto } from \"project/project\";\r\nimport { OrganisationDocumentService } from \"services/organisation-document-service\";\r\n\r\nimport { Config } from \"config/config\";\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n/**\r\n * An external-website implementation of application-wide functions\r\n */\r\n@autoinject\r\nexport class ApplicationFormService implements IApplicationFormService {\r\n private individual: boolean = null;\r\n private preview: boolean = false;\r\n\r\n constructor(\r\n private readonly profileService: ProfileService,\r\n private readonly organisationDocumentService: OrganisationDocumentService,\r\n private readonly requestHandler: RequestHandler) {\r\n\r\n }\r\n \r\n public get isPreview(): boolean {\r\n return this.preview;\r\n }\r\n\r\n public set isPreview(val: boolean) {\r\n this.preview = val;\r\n }\r\n \r\n public get allowFileUploads() {\r\n return !this.preview;\r\n }\r\n \r\n public get isIndividual(): boolean {\r\n if (this.individual == null) {\r\n throw new Error(\"individual/organisation state has not been set\");\r\n }\r\n return this.individual;\r\n }\r\n\r\n public set isIndividual(val: boolean) {\r\n this.individual = val;\r\n }\r\n\r\n public organisationDocuments(): Promise {\r\n if (this.individual) {\r\n //throw new Error(\"Individual profiles cannot have organisation documents\");\r\n // they can't, but it might be an assessor viewing them so lets just give empty array\r\n return Promise.resolve([]);\r\n }\r\n return this.profileService.getActiveProfile().then(profile => {\r\n return this.organisationDocumentService.getOrganisationDocumentsByOrganisation(profile.profileIdentifier);\r\n });\r\n }\r\n\r\n public generateAttachmentDownloadUrl(applicationNumber: string, fileId: number) : Promise { \r\n return this.requestHandler.get(`application/${applicationNumber}/attachment/${fileId}`).then(link => {\r\n return Promise.resolve(`${Config.baseUrl}application/file/${link}/download`);\r\n });\r\n }\r\n\r\n}\r\n","export function CurrencyFormatter(value: number, decimalPoints: number = 2): string {\r\n if (typeof value == \"string\") {\r\n value = +value;\r\n }\r\n if (decimalPoints == 0) {\r\n //no decimal points:\r\n return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n }\r\n return value.toFixed(decimalPoints).replace(/(\\d)(?=(\\d{3})+(\\.\\d{2})?$)/g, '$1,');\r\n}","import { autoinject } from \"aurelia-dependency-injection\";\nimport { Config } from \"config/config\";\nimport { SharedDto } from \"project/project-shared\";\nimport { RequestHandler } from \"services/request-handler\";\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\n// this needs a factory, so only inject the aurelia stuff, the rest is provided later\n// this is here because I need this function to be available both for internal and external site.\n\n@autoinject\nexport class SharedRequestAdditionalInformationServices {\n constructor(private readonly requestHandler: RequestHandler, private readonly downloadFileService: DownloadFileService) {\n\n }\n \n getAdditionalInfoRequest(applicationId:number, additionalInformationRequestId: number): Promise {\n return this.requestHandler.get(`application/${applicationId}/additional-info/${additionalInformationRequestId}`);\n }\n\n createAndSubmitAdditionalInfoRequest(applicationId:number, model: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto): Promise {\n return this.requestHandler.put(`application/${applicationId}/additional-info/submit`, model);\n }\n\n getAttachmentDocumentUrl(applicationId: number, additionalInformationRequestId: number, additionalInformationRequestItemId: number, attachmentId: number): string {\n return `${Config.baseUrl}application/${applicationId}/additional-info/${additionalInformationRequestId}/request-item/${additionalInformationRequestItemId}/attachment/${attachmentId}`;\n }\n\n downloadAdditionalInformationRequestAttachment(applicationId: number, additionalInformationRequestId: number, additionalInformationRequestItemId: number, attachmentId: number) {\n let url = `application/${applicationId}/additional-info/${additionalInformationRequestId}/request-item/${additionalInformationRequestItemId}/attachment/${attachmentId}`; \n return this.requestHandler.get(url)\n .then(response => {\n this.downloadFileService.downloadFromBlob(response);\n }).catch(error => {\n console.log(error);\n });\n }\n\n downloadAdditionalInformationRequestSubmittedByAgencyAttachment(applicationId: number, additionalInformationRequestId: number, additionalInformationRequestItemId: number, attachmentId: number) {\n let url = `application/${applicationId}/additional-info/${additionalInformationRequestId}/request-item/${additionalInformationRequestItemId}/actioned-by-agency/attachment/${attachmentId}`; \n return this.requestHandler.get(url)\n .then(response => {\n this.downloadFileService.downloadFromBlob(response);\n }).catch(error => {\n console.log(error);\n });\n }\n}\n","import { Dto } from \"project/project\";\n\n//grants directory\nexport const ROUTE_GRANTS_DIRECTORY = \"grants-directory\";\n\n//applications\nexport const ROUTE_APPLICATIONS = \"applications\";\nexport const ROUTE_APPLICATION_OUTCOME_SUMMARY = \"application-outcome-summary\";\n\n//vouchers && suppliers\nexport const ROUTE_VOUCHERS = \"vouchers\";\nexport const ROUTE_VOUCHER_DASHBOARD = \"voucher-dashboard\";\nexport const ROUTE_VOUCHER_SELECT_SUPPLIER = \"voucher-select-supplier\";\nexport const ROUTE_VOUCHER_REDEMPTION = \"voucher-redemption\";\nexport const ROUTE_VOUCHER_ENTER = \"enter-vouchers\";\nexport const ROUTE_VOUCHER_BULK_ENTRY = \"bulk-enter-vouchers\";\nexport const ROUTE_VOUCHER_SUPPLIER_VOUCHER_LIST = \"supplier-voucher-list\";\nexport const ROUTE_VOUCHER_REDEMPTION_REQUESTS = \"supplier-redemption-requests\";\nexport const ROUTE_VOUCHER_REDEMPTION_NEW_REQUEST = \"supplier-redemption-new-request\";\nexport const ROUTE_VOUCHER_REDEMPTION_REQUEST_DETAIL = \"supplier-redemption-new-request-detail\";\nexport const ROUTE_VOUCHER_SUPPLIER = \"voucher-supplier-list\";\n\n\n// profile navigation\n// export const ROUTE_APPLICATIONS_IN_PROGRESS = \"applications-in-progress\";\n// export const ROUTE_APPLICATIONS_AWARDED_GRANTS = \"applications-awarded-grants\";\n// export const ROUTE_APPLICATIONS_REPORTING = \"applications-reporting\";\n// export const ROUTE_APPLICATIONS_ACQUITTAL = \"applications-acquittal\"\n// export const ROUTE_APPLICATIONS_PAYMENTS = \"applications-payments\";\n// export const ROUTE_APPLICATIONS_INVITE = \"applications-invite\";\n// export const ROUTE_APPLICATIONS_CORRESPONDENCE = \"applications-correspondence\";\n// export const ROUTE_APPLICATIONS_REQUEST_FOR_INFORMATION = \"applications-request-for-information\";\n\n// \"temporary\" fix\nexport const ROUTE_APPLICATIONS_IN_PROGRESS = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsInProgress];\nexport const ROUTE_APPLICATIONS_AWARDED_GRANTS = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsAwardedGrants];\nexport const ROUTE_APPLICATIONS_AWARDED_SUPPLIERS = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsSupplierRegistrations];\nexport const ROUTE_APPLICATIONS_AWARDED_SUPPLIER = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.AwardedSupplier];\nexport const ROUTE_APPLICATIONS_REPORTING = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsReporting];\nexport const ROUTE_APPLICATIONS_ACQUITTAL = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsAcquittal];\nexport const ROUTE_APPLICATIONS_ACQUITTAL_NEW = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsAcquittalList];\nexport const ROUTE_APPLICATIONS_PAYMENTS = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsPayments];\nexport const ROUTE_APPLICATIONS_INVITE = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsInvite];\nexport const ROUTE_APPLICATIONS_CORRESPONDENCE = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsCorrespondence];\nexport const ROUTE_APPLICATIONS_REQUEST_FOR_INFORMATION = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationsRequestForInformation];\n","\n//you cannot use navigation strategies to automatically navigate someone down child routers based on query params, so we have to go with full URL generation for now using a service like this.\n//once this is merged in: https://github.com/aurelia/router/issues/483 we can go back to using navigation strategies\n\nexport function generateGrantUrl(contentIdentifier: string | number) {\n return `/grants/${contentIdentifier}`;\n}\n\nexport function generateApplyUrl(contentIdentifier: string | number, roundIdentifier: string | number) {\n return `/grants/${contentIdentifier}/apply/${roundIdentifier}`;\n}\n\nexport function generateRedemptionUrl(supplierId: number) {\n return `vouchers/suppliers/${supplierId}/redemptions`;\n}\n\nexport function generateApplicationUrl(applicationId: number) {\n return `/manage/application/${applicationId}`\n}\n","import { autoinject } from \"aurelia-framework\";\r\n\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { Config } from \"config/config\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class AuthService {\r\n constructor(private readonly requestHandler: RequestHandler) {\r\n }\r\n\r\n login(username: string, password: string, authToken: string): Promise {\r\n return this.requestHandler.processRequest({\r\n url: \"token\",\r\n options: {\r\n method: \"post\",\r\n headers: { 'Content-Type': 'application/json' },\r\n body: authToken === null\r\n ? `username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}&grant_type=password&client_id=${Config.clientId}`\r\n : `username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}&authtoken=${authToken}&grant_type=password&client_id=${Config.clientId}`\r\n }\r\n });\r\n }\r\n\r\n requestPasswordReset(model: Dto.IPasswordResetRequest): Promise {\r\n return this.requestHandler.post(\"security/passwordreset\", model);\r\n }\r\n\r\n getPasswordReset(uniqueCode: string): Promise {\r\n return this.requestHandler.get(`security/passwordreset/${uniqueCode}`);\r\n }\r\n\r\n updatePasswordFromReset(uniqueCode: string, password: string, recaptchaResponse: string): Promise {\r\n const model: Dto.IChangePasswordFromResetRequest = {\r\n password: password,\r\n recaptchaResponse: recaptchaResponse\r\n };\r\n\r\n return this.requestHandler.post(`security/updatepassword/${uniqueCode}`, model);\r\n }\r\n\r\n updatePassword(oldPassword: string, newPassword: string): Promise {\r\n const model: Dto.IChangePasswordRequest = {\r\n oldPassword: oldPassword,\r\n newPassword: newPassword\r\n };\r\n\r\n return this.requestHandler.post(\"profile/account/updatepassword\", model);\r\n }\r\n\r\n needPasswordChange(email:string): Promise {\r\n return this.requestHandler.get(`security/need-password-change/${email}`);\r\n }\r\n}\r\n","export class PermissionError extends Error {\r\n \r\n errors: string[];\r\n message: string;\r\n\r\n constructor(message?: string) {\r\n super(message); // 'Error' breaks prototype chain here\r\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\r\n this.message = message;\r\n }\r\n\r\n}","import { autoinject } from \"aurelia-framework\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { IOnlineFormService } from \"shared/interfaces/ionline-form-service\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\n\r\n@autoinject\r\nexport class OnlineFormService implements IOnlineFormService {\r\n\r\n constructor(private readonly requestHandler: RequestHandler,\r\n private readonly downloadFileService: DownloadFileService) { }\r\n\r\n getOrganisationFormTemplate(formId: number): Promise {\r\n return this.requestHandler.get(`form/${formId}/preview/organisation`);\r\n }\r\n\r\n getIndividualFormTemplate(formId: number): Promise {\r\n return this.requestHandler.get(`form/${formId}/preview/individual`);\r\n }\r\n\r\n getNewIndividualForm(formId: number): Promise {\r\n return this.requestHandler.get(`form/${formId}/individual`);\r\n }\r\n\r\n getNewOrganisationForm(formId: number): Promise {\r\n return this.requestHandler.get(`form/${formId}/organisation`);\r\n }\r\n\r\n getOptionItems(questionId: number): Promise {\r\n return this.requestHandler.get(`form/${questionId}/option-items`, 60);\r\n }\r\n\r\n getDeclarationDocument(applicationFormId: number) {\r\n return this.requestHandler.get(`application/${applicationFormId}/declaration-document`)\r\n .then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n console.log(error);\r\n });\r\n }\r\n}\r\n","import {autoinject, singleton} from \"aurelia-framework\";\r\nimport { Confirm } from \"shared/controls/confirm-modal/confirm\";\r\nimport {Config} from \"../../config/config\";\r\n\r\n@autoinject\r\nexport class VersionMismatchService {\r\n\r\n versionMismatchLastNotification: Date;\r\n \r\n constructor(private readonly confirm: Confirm) {};\r\n \r\n private async notify(){\r\n await this.confirm.confirm(\"A new version of GrantsNT is available. Please click 'Update Now' to get the latest version or click 'Continue' to complete any unsaved changes.\",\r\n \"New Version Available\", \"Update Now\", \"Continue\").then(ok => {\r\n if (ok) {\r\n location.reload(true);\r\n }\r\n });\r\n }\r\n \r\n /**\r\n * Verify the client is not using an outdated version of the Site Javascript, this happens when the browser is left open during a deployment\r\n * \r\n * @param response\r\n * @private\r\n */\r\n async checkVersion(response: Response) : Promise {\r\n let VersionNumber = response.headers.get(\"VersionNumber\");\r\n\r\n if (VersionNumber != undefined && Config.applicationVersion != VersionNumber) {\r\n\r\n if (this.versionMismatchLastNotification == undefined){\r\n this.versionMismatchLastNotification = new Date();\r\n await this.notify();\r\n }else {\r\n let timeSinceLastMismatchNotification = Math.abs(new Date().getTime() - this.versionMismatchLastNotification.getTime());\r\n let timeSinceLastMismatchNotificationInSeconds = timeSinceLastMismatchNotification / 1000\r\n\r\n if (timeSinceLastMismatchNotificationInSeconds > 60) {\r\n this.versionMismatchLastNotification = new Date();\r\n await this.notify();\r\n }\r\n }\r\n }\r\n\r\n return response;\r\n }\r\n}","import { RenderInstruction, ValidateResult } from 'aurelia-validation';\r\nimport offset from \"document-offset\";\r\nimport inViewport from \"in-viewport\";\r\nimport scrollIntoView from \"scroll-into-view\";\r\n\r\nexport class ValidationRenderer {\r\n enableScroll: boolean = true;\r\n\r\n constructor(enableScroll?: boolean) {\r\n if (enableScroll == undefined) {\r\n this.enableScroll = true;\r\n } else {\r\n this.enableScroll = enableScroll;\r\n }\r\n }\r\n\r\n render(instruction: RenderInstruction) {\r\n for (let { result, elements } of instruction.unrender) {\r\n for (let element of elements) {\r\n this.remove(element, result);\r\n }\r\n }\r\n\r\n for (let { result, elements } of instruction.render) {\r\n // TODO: Test for result.valid required due to what seems to be a bug introduced in aurelia-validation v1.0.0-beta.\r\n if (!result.valid) {\r\n for (let element of elements) {\r\n this.add(element, result);\r\n }\r\n }\r\n }\r\n\r\n if (instruction.render && this.enableScroll) {\r\n var highest = { topOffset: undefined, element };\r\n for (var instr of instruction.render) {\r\n if (instr.result.valid) {\r\n continue;\r\n }\r\n for (var element of instr.elements) {\r\n if (element instanceof HTMLInputElement) {\r\n if ((element as HTMLInputElement).type.toLowerCase() == \"hidden\") {\r\n element = element.parentElement;\r\n }\r\n }\r\n var theOffset = offset(element);\r\n if (theOffset != null && (highest.topOffset === undefined || theOffset.top < highest.topOffset)) {\r\n highest.topOffset = theOffset.top;\r\n highest.element = element;\r\n }\r\n }\r\n }\r\n if (highest.element && !inViewport(highest.element)) {\r\n //work around for comment nodes.\r\n while (highest.element.nodeName == \"#comment\") {\r\n highest.element = highest.element.parentElement;\r\n }\r\n scrollIntoView(highest.element);\r\n }\r\n }\r\n }\r\n\r\n private add(element: Element, result: ValidateResult) {\r\n //attempts to put has-error on parent form-group. if no parent form-group, applies has-error to element.\r\n\r\n //for most of this to work, we need to get an element and not a commentnode.\r\n if (element.nodeName == \"#comment\") {\r\n element = this.getNodeParentElement(element.parentNode);\r\n }\r\n\r\n if (element && element.classList) {\r\n var parent = element.closest(\".form-group\");\r\n if (parent) {\r\n parent.classList.add(\"has-error\");\r\n } else {\r\n element.classList.add('has-error');\r\n }\r\n }\r\n\r\n const message: any = document.createElement('div');\r\n message.className = 'validation-message-div';\r\n message.textContent = result.message;\r\n message.id = `validation-message-${result.id}`;\r\n let inputGroupParent = element.closest(\".input-group\");\r\n if (inputGroupParent !== null) {\r\n let formGroupParent = element.closest(\".form-group\");\r\n if (formGroupParent !== null) {\r\n formGroupParent.appendChild(message);\r\n } else {\r\n element.parentNode.parentNode.appendChild(message);\r\n }\r\n } else if (element.parentNode.nodeName.toLowerCase() === 'label') {\r\n const div = document.createElement('div');\r\n div.id = message.id;\r\n message.id = '';\r\n div.appendChild(message);\r\n element.parentNode.parentNode.appendChild(div);\r\n } else {\r\n element.parentNode.appendChild(message);\r\n }\r\n }\r\n\r\n //this is a work around for IE, as it only implements parentElement for elements and not nodes (#comment is a Node...)\r\n private getNodeParentElement(node: Node) {\r\n while (!(node.parentNode instanceof HTMLElement)) {\r\n node = node.parentNode;\r\n }\r\n return node as Element;\r\n }\r\n\r\n private remove(element: Element, result: ValidateResult) {\r\n\r\n if (element.nodeName == \"#comment\") {\r\n element = this.getNodeParentElement(element.parentNode);\r\n }\r\n let removeHasError = () => {\r\n if (element && element.classList) {\r\n element.classList.remove('has-error');\r\n var parent = element.closest(\".form-group\");\r\n if (parent) {\r\n parent.classList.remove('has-error');\r\n }\r\n }\r\n }\r\n if (!element.parentElement) { return; } // IE, sometimes, for some unknown reason.\r\n\r\n let inputGroupParent = element.closest(\".input-group\");\r\n if (inputGroupParent !== null) {\r\n let formGroupParent = element.closest(\".form-group\");\r\n if (formGroupParent !== null) {\r\n let message = formGroupParent.querySelector(`#validation-message-${result.id}`);\r\n if (message !== null) {\r\n formGroupParent.removeChild(message);\r\n }\r\n removeHasError();\r\n return;\r\n }\r\n //weird check to safe guard against rendering for an element that was removed from the DOM....\r\n if (element.parentElement.parentNode.nodeType !== 11) {\r\n const message: any = element.parentElement.parentElement.querySelector(`#validation-message-${result.id}`);\r\n if (element.parentElement && element.parentElement.parentElement) {\r\n if (message) {\r\n element.parentElement.parentElement.removeChild(message);\r\n removeHasError();\r\n }\r\n }\r\n }\r\n } else if (element.parentElement.nodeName.toLowerCase() === 'label') {\r\n const message: any = element.parentElement.parentElement.querySelector(`#validation-message-${result.id}`);\r\n if (message) {\r\n element.parentElement.parentElement.removeChild(message);\r\n removeHasError();\r\n }\r\n } else {\r\n const message: any = element.parentElement.querySelector(`#validation-message-${result.id}`);\r\n if (message) {\r\n element.parentElement.removeChild(message);\r\n removeHasError();\r\n }\r\n }\r\n }\r\n}\r\n","export function base64toBlob(base64Data, contentType) {\r\n contentType = contentType || '';\r\n var sliceSize = 1024;\r\n var byteCharacters = atob(base64Data);\r\n var bytesLength = byteCharacters.length;\r\n var slicesCount = Math.ceil(bytesLength / sliceSize);\r\n var byteArrays = new Array(slicesCount);\r\n\r\n for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {\r\n var begin = sliceIndex * sliceSize;\r\n var end = Math.min(begin + sliceSize, bytesLength);\r\n\r\n var bytes = new Array(end - begin);\r\n for (var offset = begin, i = 0; offset < end; ++i, ++offset) {\r\n bytes[i] = byteCharacters[offset].charCodeAt(0);\r\n }\r\n byteArrays[sliceIndex] = new Uint8Array(bytes);\r\n }\r\n return new Blob(byteArrays, { type: contentType });\r\n}","import { autoinject } from 'aurelia-framework';\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { RequestHandler } from './request-handler';\n\n@autoinject\nexport class NotificationService {\n constructor(private readonly requestHandler: RequestHandler) {\n }\n\n getUnreadNotifications() : Promise> {\n return this.requestHandler.get>('notifications/unread');\n }\n\n searchNotifications(request: Dto.Notification.INotificationSearchFilterDto) : Promise> {\n return this.requestHandler.post>('notifications/search', request);\n }\n \n getNotification(notificationId: number): Promise {\n return this.requestHandler.get(`notifications/details/${notificationId}`);\n }\n \n markAsRead(notificationId: number): Promise {\n return this.requestHandler.post(`notifications/mark`, notificationId);\n }\n\n markAllAsRead(): Promise {\n return this.requestHandler.post(`notifications/markAll`);\n }\n}","import { EventAggregator, Subscription } from \"aurelia-event-aggregator\";\r\nimport { autoinject, singleton } from \"aurelia-framework\";\r\nimport { NavigationInstruction } from \"aurelia-router\";\r\n//import _clone from 'lodash/clone';\r\n\r\n@singleton()\r\n@autoinject\r\nexport class BreadcrumbService {\r\n\r\n subscriptions: Subscription[] = [];\r\n homeRoute: string;\r\n crumbs: BreadCrumbItem[];\r\n\r\n constructor(private eventAggregator: EventAggregator) {\r\n this.crumbs = [];\r\n this.subscriptions.push(this.eventAggregator.subscribe(\"router:navigation:success\", (c) => {\r\n this.processInstruction(c.instruction);\r\n }));\r\n }\r\n\r\n getParentInstructions(instruction) {\r\n return instruction.parentInstruction ? this.getParentInstructions(instruction.parentInstruction).concat([instruction]) : [instruction];\r\n }\r\n\r\n processInstruction(navInstruction: NavigationInstruction) {\r\n var instructions: NavigationInstruction[] = [];\r\n this.crumbs = [];\r\n const parentInstructions = this.getParentInstructions(navInstruction.router.currentInstruction);\r\n instructions = parentInstructions\r\n .slice(0, parentInstructions.length - 1)\r\n .concat(navInstruction.router.currentInstruction.getAllInstructions())\r\n .filter(instruction => instruction.config.settings && instruction.config.title);\r\n \r\n instructions.forEach((instruction) => {\r\n let breadCrumb = new BreadCrumbItem();\r\n const params = Object.assign({}, instruction.params);\r\n delete params.childRoute;\r\n\r\n breadCrumb.title = instruction.config.title;\r\n breadCrumb.routeConfig = instruction.config;\r\n breadCrumb.href = instruction.router.generate(instruction.config.name, params);\r\n\r\n if (instruction.config.settings.breadcrumb) {\r\n this.crumbs.push(breadCrumb);\r\n }\r\n\r\n //logic below for inserting configured parent breadcrumbs on the same router level\r\n let parent = instruction.config.settings.parent;\r\n let parentBreadcrumbs = [];\r\n while (parent) {\r\n var parentRouteConfig = instruction.router.routes.find(x => x.name == parent);\r\n\r\n if(!parentRouteConfig) {\r\n break\r\n }\r\n \r\n let breadCrumb = new BreadCrumbItem();\r\n breadCrumb.title = parentRouteConfig.title;\r\n\r\n let newParams = {};\r\n let requiredParams = this.identifyPathParams(parentRouteConfig.route);\r\n if (requiredParams.length > 0) {\r\n for (let paramName of requiredParams) {\r\n newParams[paramName] = instruction.params[paramName];\r\n }\r\n }\r\n\r\n breadCrumb.href = instruction.router.generate(parentRouteConfig.name, newParams);\r\n\r\n if (breadCrumb.href.indexOf(\"?\") > -1) {\r\n breadCrumb.href = breadCrumb.href.substr(0, breadCrumb.href.indexOf('?'));\r\n }\r\n\r\n parentBreadcrumbs.splice(0, 0, breadCrumb);\r\n\r\n if (parent == parentRouteConfig.settings.parent) {\r\n break; //infinite loops?\r\n }\r\n\r\n parent = parentRouteConfig.settings.parent;\r\n }\r\n \r\n this.crumbs.splice(this.crumbs.length - 1, 0, ...parentBreadcrumbs);\r\n });\r\n }\r\n\r\n identifyPathParams(routes: string | string[]): string[] {\r\n let result = [];\r\n \r\n if (!(routes instanceof Array)) {\r\n routes = [routes];\r\n }\r\n \r\n for (let route of routes) {\r\n let matches = route.match(/:\\w+/gi);\r\n if (matches && matches.length > 0) {\r\n for (let match of matches) {\r\n result.push(match.replace(\":\", \"\"));\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class BreadCrumbItem {\r\n href: string;\r\n title: string;\r\n //added in config so we have an mutable object reference so when we render the title, if a view model changes the title it is reflected in the breadcrumb\r\n routeConfig: any;\r\n}\r\n","import { autoinject, singleton } from \"aurelia-dependency-injection\";\r\n\r\nimport { IAddressService } from \"shared/interfaces/iaddress-service\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Dto } from \"project/project\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\n\r\n@autoinject\r\n@singleton()\r\nexport class AddressService implements IAddressService {\r\n constructor(private readonly requestHandler: RequestHandler) {\r\n\r\n }\r\n\r\n validateAddresses(model: SharedDto.IAddressUpdateDto): Promise {\r\n return this.requestHandler.post(`utils/validateaddress`, model);\r\n }\r\n\r\n searchAddress(query:string): Promise {\r\n var addressSearch = encodeURIComponent(query);\r\n return this.requestHandler.get(`utils/search-address?searchterm=${addressSearch}`);\r\n }\r\n}","import { autoinject } from \"aurelia-framework\";\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { Dto } from \"project/project\";\r\n\r\n@autoinject\r\nexport class SubscriptionService {\r\n constructor(private readonly requestHandler: RequestHandler) {\r\n\r\n }\r\n \r\n getSubscriptionOptions(): Promise {\r\n return this.requestHandler.get('subscriptions');\r\n }\r\n\r\n getOrganisationSubscriptionOptions(organisationId: number): Promise {\r\n return this.requestHandler.get(`subscriptions/organisation/${organisationId}`);\r\n }\r\n\r\n updateSubscriptionOptions(subscriptionOptions: Dto.ISubscriptionOptionsDto): Promise {\r\n return this.requestHandler.post('subscriptions', subscriptionOptions);\r\n }\r\n}","import { autoinject, singleton } from \"aurelia-dependency-injection\";\n\nimport { IAddressService } from \"shared/interfaces/iaddress-service\";\nimport { SharedDto } from \"project/project-shared\";\nimport { Dto } from \"project/project\";\nimport { RequestHandler } from \"services/request-handler\";\n\n@autoinject\n@singleton()\nexport class UtilityService {\n constructor(private readonly requestHandler: RequestHandler) {\n\n }\n\n getSystemNotifications(): Promise> {\n return this.requestHandler.get>('systemadmin/notifications/internal');\n }\n\n abrLookup(abn: string): Promise {\n return this.requestHandler.get(`utils/abn-lookup/${abn}`);\n }\n\n}","import { autoinject } from \"aurelia-dependency-injection\";\n// this needs a factory, so only inject the aurelia stuff, the rest is provided later\n\n@autoinject\nexport class FormNavigationServices {\n \n getNextIndex(buttonNavigationState: IButtonNavigation, hasIntroduction: boolean):number {\n return hasIntroduction ? buttonNavigationState.nextStepIndex + 1 : buttonNavigationState.nextStepIndex;;\n }\n\n getCurrentIndex(hasIntroduction:boolean, nextIndex?:number, previousIndex?:number):number {\n if(hasIntroduction) {\n if(nextIndex) return nextIndex + 1;\n if(previousIndex) return previousIndex;\n } else {\n if(nextIndex) return nextIndex;\n if(previousIndex) return previousIndex;\n }\n }\n\n highlightFirstStep(sideBar: JQuery) {\n if(sideBar) {\n sideBar[0].classList.add('nav-step');\n }\n }\n\n highlightLastStep(sideBar: JQuery) {\n sideBar[sideBar.length - 1].classList.add('nav-step');\n }\n\n highlightNextStep(buttonNavigationState: IButtonNavigation, sideBar: JQuery, hasIntroduction: boolean) {\n if (!buttonNavigationState.next) {\n return;\n }\n\n this.removeAllHightlight(sideBar);\n\n let nextIndex = this.getNextIndex(buttonNavigationState, hasIntroduction); \n if (buttonNavigationState.next == \"Introduction\") {\n this.highlightFirstStep(sideBar)\n } else if (buttonNavigationState.next == \"Declaration\") {\n this.highlightLastStep(sideBar)\n } else if(buttonNavigationState.next == \"RequiredDocuments\") {\n sideBar[sideBar.length -2].classList.add('nav-step');\n }\n else {\n sideBar[nextIndex].classList.add('nav-step');\n }\n }\n\n highlightPreviousStep(buttonNavigationState: IButtonNavigation, sideBar: JQuery) {\n if (!buttonNavigationState.previous) {\n return;\n }\n\n this.removeAllHightlight(sideBar);\n\n if (buttonNavigationState.previous == \"Introduction\") {\n this.highlightFirstStep(sideBar)\n } else if (buttonNavigationState.previous == \"Declaration\") {\n this.highlightLastStep(sideBar)\n } else if(buttonNavigationState.previous == \"RequiredDocuments\") {\n sideBar[sideBar.length -2].classList.add('nav-step');\n } else {\n sideBar[buttonNavigationState.previousStepIndex + 1].classList.add('nav-step');\n }\n }\n\n highlightJumpStep(buttonNavigationState: IButtonNavigation, sideBar: JQuery, hasIntroduction: boolean) {\n let nextIndex = this.getNextIndex(buttonNavigationState, hasIntroduction);\n let previousIndex = buttonNavigationState.previousStepIndex + 1;\n let index = this.getCurrentIndex(hasIntroduction, nextIndex, previousIndex);\n \n this.removeAllHightlight(sideBar);\n if (buttonNavigationState.previous == \"Step\" && buttonNavigationState.next == \"Step\") {\n sideBar[nextIndex - 1].classList.add('nav-step');\n } else if(buttonNavigationState.previous == \"Step\" && buttonNavigationState.next == \"Declaration\") {\n if(hasIntroduction)\n sideBar[index + 1].classList.add('nav-step');\n else\n sideBar[index].classList.add('nav-step');\n } else if( (buttonNavigationState.previous == \"Introduction\" || buttonNavigationState.previous == null) && buttonNavigationState.next == \"Step\") {\n if(sideBar)\n sideBar[nextIndex - 1].classList.add('nav-step');\n } \n }\n\n removeAllHightlight(sideBar: JQuery) {\n if(sideBar) {\n let stepCount = sideBar.length;\n for (var i = 0; i < stepCount; i++) {\n sideBar[i].classList.remove('nav-step')\n }\n }\n }\n}\n\ninterface IButtonNavigation {\n previous: \"Introduction\" | \"RequiredDocuments\" | \"Declaration\" | \"Step\" | null;\n previousStepIndex?: number;\n next: \"Introduction\" | \"RequiredDocuments\" | \"Declaration\" | \"Step\" | null;\n nextStepIndex?: number;\n}\n","module.exports = __webpack_public_path__ + \"assets/images/ntg-logo-white.png\";","import { DialogService } from \"aurelia-dialog\";\r\nimport { autoinject, PLATFORM } from \"aurelia-framework\";\r\nimport { Logger } from \"aurelia-logging\";\r\nimport { IApplyNowModalConditionsEnum, IApplyNowModalParams } from \"grants/modals/apply-now-modal/apply-now-modal\";\r\nimport { ILoginOrRegisterModalParams } from \"grants/modals/login-or-register-modal/login-or-register-modal\";\r\nimport { ActiveProfile } from \"models/active-profile\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { Confirm } from \"shared/controls/confirm-modal/confirm\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\nimport { Messages } from \"utils/messages\";\r\nimport { Notifier } from \"./notifier\";\r\nimport { RequestHandler } from \"./request-handler\";\r\n\r\n@autoinject\r\nexport class ApplicationService {\r\n\r\n constructor(private readonly requestHandler: RequestHandler,\r\n private readonly profileService: ProfileService,\r\n private readonly dialogService: DialogService,\r\n private readonly confirm: Confirm,\r\n private readonly notifier: Notifier,\r\n private readonly downloadFileService: DownloadFileService,\r\n private readonly logger: Logger) { }\r\n\r\n //a bit hacky but since this service is a singleton it can be used as a temporary memory store for the response between page transitions\r\n public tempTransitionResponse: any;\r\n\r\n getBlankApplication(publicContentId: number, grantRoundId: number): Promise {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(\r\n `application/new/${publicContentId}/${grantRoundId}${query}`);\r\n });\r\n }\r\n\r\n getBlankApplicationBySlugOrId(publicContentIdentification: number | string, grantRoundIdentification: number | string): Promise {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(\r\n `application/new/${publicContentIdentification}/${grantRoundIdentification}${query}`);\r\n });\r\n }\r\n\r\n createApplicationBySlug(form: SharedDto.OnlineForm.Application.IApplicationFormDto, publicContentIdentifier: number | string, grantRoundIdentifier: number | string): Promise {\r\n return this.orgIdQuery().then(query => {\r\n\r\n return this.requestHandler.post(\r\n `application/slug/${publicContentIdentifier}/${grantRoundIdentifier}${query}`, form);\r\n });\r\n }\r\n\r\n downloadApplicationAsPdf(applicationId: number): Promise {\r\n var promise = new Promise((resolve, reject) => {\r\n this.requestHandler.get(`application/get-pdf/${applicationId}`).then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n resolve();\r\n }).catch(error => {\r\n this.logger.error(error);\r\n reject(error);\r\n });\r\n });\r\n\r\n return promise\r\n }\r\n\r\n getExistingApplication(applicationId: number): Promise {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(\r\n `application/${applicationId}${query}`);\r\n });\r\n }\r\n\r\n createApplication(form: SharedDto.OnlineForm.Application.IApplicationFormDto, publicContentId: number, grantRoundId: number): Promise {\r\n debugger;\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.post(\r\n `application/${publicContentId}/${grantRoundId}${query}`, form);\r\n });\r\n }\r\n\r\n updateApplication(form: SharedDto.OnlineForm.Application.IApplicationFormDto, applicationId: number): Promise {\r\n let model: Dto.OnlineForm.Application.IApplicationFormSubmissionDto = {\r\n application: form\r\n };\r\n\r\n return this.requestHandler.put(`application/${applicationId}`, model);\r\n }\r\n\r\n getApplications(searchRequest: Dto.Application.IExternalApplicationRequestDto): Promise> {\r\n return this.profileService.getActiveProfile().then(activeProfile => {\r\n searchRequest.organisationId = activeProfile.profileType == \"Organisation\" ? activeProfile.profileIdentifier : null;\r\n return this.requestHandler.post>(\r\n `application/list`, searchRequest);\r\n });\r\n }\r\n\r\n transitionApplication(applicationId: number, transition: Dto.Application.IApplicationTransitionRequestDto): Promise {\r\n return this.profileService.getActiveProfile().then((profile) => {\r\n transition.organisationId = undefined;\r\n if (profile.profileType == \"Organisation\") {\r\n transition.organisationId = profile.profileIdentifier;\r\n }\r\n\r\n return this.requestHandler.put(\r\n `application/${applicationId}/transition`, transition);\r\n });\r\n }\r\n\r\n ApplicationActions(applicationId: number, organisationId: number) {\r\n return this.requestHandler.get(\r\n `application/${applicationId}/actions${this.orgIdAsQuery(organisationId)}`);\r\n }\r\n\r\n getApplicationHistory(applicationId: number): Promise {\r\n return this.requestHandler.get(\r\n `application/${applicationId}/history`);\r\n }\r\n\r\n async loggedInWithCorrectProfileCheck(profile: ActiveProfile, model: SharedDto.PublicContent.IPublicContentDetailViewDto,\r\n userDetails: Dto.IUserResponse, isNew: boolean, availableOrganisationProfiles: Dto.IUserOrganisationProfile[]): Promise {\r\n\r\n //isNew means the user just created an organisation profile successfully, so don't ask the user if they're sure they have the right org profile\r\n if (isNew) {\r\n return { result: 'valid', redirectUrl: null };\r\n }\r\n\r\n //this will return false if the user is not logged in and doesn't choose to redirect to the login page\r\n let loggedInCheckResult = await this.loginOrRegister(profile, model);\r\n if (loggedInCheckResult.result !== 'valid') {\r\n return loggedInCheckResult;\r\n }\r\n\r\n if ((model.isIndividualEligible && !model.isOrganisationEligible) && profile.profileType == \"Individual\") {\r\n // individual eligible and you are login as an Individual\r\n return { result: 'valid', redirectUrl: null };\r\n }\r\n\r\n var applyNowCondition: IApplyNowModalConditionsEnum;\r\n if (model.isIndividualEligible && model.isOrganisationEligible) {\r\n // both organisations and individuals are eligible and you are login as individual or organisation\r\n applyNowCondition = IApplyNowModalConditionsEnum.OrganisationIndividualCanApply\r\n } else if ((model.isIndividualEligible && !model.isOrganisationEligible) && profile.profileType == \"Organisation\") {\r\n // individual eligible and you are login as an organisation\r\n applyNowCondition = IApplyNowModalConditionsEnum.OnlyIndividualCanApply\r\n } else if ((!model.isIndividualEligible && model.isOrganisationEligible)) {\r\n // TP-585 Applying -There is no option to Register an organisation when applying as new organisation to SV/LTS supplier round\r\n // no longer checking if you only have 1 organisation because users needs to have the option to register a new organisation\r\n applyNowCondition = IApplyNowModalConditionsEnum.OnlyOrganisationCanApply\r\n } else if (!model.isIndividualEligible && !model.isOrganisationEligible) {\r\n // this should never occur\r\n this.notifier.standardMessage(Messages.serverError);\r\n this.logger.error('Content has no eligible applicant types', model);\r\n return { result: 'cancelled', redirectUrl: null };\r\n }\r\n\r\n return this.dialogService.open({\r\n viewModel: PLATFORM.moduleName('grants/modals/apply-now-modal/apply-now-modal'),\r\n model: {\r\n profile: profile,\r\n applyNowCondition: applyNowCondition,\r\n content: model,\r\n availableOrganisationProfiles: availableOrganisationProfiles\r\n } as IApplyNowModalParams,\r\n }).whenClosed(result => {\r\n if (result.wasCancelled) {\r\n return { result: 'cancelled', redirectUrl: null };\r\n }\r\n return result.output;\r\n });\r\n }\r\n\r\n async loginOrRegister(profile: ActiveProfile, model: SharedDto.PublicContent.IPublicContentDetailViewDto): Promise {\r\n if (profile) {\r\n return { result: 'valid', redirectUrl: null };\r\n }\r\n\r\n var applicationFormState: IApplyNowModalConditionsEnum;\r\n if (model.isIndividualEligible && model.isOrganisationEligible) { // both organisations and individuals are eligible and you are login as individual or organisation\r\n applicationFormState = IApplyNowModalConditionsEnum.OrganisationIndividualCanApply\r\n } else if (!model.isIndividualEligible && model.isOrganisationEligible) { // organisation eligible and you are login as individual\r\n applicationFormState = IApplyNowModalConditionsEnum.OnlyOrganisationCanApply\r\n } else if (model.isIndividualEligible && !model.isOrganisationEligible) {\r\n applicationFormState = IApplyNowModalConditionsEnum.OnlyIndividualCanApply;\r\n } else if (!model.isIndividualEligible && !model.isOrganisationEligible) { // both organisations and individuals not eligible\r\n this.confirm.confirm(`Error in the application, please contact your grant administrator`);\r\n this.logger.error('Error in the application, please contact your grant administrator', model);\r\n return;\r\n }\r\n \r\n return this.dialogService.open({\r\n viewModel: PLATFORM.moduleName('grants/modals/login-or-register-modal/login-or-register-modal'),\r\n model: {\r\n applicationFormState: applicationFormState,\r\n content: model\r\n } as ILoginOrRegisterModalParams,\r\n }).whenClosed((result) => {\r\n if (result.wasCancelled) {\r\n return { result: 'cancelled', redirectUrl: null }\r\n }\r\n return result.output;\r\n });\r\n }\r\n\r\n private orgIdAsQuery(organisationId: number) {\r\n let query = '';\r\n if (organisationId != null) {\r\n query = `?organisationId=${organisationId}`;\r\n }\r\n return query;\r\n }\r\n\r\n private orgIdQuery(): Promise {\r\n return this.profileService.getActiveProfile().then(activeProfile => {\r\n let organisationId = activeProfile.profileType == \"Organisation\" ? activeProfile.profileIdentifier : null;\r\n let query = '';\r\n if (organisationId != null) {\r\n query = `?organisationId=${organisationId}`;\r\n }\r\n return query;\r\n });\r\n }\r\n}\r\n\r\nexport interface IApplyCheckResult {\r\n result: 'valid' | 'redirect' | 'cancelled';\r\n redirectUrl: string;\r\n}\r\n","import { autoinject } from \"aurelia-dependency-injection\";\r\n\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\n\r\n@autoinject\r\nexport class AcquittalService {\r\n constructor(private readonly requestHandler: RequestHandler, private readonly profileService: ProfileService,\r\n private readonly downloadFileService: DownloadFileService) {\r\n\r\n }\r\n\r\n getAcquittalRequirement(applicationId: number, acquittalRequirementId: number): Promise {\r\n return this.requestHandler.get(`acquittal/${applicationId}/${acquittalRequirementId}`);\r\n }\r\n\r\n createSubmission(applicationId: number, acquittalRequirementId: number, submission: Dto.Reporting.IAcquittalSubmissionUpdateDto) {\r\n return this.requestHandler.post(`acquittal/${applicationId}/${acquittalRequirementId}`, submission);\r\n }\r\n\r\n updateSubmission(applicationId: number, acquittalRequirementId: number, submission: Dto.Reporting.IAcquittalSubmissionUpdateDto) {\r\n return this.requestHandler.put(`acquittal/${applicationId}/${acquittalRequirementId}`, submission);\r\n }\r\n\r\n transition(applicationId: number, acquittalRequirementId: number, transition: Dto.Constants.AcquittalRequirementTransition): Promise {\r\n return this.requestHandler.put(\r\n `acquittal/${applicationId}/${acquittalRequirementId}/transition`, transition);\r\n }\r\n\r\n filterAcquittal(filter: Dto.Reporting.IExternalAcquittalViewFilterDto): Promise> {\r\n return this.profileService.getActiveProfile().then(profile => {\r\n if (profile.profileType == \"Organisation\") {\r\n filter.organisationId = profile.profileIdentifier;\r\n }\r\n return this.requestHandler.post>(\r\n 'acquittal/filter', filter);\r\n });\r\n }\r\n \r\n // getOutstandingAcquittalStatus(): Promise {\r\n // return this.requestHandler.get(`acquittal/outstanding-status`);\r\n // }\r\n\r\n getOutstandingAcquittalProfileSummary(): Promise {\r\n return this.requestHandler.get(`acquittal/outstanding-acquittal-profile-summary`);\r\n }\r\n \r\n getAcquittalForPayment(paymentId: number): Promise {\r\n return this.requestHandler.get(\r\n `payment/${paymentId}/acquittal`);\r\n }\r\n\r\n downloadSubmissionDocument(applicationId: number, acquittalRequirementId: number, document: SharedDto.IFilePropertiesDto): Promise {\r\n return this.requestHandler.get(`acquittal/${applicationId}/${acquittalRequirementId}/submitted-files/${document.fileStorageId}`)\r\n .then(response => {\r\n return this.downloadFileService.downloadFromBlob(response);\r\n });\r\n }\r\n\r\n downloadTemplateDocument(applicationId: number, acquittalRequirementId: number, document: SharedDto.IFilePropertiesDto): Promise {\r\n return this.requestHandler.get(`acquittal/${applicationId}/${acquittalRequirementId}/template-document/${document.fileStorageId}`)\r\n .then(response => {\r\n return this.downloadFileService.downloadFromBlob(response);\r\n });\r\n }\r\n\r\n downloadSupportingFile(applicationId: number, acquittalRequirementId: number, document: SharedDto.IFilePropertiesDto): Promise {\r\n return this.requestHandler.get(`acquittal/${applicationId}/${acquittalRequirementId}/supporting-document/${document.fileStorageId}`)\r\n .then(response => {\r\n return this.downloadFileService.downloadFromBlob(response);\r\n });\r\n }\r\n\r\n}","import { autoinject } from \"aurelia-dependency-injection\";\r\nimport { RequestHandler } from \"services/request-handler\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Dto } from \"project/project\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\n\r\n@autoinject\r\nexport class AdditionalInfoService {\r\n constructor(private readonly requestHandler: RequestHandler, \r\n private readonly profileService: ProfileService,\r\n private readonly downloadFileService: DownloadFileService) {\r\n }\r\n\r\n getAdditionalInfoList(filter: Dto.AdditionalInfo.IAdditionalInfoRequestFilterDto): Promise> {\r\n return this.profileService.getActiveProfile().then(profile => {\r\n if (profile.profileType == \"Organisation\") {\r\n filter.organisationId = profile.profileIdentifier;\r\n }\r\n else {\r\n filter.organisationId = null;\r\n }\r\n return this.requestHandler.post>('rfi', filter);\r\n })\r\n }\r\n\r\n getAdditionalInfoRequest(applicationId: number, additionalInformationRequestId: number): Promise {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(`rfi/${applicationId}/${additionalInformationRequestId}${query}`);\r\n });\r\n }\r\n\r\n getRespondedAdditionalInfoRequest(applicationId: number): Promise {\r\n return this.requestHandler.get(`rfi/${applicationId}/assessment`);\r\n }\r\n\r\n saveAdditionalInfoRequest(applicationId: number, additionalInformationRequestId: number, model: Dto.AdditionalInfo.IAdditionalInformationRequestItemUpdateDto[]): Promise < any > {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.post(`rfi/${applicationId}/${additionalInformationRequestId}${query}`, model);\r\n });\r\n }\r\n\r\n saveAndSubmitAdditionalInfoRequest(applicationId: number, additionalInformationRequestId: number, model: Dto.AdditionalInfo.IAdditionalInformationRequestItemUpdateDto[]): Promise < any > {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.post(`rfi/${applicationId}/${additionalInformationRequestId}/submit${query}`, model);\r\n });\r\n }\r\n\r\n downloadQuestionDocument(applicationId: number, additionalInformationRequestId: number, document: SharedDto.IFilePropertiesDto): Promise < void> {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(`rfi/${applicationId}/${additionalInformationRequestId}/submitted-file/${document.fileStorageId}${query}`);\r\n }).then(response => {\r\n return this.downloadFileService.downloadFromBlob(response);\r\n });\r\n }\r\n\r\n downloadSubmittedAgencyDocument(applicationId: number, additionalInformationRequestId: number, additionalInformationRequestItemId: number, document: SharedDto.IFilePropertiesDto): Promise < void> {\r\n return this.orgIdQuery().then(query => {\r\n return this.requestHandler.get(`rfi/${applicationId}/${additionalInformationRequestId}/submitted-by-agency/${additionalInformationRequestItemId}/${document.fileStorageId}`);\r\n }).then(response => {\r\n return this.downloadFileService.downloadFromBlob(response);\r\n });\r\n }\r\n\r\n private orgIdQuery(): Promise {\r\n return this.profileService.getActiveProfile().then(activeProfile => {\r\n let organisationId = activeProfile.profileType == \"Organisation\" ? activeProfile.profileIdentifier : null;\r\n let query = '';\r\n if (organisationId != null) {\r\n query = `?organisationId=${organisationId}`;\r\n }\r\n return query;\r\n });\r\n }\r\n}","import { autoinject } from \"aurelia-framework\";\r\n\r\nimport { Dto } from \"project/project\";\r\nimport { RequestHandler } from \"./request-handler\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DownloadFileService } from \"shared/utils/download-file-service\";\r\n\r\n@autoinject\r\nexport class OrganisationDocumentService {\r\n\r\n constructor(private readonly requestHandler: RequestHandler, private readonly downloadFileService: DownloadFileService) {\r\n }\r\n\r\n getOrganisationDocument(documentId): Promise {\r\n return this.requestHandler.get(\r\n `profile/organisation-document/${documentId}`);\r\n }\r\n\r\n getOrganisationDocumentsByOrganisation(organisationId): Promise {\r\n return this.requestHandler.get(\r\n `profile/organisation-document/organisation/${organisationId}`);\r\n }\r\n\r\n createOrganisationDocument(model: SharedDto.ICreateUpdateOrganisationDocumentDto): Promise {\r\n return this.requestHandler.post('profile/organisation-document', model);\r\n }\r\n\r\n updateOrganisationDocument(model: SharedDto.ICreateUpdateOrganisationDocumentDto): Promise {\r\n return this.requestHandler.put(\r\n 'profile/organisation-document', model);\r\n }\r\n\r\n deleteOrganisationDocument(organisationDocumentId: number): Promise {\r\n return this.requestHandler.delete(`profile/organisation-document/${organisationDocumentId}`);\r\n }\r\n\r\n downloadOrganisationDocument(document: SharedDto.IOrganisationDocumentDto): Promise {\r\n return this.requestHandler.get(`profile/organisation-document/download/${document.organisationDocumentId}`)\r\n .then(response => {\r\n this.downloadFileService.downloadFromBlob(response);\r\n }).catch(error => {\r\n console.log(error);\r\n });\r\n }\r\n}","import { singleton } from \"aurelia-framework\";\r\n\r\n@singleton()\r\nexport class ControlIdGenerator {\r\n private currentId;\r\n constructor(){\r\n this.currentId = 0;\r\n }\r\n\r\n getNextId():number{\r\n return this.currentId++;\r\n }\r\n}","//todo: make this a simple es6 function export instead of a class.\nconst symbolsDictionary: Map = new Map();\nconst symbols: number[] = `0123456789ABCDEFGHJKLMNPQRTUVWXY`.split('').map(y => y.charCodeAt(0))\nfor (\n let i = 0; i < symbols.length; i++) {\n symbolsDictionary.set(symbols[i], i);\n}\n\nconst numberOfParts = 3;\nconst partLength = 4;\n\n//this function only validates completed number parts\nexport function valdiateVoucherParts(code: string): boolean {\n // split in the different parts\n let parts: string[] = [];\n let tempCode = code;\n while (tempCode.length > 0) {\n parts.push(tempCode.substr(0, partLength));\n tempCode = tempCode.substr(partLength);\n }\n\n // validate each part\n for (\n let i = 0; i < parts.length; i++) {\n let part = parts[i];\n // check this part has 4 chars\n if (part.length != partLength) {\n continue;\n }\n // split out the data and the check\n let data = part.substr(0, partLength - 1);\n let check = part.substr(partLength - 1, 1).charCodeAt(0);\n if (check != checkDigitAlg1(data, i + 1)) {\n return false;\n }\n }\n // everything looked ok with this code\n return true;\n}\n\nexport function partiallyValidateVoucherNumber(code) {\n // uppercase the code, replace OIZS with 0125 and remove hyphens\n code = code.toUpperCase()\n .replace(/O/gi, '0')\n .replace(/I/gi, `1`)\n .replace(/Z/gi, `2`)\n .replace(/S/gi, `5`)\n .replace(/_/gi, ``)\n .replace(/-/gi, '');\n let result = valdiateVoucherParts(code); \n return result;\n}\n\nexport function validateVoucherNumber(code: string): boolean {\n if (!code) {\n return false;\n }\n\n // uppercase the code, replace OIZS with 0125 and remove hyphens\n code = code.toUpperCase()\n .replace(/O/gi, '0')\n .replace(/I/gi, `1`)\n .replace(/Z/gi, `2`)\n .replace(/S/gi, `5`)\n .replace(/-/gi, '');\n\n // split in the different parts\n let parts: string[] = [];\n let tempCode = code;\n while (tempCode.length > 0) {\n parts.push(tempCode.substr(0, partLength));\n tempCode = tempCode.substr(partLength);\n }\n\n // make sure we have been given the same number of parts as we are expecting\n if (parts.length !== numberOfParts) {\n return false;\n }\n\n return valdiateVoucherParts(code);\n}\n\nfunction checkDigitAlg1(data: string | null, check: number): number {\n // check's initial value is the part number (e.g. 3 or above)\n // loop through the data chars\n var charChodeArray = data.split('').map(y => y.charCodeAt(0));\n for (let code of charChodeArray) {\n let k = symbolsDictionary.get(code);\n check = (check * 19) + k;\n }\n return symbols[check % (symbols.length - 1)];\n}\n","export class ConcurrentAccessError extends Error {\r\n message: string;\r\n\r\n constructor(message?: string) {\r\n super(message); // 'Error' breaks prototype chain here\r\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\r\n this.message = message;\r\n }\r\n}","import { Dto } from \"project/project\";\r\n\r\nexport class ActiveProfile {\r\n profileType: \"Individual\" | \"Organisation\";\r\n profileIdentifier: number;\r\n profileDisplayName: string;\r\n profileUserFullname: string;\r\n profileUserId: number;\r\n profileAccountStatus: Dto.Constants.AccountStatus;\r\n allowedRoutes: Dto.Constants.ExternalPageRoutes[];\r\n}","import { EventAggregator, Subscription } from \"aurelia-event-aggregator\";\r\nimport { autoinject, bindable, bindingMode, computedFrom } from \"aurelia-framework\";\r\nimport { Router } from \"aurelia-router\";\r\nimport { AuthManager } from \"auth/auth-manager\";\r\nimport { ActiveProfile } from \"models/active-profile\";\r\nimport { BroadcastEvents } from \"models/broadcast-events\";\r\nimport { Dto } from \"project/project\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { ROUTE_APPLICATIONS } from \"utils/router-constants\";\r\n\r\n@autoinject\r\nexport class LoginView {\r\n\r\n @bindable() isLoggedIn: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) userDetails: Dto.IUserResponse;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) activeProfile: ActiveProfile = null;\r\n @bindable() hasMultipleProfiles: boolean;\r\n @bindable() theRouter: Router;\r\n\r\n routeApplications = ROUTE_APPLICATIONS;\r\n subscriptions: Subscription[] = [];\r\n\r\n constructor(private authManager: AuthManager,\r\n private eventAggregator: EventAggregator,\r\n private profileService: ProfileService,\r\n private notifier: Notifier,\r\n private router: Router) {\r\n\r\n }\r\n\r\n attached() {\r\n this.isLoggedIn = this.authManager.isLoggedIn;\r\n this.updateUserDetails();\r\n this.getActiveProfile();\r\n this.subscriptions.push(this.eventAggregator.subscribe(BroadcastEvents.profileChanged, () => { this.updateUserDetails(); }));\r\n this.subscriptions.push(this.eventAggregator.subscribe(BroadcastEvents.profileRefreshed, () => { this.updateUserDetails(); }));\r\n }\r\n\r\n getActiveProfile() {\r\n this.profileService.getActiveProfile().then(activeProfile => {\r\n this.activeProfile = activeProfile;\r\n });\r\n this.hasMultipleProfiles = this.userDetails && this.userDetails.userOrganisationProfiles.length > 0;\r\n }\r\n\r\n unbind() {\r\n while (this.subscriptions.length) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n isActive(organisation: Dto.IUserOrganisationProfile) {\r\n return this.activeProfile && this.activeProfile.profileType === \"Organisation\" &&\r\n this.activeProfile.profileIdentifier === organisation.organisationId;\r\n }\r\n\r\n setIndividualActiveProfile() {\r\n this.profileService.setActiveProfile({\r\n profileType: \"Individual\",\r\n profileIdentifier: this.userDetails.accountId,\r\n profileDisplayName: null,\r\n profileUserFullname: this.userDetails.fullName,\r\n profileUserId: this.userDetails.accountId,\r\n profileAccountStatus: this.userDetails.accountStatus,\r\n allowedRoutes: null\r\n });\r\n }\r\n\r\n setOrganisationActiveProfile(organisation: Dto.IUserOrganisationProfile) {\r\n this.profileService.setActiveProfile({\r\n profileType: \"Organisation\",\r\n profileIdentifier: organisation.organisationId,\r\n profileDisplayName: organisation.legalName,\r\n profileUserFullname: this.userDetails.fullName,\r\n profileUserId: this.userDetails.accountId,\r\n profileAccountStatus: this.userDetails.accountStatus,\r\n allowedRoutes: organisation.allowedRoutes\r\n });\r\n }\r\n\r\n login() {\r\n let currentRoute = this.router.currentInstruction.fragment;\r\n const queryString = this.router.currentInstruction.queryString;\r\n\r\n if (currentRoute === \"/login\") {\r\n return;\r\n }\r\n if (currentRoute === \"/register-request\" || currentRoute === \"/recover-password\") {\r\n currentRoute = \"/welcome\";\r\n }\r\n\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\r\n }\r\n\r\n register() {\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Register]);\r\n }\r\n\r\n logout() {\r\n this.authManager.logout();\r\n this.notifier.info(\"You are now logged out.\");\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome]);\r\n }\r\n\r\n @computedFrom(\"authManager.isLoggedIn\")\r\n get showAuthNavs(): boolean {\r\n return this.authManager.isLoggedIn;\r\n }\r\n \r\n private updateUserDetails(): void {\r\n this.isLoggedIn = this.authManager.isLoggedIn;\r\n if (this.authManager.isLoggedIn) {\r\n this.profileService.getAccount().then((data: Dto.IUserResponse) => {\r\n this.userDetails = data;\r\n this.getActiveProfile();\r\n }).catch(() => {\r\n this.userDetails = null;\r\n this.activeProfile = null;\r\n });\r\n } else {\r\n this.userDetails = null;\r\n this.activeProfile = null;\r\n }\r\n }\r\n\r\n @computedFrom(\"activeProfile.profileUserFullname\")\r\n get profileUserFullname(): string {\r\n if (this.activeProfile === null) {\r\n return null;\r\n }\r\n if (this.activeProfile.profileUserFullname.length < 20) {\r\n return this.activeProfile.profileUserFullname;\r\n }\r\n return this.activeProfile.profileUserFullname.substring(0, 15) + \"...\";\r\n }\r\n}\r\n","module.exports = \" \";","import {autoinject, bindable, computedFrom, PLATFORM, Task} from \"aurelia-framework\";\nimport {NotificationService} from \"../../services/notification-service\";\nimport \"./message-bar.less\";\nimport {SharedDto} from \"../../project/project-shared\";\nimport {Dto} from \"../../project/project\";\nimport {Router} from \"aurelia-router\";\nimport {EventAggregator} from \"aurelia-event-aggregator\";\nimport {DeepObserver} from \"../../shared/utils/deep-observer\";\nimport {Disposable} from \"aurelia-binding\";\n\nclass NotificationListItemDto implements Dto.Notification.INotificationListItemDto {\n notificationId: number;\n notificationTemplateId: number;\n externalUserId: number;\n header: string;\n body: string;\n url: string;\n sent: string;\n read?: string;\n\n constructor(n: Dto.Notification.INotificationListItemDto) {\n this.notificationId = n.notificationId;\n this.notificationTemplateId = n.notificationTemplateId;\n this.externalUserId = n.externalUserId;\n this.header = n.header;\n this.body = n.body;\n this.url = n.url;\n this.sent = n.sent;\n this.read = n.read;\n }\n}\n\n@autoinject\nexport class MessageBar {\n\n max_notification_count : number = 99;\n notifications: NotificationListItemDto[];\n results : SharedDto.IPagedResult;\n loading: boolean = true;\n private subscriptions: Disposable[] = [];\n \n constructor(private notificationService : NotificationService,\n private eventAggregator: EventAggregator,\n private readonly router: Router,\n private deepObserver: DeepObserver){\n }\n \n async attached() {\n \n // handles when messages are marked as read in the inbox\n this.eventAggregator.subscribe(NotificationEvents.NotificationRead,(notificationId: number)=> {\n this.removeItem(notificationId);\n });\n\n this.eventAggregator.subscribe(NotificationEvents.AllNotificationsRead,(notificationId: number)=> {\n this.removeAllItems();\n });\n\n this.subscriptions.push(this.deepObserver.observe(this, \"filter\", () => {\n this.notificationService.getUnreadNotifications();\n }));\n\n this.results = await this.notificationService.getUnreadNotifications();\n this.loading = false;\n }\n\n detached() {\n while (this.subscriptions.length > 0) {\n this.subscriptions.pop().dispose();\n }\n }\n \n viewInbox(){\n this.router.navigate('/account/messages', {replace: true});\n }\n \n removeItem(notificationId: number) {\n this.results.totalRecords--;\n this.results.items = this.results.items.filter(x => x.notificationId != notificationId);\n }\n\n removeAllItems() {\n this.results.totalRecords = 0;\n this.results.items = [];\n }\n \n @computedFrom(\"results.totalRecords\")\n get getTotalUnreadFormatted() : string {\n let n = this.results.totalRecords;\n return n > this.max_notification_count ? `${this.max_notification_count}+` : n.toString();\n }\n}\n\nexport class NotificationEvents {\n static NotificationRead = 'notification-read';\n static AllNotificationsRead = 'all-notifications-read';\n}","module.exports = \"\";","import {autoinject, bindable, computedFrom, PLATFORM, Task} from \"aurelia-framework\";\nimport {NotificationService} from \"../../services/notification-service\";\nimport {AuthManager} from \"../../auth/auth-manager\";\nimport \"./notification-bar.less\";\nimport {SharedDto} from \"../../project/project-shared\";\nimport {Dto} from \"../../project/project\";\nimport {Redirect, Router} from \"aurelia-router\";\nimport {EventAggregator} from \"aurelia-event-aggregator\";\nimport {AcquittalService} from \"../../services/acquittal-service\";\nimport {IApplyNowModalConditionsEnum} from \"../../grants/modals/apply-now-modal/apply-now-modal\";\nimport {ILoginOrRegisterModalParams} from \"../../grants/modals/login-or-register-modal/login-or-register-modal\";\nimport {DialogController, DialogService} from \"aurelia-dialog\";\nimport {\n OutstandingAcquittalProfileModalParams\n} from \"../../acquittal/modals/outstanding-acquittal-profile-modal/outstanding-acquittal-profile-modal\";\nimport {ProfileService} from \"../../services/profile-service\";\nimport { Confirm } from \"shared/controls/confirm-modal/confirm\";\n\nclass NotificationListItemDto implements Dto.Notification.INotificationListItemDto {\n notificationId: number;\n notificationTemplateId: number;\n externalUserId: number;\n header: string;\n body: string;\n url: string;\n sent: string;\n read?: string;\n\n constructor(n: Dto.Notification.INotificationListItemDto) {\n this.notificationId = n.notificationId;\n this.notificationTemplateId = n.notificationTemplateId;\n this.externalUserId = n.externalUserId;\n this.header = n.header;\n this.body = n.body;\n this.url = n.url;\n this.sent = n.sent;\n this.read = n.read;\n }\n}\n\n@autoinject\nexport class NotificationBar {\n\n max_notification_count : number;\n notifications: NotificationListItemDto[];\n results : SharedDto.IPagedResult;\n outstandingAcquittalSummaries: Dto.Reporting.IOutstandingAcquittalProfileSummaryItemDto[];\n account: Dto.IUserResponse;\n \n constructor(private notificationService : NotificationService,\n private acquittalService: AcquittalService,\n private eventAggregator: EventAggregator,\n private authManager: AuthManager,\n public readonly dialogController: DialogController,\n private readonly dialogService: DialogService,\n private readonly profileService: ProfileService,\n private readonly confirm: Confirm,\n private readonly router: Router){\n }\n \n async attached() {\n // handles when messages are marked as read in the inbox\n this.eventAggregator.subscribe(NotificationEvents.NotificationRead,(notificationId: number)=> {\n this.removeItem(notificationId);\n });\n\n this.eventAggregator.subscribe(NotificationEvents.AllNotificationsRead,(notificationId: number)=> {\n this.removeAllItems();\n });\n\n this.results = await this.notificationService.getUnreadNotifications();\n this.outstandingAcquittalSummaries = await this.acquittalService.getOutstandingAcquittalProfileSummary();\n this.account = await this.profileService.getAccount();\n \n if (this.outstandingAcquittals) {\n this.results.totalRecords++;\n }\n }\n\n async markAndAction(item: Dto.Notification.INotificationListItemDto){\n let confirmed = await this.profileService.switchProfileIfRequired(item.organisationId, true);\n \n if (confirmed){\n this.removeItem(item.notificationId);\n await this.notificationService.markAsRead(item.notificationId);\n this.router.navigate(item.url, {replace: true});\n }\n }\n \n viewAll(){\n this.router.navigate('/account/messages', {replace: true});\n }\n \n removeItem(notificationId: number) {\n this.results.totalRecords--;\n this.results.items = this.results.items.filter(x => x.notificationId != notificationId);\n }\n\n removeAllItems() {\n this.results.totalRecords = 0;\n this.results.items = [];\n }\n \n @computedFrom(\"results.totalRecords\")\n get getTotalUnreadFormatted() : string {\n let n = this.results.totalRecords;\n return n > this.max_notification_count ? `${this.max_notification_count}+` : n.toString();\n }\n \n @computedFrom(\"outstandingAcquittalSummaries\")\n get outstandingAcquittals(): boolean {\n return this.outstandingAcquittalSummaries != null && this.outstandingAcquittalSummaries.length > 0;\n }\n\n @computedFrom(\"outstandingAcquittalSummaries\")\n get singleOutstandingAcquittals(): boolean {\n return this.outstandingAcquittalSummaries != null && this.outstandingAcquittalSummaries.length == 1;\n }\n \n async openOutstandingAcquittalModal() : Promise {\n // if there is only 1 profile with outstanding acquittals switch to that profile if required and go straight to the acquittals page.\n if (this.outstandingAcquittalSummaries.length == 1){\n \n let summary = this.outstandingAcquittalSummaries[0];\n \n let confirmed = await this.profileService.switchProfileIfRequired(summary.organisationId, true,`You are currently using a different profile. Would you like to change to '${summary.individualProfileId > 0 ? summary.individualName : summary.legalName}'?.`,\n 'Confirm change of profile')\n \n if (confirmed){\n this.router.navigate('manage/acquittal?outstandingAcquittals=true&selectAllYears=true', {replace: true});\n }\n \n return;\n }\n \n // when there is more than 1 profile with outstanding acquittals, give the user a dialog to select te profile they wish to view.\n await this.dialogService.open({\n viewModel: PLATFORM.moduleName('acquittal/modals/outstanding-acquittal-profile-modal/outstanding-acquittal-profile-modal'),\n model: {\n outstandingAcquittalSummaries : this.outstandingAcquittalSummaries,\n account: this.account\n } as OutstandingAcquittalProfileModalParams,\n }).whenClosed((result) => {\n if (result.wasCancelled) {\n this.dialogController.cancel();\n }\n this.dialogController.ok(result.output);\n });\n }\n}\n\nexport class NotificationEvents {\n static NotificationRead = 'notification-read';\n static AllNotificationsRead = 'all-notifications-read';\n}","module.exports = \"\";","import { autoinject, bindable } from \"aurelia-framework\";\nimport \"./divider.less\"\n\n@autoinject\nexport class Divider {\n @bindable word:string;\n}","module.exports = \"\";","import {DialogCancelableOperationResult, DialogController, DialogService} from \"aurelia-dialog\";\nimport { autoinject, PLATFORM } from \"aurelia-framework\";\nimport {activationStrategy, Router} from \"aurelia-router\";\nimport { Dto } from \"project/project\";\nimport { IApplyCheckResult } from \"services/application-service\";\nimport { ProfileService } from \"../../../services/profile-service\";\nimport \"./outstanding-acquittal-profile-modal.less\";\n\nexport interface OutstandingAcquittalProfileModalParams {\n // whatever that user profile object is (required)\n outstandingAcquittalSummaries: Dto.Reporting.IOutstandingAcquittalProfileSummaryItemDto[];\n account: Dto.IUserResponse;\n}\n\n@autoinject\nexport class OutstandingAcquittalProfileModal {\n\n outstandingAcquittalSummaries: Dto.Reporting.IOutstandingAcquittalProfileSummaryItemDto[];\n account: Dto.IUserResponse;\n \n constructor(public readonly dialogController: DialogController,\n private readonly router: Router,\n private readonly dialogService: DialogService,\n private readonly profileService: ProfileService) { }\n\n activate(params: OutstandingAcquittalProfileModalParams) {\n this.outstandingAcquittalSummaries = params.outstandingAcquittalSummaries;\n this.account = params.account;\n }\n\n cancel() {\n this.dialogController.cancel();\n }\n\n async navigateToOutstandingAcquittals(summaryInfo: Dto.Reporting.IOutstandingAcquittalProfileSummaryItemDto) : Promise {\n \n await this.profileService.switchProfileIfRequired(summaryInfo.organisationId, false);\n\n this.router.navigate('manage/acquittal?outstandingAcquittals=true&selectAllYears=true', {replace: true});\n return this.dialogController.close(true);\n }\n \n}\n","module.exports = \" \";","import { autoinject } from \"aurelia-framework\";\r\nimport { DialogController } from \"aurelia-dialog\";\r\nimport { Dto } from \"project/project\";\r\nimport { AdditionalInfoService } from \"services/additional-info-service\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class AdditionalInformationModal{\r\n model: Dto.AdditionalInfo.IAdditionalInformationRequestDto;\r\n applicationId: number;\r\n \r\n constructor(public readonly dialogController: DialogController, \r\n private readonly additionalInfoService: AdditionalInfoService) {\r\n }\r\n\r\n activate(params: IAdditionalInformationModalParams){\r\n this.applicationId = params.applicationId; \r\n return this.additionalInfoService.getRespondedAdditionalInfoRequest(this.applicationId).then((data) => {\r\n this.model = data;\r\n });\r\n }\r\n\r\n downloadDocument(document: SharedDto.IFilePropertiesDto) {\r\n this.additionalInfoService.downloadQuestionDocument(this.applicationId, this.model.additionalInformationRequestId, document);\r\n }\r\n}\r\nexport interface IAdditionalInformationModalParams {\r\n applicationId: number\r\n}","module.exports = \" \";","import { autoinject } from \"aurelia-framework\";\r\nimport { ApplicationService } from \"services/application-service\";\r\nimport { Dto } from \"project/project\";\r\nimport { ApplicationFormCustomElement } from \"shared/controls/online-form/application-form\";\r\nimport { ApplicationFormService } from \"services/application-form-service\";\r\nimport { PermissionError } from \"shared/controls/permission-error\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class ApplicationView {\r\n\r\n applicationId: number;\r\n\r\n existingApplication: Dto.Application.IExternalExistingApplicationDto;\r\n applicationForm: ApplicationFormCustomElement;\r\n\r\n isGeneratingPdf: boolean = false;\r\n\r\n constructor(private readonly applicationService: ApplicationService,\r\n private readonly applicationFormService: ApplicationFormService,\r\n private readonly notifier: Notifier) {\r\n }\r\n\r\n activate(params: { applicationId: number }) {\r\n let promises = [];\r\n\r\n this.applicationId = params.applicationId;\r\n\r\n this.applicationFormService.isIndividual = true;\r\n\r\n promises.push(\r\n this.applicationService.getExistingApplication(this.applicationId).then(form => {\r\n this.existingApplication = form;\r\n }).catch(error => {\r\n if (error instanceof PermissionError) {\r\n this.notifier.error(\"You do not have the required permissinos to view this application.\")\r\n }\r\n throw error;\r\n })\r\n );\r\n\r\n return Promise.all(promises);\r\n }\r\n\r\n exportAsPdf() {\r\n this.isGeneratingPdf = true;\r\n this.applicationService.downloadApplicationAsPdf(this.applicationId).then(() => {\r\n this.isGeneratingPdf = false;\r\n });\r\n }\r\n \r\n\r\n findSystemQuestionTemplate(code: SharedDto.Constants.SystemQuestion): SharedDto.OnlineForm.Form.IQuestionDto {\r\n var temp = [].concat.apply([], this.existingApplication.formTemplate.steps.map(x => x.sections.map(y => y.questions)));\r\n var templateQuestions = [].concat.apply([], temp);\r\n var questionTemplate = (templateQuestions as SharedDto.OnlineForm.Form.IQuestionDto[])\r\n .find(x => x.systemQuestion == code)\r\n\r\n return questionTemplate;\r\n }\r\n\r\n findQuestionAnswer(questionId) {\r\n for (var step of this.existingApplication.applicationForm.formInstance.steps) {\r\n for(var sg of step.sectionGroups) {\r\n for(var sec of sg.sections) {\r\n for(var qg of sec.questionGroups) {\r\n for(var q of qg.questions) {\r\n if(q.templateQuestionId == questionId) {\r\n return q;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","module.exports = \"\";","import { PLATFORM } from \"aurelia-pal\";\r\nimport { Router, RouterConfiguration } from \"aurelia-router\";\r\n\r\nexport class AssessmentsModule {\r\n\r\n router: Router;\r\n\r\n configureRouter(config: RouterConfiguration, router: Router, params) {\r\n config.map([\r\n {\r\n route: '', name: \"AssessmentsList\", moduleId: PLATFORM.moduleName(\"assessments/list\"), title: \"Assessments List\",\r\n },\r\n {\r\n route: [':assessmentCheckId'], name: \"AssessmentsView\", moduleId: PLATFORM.moduleName(\"assessments/view\"), title: \"View Assessment\",\r\n settings: { breadcrumb: true }\r\n },\r\n {\r\n route: [':assessmentCheckId/edit'], name: \"AssessmentsEdit\", moduleId: PLATFORM.moduleName(\"assessments/edit\"), title: \"Edit Assessment\",\r\n settings: { breadcrumb: true }\r\n },\r\n {\r\n route: ['application/:applicationId'], name: \"ApplicationView\", moduleId: PLATFORM.moduleName(\"assessments/application-view\"), title: \"Application View\",\r\n settings: { breadcrumb: true }\r\n }\r\n ]);\r\n this.router = router;\r\n }\r\n}","module.exports = \"\";","import { autoinject } from \"aurelia-dependency-injection\";\r\nimport { DialogController } from \"aurelia-dialog\";\r\nimport { ValidationControllerFactory } from \"aurelia-validation\";\r\nimport { ValidationModuleBase } from \"base-class\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { AssessmentService } from \"services/assesment-service\";\r\n\r\n@autoinject\r\nexport class ConflictOfInterestModal extends ValidationModuleBase {\r\n\r\n comments: string;\r\n isBusy: boolean;\r\n\r\n assessmentCheckId: number;\r\n\r\n constructor(\r\n private readonly notifier: Notifier,\r\n validationControllerFactory: ValidationControllerFactory,\r\n private readonly assessmentService: AssessmentService,\r\n public readonly dialogController: DialogController) {\r\n super(validationControllerFactory)\r\n }\r\n\r\n activate(modal:{assessmentCheckId: number}) {\r\n this.assessmentCheckId = modal.assessmentCheckId;\r\n }\r\n\r\n attached() {\r\n\r\n }\r\n\r\n submit(){\r\n this.isBusy = true;\r\n\r\n this.assessmentService.conflictOfInterest(this.assessmentCheckId, this.comments)\r\n .then(()=>{\r\n this.notifier.success(\"Conflict of interest has been loged.\");\r\n return this.dialogController.ok();\r\n }).catch((error: SharedDto.IErrorResponse)=>{\r\n this.isBusy = false;\r\n this.notifier.error('Unable to update');\r\n }).then(()=>{\r\n this.isBusy = false;\r\n });\r\n }\r\n}\r\n\r\nexport class ConflictOfInterestModalModel{\r\n assessmentCheckId: number;\r\n}","module.exports = \" \";","import { autoinject } from \"aurelia-framework\";\r\nimport { Router } from \"aurelia-router\";\r\nimport { ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\r\nimport { ValidationModuleBase } from \"base-class\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { AssessmentService } from \"services/assesment-service\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { Confirm } from \"shared/controls/confirm-modal/confirm\";\r\nimport { ValidationError } from \"shared/controls/validation-error\";\r\nimport { ClientValidationError } from \"shared/utils/client-validation-error\";\r\nimport { Messages } from \"utils/messages\";\r\n\r\n@autoinject\r\nexport class AssessmentEdit extends ValidationModuleBase {\r\n\r\n saving: boolean;\r\n submitting: boolean;\r\n assessmentCheckId: number;\r\n model: Dto.Assessment.IAssessmentCheckResponseDto;\r\n fundingRecommendations: SharedDto.ICodeListItemDto[];\r\n\r\n validationError: ValidationError;\r\n\r\n constructor(private readonly router: Router,\r\n validationControllerFactory: ValidationControllerFactory,\r\n private readonly notifier: Notifier,\r\n private readonly confirm: Confirm,\r\n private readonly dataService: DataService,\r\n private readonly assessmentService: AssessmentService) {\r\n super(validationControllerFactory)\r\n }\r\n\r\n activate(params: { assessmentCheckId: number }) {\r\n this.assessmentCheckId = params.assessmentCheckId;\r\n\r\n let promises = [];\r\n\r\n promises.push(\r\n this.dataService.getFundingRecommendationOutcomes().then((result) => {\r\n this.fundingRecommendations = result;\r\n })\r\n );\r\n promises.push(\r\n this.assessmentService.getAssessment(this.assessmentCheckId).then(data => {\r\n this.model = data;\r\n })\r\n );\r\n return Promise.all(promises);\r\n }\r\n\r\n attached() {\r\n ValidationRules\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseDto) => x.comments).maxLength(4000)\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseDto) => x.comments).required().when(() => this.submitting)\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseDto) => x.fundingRecommendationOutcome).required().when(() => this.model.requiresFundingReccomendation && this.submitting)\r\n .on(this.model);\r\n\r\n if (this.model.numericTypeList) {\r\n this.model.numericTypeList.forEach(numericQuestion => {\r\n ValidationRules\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseNumericDto) => x.comment).maxLength(4000)\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseNumericDto) => x.numericResult).required().when(() => this.submitting)\r\n .on(numericQuestion);\r\n });\r\n }\r\n\r\n if (this.model.questionTypeList) {\r\n this.model.questionTypeList.forEach(questionType => {\r\n ValidationRules\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseQuestionDto) => x.result).maxLength(4000)\r\n .ensure((x: Dto.Assessment.IAssessmentCheckResponseQuestionDto) => x.result).required().when(() => this.submitting)\r\n .on(questionType);\r\n });\r\n }\r\n }\r\n\r\n bind() {\r\n }\r\n\r\n downloadHelpDocument(helpAttachment: SharedDto.IFilePropertiesDto): void {\r\n this.assessmentService.downloadHelpDocument(this.assessmentCheckId, helpAttachment.fileStorageId);\r\n }\r\n\r\n cancel() {\r\n this.router.navigateToRoute(\"AssessmentsView\", { assessmentCheckId: this.assessmentCheckId });\r\n }\r\n\r\n submit() {\r\n this.submitting = true;\r\n this.controller.validate().then(result => {\r\n if (!result.valid) {\r\n throw new ClientValidationError(result);\r\n }\r\n return this.confirm.confirm(\"By submitting this outcome, you will not be able to edit your assessment. If you are not finished click on No, then use Save instead. To confirm that you are finished and to submit your assessment, click on Yes.\", \"Submit Assessment\").then(ok => {\r\n if (ok) {\r\n return this.assessmentService.saveAssessment(this.assessmentCheckId, this.model, true).then(() => { });\r\n }\r\n else {\r\n var error = new Error();\r\n (error).wasCancelled = true;\r\n throw error;\r\n }\r\n });\r\n }).then(() => {\r\n this.notifier.success(\"Assessment saved and submitted successfully\");\r\n this.router.navigateToRoute(\"AssessmentsView\", { assessmentCheckId: this.assessmentCheckId });\r\n this.saving = false;\r\n }).catch(error => {\r\n if (error.hasOwnProperty('wasCancelled')) {\r\n return;\r\n }\r\n if (error instanceof ClientValidationError) {\r\n this.notifier.standardMessage(Messages.validationHasErrors);\r\n }\r\n else if (error instanceof ValidationError) {\r\n this.validationError = error;\r\n this.notifier.error(\"There were errors performing this operation. Please correct any errors and try again\");\r\n }\r\n else {\r\n this.notifier.standardMessage(Messages.serverError);\r\n }\r\n });\r\n }\r\n\r\n save() {\r\n this.submitting = false;\r\n this.saving = true;\r\n this.controller.validate().then(result => {\r\n if (!result.valid) {\r\n throw new ClientValidationError(result);\r\n }\r\n return this.assessmentService.saveAssessment(this.assessmentCheckId, this.model, false).then(() => { });\r\n }).then(() => {\r\n this.notifier.success(\"Assessment saved successfully\");\r\n this.router.navigateToRoute(\"AssessmentsView\", { assessmentCheckId: this.assessmentCheckId });\r\n }).catch(error => {\r\n if (error instanceof ClientValidationError) {\r\n this.notifier.standardMessage(Messages.validationHasErrors);\r\n }\r\n else if (error instanceof ValidationError) {\r\n this.validationError = error;\r\n this.notifier.error(\"There were errors performing this operation. Please correct any errors and try again\");\r\n }\r\n else {\r\n this.notifier.standardMessage(Messages.serverError);\r\n }\r\n }).then(() => {\r\n this.saving = false;\r\n });\r\n }\r\n\r\n viewApplication() {\r\n window.open(this.router.generate(\"ApplicationView\", { applicationId: this.model.applicationId }), '_blank');\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, PLATFORM } from \"aurelia-framework\";\r\nimport { Logger } from \"aurelia-logging\";\r\nimport { Router } from \"aurelia-router\";\r\nimport { AssessmentService } from \"services/assesment-service\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Dto } from \"project/project\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { AssessmentCheckStatusLabelClassMap } from \"shared/utils/assessments/assessment-status-label-map\";\r\nimport { DialogService } from \"aurelia-dialog\";\r\nimport { IAdditionalInformationModalParams } from \"./additional-information-modal\";\r\nimport { DeepObserver } from \"shared/utils/deep-observer\";\r\n\r\n@autoinject\r\nexport class AssessmentList {\r\n\r\n searching: boolean;\r\n filter: Dto.Assessment.IApplicationAssessmentSearchFilterDto = {\r\n page: 1,\r\n pageSize: 10,\r\n sortDirection: SharedDto.Constants.SortDirection.Asc,\r\n sortColumn: null,\r\n applicationNumber: null\r\n };\r\n result: SharedDto.IPagedResult;\r\n\r\n filterWatcher: any;\r\n\r\n constructor(private readonly router: Router,\r\n private readonly logger: Logger,\r\n private readonly notifier: Notifier,\r\n private readonly dialogService: DialogService,\r\n private readonly assessmentService: AssessmentService, private readonly deepObserver: DeepObserver) {\r\n\r\n }\r\n\r\n activate() {\r\n return this.search();\r\n }\r\n\r\n viewAssessmentUrl(assessmentCheckId: number) {\r\n return this.router.generate(\"AssessmentsView\", { assessmentCheckId: assessmentCheckId });\r\n }\r\n\r\n viewApplicationUrl(applicationId: number) {\r\n return this.router.generate(\"ApplicationView\", { applicationId: applicationId });\r\n }\r\n\r\n viewAdditionalInfo(applicationId: number){\r\n this.dialogService.open({\r\n viewModel: PLATFORM.moduleName(\"assessments/additional-information-modal\"),\r\n model: {\r\n applicationId: applicationId\r\n } as IAdditionalInformationModalParams\r\n });\r\n }\r\n\r\n bind() {\r\n this.filterWatcher = this.deepObserver.observe(this, \"filter\", () => {\r\n this.search();\r\n })\r\n }\r\n \r\n detached() {\r\n if (this.filterWatcher) {\r\n this.filterWatcher.dispose();\r\n }\r\n }\r\n\r\n search(): Promise {\r\n this.searching = true;\r\n return this.assessmentService.searchAssessments(this.filter).then(data => {\r\n this.result = data;\r\n }).catch(error => {\r\n this.notifier.error(\"An error occurred while trying to retrieve the list of assessments assigned to you.\");\r\n this.logger.error(error);\r\n }).then(() => {\r\n this.searching = false;\r\n });\r\n }\r\n\r\n getStatusLabelClass(item: Dto.Assessment.IApplicationAssessmentSearchResultItemDto): string {\r\n return AssessmentCheckStatusLabelClassMap(item.assessmentCheckResponseStatus);\r\n }\r\n\r\n viewApplication(applicationId: number) {\r\n window.open(this.router.generate(\"ApplicationView\", { applicationId }), '_blank');\r\n }\r\n}","import { SharedDto } from \"project/project-shared\";\r\n\r\nexport function AssessmentCheckStatusLabelClassMap(applicationStatus: SharedDto.Constants.AssessmentCheckResponseStatus): string {\r\n switch (applicationStatus) {\r\n case SharedDto.Constants.AssessmentCheckResponseStatus.Completed:\r\n return \"status-label label label-success\";\r\n case SharedDto.Constants.AssessmentCheckResponseStatus.InProgress:\r\n return \"status-label label label-info\";\r\n case SharedDto.Constants.AssessmentCheckResponseStatus.Pending:\r\n case SharedDto.Constants.AssessmentCheckResponseStatus.AwaitingPreviousStep:\r\n return \"status-label label label-default\";\r\n }\r\n}","module.exports = \" \";","import { Router, RouteConfig, NavigationInstruction, RedirectToRoute } from \"aurelia-router\";\r\nimport { autoinject, PLATFORM } from \"aurelia-framework\";\r\nimport { AssessmentService } from \"services/assesment-service\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { ConflictOfInterestModal, ConflictOfInterestModalModel } from \"./conflict-of-interest-modal\";\r\nimport { DialogService } from \"aurelia-dialog\";\r\nimport { AuthManager } from \"auth/auth-manager\";\r\n\r\nPLATFORM.moduleName('./conflict-of-interest-modal')\r\n\r\n@autoinject\r\nexport class AssessmentsView {\r\n\r\n assessmentCheckId: number;\r\n model: Dto.Assessment.IAssessmentCheckResponseDto;\r\n\r\n\r\n constructor(private readonly router: Router,\r\n private readonly dialogService: DialogService,\r\n private readonly assessmentService: AssessmentService,\r\n private readonly authManager: AuthManager) {\r\n\r\n }\r\n\r\n canActivate(params: { assessmentCheckId: number }, routeConfig: RouteConfig, navigationInstruction: NavigationInstruction) {\r\n if (!this.authManager.isLoggedIn) {\r\n let currentRoute = navigationInstruction.parentInstruction.fragment;\r\n let queryString = navigationInstruction.queryString;\r\n return new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\r\n }\r\n\r\n return true;\r\n }\r\n\r\n activate(params: { assessmentCheckId: number }, routeConfig: RouteConfig, navigationInstruction: NavigationInstruction) {\r\n this.assessmentCheckId = params.assessmentCheckId;\r\n return this.assessmentService.getAssessment(this.assessmentCheckId).then(data => {\r\n this.model = data;\r\n });\r\n }\r\n\r\n edit() {\r\n this.router.navigateToRoute(\"AssessmentsEdit\", { assessmentCheckId: this.assessmentCheckId });\r\n }\r\n\r\n backToList() {\r\n this.router.navigateToRoute(\"AssessmentsList\");\r\n }\r\n\r\n conflict() {\r\n var modalModel = new ConflictOfInterestModalModel();\r\n modalModel.assessmentCheckId = this.assessmentCheckId;\r\n\r\n this.dialogService.open({\r\n model: modalModel,\r\n viewModel: ConflictOfInterestModal\r\n }).whenClosed(result => {\r\n if (!result.wasCancelled) {\r\n this.backToList();\r\n }\r\n });\r\n }\r\n\r\n downloadHelpDocument(helpAttachment: SharedDto.IFilePropertiesDto): void {\r\n this.assessmentService.downloadHelpDocument(this.assessmentCheckId, helpAttachment.fileStorageId);\r\n }\r\n\r\n downloadQuestionAttachment(question: Dto.Assessment.IAssessmentCheckResponseQuestionDto): void {\r\n this.assessmentService.downloadQAResponseAttachment(this.assessmentCheckId, question.assessmentCheckResponseQAId);\r\n }\r\n\r\n downloadNumericQuestionAttachment(question: Dto.Assessment.IAssessmentCheckResponseNumericDto): void {\r\n this.assessmentService.downloadNumericResponseAttachment(this.assessmentCheckId, question.assessmentCheckResponseNumericId);\r\n }\r\n\r\n downloadOutcomeAttachment(): void {\r\n this.assessmentService.downloadFundingRecomendationAttachment(this.assessmentCheckId);\r\n }\r\n\r\n viewApplication() {\r\n window.open(this.router.generate(\"ApplicationView\", { applicationId: this.model.applicationId }), '_blank');\r\n }\r\n}","module.exports = \" \";","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./assessor-invite-response.ts\"));\n\t}, \"assessor-invite\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./manage.ts\"));\n\t}, \"profile-management\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./confirm-new-username.ts\"));\n\t}, \"profile-management\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./password-reset.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./registration.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./router.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./supplier-details.ts\"));\n\t}, \"supplier-portal\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./supplier-portal.ts\"));\n\t}, \"supplier-portal\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./help.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./FAQ.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./applyForGrant.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./applyForGrantLanding.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./grantEnquiry.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./grantSearch.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./grantSubscription.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./compHelp.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./introduction.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./applicationManagement.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./correspondence.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./manageGrantLanding.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./reporting.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./roi.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./viewAwarded.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./createOrgProfile.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./joinAnOrg.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./manageProfileAccess.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./orgUserAccess.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./setupLanding.ts\"));\n\t}, \"grants-directory\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./login.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./profile-select.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./recover-password.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./register-request.ts\"));\n\t}, \"login-registration\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./manage.ts\"));\n\t}, \"applications\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./invite-response.ts\"));\n\t}, \"org-invite\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./organisation-profile.ts\"));\n\t}, \"organisation-management\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./router.ts\"));\n\t}, \"vouchers\");\n}","module.exports = function(cb) {\n\trequire.ensure([], function(require) {\n\t\tcb(require(\"!!../node_modules/awesome-typescript-loader/dist/entry.js??ref--8-0!./welcome.ts\"));\n\t}, \"grants-directory\");\n}","import { bindingMode, Disposable } from \"aurelia-binding\";\nimport { autoinject } from \"aurelia-dependency-injection\";\nimport { bindable, customElement } from \"aurelia-templating\";\nimport * as $ from 'jquery';\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport \"selectize\";\nimport { AddressService } from \"services/address-service\";\nimport { v4 as uuid } from \"uuid\";\nimport \"../../shared/controls/select-input/selectize-plugin-clear\";\n\n@customElement(\"address-search\")\n@autoinject\nexport class AddressSearch {\n\n @bindable({ defaultBindingMode: bindingMode.toView }) searchInputMode: boolean = true;\n @bindable({ defaultBindingMode: bindingMode.toView }) title: string = \"Address\";\n @bindable({ defaultBindingMode: bindingMode.toView }) noPoBox: boolean = true;\n @bindable({ defaultBindingMode: bindingMode.toView }) required: boolean = false;//just used for styling\n\n //set address when selecting a result, or new up an empty model when manually entering an address.\n //\"required\" can be applied to the model to simplify validation when searching.\n @bindable({ defaultBindingMode: bindingMode.twoWay }) address: SharedDto.IAddressDto = null;\n @bindable({defaultBindingMode: bindingMode.twoWay}) debugLog: string[] = [];\n originalAddress: SharedDto.IAddressDto = null;\n\n //track when we're searching, simply to prevent going to manual mid-search.\n searching: boolean = false;\n results: SharedDto.IAddressDto[];\n allResults: SharedDto.IAddressDto[] = [];\n\n selectElement: Element;\n selectizeApi: Selectize.IApi;\n selectedValuesObserver: Disposable;\n\n\n constructor(private readonly addressService: AddressService,\n private readonly element: Element) { }\n\n\n bind() { \n }\n\n attached() { \n this.init();\n }\n\n init() {\n let that = this;\n let requestNo = 1;\n //careful when experimenting with this cocktail of settings that get remote data sources working\n $(this.selectElement).selectize({\n valueField: 'uuid',\n labelField: 'description',\n plugins: ['clear_button'],\n openOnFocus: false,\n selectOnTab: true,\n score: function (search) {\n return function (item) {\n return 1;\n };\n },\n loadThrottle: 300,\n closeAfterSelect: true, \n load: async function (query, callback) {\n\n that.selectizeApi.clearOptions();\n\n if (!query.length) {\n that.selectizeApi.close();\n return callback();\n }\n\n that.searching = true;\n that.addressService.searchAddress(query).then(async data => { \n that.debugLog.push('results updated')\n that.results = data;\n //add a proxy unique ID so selectize works.\n data.forEach(x => (x as any).uuid = uuid());\n for (let address of data) {\n (address as any).uuid = uuid();\n (address as any).description = that.formatAddress(address);\n }\n that.allResults = that.allResults.concat(that.results);\n \n that.debugLog.push('uuids assigned')\n return callback(data);\n }).error(() => {\n return callback();\n }).finally(() => {\n that.searching = false;\n });\n },\n });\n\n this.selectizeApi = (this.selectElement as any).selectize;\n\n //before attaching handlers, add an option and select it to represent current state...\n if (this.address !== null) { \n (this.address as any).uuid = uuid();\n (this.address as any).description = this.formatAddress(this.address);\n this.selectizeApi.addOption(this.address);\n this.selectizeApi.setValue((this.address as any).uuid);\n if(!this.address.suburb || !this.address.postcode || !this.address.australianStateTerritory || !this.address.countryId || !this.address.line1) {\n this.searchInputMode = false;\n }\n }\n\n this.selectizeApi.on('change', (value) => { \n this.debugLog.push('item selected')\n this.itemSelected(value); \n });\n this.selectizeApi.on(\"item_remove\", (value) => { \n this.debugLog.push('item removed')\n this.itemRemoved(); \n });\n this.selectizeApi.on(\"clear\", () => { \n this.debugLog.push('cleared')\n this.itemRemoved(); \n });\n\n //modify selectizes generated input control to avoid chromes really persistent autocomplete functionality\n //wrapped in timeout to ensure selectize has initialzied and still check for null to be extra safe.\n setTimeout(() => {\n let inputelement = this.element.querySelector(\".selectize-input input[type=select-one]\") as HTMLInputElement;\n if (inputelement) {\n inputelement.autocomplete = \"new-password\";\n }\n }, 100);\n }\n\n public changeToManual() {\n this.debugLog.push('changing to manual')\n this.originalAddress = this.address;\n this.debugLog.push('original address: ' + this.formatAddress(this.originalAddress));\n this.address = {} as SharedDto.IAddressDto;\n this.searchInputMode = false;\n }\n\n public changeToSearch() {\n /*note: this order is important - if the address input is still \n rendered while setting adress to null, we'll just get an empty \n object with undefined properties due to binding*/\n this.debugLog.push('changing to search');\n this.searchInputMode = true;\n this.address = null;\n this.address = this.originalAddress;\n this.debugLog.push('restored address: ' + this.formatAddress(this.address));\n }\n\n private formatAddress(address: SharedDto.IAddressDto): string {\n if(!address) {\n return \"\";\n }\n let result = address.line1;\n\n if (address.line2) {\n result += \", \" + address.line2;\n }\n\n if (address.suburb) {\n result += \", \" + address.suburb;\n }\n\n if (address.australianStateTerritory) {\n result += \", \" + Dto.Constants.StateTerritory[address.australianStateTerritory];\n }\n\n if (address.postcode) {\n result += \" \" + address.postcode;\n }\n\n return result;\n }\n\n private itemSelected(item) { \n this.debugLog.push('looking for item', item)\n //map object assign, without the selectize properties\n this.selectizeApi.focus();\n let value = this.results.find(x => (x as any).uuid == item);\n if(!value) {\n this.debugLog.push('item not found in results') \n value = this.allResults.find(x => (x as any).uuid == item);\n if(!value) {\n // sometimes we find nothing due to timing\n this.debugLog.push('item not found in all results either, huh') \n return; \n }\n }\n let newAddress = Object.assign({}, value as any);\n this.debugLog.push(`found address: ${newAddress.description}`)\n delete newAddress.uuid;\n delete newAddress.description;\n this.address = newAddress; \n }\n\n private itemRemoved() {\n this.address = null;\n this.selectizeApi.close();\n this.selectizeApi.clearOptions(); \n }\n\n detached() {\n if (this.selectizeApi) {\n this.selectizeApi.destroy();\n }\n if (this.selectedValuesObserver) {\n this.selectedValuesObserver.dispose();\n }\n }\n}\n","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","import {FrameworkConfiguration, PLATFORM} from \"aurelia-framework\";\r\n\r\nexport function configure(aurelia: FrameworkConfiguration) {\r\n aurelia\r\n .globalResources(PLATFORM.moduleName(\"./recaptcha\"))\r\n .globalResources(PLATFORM.moduleName(\"./table/table-data-attribute\"))\r\n .globalResources(PLATFORM.moduleName(\"./table/table-data-sort-attribute\"))\r\n .globalResources(PLATFORM.moduleName(\"./table/table-data-pagination\"))\r\n .globalResources(PLATFORM.moduleName(\"./panel.html\"))\r\n .globalResources(PLATFORM.moduleName(\"./card.html\"))\r\n .globalResources(PLATFORM.moduleName(\"./password-strength\"))\r\n .globalResources(PLATFORM.moduleName(\"./modal.html\"))\r\n .globalResources(PLATFORM.moduleName(\"./file-view.html\"));\r\n}\r\n","module.exports = \" \";","module.exports = \" \";","import { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationController, ValidationRules } from \"aurelia-validation\";\r\n\r\n@customElement('password-strength')\r\nexport class PasswordStrength {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) password: string;\r\n\r\n passwordStrengthPercentage: string;\r\n passwordStrengthMessage: string;\r\n barColour: string;\r\n\r\n upperCase = new RegExp('[A-Z]');\r\n lowerCase = new RegExp('[a-z]');\r\n numbers = new RegExp('[0-9]');\r\n special = new RegExp('^[a-zA-Z0-9- ]*$');\r\n\r\n passedMinLengthRule: boolean;\r\n passedUpperCaseRule: boolean;\r\n passedLowerCaseRule: boolean;\r\n passedNumberRule: boolean;\r\n passedSpecialCharacterRule: boolean;\r\n\r\n constructor(private readonly validationController: ValidationController) {\r\n\r\n }\r\n\r\n bind() {\r\n ValidationRules\r\n .ensure((model: PasswordStrength) => model.password)\r\n .satisfies((value: string, model: PasswordStrength) => {\r\n //if no password, pass true. parent view model can declare required() if needed.\r\n if (!this.password) return true;\r\n\r\n var rulesMet = 0;\r\n if (this.passedNumberRule) {\r\n rulesMet++;\r\n }\r\n if (this.passedUpperCaseRule) {\r\n rulesMet++;\r\n }\r\n if (this.passedLowerCaseRule) {\r\n rulesMet++;\r\n }\r\n if (this.passedSpecialCharacterRule) {\r\n rulesMet++;\r\n }\r\n return rulesMet >= 3 && this.passedMinLengthRule;\r\n }).withMessage(\"Password does not meet complexity requirements\")\r\n .on(this);\r\n }\r\n\r\n passwordChanged(password) {\r\n\r\n var strengthPercentage = 0;\r\n\r\n if (password.length >= 10) {\r\n this.passedMinLengthRule = true;\r\n strengthPercentage = strengthPercentage + 55;\r\n } else {\r\n this.passedMinLengthRule = false;\r\n }\r\n\r\n if (this.numbers.test(password)) {\r\n this.passedNumberRule = true;\r\n strengthPercentage = strengthPercentage + 15;\r\n } else {\r\n this.passedNumberRule = false;\r\n }\r\n\r\n if (this.upperCase.test(password)) {\r\n this.passedUpperCaseRule = true;\r\n strengthPercentage = strengthPercentage + 15;\r\n } else {\r\n this.passedUpperCaseRule = false;\r\n }\r\n\r\n if (this.lowerCase.test(password)) {\r\n this.passedLowerCaseRule = true;\r\n strengthPercentage = strengthPercentage + 15;\r\n } else {\r\n this.passedLowerCaseRule = false;\r\n }\r\n\r\n if (!this.special.test(password)) {\r\n this.passedSpecialCharacterRule = true;\r\n strengthPercentage = strengthPercentage + 15;\r\n } else {\r\n this.passedSpecialCharacterRule = false;\r\n }\r\n\r\n if (strengthPercentage <= 15) {\r\n this.passwordStrengthMessage = 'Bad';\r\n this.barColour = 'Red';\r\n }\r\n\r\n if (strengthPercentage > 25 && strengthPercentage <= 45) {\r\n this.passwordStrengthMessage = 'Weak';\r\n this.barColour = 'Yellow';\r\n }\r\n\r\n if (strengthPercentage > 45 && strengthPercentage <= 75) {\r\n this.passwordStrengthMessage = 'Good';\r\n this.barColour = 'Orange';\r\n }\r\n\r\n if (strengthPercentage >= 100) {\r\n this.passwordStrengthMessage = 'Strong';\r\n this.barColour = 'Green';\r\n }\r\n\r\n this.passwordStrengthPercentage = strengthPercentage.toString();\r\n // this.validationController.validate()\r\n }\r\n}\r\n","module.exports = \" \";","// From https://www.danyow.net/google-recaptcha-with-aurelia/\r\n\r\nimport {inject, noView, bindable} from 'aurelia-framework';\r\n\r\nconst recaptchaCallbackName = 'setRecaptchaReady';\r\nconst ready = new Promise((resolve) => {\r\n return window[recaptchaCallbackName] = resolve;\r\n});\r\n\r\ndeclare var grecaptcha: any;\r\n\r\n// https://developers.google.com/recaptcha/docs/display#explicit_render\r\nlet script: any = document.createElement('script');\r\nscript.src = `https://www.google.com/recaptcha/api.js?onload=${recaptchaCallbackName}&render=explicit`;\r\nscript.async = true;\r\nscript.defer = true;\r\ndocument.head.appendChild(script);\r\n\r\n@noView()\r\n@inject(Element)\r\nexport class Recaptcha {\r\n\r\n element: Element;\r\n\r\n @bindable verified;\r\n @bindable theme = 'light';\r\n @bindable sitekey;\r\n\r\n private widgetId: any;\r\n private isSet: boolean;\r\n\r\n constructor(element: Element) {\r\n this.element = element;\r\n this.isSet = false;\r\n }\r\n\r\n attached() {\r\n if (this.sitekey != null) {\r\n this.init();\r\n }\r\n }\r\n\r\n reset() {\r\n if (this.isSet && this.widgetId != null) {\r\n grecaptcha.reset(this.widgetId);\r\n this.isSet = false;\r\n }\r\n }\r\n\r\n private init() {\r\n\r\n ready.then(() => {\r\n this.widgetId = grecaptcha.render(this.element, {\r\n 'sitekey': this.sitekey,\r\n 'theme': this.theme,\r\n 'callback': (data: string) => {\r\n this.isSet = true;\r\n this.verified(data);\r\n },\r\n 'expired-callback': () => {\r\n this.verified(\"\");\r\n }\r\n });\r\n return this.widgetId;\r\n });\r\n }\r\n}\r\n","import { bindable, bindingMode, customAttribute } from \"aurelia-framework\";\nimport { SharedDto } from \"project/project-shared\";\n\n//this class essentially just provides a point to bind the filter and data read function for sub attributes such as pager/sorter to call and bind on.\n@customAttribute(\"table-data\")\nexport class TableDataAttribute {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) filter: SharedDto.IPagingFilter;\n}","import { bindable, customElement, bindingMode } from 'aurelia-framework';\n\n//attribution: this code was taken from teh aurelia-bs-grid project and modified to work independantly.\n@customElement('table-data-pagination')\nexport class TableDataPagination {\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) page;\n @bindable() recordCount = 0;\n @bindable() pageSize = 10;\n\n //button configuration\n @bindable() numberOfPageButtons = 5;\n @bindable() showFirstLastButtons = true;\n @bindable() showJumpButtons = false;\n @bindable() canNavigate: () => Promise = () => Promise.resolve(true);\n\n // Disable/enable\n nextDisabled = false;\n prevDisabled = false;\n\n // Total number of items in the dataset\n pageCount = 0;\n pages = [];\n\n constructor() {\n }\n\n changePage(page) {\n return this.canNavigate().then(can => { \n if(can) {\n this.page = this.cap(page);\n this.createPages();\n }\n });\n }\n\n recordCountChanged() {\n this.resetPageIfNotEnoughResults()\n this.createPages();\n }\n\n pageChanged() {\n this.createPages();\n }\n\n cap(page) {\n if (page < 1) {\n return 1;\n }\n if (page > this.pageCount) {\n return this.pageCount;\n }\n\n return page;\n }\n\n bind() {\n this.createPages();\n }\n\n createPages() {\n // Calc the max page number\n if (this.recordCount > 0 && this.pageSize > 0) {\n this.pageCount = Math.ceil(this.recordCount / this.pageSize);\n } else {\n this.pageCount = 1;\n }\n\n // Cap the number of pages to render if the count is less than number to show at once\n var numToRender = this.pageCount < this.numberOfPageButtons ? this.pageCount : this.numberOfPageButtons;\n\n // The current page should try to appear in the middle, so get the median \n // of the number of pages to show at once - this will be our adjustment factor\n var indicatorPosition = Math.ceil(numToRender / 2);\n\n // Subtract the pos from the current page to get the first page no\n var firstPageNumber = this.page - indicatorPosition + 1;\n\n // If the first page is less than 1, make it 1\n if (firstPageNumber < 1) {\n firstPageNumber = 1;\n }\n\n // Add the number of pages to render\n // remember to subtract 1 as this represents the first page number\n var lastPageNumber = firstPageNumber + numToRender - 1;\n\n // If the last page is greater than the page count\n // add the difference to the first/last page\n if (lastPageNumber > this.pageCount) {\n var dif = this.pageCount - lastPageNumber;\n\n firstPageNumber += dif;\n lastPageNumber += dif;\n }\n\n var pages = [];\n\n for (var i = firstPageNumber; i <= lastPageNumber; i++) {\n pages.push(i);\n };\n\n this.pages = pages;\n\n this.updateButtons();\n }\n\n updateButtons() {\n this.nextDisabled = this.page === this.pageCount;\n this.prevDisabled = this.page === 1;\n }\n\n next() {\n if (this.nextDisabled) {\n return;\n }\n this.changePage(this.page + 1);\n }\n last() {\n if (this.nextDisabled) {\n return;\n }\n this.changePage(this.pageCount);\n }\n nextJump() {\n if (this.nextDisabled) {\n return;\n }\n this.changePage(this.page + this.numberOfPageButtons);\n }\n\n prev() {\n if (this.prevDisabled) {\n return;\n }\n this.changePage(this.page - 1);\n }\n prevJump() {\n if (this.prevDisabled) {\n return;\n }\n this.changePage(this.page - this.numberOfPageButtons);\n }\n first() {\n if (this.prevDisabled) { return; }\n this.changePage(1);\n }\n\n private resetPageIfNotEnoughResults() {\n if (this.recordCount < (this.page * this.pageSize)) {\n this.page = 1;\n }\n }\n}\n","module.exports = \" \";","import { autoinject, bindable, customAttribute, BindingEngine, Disposable } from \"aurelia-framework\";\nimport { SharedDto } from \"project/project-shared\";\nimport { TableDataAttribute } from \"./table-data-attribute\";\n\n@customAttribute(\"table-data-sort\")\n@autoinject\nexport class TableDataSortAttribute {\n\n filterDirectionObserver: Disposable;\n filterColumnObserver: Disposable;\n\n @bindable({ primaryProperty: true }) key: string;\n tableElement: any;\n\n filter: SharedDto.IPagingFilter;\n\n constructor(private element: Element,\n private readonly bindingEngine: BindingEngine,\n private readonly tableData: TableDataAttribute) {\n\n if (element.nodeName != 'TH') {\n throw new Error(\"table-data-sort-attribute must be applied to a TH element!\");\n }\n\n if (tableData == undefined) {\n throw new Error(\"table-data-sort attribute applied to a TH element, but cannot find a table-data on the parent table element.\");\n }\n\n //class: sortable-header, asc, desc\n this.element.classList.add(\"sortable-header\");\n }\n\n bind() {\n //get the filter from the parent view model then create some bindings to know when we have to update css classes\n //unsure as to whether creating a local reference to the viewModel.filter is bad or not..\n this.filterColumnObserver = this.bindingEngine.propertyObserver(this.tableData.filter, \"sortColumn\").subscribe(() => {\n this.refreshCssClass();\n });\n this.filterDirectionObserver = this.bindingEngine.propertyObserver(this.tableData.filter, \"sortDirection\").subscribe(() => {\n this.refreshCssClass();\n });\n\n this.element.addEventListener(\"click\", () => {\n var currentColumn = this.getSortColumn();\n var currentDirection = this.getSortDirection();\n\n if (currentColumn == this.key) {\n if (currentDirection == SharedDto.Constants.SortDirection.Asc) {\n this.setSortDirection(SharedDto.Constants.SortDirection.Desc);\n }\n if (currentDirection == SharedDto.Constants.SortDirection.Desc) {\n //user cycled past desc, which probably means they want to remove sorting.\n this.setSortColumn(null);\n this.setSortDirection(SharedDto.Constants.SortDirection.None);\n }\n } else {\n this.setSortColumn(this.key);\n this.setSortDirection(SharedDto.Constants.SortDirection.Asc);\n }\n })\n }\n\n attached() {\n this.refreshCssClass();\n }\n\n private refreshCssClass() {\n var currentColumn = this.getSortColumn();\n var currentDirection = this.getSortDirection();\n if (currentColumn != this.key) {\n this.element.classList.remove(\"asc\");\n this.element.classList.remove(\"desc\");\n } else {\n if (currentDirection == SharedDto.Constants.SortDirection.Desc) {\n this.element.classList.remove(\"asc\");\n this.element.classList.add(\"desc\");\n }\n else if (currentDirection == SharedDto.Constants.SortDirection.Asc) {\n this.element.classList.remove(\"desc\");\n this.element.classList.add(\"asc\");\n } else {\n this.element.classList.remove(\"asc\");\n this.element.classList.remove(\"desc\");\n }\n }\n }\n\n private getSortColumn = (): string => {\n return this.tableData.filter.sortColumn;\n }\n\n private setSortColumn = (key: string) => {\n this.tableData.filter.sortColumn = key;\n }\n\n private getSortDirection = (): SharedDto.Constants.SortDirection => {\n return this.tableData.filter.sortDirection as SharedDto.Constants.SortDirection;\n }\n\n private setSortDirection = (direction: SharedDto.Constants.SortDirection) => {\n this.tableData.filter.sortDirection = direction;\n }\n\n detached() {\n this.element.classList.remove(\"sortable-header\");\n this.filterColumnObserver.dispose();\n this.filterDirectionObserver.dispose();\n }\n}\n","import { DialogController } from \"aurelia-dialog\";\nimport { autoinject, computedFrom } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { ActiveProfile } from \"models/active-profile\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { IApplyCheckResult } from \"services/application-service\";\nimport { ProfileService } from \"services/profile-service\";\nimport { generateApplyUrl } from \"services/url-generators\";\n\nexport interface IApplyNowModalParams {\n profile: ActiveProfile;\n applyNowCondition: IApplyNowModalConditionsEnum;\n content: SharedDto.PublicContent.IPublicContentDetailViewDto;\n availableOrganisationProfiles: Dto.IUserOrganisationProfile[];\n}\n\nexport enum IApplyNowModalConditionsEnum {\n OnlyIndividualCanApply = 1,\n OnlyOrganisationCanApply = 2,\n OrganisationIndividualCanApply = 3\n}\n\n@autoinject\nexport class ApplyNowModal {\n dividerWord: string;\n\n profile: ActiveProfile;\n userDetails: Dto.IUserResponse;\n availableOrganisationProfiles: Dto.IUserOrganisationProfile[];\n nonAvailableOrganisationProfiles: Dto.IUserOrganisationProfile[];\n isThereNonAvailableOrganisationProfiles: boolean;\n\n applyNowCondition: IApplyNowModalConditionsEnum;\n title: string;\n subtitle: string = \"\";\n description: string;\n\n redirect: string;\n\n canIndividual: IApplyNowModalConditionsEnum = IApplyNowModalConditionsEnum.OnlyIndividualCanApply;\n canOrganisation: IApplyNowModalConditionsEnum = IApplyNowModalConditionsEnum.OnlyOrganisationCanApply;\n canIndividualOrganisation: IApplyNowModalConditionsEnum = IApplyNowModalConditionsEnum.OrganisationIndividualCanApply;\n\n constructor(public readonly dialogController: DialogController,\n private readonly router: Router,\n private readonly profileService: ProfileService) {\n this.dividerWord = \"OR\";\n }\n\n async activate(params: IApplyNowModalParams) {\n this.profile = params.profile;\n this.applyNowCondition = params.applyNowCondition;\n this.availableOrganisationProfiles = params.availableOrganisationProfiles;\n\n this.redirect = generateApplyUrl(params.content.contentSlug, params.content.grantRoundSlug);\n this.userDetails = await this.profileService.getAccount();\n this.nonAvailableOrganisationProfiles = this.getNonAvailableOrganisationProfiles(this.availableOrganisationProfiles);\n this.isThereNonAvailableOrganisationProfiles = this.nonAvailableOrganisationProfiles.length ? true : false;\n }\n\n attached() {\n this.applyNowState()\n }\n\n getNonAvailableOrganisationProfiles(organisations: Dto.IUserOrganisationProfile[]) : Dto.IUserOrganisationProfile[] {\n var nonAvailableOrganisationProfiles:Dto.IUserOrganisationProfile[] = [];\n var organisationIds:number[] = [];\n \n organisations.forEach(x => {\n organisationIds.push(x.organisationId)\n }); \n\n this.userDetails.userOrganisationProfiles.forEach(x => {\n if(!organisationIds.includes(x.organisationId)) {\n nonAvailableOrganisationProfiles.push(x)\n }\n });\n\n return nonAvailableOrganisationProfiles;\n }\n\n applyNowState() {\n switch (this.applyNowCondition) {\n case IApplyNowModalConditionsEnum.OnlyIndividualCanApply:\n this.title = \"Only individuals can apply\";\n this.subtitle = \"You are currently logged in with your organisation profile for \" + this.profile.profileDisplayName;\n this.description = \"\";\n break;\n case IApplyNowModalConditionsEnum.OnlyOrganisationCanApply:\n this.title = \"Only organisations can apply\";\n \n if (this.userDetails.userOrganisationProfiles.length <= 0) {\n this.subtitle += \"To apply as an organisation you must register the organisation details\";\n } else {\n this.subtitle += \"Select or create an organisation to apply\";\n }\n\n this.description = \"\";\n break;\n case IApplyNowModalConditionsEnum.OrganisationIndividualCanApply:\n this.title = \"Who are you applying for?\";\n this.subtitle = \"This grant is open to individuals and organisations.\";\n this.description = \"Select who you are applying for:\";\n break;\n default:\n break;\n }\n }\n\n async switchToPersonalAccount() {\n var user = await this.profileService.getAccount()\n await this.profileService.changeActiveProfile(user);\n let checkResult: IApplyCheckResult = { result: 'valid', redirectUrl: null };\n this.dialogController.ok(checkResult);\n }\n\n setOrganisationActiveProfile(organisation: Dto.IUserOrganisationProfile) {\n this.profileService.setActiveProfile({\n profileType: \"Organisation\",\n profileIdentifier: organisation.organisationId,\n profileDisplayName: organisation.legalName,\n profileUserFullname: this.userDetails.fullName,\n profileUserId: this.userDetails.accountId,\n profileAccountStatus: this.userDetails.accountStatus,\n allowedRoutes: organisation.allowedRoutes\n });\n\n let checkResult: IApplyCheckResult = { result: 'valid', redirectUrl: null };\n this.dialogController.ok(checkResult)\n }\n\n registerAnOrganisation() {\n let registerUrl = this.router.generate(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.OrganisationProfile], { organisationId: 'new', redirect: this.redirect });\n let checkResult: IApplyCheckResult = { result: 'redirect', redirectUrl: registerUrl };\n this.dialogController.ok(checkResult);\n }\n\n cancel() {\n this.dialogController.cancel();\n }\n\n modalOk() {\n let checkResult: IApplyCheckResult = { result: 'valid', redirectUrl: null };\n this.dialogController.ok(checkResult);\n }\n\n @computedFrom(\"userDetails.userOrganisationProfiles\")\n get hasOrganisation(): boolean {\n return this.userDetails.userOrganisationProfiles.length <= 0\n }\n\n}\n","module.exports = \" \";","import { DialogController, DialogService } from \"aurelia-dialog\";\nimport { autoinject, PLATFORM } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { IApplyCheckResult } from \"services/application-service\";\nimport { generateApplyUrl } from \"services/url-generators\";\nimport { IApplyNowModalConditionsEnum } from \"../../modals/apply-now-modal/apply-now-modal\";\n\nexport interface ILoginOrRegisterModalParams {\n applicationFormState: IApplyNowModalConditionsEnum;\n content: SharedDto.PublicContent.IPublicContentDetailViewDto;\n}\n\n@autoinject\nexport class LoginOrRegisterModal {\n dividerWord: string;\n applicationFormState: IApplyNowModalConditionsEnum;\n redirect: string;\n content: SharedDto.PublicContent.IPublicContentDetailViewDto;\n hideModal: boolean = false;\n\n constructor(public readonly dialogController: DialogController,\n private readonly router: Router,\n private readonly dialogService: DialogService) { }\n\n activate(params: ILoginOrRegisterModalParams) {\n this.dividerWord = \"OR\";\n this.applicationFormState = params.applicationFormState;\n this.content = params.content;\n this.redirect = generateApplyUrl(params.content.contentSlug, params.content.grantRoundSlug);\n }\n\n async login() {\n let loginLink = this.router.generate(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: this.redirect });\n let checkResult: IApplyCheckResult = {\n result: 'redirect',\n redirectUrl: loginLink\n }\n this.dialogController.ok(checkResult);\n }\n\n async register() {\n if (this.applicationFormState == IApplyNowModalConditionsEnum.OrganisationIndividualCanApply) {\n //hide current modal... a bit hacky but need to prevent overlaying modals\n this.hideModal = true;\n this.dialogService.open({\n viewModel: PLATFORM.moduleName('grants/modals/organisation-individual-can-apply-modal/organisation-individual-can-apply-modal'),\n model: {\n applicationFormState: IApplyNowModalConditionsEnum.OnlyIndividualCanApply, // applicationFormState // << this is the real value\n content: this.content\n } as ILoginOrRegisterModalParams,\n }).whenClosed((result) => {\n if (result.wasCancelled) {\n this.dialogController.cancel();\n }\n this.dialogController.ok(result.output);\n });\n } else {\n let registerUrl = this.router.generate(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Register],\n {\n redirect: this.redirect,\n application: this.applicationFormState.toString(),\n isNew: 1\n });\n let checkResult: IApplyCheckResult = {\n result: 'redirect',\n redirectUrl: registerUrl\n }\n this.dialogController.ok(checkResult);\n }\n }\n\n cancel() {\n this.dialogController.cancel();\n }\n}\n","module.exports = \" \";","import { DialogController } from \"aurelia-dialog\";\nimport { autoinject } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { IApplyCheckResult } from \"services/application-service\";\nimport { generateApplyUrl } from \"services/url-generators\";\nimport { IApplyNowModalConditionsEnum } from \"../apply-now-modal/apply-now-modal\";\n\nexport interface IOrganisationIndividualCanApplyModalParams {\n applicationFormState: IApplyNowModalConditionsEnum;\n content: SharedDto.PublicContent.IPublicContentDetailViewDto;\n}\n\n@autoinject\nexport class OrganisationIndividualCanApplyModal {\n dividerWord: string = \"OR\";\n applicationFormState: IApplyNowModalConditionsEnum;\n redirect: string;\n\n individual: IApplyNowModalConditionsEnum = IApplyNowModalConditionsEnum.OnlyIndividualCanApply;\n organisation: IApplyNowModalConditionsEnum = IApplyNowModalConditionsEnum.OnlyOrganisationCanApply;\n\n constructor(public readonly dialogController: DialogController,\n private readonly router: Router) { }\n\n activate(params: IOrganisationIndividualCanApplyModalParams) {\n this.applicationFormState = params.applicationFormState;\n this.redirect = generateApplyUrl(params.content.contentSlug, params.content.grantRoundSlug)\n }\n\n register(applicationState: IApplyNowModalConditionsEnum) {\n let currentRoute = this.router.currentInstruction.fragment;\n let queryString = this.router.currentInstruction.queryString;\n\n if (this.redirect) {\n currentRoute = this.redirect;\n }\n\n this.applicationFormState = applicationState;\n let registerUrl = this.router.generate(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Register], { redirect: currentRoute, q: queryString, application: this.applicationFormState.toString(), isNew: 1 });\n let checkResult: IApplyCheckResult = {\n result: 'redirect',\n redirectUrl: registerUrl\n }\n this.dialogController.ok(checkResult);\n }\n\n confirm() {\n let checkResult: IApplyCheckResult = { result: 'valid', redirectUrl: null }\n this.dialogController.ok(checkResult);\n }\n}\n","module.exports = \" \";","import { PLATFORM } from \"aurelia-pal\";\nimport { RouteConfig } from \"aurelia-router\";\nimport { Dto } from \"project/project\";\n\nexport let SupplierRoute: RouteConfig[] = [\n {\n route: \"grants/:contentIdentifier/suppliers\",\n name: 'supplier-list',\n nav: false,\n title: \"Supplier list\",\n moduleId: PLATFORM.moduleName(\"grants/suppliers/supplier-portal\", \"supplier-portal\"),\n settings: {\n breadcrumb: true,\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantsDetail],\n auth: false\n }\n },\n {\n route: \"grants/:contentIdentifier/suppliers/:supplierId\",\n name: \"supplier-profile\",\n nav: false,\n title: \"Supplier information\",\n moduleId: PLATFORM.moduleName(\"grants/suppliers/supplier-details\", \"supplier-portal\"),\n settings: {\n breadcrumb: true,\n parent: 'supplier-list',\n auth: false\n }\n }\n];\n\nvar layoutView = PLATFORM.moduleName(\"layouts/default-layout.html\"); // has to be relative to src/\nvar layoutViewModel = PLATFORM.moduleName(\"layouts/default-layout\"); // has to be relative to src/\n\nSupplierRoute.forEach(x => {\n x.layoutView = layoutView;\n x.layoutViewModel = layoutViewModel;\n})","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\r\nimport { Router } from \"aurelia-router\";\r\n\r\n@autoinject\r\nexport class DefaultLayout {\r\n\r\n constructor(public readonly router: Router) {\r\n \r\n }\r\n}","module.exports = \" \";","import { autoinject } from \"aurelia-framework\";\nimport { Dto } from \"project/project\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { ControllerValidateResult, validateTrigger, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { DataService } from \"services/data-service\";\nimport { Recaptcha } from \"controls/recaptcha\";\nimport { AuthService } from \"services/auth-service\";\nimport { Router } from \"aurelia-router\";\nimport { Notifier } from \"services/notifier\";\nimport { ClientValidationError } from \"shared/utils/client-validation-error\";\nimport { getDialogVM } from \"shared/controls/dialog-helper\";\nimport { ProfileService } from \"services/profile-service\";\n\n@autoinject\nexport class ChangePassword extends ValidationModuleBase {\n isBusy: boolean;\n oldPassword: string;\n newPassword: string;\n confirmPassword: string;\n\n constructor(controllerFactory: ValidationControllerFactory,\n private readonly authService: AuthService,\n private readonly router:Router,\n private readonly profileService: ProfileService,\n private readonly notifier: Notifier) {\n \n super(controllerFactory);\n }\n\n activate() {\n \n }\n\n updatePassword() {\n this.isBusy = true;\n\n this.controller.validate().then((result: ControllerValidateResult) => {\n if (result.valid) {\n this.authService.updatePassword(this.oldPassword, this.newPassword).then(() => {\n this.isBusy = false;\n this.resetPasswordFields();\n\n this.profileService.getActiveProfile(true).then(x => {\n this.router.navigate(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome])\n this.notifier.success('Your password has been updated.');\n })\n \n }).catch((error: Error) => {\n this.notifier.error(error.message);\n this.isBusy = false;\n });\n } else {\n this.isBusy = false;\n }\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n this.isBusy = false;\n });\n } \n\n private resetPasswordFields() {\n this.oldPassword = \"\";\n this.newPassword = \"\";\n this.confirmPassword = \"\";\n }\n}","module.exports = \"\";","/// \r\n\r\nimport { Aurelia, PLATFORM } from \"aurelia-framework\";\r\nimport * as LogManager from \"aurelia-logging\";\r\nimport { SetupCustomValidation } from \"./shared/controls/custom-validation\";\r\nimport { ServerAppender } from \"./utils/server-appender\";\r\nimport { ConsoleAppender } from \"aurelia-logging-console\";\r\n\r\nimport 'selectize/dist/css/selectize.css';\r\nimport \"../assets/css/splash.less\";\r\nimport \"../assets/css/styles.less\";\r\nimport \"../assets/css/animations/animations.less\";\r\n\r\n//old browser polyfills\r\nimport * as Bluebird from \"bluebird\";\r\nimport \"whatwg-fetch\";\r\nimport \"element-closest\";\r\nimport \"console-polyfill\";\r\nimport { Config } from \"config/config\";\r\nimport { VersionMismatchService } from \"shared/utils/version-mismatch-service\";\r\nimport \"utils/string-insert\";\r\nimport \"mmenu-light\";//can't use the TS files until we update typescript.\r\nimport 'array-flat-polyfill';\r\n\r\nBluebird.config({ longStackTraces: false /*ENV === \"development\"*/, warnings: false });\r\n\r\nexport async function configure(aurelia: Aurelia) {\r\n aurelia.use\r\n .standardConfiguration()\r\n .plugin(PLATFORM.moduleName(\"aurelia-animator-css\"))\r\n .plugin(PLATFORM.moduleName(\"aurelia-validation\"))\r\n .plugin(PLATFORM.moduleName(\"aurelia-dialog\"))\r\n .feature(PLATFORM.moduleName(\"controls/index\"))\r\n .feature(PLATFORM.moduleName(\"shared/controls/index\"));\r\n\r\n SetupCustomValidation();\r\n\r\n await aurelia.start().then(\r\n () => {\r\n if (ENV === \"development\") {\r\n LogManager.addAppender(new ConsoleAppender());\r\n LogManager.setLevel(LogManager.logLevel.error);\r\n } else {\r\n LogManager.addAppender(aurelia.container.get(ServerAppender));\r\n LogManager.setLevel(LogManager.logLevel.error);\r\n }\r\n var mismatchService = aurelia.container.get(VersionMismatchService);\r\n });\r\n\r\n await aurelia.setRoot(PLATFORM.moduleName(\"shell\"));\r\n}\r\n","import { PLATFORM } from \"aurelia-pal\";\nimport { Router, RouterConfiguration, NavigationInstruction } from \"aurelia-router\";\nimport { Dto } from \"project/project\";\nimport ExternalPageRoutes = Dto.Constants.ExternalPageRoutes;\n\nexport class IndividualBankDetailsModule {\n\n configureRouter(config: RouterConfiguration, router: Router, params) {\n config.map([\n {\n route: ['','bank-details/list'],\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsList],\n moduleId: PLATFORM.moduleName(\"profile/individual/bank-details/list/bank-details-list\"),\n navigationStrategy: this.editRedirectNavStrategy,\n title: \"Personal bank details\",\n nav: false,\n settings: {\n breadcrumb: true,\n parent: ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfile]\n }\n },\n {\n route: ['bank-details/edit'],\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsEdit],\n moduleId: PLATFORM.moduleName(\"profile/individual/bank-details/edit/bank-details-edit\"),\n title: \"Edit personal bank details\",\n nav: false,\n settings: {\n breadcrumb: true,\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsList],\n }\n }\n ]);\n }\n\n private editRedirectNavStrategy = (instruction: NavigationInstruction) => {\n if (instruction.parentInstruction.parentInstruction.params.individualProfileId === \"new\") {\n instruction.config.redirect = \"edit\";\n }\n }\n}","module.exports = \"\";","import { autoinject } from \"aurelia-dependency-injection\";\nimport { Dto } from \"project/project\";\nimport { NumericRule } from \"shared/controls/custom-validation\";\nimport { ValidationRules, ValidationControllerFactory } from \"aurelia-validation\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { Notifier } from \"services/notifier\";\nimport { Router } from \"aurelia-router\";\nimport { Logger } from \"aurelia-logging\";\nimport { SharedDto } from \"project/project-shared\";\nimport { ProfileService } from \"../../../../services/profile-service\";\n\n@autoinject\nexport class OrganisationBankDetailsEdit extends ValidationModuleBase {\n\n bankDetailsId: number;\n isNew: boolean = false;\n saving: boolean = false;\n model: SharedDto.IBankDetailsDto;\n\n constructor(private readonly validationControllerFactory: ValidationControllerFactory,\n private readonly profileService: ProfileService,\n private readonly logger: Logger,\n private readonly notifier: Notifier,\n private readonly router: Router) {\n super(validationControllerFactory)\n }\n\n activate(params: {bankDetailsId: number | \"new\" }) {\n if (params.bankDetailsId === \"new\") {\n this.isNew = true;\n this.model = {\n description: null,\n accountNumber: null,\n accountName: null,\n bsb: null,\n branchLocation: null,\n bankInstitution: null,\n bankDetailsId: null\n };\n } else {\n this.bankDetailsId = +params.bankDetailsId;\n return this.profileService.getIndividualBankDetailsById(this.bankDetailsId).then(data => {\n this.model = data;\n });\n }\n }\n\n attached() {\n ValidationRules\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.description).maxLength(400)\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.accountNumber).displayName(\"Account Number\").required().maxLength(9).satisfiesRule(NumericRule)\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.accountName).displayName(\"Account Name\").required()\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.bsb).displayName(\"BSB\").required().maxLength(6).satisfiesRule(NumericRule)\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.branchLocation).displayName(\"Branch Location\").required().maxLength(400)\n .ensure((bt: SharedDto.IBankDetailsDto) => bt.bankInstitution).displayName(\"Financial Institution\").required().maxLength(30)\n .on(this.model)\n }\n\n cancel() {\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsList]);\n }\n\n save() {\n this.controller.validate().then(result => {\n if (!result.valid) {\n return;\n }\n\n var savePromise: Promise;\n if (this.isNew) {\n savePromise = this.profileService.addIndividualBankDetails(this.model);\n } else {\n savePromise = this.profileService.updateIndividualBankDetails(this.bankDetailsId, this.model);\n }\n savePromise.then(() => {\n this.notifier.success(\"The record was saved successfuly.\");\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsList]);\n }).catch(error => {\n this.logger.error(error);\n this.notifier.error(\"An error occurred while trying to update the bank details.\");\n });\n });\n }\n}","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\nimport { Router } from \"aurelia-router\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { ProfileService } from \"../../../../services/profile-service\";\n\n@autoinject\nexport class IndividualBankDetailsList {\n // organisation: Dto.IOrganisationDto;\n // organisationId: number;\n bankDetails: SharedDto.IBankDetailsDto[] = [];\n\n constructor(private readonly router: Router,\n private readonly profileService: ProfileService){\n }\n\n activate() {\n // this.organisationId = params.organisationId;\n\n let promises = [\n // this.organisationService.getOrganisation(this.organisationId).then(organisation => {\n // this.organisation = organisation;\n // }),\n this.profileService.getIndividualBankDetails().then(data => {\n this.bankDetails = data;\n })\n ];\n\n return Promise.all(promises);\n }\n\n edit(bankDetailId: number) {\n this.router.navigateToRoute(\"IndividualBankDetailsEdit\", { bankDetailsId: bankDetailId });\n }\n \n // remove(bankDetailId: number) {\n // this.profileService.deleteIndividualBankDetails(bankDetailId).then(result => {\n // \n // if (!result)\n // {\n // \n // }\n // \n // this.profileService.getIndividualBankDetails().then(data => {\n // this.bankDetails = data;\n // });\n // }\n // );\n // }\n \n add() {\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualBankDetailsEdit], { bankDetailsId: \"new\" });\n }\n}","module.exports = \" \";","import { EventAggregator } from \"aurelia-event-aggregator\";\nimport { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { ControllerValidateResult, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { Notifier } from \"services/notifier\";\nimport { AuthService } from \"services/auth-service\";\n\n@autoinject\nexport class ChangePasswordEdit extends ValidationModuleBase {\n\n isBusy: boolean;\n oldPassword: string = \"\";\n newPassword: string = \"\";\n confirmPassword: string = \"\";\n\n constructor(controllerFactory: ValidationControllerFactory,\n private notifier: Notifier,\n private authService: AuthService) {\n super(controllerFactory);\n }\n \n updatePassword() {\n this.isBusy = true;\n\n this.controller.validate().then((result: ControllerValidateResult) => {\n if (result.valid) {\n this.authService.updatePassword(this.oldPassword, this.newPassword).then(() => {\n this.isBusy = false;\n this.resetPasswordFields();\n this.notifier.success('Your password has been updated.');\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n this.isBusy = false;\n });\n } else {\n this.isBusy = false;\n }\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n this.isBusy = false;\n });\n } \n\n private resetPasswordFields() {\n this.oldPassword = \"\";\n this.newPassword = \"\";\n this.confirmPassword = \"\";\n }\n}\n","module.exports = \"\";","import { EventAggregator } from \"aurelia-event-aggregator\";\nimport { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { ControllerValidateResult, validateTrigger, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { BroadcastEvents } from \"models/broadcast-events\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { DataService } from \"services/data-service\";\nimport { Notifier } from \"services/notifier\";\nimport { ProfileService } from \"services/profile-service\";\nimport { AddressInput } from \"shared/controls/address/address\";\nimport { DateOfBirthRule, NotAPOBox, NumericRule, PersonNameRule } from \"shared/controls/custom-validation\";\nimport { ValidationError } from \"shared/controls/validation-error\";\nimport { DeepObserver } from \"shared/utils/deep-observer\";\nimport { Router } from \"aurelia-router\";\nimport { addressArrayToString } from 'shared/utils/address-utils';\nimport { ChangeUsername } from \"account-management/manage-account/change-username\";\n\n@autoinject\nexport class ChangeUsernameEdit extends ValidationModuleBase {\n\n isBusy: boolean;\n newEmailAddress: string;\n private newUsernameRules: ValidationRules[];\n profile: Dto.IPersonalProfileDto;\n\n constructor(controllerFactory: ValidationControllerFactory,\n private notifier: Notifier,\n private profileService: ProfileService,\n private eventAggregator: EventAggregator) {\n super(controllerFactory);\n\n this.controller.validateTrigger = validateTrigger.manual;\n }\n\n activate(){\n var profilePromise = this.profileService.getIndividualProfile().then((data: Dto.IPersonalProfileDto) => {\n this.profile = data;\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n });\n }\n\n attached() {\n ValidationRules\n .ensure((m: ChangeUsername) => m.newEmailAddress).email().required().maxLength(254)\n .on(this);\n }\n\n updateUsername() {\n this.isBusy = true;\n this.controller.validate({ rules: this.newUsernameRules, object: this }).then((result: ControllerValidateResult) => {\n if (result.valid) {\n this.profileService.updateUsername(this.newEmailAddress).then(() => {\n this.isBusy = false;\n this.newEmailAddress = \"\";\n this.notifier.success(\"An email has been sent to your current email address to confirm this change.\");\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n this.isBusy = false;\n });\n } else {\n this.isBusy = false;\n }\n }).catch((error: SharedDto.IErrorResponse) => {\n this.isBusy = false;\n });\n }\n}\n","module.exports = \"\";","import { BindingEngine, computedFrom, Disposable, observable } from \"aurelia-binding\";\nimport { EventAggregator } from \"aurelia-event-aggregator\";\nimport { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { ControllerValidateResult, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { BroadcastEvents } from \"models/broadcast-events\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { DataService } from \"services/data-service\";\nimport { Notifier } from \"services/notifier\";\nimport { ProfileService } from \"services/profile-service\";\nimport { AddressInput } from \"shared/controls/address/address\";\nimport { NotAPOBox, NumericRule, PersonNameRule } from \"shared/controls/custom-validation\";\nimport { ValidationError } from \"shared/controls/validation-error\";\nimport { addressArrayToString } from 'shared/utils/address-utils';\nimport { DeepObserver } from \"shared/utils/deep-observer\";\n\n@autoinject\nexport class ContactInformationEdit extends ValidationModuleBase {\n\n profile: Dto.IPersonalProfileDto;\n titleList: SharedDto.ICodeListItemDto[];\n\n dateOfBirth: string;\n isBusy: boolean;\n validationError: ValidationError;\n\n subscriptions: Disposable[] = [];\n residentialAddressChanged: boolean = false;\n residentialAddressManualInput: boolean = false;\n postalAddressChanged: boolean = false;\n postalAddressManualInput: boolean = false;\n\n @observable() postalAddressIsDifferent: boolean = false;\n\n residentialAddressLabel: string = \"Residential address\";\n postalAddressLabel: string = \"Postal address\";\n redirect: string;\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) postalAddressModel: AddressInput;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) residentialAddressModel: AddressInput;\n\n constructor(controllerFactory: ValidationControllerFactory,\n private readonly profileService: ProfileService,\n private readonly dataService: DataService,\n private readonly notifier: Notifier,\n private readonly bindingEngine: BindingEngine,\n private readonly eventAggregator: EventAggregator,\n private readonly deepObserver: DeepObserver,\n private readonly router: Router) {\n super(controllerFactory);\n\n this.isBusy = false;\n }\n\n activate(params: { redirect: string }) {\n this.redirect = params.redirect;\n\n var titlePromise = this.dataService.getTitles().then((data: SharedDto.ICodeListItemDto[]) => {\n this.titleList = data;\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n });\n\n var profilePromise = this.profileService.getIndividualProfile().then(data => {\n this.profile = data;\n this.postalAddressIsDifferent = !this.profile.postalSameAsResidentialAddress;\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n });\n return Promise.all([titlePromise, profilePromise]);\n }\n\n postalAddressIsDifferentChanged() {\n if (this.profile) {\n this.profile.postalSameAsResidentialAddress = !this.postalAddressIsDifferent;\n }\n }\n\n revalidatePhoneNumbers() {\n this.controller.validate({ object: this.profile, propertyName: \"workPhoneNumber\" });\n this.controller.validate({ object: this.profile, propertyName: \"mobilePhoneNumber\" });\n this.controller.validate({ object: this.profile, propertyName: \"homePhoneNumber\" });\n }\n\n bind() {\n ValidationRules\n .ensure((m: Dto.IPersonalProfileDto) => m.titleId).displayName(\"Title\").required()\n .ensure((m: Dto.IPersonalProfileDto) => m.familyName).required().maxLength(150).satisfiesRule(PersonNameRule)\n .ensure((m: Dto.IPersonalProfileDto) => m.givenName).required().maxLength(150).satisfiesRule(PersonNameRule)\n .ensure((m: Dto.IPersonalProfileDto) => m.middleName).maxLength(150).satisfiesRule(PersonNameRule)\n .ensure((m: Dto.IPersonalProfileDto) => m.mobilePhoneNumber).required()\n .ensure((m: Dto.IPersonalProfileDto) => m.residentialAddress).required()\n .ensure((m: Dto.IPersonalProfileDto) => m.postalAddress)\n .required()\n .when(m => !m.postalSameAsResidentialAddress)\n .on(this.profile);\n }\n\n\n detached() {\n while (this.subscriptions.length > 0) {\n this.subscriptions.pop().dispose();\n }\n }\n\n async saveIndividualProfile() {\n this.isBusy = true;\n\n var valid = await this.controller.validate();\n if(!valid.valid) {\n this.isBusy = false;\n return;\n }\n \n return this.profileService.updateIndividualProfile(this.profile)\n .then(() => {\n this.notifier.success(\"Profile changes successfully saved.\");\n this.eventAggregator.publish(BroadcastEvents.profileDataChanged);\n this.validationError = null;\n this.postalAddressChanged = false;\n this.residentialAddressChanged = false;\n\n // if redirect is defined then redirect once profile is finish editing\n if(this.redirect) {\n this.router.navigate(this.redirect);\n } else {\n\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfileView]);\n }\n }).catch((error: Error) => {\n if (error instanceof ValidationError) {\n this.validationError = error;\n }\n }).finally(() => {\n this.isBusy = false;\n });\n }\n\n cancel() {\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfileView]);\n }\n\n @computedFrom(\"profile.residentialAddress\")\n get residentialAddress(): string {\n return addressArrayToString(this.profile.residentialAddress);\n }\n\n @computedFrom(\"profile.postalAddress\")\n get postalAddress(): string {\n return addressArrayToString(this.profile.postalAddress);\n }\n\n @computedFrom(\"profile.workPhoneNumber\", \"profile.homePhoneNumber\")\n get contactLabel(): string {\n var contactLabel = \"Contact number\";\n\n if (this.profile.workPhoneNumber) {\n contactLabel = \"Mobile\";\n }\n\n if (this.profile.homePhoneNumber) {\n contactLabel = \"Mobile\";\n }\n\n return contactLabel;\n }\n}\n","module.exports = \" \";","import { BindingEngine, computedFrom, Disposable } from \"aurelia-binding\";\nimport { EventAggregator } from \"aurelia-event-aggregator\";\nimport { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { ControllerValidateResult, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { BroadcastEvents } from \"models/broadcast-events\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { DataService } from \"services/data-service\";\nimport { Notifier } from \"services/notifier\";\nimport { ProfileService } from \"services/profile-service\";\nimport { AddressInput } from \"shared/controls/address/address\";\nimport { DateOfBirthRule, NotAPOBox, NumericRule, PersonNameRule } from \"shared/controls/custom-validation\";\nimport { ValidationError } from \"shared/controls/validation-error\";\nimport { DeepObserver } from \"shared/utils/deep-observer\";\nimport { Router } from \"aurelia-router\";\nimport { addressArrayToString } from 'shared/utils/address-utils';\n\n@autoinject\nexport class ContactInformationView {\n profile: Dto.IPersonalProfileDto;\n titleList: SharedDto.ICodeListItemDto[];\n\n\n isBusy: boolean;\n \n @bindable({ defaultBindingMode: bindingMode.twoWay }) postalAddressModel: AddressInput;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) residentialAddressModel: AddressInput;\n\n constructor(\n private readonly profileService: ProfileService,\n private readonly dataService: DataService,\n private readonly notifier: Notifier) {\n \n this.isBusy = false;\n }\n\n activate() {\n var titlePromise = this.dataService.getTitles().then((data: SharedDto.ICodeListItemDto[]) => {\n this.titleList = data;\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n });\n\n var profilePromise = this.profileService.getIndividualProfile().then((data: Dto.IPersonalProfileDto) => {\n this.profile = data;\n }).catch((error: Error) => {\n this.notifier.error(error.message);\n });\n return Promise.all([titlePromise, profilePromise]);\n }\n\n @computedFrom(\"profile.residentialAddress\")\n get residentialAddress(): string {\n return addressArrayToString(this.profile.residentialAddress);\n }\n\n @computedFrom(\"profile.postalAddress\")\n get postalAddress(): string {\n return addressArrayToString(this.profile.postalAddress);\n }\n\n @computedFrom(\"profile.workPhoneNumber\", \"profile.homePhoneNumber\")\n get contactLabel(): string {\n var contactLabel = \"Contact number\";\n\n if(this.profile.workPhoneNumber) {\n contactLabel = \"Mobile\";\n }\n\n if(this.profile.homePhoneNumber) {\n contactLabel = \"Mobile\";\n }\n \n return contactLabel;\n }\n}\n","module.exports = \"\";","import { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\nimport { ValidationRules } from \"aurelia-validation\";\n\n@autoinject\nexport class ChangePasswordForm {\n isBusy: boolean;\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) oldPassword: string;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) newPassword: string;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) confirmPassword: string;\n\n bind() {\n ValidationRules\n .ensure((model: ChangePasswordForm) => model.oldPassword)\n .required()\n .ensure((model: ChangePasswordForm) => model.newPassword)\n .required()\n .ensure((model: ChangePasswordForm) => model.confirmPassword)\n .required()\n .satisfies((value: string, object: ChangePasswordForm) => {\n return value === object.newPassword;\n }).withMessage('Passwords do not match.')\n .on(this);\n }\n}","module.exports = \"\";","import { autoinject, bindable, bindingMode } from \"aurelia-framework\";\nimport { Router } from \"aurelia-router\";\n\n@autoinject\nexport class LeftSidebar {\n @bindable() theRouter: Router;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) toggle:boolean;\n\n offCanvasElement: HTMLElement;\n drawer: any;\n\n attached() {\n var menu = new MmenuLight(this.offCanvasElement);\n this.drawer = menu.offcanvas({ position: 'left' });\n }\n\n toggleChanged(newValue:boolean) {\n newValue ? this.openFilter() : \"\";\n }\n\n openFilter(){\n this.drawer.open();\n }\n\n}","module.exports = \"\";","import { RouterConfiguration, Router } from \"aurelia-router\";\r\nimport { autoinject, PLATFORM } from \"aurelia-framework\";\r\nimport { Dto } from \"project/project\";\r\n\r\n\r\n@autoinject\r\nexport class AccountDetailsModule {\r\n router: Router;\r\n toggle:boolean = false; \r\n\r\n showSidebar() {\r\n this.toggle = !this.toggle;\r\n }\r\n\r\n configureRouter(config: RouterConfiguration, router: Router, params) {\r\n config.map([\r\n { route: '', redirect: 'contact-information' },\r\n {\r\n route: 'contact-information', \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfileView],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/contact-information/view/contact-information-view\"),\r\n title: \"Contact information\",\r\n nav: true,\r\n settings: {\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n route: ['contact-information/edit'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfileEdit],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/contact-information/edit/contact-information-edit\"),\r\n title: \"Edit contact information\",\r\n nav: false,\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfileView],\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n route: ['bank-details'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.BankDetailsView],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/bank-details/bank-details\"),\r\n title: \"Personal bank details\",\r\n nav: true,\r\n settings: {\r\n breadcrumb: true\r\n }\r\n },\r\n // {\r\n // route: ['messages'],\r\n // name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageNotifications],\r\n // moduleId: PLATFORM.moduleName(\"notification/list\"),\r\n // title: \"Messages\",\r\n // nav: true,\r\n // settings: {\r\n // breadcrumb: true\r\n // }\r\n // },\r\n {\r\n route: ['change-password'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageAccountChangePassword],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/change-password/edit/change-password-edit\"),\r\n title: \"Change password\",\r\n nav: true,\r\n settings: {\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n route: ['change-username'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageAccountChangeUsername],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/change-username/edit/change-username-edit\"),\r\n title: \"Change username\",\r\n nav: true,\r\n settings: {\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n route: ['subscription'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Subscription],\r\n moduleId: PLATFORM.moduleName(\"profile/individual/subscription/edit/subscription-edit\"),\r\n title: \"Subscription\",\r\n nav: true,\r\n settings: {\r\n breadcrumb: true\r\n }\r\n },\r\n ]);\r\n\r\n this.router = router;\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, Disposable } from \"aurelia-framework\";\nimport { RedirectToRoute, Router } from \"aurelia-router\";\nimport { AuthManager } from \"auth/auth-manager\";\nimport { Dto } from \"project/project\";\nimport { SharedDto } from \"project/project-shared\";\nimport { DataService } from \"services/data-service\";\nimport { Notifier } from \"services/notifier\";\nimport { SubscriptionService } from \"services/subscription-service\";\nimport { Messages } from \"utils/messages\";\nimport { ValidationModuleBase } from \"base-class\";\nimport { ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { ClientValidationError } from \"shared/utils/client-validation-error\";\nimport { HasElementsRule } from \"shared/controls/custom-validation\";\nimport { ProfileService } from \"services/profile-service\";\nimport { ActiveProfile } from \"models/active-profile\";\n\ninterface ISelectedCategory extends SharedDto.ICodeListItemDto {\n selected?: boolean\n}\n\n@autoinject\nexport class SubcriptionEdit extends ValidationModuleBase {\n categories: ISelectedCategory[] | ISelectedCategory[];\n options: Dto.ISubscriptionOptionsDto;\n entity: \"individual\" | \"organisation\" | \"both\" = \"both\";\n\n watchers: Disposable[] = [];\n busy: boolean = false;\n\n activeProfile: ActiveProfile;\n\n constructor(private readonly authManager: AuthManager,\n private readonly subscriptionService: SubscriptionService,\n private readonly dataService: DataService,\n private readonly notifier: Notifier,\n private readonly router: Router,\n private readonly profileService: ProfileService,\n validationControllerFactory: ValidationControllerFactory) {\n super(validationControllerFactory, false);\n }\n\n canActivate(params: { unsubscribe?: boolean }, routeConfig, navigationInstruction) {\n if (!this.authManager.isLoggedIn) {\n let currentRoute = navigationInstruction.fragment;\n let queryString = navigationInstruction.queryString;\n return new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\n }\n\n return true;\n }\n\n activate(params: { unsubscribe?: boolean, orgId?: number, individual?: boolean }, routeConfig, navigationInstruction) {\n this.options = {} as Dto.ISubscriptionOptionsDto; // stops aurelia validation issue when navigating before loading options\n let unsubscribe = params.hasOwnProperty('unsubscribe');\n\n // always need categories first\n return this.dataService.getCategoryByLevel(1).then(categories => {\n this.categories = categories;\n }).then(() => {\n return this.profileService.getActiveProfile().then(activeProfile => {\n this.activeProfile = activeProfile;\n });\n }).catch(() => {\n this.notifier.error(\"Unable to retrieve active profile.\");\n }).then(() => {\n if (unsubscribe) {\n // can't use this.unsubscribeAll because it requires categories to be loaded...\n let options: Dto.ISubscriptionOptionsDto = {\n categoryIds: [],\n receiveEmails: false,\n subscribeIndividual: false,\n subscribeOrganisation: false,\n organisationId: params.orgId\n }\n return this.subscriptionService.updateSubscriptionOptions(options);\n }\n }).then(() => {\n if (unsubscribe) {\n this.notifier.success(`${params.orgId ? 'Organisation has been' : 'You have been'} unsubscribed from all emails.`);\n }\n }).catch(() => {\n if (unsubscribe) {\n this.notifier.error(`An error occurred unsubscribing ${params.orgId ? 'organisation' : 'you'} from our emails. Please try again.`);\n }\n }).then(() => {\n if (unsubscribe) {\n // renavigate to remove the ?unsubscribe query string\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome]);\n return;\n }\n if(this.activeProfile.profileType == 'Individual')\n {\n return this.subscriptionService.getSubscriptionOptions();\n }\n return this.subscriptionService.getOrganisationSubscriptionOptions(this.activeProfile.profileIdentifier);\n }).then(subscriptionOptions => {\n if (unsubscribe) {\n return;\n }\n this.options = subscriptionOptions;\n if (subscriptionOptions.subscribeIndividual && subscriptionOptions.subscribeOrganisation) {\n this.entity = \"both\";\n }\n else if (subscriptionOptions.subscribeIndividual) {\n this.entity = \"individual\";\n }\n else if (subscriptionOptions.subscribeOrganisation) {\n this.entity = \"organisation\";\n }\n else {\n this.entity = \"both\"; // nothing means both\n }\n\n subscriptionOptions.categoryIds.forEach(s => {\n let category = this.categories.find(c => c.id == s);\n if (category != null) {\n // in case the DB changes\n category.selected = true;\n }\n });\n });\n }\n\n bind() {\n ValidationRules.ensure((o: Dto.ISubscriptionOptionsDto) => o.categoryIds)\n .satisfiesRule(HasElementsRule).when(o => o.receiveEmails).withMessage(\"Please choose at least one category\")\n .on(this.options);\n }\n\n unsubscribeAll(): Promise {\n this.categories.forEach(b => b.selected = false);\n this.options.receiveEmails = false;\n return this.save();\n }\n\n save(): Promise {\n this.busy = true;\n this.options.categoryIds = this.categories.filter(c => c.selected).map(c => c.id);\n this.options.subscribeIndividual = this.entity == \"individual\" || this.entity == \"both\";\n this.options.subscribeOrganisation = this.entity == \"organisation\" || this.entity == \"both\";\n this.options.organisationId = this.activeProfile.profileType == 'Organisation' ? this.activeProfile.profileIdentifier : null;\n\n return this.controller.validate().then(result => {\n if (!result.valid) {\n throw new ClientValidationError(result);\n }\n this.notifier.clear();\n return this.subscriptionService.updateSubscriptionOptions(this.options);\n }).then(() => {\n this.notifier.success('Your subscription preferences have been updated');\n }).catch(error => {\n if (error instanceof ClientValidationError) {\n return;\n }\n this.notifier.standardMessage(Messages.serverError);\n }).then(() => {\n this.busy = false;\n });\n }\n\n optin() {\n if (this.options.receiveEmails && this.categories.filter(c => c.selected).length == 0) {\n this.categories.forEach(c => c.selected = true);\n }\n }\n}","module.exports = \"\";","import { autoinject, Disposable } from \"aurelia-framework\";\r\nimport { RedirectToRoute, Router } from \"aurelia-router\";\r\nimport { AuthManager } from \"auth/auth-manager\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { SubscriptionService } from \"services/subscription-service\";\r\nimport { Messages } from \"utils/messages\";\r\nimport { ValidationModuleBase } from \"base-class\";\r\nimport { ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\r\nimport { ClientValidationError } from \"shared/utils/client-validation-error\";\r\nimport { HasElementsRule } from \"shared/controls/custom-validation\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { ActiveProfile } from \"models/active-profile\";\r\n\r\ninterface ISelectedCategory extends SharedDto.ICodeListItemDto {\r\n selected?: boolean\r\n}\r\n\r\n@autoinject\r\nexport class Subscriptions extends ValidationModuleBase {\r\n categories: ISelectedCategory[] | ISelectedCategory[];\r\n options: Dto.ISubscriptionOptionsDto;\r\n entity: \"individual\" | \"organisation\" | \"both\" = \"both\";\r\n\r\n watchers: Disposable[] = [];\r\n busy: boolean = false;\r\n\r\n activeProfile: ActiveProfile;\r\n\r\n constructor(private readonly authManager: AuthManager,\r\n private readonly subscriptionService: SubscriptionService,\r\n private readonly dataService: DataService,\r\n private readonly notifier: Notifier,\r\n private readonly router: Router,\r\n private readonly profileService: ProfileService,\r\n validationControllerFactory: ValidationControllerFactory) {\r\n super(validationControllerFactory, false);\r\n }\r\n\r\n canActivate(params: { unsubscribe?: boolean }, routeConfig, navigationInstruction) {\r\n if (!this.authManager.isLoggedIn) {\r\n let currentRoute = navigationInstruction.fragment;\r\n let queryString = navigationInstruction.queryString;\r\n return new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString });\r\n }\r\n\r\n return true;\r\n }\r\n\r\n activate(params: { unsubscribe?: boolean, orgId?: number, individual?: boolean }, routeConfig, navigationInstruction) {\r\n this.options = {} as Dto.ISubscriptionOptionsDto; // stops aurelia validation issue when navigating before loading options\r\n let unsubscribe = params.hasOwnProperty('unsubscribe');\r\n\r\n // always need categories first\r\n return this.dataService.getCategoryByLevel(1).then(categories => {\r\n this.categories = categories;\r\n }).then(() => {\r\n return this.profileService.getActiveProfile().then(activeProfile => {\r\n this.activeProfile = activeProfile;\r\n });\r\n }).catch(() => {\r\n this.notifier.error(\"Unable to retrieve active profile.\");\r\n }).then(() => {\r\n if (unsubscribe) {\r\n // can't use this.unsubscribeAll because it requires categories to be loaded...\r\n let options: Dto.ISubscriptionOptionsDto = {\r\n categoryIds: [],\r\n receiveEmails: false,\r\n subscribeIndividual: false,\r\n subscribeOrganisation: false,\r\n organisationId: params.orgId\r\n }\r\n return this.subscriptionService.updateSubscriptionOptions(options);\r\n }\r\n }).then(() => {\r\n if (unsubscribe) {\r\n this.notifier.success(`${params.orgId ? 'Organisation has been' : 'You have been'} unsubscribed from all emails.`);\r\n }\r\n }).catch(() => {\r\n if (unsubscribe) {\r\n this.notifier.error(`An error occurred unsubscribing ${params.orgId ? 'organisation' : 'you'} from our emails. Please try again.`);\r\n }\r\n }).then(() => {\r\n if (unsubscribe) {\r\n // renavigate to remove the ?unsubscribe query string\r\n this.router.navigateToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome]);\r\n return;\r\n }\r\n if(this.activeProfile.profileType == 'Individual')\r\n {\r\n return this.subscriptionService.getSubscriptionOptions();\r\n }\r\n return this.subscriptionService.getOrganisationSubscriptionOptions(this.activeProfile.profileIdentifier);\r\n }).then(subscriptionOptions => {\r\n if (unsubscribe) {\r\n return;\r\n }\r\n this.options = subscriptionOptions;\r\n if (subscriptionOptions.subscribeIndividual && subscriptionOptions.subscribeOrganisation) {\r\n this.entity = \"both\";\r\n }\r\n else if (subscriptionOptions.subscribeIndividual) {\r\n this.entity = \"individual\";\r\n }\r\n else if (subscriptionOptions.subscribeOrganisation) {\r\n this.entity = \"organisation\";\r\n }\r\n else {\r\n this.entity = \"both\"; // nothing means both\r\n }\r\n\r\n subscriptionOptions.categoryIds.forEach(s => {\r\n let category = this.categories.find(c => c.id == s);\r\n if (category != null) {\r\n // in case the DB changes\r\n category.selected = true;\r\n }\r\n });\r\n });\r\n }\r\n\r\n bind() {\r\n ValidationRules.ensure((o: Dto.ISubscriptionOptionsDto) => o.categoryIds)\r\n .satisfiesRule(HasElementsRule).when(o => o.receiveEmails).withMessage(\"Please choose at least one category\")\r\n .on(this.options);\r\n }\r\n\r\n unsubscribeAll(): Promise {\r\n this.categories.forEach(b => b.selected = false);\r\n this.options.receiveEmails = false;\r\n return this.save();\r\n }\r\n\r\n save(): Promise {\r\n this.busy = true;\r\n this.options.categoryIds = this.categories.filter(c => c.selected).map(c => c.id);\r\n this.options.subscribeIndividual = this.entity == \"individual\" || this.entity == \"both\";\r\n this.options.subscribeOrganisation = this.entity == \"organisation\" || this.entity == \"both\";\r\n this.options.organisationId = this.activeProfile.profileType == 'Organisation' ? this.activeProfile.profileIdentifier : null;\r\n\r\n return this.controller.validate().then(result => {\r\n if (!result.valid) {\r\n throw new ClientValidationError(result);\r\n }\r\n this.notifier.clear();\r\n return this.subscriptionService.updateSubscriptionOptions(this.options);\r\n }).then(() => {\r\n this.notifier.success('Your subscription preferences have been updated');\r\n }).catch(error => {\r\n if (error instanceof ClientValidationError) {\r\n return;\r\n }\r\n this.notifier.standardMessage(Messages.serverError);\r\n }).then(() => {\r\n this.busy = false;\r\n });\r\n }\r\n\r\n optin() {\r\n if (this.options.receiveEmails && this.categories.filter(c => c.selected).length == 0) {\r\n this.categories.forEach(c => c.selected = true);\r\n }\r\n }\r\n}","module.exports = \" \";","import { customAttribute, autoinject, bindable } from 'aurelia-framework';\r\nimport { bindingMode } from \"aurelia-binding\";\r\nimport { TaskQueue } from 'aurelia-task-queue';\r\nimport { ControlIdGenerator } from '../utils/control-id-generator';\r\n\r\n@customAttribute('gnt-element-height')\r\n@autoinject\r\nexport class GntElementHeight {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.toView }) offset: number;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) minHeight: number;\r\n\r\n private eventNameSpace: string;\r\n\r\n constructor(private element: Element, private readonly taskQueue: TaskQueue, private controlIdGenerator: ControlIdGenerator) {\r\n this.eventNameSpace = \"gntElementHeight-\" + controlIdGenerator.getNextId();\r\n }\r\n\r\n attached() {\r\n\r\n this.taskQueue.queueTask(() => { this.setControlsHeight(this.element, this.offset, this.minHeight); });\r\n $(window).on(\"resize.\"+this.eventNameSpace,(()=>{\r\n this.setControlsHeight(this.element, this.offset, this.minHeight);\r\n }));\r\n }\r\n\r\n public setControlsHeight(element: Element, heightOffset: number, minimumHeight: number){\r\n var viewPortHeight;\r\n // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight\r\n if (typeof window.innerWidth != 'undefined') {\r\n viewPortHeight = window.innerHeight\r\n }\r\n \r\n // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)\r\n else if (typeof document.documentElement != 'undefined'\r\n && typeof document.documentElement.clientWidth !=\r\n 'undefined' && document.documentElement.clientWidth != 0) {\r\n viewPortHeight = document.documentElement.clientHeight\r\n }\r\n \r\n // older versions of IE\r\n else {\r\n viewPortHeight = document.getElementsByTagName('body')[0].clientHeight\r\n }\r\n\r\n var newheight = +viewPortHeight + +heightOffset;\r\n if(minimumHeight){\r\n if(newheight < minimumHeight){\r\n newheight = minimumHeight;\r\n }\r\n }\r\n\r\n $(element).height(newheight);\r\n }\r\n\r\n unbind() {\r\n \r\n }\r\n\r\n detached(){\r\n $(window).off(\"resize.\"+this.eventNameSpace);\r\n }\r\n}\r\n","import { customAttribute, autoinject, bindable } from 'aurelia-framework';\r\nimport { bindingMode } from \"aurelia-binding\";\r\n\r\n@customAttribute('gnt-tooltip')\r\n@autoinject\r\nexport class GrantsTooltip {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.toView }) title: string;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) template: string;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) placement: string = \"auto\";\r\n\r\n constructor(private element: Element) {\r\n }\r\n\r\n titleChanged(newValue, oldValue) {\r\n //updating tooltips without destroying taken from: https://stackoverflow.com/questions/9501921/change-twitter-bootstrap-tooltip-content-on-click\r\n $(this.element)\r\n .attr('title', this.title)\r\n .tooltip('fixTitle')\r\n .tooltip('setContent');\r\n }\r\n\r\n attached() {\r\n if (this.title) {\r\n $(this.element).tooltip({\r\n title: this.title,\r\n placement: this.placement,\r\n template: this.template\r\n });\r\n } else {\r\n $(this.element).tooltip();\r\n }\r\n }\r\n\r\n unbind() {\r\n $(this.element).tooltip('destroy');\r\n }\r\n}\r\n","import { isValidABN } from \"abnacn-validator\";\r\nimport { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport Inputmask from 'inputmask';\r\n\r\n@customElement('abn')\r\nexport class Abn {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() abnInput: HTMLInputElement;\r\n @bindable() disabled: boolean = false;\r\n\r\n attached() {\r\n Inputmask(\"99 999 999 999\", {\r\n autoUnmask: true,\r\n postValidation: () => {\r\n var evt = document.createEvent(\"HTMLEvents\");\r\n evt.initEvent(\"change\", false, true);\r\n this.abnInput.dispatchEvent(evt);\r\n return true;\r\n }\r\n }).mask(this.abnInput);\r\n }\r\n\r\n bind() {\r\n ValidationRules\r\n .ensure((model: Abn) => model.value).displayName(\"ABN\")\r\n .matches(/^(\\d *?){11}$/).withMessage(\"The entered ABN needs to be 11 digits.\").when((model: Abn) => model.value && model.value.length > 0)\r\n .satisfies(isValidABN).withMessage(\"The entered ABN failed validation.\").when((model: Abn) => model.value && model.value.length == 11)\r\n .on(this);\r\n }\r\n}\r\n","module.exports = \" \";","import { isValidACN } from \"abnacn-validator\";\r\nimport { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport Inputmask from \"inputmask\";\r\n\r\n@customElement('acn')\r\nexport class Acn {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() acnInput: HTMLInputElement;\r\n\r\n attached() {\r\n Inputmask(\"999 999 999\", {\r\n autoUnmask: true,\r\n postValidation: () => {\r\n var evt = document.createEvent(\"HTMLEvents\");\r\n evt.initEvent(\"change\", false, true);\r\n this.acnInput.dispatchEvent(evt);\r\n return true;\r\n }\r\n }).mask(this.acnInput);\r\n }\r\n\r\n bind() {\r\n ValidationRules\r\n .ensure((model: Acn) => model.value).displayName(\"ACN\")\r\n .matches(/^(\\d *?){9}$/).withMessage(\"The entered ACN needs to be 9 digits.\").when((model: Acn) => model.value && model.value.length > 1)\r\n .satisfies((value: string) => isValidACN(value)).withMessage(\"The entered ACN failed validation.\").when((model: Acn) => model.value && model.value.length == 9)\r\n .on(this);\r\n }\r\n}\r\n","module.exports = \" \";","import { BindingEngine, Disposable } from \"aurelia-binding\";\r\nimport { DialogService } from \"aurelia-dialog\";\r\nimport { autoinject, bindable, bindingMode, PLATFORM } from \"aurelia-framework\";\r\nimport { ValidateInstruction, ValidationController, ValidationRules } from \"aurelia-validation\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { AddressService } from \"services/address-service\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { IValidateAddressModalParams, ValidateAddressModal } from \"shared/controls/address/validate-address-modal\";\r\nimport { NonNegativeNumberRule, NotAPOBox, NumericRule } from \"shared/controls/custom-validation\";\r\nimport { ClientValidationError } from \"shared/utils/client-validation-error\";\r\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\r\n\r\n\r\n// webpack issue with modals:\r\nPLATFORM.moduleName(\"shared/controls/address/validate-address-modal\")\r\n\r\n@autoinject\r\nexport class AddressInput {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) model: SharedDto.IAddressDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) addresstype: string;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) noPoBox: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) clearReadonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) required: boolean = false;//just used for styling\r\n\r\n //Used for the drop down lists. \r\n countryList: SharedDto.ICodeListItemDto[] = [];\r\n stateList: SharedDto.ICodeListItemDto[];\r\n\r\n showStateSelect: boolean;\r\n private subscriptions: Disposable[] = [];\r\n id: number;\r\n private australia: SharedDto.ICodeListItemDto;\r\n countryListLoaded: boolean = false;\r\n stateListLoaded: boolean = false;\r\n\r\n constructor(\r\n private readonly controller: ValidationController,\r\n private readonly dataService: DataService,\r\n private readonly addressService: AddressService,\r\n private readonly bindingEngine: BindingEngine,\r\n private readonly dialogService: DialogService,\r\n private readonly controlId: ControlIdGenerator) {\r\n }\r\n\r\n bind() {\r\n this.id = this.controlId.getNextId();\r\n var countryCodes = this.dataService.getCountries().then((countryData: SharedDto.ICodeListItemDto[]) => {\r\n this.countryList = countryData;\r\n this.australia = this.countryList.find(c => c.code === \"au\");\r\n this.countryListLoaded = true;\r\n });\r\n var stateCodes = this.dataService.getStates().then((stateData: SharedDto.ICodeListItemDto[]) => {\r\n this.stateList = stateData;\r\n this.stateListLoaded = true;\r\n });\r\n\r\n if (!this.model) {\r\n this.model = {} as SharedDto.IAddressDto;\r\n }\r\n\r\n ValidationRules\r\n .ensure((m: SharedDto.IAddressDto) => m.line1).maxLength(150).required().when(m => { return !this.readonly })\r\n .ensure(m => m.line2).maxLength(150)\r\n .ensure(m => m.suburb).maxLength(50).required().when(m => { return !this.readonly })\r\n .ensure(m => m.postcode).minLength(4).maxLength(4).required().satisfiesRule(NumericRule).when(m => { return !this.readonly })\r\n .ensure(m => m.countryId).required()\r\n .ensure(m => m.australianStateTerritory)\r\n .displayName(\"State\")\r\n .required()\r\n .when(m => {\r\n return this.australia && m.countryId == this.australia.id && !this.readonly;\r\n })\r\n .ensure(m => m.nonAustralianState)\r\n .displayName(\"State\")\r\n .required()\r\n .when(m => {\r\n return this.australia && m.countryId != this.australia.id && !this.readonly;\r\n })\r\n .ensure(m => m.line1)\r\n .displayName(\"Line 1\")\r\n .satisfiesRule(NotAPOBox)\r\n .when(m => this.noPoBox && !this.readonly)\r\n .ensure(m => m.line2)\r\n .displayName(\"Line 2\")\r\n .satisfiesRule(NotAPOBox)\r\n .when(m => this.noPoBox && !this.readonly)\r\n .on(this.model);\r\n\r\n Promise.all([countryCodes, stateCodes]).then(() => {\r\n\r\n //set country to australia if new address\r\n if (this.model != undefined && (this.model.countryId == undefined || this.model.countryId == \"\")) {\r\n var found = this.countryList.find((country) => country.description === \"Australia\");\r\n if (found) {\r\n this.model.countryId = found.id;\r\n }\r\n }\r\n\r\n this.subscriptions.push(this.bindingEngine\r\n .propertyObserver(this.model, \"countryId\")\r\n .subscribe(() => {\r\n this.countryUpdated();\r\n })\r\n );\r\n\r\n this.countryUpdated();\r\n });\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n ValidationRules.off(this.model);\r\n }\r\n\r\n ensureAddressValid(): Promise {\r\n return this.controller.validate({ object: this.model }).then(result => {\r\n if (!result.valid) {\r\n throw new ClientValidationError(result);\r\n }\r\n return this.addressService.validateAddresses(this.model).catch(error => {\r\n //if address validation network call fails just say it's an exact match to allow the user to still save.\r\n return { matchResult: Dto.Constants.AddressValidationMatchResult.ExactMatch };\r\n });\r\n }).then((data: Dto.IAddressValidationDto) => {\r\n if (data.matchResult == Dto.Constants.AddressValidationMatchResult.ExactMatch) {\r\n this.model.isVerified = true;\r\n return this.model;\r\n }\r\n var model: IValidateAddressModalParams = {\r\n addresstype: this.addresstype,\r\n address: this.model,\r\n matches: data.matches\r\n };\r\n return this.dialogService.open({\r\n viewModel: ValidateAddressModal,\r\n model: model,\r\n rejectOnCancel: true\r\n }).whenClosed(response => {\r\n return response.output; // the selected address\r\n });\r\n }).then((pickedAddress: SharedDto.IAddressDto) => {\r\n Object.assign(this.model, pickedAddress);\r\n return true;\r\n }).catch((error) => {\r\n if (!(error instanceof ClientValidationError || error.hasOwnProperty(\"wasCancelled\"))) {\r\n console.log(error);\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n countryUpdated() {\r\n if (this.model) {\r\n var found = this.countryList.find((country) => country.id == this.model.countryId);\r\n if (found) {\r\n if ((found.description === \"Australia\")) {\r\n this.showStateSelect = true;\r\n this.model.nonAustralianState = null;\r\n } else {\r\n this.showStateSelect = false;\r\n this.model.australianStateTerritory = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n readonlyChanged() {\r\n if (this.readonly) {\r\n if (this.clearReadonly) {\r\n this.model.line1 = null;\r\n this.model.line2 = null;\r\n this.model.suburb = null;\r\n this.model.postcode = null;\r\n this.model.australianStateTerritory = null;\r\n this.model.nonAustralianState = null;\r\n }\r\n\r\n this.controller.reset({\r\n object: this.model\r\n });\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject } from \"aurelia-framework\";\r\nimport { DialogController } from \"aurelia-dialog\";\r\n\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Dto } from \"project/project\";\r\n\r\nexport interface IValidateAddressModalParams {\r\n addresstype: string,\r\n address: SharedDto.IAddressDto,\r\n matches: SharedDto.IAddressDto[]\r\n}\r\n\r\n@autoinject\r\nexport class ValidateAddressModal implements IValidateAddressModalParams {\r\n addresstype: string = \"unknown\";\r\n address: SharedDto.IAddressDto;\r\n matches: SharedDto.IAddressDto[];\r\n\r\n constructor(public dialogController: DialogController) { }\r\n \r\n activate(params: IValidateAddressModalParams) {\r\n Object.assign(this, params);\r\n }\r\n\r\n addressLiner(address: SharedDto.IAddressDto): string {\r\n var addressLine: string = address.line1;\r\n\r\n if (address.line2) {\r\n addressLine += \", \" + address.line2;\r\n }\r\n addressLine += \", \" + address.suburb + \" \";\r\n\r\n if (address.australianStateTerritory != 0) {\r\n addressLine += SharedDto.Constants.StateTerritory[address.australianStateTerritory];\r\n }\r\n else {\r\n addressLine += address.nonAustralianState;\r\n }\r\n addressLine += \", \" + address.postcode;\r\n return addressLine;\r\n }\r\n}","module.exports = \" \";","import { autoinject, bindable } from 'aurelia-framework';\r\nimport { SharedBroadcastEvents } from 'shared/utils/SharedBroadcastEvents';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { SharedDto } from 'project/project-shared';\r\nimport { DownloadFileService } from 'shared/utils/download-file-service';\r\n\r\n@autoinject\r\nexport class FileDisplay {\r\n @bindable detail;\r\n @bindable deleteFile;\r\n @bindable retry;\r\n @bindable isUploading;\r\n @bindable readonly;\r\n @bindable fileStorageId; \r\n\r\n parent: any;\r\n\r\n constructor(private readonly eventAggregator: EventAggregator, private readonly fileService: DownloadFileService) {\r\n }\r\n\r\n bind(bindingContext, overrideContext) {\r\n this.parent = bindingContext; \r\n }\r\n\r\n attached() {\r\n\r\n }\r\n\r\n async download() {\r\n await this.fileService.downloadFile( this.fileStorageId);\r\n }\r\n}","module.exports = \" \";","import { computedFrom, Disposable } from \"aurelia-binding\";\r\nimport { EventAggregator } from \"aurelia-event-aggregator\";\r\nimport { autoinject, bindable, bindingMode, DOM } from \"aurelia-framework\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { FileService } from \"services/file-service\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { SharedBroadcastEvents } from \"shared/utils/SharedBroadcastEvents\";\r\nimport { Confirm } from \"../confirm-modal/confirm\";\r\nimport \"./file-uploader.less\";\r\n\r\n\r\n// don't export this. To use the FileUploader element, bind a IFilePropertiesDto object\r\ninterface IFileDetail extends SharedDto.IFilePropertiesDto {\r\n uploadError?: boolean;\r\n file?: File;\r\n}\r\n\r\n@autoinject\r\nexport class FileUploader {\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) multiple: boolean | string = false;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) uploadInProgress: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) files: IFileDetail | Array;\r\n @bindable() fileMode: \"keep\" = \"keep\";\r\n @bindable() buttonLabel: string\r\n @bindable() finishedUploadingCallback: Function\r\n @bindable() startedUploadingCallback: Function\r\n @bindable() allowedExtensions: string[] = [];\r\n @bindable() allowUploadLimit: boolean = false;\r\n @bindable() uploadLimit: number = 26214400;\r\n @bindable() readonly: boolean = false; \r\n\r\n uploader: any;\r\n fileList: FileList;\r\n fileId: string;\r\n busy: boolean = false;\r\n private subscriptions: Disposable[] = [];\r\n parent: any;\r\n draggingOver: boolean = false;\r\n\r\n constructor(\r\n private readonly fileService: FileService,\r\n private readonly element: Element,\r\n private readonly notifier: Notifier,\r\n private readonly confirm: Confirm,\r\n private readonly eventAggregator: EventAggregator) {\r\n this.fileId = Math.random().toString();\r\n }\r\n\r\n bind(bindingContext, overrideContext) {\r\n this.parent = bindingContext;\r\n this.multiple = this.multiple === true || this.multiple === \"true\";\r\n \r\n if (this.multiple && !this.files) {\r\n this.files = [];\r\n }\r\n\r\n if (this.uploader.files.length > 0 && !this.files) {\r\n this.uploader.value = null;\r\n }\r\n\r\n }\r\n\r\n attached() {\r\n\r\n }\r\n\r\n detached() {\r\n // clean up files that haven't been saved\r\n if (this.files == null) { return; }\r\n if (this.fileMode !== \"keep\") {\r\n // if you specify \"keep\" then you must cleanup non-saved files in some other place\r\n (this.multiple ? this.files as IFileDetail[] : [this.files as IFileDetail])\r\n .forEach(file => {\r\n if (file && file.guid && file.guid != \"00000000-0000-0000-0000-000000000000\") {\r\n this.fileService.deleteFile(file.guid);\r\n }\r\n });\r\n }\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n delete(file: IFileDetail): Promise {\r\n var cancel: boolean = false;\r\n return this.confirm.confirm(\"Are you sure you want to delete this file?\", \"Delete File\").then(ok => {\r\n if (ok) {\r\n this.busy = true;\r\n return this.deleteFile(file);\r\n }\r\n });\r\n }\r\n\r\n deleteWithoutQuestion(file: IFileDetail): Promise {\r\n this.busy = true;\r\n return this.deleteFile(file);\r\n }\r\n\r\n private deleteFile(file: IFileDetail): Promise {\r\n var fileDelete: Promise = file.guid && file.guid != \"00000000-0000-0000-0000-000000000000\" ? this.fileService.deleteFile(file.guid) : Promise.resolve();\r\n\r\n return fileDelete.then(() => {\r\n this.busy = false;\r\n if (this.multiple) {\r\n var index = (this.files as IFileDetail[]).findIndex(f => f === file);\r\n if (index >= 0) {\r\n (this.files as IFileDetail[]).splice(index, 1);\r\n }\r\n }\r\n else {\r\n this.files = null;\r\n }\r\n\r\n this.uploader.value = '';\r\n this.fireInputEvents();\r\n }).catch(error => {\r\n this.notifier.error(\"Failed to delete the file. Please try again or contact your system administrator.\")\r\n });\r\n }\r\n\r\n retry(file: IFileDetail) {\r\n this.busy = true;\r\n this.uploadInProgress = true;\r\n if (this.startedUploadingCallback) {\r\n this.startedUploadingCallback();\r\n }\r\n this.fileService.uploadFile(file.file)\r\n .then(guid => {\r\n file.guid = guid;\r\n file.uploadError = false;\r\n this.fireInputEvents();\r\n })\r\n .catch(() => {\r\n file.uploadError = true;\r\n })\r\n .then(() => {\r\n this.busy = false;\r\n this.uploadInProgress = false;\r\n this.fireInputEvents();\r\n if (this.finishedUploadingCallback) {\r\n this.finishedUploadingCallback();\r\n }\r\n });\r\n }\r\n\r\n fileListChanged() {\r\n if (this.multiple) {\r\n this.uploadMultipleFiles(this.fileList);\r\n } else {\r\n this.uploadSingleFile(this.fileList.item(0));\r\n }\r\n this.fileList = null;\r\n }\r\n\r\n deleteFileOnReplace() {\r\n if (!this.multiple && this.files != null)\r\n {\r\n this.deleteFile((this.files as IFileDetail));\r\n }\r\n \r\n return true;\r\n }\r\n \r\n private uploadMultipleFiles(fileList: FileList) {\r\n this.busy = true;\r\n this.uploadInProgress = true;\r\n if (this.startedUploadingCallback) {\r\n this.startedUploadingCallback();\r\n }\r\n var filePromises: Array> = [];\r\n // convert to an array:\r\n var fileArray: File[] = [];\r\n for (let i = 0; i < fileList.length; i++) {\r\n fileArray.push(fileList.item(i));\r\n }\r\n\r\n let aFileWasRemoved = false;\r\n let totalFileSize = 0;\r\n for (let file of fileArray) {\r\n totalFileSize += file.size;\r\n\r\n if (!this.isAllowedFileExtension(file as File)) {\r\n fileArray.splice(fileArray.indexOf(file), 1);\r\n aFileWasRemoved = true;\r\n }\r\n }\r\n\r\n if(this.allowUploadLimit) {\r\n if(totalFileSize > this.uploadLimit) {\r\n this.notifyOfFileSizeError()\r\n for (let file of fileArray) {\r\n fileArray.splice(fileArray.indexOf(file), 1);\r\n aFileWasRemoved = true;\r\n }\r\n this.uploadInProgress = false;\r\n this.busy = false;\r\n if (this.finishedUploadingCallback) {\r\n this.finishedUploadingCallback();\r\n }\r\n\r\n return\r\n }\r\n }\r\n\r\n if (aFileWasRemoved) {\r\n this.notifier.warning(`Some of the selected files did not match the allowed file extensions (${this.allowedExtensions.join(', ')}) and were cancelled.`);\r\n }\r\n\r\n fileArray.forEach(file => {\r\n // it's necessary to do this as a forEach loop and not a for(;;) loop\r\n // because forEach gives local variables their own scope\r\n var thisFile: IFileDetail = {\r\n guid: null,\r\n fileStorageId: null,\r\n fileName: file.name,\r\n fileSizeBytes: file.size,\r\n lastModifiedBy: null,\r\n //lastModifiedTime: file.lastModifiedDate.toISOString(),\r\n lastModifiedTime: new Date().toISOString(),\r\n file: file\r\n };\r\n (this.files as IFileDetail[]).push(thisFile);\r\n var p =\r\n this.fileService.uploadFile(file)\r\n .then(guid => {\r\n thisFile.guid = guid;\r\n this.fireInputEvents();\r\n })\r\n .catch(() => {\r\n thisFile.uploadError = true;\r\n });\r\n filePromises.push(p);\r\n });\r\n Promise.all(filePromises).then(() => {\r\n this.busy = false;\r\n this.uploadInProgress = false;\r\n if (this.finishedUploadingCallback) {\r\n this.finishedUploadingCallback();\r\n }\r\n });\r\n }\r\n\r\n private uploadSingleFile(file: File) {\r\n\r\n if (!this.isAllowedFileExtension(file)) {\r\n this.notifyOfExtensionError();\r\n return;\r\n }\r\n\r\n if(this.allowUploadLimit) {\r\n if (!this.isAllowedFileSize(file)) {\r\n this.notifyOfFileSizeError();\r\n return;\r\n }\r\n }\r\n\r\n // this is mostly caused by deleting a file and the event triggering this to be called...\r\n if(!file){\r\n return;\r\n }\r\n\r\n this.busy = true;\r\n this.uploadInProgress = true;\r\n if (this.startedUploadingCallback) {\r\n this.startedUploadingCallback();\r\n }\r\n this.files = {\r\n guid: null,\r\n fileStorageId: null,\r\n fileName: file.name,\r\n fileSizeBytes: file.size,\r\n lastModifiedBy: null,\r\n //lastModifiedTime: file.lastModifiedDate.toISOString(),\r\n lastModifiedTime: new Date().toISOString(),\r\n file: file\r\n };\r\n return this.fileService.uploadFile(file).then(guid => {\r\n (this.files as IFileDetail).guid = guid;\r\n this.fireInputEvents();\r\n }).catch(() => {\r\n (this.files as IFileDetail).uploadError = true;\r\n }).then(() => {\r\n this.busy = false;\r\n this.uploadInProgress = false;\r\n this.fireInputEvents();\r\n if (this.finishedUploadingCallback) {\r\n this.finishedUploadingCallback();\r\n }\r\n });\r\n }\r\n\r\n private deleteMultiple(file: IFileDetail): Promise {\r\n var index = (this.files as IFileDetail[]).findIndex(f => f === file);\r\n if (index < 0) {\r\n return Promise.resolve();\r\n }\r\n this.busy = true;\r\n var p: Promise = this.files[index].guid ? this.fileService.deleteFile(this.files[index].guid) : Promise.resolve();\r\n return p\r\n .catch(() => {\r\n // catch before then() makes then() a finally(), i.e. run regardless of outcome\r\n })\r\n .then(() => {\r\n this.busy = false;\r\n (this.files as IFileDetail[]).splice(index, 1);\r\n this.fireInputEvents();\r\n });\r\n }\r\n\r\n private deleteSingle(): Promise {\r\n var remove = this.files[0];\r\n if (!remove) {\r\n return Promise.resolve();\r\n }\r\n this.busy = true;\r\n var p: Promise = remove.guid ? this.fileService.deleteFile(remove.guid) : Promise.resolve();\r\n return p\r\n .catch(() => {\r\n // catch before then() makes then() a finally(), i.e. run regardless of outcome\r\n })\r\n .then(() => {\r\n this.busy = false;\r\n this.files = null;\r\n this.fireInputEvents();\r\n });\r\n }\r\n\r\n //this is purely to get validation to trigger, assuming the element is the target of a binding.\r\n private fireInputEvents() {\r\n //not sure how to fire change events, to get validation controllers to revalidate... \r\n //they don't listen for change events, but hook into the binding and intercept it when it updates the property it is bound to..\r\n this.element.dispatchEvent(DOM.createCustomEvent(\"blur\", null));\r\n }\r\n\r\n private notifyOfExtensionError() {\r\n if (!this.allowedExtensions || this.allowedExtensions.length === 0) {\r\n return;\r\n } else {\r\n if (this.allowedExtensions.length === 1) {\r\n this.notifier.error(\"The file must have the following extension: \" + this.allowedExtensions[0]);\r\n } else {\r\n this.notifier.error(\"The file must have one of the following extensions: \" + this.allowedExtensions.join(\", \"));\r\n }\r\n }\r\n }\r\n\r\n private notifyOfFileSizeError() {\r\n if (!this.multiple) {\r\n this.notifier.error(\"The file size must best below \" + this.uploadLimit / 1048576 + \"MB\");\r\n } else {\r\n this.notifier.error(\"The total file sizes must best below \" + this.uploadLimit / 1048576 + \"MB\");\r\n }\r\n }\r\n\r\n private isAllowedFileExtension(file: File): boolean {\r\n if (!this.allowedExtensions || this.allowedExtensions.length === 0) {\r\n return true;\r\n }\r\n if (!file || !file.name || file.name.indexOf(\".\") === -1) {\r\n return true;\r\n }\r\n let parts = file.name.split(\".\");\r\n let extension = parts[parts.length - 1];\r\n //case insensitive comparison\r\n return this.allowedExtensions.map(x => x.toLowerCase()).indexOf(extension.toLowerCase()) > -1;\r\n }\r\n\r\n private isAllowedFileSize(file: File): boolean {\r\n return file.size < this.uploadLimit;\r\n }\r\n\r\n @computedFrom(\"allowedExtensions\")\r\n get fileAcceptFilter(): string {\r\n if (this.allowedExtensions && this.allowedExtensions.length > 0) {\r\n //['doc', 'docx'] >> \".doc, .docx\"\r\n return this.allowedExtensions.map(x => \".\" + x).join(\", \");\r\n }\r\n return \"\";\r\n }\r\n\r\n drop(ev) {\r\n ev.preventDefault();\r\n \r\n if (this.multiple){\r\n this.uploadMultipleFiles(ev.dataTransfer.files);\r\n }else {\r\n if (ev.dataTransfer.files.length == 1){\r\n this.uploadSingleFile(ev.dataTransfer.files[0]);\r\n }else {\r\n this.notifier.error('Upload of multiple files is not allowed');\r\n }\r\n }\r\n \r\n this.draggingOver = false;\r\n return true;\r\n }\r\n\r\n dragOver(ev) {\r\n ev.preventDefault();\r\n }\r\n\r\n dragEnter(ev) {\r\n ev.preventDefault();\r\n this.draggingOver = true;\r\n }\r\n\r\n dragLeave(ev) {\r\n ev.preventDefault();\r\n this.draggingOver = false;\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, customElement } from \"aurelia-framework\";\r\nimport { BreadcrumbService } from \"shared/controls/breadcrumb/breadcrumb-service\";\r\n\r\n@autoinject\r\n@customElement(\"breadcrumb\")\r\nexport class Breadcrumb {\r\n constructor(readonly breadcrumbService: BreadcrumbService) { }\r\n}\r\n","module.exports = \" \";","import { BindingEngine, bindingMode, Disposable, observable } from \"aurelia-binding\";\r\nimport { autoinject } from \"aurelia-dependency-injection\";\r\nimport { bindable } from \"aurelia-templating\";\r\nimport { ControlIdGenerator } from \"../../utils/control-id-generator\";\r\n\r\n@autoinject\r\nexport class CheckboxList {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedValues: string[];\r\n @bindable({ defaultBindingMode: bindingMode.toView }) options: CheckboxListOption[];\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) name = \"checkbox-list\";\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) disabled: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) inline: boolean = false;\r\n @bindable() displayProperty: string = \"description\";\r\n @bindable() idProperty: string = \"id\";\r\n\r\n @observable() internalOptions: CheckboxListOption[];\r\n internalOptionSelectedObservers: Disposable[] = [];\r\n controlIdGenerator: ControlIdGenerator;\r\n\r\n constructor(private readonly bindingEngine: BindingEngine) {\r\n this.controlIdGenerator = new ControlIdGenerator();\r\n }\r\n\r\n bind() {\r\n if (this.name == \"checkbox-list\") {\r\n console.warn(\"You should specify a custom name for the checkbox list to ensure its id's are all unique.\");\r\n }\r\n }\r\n\r\n attached() {\r\n this.mapOptionsToInternal(this.options);\r\n }\r\n\r\n optionsChanged(newValue, oldValue) {\r\n this.mapOptionsToInternal(newValue);\r\n }\r\n\r\n private mapOptionsToInternal(options) {\r\n if (options) {\r\n this.internalOptions = options.map((option) => {\r\n var intOption = new CheckboxListOption();\r\n intOption.id = option[this.idProperty];\r\n intOption.description = option[this.displayProperty];\r\n intOption.selected = this.selectedValues ? this.selectedValues.indexOf(intOption.id) > -1 : false;\r\n intOption.controlId = this.controlIdGenerator.getNextId();\r\n return intOption;\r\n })\r\n } else {\r\n this.internalOptions = null;\r\n }\r\n }\r\n\r\n selectedValuesChanged(newValue, oldValue) {\r\n //update internal options with new selected states\r\n if (this.internalOptions) {\r\n this.internalOptions.forEach(intOption => {\r\n intOption.selected = newValue ? newValue.indexOf(intOption.id) > -1 : false;\r\n });\r\n }\r\n }\r\n\r\n internalOptionsChanged(newValue: CheckboxListOption[], oldValue: CheckboxListOption[]) {\r\n //dispose old observers\r\n if (this.internalOptionSelectedObservers) {\r\n while (this.internalOptionSelectedObservers.length > 0) {\r\n this.internalOptionSelectedObservers.pop().dispose();\r\n }\r\n }\r\n //setup new observers.\r\n if (newValue) {\r\n newValue.forEach(option => {\r\n var subscription = this.bindingEngine.propertyObserver(option, \"selected\").subscribe(() => { this.updateSelected(this.internalOptions); })\r\n this.internalOptionSelectedObservers.push(subscription);\r\n })\r\n }\r\n }\r\n\r\n private updateSelected(options) {\r\n this.selectedValues = options.filter(x => x.selected).map(x => x.id); }\r\n}\r\n\r\nexport class CheckboxListOption {\r\n id: string;\r\n description: string;\r\n selected: boolean;\r\n controlId: number;\r\n}\r\n","module.exports = \"\";","import { autoinject } from \"aurelia-framework\";\r\nimport { DialogController } from 'aurelia-dialog';\r\n\r\n@autoinject\r\nexport class ConfirmModal {\r\n\r\n message: string;\r\n title: string;\r\n okButtonText: string = \"Yes\"\r\n cancelButtonText: string = \"No\"\r\n warnings: string[];\r\n showCancel: boolean = true;\r\n\r\n constructor(public controller: DialogController) {\r\n\r\n }\r\n\r\n activate(data: { title?: string, message: string, okButtonText?: string, cancelButtonText?: string, warnings: string[], showCancel?: boolean }) {\r\n this.message = data.message;\r\n this.title = data.title || \"Confirmation\";\r\n this.warnings = data.warnings;\r\n if (data.okButtonText) {\r\n this.okButtonText = data.okButtonText;\r\n }\r\n if (data.cancelButtonText) {\r\n this.cancelButtonText = data.cancelButtonText;\r\n }\r\n if(data.showCancel === false) {\r\n this.showCancel = false;\r\n }\r\n }\r\n\r\n ok() {\r\n this.controller.ok();\r\n }\r\n\r\n cancel() {\r\n this.controller.cancel();\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, customElement, bindingMode, computedFrom, observable } from 'aurelia-framework';\nimport Inputmask from 'inputmask';\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\n\n@customElement('currency')\nexport class Currency {\n\n @bindable() precision: number = 2;\n @bindable() digits: number = 18;\n @bindable() currencyInput: HTMLInputElement;\n @bindable() id: string;\n @bindable() disabled: boolean;\n @bindable() tabindex: number;\n @bindable() placeholder: string = \"0.00\";\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: number;\n\n @observable inputValue: number;\n\n constructor(private readonly controlIdGenerator: ControlIdGenerator) { }\n\n bind() {\n if (!this.id) {\n this.id = this.controlIdGenerator.getNextId().toString();\n }\n //ensure the value is numeric when bound.\n if (this.value != null) {\n this.value = +this.value;\n this.currencyInput.value = this.value.toString();\n }\n }\n\n valueChanged() {\n //if parent VM has changed the value, reflect it in the currency input \n if (this.value && this.currencyInput.value != this.value.toString()) {\n this.currencyInput.value = this.value.toString();\n }\n }\n\n\n attached() {\n Inputmask({\n alias: 'currency',\n autoUnmask: true,\n rightAlign: false,\n digits: this.precision,\n integerDigits: this.digits,\n clearMaskOnLostFocus: true,\n unmaskAsNumber: true,\n } as any).mask(this.currencyInput);\n\n this.currencyInput.addEventListener(\"keyup\", event => {\n if (this.currencyInput.value == '-') {\n //bind as null until a valid number is entered\n this.value = null;\n } else {\n this.value = +this.currencyInput.value;\n }\n this.dispatchEvent();\n });\n \n }\n\n dispatchEvent() {\n let customEvent = new CustomEvent('update', {\n detail: {\n value: this.value\n },\n bubbles: true\n }); \n this.currencyInput.dispatchEvent(customEvent);\n }\n\n @computedFrom(\"placeholder\")\n get displayedPlaceholder(): string {\n //this getter is just a barrier between what is bound and what is displayed to catch any instances of null or undefined, or empty strings.\n if (this.placeholder === null || this.placeholder === undefined) {\n return \"0.00\";\n }\n return this.placeholder;\n }\n}\n","import { bindable, customElement, bindingMode, computedFrom, observable } from 'aurelia-framework';\nimport './currency-change.less'\n\n@customElement('currency-change')\nexport class CurrencyChange {\n\n @bindable() precision: number = 2;\n @bindable() digits: number = 18;\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: number;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) previousValue: number;\n\n constructor() { }\n\n @computedFrom(\"value\", \"previousValue\")\n get change() : number\n {\n return (Math.abs(this.previousValue - this.value));\n }\n \n}\n","module.exports = \" \";","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\r\nimport { bindable } from \"aurelia-templating\";\r\nimport { customElement } from \"aurelia-framework\";\r\nimport { bindingMode, computedFrom } from \"aurelia-binding\";\r\nimport * as moment from 'moment';\r\nimport Flatpickr from 'flatpickr';\r\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\r\n\r\nconst defaultOptions = {\r\n allowInput: true,\r\n clickOpens: true,\r\n dateFormat: 'd/m/Y',\r\n enableTime: false,\r\n static: true\r\n}\r\n\r\n@autoinject\r\n@customElement('date-picker')\r\nexport class DatePicker {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) dateValue: Date;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() readonly: boolean = false;\r\n @bindable() disabled: boolean = false;\r\n @bindable() id: string;\r\n @bindable() name: string;\r\n @bindable() pickerOptions: any = defaultOptions;\r\n @bindable() minDate: string;\r\n\r\n pickerInput: HTMLInputElement;\r\n\r\n public readonlyFieldClass: string;\r\n private _flatpickr: any;\r\n private _momentDateFormat: string = 'DD/MM/YYYY';\r\n private _momentDateTimeFormat: string = 'DD/MM/YYYY hh:mm a';\r\n\r\n constructor(private readonly element: Element, private readonly controlIdGenerator: ControlIdGenerator) { }\r\n\r\n bind() {\r\n if (!this.id) {\r\n this.id = this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n attached() {\r\n // Apply and override default options\r\n this.pickerOptions = Object.assign({}, defaultOptions, this.pickerOptions);\r\n this.pickerOptions.onChange =\r\n this.pickerOptions.onValueUpdate =\r\n this.pickerOptions.onClose = this.onChange;\r\n\r\n if (this.pickerOptions.enableTime) {\r\n this.pickerOptions.dateFormat += ' h:i K';\r\n }\r\n\r\n if (this.minDate) {\r\n var minDate = moment(this.minDate, this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat);\r\n this.pickerOptions.minDate = minDate.toDate();\r\n }\r\n\r\n if (!this.readonly) {\r\n this._loadPicker();\r\n }\r\n }\r\n\r\n detached() {\r\n if (this._flatpickr) {\r\n this._flatpickr.destroy();\r\n this._flatpickr = null;\r\n }\r\n }\r\n\r\n // Actions\r\n show() {\r\n if (!!this._flatpickr)\r\n this._flatpickr.open();\r\n }\r\n\r\n // Events\r\n readonlyChanged(newValue: boolean, oldValue: boolean) {\r\n // Setup or destory flatpickr reference\r\n if (!!this._flatpickr && newValue) {\r\n this._flatpickr = null;\r\n } else if (!newValue) {\r\n this._loadPicker();\r\n }\r\n }\r\n\r\n onChange = (selectedDates, dateStr, instance) => {\r\n // Triggered by the flatpickr itself, check and update value based on differences\r\n const inputDate = this._stringToDate(dateStr);\r\n if ((!!this.value || !this._isNullOrEmpty(dateStr)) && !this._dateSyncedWithInput(moment(this.value), dateStr)) {\r\n if (inputDate.isValid()) this.value = inputDate.toISOString();\r\n else {\r\n this.value = undefined;\r\n this._flatpickr.setDate(this.value);\r\n }\r\n }\r\n else if (!this._dateSyncedWithFlatPickr(moment(this.value), selectedDates)) {\r\n if (selectedDates.length == 0) {\r\n this.value = undefined;\r\n this._flatpickr.setDate(this.value);\r\n }\r\n else if (selectedDates.length == 1)\r\n this.value = this._cloneDate(selectedDates[0]).toISOString();\r\n else\r\n this.value = selectedDates.map(d => this._cloneDate(d));\r\n }\r\n }\r\n\r\n valueChanged() {\r\n // Triggered on value change, check if difference with flatpicker and then update\r\n if (!this._flatpickr) return;\r\n if (this._dateSyncedWithFlatPickr(moment(this.value), this._flatpickr.selectedDates)) return;\r\n\r\n let newDate: moment.Moment | moment.Moment[];\r\n if (!this.value) {\r\n newDate = undefined;\r\n this._flatpickr.setDate(newDate);\r\n }\r\n else if (!Array.isArray(this.value)) {\r\n newDate = this._cloneDate(this.value);\r\n this._flatpickr.setDate(newDate.toDate());\r\n }\r\n else {\r\n newDate = this.value.map(d => this._cloneDate(d));\r\n this._flatpickr.setDate(newDate.map(m => m.toDate()));\r\n }\r\n }\r\n\r\n // Helpers\r\n private _loadPicker() {\r\n this._flatpickr = Flatpickr(this.pickerInput, this.pickerOptions);\r\n this.valueChanged();\r\n }\r\n\r\n private _dateSyncedWithFlatPickr(model: moment.Moment | moment.Moment[], view: Date[]) {\r\n model = model || [];\r\n let modelDates = Array.isArray(model) ? model.map(m => m.toDate()) : [model.toDate()];\r\n for (let d = 0; d < modelDates.length; d++) {\r\n let modelDate = modelDates[d];\r\n if (view.findIndex(v => v.valueOf() === modelDate.valueOf()) > -1) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n for (let d = 0; d < view.length; d++) {\r\n let viewDate = view[d];\r\n if (modelDates.findIndex(m => m.valueOf() === viewDate.valueOf()) > -1) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private _isNullOrEmpty(str: string): boolean {\r\n return str == null || str.trim() == '';\r\n }\r\n\r\n private _cloneDate(d): moment.Moment {\r\n return moment(d.getTime ? d.valueOf() : d);\r\n }\r\n\r\n private _dateSyncedWithInput(date: moment.Moment, inputStr: string) {\r\n if (inputStr == null || inputStr == '' && (!!date && date.isValid())) {\r\n return false;\r\n } else {\r\n const inputDate = this._stringToDate(inputStr);\r\n return !!date && inputDate.isValid() && date.isSame(inputDate);\r\n }\r\n }\r\n\r\n private _stringToDate(str: string): moment.Moment {\r\n const format = this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat;\r\n return moment(str, format);\r\n }\r\n\r\n // Computations\r\n @computedFrom(\"value\")\r\n get valueFormatted() {\r\n this.readonlyFieldClass = 'form-control-static';\r\n if (this.value) {\r\n return moment(this.value).format(this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat);\r\n } else {\r\n if (this.disabled) {\r\n return \"\"\r\n }\r\n this.readonlyFieldClass += 'form-control-static text-muted';\r\n return \"Not provided\"\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\r\nimport { bindable } from \"aurelia-templating\";\r\nimport { customElement } from \"aurelia-framework\";\r\nimport { bindingMode, computedFrom } from \"aurelia-binding\";\r\nimport * as moment from 'moment';\r\nimport Flatpickr from 'flatpickr';\r\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\r\n\r\nconst defaultOptions = {\r\n allowInput: true,\r\n clickOpens: true,\r\n dateFormat: 'd/m/Y',\r\n enableTime: true,\r\n static: true\r\n}\r\n\r\n@autoinject\r\n@customElement('date-time-picker')\r\nexport class DatePicker {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) dateValue: Date;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() readonly: boolean = false;\r\n @bindable() disabled: boolean = false;\r\n @bindable() id: string;\r\n @bindable() name: string;\r\n @bindable() pickerOptions: any = defaultOptions;\r\n @bindable() minDate: string;\r\n\r\n pickerInput: HTMLInputElement;\r\n\r\n public readonlyFieldClass: string;\r\n private _flatpickr: any;\r\n private _momentDateFormat: string = 'DD/MM/YYYY';\r\n private _momentDateTimeFormat: string = 'DD/MM/YYYY hh:mm a';\r\n\r\n constructor(private readonly element: Element, private readonly controlIdGenerator: ControlIdGenerator) { }\r\n\r\n bind() {\r\n if (!this.id) {\r\n this.id = this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n attached() {\r\n // Apply and override default options\r\n this.pickerOptions = Object.assign({}, defaultOptions, this.pickerOptions);\r\n this.pickerOptions.onChange =\r\n this.pickerOptions.onValueUpdate =\r\n this.pickerOptions.onClose = this.onChange;\r\n\r\n if (this.pickerOptions.enableTime) {\r\n this.pickerOptions.dateFormat += ' h:i K';\r\n }\r\n\r\n if (this.minDate) {\r\n var minDate = moment(this.minDate, this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat);\r\n this.pickerOptions.minDate = minDate.toDate();\r\n }\r\n\r\n if (!this.readonly) {\r\n this._loadPicker();\r\n }\r\n }\r\n\r\n detached() {\r\n if (this._flatpickr) {\r\n this._flatpickr.destroy();\r\n this._flatpickr = null;\r\n }\r\n }\r\n\r\n // Actions\r\n show() {\r\n if (!!this._flatpickr)\r\n this._flatpickr.open();\r\n }\r\n\r\n // Events\r\n readonlyChanged(newValue: boolean, oldValue: boolean) {\r\n // Setup or destory flatpickr reference\r\n if (!!this._flatpickr && newValue) {\r\n this._flatpickr = null;\r\n } else if (!newValue) {\r\n this._loadPicker();\r\n }\r\n }\r\n\r\n onChange = (selectedDates, dateStr, instance) => {\r\n // Triggered by the flatpickr itself, check and update value based on differences\r\n const inputDate = this._stringToDate(dateStr);\r\n if ((!!this.value || !this._isNullOrEmpty(dateStr)) && !this._dateSyncedWithInput(moment(this.value), dateStr)) {\r\n if (inputDate.isValid()) this.value = inputDate.toISOString();\r\n else {\r\n this.value = undefined;\r\n this._flatpickr.setDate(this.value);\r\n }\r\n }\r\n else if (!this._dateSyncedWithFlatPickr(moment(this.value), selectedDates)) {\r\n if (selectedDates.length == 0) {\r\n this.value = undefined;\r\n this._flatpickr.setDate(this.value);\r\n }\r\n else if (selectedDates.length == 1)\r\n this.value = this._cloneDate(selectedDates[0]).toISOString();\r\n else\r\n this.value = selectedDates.map(d => this._cloneDate(d));\r\n }\r\n }\r\n\r\n valueChanged() {\r\n // Triggered on value change, check if difference with flatpicker and then update\r\n if (!this._flatpickr) return;\r\n if (this._dateSyncedWithFlatPickr(moment(this.value), this._flatpickr.selectedDates)) return;\r\n\r\n let newDate: moment.Moment | moment.Moment[];\r\n if (!this.value) {\r\n newDate = undefined;\r\n this._flatpickr.setDate(newDate);\r\n }\r\n else if (!Array.isArray(this.value)) {\r\n newDate = this._cloneDate(this.value);\r\n this._flatpickr.setDate(newDate.toDate());\r\n }\r\n else {\r\n newDate = this.value.map(d => this._cloneDate(d));\r\n this._flatpickr.setDate(newDate.map(m => m.toDate()));\r\n }\r\n }\r\n\r\n // Helpers\r\n private _loadPicker() {\r\n this._flatpickr = Flatpickr(this.pickerInput, this.pickerOptions);\r\n this.valueChanged();\r\n }\r\n\r\n private _dateSyncedWithFlatPickr(model: moment.Moment | moment.Moment[], view: Date[]) {\r\n model = model || [];\r\n let modelDates = Array.isArray(model) ? model.map(m => m.toDate()) : [model.toDate()];\r\n for (let d = 0; d < modelDates.length; d++) {\r\n let modelDate = modelDates[d];\r\n if (view.findIndex(v => v.valueOf() === modelDate.valueOf()) > -1) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n for (let d = 0; d < view.length; d++) {\r\n let viewDate = view[d];\r\n if (modelDates.findIndex(m => m.valueOf() === viewDate.valueOf()) > -1) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private _isNullOrEmpty(str: string): boolean {\r\n return str == null || str.trim() == '';\r\n }\r\n\r\n private _cloneDate(d): moment.Moment {\r\n return moment(d.getTime ? d.valueOf() : d);\r\n }\r\n\r\n private _dateSyncedWithInput(date: moment.Moment, inputStr: string) {\r\n if (inputStr == null || inputStr == '' && (!!date && date.isValid())) {\r\n return false;\r\n } else {\r\n const inputDate = this._stringToDate(inputStr);\r\n return !!date && inputDate.isValid() && date.isSame(inputDate);\r\n }\r\n }\r\n\r\n private _stringToDate(str: string): moment.Moment {\r\n const format = this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat;\r\n return moment(str, format);\r\n }\r\n\r\n // Computations\r\n @computedFrom(\"value\")\r\n get valueFormatted() {\r\n this.readonlyFieldClass = 'form-control-static';\r\n if (this.value) {\r\n return moment(this.value).format(this.pickerOptions.enableTime ? this._momentDateTimeFormat : this._momentDateFormat);\r\n } else {\r\n if (this.disabled) {\r\n return \"\"\r\n }\r\n this.readonlyFieldClass += 'form-control-static text-muted';\r\n return \"Not provided\"\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationController } from 'aurelia-validation';\r\nimport Inputmask from 'inputmask';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\n\r\n@customElement('decimal-input')\r\nexport class DecimalInput {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() precision: number;\r\n @bindable() currencyInput: HTMLInputElement;\r\n @bindable() id: string;\r\n @bindable() disabled: boolean;\r\n @bindable() tabindex: number;\r\n @bindable() placeholder: string;\r\n\r\n constructor(private readonly controlIdGenerator: ControlIdGenerator) { }\r\n\r\n bind() {\r\n if (!this.id) {\r\n this.id = this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n attached() {\r\n Inputmask({\r\n alias: 'decimal',\r\n autoUnmask: true,\r\n prefix: '',\r\n digits: this.precision,\r\n rightAlign: false,\r\n clearMaskOnLostFocus: true,\r\n postValidation: () => {\r\n var evt = document.createEvent(\"HTMLEvents\");\r\n evt.initEvent(\"change\", false, true);\r\n this.currencyInput.dispatchEvent(evt);\r\n return true;\r\n }\r\n } as any).mask(this.currencyInput);\r\n }\r\n\r\n dispatchEvent(value) {\r\n var customEvent = new CustomEvent('change', {\r\n detail: {\r\n value: value\r\n },\r\n bubbles: true\r\n });\r\n this.currencyInput.dispatchEvent(customEvent);\r\n customEvent = new CustomEvent('update', {\r\n detail: {\r\n value: value\r\n },\r\n bubbles: true\r\n });\r\n this.currencyInput.dispatchEvent(customEvent);\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, customElement, bindingMode } from 'aurelia-framework';\nimport emailMisspelled, { top100 } from \"email-misspelled\";\nimport { Result } from \"email-misspelled/typings\"\n\n@customElement('email-input')\nexport class EmailInput {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\n results: Result[];\n \n @bindable() disabled:boolean = false;\n @bindable() readonly:boolean = false;\n\n attached() {\n // add ntg email\n top100.push(\"nt.gov.au\");\n }\n \n valueChanged(newValue) {\n const emailChecker = emailMisspelled({\n maxMisspelled: 5,\n lengthDiffMax: 4,\n domains: top100,\n });\n\n var topResults = [];\n\n var checkEmails = emailChecker(newValue);\n\n if(checkEmails.length > 0)\n for (let index = 0; index < 3; index++) {\n topResults.push(checkEmails[index]) ;\n }\n\n this.results = topResults;\n }\n\n correctValue(correctEmail:string) {\n this.value = correctEmail;\n }\n}","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\nimport { SharedDto } from \"project/project-shared\";\nimport \"./featured-grants.less\";\nimport { bindable } from \"aurelia-framework\";\nimport { FeaturedGrantService } from \"services/featured-grant-service\";\n\n\n@autoinject\nexport class FeaturedGrants {\n @bindable() featuredGrants: SharedDto.FeaturedGrant.IExternalHomePageFeaturedGrantDto[];\n @bindable() isFeaturedGrantsActive: boolean;\n\n constructor(private readonly featuredGrantService: FeaturedGrantService) {}\n\n generateGrantUrl(contentIdentifier: string | number): string {\n return`/grants/${contentIdentifier}`;\n }\n\n generateImageUrl(featuredGrant: SharedDto.FeaturedGrant.IExternalHomePageFeaturedGrantDto) {\n return this.featuredGrantService.generateImageUrl(featuredGrant.featuredGrantId);\n }\n}\n","module.exports = \"\";","import { DOM, bindable, customElement, bindingMode, observable, autoinject, TaskQueue } from 'aurelia-framework';\r\n\r\n@customElement('gnt-textarea')\r\n@autoinject\r\nexport class GntTextArea {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @observable() textAreaElement: HTMLElement;\r\n @bindable() disabled: boolean = false;\r\n @bindable() id: string;\r\n @bindable() rows: number = 3;\r\n\r\n constructor(private readonly taskQueue: TaskQueue) {\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n this.updateStyle();\r\n }\r\n\r\n textAreaElementChanged() {\r\n this.updateStyle();\r\n }\r\n\r\n private updateStyle() {\r\n if (this.textAreaElement) {\r\n this.textAreaElement.style.height = 'auto';\r\n this.textAreaElement.style.height = (this.textAreaElement.scrollHeight) + 'px';\r\n this.textAreaElement.style.overflowY = 'hidden';\r\n }\r\n }\r\n\r\n bind() {\r\n }\r\n\r\n attached() {\r\n this.taskQueue.queueTask(() => { this.updateStyle(); });\r\n }\r\n}\r\n","module.exports = \"\";","import { bindable, customElement, bindingMode } from 'aurelia-framework';\r\n\r\n@customElement('help-text')\r\nexport class HelpText {\r\n @bindable icon: string = \"icon-question-circle\";\r\n @bindable({ defaultBindingMode: bindingMode.toView }) text = null;\r\n}\r\n","module.exports = \" \";","import { FrameworkConfiguration, PLATFORM } from \"aurelia-framework\";\r\n\r\nexport function configure(aurelia: FrameworkConfiguration) {\r\n aurelia\r\n // controls \r\n .globalResources(PLATFORM.moduleName(\"./gnt-textarea/gnt-textarea\"))\r\n .globalResources(PLATFORM.moduleName(\"./optional-attribute\"))\r\n .globalResources(PLATFORM.moduleName(\"./checkbox-list/checkbox-list\"))\r\n .globalResources(PLATFORM.moduleName(\"./radio-button-list/radio-button-list\"))\r\n .globalResources(PLATFORM.moduleName(\"./abn/abn\"))\r\n .globalResources(PLATFORM.moduleName(\"./acn/acn\"))\r\n .globalResources(PLATFORM.moduleName(\"./email-input/email-input\"))\r\n .globalResources(PLATFORM.moduleName(\"./date-picker/date-picker\"))\r\n .globalResources(PLATFORM.moduleName(\"./date-picker/date-time-picker\"))\r\n .globalResources(PLATFORM.moduleName(\"./wizard/wizard\"))\r\n .globalResources(PLATFORM.moduleName(\"./wizard/wizard-tab\"))\r\n .globalResources(PLATFORM.moduleName(\"./yesno/yesno\"))\r\n .globalResources(PLATFORM.moduleName(\"./select-input/select-input\"))\r\n .globalResources(PLATFORM.moduleName(\"./yesnomaybe/yesnomaybe\"))\r\n .globalResources(PLATFORM.moduleName(\"./validation-summary/validation-summary\"))\r\n .globalResources(PLATFORM.moduleName(\"./help-text/help-text\"))\r\n .globalResources(PLATFORM.moduleName(\"./currency/currency\"))\r\n .globalResources(PLATFORM.moduleName(\"./decimal/decimal\"))\r\n .globalResources(PLATFORM.moduleName(\"./aurelia-file-uploader/file-uploader\"))\r\n .globalResources(PLATFORM.moduleName(\"./featured-grants/featured-grants\"))\r\n //this is a heavy resource and should be in the template to enable proper chunking\r\n //.globalResources(PLATFORM.moduleName(\"./text-editor/text-editor\"))\r\n .globalResources(PLATFORM.moduleName(\"./location/location\"))\r\n .globalResources(PLATFORM.moduleName(\"./table/inline-table-field/inline-table-field\"))\r\n // attributes\r\n .globalResources(PLATFORM.moduleName(\"../attributes/grants-tooltip\"))\r\n .globalResources(PLATFORM.moduleName(\"../attributes/gnt-element-height\"))\r\n // value converters\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/date-format-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/currency-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/highlight-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/truthy-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/numeric-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/length-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/strip-html-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/abn-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/file-size-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/no-protocol-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/ensure-http-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/description-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/title-case-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/lower-case-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/synopsis-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/blob-to-url-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"../value-converters/duration-value-converter\"))\r\n .globalResources(PLATFORM.moduleName(\"./notification/banner\"))\r\n .globalResources(PLATFORM.moduleName(\"./currency/currency-change\"))\r\n ;\r\n}\r\n","import { autoinject, bindable, BindingEngine, bindingMode, computedFrom } from \"aurelia-framework\";\r\nimport { ValidationController, ValidationRules } from \"aurelia-validation\";\r\nimport { Dto } from \"project/project\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\r\nimport { HasElementsRule } from \"../custom-validation\";\r\n\r\n@autoinject\r\nexport class Location {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedType: SharedDto.Constants.LocationType;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedLocations: number[] | number;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) multiple: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stacked: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) disabled: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) required: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime}) includeNtRegions: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime}) includeInterstateInternational: boolean = false;\r\n\r\n id: number;\r\n locationTypes: SharedDto.ICodeListItemDto[];\r\n locations: SharedDto.ILocalityOptionDto[];\r\n loadingLocationTypes: boolean;\r\n loadingLocations: boolean;\r\n\r\n constructor(private readonly dataService: DataService,\r\n private readonly bindingEngine: BindingEngine,\r\n private readonly validationController: ValidationController,\r\n idGenerator: ControlIdGenerator) {\r\n this.id = idGenerator.getNextId();\r\n }\r\n\r\n attached() {\r\n ValidationRules\r\n .ensure((l: Location) => l.selectedType)\r\n .required()\r\n .when((l) => l.required)\r\n\r\n .ensure((l: Location) => l.selectedLocations)\r\n //multi select rules\r\n .satisfiesRule(HasElementsRule)\r\n .when(l => {\r\n return l.multiple && l.selectedType && l.selectedType !== SharedDto.Constants.LocationType.All\r\n })\r\n .withMessage(\"You must select a location\")\r\n //single select rules\r\n .required()\r\n .when(l => !l.multiple && l.selectedType && l.selectedType !== SharedDto.Constants.LocationType.All)\r\n .withMessage(\"You must select a location\")\r\n\r\n .on(this);\r\n\r\n if (this.selectedLocations instanceof Array) {\r\n this.bindingEngine.collectionObserver(this.selectedLocations).subscribe(() => {\r\n this.validationController.validate({ object: this });\r\n });\r\n }\r\n }\r\n\r\n selectedLocationsChanged() {\r\n this.validationController.validate({ object: this });\r\n }\r\n\r\n detached() {\r\n ValidationRules.off(this);\r\n }\r\n\r\n bind() {\r\n let promises = [];\r\n this.loadingLocationTypes = true;\r\n promises.push(this.dataService.getLocationTypes().then(types => {\r\n this.locationTypes = types;\r\n if(!this.includeNtRegions) {\r\n this.locationTypes = this.locationTypes.filter(x => x.code != SharedDto.Constants.LocationType[SharedDto.Constants.LocationType.NTRegions]);\r\n }\r\n if(!this.includeInterstateInternational) {\r\n this.locationTypes = this.locationTypes.filter(x => x.code != SharedDto.Constants.LocationType[SharedDto.Constants.LocationType.InterstateInternational]);\r\n }\r\n this.loadingLocationTypes = false;\r\n }));\r\n\r\n if (this.selectedType != null) {\r\n this.loadingLocations = true;\r\n promises.push(this.dataService.getLocationsByType(this.selectedType).then(locations => {\r\n this.locations = locations;\r\n this.loadingLocations = false;\r\n }));\r\n }\r\n }\r\n\r\n selectedTypeChanged(newVal?: SharedDto.Constants.LocationType, oldVal?: SharedDto.Constants.LocationType) {\r\n\r\n //reset location selections\r\n // yeah we can splice an empty array no problem so lets not fall through to the case that breaks the world. TP-665\r\n if (this.selectedLocations instanceof Array) {\r\n this.selectedLocations.splice(0, this.selectedLocations.length);\r\n } else {\r\n // this will break every observer and every binding if its called.\r\n this.selectedLocations = null;\r\n }\r\n\r\n this.validationController.validate({ object: this });\r\n \r\n //if null or all, no list to load, return early\r\n if (!newVal || newVal === SharedDto.Constants.LocationType.All) {\r\n return;\r\n }\r\n\r\n this.loadingLocations = true;\r\n this.dataService.getLocationsByType(this.selectedType)\r\n .then(locations => this.locations = locations)\r\n .finally(() => this.loadingLocations = false);\r\n }\r\n\r\n @computedFrom(\"selectedType\")\r\n get allNtSelected(): boolean {\r\n return this.selectedType === SharedDto.Constants.LocationType.All;\r\n }\r\n\r\n @computedFrom(\"allNtSelected\", \"selectedType\", \"disabled\")\r\n get locationSelectDisabled() {\r\n return this.allNtSelected || !this.selectedType || this.disabled;\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, singleton } from \"aurelia-dependency-injection\";\n\nimport { IAddressService } from \"shared/interfaces/iaddress-service\";\nimport { SharedDto } from \"project/project-shared\";\nimport { Dto } from \"project/project\";\nimport { RequestHandler } from \"services/request-handler\";\n\n@autoinject\n@singleton()\nexport class SystemNotificationService {\n constructor(private readonly requestHandler: RequestHandler) {\n\n }\n\n getSystemNotifications(): Promise> {\n return this.requestHandler.get>('utils/notifications');\n }\n\n}","import { autoinject, templateController, bindable,containerless } from 'aurelia-framework';\nimport \"./gnt-notification.less\";\nimport { SharedDto } from 'project/project-shared';\nimport { SystemNotificationService } from 'services/system-notification-service';\nimport { bind } from 'bluebird';\n\n@autoinject\n@containerless\nexport class Banner {\n @bindable() usage: string;\n \n messages: Array;\n\n constructor(private readonly systemNotificationService: SystemNotificationService) {\n\n }\n\n bind() {\n }\n\n attached() {\n return this.systemNotificationService.getSystemNotifications().then(res => this.messages = res);\n }\n}\n","module.exports = \" \";","import { Disposable } from 'aurelia-binding';\r\nimport { Factory, inject } from 'aurelia-dependency-injection';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { bindable, bindingMode, computedFrom, TaskQueue } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { ControllerValidateResult, RenderedError, validateTrigger, ValidationController, ValidationControllerFactory } from \"aurelia-validation\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport scrollIntoView from \"scroll-into-view\";\r\nimport { ApplicationFormService } from 'services/application-form-service';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { SharedBroadcastEvents } from 'shared/utils/SharedBroadcastEvents';\r\nimport { ValidationRenderer } from \"shared/utils/validation-renderer\";\r\nimport \"./application-form.less\";\r\nimport { FormDependencyService } from './form-dependency-service';\r\nimport { FormNavigationServices } from './form-navigation-services';\r\nimport { SharedRequestAdditionalInformationServices } from './request-additional-information/shared-request-additional-information-services';\r\n\r\ninterface IButtonNavigation {\r\n previous: \"Introduction\" | \"RequiredDocuments\" | \"Declaration\" | \"Step\" | null;\r\n previousStepIndex?: number;\r\n next: \"Introduction\" | \"RequiredDocuments\" | \"Declaration\" | \"Step\" | null;\r\n nextStepIndex?: number;\r\n}\r\n\r\n@inject(EventAggregator, \r\n ValidationControllerFactory, \r\n Factory.of(FormDependencyService), \r\n TaskQueue, \r\n FormNavigationServices, \r\n ApplicationFormService, \r\n ControlIdGenerator,\r\n SharedRequestAdditionalInformationServices\r\n)\r\n\r\nexport class ApplicationFormCustomElement {\r\n @bindable() formTemplate: SharedDto.OnlineForm.Form.IApplicationFormTemplateDto;\r\n @bindable() applicationForm: SharedDto.OnlineForm.Application.IApplicationFormDto;\r\n @bindable() showSubmit: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly = true;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) navOffset: string;\r\n @bindable() activeStep?: SharedDto.OnlineForm.Application.IFormInstanceStepDto;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) router: Router;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) allowAdditionalInfoRequests: boolean = false;\r\n\r\n stepTemplates: SharedDto.OnlineForm.Form.IStepDto[] = [];\r\n\r\n //option is passed all the way down to the question contols. This helps determine which validation rules need to be run.\r\n onSubmitValidation: boolean = false;\r\n showDeclaration: boolean;\r\n showIntro: boolean;\r\n showApplicationNumber: boolean;\r\n\r\n buttonNavigationState: IButtonNavigation;\r\n\r\n private controller: ValidationController;\r\n showValidationErrorCount: boolean;\r\n\r\n errors: RenderedError[][] = [];\r\n declarationErrors: RenderedError[] = [];\r\n requiredDocumentErrors: RenderedError[] = [];\r\n mainContent: HTMLElement;\r\n sideBar: JQuery;\r\n subscriptions: Disposable[] = [];\r\n\r\n formControlId: number = null;\r\n\r\n formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n showRequiredDocuments: boolean;\r\n\r\n private dependencyServices: FormDependencyService[];\r\n\r\n constructor(private readonly eventAggregator: EventAggregator,\r\n validationControllerFactory: ValidationControllerFactory,\r\n private readonly formDependencyFactory,\r\n private readonly taskQueue: TaskQueue,\r\n private readonly formNavigationServices: FormNavigationServices,\r\n private readonly applicationFormService: ApplicationFormService,\r\n private readonly controlIdGenerator: ControlIdGenerator,\r\n private readonly additionalInfoService: SharedRequestAdditionalInformationServices\r\n ) {\r\n this.controller = validationControllerFactory.createForCurrentScope();\r\n this.controller.validateTrigger = validateTrigger.changeOrBlur;\r\n this.controller.addRenderer(new ValidationRenderer());\r\n this.showValidationErrorCount = false;\r\n this.showDeclaration = false;\r\n this.showIntro = false;\r\n this.formControlId = this.controlIdGenerator.getNextId();\r\n }\r\n\r\n bind() {\r\n this.formInstance = this.applicationForm.formInstance;\r\n\r\n return this.setupNav();\r\n }\r\n\r\n setupNav() {\r\n // Sort the steps so they come out in the proper order.\r\n this.formInstance.steps.sort((a, b) => a.sortOrder - b.sortOrder);\r\n // is it necessary to sort form template steps too?\r\n this.formTemplate.steps.sort((a, b) => a.sortOrder - b.sortOrder);\r\n\r\n // we need to match step templates with the same index as formInstance.steps\r\n for (let i = 0; i < this.formInstance.steps.length; i++) {\r\n let stepInstance = this.formInstance.steps[i];\r\n this.stepTemplates.push(this.formTemplate.steps.find(stepTemplate => stepTemplate.stepId == stepInstance.templateStepId));\r\n }\r\n\r\n //Set the active step as the first step in the list.\r\n if (this.formTemplate.showIntroPage) {\r\n this.showIntroPage();\r\n } else {\r\n this.navToSection(this.formInstance.steps[0], this.formInstance.steps[0].sectionGroups[0], false\r\n );\r\n }\r\n\r\n this.determineSectionNavigation();\r\n this.showApplicationNumber = this.applicationForm.applicationNumber && this.applicationForm.applicationNumber.length > 0;\r\n }\r\n\r\n attached() {\r\n this.subscriptions.push(\r\n this.eventAggregator.subscribe(SharedBroadcastEvents.allFilesSaved, () => {\r\n return this.setupNav();\r\n }),\r\n this.eventAggregator.subscribe(SharedBroadcastEvents.downloadApplicationDocument, (data: { fileStorageId: number }) => {\r\n this.applicationFormService\r\n .generateAttachmentDownloadUrl(this.applicationForm.applicationNumber, data.fileStorageId)\r\n .then(link => window.open(link, '_blank', ''));\r\n }),\r\n this.eventAggregator.subscribe(SharedBroadcastEvents.additionalInformationDocumentDownload, (data: { additionalInformationRequestId: number, item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto}) => {\r\n \r\n if(data.item.attachment) {\r\n return this.additionalInfoService\r\n .downloadAdditionalInformationRequestAttachment(this.applicationForm.applicationId, \r\n data.additionalInformationRequestId, \r\n data.item.additionalInformationRequestItemId, \r\n data.item.attachment.fileStorageId) \r\n }\r\n \r\n if(data.item.actionedByAgencyFileStorage) {\r\n return this.additionalInfoService\r\n .downloadAdditionalInformationRequestSubmittedByAgencyAttachment(this.applicationForm.applicationId, \r\n data.additionalInformationRequestId, \r\n data.item.additionalInformationRequestItemId, \r\n data.item.actionedByAgencyFileStorage.fileStorageId) \r\n }\r\n \r\n })\r\n )\r\n\r\n this.generateDependencyServices();\r\n // get Side Navigation of the form\r\n this.sideBar = $(\"#leftCol > #application-inpage-nav > ul > li\");\r\n // hightlight sub navigation when user is scrolling to a section\r\n //this.formNavigationServices.subNavigationScrollSpy();\r\n this.formNavigationServices.removeAllHightlight(this.sideBar);\r\n this.formNavigationServices.highlightFirstStep(this.sideBar);\r\n }\r\n\r\n private generateDependencyServices() {\r\n var questionTemplateArray = [];\r\n this.formTemplate.steps.forEach((step) => {\r\n step.sections.forEach((section) => {\r\n if (!section.repeatable || true) {\r\n section.questions.forEach((question) => {\r\n questionTemplateArray.push({ sectionRepeatable: section.repeatable, question: question });\r\n });\r\n }\r\n });\r\n });\r\n\r\n this.dependencyServices = [];\r\n this.formTemplate.dependencyRules.forEach((dependencyRule) => {\r\n var a: FormDependencyService = this.formDependencyFactory(this.formInstance, dependencyRule, questionTemplateArray, this.formControlId);\r\n this.dependencyServices.push(a);\r\n });\r\n }\r\n\r\n private disposeDependencyServices() {\r\n if (this.dependencyServices) {\r\n while (this.dependencyServices.length > 0) {\r\n this.dependencyServices.pop().dispose();\r\n }\r\n }\r\n }\r\n\r\n sectionAddedCallback() {\r\n this.disposeDependencyServices();\r\n this.generateDependencyServices();\r\n }\r\n\r\n detached() {\r\n this.disposeDependencyServices();\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n //\r\n // Parent interface (start)\r\n //\r\n validateForSave(): Promise {\r\n this.onSubmitValidation = false;\r\n return this.controller.validate().then((result: ControllerValidateResult) => {\r\n if (!result.valid) {\r\n this.jumpToErrorSection();\r\n this.showValidationErrorCount = true;\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n\r\n validateForSubmit(): Promise {\r\n this.onSubmitValidation = true;\r\n return this.controller.validate().then((result: ControllerValidateResult) => {\r\n if (!result.valid) {\r\n this.jumpToErrorSection();\r\n this.showValidationErrorCount = true;\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n //\r\n // Parent interface (end)\r\n //\r\n\r\n navToSection(stepInstance: SharedDto.OnlineForm.Application.IFormInstanceStepDto,\r\n sectionGroup: SharedDto.OnlineForm.Application.IFormInstanceSectionGroupDto,\r\n scroll: boolean = true) {\r\n this.setActiveStep(stepInstance, false);\r\n\r\n var sectionName = 'section-' + sectionGroup.templateSectionId;\r\n var sectionElement = document.getElementById(sectionName);\r\n\r\n this.determineSectionNavigation();\r\n if (scroll) {\r\n setTimeout(() => {\r\n if (stepInstance.sectionGroups[0] === sectionGroup) {\r\n this.scrollToElement(this.mainContent);\r\n } else {\r\n this.scrollToElement(sectionElement);\r\n }\r\n }, 200);\r\n }\r\n }\r\n\r\n scrollToElement(element: HTMLElement) {\r\n //use microtask to ensure scrolling calculations happen after DOM is updated, stops weird results\r\n this.taskQueue.queueMicroTask(() => {\r\n scrollIntoView(element, { align: { top: 0, topOffset: 130 } });\r\n });\r\n\r\n }\r\n\r\n setActiveStep(step: SharedDto.OnlineForm.Application.IFormInstanceStepDto, scroll: boolean = true) {\r\n this.showDeclaration = false;\r\n this.showIntro = false;\r\n this.showRequiredDocuments = false;\r\n this.activeStep = step;\r\n this.determineSectionNavigation();\r\n }\r\n\r\n showIntroPage() {\r\n this.activeStep = null;\r\n this.showIntro = true;\r\n this.showDeclaration = false;\r\n this.showRequiredDocuments = false;\r\n this.determineSectionNavigation();\r\n this.scrollToElement(this.mainContent);\r\n }\r\n\r\n showDeclarationPage() {\r\n this.activeStep = null;\r\n this.showDeclaration = true;\r\n this.showIntro = false;\r\n this.showRequiredDocuments = false;\r\n this.determineSectionNavigation();\r\n this.scrollToElement(this.mainContent);\r\n }\r\n\r\n showRequiredDocumentsPage() {\r\n this.activeStep = null;\r\n this.showDeclaration = false;\r\n this.showIntro = false;\r\n this.showRequiredDocuments = true;\r\n this.determineSectionNavigation();\r\n this.scrollToElement(this.mainContent)\r\n }\r\n\r\n private jumpToErrorSection() {\r\n var index = this.formInstance.steps.indexOf(this.activeStep);\r\n if (index > -1 && this.errors[index].length > 0) {\r\n // don't jump to another section if this section has errors\r\n return;\r\n }\r\n // need to match error array index to step array index...\r\n var index = this.errors.findIndex(e => e.length > 0);\r\n if (index >= 0) {\r\n this.setActiveStep(this.formInstance.steps[index], false);\r\n }\r\n // if no steps have an error, try the declaration\r\n else if (this.declarationErrors.length > 0) {\r\n this.showDeclarationPage();\r\n }\r\n }\r\n\r\n determineSectionNavigation() {\r\n var nav: IButtonNavigation = {\r\n previous: null,\r\n next: null\r\n };\r\n\r\n // are we in the intro?\r\n if (this.showIntro) {\r\n if (this.formInstance.steps.length > 0) {\r\n nav.next = \"Step\";\r\n nav.nextStepIndex = 0;\r\n }\r\n else {\r\n nav.next = \"Declaration\";\r\n }\r\n\r\n this.formNavigationServices.removeAllHightlight(this.sideBar)\r\n this.formNavigationServices.highlightFirstStep(this.sideBar)\r\n }\r\n else if (this.showRequiredDocuments) {\r\n nav.next = \"Declaration\";\r\n if (this.formInstance.steps.length > 0) {\r\n nav.previous = \"Step\";\r\n nav.previousStepIndex = this.formInstance.steps.length - 1;\r\n }\r\n else {\r\n nav.previous = \"Introduction\";\r\n }\r\n }\r\n // are we on the declaration\r\n else if (this.showDeclaration) {\r\n if (this.formInstance.steps.length > 0) {\r\n nav.previous = \"Step\";\r\n nav.previousStepIndex = this.formInstance.steps.length - 1;\r\n } else {\r\n nav.previous = this.formTemplate.showIntroPage ? \"Introduction\" : null;\r\n }\r\n this.formNavigationServices.removeAllHightlight(this.sideBar)\r\n this.formNavigationServices.highlightLastStep(this.sideBar)\r\n } else {\r\n // is there only 1 step?\r\n if (this.formInstance.steps.length == 1) {\r\n nav.previous = this.formTemplate.showIntroPage ? \"Introduction\" : null;\r\n nav.next = \"Declaration\";\r\n\r\n if (this.formTemplate.showIntroPage) {\r\n this.formNavigationServices.removeAllHightlight(this.sideBar)\r\n this.formNavigationServices.highlightLastStep(this.sideBar)\r\n } else {\r\n this.formNavigationServices.removeAllHightlight(this.sideBar)\r\n this.formNavigationServices.highlightFirstStep(this.sideBar)\r\n }\r\n } else {\r\n var index = this.formInstance.steps.indexOf(this.activeStep);\r\n // are we at the start?\r\n if (index == 0) {\r\n nav.previous = this.formTemplate.showIntroPage ? \"Introduction\" : null;\r\n nav.next = \"Step\";\r\n nav.nextStepIndex = index + 1;\r\n } else if (index == this.formInstance.steps.length - 1) {\r\n nav.previous = \"Step\";\r\n nav.previousStepIndex = index - 1;\r\n nav.next = \"Declaration\";\r\n } else {\r\n nav.previous = \"Step\";\r\n nav.previousStepIndex = index - 1;\r\n nav.next = \"Step\";\r\n nav.nextStepIndex = index + 1;\r\n }\r\n this.formNavigationServices.highlightJumpStep(nav, this.sideBar, this.formTemplate.showIntroPage)\r\n }\r\n }\r\n this.buttonNavigationState = nav;\r\n }\r\n\r\n navigateForm(type: string) {\r\n switch (type) {\r\n case 'next':\r\n this.formNavigationServices.highlightNextStep(this.buttonNavigationState, this.sideBar, this.formTemplate.showIntroPage);\r\n this.navigateNextStep();\r\n break;\r\n case 'previous':\r\n this.formNavigationServices.highlightPreviousStep(this.buttonNavigationState, this.sideBar);\r\n this.navigatePreviousStep();\r\n break;\r\n }\r\n }\r\n\r\n navigateNextStep() {\r\n // perform navigation\r\n if (!this.buttonNavigationState.next) {\r\n return;\r\n }\r\n\r\n if (this.buttonNavigationState.next == \"Introduction\") {\r\n this.showIntroPage();\r\n } else if (this.buttonNavigationState.next == \"Declaration\") {\r\n this.showDeclarationPage();\r\n } else if (this.buttonNavigationState.next == \"RequiredDocuments\") {\r\n this.showRequiredDocumentsPage();\r\n } else {\r\n this.navToSection(\r\n this.formInstance.steps[this.buttonNavigationState.nextStepIndex],\r\n this.formInstance.steps[this.buttonNavigationState.nextStepIndex].sectionGroups[0]);\r\n }\r\n }\r\n\r\n navigatePreviousStep() {\r\n // perform navigation\r\n if (!this.buttonNavigationState.previous) {\r\n return;\r\n }\r\n\r\n if (this.buttonNavigationState.previous == \"Introduction\") {\r\n this.showIntroPage();\r\n } else if (this.buttonNavigationState.previous == \"Declaration\") {\r\n this.showDeclarationPage();\r\n } else if (this.buttonNavigationState.previous == \"RequiredDocuments\") {\r\n this.showRequiredDocumentsPage();\r\n } else {\r\n this.navToSection(\r\n this.formInstance.steps[this.buttonNavigationState.previousStepIndex],\r\n this.formInstance.steps[this.buttonNavigationState.previousStepIndex].sectionGroups[0]);\r\n }\r\n }\r\n\r\n @computedFrom(\"formInstance\")\r\n get standardDeclaration() {\r\n return !this.applicationForm.createdByAgencyId;\r\n }\r\n\r\n}\r\n","module.exports = \" \";","import { computedFrom } from \"aurelia-binding\";\r\nimport { bindable } from \"aurelia-templating\";\r\n\r\n//note this control follows the NTG Brand Guidelines as close as possible. Requirements scattered throughout as comments.\r\nexport class DepartmentBlock {\r\n\r\n lines: number = 1;\r\n\r\n //configurable line height to scale how big this branding will be.\r\n @bindable() lineHeight: number = 20;//px\r\n @bindable() department: string;\r\n //note we need a seperate property to store the rendered department to avoid recursion in the change handler of the bound department\r\n renderedDepartment: string;\r\n\r\n departmentChanged(newValue, oldValue) {\r\n if (!newValue) { return; }\r\n\r\n this.renderedDepartment = newValue;\r\n\r\n let departmentOfString = \"department of \";\r\n\r\n if (newValue.toLowerCase().indexOf(departmentOfString) === 0) {\r\n //encapsulate everything except 'department of' in \r\n this.renderedDepartment = this.renderedDepartment.insert(departmentOfString.length, \"\");\r\n this.renderedDepartment = this.renderedDepartment.insert(this.renderedDepartment.length, \"\");\r\n\r\n } else {\r\n this.renderedDepartment = `${this.renderedDepartment}`\r\n }\r\n\r\n let contentsInStrong = this.renderedDepartment.substring(this.renderedDepartment.indexOf(\"\") + \"\".length, this.renderedDepartment.indexOf(\"\"));\r\n\r\n //REQUIREMENT: 'DEPARTMENT OF' is to sit on a line of its own unless the department name is only one word eg. Health\r\n //if more than 1 word in , add BR before it.\r\n if (newValue.toLowerCase().indexOf(departmentOfString) === 0 && contentsInStrong.split(' ').length > 1) {\r\n this.renderedDepartment = this.renderedDepartment.insert(this.renderedDepartment.indexOf(\"\"), \"
\");\r\n }\r\n\r\n //REQUIREMENT The Department name is to sit under ‘DEPARTMENT OF’ and may be split into 2 or 3 lines depending on space.\r\n //magic that inserts a
at the first white space found after 14 characters. taken from: https://stackoverflow.com/a/40862575\r\n let broken = contentsInStrong.replace(/(.{12}[^ ]* )/g, \"$1
\");\r\n this.renderedDepartment = this.renderedDepartment.slice(0, this.renderedDepartment.indexOf(\"\") + \"\".length) + broken + \"\";\r\n\r\n //TODO: REQUIREMENT: The Department name must not exceed four lines of text.\r\n //how will this be implemented? Increase the break points for new lines? Ellipsis overflow?...\r\n\r\n //to get the number of lines of text, count instances of
+ 1 for the original line.\r\n this.lines = (this.renderedDepartment.match(/
/g) || []).length + 1;\r\n }\r\n\r\n @computedFrom(\"lines\", \"lineHeight\")\r\n get textContentStyle(): any {\r\n //REQUIREMENT: The top of the Department name must never extend higher than the division of colours in the colour bar.\r\n //use number of lines to determine how high the orange line should go\r\n let orangeHeightUnit = this.lines <= 2 ? 3 : this.lines + 1;\r\n let style = {\r\n 'position': 'relative',\r\n 'border-left': '10px solid #e06e1d',\r\n 'padding-left': `${this.lineHeight}px`,\r\n 'font-size': `${this.lineHeight}px`,\r\n 'line-height': `${this.lineHeight}px`,\r\n //REQUIREMENT: Department name is to be written in all caps, in both regular and black font weights.\r\n 'text-transform': 'UPPERCASE',\r\n 'height': (orangeHeightUnit * this.lineHeight) + \"px\"\r\n };\r\n return style;\r\n }\r\n\r\n @computedFrom(\"lines\", \"lineHeight\")\r\n get blackBarStyle(): any {\r\n //calculate how high the black line should be drawn based on the orange line\r\n let orangeHeightUnit = this.lines <= 2 ? 3 : this.lines + 1;\r\n var style = {\r\n 'border-left': '10px solid black',\r\n 'height': null\r\n };\r\n\r\n /* REQUIREMENT: The colour bar is broken into two sections. The colour bar can be divided at a ratio of approximately 1:1 or 1:2 \r\n depending on the number of text lines in the department name, or the position of the NTG logo. */\r\n if (orangeHeightUnit > 3) {\r\n //1:2 ratio of black to orange\r\n style.height = (orangeHeightUnit * this.lineHeight) * 0.5 + \"px\";\r\n } else {\r\n //1:1 ratio of black to orange\r\n style.height = (orangeHeightUnit * this.lineHeight) + \"px\";\r\n }\r\n\r\n return style;\r\n }\r\n}","module.exports = \"\";","import { bindingMode, computedFrom } from \"aurelia-binding\";\nimport { bindable } from \"aurelia-templating\";\nimport { SharedDto } from \"project/project-shared\";\n\nexport class QHeadHelpCustomElement {\n\n @bindable({ defaultBindingMode: bindingMode.toView }) template: SharedDto.OnlineForm.Form.IQuestionDto;\n\n @computedFrom(\"template.helpTextLocation\")\n get showHelp(): boolean {\n //show above answer if null for whatever reason\n return !this.template.helpTextLocation || this.template.helpTextLocation == SharedDto.Constants.HelpTextLocation.AboveAnswer;\n };\n\n}\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, computedFrom } from \"aurelia-framework\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class QLabelCustomElement {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) id;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) template: SharedDto.OnlineForm.Form.IQuestionDto;\r\n\r\n @computedFrom(\"template.helpTextLocation\", \"template.helpText\")\r\n get showHelp(): boolean {\r\n return this.template.helpTextLocation == SharedDto.Constants.HelpTextLocation.ToolTip && !!this.template.helpText;\r\n }\r\n}\r\n","module.exports = \" \";","import { bindingMode, computedFrom } from \"aurelia-binding\";\r\nimport { bindable } from \"aurelia-templating\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\nexport class QTailHelpCustomElement {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.toView }) template: SharedDto.OnlineForm.Form.IQuestionDto;\r\n\r\n @computedFrom(\"template.helpTextLocation\")\r\n get showHelp(): boolean {\r\n return this.template.helpTextLocation == SharedDto.Constants.HelpTextLocation.BelowAnswer;\r\n };\r\n \r\n}\r\n","module.exports = \" \";","import { customElement, bindable, bindingMode } from \"aurelia-framework\";\r\nimport { ValidationRules } from \"aurelia-validation\";\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { OnlineFormService } from \"services/online-form-service\";\r\n\r\n@customElement('document-declaration')\r\nexport class DocumentDeclaration {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable() formInstance: SharedDto.OnlineForm.Application.IApplicationFormDto;\r\n @bindable({defaultBinding: bindingMode.twoWay}) document: SharedDto.IFilePropertiesDto;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) readonly: boolean = false;\r\n\r\n constructor(\r\n private readonly formService: OnlineFormService){\r\n }\r\n\r\n bind() {\r\n this.setupValidation();\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules\r\n .ensure((fi: SharedDto.OnlineForm.Application.IApplicationFormDto) => fi.documentDeclaration)\r\n .required()\r\n .when(() => this.onSubmitValidation)\r\n .on(this.formInstance);\r\n }\r\n\r\n download() {\r\n this.formService.getDeclarationDocument(this.formInstance.applicationId);\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { DateComparison, DateOfBirthRule } from '../../custom-validation';\r\n\r\n@customElement('form-declaration')\r\n@autoinject\r\nexport class FormDeclaration {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) declaration: SharedDto.OnlineForm.Application.IApplicationDeclarationDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) readonly: boolean = false;\r\n @bindable() formTemplate: SharedDto.OnlineForm.Form.IApplicationFormTemplateDto;\r\n showStep = true;\r\n titleList: SharedDto.ICodeListItemDto[];\r\n\r\n nameInput: HTMLInputElement;\r\n\r\n constructor(private readonly dataService: DataService) { }\r\n\r\n bind() {\r\n this.dataService.getTitles().then((tl: SharedDto.ICodeListItemDto[]) => {\r\n this.titleList = tl;\r\n });\r\n this.setupValidation();\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.fullName).maxLength(400)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.location).maxLength(400)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.givenName).maxLength(150)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.familyName).maxLength(150)\r\n\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.fullName).required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.declared).required().equals(true)\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.location).required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.titleId).displayName(\"Title\").required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.givenName).required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.familyName).required()\r\n .when(() => this.onSubmitValidation)\r\n\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.dateOfBirth).required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.dateOfBirth).satisfiesRule(DateOfBirthRule)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.dateOfDeclaration).required()\r\n .when(() => this.onSubmitValidation)\r\n .ensure((a: SharedDto.OnlineForm.Application.IApplicationDeclarationDto) => a.dateOfDeclaration).satisfiesRule(DateComparison, \"<\", o => {\r\n return new Date().getTime();\r\n }, \"ignored\")\r\n .withMessage(\"Declaration must be today or a date in the past\")\r\n .on(this.declaration);\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, customElement } from 'aurelia-framework';\r\n\r\n@customElement('form-intro')\r\nexport class FormIntro {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) introContent: String;\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode } from \"aurelia-framework\";\r\n\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\nexport class NavSectionGroupCustomElement {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionGroup: SharedDto.OnlineForm.Application.IFormInstanceSectionGroupDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) template: SharedDto.OnlineForm.Form.ISectionDto;\r\n @bindable() selectSectionGroup;\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, BindingEngine, Disposable, autoinject, computedFrom } from \"aurelia-framework\";\r\nimport { RenderedError } from \"aurelia-validation\";\r\n\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class NavStepCustomElement {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) step: SharedDto.OnlineForm.Application.IFormInstanceStepDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) template: SharedDto.OnlineForm.Form.IStepDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) errorCount: number;\r\n sectionGroupTemplates: SharedDto.OnlineForm.Form.ISectionDto[] = [];\r\n\r\n @bindable selectStep; // call binding\r\n @bindable selectSectionGroup; // call binding\r\n\r\n subscriptions: Disposable[] = [];\r\n\r\n constructor(private readonly bindingEngine: BindingEngine){\r\n\r\n }\r\n\r\n bind() {\r\n this.buildNav();\r\n this.subscriptions.push(this.bindingEngine.propertyObserver(this.step, \"sectionGroups\").subscribe(() => {\r\n this.buildNav();\r\n }));\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private buildNav(){\r\n var sgt: SharedDto.OnlineForm.Form.ISectionDto[] = [];\r\n // we need to match section group templates with the same index as stepInstance.sectionGroups\r\n for (let i = 0; i < this.step.sectionGroups.length; i++) {\r\n let sectionGroupInstance = this.step.sectionGroups[i]; \r\n sgt.push(this.template.sections.find(s => s.sectionId == sectionGroupInstance.templateSectionId));\r\n }\r\n this.sectionGroupTemplates = sgt;\r\n }\r\n}\r\n","module.exports = \" \";","import { inject, DOM, bindable, customElement, bindingMode, computedFrom } from 'aurelia-framework';\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\nimport { SharedDto } from \"project/project-shared\";\nimport { QuestionBase } from \"../question-base\";\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\nimport * as moment from 'moment';\nimport { UtilityService } from 'services/utility-service';\n\n@customElement('form-abn-lookup')\nexport class FormAbnLookup extends QuestionBase {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IAbnLookupAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n \n checkingAbr: boolean = false;\n abnValidated: boolean = false;\n notActive: boolean = false;\n\n abnResult: SharedDto.IAbnDetailsDto;\n\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator, private readonly utilsService: UtilityService) {\n super(controlIdGenerator);\n }\n\n bind() {\n super.bind();\n }\n \n attached(){\n super.attached();\n if(this.questionInstance.details) {\n this.abnValidated = true;\n this.notActive = !this.questionInstance.details.active;\n this.abnResult = this.questionInstance.details;\n }\n }\n\n setupValidation(){\n ValidationRules.off(this.questionInstance);\n\n ValidationRules\n .ensure((m: SharedDto.OnlineForm.Application.IAbnLookupAnswerDto) => m.abn)\n .required()\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\n .on(this.questionInstance);\n }\n\n async validateAbn() {\n this.checkingAbr = true;\n try {\n let result = await this.utilsService.abrLookup(this.questionInstance.abn);\n if(result) {\n this.abnValidated = true;\n this.notActive = !result.active;\n this.abnResult = result;\n this.questionInstance.key = result.key;\n this.questionInstance.retrievedBy = null;\n this.questionInstance.retrievedOn = null;\n } \n this.checkingAbr = false;\n }\n catch(ex) {\n // the lookup failed for some reason, cleanup and let the user enter manually \n this.notActive = true;\n this.abnValidated = false;\n this.checkingAbr = false;\n this.abnResult = null;\n }\n }\n}\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, computedFrom, Disposable } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from 'project/project-shared';\r\nimport { DataService } from \"services/data-service\";\r\nimport { addressToSingleLineString } from 'shared/utils/address-utils';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@autoinject\r\nexport class FormAddress extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IAddressAnswerDto;\r\n\r\n id: number;\r\n states: SharedDto.ICodeListItemDto[] = [];\r\n countries: SharedDto.ICodeListItemDto[] = [];\r\n australia: SharedDto.ICodeListItemDto;\r\n nt: SharedDto.ICodeListItemDto;\r\n loadingStates = true;\r\n loadingCountries = true;\r\n\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n private subscriptions: Disposable[] = [];\r\n\r\n constructor(controlIdGenerator: ControlIdGenerator,\r\n private readonly dataService: DataService) {\r\n super(controlIdGenerator);\r\n this.id = controlIdGenerator.getNextId();\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n this.dataService.getStates().then(data => {\r\n this.states = data;\r\n this.nt = data.find(s => s.code === \"NT\");\r\n this.loadingStates = false;\r\n });\r\n this.dataService.getCountries().then(data => {\r\n this.countries = data;\r\n this.australia = this.countries.find(c => c.code === \"au\");\r\n if (this.questionInstance.countryId == null) {\r\n this.questionInstance.countryId = this.australia.id;\r\n if (this.questionInstance.australianStateTerritory == null) {\r\n this.questionInstance.australianStateTerritory = SharedDto.Constants.StateTerritory.NT;\r\n this.questionInstance.nonAustralianState = null;\r\n }\r\n }\r\n this.loadingCountries = false;\r\n });\r\n }\r\n\r\n unbind() {\r\n while (this.subscriptions.length) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n\r\n var builder = ValidationRules\r\n .ensure((q: SharedDto.OnlineForm.Application.IAddressAnswerDto) => q.line1)\r\n .required()\r\n .when(() => this.mandatory && this.visibility)\r\n .ensure(q => q.postCode)\r\n .minLength(4)\r\n .maxLength(4)\r\n .required()\r\n .when(() => this.mandatory && this.visibility)\r\n .ensure(q => q.australianStateTerritory)\r\n .required()\r\n .when(q => this.mandatory && this.australia && q.countryId == this.australia.id && this.visibility)\r\n .ensure(q => q.nonAustralianState)\r\n .displayName(\"State\")\r\n .required()\r\n .when(q => this.mandatory && this.australia && q.countryId != this.australia.id && this.visibility)\r\n .ensure(q => q.suburb)\r\n .required()\r\n .when(() => this.mandatory && this.visibility);\r\n\r\n if (this.onSubmitValidation) {\r\n // already handled by this.mandatory\r\n }\r\n builder.on(this.questionInstance);\r\n }\r\n\r\n @computedFrom(\"australia\", \"countries\", \"questionInstance.countryId\")\r\n get stateSelect(): boolean {\r\n if (this.questionInstance == null || this.australia == null) { return true; }\r\n let showStateSelect = this.questionInstance.countryId == this.australia.id;\r\n if (showStateSelect) {\r\n this.questionInstance.nonAustralianState == null;\r\n }\r\n else {\r\n this.questionInstance.australianStateTerritory = null;\r\n }\r\n return showStateSelect;\r\n }\r\n\r\n\r\n @computedFrom(\"questionTemplate.mandatory\")\r\n get mandatory(): boolean {\r\n // some address fields are mandatory when:\r\n // 1. submitting, if questionTemplate.mandatory is true\r\n // 2. saving or submitting, if some fields are filled out (i.e. you can't enter line 1 without a suburb)\r\n return (\r\n (this.isMandatory && this.onSubmitValidation) ||\r\n (!this.isNullOrEmpty(this.questionInstance.line1) ||\r\n !this.isNullOrEmpty(this.questionInstance.line2) ||\r\n !this.isNullOrEmpty(this.questionInstance.suburb) ||\r\n !this.isNullOrEmpty(this.questionInstance.postCode))\r\n );\r\n }\r\n\r\n private isNullOrEmpty(str: string) {\r\n return str == null || str.length == 0;\r\n }\r\n\r\n @computedFrom(\"questionInstance\", \"states\", \"countries\")\r\n get singleLineAddress(): string {\r\n return addressToSingleLineString(this.questionInstance, this.states, this.countries);\r\n }\r\n}\r\n","module.exports = \" \";","import { bindingMode, computedFrom, observable } from \"aurelia-binding\";\nimport { autoinject } from \"aurelia-framework\";\nimport { bindable } from \"aurelia-templating\";\nimport { ValidationRules } from \"aurelia-validation\";\nimport { SharedDto } from \"project/project-shared\";\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\nimport { QuestionBase } from \"../question-base\";\nimport { isValidABN } from \"abnacn-validator\";\nimport { UtilityService } from \"services/utility-service\";\n\n@autoinject\nexport class FormBusiness extends QuestionBase {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IBusinessAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n id: string;\n\n @observable abn: string;\n\n checkingAbr: boolean = false;\n abnValidated: boolean = false;\n notActive: boolean = false;\n setup: boolean = false;\n\n constructor(controlIdGenerator: ControlIdGenerator,\n private readonly utilsService: UtilityService) {\n super(controlIdGenerator);\n this.id = controlIdGenerator.getNextId().toString();\n }\n\n abnChanged() {\n if(!this.setup) {\n return;\n }\n\n this.notActive = false;\n this.abnValidated = false;\n this.questionInstance.abn = this.abn;\n\n if(this.abnFormatValid) {\n return this.abrLookupValidation();\n }\n }\n\n bind() {\n this.abn = this.questionInstance.abn;\n if(this.abnFormatValid && this.questionInstance.legalName && this.questionInstance.businessName) {\n this.abnValidated = true;\n }\n this.setup = true;\n }\n\n async attached() {\n super.attached();\n if(this.abnFormatValid) {\n if (this.lookupAlreadyPerformed()){\n this.abnValidated = true;\n }\n else {\n await this.abrLookupValidation();\n }\n }\n }\n\n lookupAlreadyPerformed() : boolean {\n return !!this.questionInstance.businessName || !!this.questionInstance.legalName\n }\n\n setupValidation() {\n ValidationRules\n .ensure((q: SharedDto.OnlineForm.Application.IBusinessAnswerDto) => q.abn)\n .required()\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\n\n .ensure((q: SharedDto.OnlineForm.Application.IBusinessAnswerDto) => q.businessName)\n .maxLength(150)\n\n .ensure((q: SharedDto.OnlineForm.Application.IBusinessAnswerDto) => q.legalName)\n .required()\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory && this.notActive)\n .maxLength(150)\n\n .on(this.questionInstance);\n\n ValidationRules\n .ensure((vm: FormBusiness) => vm.questionInstance)\n .satisfies(() => {\n if (this.oneFieldEntered && !this.allFieldsEntered) {\n return false;\n }\n return true;\n })\n .when(() => this.visibility && this.onSubmitValidation && !this.isMandatory && !this.abnValidated)\n .withMessage(\"You must completely fill in the business details or clear them.\")\n .ensure((vm: FormBusiness) => vm.checkingAbr)\n .satisfies(() => !this.checkingAbr)\n .withMessage(\"ABR lookup still in progress\")\n .on(this)\n }\n\n detached() {\n super.detached();\n ValidationRules.off(this);\n }\n\n clearExistingValidation() {\n\n }\n\n async abrLookupValidation() {\n this.checkingAbr = true;\n try {\n let result = await this.utilsService.abrLookup(this.abn);\n if(result && result.active) {\n if(!this.questionInstance.businessName) {\n this.questionInstance.businessName = result.businessName;\n }\n this.questionInstance.legalName = result.mainTradingName;\n this.abnValidated = true;\n }\n else if(result && !result.active) {\n this.notActive = true;\n this.questionInstance.businessName = null;\n this.questionInstance.legalName = null;\n this.abnValidated = false;\n }\n this.checkingAbr = false;\n }\n catch(ex) {\n // the lookup failed for some reason, cleanup and let the user enter manually\n this.notActive = false;\n this.abnValidated = false;\n this.questionInstance.businessName = null;\n this.questionInstance.legalName = null;\n this.checkingAbr = false;\n }\n }\n\n @computedFrom(\"questionInstance.businessName\", \"questionInstance.legalName\", \"questionInstance.abn\")\n get oneFieldEntered(): boolean {\n return !!this.questionInstance.businessName || !!this.questionInstance.legalName || !!this.questionInstance.abn;\n }\n\n @computedFrom(\"questionInstance.businessName\", \"questionInstance.legalName\", \"questionInstance.abn\")\n get allFieldsEntered(): boolean {\n return !!this.questionInstance.businessName && !!this.questionInstance.legalName && !!this.questionInstance.abn;\n }\n\n @computedFrom(\"abn\")\n get abnFormatValid(): boolean {\n return this.abn && this.abn.length == 11 && isValidABN(this.abn);\n }\n\n}\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, Disposable } from 'aurelia-framework';\nimport { SharedDto } from 'project/project-shared';\nimport { DateOfBirthRule } from 'shared/controls/custom-validation';\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\nimport { ValidationRules } from '../../../../../../node_modules/aurelia-validation';\nimport { CodeListService } from '../code-list-service';\nimport { QuestionBase } from \"../question-base\";\n\n@autoinject\nexport class FormChild extends QuestionBase {\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IChildAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n id: number;\n\n private subscriptions: Disposable[] = [];\n schools: SharedDto.ICodeListItemDto[];\n\n loading: boolean = true;\n\n constructor(controlIdGenerator: ControlIdGenerator,\n private readonly codeListService: CodeListService) {\n super(controlIdGenerator);\n\n this.id = controlIdGenerator.getNextId();\n }\n\n bind() {\n super.bind();\n this.codeListService.getSchools(true).then(data => {\n this.schools = data;\n this.loading = false;\n })\n\n }\n\n attached() {\n super.attached();\n // this.subscriptions.push(\n // this.deepObserver.observe(this, \"questionInstance\", () => {\n // //triger revalidation of the rules attached to 'this' (all fields mandatory when one field entered)\n // //this is mostly to hide the validation message if it ever appears, as soon as it's no longer the case.\n // if (this.validationController.errors.findIndex(x => x.object === this)) {\n // this.validationController.validate({\n // object: this\n // });\n // }\n // })\n // );\n }\n\n unbind() {\n while (this.subscriptions.length) {\n this.subscriptions.pop().dispose();\n }\n }\n\n setupValidation() {\n ValidationRules.off(this.questionInstance);\n\n var rules =\n ValidationRules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.givenName)\n .required()\n .when(() => this.visibility && this.onSubmitValidation)\n .maxLength(150)\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.lastName)\n .required()\n .when(() => this.visibility && this.onSubmitValidation)\n .maxLength(150)\n ;\n\n if (this.schoolRequired) {\n rules = rules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.schoolId)\n .required()\n .when(() => this.visibility && this.onSubmitValidation)\n ;\n }\n\n if (this.middleNameRequired) {\n rules = rules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.middleName)\n .maxLength(150)\n ;\n }\n\n if (this.dateOfBirthRequired) {\n rules = rules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.dateOfBirth)\n .required()\n .when(() => this.visibility && this.onSubmitValidation)\n .satisfiesRule(DateOfBirthRule)\n ;\n let maxAge = this.maxAgeRequired;\n if (maxAge) {\n rules = rules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.dateOfBirth)\n .satisfies((a, o) => {\n let dob = new Date(a);\n let baseline = new Date(new Date().setFullYear(new Date().getFullYear() - maxAge));\n return dob > baseline;\n })\n .withMessage(`Must be under ${maxAge} years old.`);\n }\n let minAge = this.minAgeRequired;\n if (minAge) {\n rules = rules\n .ensure((a: SharedDto.OnlineForm.Application.IChildAnswerDto) => a.dateOfBirth)\n .satisfies((a, o) => {\n let dob = new Date(a);\n let baseline = new Date(new Date().setFullYear(new Date().getFullYear() - minAge));\n return dob <= baseline;\n })\n .withMessage(`Must be at least ${minAge} years old.`);\n }\n }\n\n rules.on(this.questionInstance);\n\n }\n\n get schoolRequired(): boolean {\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.ShowSelectSchool && x.boolValue == true) > -1;\n }\n\n get middleNameRequired(): boolean {\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.ShowSelectMiddleName && x.boolValue == true) > -1;\n }\n\n get dateOfBirthRequired(): boolean {\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.ShowSelectDateOfBirth && x.boolValue == true) > -1;\n }\n\n get upnRequired(): boolean {\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.ShowSelectUPN && x.boolValue == true) > -1;\n }\n\n get previousSchoolRequired(): boolean {\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.ShowSelectPreviousSchool && x.boolValue == true) > -1;\n }\n\n get maxAgeRequired(): number {\n let config = this.questionTemplate.configurationOptions.find(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.MaximumAge);\n return config ? config.numberValue : 0;\n }\n\n get minAgeRequired(): number {\n let config = this.questionTemplate.configurationOptions.find(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.MinimumAge);\n return config ? config.numberValue : 0;\n }\n\n}\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, computedFrom, Disposable } from 'aurelia-framework';\r\nimport { SharedDto } from 'project/project-shared';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { ValidationController, ValidationRules } from '../../../../../../node_modules/aurelia-validation';\r\nimport { DeepObserver } from '../../../../utils/deep-observer';\r\nimport { PersonNameRule } from '../../../custom-validation';\r\nimport { CodeListService } from '../code-list-service';\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@autoinject\r\nexport class FormContact extends QuestionBase {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IContactAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n id: number;\r\n\r\n private subscriptions: Disposable[] = [];\r\n applicationContactRoles: SharedDto.ICodeListItemDto[];\r\n loadingRoles = true;\r\n\r\n constructor(private controlIdGenerator: ControlIdGenerator,\r\n private readonly codeListService: CodeListService,\r\n private readonly deepObserver: DeepObserver,\r\n private readonly validationController: ValidationController) {\r\n super(controlIdGenerator);\r\n\r\n this.id = controlIdGenerator.getNextId();\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n //get application contact roles\r\n this.codeListService.getApplicationContactRoles(true).then(data => {\r\n this.applicationContactRoles = data;\r\n this.loadingRoles = false;\r\n })\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n this.subscriptions.push(\r\n this.deepObserver.observe(this, \"questionInstance\", () => {\r\n //triger revalidation of the rules attached to 'this' (all fields mandatory when one field entered)\r\n //this is mostly to hide the validation message if it ever appears, as soon as it's no longer the case.\r\n if (this.validationController.errors.findIndex(x => x.object === this)) {\r\n this.validationController.validate({\r\n object: this\r\n });\r\n }\r\n })\r\n );\r\n }\r\n\r\n unbind() {\r\n while (this.subscriptions.length) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n\r\n ValidationRules\r\n .ensure((contact: SharedDto.OnlineForm.Application.IContactAnswerDto) => contact.contactName)\r\n .maxLength(150)\r\n .satisfiesRule(PersonNameRule)\r\n .required()\r\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\r\n\r\n .ensure((contact: SharedDto.OnlineForm.Application.IContactAnswerDto) => contact.emailAddress)\r\n .maxLength(150)\r\n .email()\r\n .required()\r\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\r\n\r\n .ensure((contact: SharedDto.OnlineForm.Application.IContactAnswerDto) => contact.phoneNumber)\r\n .required()\r\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\r\n\r\n .ensure((contact: SharedDto.OnlineForm.Application.IContactAnswerDto) => contact.applicationContactRoleId)\r\n .required()\r\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory && this.roleRequired)\r\n\r\n .on(this.questionInstance)\r\n\r\n ValidationRules.off(this);\r\n\r\n ValidationRules\r\n .ensure((vm: FormContact) => vm.questionInstance)\r\n .satisfies(() => {\r\n if (this.oneFieldEntered && !this.allFieldsEntered) {\r\n return false;\r\n }\r\n return true;\r\n })\r\n .when(() => this.visibility && this.onSubmitValidation && !this.isMandatory)\r\n .withMessage(\"You must completely fill in the contact details or clear them.\")\r\n .on(this)\r\n }\r\n\r\n @computedFrom(\"questionTemplate.mandatory\", \"onSubmitValidation\", \"questionInstance.contactName\", \"questionInstance.emailAddress\", \"questionInstance.phoneNumber\", \"questionInstance.applicationContactRoleId\")\r\n get mandatory(): boolean {\r\n // some comtact fields are mandatory when:\r\n // 1. submitting, if questionTemplate.mandatory is true\r\n // 2. saving or submitting, if some fields are filled out (i.e. you can't enter line 1 without a suburb)\r\n return (\r\n (this.isMandatory && this.onSubmitValidation) ||\r\n (!this.isNullOrEmpty(this.questionInstance.contactName) ||\r\n !this.isNullOrEmpty(this.questionInstance.emailAddress) ||\r\n !this.isNullOrEmpty(this.questionInstance.phoneNumber) ||\r\n !this.questionInstance.applicationContactRoleId)\r\n );\r\n }\r\n\r\n @computedFrom(\"questionInstance.contactName\", \"questionInstance.emailAddress\", \"questionInstance.phoneNumber\", \"questionInstance.applicationContactRoleId\")\r\n get oneFieldEntered(): boolean {\r\n return (!!this.questionInstance.contactName || !!this.questionInstance.emailAddress ||\r\n !!this.questionInstance.phoneNumber || (!this.roleRequired || !!this.questionInstance.applicationContactRoleId));\r\n }\r\n\r\n @computedFrom(\"questionInstance.contactName\", \"questionInstance.emailAddress\", \"questionInstance.phoneNumber\", \"questionInstance.applicationContactRoleId\")\r\n get allFieldsEntered(): boolean {\r\n return (!!this.questionInstance.contactName && !!this.questionInstance.emailAddress &&\r\n !!this.questionInstance.phoneNumber && (!this.roleRequired || !!this.questionInstance.applicationContactRoleId));\r\n }\r\n\r\n @computedFrom(\"questionTemplate.configurationOptions\")\r\n get roleRequired(): boolean {\r\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.SpecifyContactRole && x.boolValue == true) > -1;\r\n }\r\n\r\n private isNullOrEmpty(str: string) {\r\n return str == null || str.length == 0;\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, autoinject } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from 'project/project-shared';\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { DateFormatValueConverter } from 'shared/value-converters/date-format-value-converter';\r\nimport { DateComparison } from 'shared/controls/custom-validation';\r\n\r\n@autoinject\r\nexport class FormDateRange extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IDateRangeAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator, private dateValueConverter: DateFormatValueConverter) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n }\r\n\r\n detached() {\r\n ValidationRules.off(this.questionInstance);\r\n }\r\n\r\n setupValidation() {\r\n this.controller.removeObject(this.questionInstance);\r\n\r\n var builder = ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.IDateRangeAnswerDto) => model.dateFrom)\r\n .required()\r\n .when(model => this.visibility && this.onSubmitValidation && this.isMandatory)\r\n\r\n .ensure(model => model.dateTo)\r\n .required()\r\n .when(model => this.visibility && this.onSubmitValidation && this.isMandatory)\r\n\r\n .ensure(m => m.dateFrom)\r\n .satisfiesRule(DateComparison, \"<=\", o => o.dateTo, \"Date To\")\r\n .when(model => this.visibility);\r\n\r\n var minDateRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinDate);\r\n if (minDateRule) \r\n {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.IDateRangeAnswerDto) => model.dateFrom)\r\n .satisfies((value, model) => {\r\n if (!model.dateFrom) {\r\n return true;//validation doesnt fire if field is empty\r\n }\r\n var minDate = new Date(minDateRule.dateValue);\r\n var valueEntered = new Date(model.dateFrom);\r\n return minDate.getTime() < valueEntered.getTime();\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Date must be after \" + this.dateValueConverter.toView(minDateRule.dateValue, 'date'))\r\n }\r\n\r\n var maxDateRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxDate);\r\n if (maxDateRule) \r\n {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.IDateRangeAnswerDto) => model.dateTo)\r\n .satisfies((value, model) => {\r\n if (value == null) { return true; }\r\n var maxDate = new Date(maxDateRule.dateValue);\r\n var valueEntered = new Date(model.dateTo);\r\n return maxDate.getTime() > valueEntered.getTime();\r\n })\r\n .when(modal => this.visibility && maxDateRule != null && this.onSubmitValidation)\r\n .withMessage(\"Date must be before \" + this.dateValueConverter.toView(maxDateRule.dateValue, 'date'))\r\n }\r\n\r\n builder.on(this.questionInstance);\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, customElement, OverrideContext } from 'aurelia-framework';\r\nimport { ValidationController, ValidationRules } from 'aurelia-validation';\r\nimport { DateFormatValueConverter } from 'shared/value-converters/date-format-value-converter';\r\nimport { SharedDto } from '../../../../../project/project-shared';\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\nimport { ApplicationFormCustomElement } from '../../application-form';\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@customElement('form-date')\r\nexport class FormDate extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IDateAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n comparatorQuestion: SharedDto.OnlineForm.Application.IDateAnswerDto = null;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator, private dateValueConverter: DateFormatValueConverter) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind(bindingContext: Object, overrideContext: OverrideContext) {\r\n if (this.questionTemplate.systemQuestion == SharedDto.Constants.SystemQuestion.ProjectEndDate) {\r\n var context = overrideContext.parentOverrideContext;\r\n while (context != null && !(context.bindingContext instanceof ApplicationFormCustomElement)) {\r\n context = context['__parentOverrideContext'];\r\n if (context != null) {\r\n context = context.parentOverrideContext;\r\n }\r\n }\r\n\r\n if (context != null) {\r\n try {\r\n var form = context['__parentOverrideContext'].bindingContext;\r\n\r\n var question = form.findSystemQuestionTemplate(SharedDto.Constants.SystemQuestion.ProjectStartDate);\r\n this.comparatorQuestion = form.findQuestionAnswer(question.questionId);\r\n }\r\n catch (e) {\r\n // do nothing here. its possible this is being accessed in some new readonly context so validation isn't important anyway\r\n }\r\n }\r\n }\r\n\r\n super.bind();\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n }\r\n\r\n setupValidation() {\r\n this.controller.removeObject(this.questionInstance);\r\n\r\n let rules = [];\r\n\r\n var minDateRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinDate);\r\n if (minDateRule) {\r\n rules.push(ValidationRules.ensure((model: SharedDto.OnlineForm.Application.IDateAnswerDto) => model.answer)\r\n .satisfies((value, model) => {\r\n if (!model.answer) {\r\n return true;//validation doesnt fire if field is empty\r\n }\r\n var minDate = new Date(minDateRule.dateValue);\r\n var valueEntered = new Date(model.answer);\r\n return minDate.getTime() < valueEntered.getTime();\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Date must be after \" + this.dateValueConverter.toView(minDateRule.dateValue, 'date'))\r\n .rules[0]);\r\n }\r\n\r\n var maxDateRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxDate);\r\n if (maxDateRule) {\r\n rules.push(ValidationRules.ensure((model: SharedDto.OnlineForm.Application.IDateAnswerDto) => model.answer)\r\n .satisfies((value, model) => {\r\n if (!model.answer) {\r\n return true;//validation doesnt fire if field is empty\r\n }\r\n var maxDate = new Date(maxDateRule.dateValue);\r\n var valueEntered = new Date(model.answer);\r\n return maxDate.getTime() > valueEntered.getTime();\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Date must be before \" + this.dateValueConverter.toView(maxDateRule.dateValue, 'date'))\r\n .rules[0]);\r\n }\r\n\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.IDateAnswerDto) => model.answer)\r\n .required()\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory))\r\n .rules[0]);\r\n\r\n if (this.comparatorQuestion != null) {\r\n rules.push(ValidationRules.ensure((model: SharedDto.OnlineForm.Application.IDateAnswerDto) => model.answer)\r\n\r\n .satisfies((value, model) => {\r\n if (!model.answer) {\r\n return true;//validation doesnt fire if field is empty\r\n }\r\n var minDate = new Date(this.comparatorQuestion.answer);\r\n var valueEntered = new Date(model.answer);\r\n\r\n\r\n return minDate.getTime() < valueEntered.getTime();\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Date must be after Project Commencement Date.\").rules[0])\r\n }\r\n\r\n if (rules.length > 0) {\r\n this.controller.addObject(this.questionInstance, rules);\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, autoinject, computedFrom } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { CurrencyFormatter } from 'shared/utils/utils';\r\n\r\n@autoinject\r\nexport class FormDecimalCustomElement extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IDecimalAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n showMoney: boolean = false;\r\n showDecimal: boolean = false;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n\r\n switch (this.questionTemplate.questionType) {\r\n case SharedDto.Constants.QuestionType.Money:\r\n this.showMoney = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Decimal:\r\n this.showDecimal = true;\r\n break;\r\n default:\r\n throw new Error('Question type (' + SharedDto.Constants.QuestionType[this.questionTemplate.questionType] + ') not found');\r\n }\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n\r\n var builder = ValidationRules.ensure((a: any) => a.a).required().when(a => false);\r\n var decimalPrefix = '';\r\n if (this.showMoney) {\r\n decimalPrefix = '$'\r\n }\r\n\r\n var minDecimalRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinDecimal);\r\n if (minDecimalRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.IDecimalAnswerDto) => model.answer)\r\n .satisfies((value: number, object: SharedDto.OnlineForm.Application.IDecimalAnswerDto) => {\r\n if (!value) {\r\n return true;\r\n }\r\n return value >= minDecimalRule.decimalValue\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Answer is less than minimum amount of \" + decimalPrefix + CurrencyFormatter(minDecimalRule.decimalValue));\r\n }\r\n\r\n var maxDecimalRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxDecimal);\r\n if (maxDecimalRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.IDecimalAnswerDto) => model.answer)\r\n .satisfies((value: number, object: SharedDto.OnlineForm.Application.IDecimalAnswerDto) => {\r\n if (!value) {\r\n return true;\r\n }\r\n return value <= maxDecimalRule.decimalValue\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Answer is more than maximum amount of \" + decimalPrefix + CurrencyFormatter(maxDecimalRule.decimalValue));\r\n }\r\n\r\n builder.ensure((model: SharedDto.OnlineForm.Application.IDecimalAnswerDto) => model.answer)\r\n .required()\r\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory);\r\n\r\n builder.on(this.questionInstance);\r\n }\r\n\r\n @computedFrom(\"questionTemplate\")\r\n get decimalPrecision(): number {\r\n var config = this.questionTemplate.configurationOptions.find(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.DecimalPlaces);\r\n if (config && config.numberValue) {\r\n return config.numberValue;\r\n }\r\n return 2;\r\n }\r\n}\r\n","module.exports = \" \";","import { SharedDto } from \"project/project-shared\";\n\nexport class DocumentSourceValueConverter {\n toView(value: SharedDto.ICodeListItemDto[], isIndividual: boolean, isMandatory: boolean, questionType: SharedDto.Constants.QuestionType, uploadOnly: boolean, readOnly: boolean) {\n if (value == null) {\n return;\n }\n if(!readOnly) {\n return value.filter(source => (source.id == SharedDto.Constants.ApplicationDocumentSource.Comment && !uploadOnly) || source.id == SharedDto.Constants.ApplicationDocumentSource.Upload);\n }\n return value.filter(source => {\n switch (source.id) {\n case SharedDto.Constants.ApplicationDocumentSource.Profile:\n case SharedDto.Constants.ApplicationDocumentSource.ExternalSystem:\n return !isIndividual;\n case SharedDto.Constants.ApplicationDocumentSource.Upload:\n case SharedDto.Constants.ApplicationDocumentSource.Comment:\n return true;\n case SharedDto.Constants.ApplicationDocumentSource.NoSelection:\n return !isMandatory;\n }\n }).filter(source => {\n switch(questionType)\n {\n case SharedDto.Constants.QuestionType.FileUpload:\n return true;\n case SharedDto.Constants.QuestionType.RequiredDocument:\n return source.id != SharedDto.Constants.ApplicationDocumentSource.Comment\n && source.id != SharedDto.Constants.ApplicationDocumentSource.ExternalSystem\n && source.id != SharedDto.Constants.ApplicationDocumentSource.NoSelection;\n }\n })\n }\n}\n","import { BindingEngine, computedFrom } from 'aurelia-binding';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { bindable, bindingMode, customElement, Disposable } from 'aurelia-framework';\r\nimport { ValidationController, ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { ApplicationFormService } from 'services/application-form-service';\r\nimport { DataService } from 'services/data-service';\r\nimport { Confirm } from 'shared/controls/confirm-modal/confirm';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { SharedBroadcastEvents } from 'shared/utils/SharedBroadcastEvents';\r\nimport { Logger } from '../../../../../../node_modules/aurelia-logging';\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@customElement('form-file-upload')\r\nexport class FormFileUpload extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) questionInstance: SharedDto.OnlineForm.Application.IFileUploadAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n documentSources: SharedDto.ICodeListItemDto[];\r\n documentTypes: SharedDto.IDocumentTypeDto[];\r\n\r\n canUpload: boolean;\r\n internal: boolean;\r\n individual: boolean;\r\n loadingDocuments = true;\r\n documents: object[] = null;\r\n private subscriptions: Disposable[] = [];\r\n fromProfile: boolean;\r\n fromComment: boolean;\r\n fromUpload: boolean;\r\n fromExternalSystem: boolean;\r\n\r\n constructor(private readonly controller: ValidationController,\r\n public readonly controlIdGenerator: ControlIdGenerator,\r\n private readonly bindingEngine: BindingEngine,\r\n private readonly logger: Logger,\r\n private readonly applicationFormService: ApplicationFormService,\r\n private readonly dataService: DataService,\r\n private readonly confirm: Confirm,\r\n private readonly eventAggregator: EventAggregator) {\r\n super(controlIdGenerator);\r\n this.canUpload = this.applicationFormService.allowFileUploads;\r\n this.internal = this.applicationFormService.isPreview;\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n if (!this.questionInstance.documentSource) {\r\n this.questionInstance.documentSource = SharedDto.Constants.ApplicationDocumentSource.Upload;\r\n }\r\n var checkDocumentSource = (newValue, oldValue) => { \r\n // determine whether there was a file upload and a document attached to it.\r\n // if so, confirm that the user wants this file removed\r\n if (oldValue == SharedDto.Constants.ApplicationDocumentSource.Upload &&\r\n !!this.questionInstance.file) {\r\n this.confirm.confirm(\"Are you sure you want to delete the uploaded file?\", \"Confirm File Delete\").then(\r\n (val) => {\r\n if (val) {\r\n this.questionInstance.file = null;\r\n this.fromProfile = newValue == SharedDto.Constants.ApplicationDocumentSource.Profile;\r\n this.fromExternalSystem = newValue == SharedDto.Constants.ApplicationDocumentSource.ExternalSystem;\r\n this.fromUpload = newValue == SharedDto.Constants.ApplicationDocumentSource.Upload;\r\n this.fromComment = newValue == SharedDto.Constants.ApplicationDocumentSource.Comment;\r\n } else {\r\n this.questionInstance.documentSource = oldValue;\r\n return;\r\n }\r\n }\r\n );\r\n } else {\r\n this.fromProfile = newValue == SharedDto.Constants.ApplicationDocumentSource.Profile;\r\n this.fromExternalSystem = newValue == SharedDto.Constants.ApplicationDocumentSource.ExternalSystem;\r\n this.fromUpload = newValue == SharedDto.Constants.ApplicationDocumentSource.Upload;\r\n this.fromComment = newValue == SharedDto.Constants.ApplicationDocumentSource.Comment;\r\n // lets delay this until we need it, rather than load it EVERY TIME.\r\n if (this.fromProfile && this.documents == null) {\r\n (this.individual ? Promise.resolve([]) : this.applicationFormService.organisationDocuments())\r\n .then(documents => {\r\n this.documents = documents;\r\n this.loadingDocuments = false;\r\n });\r\n }\r\n }\r\n }\r\n\r\n this.subscriptions.push(\r\n this.bindingEngine.propertyObserver(this.questionInstance, \"file\").subscribe((newValue, oldValue) => {\r\n this.controller.validate({ object: this.questionInstance, propertyName: \"comment\" });\r\n }),\r\n this.bindingEngine.propertyObserver(this.questionInstance, \"documentSource\").subscribe(checkDocumentSource)\r\n );\r\n\r\n checkDocumentSource(this.questionInstance.documentSource, null);\r\n\r\n if(!this.readonly) {\r\n this.individual = this.applicationFormService.isIndividual;\r\n } else {\r\n this.individual = false;\r\n }\r\n\r\n this.dataService.getDocumentSources().then(d => this.documentSources = d);\r\n this.dataService.getDocumentTypes().then(d => this.documentTypes = d);\r\n }\r\n\r\n unbind() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n var message = \"A file or comment is required\";\r\n\r\n ValidationRules\r\n .ensure((q: SharedDto.OnlineForm.Application.IFileUploadAnswerDto) => q.comment)\r\n .required()\r\n .when(q => {\r\n let res = q.file == null && q.comment == null && this.visibility && this.sectionVisibility && this.stepVisibility && this.onSubmitValidation && this.isMandatory\r\n return res;\r\n })\r\n .withMessage(\"You must provide a comment\")\r\n\r\n .ensure((q: SharedDto.OnlineForm.Application.IFileUploadAnswerDto) => q.file)\r\n .required()\r\n .when(q => q.documentSource == SharedDto.Constants.ApplicationDocumentSource.Upload && this.onSubmitValidation && this.visibility && this.sectionVisibility && this.stepVisibility && this.isMandatory)\r\n .withMessage(\"You must upload a file\")\r\n\r\n .ensure((q: SharedDto.OnlineForm.Application.IFileUploadAnswerDto) => q.profileFileId)\r\n .required()\r\n .when(q => q.documentSource == SharedDto.Constants.ApplicationDocumentSource.Profile && this.onSubmitValidation && this.visibility && this.sectionVisibility && this.stepVisibility && this.isMandatory)\r\n .withMessage(\"Please select your profile document\")\r\n .on(this.questionInstance);\r\n }\r\n\r\n @computedFrom(\"questionTemplate\")\r\n get allowedExtensions(): string[] {\r\n var extensions = [];\r\n var fileCategoryConfigs = this.questionTemplate.configurationOptions.filter(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.FileUploadCategory);\r\n if (fileCategoryConfigs.length === 0) {\r\n return extensions;\r\n } else {\r\n for (let config of fileCategoryConfigs) {\r\n switch (config.fileUploadCategory) {\r\n case SharedDto.Constants.FileUploadCategory.Document:\r\n extensions.push(...['doc', 'docx', 'odt', 'pdf', 'rtf', 'txt']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Image:\r\n extensions.push(...['bmp', 'gif', 'ico', 'jpeg', 'jpg', 'png', 'svg', 'tif', 'tiff']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Audio:\r\n extensions.push(...['aif', 'cda', 'mid', 'midi', 'mp3', 'mpa', 'ogg', 'wav', 'wma']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Video:\r\n extensions.push(...['avi', 'mov', 'mp4', 'wmv']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Presentation:\r\n extensions.push(...['key', 'odp', 'pps', 'ppt', 'pptx']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Compressed:\r\n extensions.push(...['7z', 'arj', 'rar', 'tar.gz', 'z', 'zip']);\r\n break;\r\n case SharedDto.Constants.FileUploadCategory.Spreadsheet:\r\n extensions.push(...['ods', 'xlr', 'xls', 'xlsx']);\r\n break;\r\n default:\r\n let error = new Error(`File upload category ${config.fileUploadCategory} not implemented`);\r\n this.logger.error(error as any);\r\n throw error;\r\n }\r\n }\r\n }\r\n\r\n return extensions;\r\n }\r\n\r\n get uploadOnly(): boolean {\r\n return this.questionTemplate.configurationOptions.findIndex(x => x.configurationType === SharedDto.Constants.QuestionConfigurationType.UploadOnly && x.boolValue == true) > -1;\r\n }\r\n\r\n rechoose() {\r\n this.questionInstance.profileDocumentTitle = null;\r\n this.questionInstance.profileDocumentTypeDesc = null;\r\n }\r\n\r\n download() {\r\n //a parent element (application-form/online-form) should handle this and trigger the download\r\n this.eventAggregator.publish(SharedBroadcastEvents.downloadApplicationDocument, { fileStorageId: this.questionInstance.file.fileStorageId });\r\n }\r\n}\r\n","module.exports = \" \";","import { Disposable } from 'aurelia-binding';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { bindable, bindingMode, computedFrom, customElement, PLATFORM } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { Notifier } from 'services/notifier';\r\nimport { SharedBroadcastEvents } from 'shared/utils/SharedBroadcastEvents';\r\nimport { IRequestAdditionalInformationModalParams } from '../request-additional-information/request-additional-information-modal/request-additional-information-modal';\r\nimport { SharedRequestAdditionalInformationServices } from '../request-additional-information/shared-request-additional-information-services';\r\nimport { QuestionVisibilityChannelName } from \"../form-utils\";\r\n\r\n@customElement('form-question-group')\r\nexport class FormQuestionGroup {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) questionTemplate: SharedDto.OnlineForm.Form.IQuestionDto;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionGroup: SharedDto.OnlineForm.Application.IFormInstanceQuestionGroupDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stepVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable() sectionIndex: number = 0;\r\n @bindable() sectionRepeatable: boolean = null;\r\n @bindable() formControlId: number = null;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) router: Router;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) additionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) allowAdditionalInfoRequests: boolean = false;\r\n\r\n //Used to determine if you are allowed to add in additional instances of the section.\r\n canAddQuestion: boolean;\r\n canDeleteQuestion: boolean;\r\n\r\n qSingleLineText: SharedDto.Constants.QuestionType.SingleLineText;\r\n\r\n showSingleLineText: boolean = false;\r\n showMultiLineText: boolean = false;\r\n showYesNoToggle: boolean = false;\r\n showNumber: boolean = false;\r\n showDecimal: boolean = false;\r\n showAddress: boolean = false;\r\n showDate: boolean = false;\r\n showDateRange: boolean = false;\r\n showSingleSelectList: boolean = false;\r\n showMultiSelectList: boolean = false;\r\n showLocation: boolean = false;\r\n showFileUpload: boolean = false;\r\n showRequestedFundingAmounts: boolean = false;\r\n showContact: boolean = false;\r\n showChild: boolean = false;\r\n showOpeningHours: boolean = false;\r\n showText: boolean = false;\r\n showPerson: boolean = false;\r\n showBusiness: boolean = false;\r\n showAbnLookup: boolean = false;\r\n\r\n showRequestAdditionalInformation: boolean = false;\r\n\r\n private subscriptions: Disposable[] = [];\r\n\r\n questionIndex: number;\r\n\r\n constructor(private eventAggregator: EventAggregator,\r\n private readonly dialogService: DialogService,\r\n private readonly notifier: Notifier,\r\n private readonly requestAdditionalInfoService: SharedRequestAdditionalInformationServices) {\r\n\r\n }\r\n\r\n bind() {\r\n switch (this.questionTemplate.questionType) {\r\n case SharedDto.Constants.QuestionType.SingleLineText:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.URL:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.SocialMediaLink:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Email:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.PhoneNumber:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.MultiLineText:\r\n this.showMultiLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.YesNoToggle:\r\n this.showYesNoToggle = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Number:\r\n this.showNumber = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Money:\r\n this.showDecimal = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Decimal:\r\n this.showDecimal = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Address:\r\n this.showAddress = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Date:\r\n this.showDate = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.DateRange:\r\n this.showDateRange = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.RadioButton:\r\n this.showSingleSelectList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.SingleSelectList:\r\n this.showSingleSelectList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.MultiSelectList:\r\n this.showMultiSelectList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.CheckBoxList:\r\n this.showMultiSelectList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Location:\r\n this.showLocation = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.FileUpload:\r\n case SharedDto.Constants.QuestionType.RequiredDocument:\r\n this.showFileUpload = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.RequestedFundingAmount:\r\n this.showRequestedFundingAmounts = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Contact:\r\n this.showContact = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Child:\r\n this.showChild = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.OpeningHours:\r\n this.showOpeningHours = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.TextOnly:\r\n this.showText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Person:\r\n this.showPerson = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Business:\r\n this.showBusiness = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.ABNLookup:\r\n this.showAbnLookup = true;\r\n break;\r\n default:\r\n throw new Error('Question Type Not Supported!');\r\n }\r\n\r\n if (this.questionTemplate.questionId != this.questionGroup.templateQuestionId) {\r\n throw new Error('QuestionsId from template and group do not match!');\r\n }\r\n\r\n if (!this.questionGroup.questions) {\r\n this.questionGroup.questions = [];\r\n }\r\n\r\n if (this.questionTemplate.repeatable) {\r\n if (this.questionTemplate.repeatMin && this.questionTemplate.repeatMin > this.questionGroup.questions.length) {\r\n //See we we need some dummy instance as there may be a min of 3.\r\n var instancesNeededToBeCreated = this.questionTemplate.repeatMin - this.questionGroup.questions.length;\r\n for (var i = 0; i < instancesNeededToBeCreated; i++) {\r\n this.addQuestionInstance();\r\n }\r\n }\r\n }\r\n if (this.questionGroup.questions.length == 0) {\r\n this.addQuestionInstance();\r\n }\r\n\r\n this.updateQuestionValues();\r\n }\r\n\r\n attached() {\r\n let channelName;\r\n if (this.sectionRepeatable) {\r\n channelName = QuestionVisibilityChannelName(this.formControlId, this.questionTemplate.questionId, this.sectionIndex);\r\n } else {\r\n channelName = QuestionVisibilityChannelName(this.formControlId, this.questionTemplate.questionId)\r\n }\r\n\r\n this.subscriptions.push(this.eventAggregator.subscribe(channelName, (visibleStatus: boolean) => {\r\n this.questionGroup.visible = visibleStatus;\r\n }));\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private updateQuestionValues() {\r\n this.canAddQuestion = !this.readonly && this.questionTemplate.repeatable\r\n && ((this.questionTemplate.repeatMax && this.questionTemplate.repeatMax > this.questionGroup.questions.length)\r\n || this.questionTemplate.repeatMax == null);\r\n\r\n this.canDeleteQuestion = !this.readonly && this.questionTemplate.repeatable\r\n && ((this.questionTemplate.repeatMin && this.questionTemplate.repeatMin < this.questionGroup.questions.length)\r\n || !this.questionTemplate.repeatMin);\r\n }\r\n\r\n addQuestionInstance() {\r\n this.questionGroup.questions.push({\r\n templateQuestionId: this.questionGroup.templateQuestionId,\r\n questionType: this.questionTemplate.questionType\r\n } as SharedDto.OnlineForm.Application.IAnswerDto);\r\n this.updateQuestionValues();\r\n }\r\n\r\n removeQuestionInstance(questionInstance: SharedDto.OnlineForm.Application.IAnswerDto) {\r\n var found = this.questionGroup.questions.indexOf(questionInstance);\r\n if (found >= 0) {\r\n this.questionGroup.questions.splice(found, 1);\r\n }\r\n\r\n this.updateQuestionValues();\r\n }\r\n\r\n async requestAdditionalInformationModal(questionIndex: number) {\r\n // check if allowed to request additional information\r\n let grantId = this.router.currentInstruction.parentInstruction.parentInstruction.params.grantIdOrNew;\r\n let roundId = this.router.currentInstruction.parentInstruction.parentInstruction.params.roundIdOrNew;\r\n let applicationId = this.router.currentInstruction.parentInstruction.params.applicationId;\r\n\r\n return await this.dialogService.open({\r\n viewModel: PLATFORM.moduleName('shared/controls/online-form/request-additional-information/request-additional-information-modal/request-additional-information-modal'),\r\n model: {\r\n grantId: grantId,\r\n roundId: roundId,\r\n applicationId: applicationId,\r\n additionalInformationRequestId: 'new'\r\n } as IRequestAdditionalInformationModalParams\r\n }).whenClosed(result => {\r\n if (result.wasCancelled) {\r\n return;\r\n }\r\n\r\n result.output.formInstanceId = this.formInstance.formInstanceId;\r\n result.output.formQuestionId = this.questionTemplate.questionId;\r\n result.output.formInstanceAnswerId = this.questionGroup.questions[questionIndex].questionId;\r\n\r\n this.requestAdditionalInfoService.createAndSubmitAdditionalInfoRequest(applicationId, result.output).then(x => {\r\n this.eventAggregator.publish(SharedBroadcastEvents.additionalInformationResquested);\r\n this.notifier.success(\"Additional information requested\")\r\n });\r\n\r\n this.additionalInformationRequest.push(result.output);\r\n\r\n return result.output;\r\n });\r\n }\r\n\r\n toggleRequestAdditionalInformation(state: boolean) {\r\n this.showRequestAdditionalInformation = state && this.allowAdditionalInfoRequests;\r\n }\r\n\r\n @computedFrom(\"questionTemplate.readOnly\", \"readonly\")\r\n get isReadOnly(): boolean {\r\n if (this.formInstance) {\r\n if (this.questionTemplate.lockAnswer) {\r\n return true;\r\n }\r\n }\r\n //parent element readonly state\r\n return this.readonly;\r\n }\r\n\r\n // All of the rules below should be true for Request additional informaiton to show up\r\n // 1. it was indicated in the configuration Additional information is allowed << if we will in the future restrict some of the question\r\n // 2. the question group was hovered by the user \r\n // 3. user has the correct permission to request additional information << TODO\r\n // 4. and is in the internal site\r\n @computedFrom('showRequestAdditionalInformation', 'allowAdditionalInfoRequests')\r\n get showAdditionalInformation(): boolean {\r\n return this.showRequestAdditionalInformation && this.allowAdditionalInfoRequests;\r\n }\r\n}\r\n","module.exports = \" \";","import { BindingEngine, Disposable, observable } from 'aurelia-binding';\r\nimport { bindable, bindingMode, computedFrom, customElement } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from 'services/data-service';\r\nimport { Logger } from '../../../../../../node_modules/aurelia-logging';\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { HasElementsRule } from '../../../custom-validation';\r\n\r\n@customElement('form-location')\r\nexport class FormLocation extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.ILocationAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @observable() singleAnswer: number;\r\n\r\n locationTypeList: SharedDto.ICodeListItemDto[] = [];\r\n localityList: SharedDto.ILocalityOptionDto[] = [];\r\n\r\n private observers: Disposable[] = [];\r\n loadingLocations: boolean;\r\n loadingTypes = true;\r\n\r\n constructor(private readonly logger: Logger,\r\n private readonly dataService: DataService,\r\n private readonly controlIdGenerator: ControlIdGenerator,\r\n private readonly bindingEngine: BindingEngine) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n singleAnswerChanged(newValue, oldValue) {\r\n if (newValue) {\r\n this.questionInstance.answers = [+newValue];\r\n } else {\r\n this.questionInstance.answers = [];\r\n }\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n\r\n // Bind single answer \r\n if (this.showSingleSelect && this.questionInstance != null && this.questionInstance.answers != null) {\r\n this.singleAnswer = this.questionInstance.answers[0];\r\n }\r\n\r\n //pull locality types from configs\r\n let locationTypes = this.questionTemplate.configurationOptions.filter(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.AllowedLocalityType);\r\n\r\n //load locality types and find hte ones we need\r\n this.dataService.getLocationTypes().then((data) => {\r\n //only add locality types specified in config to our code list\r\n this.locationTypeList = data.filter(x => locationTypes.findIndex(y => y.locationType === x.id) > -1);\r\n this.loadingTypes = false;\r\n });\r\n\r\n this.observers.push(\r\n this.bindingEngine.propertyObserver(this.questionInstance, \"locationType\").subscribe(() => {\r\n this.questionInstance.answers = [];\r\n this.singleAnswer = null;\r\n this.refreshLocations();\r\n })\r\n );\r\n\r\n this.setupValidation();\r\n this.refreshLocations();\r\n }\r\n\r\n private refreshLocations() {\r\n if (this.questionInstance.locationType && +this.questionInstance.locationType !== SharedDto.Constants.LocationType.All) {\r\n this.loadingLocations = true;\r\n this.dataService.getLocationsByType(+this.questionInstance.locationType).then(data => {\r\n this.localityList = data;\r\n }).catch(error => {\r\n this.logger.error(error);\r\n }).then(() => {\r\n this.loadingLocations = false;\r\n });\r\n } else {\r\n //no locality type selected, clear the list\r\n this.localityList = [];\r\n }\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n\r\n var builder = ValidationRules.ensure((a: any) => a.a).required().when(a => false);\r\n\r\n var minSelectedOptionsRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinSelectedOptions);\r\n if (minSelectedOptionsRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ILocationAnswerDto) => model.answers)\r\n .satisfies((value, model) => {\r\n if (model.locationType === SharedDto.Constants.LocationType.All) {\r\n return true; //multi select not required when All locations are applicable.\r\n }\r\n if (!model.answers) {\r\n return false;\r\n }\r\n return model.answers.length >= minSelectedOptionsRule.numberValue;\r\n })\r\n .when((model: SharedDto.OnlineForm.Application.ILocationAnswerDto) => model.answers && model.answers.length > 0 && this.visibility)\r\n .withMessage('You must select a minimum of ' + minSelectedOptionsRule.numberValue + ' options');\r\n }\r\n\r\n var maxSelectedOptionsRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxSelectedOptions);\r\n if (maxSelectedOptionsRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ILocationAnswerDto) => model.answers)\r\n .satisfies((value, model) => {\r\n if (model.locationType === SharedDto.Constants.LocationType.All) {\r\n return true; //multi select not required when All locations are applicable.\r\n }\r\n return model.answers.length <= maxSelectedOptionsRule.numberValue;\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage('You must select a maximum of ' + maxSelectedOptionsRule.numberValue + ' options');\r\n }\r\n\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ILocationAnswerDto) => model.answers)\r\n .displayName(\"Location\")\r\n .satisfiesRule(HasElementsRule).withMessage(\"Location is required.\")\r\n .when(() => {\r\n return (this.visibility && this.onSubmitValidation && this.isMandatory\r\n && +this.questionInstance.locationType !== SharedDto.Constants.LocationType.All)\r\n });\r\n\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ILocationAnswerDto) => model.locationType)\r\n .displayName(\"Location\")\r\n .required()\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory));\r\n\r\n builder.on(this.questionInstance);\r\n }\r\n\r\n detached(): void {\r\n while (this.observers.length > 0) {\r\n this.observers.pop().dispose();\r\n }\r\n }\r\n\r\n @computedFrom(\"questionInstance.locationType\", \"questionTemplate.configurationOptions\")\r\n get showSingleSelect(): boolean {\r\n let multiSelectOption = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MultiSelect);\r\n return (!multiSelectOption || !multiSelectOption.boolValue) && !!this.questionInstance.locationType && +this.questionInstance.locationType !== SharedDto.Constants.LocationType.All;\r\n }\r\n\r\n @computedFrom(\"questionInstance.locationType\", \"questionTemplate.configurationOptions\")\r\n get showMultiSelect(): boolean {\r\n let multiSelectOption = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MultiSelect);\r\n return multiSelectOption && multiSelectOption.boolValue && !!this.questionInstance.locationType && +this.questionInstance.locationType !== SharedDto.Constants.LocationType.All;\r\n }\r\n\r\n @computedFrom(\"questionInstance.answers.length\", \"localityList\")\r\n get answerToString(): string {\r\n if (this.questionInstance.answers && this.questionInstance.answers.length > 0) {\r\n var descriptions = this.localityList.filter(y => this.questionInstance.answers.indexOf(y.localityId) > -1).map(y => y.name);\r\n return descriptions.join(\", \");\r\n }\r\n return \"\";\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { ValidationController, ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { CheckboxListOption } from 'shared/controls/checkbox-list/checkbox-list';\r\nimport { HasElementsRule } from 'shared/controls/custom-validation';\r\nimport { CodeListService, FormOption } from 'shared/controls/online-form/question/code-list-service';\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@customElement('form-multi-select-list')\r\nexport class FormMultiSelectList extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n\r\n codeOptions: FormOption[];\r\n checkBoxOptions: CheckboxListOption[];\r\n\r\n loading = true;\r\n\r\n showDropDownList: boolean = false;\r\n showCheckBoxList: boolean = false;\r\n\r\n constructor(private controlIdGenerator: ControlIdGenerator, private controller: ValidationController,\r\n private codeListService: CodeListService) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n\r\n switch (this.questionTemplate.questionType) {\r\n case SharedDto.Constants.QuestionType.CheckBoxList:\r\n this.showCheckBoxList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.MultiSelectList:\r\n this.showDropDownList = true;\r\n break;\r\n }\r\n\r\n var optionList = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.OptionsList);\r\n if (!optionList || !optionList.questionCodeListType) {\r\n throw new Error(\"Error with option list for questionId \" + this.questionTemplate.questionId);\r\n }\r\n\r\n if (!this.questionInstance.questionCodeListType) {\r\n this.questionInstance.questionCodeListType = optionList.questionCodeListType;\r\n }\r\n\r\n var sortAlphabeticallyRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.SortAlphabetically);\r\n var boolValue = (sortAlphabeticallyRule) ? sortAlphabeticallyRule.boolValue : undefined;\r\n this.codeListService.getDataList(this.questionTemplate.questionId, optionList.questionCodeListType, boolValue).then((data) => {\r\n this.codeOptions = data;\r\n if (this.showCheckBoxList) {\r\n this.checkBoxOptions = this.codeOptions.map((option) => {\r\n var intOption = new CheckboxListOption();\r\n intOption.id = option.value;\r\n intOption.description = option.description;\r\n return intOption;\r\n })\r\n }\r\n this.loading = false;\r\n });\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n }\r\n\r\n setupValidation() {\r\n this.controller.removeObject(this.questionInstance);\r\n\r\n let rules = [];\r\n\r\n var minSelectedOptions = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinSelectedOptions);\r\n if (minSelectedOptions) {\r\n rules.push(ValidationRules.ensure((model: SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto) => model.selectedOptionItemIds)\r\n .satisfies((value, model) => model.selectedOptionItemIds && model.selectedOptionItemIds.length >= minSelectedOptions.numberValue)\r\n .when((model) => model.selectedOptionItemIds && model.selectedOptionItemIds.length > 0 && this.visibility)\r\n .withMessage('You must select a minimum of ' + minSelectedOptions.numberValue + ' options')\r\n .rules[0]);\r\n }\r\n\r\n var maxSelectedOptions = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxSelectedOptions);\r\n if (maxSelectedOptions) {\r\n rules.push(ValidationRules.ensure((model: SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto) => model.selectedOptionItemIds)\r\n .satisfies((value, model) => model.selectedOptionItemIds && model.selectedOptionItemIds.length <= maxSelectedOptions.numberValue)\r\n .when((x) => this.visibility)\r\n .withMessage('You must select a maximum of ' + maxSelectedOptions.numberValue + ' options')\r\n .rules[0]);\r\n }\r\n\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.IMultiSelectListAnswerDto) => model.selectedOptionItemIds)\r\n .satisfiesRule(HasElementsRule)\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory))\r\n .withMessage(\"You must select at least one option.\")\r\n .rules[0]);\r\n\r\n if (rules.length > 0) {\r\n this.controller.addObject(this.questionInstance, rules);\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { inject, DOM, bindable, customElement, bindingMode, computedFrom } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\n\r\n@customElement('form-multiline-text')\r\nexport class FormMultilineText extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IMultiLineTextAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n maxAllowedCharacters: number;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n\r\n attached(){\r\n super.attached();\r\n }\r\n\r\n setupValidation(){\r\n this.controller.removeObject(this.questionInstance);\r\n \r\n let rules = [];\r\n\r\n var minCharacterRule = this.questionTemplate.configurationOptions.find(x=>x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinCharacters);\r\n if(minCharacterRule){\r\n rules.push(ValidationRules.ensure((model : SharedDto.OnlineForm.Application.IMultiLineTextAnswerDto) => model.answer)\r\n .minLength(minCharacterRule.numberValue)\r\n .when((x) => this.visibility)\r\n .rules[0]); \r\n }\r\n\r\n var maxCharacterRule = this.questionTemplate.configurationOptions.find(x=>x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxCharacters);\r\n if(maxCharacterRule){\r\n this.maxAllowedCharacters = maxCharacterRule.numberValue;\r\n rules.push(ValidationRules.ensure((model : SharedDto.OnlineForm.Application.IMultiLineTextAnswerDto) => model.answer)\r\n .maxLength(maxCharacterRule.numberValue)\r\n .when((x) => this.visibility)\r\n .rules[0]); \r\n }\r\n\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.IMultiLineTextAnswerDto) => model.answer)\r\n .required()\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory))\r\n .rules[0]);\r\n\r\n if(rules.length>0){\r\n this.controller.addObject(this.questionInstance,rules);\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { inject, DOM, bindable, customElement, bindingMode, computedFrom } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\n\r\n@customElement('form-number')\r\nexport class FormNumber extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.INumberAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n\r\n attached(){\r\n super.attached();\r\n }\r\n\r\n setupValidation(){\r\n this.controller.removeObject(this.questionInstance);\r\n let rules = [];\r\n\r\n var minIntegerRule = this.questionTemplate.configurationOptions.find(x=>x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinInteger);\r\n if(minIntegerRule){\r\n rules.push(ValidationRules.ensure((model : SharedDto.OnlineForm.Application.INumberAnswerDto) => model.answer)\r\n .satisfies((value: number, object: SharedDto.OnlineForm.Application.INumberAnswerDto) => {\r\n if(!value){\r\n return true;\r\n }\r\n return value >= minIntegerRule.numberValue\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Answer is less than minimum amount of \" + minIntegerRule.numberValue)\r\n .rules[0]); \r\n }\r\n\r\n var maxIntegerRule = this.questionTemplate.configurationOptions.find(x=>x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxInteger);\r\n if(maxIntegerRule){\r\n rules.push(ValidationRules.ensure((model : SharedDto.OnlineForm.Application.INumberAnswerDto) => model.answer)\r\n .satisfies((value: number, object: SharedDto.OnlineForm.Application.INumberAnswerDto) => {\r\n if(!value){\r\n return true;\r\n }\r\n return value <= maxIntegerRule.numberValue\r\n })\r\n .when((x) => this.visibility)\r\n .withMessage(\"Answer is more than maximum amount of \" + maxIntegerRule.numberValue)\r\n .rules[0]); \r\n }\r\n\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.INumberAnswerDto) => model.answer)\r\n .required()\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory))\r\n .rules[0]);\r\n\r\n if(rules.length>0){\r\n this.controller.addObject(this.questionInstance,rules);\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, bindable, bindingMode, computedFrom, Disposable } from 'aurelia-framework';\nimport { SharedDto } from 'project/project-shared';\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\nimport { ValidationController, ValidationRules } from '../../../../../../node_modules/aurelia-validation';\nimport { DeepObserver } from '../../../../utils/deep-observer';\nimport { QuestionBase } from \"../question-base\";\n\n@autoinject\nexport class FormOpeningHours extends QuestionBase {\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n id: number;\n\n private subscriptions: Disposable[] = [];\n schools: SharedDto.ICodeListItemDto[];\n\n constructor(private controlIdGenerator: ControlIdGenerator,\n private readonly deepObserver: DeepObserver,\n private readonly validationController: ValidationController) {\n super(controlIdGenerator);\n\n this.id = controlIdGenerator.getNextId();\n }\n\n bind() {\n super.bind();\n\n }\n\n attached() {\n super.attached();\n this.setupValidation();\n this.subscriptions.push(\n this.deepObserver.observe(this, \"questionInstance\", () => {\n //triger revalidation of the rules attached to 'this' (all fields mandatory when one field entered)\n //this is mostly to hide the validation message if it ever appears, as soon as it's no longer the case.\n if (this.validationController.errors.findIndex(x => x.object === this)) {\n this.validationController.validate({\n object: this\n });\n }\n })\n );\n }\n\n unbind() {\n while (this.subscriptions.length) {\n this.subscriptions.pop().dispose();\n }\n }\n\n setupValidation() {\n ValidationRules.off(this.questionInstance);\n\n ValidationRules\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.sunday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.monday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.tuesday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.wednesday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.thursday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.friday)\n .maxLength(100)\n .ensure((q: SharedDto.OnlineForm.Application.IOpeningHoursAnswerDto) => q.saturday)\n .maxLength(100) \n .on(this.questionInstance)\n\n }\n\n\n}\n","module.exports = \" \";","import { bindingMode, computedFrom } from \"aurelia-binding\";\nimport { autoinject } from \"aurelia-framework\";\nimport { bindable } from \"aurelia-templating\";\nimport { ValidationRules } from \"aurelia-validation\";\nimport { SharedDto } from \"project/project-shared\";\nimport { ControlIdGenerator } from \"shared/utils/control-id-generator\";\nimport { QuestionBase } from \"../question-base\";\n\n@autoinject\nexport class FormPerson extends QuestionBase {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IPersonAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n id: string;\n\n constructor(controlIdGenerator: ControlIdGenerator) {\n super(controlIdGenerator);\n\n this.id = controlIdGenerator.getNextId().toString();\n }\n\n setupValidation() {\n ValidationRules\n .ensure((q: SharedDto.OnlineForm.Application.IPersonAnswerDto) => q.givenName)\n .required()\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\n .maxLength(150)\n\n .ensure((q: SharedDto.OnlineForm.Application.IPersonAnswerDto) => q.middleName)\n .maxLength(150)\n\n .ensure((q: SharedDto.OnlineForm.Application.IPersonAnswerDto) => q.lastName)\n .required()\n .when(() => this.visibility && this.onSubmitValidation && this.isMandatory)\n .maxLength(150)\n\n .on(this.questionInstance);\n\n\n ValidationRules\n .ensure((vm: FormPerson) => vm.questionInstance)\n .satisfies(() => {\n if (this.oneFieldEntered && !this.allFieldsEntered) {\n return false;\n }\n return true;\n })\n .when(() => this.visibility && this.onSubmitValidation && !this.isMandatory)\n .withMessage(\"You must provide both a given name and last name, or clear them.\")\n .on(this)\n }\n\n detached() {\n super.detached();\n ValidationRules.off(this);\n }\n\n @computedFrom(\"questionInstance.givenName\", \"questionInstance.lastName\")\n get oneFieldEntered(): boolean {\n return !!this.questionInstance.givenName || !!this.questionInstance.lastName;\n }\n\n @computedFrom(\"questionInstance.contactName\", \"questionInstance.emailAddress\", \"questionInstance.phoneNumber\", \"questionInstance.applicationContactRoleId\")\n get allFieldsEntered(): boolean {\n return !!this.questionInstance.givenName && !!this.questionInstance.lastName;\n }\n\n}\n","module.exports = \" \";","import { inject, DOM, bindable, customElement, bindingMode, computedFrom, observable, Disposable, BindingEngine } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\nimport { Decimal } from '../../../../../../node_modules/decimal.js-light';\r\n\r\n@customElement('form-requested-amount')\r\nexport class FormRequestedAmount extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IRequestedFundingAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n totalRequestedAmount: number = 0;\r\n subscriptions: Disposable[] = [];\r\n\r\n constructor(private readonly controller: ValidationController,\r\n private readonly bindingEngine: BindingEngine,\r\n private readonly controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n this.recalculateTotal();\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n\r\n this.questionInstance.answers.sort((a, b) => (a.financialYearDescription > b.financialYearDescription ? 1 : -1));\r\n\r\n for (let answer of this.questionInstance.answers) {\r\n this.subscriptions.push(\r\n this.bindingEngine.propertyObserver(answer, \"amount\").subscribe(newValue => {\r\n this.controller.validate({ object: answer, propertyName: \"financialYearId\" });\r\n this.recalculateTotal();\r\n })\r\n );\r\n this.subscriptions.push(\r\n this.bindingEngine.propertyObserver(answer, \"recurringAmount\").subscribe(newValue => {\r\n this.controller.validate({ object: answer, propertyName: \"financialYearId\" });\r\n this.recalculateTotal();\r\n })\r\n );\r\n }\r\n }\r\n\r\n setupValidation() {\r\n this.controller.removeObject(this.questionInstance);\r\n for (let answer of this.questionInstance.answers) {\r\n this.controller.removeObject(answer);\r\n //this.controller.addObject(answer, rules);\r\n ValidationRules\r\n //note: proxy VM property since ensureObject() doesn't work.\r\n .ensure((answer: SharedDto.OnlineForm.Application.IRequestedFundingAmountDto) => answer.financialYearId)\r\n .satisfies((finId: number, answer: SharedDto.OnlineForm.Application.IRequestedFundingAmountDto) => {\r\n return !!+answer.amount || !!+answer.recurringAmount;\r\n })\r\n .when(() => (this.visibility && this.onSubmitValidation && this.isMandatory))\r\n .withMessage(\"An amount must be specified.\")\r\n .on(answer);\r\n }\r\n }\r\n\r\n detached() {\r\n for (let answer of this.questionInstance.answers) {\r\n this.controller.removeObject(answer);\r\n }\r\n\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private recalculateTotal() {\r\n var total = new Decimal(0);\r\n\r\n for(let requestedAmount of this.questionInstance.answers){\r\n total = total.add(requestedAmount.amount || 0);\r\n total = total.add(requestedAmount.recurringAmount || 0);\r\n }\r\n\r\n this.totalRequestedAmount = total.toNumber();\r\n }\r\n\r\n @computedFrom(\"questionInstance.answers\")\r\n get answer() {\r\n if (!this.questionInstance || !this.questionInstance.answers || this.questionInstance.answers.length === 0) {\r\n return null;\r\n }\r\n return this.questionInstance.answers[0];\r\n }\r\n\r\n @computedFrom(\"questionInstance.answers\")\r\n get multipleFiscalYears(): boolean {\r\n return this.questionInstance.answers.length > 1;\r\n }\r\n}\r\n","module.exports = \" \";","import { bindable, bindingMode, customElement, computedFrom } from 'aurelia-framework';\r\nimport { ValidationController, ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { CodeListService, FormOption } from 'shared/controls/online-form/question/code-list-service';\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@customElement('form-single-select-list')\r\nexport class FormSingleSelectList extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.ISingleSelectListAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n\r\n codeOptions: FormOption[];\r\n activeOptions: FormOption[];\r\n showDropDownList: boolean = false;\r\n showRadioButtonList: boolean = false;\r\n loading: boolean = true;\r\n\r\n constructor(private controlIdGenerator: ControlIdGenerator,\r\n private controller: ValidationController,\r\n private codeListService: CodeListService) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n\r\n switch (this.questionTemplate.questionType) {\r\n case SharedDto.Constants.QuestionType.RadioButton:\r\n this.showRadioButtonList = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.SingleSelectList:\r\n this.showDropDownList = true;\r\n break;\r\n default:\r\n throw new Error('Question type (' + SharedDto.Constants.QuestionType[this.questionTemplate.questionType] + ') not found');\r\n }\r\n\r\n var optionList = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.OptionsList);\r\n if (!optionList || !optionList.questionCodeListType) {\r\n throw new Error(\"Error with option list for questionId \" + this.questionTemplate.questionId);\r\n }\r\n\r\n if (!this.questionInstance.questionCodeListType) {\r\n this.questionInstance.questionCodeListType = optionList.questionCodeListType;\r\n }\r\n\r\n var sortAlphabeticallyRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.SortAlphabetically);\r\n var boolValue = (sortAlphabeticallyRule) ? sortAlphabeticallyRule.boolValue : undefined;\r\n this.loading = true;\r\n this.codeListService.getDataList(this.questionTemplate.questionId, optionList.questionCodeListType, boolValue).then((data) => {\r\n this.codeOptions = data;\r\n this.activeOptions = this.codeOptions.filter(x => x.active === true); \r\n this.loading = false; \r\n });\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n }\r\n\r\n setupValidation() {\r\n this.controller.removeObject(this.questionInstance);\r\n\r\n let rules = [];\r\n\r\n let that = this;\r\n\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.ISingleSelectListAnswerDto) => model.answer)\r\n .required()\r\n .when(() => {\r\n return (this.visibility && this.onSubmitValidation && this.isMandatory)\r\n })\r\n .satisfies((val, model) => {\r\n return this.answerIsActive;\r\n })\r\n .when(() => {\r\n return (this.visibility && this.onSubmitValidation && this.isMandatory)\r\n })\r\n .rules[0]);\r\n\r\n\r\n\r\n\r\n if (rules.length > 0) {\r\n this.controller.addObject(this.questionInstance, rules);\r\n }\r\n }\r\n\r\n @computedFrom(\"questionInstance.answer\", \"activeOptions\")\r\n get answerIsActive(): boolean {\r\n if(!this.questionInstance.answer || this.questionInstance.answer == \"0\") {\r\n return true;\r\n } \r\n if(this.activeOptions) {\r\n let val1 = this.activeOptions.findIndex(x => this.questionInstance.answer == x.value) != -1 ;\r\n let val2 = !this.questionInstance.answer; \r\n return val1 || val2;\r\n }\r\n return false;\r\n }\r\n\r\n @computedFrom(\"questionInstance.answer\", \"codeOptions\")\r\n get answerDescription(): string {\r\n if(this.codeOptions) {\r\n let answer = this.codeOptions.find(x => x.value == this.questionInstance.answer);\r\n if(answer) {\r\n return answer.description;\r\n }\r\n }\r\n return \"\";\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, bindable, bindingMode } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { GenericPhoneNumberRule, StartsWithHttpOrHttps, WebsiteAddressRule } from 'shared/controls/custom-validation';\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\nimport { QuestionBase } from \"../question-base\";\r\n\r\n@autoinject\r\nexport class FormSingleLineTextCustomElement extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n showSingleLineText: boolean = false;\r\n showUrl: boolean = false;\r\n showEmail: boolean = false;\r\n showPhone: boolean = false;\r\n\r\n constructor(private controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n\r\n attached() {\r\n super.attached();\r\n switch (this.questionTemplate.questionType) {\r\n case SharedDto.Constants.QuestionType.SingleLineText:\r\n this.showSingleLineText = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.URL:\r\n case SharedDto.Constants.QuestionType.SocialMediaLink:\r\n this.showUrl = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.Email:\r\n this.showEmail = true;\r\n break;\r\n case SharedDto.Constants.QuestionType.PhoneNumber:\r\n this.showPhone = true;\r\n break;\r\n default:\r\n throw new Error('Question type (' + SharedDto.Constants.QuestionType[this.questionTemplate.questionType] + ') not found');\r\n }\r\n }\r\n\r\n setupValidation() {\r\n ValidationRules.off(this.questionInstance);\r\n\r\n var builder = ValidationRules.ensure((a: any) => a.a).required().when(a => false);\r\n\r\n var minCharacterRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MinCharacters);\r\n if (minCharacterRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto) => model.answer)\r\n .minLength(minCharacterRule.numberValue)\r\n .when((x) => this.visibility);\r\n }\r\n\r\n var maxCharacterRule = this.questionTemplate.configurationOptions.find(x => x.configurationType == SharedDto.Constants.QuestionConfigurationType.MaxCharacters);\r\n if (maxCharacterRule) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto) => model.answer)\r\n .maxLength(maxCharacterRule.numberValue)\r\n .when((x) => this.visibility);\r\n }\r\n\r\n // if (this.questionTemplate.questionType == SharedDto.Constants.QuestionType.PhoneNumber) {\r\n // builder.ensure((model: SharedDto.OnlineForm.Application.IApplicationSingleLineTextQuestionDto) => model.answer)\r\n // .minLength(10).maxLength(10).satisfiesRule(GenericPhoneNumberRule)\r\n // .when((x) => this.visibility);\r\n // }\r\n\r\n if (this.questionTemplate.questionType == SharedDto.Constants.QuestionType.Email) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto) => model.answer)\r\n .email()\r\n .when((x) => this.visibility);\r\n }\r\n\r\n if (this.questionTemplate.questionType == SharedDto.Constants.QuestionType.URL || this.questionTemplate.questionType === SharedDto.Constants.QuestionType.SocialMediaLink) {\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto) => model.answer)\r\n .satisfiesRule(WebsiteAddressRule)\r\n .when((x) => this.visibility);\r\n }\r\n\r\n builder.ensure((model: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto) => model.answer)\r\n .required()\r\n .when(() => {\r\n return (this.visibility && this.onSubmitValidation && this.isMandatory);\r\n });\r\n\r\n builder.on(this.questionInstance);\r\n }\r\n}\r\n","module.exports = \" \";","import { autoinject, bindable, bindingMode } from 'aurelia-framework';\nimport { ValidationRules } from 'aurelia-validation';\nimport { SharedDto } from \"project/project-shared\";\nimport { GenericPhoneNumberRule, StartsWithHttpOrHttps, WebsiteAddressRule } from 'shared/controls/custom-validation';\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\nimport { QuestionBase } from \"../question-base\";\n\n@autoinject\nexport class FormTextBlock extends QuestionBase {\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.ISingleLineTextAnswerDto;\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\n\n\n constructor(private controlIdGenerator: ControlIdGenerator) {\n super(controlIdGenerator);\n }\n\n bind() {\n super.bind();\n }\n\n attached() {\n super.attached();\n }\n\n setupValidation() {\n ValidationRules.off(this.questionInstance);\n }\n}\n","module.exports = \"\";","import { inject, DOM, bindable, customElement, bindingMode, computedFrom } from 'aurelia-framework';\r\nimport { ValidationRules, ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { QuestionBase } from \"../question-base\";\r\nimport { ControlIdGenerator } from \"../../../../utils/control-id-generator\";\r\n\r\n@customElement('form-yesno-toggle')\r\nexport class FormYesNoToggle extends QuestionBase {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionInstance: SharedDto.OnlineForm.Application.IYesNoAnswerDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n\r\n constructor(private controller: ValidationController, private controlIdGenerator: ControlIdGenerator) {\r\n super(controlIdGenerator);\r\n }\r\n\r\n bind() {\r\n super.bind();\r\n }\r\n \r\n attached(){\r\n super.attached();\r\n }\r\n\r\n setupValidation(){\r\n this.controller.removeObject(this.questionInstance);\r\n \r\n let rules = [];\r\n rules.push(ValidationRules\r\n .ensure((model: SharedDto.OnlineForm.Application.IYesNoAnswerDto) => model.answer).required()\r\n .when(()=> this.visibility && this.onSubmitValidation && this.questionTemplate.mandatory)\r\n .rules[0]);\r\n\r\n if(rules.length>0){\r\n this.controller.addObject(this.questionInstance,rules);\r\n }\r\n }\r\n}\r\n","module.exports = \" \";","import { EventAggregator } from 'aurelia-event-aggregator';\nimport { autoinject, bindable, bindingMode, computedFrom } from \"aurelia-framework\";\nimport { SharedDto } from \"project/project-shared\";\nimport { SharedBroadcastEvents } from \"shared/utils/SharedBroadcastEvents\";\n\n@autoinject\nexport class RequestAdditionalInformation {\n @bindable({ defaultBindingMode: bindingMode.toView }) additionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) formInstanceAnswerId: number;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) formInstanceId: number;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questionId: number;\n\n responded: SharedDto.Constants.AdditionalInformationRequestStatus = SharedDto.Constants.AdditionalInformationRequestStatus.Responded;\n\n constructor(private eventAggregator: EventAggregator) {\n\n }\n\n hasAnswer(item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto): boolean {\n return item.answerText != null || item.actionedByAgencyDate != null;\n }\n\n getAnswer(item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto, responded: string): string {\n return item.answerText\n ? item.answerText\n : item.actionedByAgencyComment\n }\n\n hasAttachment(item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto, responded: string): boolean {\n return item.attachment != null || item.actionedByAgencyFileStorage != null;\n }\n\n getAttachment(item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto): SharedDto.IFilePropertiesDto {\n return item.attachment != null\n ? item.attachment\n : item.actionedByAgencyFileStorage\n }\n\n downloadAdditionalInformationDocument(additionalInformationRequestId: number, item: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto): void {\n // let applicationId = this.router.currentInstruction.parentInstruction.params.applicationId;\n // return this.additionalInfoService.getAttachmentDocumentUrl(applicationId, additionalInformationRequestId, item.additionalInformationRequestItemId, item.attachment.fileStorageId);\n this.eventAggregator.publish(SharedBroadcastEvents.additionalInformationDocumentDownload, { additionalInformationRequestId, item });\n }\n\n @computedFrom('additionalInformationRequest', 'formInstanceAnswerId')\n get additionalInformations(): SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[] {\n return this.additionalInformationRequest \n ? this.additionalInformationRequest.filter(x => {\n return x.formInstanceAnswerId == this.formInstanceAnswerId\n })\n : this.additionalInformationRequest\n }\n}","import { DialogController } from \"aurelia-dialog\";\nimport { autoinject, Disposable } from \"aurelia-framework\";\nimport { SharedDto } from \"project/project-shared\";\nimport { ValidationError } from \"shared/controls/validation-error\";\nimport { ValidationBase } from \"base-class\";\nimport { ControllerValidateResult, ValidationControllerFactory, ValidationRules } from \"aurelia-validation\";\nimport { SharedRequestAdditionalInformationServices } from \"../shared-request-additional-information-services\";\n\nexport interface IRequestAdditionalInformationModalParams {\n grantId: number,\n roundId: number,\n applicationId: number,\n additionalInformationRequestId : number|string,\n}\n\n@autoinject\nexport class RequestAdditionalInformationModal extends ValidationBase {\n grantId: number;\n roundId: number;\n formInstanceId: number;\n applicationId: number;\n additionalInformationRequestId : number|string;\n\n model: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto;\n question: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto[] = [];\n questionTypes: SharedDto.ICodeListItemDto[];\n\n subscriptions: Disposable[] = [];\n validationErrors: ValidationError;\n\n isBusy: boolean = false;\n isSubmitting: boolean = false;\n\n constructor(public readonly dialogController: DialogController,\n private readonly additionalInfoService: SharedRequestAdditionalInformationServices,\n validationControllerFactory: ValidationControllerFactory) {\n super(validationControllerFactory);\n }\n\n activate(params: IRequestAdditionalInformationModalParams) {\n this.grantId = params.grantId;\n this.roundId = params.roundId;\n this.applicationId = params.applicationId;\n this.additionalInformationRequestId = params.additionalInformationRequestId;\n \n var promises = [];\n\n if(params.additionalInformationRequestId == \"new\"){\n this.model = {\n additionalInformationRequestId: null,\n description: '',\n additionalInformationRequestItems: []\n } as SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto;\n } else {\n promises.push(this.additionalInfoService.getAdditionalInfoRequest(this.applicationId, +this.additionalInformationRequestId)\n .then((data) => {\n this.model = data;\n }));\n }\n\n Promise.all(promises)\n }\n\n bind() {\n this.setupValidation();\n }\n\n private setupValidation() {\n ValidationRules\n .ensure((x: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto) => x.description)\n .required()\n .maxLength(400)\n .on(this.model);\n }\n\n send() {\n this.controller.validate().then((result: ControllerValidateResult) => {\n if (result.valid) {\n this.model.visibleToAssessors = true;\n this.model.additionalInformationRequestItems.push({\n requestQuestionTypeDescription: this.model.description,\n questionText: this.model.description,\n requestQuestionType: 'FileUploadOrText',\n } as SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestItemSharedDto)\n\n this.dialogController.ok(this.model)\n }\n });\n }\n\n deactivate() {\n while (this.subscriptions.length > 0) {\n this.subscriptions.pop().dispose();\n }\n }\n}\n","module.exports = \" \";","module.exports = \"\";","import { autoinject, bindable, bindingMode, Disposable } from \"aurelia-framework\";\r\nimport { Router } from \"aurelia-router\";\r\nimport { SharedDto } from \"project/project-shared\";\r\n\r\n@autoinject\r\nexport class FormSection {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionTemplate: SharedDto.OnlineForm.Form.ISectionDto;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) sectionInstance: SharedDto.OnlineForm.Application.IFormInstanceSectionDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stepVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) canDelete: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n @bindable() sectionIndex: number = 0;\r\n @bindable() delete: () => void;\r\n @bindable() formControlId: number = null;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) router: Router;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) additionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) allowAdditionalInfoRequests: boolean = false;\r\n\r\n questionGroupTemplates: SharedDto.OnlineForm.Form.IQuestionDto[] = [];\r\n\r\n subscriptions: Disposable[] = [];\r\n\r\n bind() {\r\n this.sectionInstance.questionGroups.sort((a, b) => a.sortOrder - b.sortOrder);\r\n this.buildQuestion();\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private buildQuestion() {\r\n var qgt: SharedDto.OnlineForm.Form.IQuestionDto[] = [];\r\n\r\n for (let i = 0; i < this.sectionInstance.questionGroups.length; i++) {\r\n let questionGroupInstance = this.sectionInstance.questionGroups[i];\r\n qgt.push(this.sectionTemplate.questions.find(q => q.questionId == questionGroupInstance.templateQuestionId));\r\n }\r\n\r\n this.questionGroupTemplates = qgt;\r\n }\r\n}\r\n","import { BindingEngine, Disposable } from 'aurelia-binding';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { ValidationController } from 'aurelia-validation';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { SectionVisibilityChannelName } from \"../form-utils\";\r\n\r\n\r\n@customElement('form-section-group')\r\nexport class FormSectionGroup {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) sectionTemplate: SharedDto.OnlineForm.Form.ISectionDto;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) sectionGroup: SharedDto.OnlineForm.Application.IFormInstanceSectionGroupDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stepVisibility: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n @bindable() sectionAddedCallback: () => void;\r\n @bindable() formControlId: number = null;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) router: Router;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) additionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) allowAdditionalInfoRequests: boolean = false;\r\n\r\n //Used to determine if you are allowed to add in additional instances of the section. \r\n canAddInstance: boolean;\r\n canDeleteInstance: boolean;\r\n\r\n addSectionButtonText: string = \"Add another section\";\r\n private subscriptions: Disposable[] = [];\r\n\r\n constructor(private validationController: ValidationController, private eventAggregator: EventAggregator, private readonly bindingEngine: BindingEngine) {\r\n\r\n }\r\n\r\n bind() { \r\n if (!this.sectionTemplate) {\r\n throw new Error('Section template was not specified!');\r\n }\r\n\r\n if (!this.sectionGroup) {\r\n throw new Error('Section Group was not specified!');\r\n }\r\n\r\n if (this.sectionTemplate.sectionId != this.sectionGroup.templateSectionId) {\r\n throw new Error(`SectionId from template ${this.sectionTemplate.sectionId} and section group ${this.sectionGroup.templateSectionId} do not match!`);\r\n }\r\n\r\n if (this.sectionTemplate.repeatable) {\r\n if (this.sectionTemplate.addSectionButtonOverrideText) {\r\n this.addSectionButtonText = this.sectionTemplate.addSectionButtonOverrideText;\r\n }\r\n\r\n if (this.sectionTemplate.repeatMin && this.sectionTemplate.repeatMin > this.sectionGroup.sections.length) {\r\n //See we we need some dummy instance as there may be a min of 3. \r\n var instancesNeededToBeCreated = this.sectionTemplate.repeatMin - this.sectionGroup.sections.length;\r\n for (var i = 0; i < instancesNeededToBeCreated; i++) {\r\n this.addSectionInstance();\r\n }\r\n }\r\n }\r\n if (this.sectionGroup.sections.length == 0) {\r\n this.addSectionInstance();\r\n }\r\n\r\n\r\n this.updateInstanceValues();\r\n }\r\n\r\n attached() {\r\n this.subscriptions.push(this.eventAggregator.subscribe(SectionVisibilityChannelName(this.formControlId, this.sectionGroup.templateSectionId), (visibleStatus: boolean) => {\r\n this.sectionGroup.visible = visibleStatus;\r\n if (visibleStatus == false) {\r\n this.sectionGroup.sections.forEach((section) => {\r\n section.questionGroups.forEach((questionGroup) => {\r\n questionGroup.questions.forEach((question) => {\r\n this.validationController.reset({ object: question });\r\n });\r\n });\r\n });\r\n }\r\n }));\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private updateInstanceValues() {\r\n //Called when adding or removing a seciont instance from the section group. This is used to updates to bools of canAddInstance and canDeleteInstance.\r\n this.canAddInstance = this.sectionTemplate.repeatable\r\n && ((this.sectionTemplate.repeatMax && this.sectionTemplate.repeatMax > this.sectionGroup.sections.length)\r\n || this.sectionTemplate.repeatMax == null);\r\n\r\n this.canDeleteInstance = this.sectionTemplate.repeatable\r\n && ((this.sectionTemplate.repeatMin && this.sectionTemplate.repeatMin < this.sectionGroup.sections.length)\r\n || !this.sectionTemplate.repeatMin);\r\n\r\n this.sectionGroup.sections.sort((a, b) => a.sortOrder - b.sortOrder);\r\n }\r\n\r\n addSectionInstance() {\r\n var newSortOrder = 1;\r\n if (this.sectionGroup.sections.length !== 0) {\r\n var newSortOrder = this.sectionGroup.sections.sort((a, b) => b.sortOrder - a.sortOrder)[0].sortOrder + 1;\r\n }\r\n\r\n var newSectionInstance: SharedDto.OnlineForm.Application.IFormInstanceSectionDto = {\r\n templateSectionId: this.sectionTemplate.sectionId,\r\n sectionId: null,\r\n visible: true,\r\n sortOrder: newSortOrder,\r\n questionGroups: []\r\n };\r\n\r\n this.sectionTemplate.questions.forEach(questionTemplate => {\r\n var questionGroup: SharedDto.OnlineForm.Application.IFormInstanceQuestionGroupDto = {\r\n templateQuestionId: questionTemplate.questionId,\r\n sortOrder: questionTemplate.sortOrder,\r\n visible: questionTemplate.visible,\r\n allowAdditionalInformation: true,\r\n questions: [],\r\n };\r\n newSectionInstance.questionGroups.push(questionGroup);\r\n });\r\n\r\n this.sectionGroup.sections.push(newSectionInstance);\r\n\r\n this.updateInstanceValues();\r\n this.sectionAddedCallback();\r\n }\r\n\r\n removeSectionInstance(sectionInstance: SharedDto.OnlineForm.Application.IFormInstanceSectionDto) {\r\n var found = this.sectionGroup.sections.indexOf(sectionInstance);\r\n if (found >= 0) {\r\n this.sectionGroup.sections.splice(found, 1);\r\n }\r\n\r\n this.sectionGroup.sections.filter(x => x.sortOrder > sectionInstance.sortOrder).forEach(sectionInstance => sectionInstance.sortOrder--);\r\n\r\n this.updateInstanceValues();\r\n this.sectionAddedCallback();\r\n }\r\n}\r\n","module.exports = \" \";","module.exports = \" \";","import { Disposable, BindingEngine } from 'aurelia-binding';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { autoinject, bindable, bindingMode, customElement } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { Dto } from 'project/project';\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { StepVisibilityChannelName } from \"../form-utils\";\r\n\r\n\r\n@customElement('form-step')\r\n@autoinject\r\nexport class FormStep {\r\n @bindable({ defaultBindingMode: bindingMode.toView }) stepTemplate: SharedDto.OnlineForm.Form.IStepDto;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) stepInstance: SharedDto.OnlineForm.Application.IFormInstanceStepDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) onSubmitValidation: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formInstance: SharedDto.OnlineForm.Application.IFormInstanceDto;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) formTemplate: SharedDto.OnlineForm.Form.IFormTemplateDto;\r\n @bindable() sectionAddedCallback: () => void;\r\n @bindable() formControlId: number;\r\n sectionGroupTemplates: SharedDto.OnlineForm.Form.ISectionDto[] = [];\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) router: Router;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) additionalInformationRequest: SharedDto.Applications.AdditionalInfo.IAdditionalInformationRequestSharedDto[];\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) allowAdditionalInfoRequests: boolean = false;\r\n\r\n private subscriptions: Disposable[] = [];\r\n\r\n constructor(private eventAggregator: EventAggregator, private readonly bindingEngine: BindingEngine) {\r\n }\r\n\r\n bind() { \r\n if (this.stepInstance.templateStepId != this.stepTemplate.stepId) {\r\n // hint: look at the parent to figure out how this binding got mixed up\r\n throw new Error(\"The given application step does not match the template step.\");\r\n }\r\n\r\n //Make sure objects are in the right order. \r\n // Note: Seems silly doing it this way, but it makes the sorting, and by extention the triggering of events work correctly...go figure\r\n var theOrder = this.stepInstance.sectionGroups.slice(0);\r\n theOrder.sort((a, b) => a.sortOrder - b.sortOrder);\r\n this.stepInstance.sectionGroups = theOrder;\r\n\r\n\r\n // we need to match section group templates with the same index as stepInstance.sectionGroups\r\n this.buildSection();\r\n }\r\n\r\n attached() {\r\n this.subscriptions.push(this.eventAggregator.subscribe(StepVisibilityChannelName(this.formControlId, this.stepInstance.templateStepId), (visibleStatus: boolean) => {\r\n this.stepInstance.visible = visibleStatus;\r\n }));\r\n\r\n this.subscriptions.push(this.bindingEngine.collectionObserver(this.stepInstance.sectionGroups).subscribe((cr) => {\r\n this.buildSection();\r\n }));\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n private buildSection() {\r\n var sgt: SharedDto.OnlineForm.Form.ISectionDto[] = [];\r\n\r\n for (let i = 0; i < this.stepInstance.sectionGroups.length; i++) { \r\n let sectionGroupInstance = this.stepInstance.sectionGroups[i]; \r\n sgt.push(this.stepTemplate.sections.find(s => s.sectionId == sectionGroupInstance.templateSectionId));\r\n }\r\n\r\n this.sectionGroupTemplates = sgt;\r\n }\r\n}\r\n","module.exports = \" \";","import { customAttribute, autoinject } from \"aurelia-framework\";\n\n@autoinject\n@customAttribute(\"optional\")\nexport class OptionalAttribute {\n\n private _flagSet: boolean = false;\n\n constructor(private readonly element: Element) { }\n\n bind() {\n if (!this._flagSet)\n this.element.innerHTML += `- Optional`;\n this._flagSet = true;\n }\n}\n","import { autoinject, bindable } from \"aurelia-framework\";\r\nimport { Disposable, BindingEngine } from \"aurelia-binding\";\r\nimport { ValidationRules } from \"aurelia-validation\";\r\n\r\nimport { SharedDto } from \"project/project-shared\";\r\nimport { DataService } from \"services/data-service\";\r\nimport { Notifier } from \"services/notifier\";\r\nimport { observable } from \"aurelia-binding\";\r\nimport { bindingMode } from \"aurelia-binding\";\r\n\r\nimport { ControlIdGenerator } from 'shared/utils/control-id-generator';\r\n\r\ntype DocumentLocation = \"ORIC\" | \"ACNC\" | \"Upload\";\r\n\r\n@autoinject\r\nexport class OrganisationDocument {\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) model: SharedDto.ICreateUpdateOrganisationDocumentDto;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) uploadInProgress: boolean = false;\r\n @bindable registrations: SharedDto.Constants.RegulatoryAuthority[] = [\r\n SharedDto.Constants.RegulatoryAuthority.ACNC,\r\n SharedDto.Constants.RegulatoryAuthority.ORIC\r\n ];\r\n @bindable organisationId: number = 0;\r\n @bindable allowUpload: boolean | string = true;\r\n @bindable mandatory: boolean = true;\r\n @bindable fixedDocumentType: number = null;\r\n @bindable existingDocuments: SharedDto.IOrganisationDocumentDto[] = [];\r\n \r\n @bindable() id: string;\r\n\r\n documentTypesList: SharedDto.IDocumentTypeDto[];\r\n @observable documentLocation: DocumentLocation;\r\n\r\n @bindable mode: \"Update\" | \"Add\";\r\n\r\n acncRegistered: boolean;\r\n oricRegistered: boolean;\r\n\r\n docTypeWatcher: Disposable;\r\n docTypeAdditionalInfo: boolean;\r\n\r\n loading: boolean = true;\r\n\r\n constructor(\r\n private readonly dataService: DataService,\r\n private readonly bindingEngine: BindingEngine,\r\n private readonly controlIdGenerator: ControlIdGenerator) {\r\n }\r\n\r\n bind() {\r\n this.loading = true;\r\n if (!this.id) {\r\n this.id = this.controlIdGenerator.getNextId().toString();\r\n }\r\n\r\n this.allowUpload = this.allowUpload === \"true\" || this.allowUpload === true;\r\n if (!this.registrations || this.registrations.length < 1) {\r\n this.documentLocation = \"Upload\";\r\n }\r\n if (this.registrations) {\r\n this.acncRegistered = this.registrations.indexOf(SharedDto.Constants.RegulatoryAuthority.ACNC) > -1;\r\n this.oricRegistered = this.registrations.indexOf(SharedDto.Constants.RegulatoryAuthority.ORIC) > -1;\r\n }\r\n \r\n this.dataService.getDocumentTypes().then((response) => {\r\n this.documentTypesList = response; \r\n }).then(() => {\r\n if (this.model != null) {\r\n this.mode = \"Update\";\r\n this.docTypeAdditionalInfo = this.additionalInfoRequired(this.model);\r\n if (this.model.documentFoundOnACNC) {\r\n this.documentLocation = \"ACNC\";\r\n }\r\n else if (this.model.documentFoundOnORIC) {\r\n this.documentLocation = \"ORIC\";\r\n } else {\r\n this.documentLocation = \"Upload\";\r\n }\r\n } else {\r\n this.mode = \"Add\";\r\n this.model = {} as SharedDto.ICreateUpdateOrganisationDocumentDto;\r\n this.model.organisationId = this.organisationId;\r\n this.model.expiryDate = '';\r\n if(this.fixedDocumentType) {\r\n this.model.documentTypeId = this.fixedDocumentType;\r\n this.docTypeAdditionalInfo = this.additionalInfoRequired(this.model);\r\n }\r\n }\r\n })\r\n .then(() => {\r\n this.docTypeWatcher = this.bindingEngine.propertyObserver(this.model, \"documentTypeId\").subscribe(() => {\r\n if(!this.loading) {\r\n this.docTypeAdditionalInfo = this.additionalInfoRequired(this.model);\r\n }\r\n });\r\n })\r\n .then(() => {\r\n ValidationRules\r\n .ensure((model: SharedDto.ICreateUpdateOrganisationDocumentDto) => model.documentTitle).required().when(model => this.mandatory)\r\n .ensure(model => model.documentTypeId)\r\n .required()\r\n .when(model => this.mandatory)\r\n .ensure(model => model.documentTypeOther).required()\r\n .when(model => this.additionalInfoRequired(model) && this.mandatory)\r\n\r\n .withMessage(\"Please specify further details about the type of document you are uploading.\")\r\n .ensure(model => model.file).required()\r\n .when(model => this.documentLocation === \"Upload\" && this.mode === \"Add\" && this.mandatory && this.allowUpload)\r\n .withMessage(\"Please upload the document before proceeding.\")\r\n .on(this.model);\r\n\r\n ValidationRules\r\n .ensure((vm: OrganisationDocument) => vm.documentLocation).required().when(model => this.mandatory)\r\n .on(this);\r\n })\r\n .then(() => {\r\n this.loading = false; \r\n })\r\n }\r\n\r\n additionalInfoRequired(model: SharedDto.ICreateUpdateOrganisationDocumentDto): boolean {\r\n if (this.documentTypesList == null) { return false; }\r\n var docType = this.documentTypesList.find(x => x.id == model.documentTypeId);\r\n return docType && docType.additionalDetailsRequired;\r\n }\r\n\r\n documentLocationChanged(newValue?: DocumentLocation, oldValue?: DocumentLocation) {\r\n if (this.model == null) { return; }\r\n this.model.documentFoundOnACNC = (newValue === \"ACNC\");\r\n this.model.documentFoundOnORIC = (newValue === \"ORIC\");\r\n if (newValue === \"ACNC\" || newValue === \"ORIC\") {\r\n this.model.file = null;\r\n }\r\n }\r\n\r\n detached() {\r\n this.docTypeWatcher.dispose();\r\n }\r\n}","module.exports = \" \";","import { bindable, bindingMode, containerless, customElement } from 'aurelia-framework';\r\nimport { ValidationRules } from 'aurelia-validation';\r\nimport Inputmask from 'inputmask';\r\nimport { GenericPhoneNumberRule } from \"shared/controls/custom-validation\";\r\n\r\n@customElement('phone-number')\r\n@containerless()\r\nexport class phoneNumber {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n @bindable() phoneInput: HTMLInputElement;\r\n @bindable() displayName: string;\r\n @bindable() phoneNumberType: \"landline\" | \"mobile\" | \"either\" = \"landline\";\r\n @bindable() placeholder: string;\r\n @bindable() readonly: boolean = false;\r\n @bindable() disabled: boolean = false;\r\n\r\n attached() {\r\n let inputMask;\r\n switch (this.phoneNumberType) {\r\n case \"mobile\":\r\n inputMask = \"9999 999 999\";\r\n break;\r\n case \"landline\":\r\n inputMask = \"99 9999 9999\";\r\n break;\r\n default:\r\n inputMask = \"9999999999\";\r\n break;\r\n }\r\n Inputmask(inputMask, {\r\n autoUnmask: true,\r\n postValidation: () => {\r\n var evt = document.createEvent(\"HTMLEvents\");\r\n evt.initEvent(\"change\", false, true);\r\n this.phoneInput.dispatchEvent(evt);\r\n return true;\r\n }\r\n }).mask(this.phoneInput);\r\n }\r\n\r\n bind() {\r\n ValidationRules\r\n .ensure((model: phoneNumber) => model.value).displayName(this.displayName)\r\n .minLength(10).maxLength(10).satisfiesRule(GenericPhoneNumberRule)\r\n .on(this);\r\n }\r\n}\r\n","module.exports = \" \";","import { Disposable, BindingEngine } from 'aurelia-framework';\r\nimport { bindingMode } from \"aurelia-binding\";\r\nimport { autoinject } from \"aurelia-dependency-injection\";\r\nimport { bindable } from \"aurelia-templating\";\r\nimport { ControlIdGenerator } from \"../../utils/control-id-generator\";\r\n\r\n@autoinject\r\nexport class RadioButtonList {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.toView }) options: any[];\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) name = \"rb\";\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) disabled: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) inline: boolean = false;\r\n @bindable() displayProperty: string = \"description\";\r\n @bindable() idProperty: string = \"id\";\r\n\r\n private subscriptions: Disposable[] = [];\r\n\r\n constructor(private readonly controlIdGenerator: ControlIdGenerator,\r\n private readonly bindingEngine: BindingEngine) {\r\n\r\n }\r\n\r\n created() {\r\n if (this.name == 'rb') {\r\n this.name = this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n attached() {\r\n this.subscriptions.push(\r\n this.bindingEngine.propertyObserver(this, \"name\").subscribe(\r\n () => {\r\n this.forceUiUpdate();\r\n }\r\n )\r\n );\r\n }\r\n \r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n forceUiUpdate() {\r\n var val = this.value;\r\n this.value = null;\r\n this.value = val;\r\n }\r\n}\r\n","module.exports = \"\";","import { BindingEngine, bindingMode, Disposable } from \"aurelia-binding\";\nimport { autoinject } from \"aurelia-dependency-injection\";\nimport { bindable, customElement } from \"aurelia-templating\";\nimport * as $ from 'jquery';\nimport \"selectize\";\nimport \"./selectize-plugin-clear\";\n\n@customElement(\"select-input\")\n@autoinject\nexport class SelectInput {\n\n @bindable({ defaultBindingMode: bindingMode.toView }) options: any[] = [];\n @bindable({ defaultBindingMode: bindingMode.oneTime }) multiselect: boolean = false;\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedValue: any;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedValues: any[];\n\n @bindable({ defaultBindingMode: bindingMode.oneTime }) displayProperty: string = \"description\";\n @bindable({ defaultBindingMode: bindingMode.oneTime }) valueProperty: string = \"id\";\n @bindable({ defaultBindingMode: bindingMode.oneTime }) placeholder: string = \"\";\n @bindable({ defaultBindingMode: bindingMode.oneTime }) sortProperty: string; //default on bind to displayProperty if not set\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) disabled: boolean = false;\n @bindable({ defaultBindingMode: bindingMode.oneTime }) closeAfterSelect: boolean = false;\n\n @bindable({ defaultBindingMode: bindingMode.oneTime }) canCreateOption: boolean = false;\n\n selectElement: Element;\n selectizeApi: Selectize.IApi;\n optionsObserver: Disposable;\n selectedValuesObserver: Disposable;\n\n constructor(private readonly bindingEngine: BindingEngine) {\n\n }\n\n focus() {\n this.selectizeApi.focus();\n }\n\n\n attached() {\n let plugins = [];\n \n plugins.push('clear_button');\n\n if (this.multiselect) {\n plugins.push('remove_button');\n }\n\n if (!this.sortProperty) {\n this.sortProperty = this.displayProperty;\n }\n\n $(this.selectElement).selectize({\n plugins: plugins,\n selectOnTab: true,\n allowEmptyOption: true,\n placeholder: this.placeholder,\n disabledField: 'disable',\n sortField: [{ field: this.sortProperty, direction: 'asc' }, { field: '$order' }],\n maxItems: this.multiselect ? null : 1,\n closeAfterSelect: this.closeAfterSelect,\n // persist needs to be false when users are allowed to create their own option\n // please see description of persist and create in the documentation for further reading\n // https://github.com/selectize/selectize.js/blob/master/docs/usage.md\n // persist: this.canCreateOption ? false : true, \n create: this.canCreateOption ? function(input) {\n return {\n value: input,\n text: input\n }\n } : false\n });\n\n this.initSelectizeApi();\n \n if (this.disabled) {\n this.selectizeApi.disable();\n }\n this.optionsChanged();\n\n //trigger changed events so the model gets synced with the control\n if (this.multiselect) {\n this.selectedValuesChanged();\n } else {\n this.selectedValueChanged();\n }\n }\n\n private initSelectizeApi() {\n this.selectizeApi = (this.selectElement).selectize;\n this.selectizeApi.on('change', (value) => { this.itemSelected(value); });\n this.selectizeApi.on(\"item_remove\", (value) => { this.itemRemoved(value); });\n }\n\n disabledChanged(newValue: boolean) {\n if (newValue) {\n this.selectizeApi.disable();\n } else {\n this.selectizeApi.enable();\n }\n }\n\n private itemSelected(value) { \n \n if (value instanceof Array) {\n //multi select - update based on selection mutations (do not reassign array, as this could break observers)\n if (!this.selectedValues) {\n this.selectedValues = []; \n }\n if (value.length === 0) {\n this.selectedValues.splice(0, this.selectedValues.length); \n }\n \n //only add values that aren't already added:\n for (let newValue of value) {\n \n //if the value property is numeric, cast string back to number\n if (this.valueIsNumeric && !this.canCreateOption) {\n newValue = +newValue; \n }\n if (this.selectedValues.indexOf(newValue) < 0) {\n this.selectedValues.push(newValue);\n }\n }\n } else {\n //if the value property is numeric, cast string back to number\n if (this.valueIsNumeric && value !== \"\") {\n value = +value;\n }\n this.selectedValue = value; \n }\n }\n\n private itemRemoved(value) { \n if (this.valueIsNumeric) {\n value = +value;\n }\n if (this.multiselect) {\n if (this.selectedValues.indexOf(value) > -1) {\n this.selectedValues.splice(this.selectedValues.indexOf(value), 1);\n }\n } else {\n if (this.selectedValue !== null) {\n this.selectedValue = null;\n }\n }\n }\n\n selectedValueChanged() {\n //ensure is selected in the selectize control\n if ((this.selectedValue === null || this.selectedValue === undefined) && this.selectizeApi.items && this.selectizeApi.items.length > 0) {\n //new value is null/undefined and items are selected, so clear\n this.selectizeApi.clear();\n } else if (this.selectedValue !== null && this.selectedValue !== undefined) {\n // check if selectizeApi is define\n if(!this.selectizeApi) {\n return\n }\n //new value exists, add it if it isn't already\n if (this.selectizeApi.items.findIndex(x => x[this.valueProperty] === this.selectedValue) === -1) {\n //clear any old selections, then add\n this.selectizeApi.addItem(this.selectedValue, false);\n }\n }\n }\n\n selectedValuesChanged() {\n if (this.selectedValuesObserver) {\n this.selectedValuesObserver.dispose();\n }\n\n // clearing ends up clearing the clearing the selectedValues completely, if they've already been set.\n // thanks to calling 'item selected' with no values\n // this.selectizeApi.clear();\n // so lets just clear the items property. \n this.selectizeApi.items = []; \n\n //sync with selectize control\n if (this.selectedValues) {\n for (let value of this.selectedValues) {\n //sync selectize control\n let valueString = value;\n if (this.valueIsNumeric) {\n valueString = value.toString();\n }\n if (this.selectizeApi.items.indexOf(valueString) === -1) {\n this.selectizeApi.addItem(value, true);\n }\n }\n }\n //set up observers and handle mutations as well\n this.registerSelectedValuesObserver();\n }\n\n private registerSelectedValuesObserver() {\n if (this.selectedValues && this.selectedValues instanceof Array) {\n this.selectedValuesObserver = this.bindingEngine.collectionObserver(this.selectedValues).subscribe((changes) => {\n\n for (let change of changes) {\n if (change.addedCount > 0) {\n for (let i = 0; i < change.addedCount; i++) {\n let addedValue = this.selectedValues[(change.index + i)];\n //sync selectize control\n if (this.selectizeApi.items.indexOf(addedValue) === -1) {\n this.selectizeApi.addItem(addedValue, true);\n }\n }\n }\n for (let removedValue of change.removed) {\n //sync selectize control\n //note selectizeApi.items are strings so if using numeric values, convert to string before comparison.\n let removedValueString = removedValue;\n if (this.valueIsNumeric) {\n removedValueString = removedValue.toString();\n }\n if (this.selectizeApi.items.indexOf(removedValueString) > -1) {\n this.selectizeApi.removeItem(removedValue, true);\n }\n }\n }\n });\n }\n }\n\n bind() {\n //note: removing bind() will cause Changed events to trigger on init, which will break optionsChanged()\n if (!this.sortProperty) {\n this.sortProperty = this.displayProperty;\n } \n this.registerSelectedValuesObserver();\n }\n\n detached() {\n if (this.selectizeApi) {\n this.selectizeApi.destroy();\n }\n if (this.optionsObserver) {\n this.optionsObserver.dispose();\n }\n if (this.selectedValuesObserver) {\n this.selectedValuesObserver.dispose();\n }\n }\n\n optionsChanged() { \n if (!this.selectizeApi) {\n return;\n }\n\n this.syncOptions();\n //manage colelction observer below to listen for mutations against newly assigned options collection\n if (this.optionsObserver) {\n this.optionsObserver.dispose();\n }\n if (this.options && this.options instanceof Array) { \n //set up a new observer if options are not null\n this.optionsObserver = this.bindingEngine.collectionObserver(this.options).subscribe((changes) => {\n for (let change of changes) {\n if (change.addedCount > 0) {\n //from the index they were added, cycle through and add the objects to selectize based on addedCount\n for (let i = 0; i < change.addedCount; i++) { \n this.selectizeApi.addOption({\n value: this.options[change.index + i][this.valueProperty],\n text: this.options[change.index + i][this.displayProperty]\n });\n }\n }\n for (let removedObject of change.removed) {\n //remove them by object.value property\n this.selectizeApi.removeOption(removedObject[this.valueProperty]);\n }\n }\n this.selectizeApi.refreshItems();\n });\n }\n }\n\n private syncOptions() {\n //add options manually via API since aurelia's repeater on option gets messed up by selectize\n this.selectizeApi.clearOptions();\n if (this.options && this.options.length > 0) {\n for (let option of this.options) {\n let opt = {\n value: option[this.valueProperty],\n text: option[this.displayProperty]\n } \n this.selectizeApi.addOption(opt);\n }\n }\n //this.selectizeApi.refreshItems();\n }\n\n get valueIsNumeric(): boolean {\n if (this.options && this.options.length > 0) {\n return typeof this.options[0][this.valueProperty] == 'number';\n }\n return false;\n }\n}\n","module.exports = \" \";","import { autoinject } from \"aurelia-dependency-injection\";\nimport { bindable } from \"aurelia-templating\";\nimport \"./inline-table-field.less\";\n\n@autoinject\nexport class InlineTableField {\n @bindable prefix: string;\n @bindable label: string;\n @bindable value: string;\n}\n","module.exports = \" \";","import { bindable, BindingEngine, autoinject, bindingMode } from \"aurelia-framework\";\r\nimport { Subscription } from \"aurelia-event-aggregator\";\r\nimport \"./text-editor.less\";\r\n\r\nimport tinymce from \"tinymce/tinymce\";\r\nimport 'tinymce/themes/silver/theme';\r\nimport 'tinymce/plugins/paste/plugin';\r\nimport 'tinymce/plugins/link/plugin';\r\nimport 'tinymce/plugins/anchor/plugin';\r\nimport 'tinymce/plugins/code/plugin';\r\nimport 'tinymce/plugins/image/plugin';\r\nimport 'tinymce/plugins/lists/plugin';\r\nimport 'tinymce/plugins/wordcount/plugin';\r\nimport 'tinymce/plugins/autolink/plugin';\r\nimport 'tinymce/plugins/fullscreen/plugin';\r\nimport 'tinymce/plugins/imagetools/plugin';\r\nimport 'tinymce/plugins/media/plugin';\r\nimport 'tinymce/plugins/print/plugin';\r\nimport 'tinymce/plugins/template/plugin';\r\nimport { MergeField } from \"./model/merge-field\";\r\nimport { InternalLink } from \"./model/internal-link\";\r\nimport { ControlIdGenerator } from \"../../utils/control-id-generator\";\r\nimport { some } from \"lodash\";\r\n\r\nimport 'tinymce/icons/default';\r\nimport 'tinymce/skins/ui/oxide/skin.css';\r\n// var contentCss = require(\"tinymce/skins/content/default/content.css\");\r\n// var contentUiCss = require('tinymce/skins/ui/oxide/content.css');\r\n\r\n@autoinject\r\nexport class TextEditor {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) id: string;\r\n cachedValue: string;\r\n editor: any;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;\r\n\r\n @bindable() height = 200;\r\n convertUrls = false;\r\n menuBar = false;\r\n toolBar = \"undo redo | styleselect | bold forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | \" +\r\n \" link plugin_sample insert_image | print | spellchecker | fullscreen\";\r\n plugins = ['paste', 'link', 'anchor', 'code', 'image', 'lists', 'wordcount', 'autolink', 'fullscreen', 'print', 'fullscreen'];\r\n statusBar = false;\r\n insertImageParams = {};\r\n @bindable() mergeFields: MergeField[];\r\n @bindable() categoriseMergeField: boolean = false;\r\n @bindable() internalLinks: InternalLink[];\r\n @bindable() readonly: boolean = false;\r\n @bindable() enableFontFamily: boolean;\r\n\r\n constructor(private readonly controlIdGenerator: ControlIdGenerator, private readonly element: Element) {\r\n\r\n }\r\n\r\n valueChanged(newValue) {\r\n if (this.editor !== undefined) {\r\n //we check newValue against cachedValue to ensure we only call setContent when the parent VM/control specifies a new value.\r\n //cachedValue replaces editor.getContent because the value and getContent can get out of sync between bindings.\r\n if (newValue !== this.cachedValue) {\r\n this.editor.setContent(this.value);\r\n }\r\n }\r\n }\r\n\r\n created(owningView) {\r\n //intercept the parent views 'removeNodes' function and destroy our editor first, then proceed with it's original removeNodes callback.\r\n let original = owningView.removeNodes;\r\n let that = this;\r\n\r\n owningView.removeNodes = () => {\r\n if (this.editor !== undefined) {\r\n this.editor.destroy();\r\n }\r\n original.call(owningView);\r\n };\r\n\r\n if (!this.id) {\r\n this.id = \"rte\" + this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n bind() {\r\n if(this.enableFontFamily) {\r\n this.toolBar += \" | fontselect\";\r\n }\r\n\r\n if (this.mergeFields) {\r\n if (this.toolBar.indexOf(\"mergefields\") === -1) {\r\n this.toolBar = this.toolBar + \" | mergefields\";\r\n }\r\n }\r\n }\r\n\r\n unbind() { \r\n let editor = tinymce.get(this.id.toString()); \r\n if(editor) {\r\n editor.remove();\r\n }\r\n }\r\n\r\n readonlyChanged(newValue) {\r\n if (newValue) {\r\n this.editor.setMode(\"readonly\"); \r\n this.element.classList.add(\"text-editor-readonly\");\r\n } else {\r\n this.editor.setMode(\"design\"); \r\n this.element.classList.remove(\"text-editor-readonly\");\r\n }\r\n }\r\n\r\n attached() {\r\n let textEditorId = \"#\" + this.id.toString();\r\n\r\n tinymce.init({ \r\n selector: textEditorId,\r\n font_formats: 'Lato=lato;Times New Roman=times new roman,serif;Courier New=courier new,courier,monospace;' ,\r\n plugins: this.plugins,\r\n menubar: this.menuBar,\r\n statusbar: this.statusBar,\r\n content_style: \"body { font-size: 14px; font-family: Lato; }\",\r\n // toolbar: this.readonly ? false : this.toolBar,\r\n // the above doesn't let you easily add the toolbar back when readonly is toggled off\r\n // so lets just leave it there disabled. anywhere that absolutely needs to show it without\r\n // the toolbar can implement its own rendering with if/else.bind\r\n toolbar: this.toolBar,\r\n link_list: this.internalLinks,\r\n skin: false,\r\n content_css: false, \r\n height: this.height,\r\n readonly: this.readonly ? true : false,\r\n convert_urls: this.convertUrls,\r\n setup: editor => {\r\n editor.on('init', e => {\r\n this.editor = editor;\r\n if (this.value == undefined) {\r\n editor.setContent(\"\");\r\n } else {\r\n editor.setContent(this.value);\r\n } \r\n });\r\n\r\n editor.on('keyup change redo undo', e => {\r\n //we cache the value from \"getContent\" because it can change between setting this.value and when the valueChanged method is called.\r\n this.cachedValue = editor.getContent();\r\n this.value = this.cachedValue;\r\n });\r\n //editor.insertImageParams = this.insertImageParams;\r\n\r\n if (this.mergeFields) {\r\n if (this.categoriseMergeField) {\r\n\r\n var mergeFieldCategories: Record = {};\r\n this.mergeFields.forEach((mergeField) => {\r\n var catName = mergeField.category || \"Uncategorised\";\r\n var catMergeField = mergeFieldCategories[catName] || [];\r\n catMergeField.push(mergeField);\r\n mergeFieldCategories[catName] = catMergeField;\r\n });\r\n\r\n var items: any[] = []\r\n\r\n for (let key in mergeFieldCategories) {\r\n if (mergeFieldCategories.hasOwnProperty(key)) {\r\n let catMergeFields = mergeFieldCategories[key] \r\n items.push(\r\n {\r\n type: 'nestedmenuitem',\r\n text: key,\r\n getSubmenuItems: () => catMergeFields.map(x => {\r\n return {\r\n type: 'menuitem',\r\n text: x.displayName,\r\n onAction: () => editor.insertContent(x.mergeField) \r\n }\r\n })\r\n }\r\n );\r\n\r\n }\r\n }\r\n\r\n editor.ui.registry.addMenuButton('mergefields', {\r\n type: 'menubutton',\r\n text: 'Insert Merge Field', \r\n fetch: (callback) => callback(items)\r\n });\r\n } else {\r\n var showCategory = some(this.mergeFields, (i => i.category));\r\n var menu = this.mergeFields.map(x => {\r\n return {\r\n type: 'menuitem',\r\n text: showCategory && x.category != null ? x.category + \"-\" + x.displayName : x.displayName,\r\n onAction: () => editor.insertContent(x.mergeField)\r\n } as any // ts makes no kinda sense.\r\n });\r\n \r\n editor.ui.registry.addMenuButton('mergefields', {\r\n type: 'menubutton',\r\n text: 'Insert Merge Field', \r\n fetch: (callback) => callback(menu)\r\n });\r\n }\r\n }\r\n }\r\n\r\n\r\n });\r\n\r\n\r\n if (this.readonly) {\r\n this.element.classList.add(\"text-editor-readonly\"); \r\n tinymce.activeEditor.getBody().setAttribute('contenteditable', \"false\");\r\n } \r\n }\r\n\r\n \r\n}\r\n","module.exports = \" \";","import { ValidationError } from \"../validation-error\";\r\nimport { bindable, customElement } from \"aurelia-framework\";\r\nimport scrollIntoView from \"scroll-into-view\";\r\n\r\n@customElement('validation-summary')\r\nexport class ValidationSummaryComponent {\r\n\r\n @bindable() validationError: ValidationError;\r\n\r\n constructor(private element: Element){\r\n \r\n } \r\n\r\n validationErrorChanged(newValue, oldValue){ \r\n if(newValue){\r\n scrollIntoView(this.element);\r\n }\r\n }\r\n}","module.exports = \" \";","import { Disposable } from \"aurelia-binding\";\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { autoinject, bindable, bindingMode, children } from \"aurelia-framework\";\r\nimport { TaskQueue } from \"aurelia-task-queue\";\r\nimport { ValidateEvent, ValidationController } from \"aurelia-validation\";\r\nimport scrollIntoView from \"scroll-into-view\";\r\nimport { SharedBroadcastEvents } from \"shared/utils/SharedBroadcastEvents\";\r\nimport { WizardTab } from \"./wizard-tab\";\r\n\r\n\r\n@autoinject\r\nexport class Wizard {\r\n @children(\"wizard-tab\") tabs: WizardTab[];\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) wizardStyle: string;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) navClass: string;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) activeTab: string;\r\n\r\n subscription: Disposable;\r\n\r\n constructor(private readonly controller: ValidationController,\r\n private readonly eventAggregator: EventAggregator,\r\n private readonly taskQueue: TaskQueue) {\r\n }\r\n\r\n activeTabChanged() {\r\n this.eventAggregator.publish(SharedBroadcastEvents.tabVisibilityChanged);\r\n }\r\n\r\n tabsChanged() {\r\n this.setSelected();\r\n }\r\n\r\n bind() {\r\n this.setSelected();\r\n }\r\n\r\n attached() {\r\n this.subscription = this.controller.subscribe((event: ValidateEvent) => {\r\n if (event.type == 'validate' && event.errors.length > 0 && event.instruction == undefined) {\r\n this.jumpToFirstTabWithErrors();\r\n }\r\n });\r\n }\r\n\r\n detached() {\r\n this.subscription.dispose();\r\n }\r\n\r\n setSelected() {\r\n if (this.tabs && this.tabs.length > 0) {\r\n var tab: WizardTab;\r\n if (this.activeTab) {\r\n tab = this.tabs.find(x => x.tabName == this.activeTab);\r\n }\r\n if (tab) {\r\n this.selectTab(tab);\r\n } else {\r\n this.selectTab(this.tabs[0]);\r\n }\r\n }\r\n }\r\n\r\n private jumpToFirstTabWithErrors() {\r\n var selected = this.tabs.find((tab: WizardTab) => tab.selected);\r\n\r\n //if selected has errors, dont navigate away\r\n if (selected != null && selected.errors.length > 0) {\r\n if (selected.errors[0].targets.length > 0) {\r\n scrollIntoView(selected.errors[0].targets[0]);\r\n }\r\n } else {\r\n var firstTabWithError = this.tabs.find((tab: any) => tab.errors && tab.errors.length);\r\n if (firstTabWithError) {\r\n this.selectTab(firstTabWithError);\r\n\r\n if (firstTabWithError.errors[0].targets.length > 0) {\r\n this.taskQueue.queueTask(() => {\r\n scrollIntoView(firstTabWithError.errors[0].targets[0]);\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n selectTab(tab) {\r\n this.tabs.forEach((t: WizardTab) => t.selected = false);\r\n tab.selected = true;\r\n this.activeTab = tab.tabName;\r\n }\r\n}\r\n","import { bindable, bindingMode } from \"aurelia-framework\";\r\nimport { RenderedError } from \"aurelia-validation\";\r\n\r\nexport class WizardTab {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) tabName: string;\r\n @bindable({ defaultBindingMode: bindingMode.oneTime }) defaultSelected: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) hidden: boolean = false;\r\n\r\n public selected: boolean;\r\n public errors: RenderedError[];\r\n}\r\n","module.exports = \"\";","module.exports = \"\";","import { inject, DOM, bindable, customElement, bindingMode, Disposable, BindingEngine } from 'aurelia-framework';\r\nimport { ValidationControllerFactory } from 'aurelia-validation';\r\n\r\nimport { ValidationBase } from '../../../base-class';\r\nimport { ControlIdGenerator } from \"../../utils/control-id-generator\";\r\n\r\n@inject(ValidationControllerFactory, DOM.Element, ControlIdGenerator, BindingEngine)\r\n@customElement('yesno')\r\nexport class YesNo extends ValidationBase {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) id: string;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) name: string;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) model: boolean;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) disabled: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) readonly: boolean = false;\r\n @bindable({ defaultBindingMode: bindingMode.toView }) yesText: string = \"Yes\";\r\n @bindable({ defaultBindingMode: bindingMode.toView }) noText: string = \"No\";\r\n\r\n private subscriptions: Disposable[] = [];\r\n\r\n // Note: autoinject not used.\r\n constructor(controllerFactory: ValidationControllerFactory,\r\n private readonly element: Element,\r\n private readonly controlIdGenerator: ControlIdGenerator,\r\n private readonly bindingEngine: BindingEngine) {\r\n super(controllerFactory);\r\n this.element = element;\r\n }\r\n\r\n created() {\r\n if (!this.id) {\r\n this.id = this.controlIdGenerator.getNextId().toString();\r\n }\r\n }\r\n\r\n attached() {\r\n this.subscriptions.push(\r\n this.bindingEngine.propertyObserver(this, \"name\").subscribe(\r\n () => {\r\n this.forceUiUpdate();\r\n }\r\n )\r\n );\r\n }\r\n\r\n detached() {\r\n while (this.subscriptions.length > 0) {\r\n this.subscriptions.pop().dispose();\r\n }\r\n }\r\n\r\n setValue(value: boolean) {\r\n this.model = value;\r\n return this.element.dispatchEvent(DOM.createCustomEvent(\"blur\", null));\r\n }\r\n\r\n forceUiUpdate() {\r\n var val = this.model;\r\n this.setValue(!val);\r\n this.setValue(val);\r\n }\r\n\r\n}\r\n","module.exports = \" \";","import { inject, DOM, bindable, customElement, bindingMode, Disposable, BindingEngine } from 'aurelia-framework';\nimport { ValidationControllerFactory } from 'aurelia-validation';\n\nimport { ValidationBase } from '../../../base-class';\nimport { ControlIdGenerator } from \"../../utils/control-id-generator\";\n\n@inject(ValidationControllerFactory, DOM.Element, ControlIdGenerator, BindingEngine)\n@customElement('yesnomaybe')\nexport class YesNoMaybe extends ValidationBase {\n\n @bindable({ defaultBindingMode: bindingMode.twoWay }) id: string;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) name: string;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) model: number;\n @bindable({ defaultBindingMode: bindingMode.toView }) disabled: boolean;\n @bindable({ defaultBindingMode: bindingMode.toView }) yesText: string = \"Yes\";\n @bindable({ defaultBindingMode: bindingMode.toView }) noText: string = \"No\";\n @bindable({ defaultBindingMode: bindingMode.toView }) maybeText: string = \"Prefer not to answer\";\n\n private subscriptions: Disposable[] = [];\n\n // Note: autoinject not used.\n constructor(controllerFactory: ValidationControllerFactory,\n private readonly element: Element,\n private readonly controlIdGenerator: ControlIdGenerator,\n private readonly bindingEngine: BindingEngine) {\n super(controllerFactory);\n this.element = element;\n }\n\n bind() {\n if (!this.id) {\n this.id = this.controlIdGenerator.getNextId().toString();\n }\n }\n\n attached() {\n this.subscriptions.push(\n this.bindingEngine.propertyObserver(this, \"name\").subscribe(\n () => {\n this.forceUiUpdate();\n }\n )\n );\n }\n \n detached() {\n while (this.subscriptions.length > 0) {\n this.subscriptions.pop().dispose();\n }\n }\n\n setValue(value: number) {\n this.model = value;\n return this.element.dispatchEvent(DOM.createCustomEvent(\"blur\", null));\n }\n\n forceUiUpdate() {\n var val = this.model;\n this.setValue(val < 0 ? val + 1 : val - 1);\n this.setValue(val);\n }\n \n}\n","module.exports = \"\";","export class AbnValueConverter {\r\n toView(value: string) {\r\n if (value === null || value === undefined) { return value; }\r\n //strip out any other formatting\r\n var formattedValue = value.replace(/\\s+/g, '').trim();\r\n\r\n //add spaces where long enough\r\n if (formattedValue.length > 2) {\r\n formattedValue = formattedValue.substr(0, 2) + \" \" + formattedValue.substr(2);\r\n }\r\n if (formattedValue.length > 6) {\r\n formattedValue = formattedValue.substr(0, 6) + \" \" + formattedValue.substr(6);\r\n }\r\n if (formattedValue.length > 10) {\r\n formattedValue = formattedValue.substr(0, 10) + \" \" + formattedValue.substr(10);\r\n }\r\n\r\n return formattedValue;\r\n }\r\n}","import { SharedDto } from \"project/project-shared\";\nimport { base64toBlob } from \"shared/utils/base-64-to-blob\";\n\nexport class BlobToUrlValueConverter { \n toView(inputBlob: SharedDto.IFileDto) {\n var blob = base64toBlob(inputBlob.fileContents, null);\n return URL.createObjectURL(blob);\n }\n}","import { CurrencyFormatter } from \"shared/utils/utils\";\r\nimport { Decimal } from \"decimal.js-light\";\r\n\r\nexport class CurrencyValueConverter {\r\n toView(value: number, decimalPoints?: number, inclGst: boolean = false, getOnlyGst: boolean = false) {\r\n if (value === null || value === undefined) { return value; }\r\n \r\n if(inclGst)\r\n {\r\n let amountExclGst = new Decimal(value || 0);\r\n let gstValue = new Decimal(0);\r\n if (amountExclGst.greaterThan(0)) {\r\n gstValue = amountExclGst.times(0.10).toDecimalPlaces(2, Decimal.ROUND_HALF_UP); \r\n return CurrencyFormatter(gstValue.add(amountExclGst).toNumber(), decimalPoints || 2);\r\n }\r\n } \r\n \r\n if(getOnlyGst)\r\n {\r\n let amountExclGst = new Decimal(value || 0);\r\n let gstValue = new Decimal(0);\r\n if (amountExclGst.greaterThan(0)) {\r\n gstValue = amountExclGst.times(0.10).toDecimalPlaces(2, Decimal.ROUND_HALF_UP); \r\n return CurrencyFormatter(gstValue.toNumber(), decimalPoints || 2);\r\n }\r\n } \r\n \r\n\r\n return CurrencyFormatter(value, decimalPoints || 2);\r\n }\r\n}","import { AggregateError } from 'aurelia-pal';\r\nimport * as moment from 'moment';\r\n\r\nexport class DateFormatValueConverter {\r\n toView(value, format?, noValueString: string = \"No date specified\") {\r\n var formatString: string;\r\n switch (format) {\r\n case \"time\":\r\n formatString = \"h:mm A\";\r\n break;\r\n case \"time24hr\":\r\n formatString = \"HH:mm\";\r\n break;\r\n case \"date\":\r\n formatString = \"D/MM/YYYY\";\r\n break;\r\n case \"date-long\":\r\n formatString = \"Do MMMM YYYY\";\r\n break;\r\n case \"datetime-long\":\r\n formatString = \"D MMMM YYYY h:mm A\";\r\n break;\r\n case \"datetime-long-acst\":\r\n formatString = \"D MMMM YYYY h:mm A [(ACST)]\";\r\n break;\r\n case \"ago\":\r\n return this.ago(value); \r\n case \"datetime\":\r\n default:\r\n formatString = \"D/MM/YYYY h:mm A\";\r\n break;\r\n }\r\n if (value == null) {\r\n return noValueString;\r\n }\r\n\r\n var momentDate = moment(value);\r\n if (momentDate.isValid()) {\r\n return momentDate.format(formatString);\r\n }\r\n else {\r\n console.error(\"Invalid date provided to date format value converter: \" + value);\r\n return \"\";\r\n }\r\n }\r\n\r\n ago(value) {\r\n let now = moment();\r\n let then = moment(value);\r\n if(now.diff(then, 'years') >= 1) {\r\n return `${now.diff(then, 'years')} years ago`;\r\n }\r\n if(now.diff(then, 'months') >= 1) {\r\n return `${now.diff(then, 'months')} months ago`;\r\n }\r\n if(now.diff(then, 'days') >= 1) {\r\n return `${now.diff(then, 'days')} days ago`;\r\n }\r\n if(now.diff(then, 'hours') >= 1) {\r\n return `${now.diff(then, 'hours')} hours ago`;\r\n }\r\n return `${now.diff(then, 'minutes')} minutes ago`;\r\n }\r\n}","//takes an option list and tries to resolve the key into its description from that list\nexport class DescriptionValueConverter {\n toView(value: any, optionList: any[], keyProp, descProp) {\n if (!value || !optionList || optionList.length == 0) {\n return \"\";\n }\n if (!keyProp) {\n keyProp = \"id\";\n }\n if (!descProp) {\n descProp = \"description\";\n }\n for (let option of optionList) {\n if (value == option[keyProp]) {\n return option[descProp];\n }\n }\n }\n}\n","export const DurationSignalUpdate: string = \"duration-signal\";\n\nexport class DurationValueConverter {\n signals = [DurationSignalUpdate];\n\n toView(value: Date) {\n if (!value) {\n return \"\";\n }\n\n const difference = this.calculateDifference(value);\n\n if(difference <= 1) {\n return \"just now\";\n } else if(difference <= 60 && difference >= 2) { // difference is under a minutes\n return difference + \" mins ago\"\n } else if(difference <= 1440 && difference >= 61) { // difference is under a hour\n return this.toHours(difference) + \" hours ago\"\n } else if(difference <= 43200 && difference >= 1441) { // difference is under a day\n return this.toDays(difference) + \" days ago\"\n } else if(difference <= 518400 && difference >= 43201) { // difference is under a month\n return this.toMonths(difference) + \" months ago\"\n } else if(difference >= 518401) { // difference is greater than a year\n return this.toYears(difference) + \" years ago\"\n }\n }\n \n private calculateDifference(value: Date) {\n var dt1 = new Date(value); \n var now = new Date();\n\n return this.timeDiff(dt1, now);\n }\n\n // get difference in minutes between to datetime \n private timeDiff(dt1: Date, dt2: Date) {\n // To calculate the time difference of two dates\n let diffTime = Math.abs((dt2.getTime() - dt1.getTime()) / (1000 * 60));\n\n return Math.round(diffTime);\n }\n\n // convert minutes to hours\n private toHours(minutes:number): number {\n let hour = Math.ceil(minutes / 60);\n\n return Math.round(hour);\n }\n\n // convert minutes to days\n private toDays(minutes:number) {\n let day = Math.ceil(minutes / (60 * 24));\n\n return Math.round(day);\n }\n\n // convert minutes to months\n private toMonths(minutes:number) {\n let month = Math.ceil(minutes / ((60 * 24) * 30));\n \n return Math.round(month);\n }\n\n // convert minutes to years\n private toYears(minutes:number) {\n let year = Math.ceil(minutes / ((60 * 24) * 30) * 12);\n \n return Math.round(year);\n }\n}","//this is for binding links to HREFs and avoiding them being treated as relative to the current site\nexport class EnsureHttpValueConverter {\n toView(value: string) {\n if (!value) { return value; }\n\n if(value.indexOf(\"https://\") > -1 || value.indexOf(\"http://\") > -1){\n return value;\n }\n return \"http://\" + value;\n }\n}\n","export class FileSizeValueConverter {\r\n toView(bytes: number) {\r\n if (bytes < 1024) {\r\n return bytes + 'bytes';\r\n } else if (bytes > 1024 && bytes < 1048576) {\r\n return (bytes / 1024).toFixed(1) + 'KB';\r\n } else if (bytes > 1048576) {\r\n return (bytes / 1048576).toFixed(1) + 'MB';\r\n }\r\n }\r\n}","\r\nexport class HighlightValueConverter {\r\n\r\n toView(value: string, textToHighlight: string) {\r\n if (!value) {\r\n return value;\r\n }\r\n if (!textToHighlight) {\r\n return value;\r\n }\r\n\r\n if (value.toLowerCase().indexOf(textToHighlight.toLowerCase()) >= 0) {\r\n var parts = this.splitAndKeepDelimiters(value, textToHighlight);\r\n for (var i = 0; i < parts.length; i++) {\r\n if (parts[i].toLowerCase() == textToHighlight.toLowerCase()) {\r\n parts[i] = `${parts[i]}`\r\n }\r\n }\r\n var result = parts.join(\"\");\r\n return result;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n splitAndKeepDelimiters(value:string, delimiter:string): string[] {\r\n var result = [];\r\n var start = 0, index;\r\n while ((index = value.toLowerCase().indexOf(delimiter.toLowerCase(), start)) != -1) {\r\n result.push(value.substr(start, index - start));\r\n result.push(value.substr(index, delimiter.length));\r\n start = index + delimiter.length;\r\n }\r\n result.push(value.substr(start));\r\n return result;\r\n }\r\n}","export class LengthValueConverter {\r\n toView(value: string, length: number = 100) {\r\n if (value == null) {\r\n return value;\r\n }\r\n if (value.length > length) {\r\n value = value.substring(0, length) + '...';\r\n }\r\n return value;\r\n }\r\n}\r\n","export class LowerCaseValueConverter {\n toView(value: string) {\n if (!value) {\n return \"\";\n }\n\n return value.toLowerCase();\n }\n}\n","// this is just a formatting feature to display website links without the protocol (http/https)\nexport class NoProtocolValueConverter {\n toView(value: string) {\n if (!value) { return value; }\n\n let index = value.indexOf(\"://\");\n if (index === -1) {\n return value;\n }\n\n return value.substr(index + 3, value.length - index - 2);\n }\n}\n","export class NumericValueConverter {\r\n fromView(value: string) {\r\n if (value == undefined || value == null || value == \"\") {\r\n return value;\r\n }\r\n return parseInt(value);\r\n }\r\n}\r\n","// note this is for formatting purposes *only*, not for security\r\nexport class StripHtmlValueConverter {\r\n toView(value: string) {\r\n if (value == null) { return value; }\r\n var tmp = document.createElement(\"DIV\");\r\n tmp.innerHTML = value;\r\n return tmp.textContent || tmp.innerText || \"\";\r\n }\r\n}\r\n","export class SynopsisValueConverter {\n toView(value: string, stringCount: number = 50): string {\n if (value === null || value === undefined) { return value; }\n //strip out any other formatting\n let trimmedString = value.substring(0, stringCount);\n let valueStringCount = value.length;\n\n if(valueStringCount > stringCount) {\n trimmedString = trimmedString + \"...\";\n }\n \n return trimmedString;\n }\n}","import { toTitleCase } from \"shared/utils/to-title-case\";\n\nexport class TitleCaseValueConverter {\n toView(value: string) {\n if (!value) {\n return \"\";\n }\n return toTitleCase(value);\n }\n}\n","export class TruthyValueConverter {\r\n toView(value: boolean) {\r\n if (value == undefined)\r\n return value; \r\n return value ? \"true\" : \"false\";\r\n }\r\n\r\n fromView(value: string) {\r\n if (value == undefined)\r\n return value;\r\n return value == \"true\" ? true : false;\r\n }\r\n}\r\n","import { autoinject, computedFrom, PLATFORM } from \"aurelia-framework\";\r\nimport { Router, RouterConfiguration, NavigationInstruction, RedirectToRoute, RouteConfig, Next } from \"aurelia-router\";\r\n\r\nimport { Config } from \"./config/config\";\r\nimport { Dto } from \"./project/project\";\r\n\r\nimport { RequestHandler } from \"./services/request-handler\";\r\nimport { AuthManager } from \"./auth/auth-manager\";\r\nimport { Notifier } from \"./services/notifier\";\r\nimport { BreadcrumbService } from \"shared/controls/breadcrumb/breadcrumb-service\";\r\nimport { ProfileService } from \"services/profile-service\";\r\nimport { ROUTE_APPLICATIONS, ROUTE_GRANTS_DIRECTORY, ROUTE_VOUCHERS } from \"utils/router-constants\";\r\nimport { SupplierRoute } from \"grants/suppliers/supplier-router\";\r\n\r\n@autoinject\r\nexport class Shell {\r\n\r\n router: Router;\r\n environmentLabel: string = ReleaseInfo.environmentLabel;\r\n appVersion: string = ReleaseInfo.version;\r\n appLastUpdated: Date = ReleaseInfo.lastUpdated;\r\n\r\n constructor(private notifier: Notifier,\r\n private breadCrumbService: BreadcrumbService//No not remove this. Its needed here so that the service can be set up and listen to the first route event. \r\n ) {\r\n\r\n breadCrumbService.homeRoute = Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome];\r\n }\r\n\r\n attached() {\r\n //todo: can probably be replaced by an event published by event aggregator to tell the notifier that aurelia has loaded an initial page.\r\n this.notifier.viewLoaded();\r\n }\r\n\r\n @computedFrom(\"router.isNavigating\", \"this.router.currentInstruction.config.name\")\r\n get showNavLoader(): boolean {\r\n return this.router.isNavigating\r\n && this.router.currentInstruction.config.name !== Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome];\r\n }\r\n\r\n configureRouter(config: RouterConfiguration, router: Router) {\r\n\r\n var layoutView = PLATFORM.moduleName(\"layouts/default-layout.html\"); // has to be relative to src/\r\n var layoutViewModel = PLATFORM.moduleName(\"layouts/default-layout\"); // has to be relative to src/\r\n\r\n config.title = Config.appName;\r\n config.options.pushState = true;\r\n\r\n config.addPipelineStep('authorize', GrantsAuthorizeStep);\r\n config.addPipelineStep('postRender', GrantsPostNavigationRender);\r\n\r\n // put all top level routes in a variable so we can easily convert sub-routes to top level routes\r\n // might be also a good idea to break this huge list of routes to their individual folders\r\n let rts = (([\r\n {\r\n route: [\"\", \"welcome\"],\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome],\r\n nav: false,\r\n //title: \"GrantsNT\",\r\n moduleId: PLATFORM.moduleName(\"./welcome\", \"grants-directory\"),\r\n settings: {\r\n auth: false\r\n }\r\n },\r\n {\r\n name: ROUTE_GRANTS_DIRECTORY,\r\n route: \"grants\",\r\n nav: true,\r\n title: \"Search\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./grants/router\", \"grants-directory\"),\r\n settings: {\r\n breadcrumb: true,\r\n //parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome],\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.FAQ],\r\n route: \"/help/FAQ\",\r\n nav: false,\r\n title: \"Frequently Asked Questions\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/FAQ\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.HelpIntroduction],\r\n route: \"/help/introduction\",\r\n nav: false,\r\n title: \"GrantsNT Introduction\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/introduction\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n //Help Setup Section\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n route: \"/help/setupAccount\",\r\n nav: false,\r\n title: \"Setup Account\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/setup/setupLanding\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n // {\r\n // name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.AccountRegistration],\r\n // route: \"/help/accountRegistration\",\r\n // nav: false,\r\n // title: \"Account Registration\",\r\n // layoutView: layoutView,\r\n // layoutViewModel: layoutViewModel,\r\n // moduleId: PLATFORM.moduleName(\"./help/help/setup/accountRegistration\", \"grants-directory\"),\r\n // settings: {\r\n // parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n // breadcrumb: true,\r\n // auth: false\r\n // }\r\n // },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageProfileAccess],\r\n route: \"/help/manageProfileAccess\",\r\n nav: false,\r\n title: \"Manage profile access\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/setup/manageProfileAccess\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.CreateManageOrgAccess],\r\n route: \"/help/createOrganisationProfile\",\r\n nav: false,\r\n title: \"Create organisation profile\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/setup/createOrgProfile\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.OrgUserAccess],\r\n route: \"/help/orgUserAccess\",\r\n nav: false,\r\n title: \"Organisation user access\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/setup/orgUserAccess\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.JoinAnOrg],\r\n route: \"/help/joinAnOrganisation\",\r\n nav: false,\r\n title: \"Joining an organisation\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/setup/joinAnOrg\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SetupAccount],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n //Apply for grant section\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantApplication],\r\n route: \"/help/grantApplications\",\r\n nav: false,\r\n title: \"Apply for Grant\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/applyForGrant/applyForGrantLanding\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantSearch],\r\n route: \"/help/grantSearching\",\r\n nav: false,\r\n title: \"Search NTG Grants\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/applyForGrant/grantSearch\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantApplication],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantEnquiry],\r\n route: \"/help/grantEnquiry\",\r\n nav: false,\r\n title: \"Enquire on a Grant\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/applyForGrant/grantEnquiry\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantApplication],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Subscription],\r\n route: \"/help/grantSubscriptions\",\r\n nav: false,\r\n title: \"Subscription\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/applyForGrant/grantSubscription\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantApplication],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.SubmitApplication],\r\n route: \"/help/applyForGrant\",\r\n nav: false,\r\n title: \"Apply for a grant\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/applyForGrant/applyForGrant\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.GrantApplication],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n //Manage Grants\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n route: \"/help/manageGrants\",\r\n nav: false,\r\n title: \"Manage Grant\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/manageGrantLanding\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ApplicationManagement],\r\n route: \"/help/applicationManagement\",\r\n nav: false,\r\n title: \"Application Management\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/applicationManagement\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ViewAwardedGrants],\r\n route: \"/help/viewAwardedGrants\",\r\n nav: false,\r\n title: \"Application Management\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/viewAwarded\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Reports],\r\n route: \"/help/reporting\",\r\n nav: false,\r\n title: \"Reporting and acquittal\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/reporting\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.UpdateCorrespondence],\r\n route: \"/help/correspondence\",\r\n nav: false,\r\n title: \"Correspondence\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/correspondence\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n }, {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ROI],\r\n route: \"/help/requestForInformation\",\r\n nav: false,\r\n title: \"Agency Requests for Information\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/manageGrant/roi\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageGrant],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n //Computer help\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.PasswordAndComputerProblems],\r\n route: \"/help/PasswordAndComputerProblems\",\r\n nav: false,\r\n title: \"Password and Computer Problems\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help/compHelp/compHelp\", \"grants-directory\"),\r\n settings: {\r\n parent: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.OrganisationInviteAccept],\r\n route: \"profile/organisation-invite/:organisationUserId/accept/:token\",\r\n nav: false,\r\n title: \"Organisation Invite\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./profile/organisation/invite-response\", \"org-invite\"),\r\n settings: {\r\n acceptingInvite: true,\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.OrganisationInviteReject],\r\n route: \"profile/organisation-invite/:organisationUserId/reject/:token\",\r\n nav: false,\r\n title: \"Organisation Invitation\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./profile/organisation/invite-response\", \"org-invite\"),\r\n settings: {\r\n acceptingInvite: false,\r\n breadcrumb: true\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login],\r\n route: \"login\",\r\n nav: false,\r\n title: \"Login\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./login-registration/login\", \"login-registration\"),\r\n settings: {\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.RegisterRequest],\r\n route: \"register-request\",\r\n nav: false,\r\n title: \"Register\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./login-registration/register-request\", \"login-registration\"),\r\n settings: {\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Register],\r\n route: \"register\",\r\n nav: false,\r\n title: \"Register\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-registration/registration/registration\", \"login-registration\"),\r\n settings: {\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.RecoverPassword],\r\n route: \"recover-password\",\r\n nav: false,\r\n title: \"Recover Password\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./login-registration/recover-password\", \"login-registration\"),\r\n settings: {\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n /* {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Register],\r\n route: \"register/:registrationCode\",\r\n nav: false,\r\n title: \"Registration\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./login-registration/register\", \"login-registration\"),\r\n settings: { breadcrumb: true }\r\n }, */\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ResetPassword],\r\n route: \"reset-password/:id\",\r\n nav: false,\r\n title: \"Reset Password\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-management/password-reset\", \"login-registration\"),\r\n settings: { breadcrumb: true }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ProfileSelect],\r\n route: \"profile-select\",\r\n nav: false,\r\n title: \"Select Profile\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./login-registration/profile-select\", \"login-registration\"),\r\n settings: { breadcrumb: true }\r\n },\r\n // NOTE: this doesn't appear to have any effect anymore, route is duplicated and the other takes precedence (because aurelia and reasons)\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageAccount],\r\n route: \"account\",\r\n nav: false,\r\n title: \"Manage Account\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-management/manage\", \"profile-management\"),\r\n settings: { breadcrumb: true }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ManageAccountChangeUsernameConfirm],\r\n route: \"confirm-new-username/:token\",\r\n nav: false,\r\n title: \"Confirm New Username\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-management/manage-account/confirm-new-username\", \"profile-management\"),\r\n settings: {}\r\n },\r\n {\r\n route: ['change-password'], \r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ChangePasswordRequired],\r\n moduleId: PLATFORM.moduleName(\"./login-registration/change-password\"),\r\n title: \"Change password\",\r\n nav: false,\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n settings: {\r\n breadcrumb: true,\r\n auth: true\r\n }\r\n },\r\n {\r\n name: ROUTE_APPLICATIONS,\r\n route: \"manage\",\r\n nav: true,\r\n title: \"Applications\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./manage/manage\", \"applications\"),\r\n settings: {\r\n breadcrumb: false, auth: true\r\n }\r\n },\r\n {\r\n name: ROUTE_VOUCHERS,\r\n route: \"vouchers\",\r\n nav: true,\r\n title: \"Vouchers\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"vouchers/router\", \"vouchers\"),\r\n settings: {\r\n breadcrumb: false, auth: true\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.AssessorInviteAccept],\r\n route: \"profile/assessor-invite/:externalAssessorId/accept/:token\",\r\n nav: false,\r\n title: \"Assessor Invitation\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-management/assessor/assessor-invite-response\", \"assessor-invite\"),\r\n settings: {\r\n acceptingInvite: true\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.AssessorInviteDecline],\r\n route: \"profile/assessor-invite/:externalAssessorId/decline/:token\",\r\n nav: false,\r\n title: \"Assessor Invitation\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./account-management/assessor/assessor-invite-response\", \"assessor-invite\"),\r\n settings: {\r\n acceptingInvite: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualProfile],\r\n route: \"account\",\r\n nav: false,\r\n title: \"My account\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"profile/individual/detail\"),\r\n settings: { breadcrumb: true }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.OrganisationProfile],\r\n route: \"profile/organisation/:organisationId\",\r\n nav: false,\r\n title: \"Organisation Profile\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"profile/organisation/organisation-profile\", \"organisation-management\"),\r\n settings: { breadcrumb: true, create: true }\r\n },\r\n {\r\n name: \"Assessments\",\r\n route: \"assessments\",\r\n nav: false,\r\n title: \"Assessments\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"assessments/assessments\"),\r\n settings: { breadcrumb: true, create: true }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Help],\r\n route: \"help\",\r\n nav: true,\r\n title: \"Help\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"./help/help\", \"grants-directory\"),\r\n settings: {\r\n breadcrumb: true,\r\n auth: false\r\n }\r\n },\r\n {\r\n name: Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.IndividualSubscriptions],\r\n route: \"profile/subscriptions\",\r\n nav: false,\r\n title: \"Subscriptions\",\r\n layoutView: layoutView,\r\n layoutViewModel: layoutViewModel,\r\n moduleId: PLATFORM.moduleName(\"profile/subscriptions\"),\r\n settings: { breadcrumb: true, create: true }\r\n },\r\n \r\n ]));\r\n\r\n rts = rts.concat(SupplierRoute);\r\n\r\n config.map(rts);\r\n\r\n config.mapUnknownRoutes('./welcome');\r\n config.fallbackRoute('');\r\n this.router = router;\r\n }\r\n}\r\n\r\n@autoinject\r\nclass GrantsAuthorizeStep {\r\n\r\n constructor(\r\n private readonly requestHandler: RequestHandler,\r\n private readonly authManager: AuthManager,\r\n private readonly profileService: ProfileService,\r\n private readonly router: Router,\r\n private readonly notifier: Notifier) {\r\n }\r\n\r\n run(navigationInstruction: NavigationInstruction, next: Next): Promise {\r\n this.requestHandler.nextRouteInstruction = navigationInstruction;\r\n\r\n var currentRoute = navigationInstruction.fragment;\r\n var queryString = navigationInstruction.queryString;\r\n\r\n if (!navigationInstruction.config.settings) {\r\n return next();\r\n }\r\n\r\n // Removed this, we will need to check everytime when the user is login and needs to change password\r\n // the code below by pass that process if a page do not require auth\r\n // if (navigationInstruction.config.settings.auth === false) {\r\n // return next();\r\n // }\r\n\r\n if (navigationInstruction.config.settings.auth === true && !this.authManager.isLoggedIn) {\r\n this.notifier.warning(\"You need to log in to view this page.\");\r\n return next.cancel(new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString }));\r\n }\r\n\r\n return this.profileService.getActiveProfile().then((profile) => {\r\n if (this.authManager.isLoggedIn\r\n && profile.profileAccountStatus == Dto.Constants.AccountStatus.ChangePassword \r\n && navigationInstruction.config.name != Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ChangePasswordRequired]) { \r\n this.notifier.error(\"Password change required\");\r\n return next.cancel(new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.ChangePasswordRequired]))\r\n }\r\n \r\n if (profile != null && profile.profileType == \"Organisation\") {\r\n var canAccess = true;\r\n var navigation = navigationInstruction.getAllInstructions();\r\n\r\n navigation.some((item) => {\r\n var page = Dto.Constants.ExternalPageRoutes[item.config.name];\r\n if (page != null && profile.allowedRoutes && profile.allowedRoutes.indexOf(page) == -1) {\r\n canAccess = false;\r\n return true;\r\n }\r\n });\r\n\r\n if (!canAccess) {\r\n if (this.authManager.isLoggedIn) {\r\n this.notifier.error(\"An unexpected error occurred while loading the page.\");\r\n return next.cancel(new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Welcome]));\r\n } else {\r\n this.notifier.clear();\r\n this.notifier.error('Your session has expired and you will need to login again');\r\n return next.cancel(new RedirectToRoute(Dto.Constants.ExternalPageRoutes[Dto.Constants.ExternalPageRoutes.Login], { redirect: currentRoute, q: queryString }));\r\n }\r\n } else {\r\n return next();\r\n }\r\n } else {\r\n return next();\r\n }\r\n });\r\n }\r\n}\r\n\r\nclass GrantsPostNavigationRender {\r\n run(navigationInstruction: NavigationInstruction, next: Next) {\r\n\r\n //some jQuery to hide the main nav collapse when navigation completes. Otherwise the user would have to do it\r\n var mainNavCollapseQuery = $(\"#main-nav-collapse\");\r\n if (mainNavCollapseQuery.length > 0) {\r\n var mainNavCollapse = mainNavCollapseQuery[0];\r\n if (mainNavCollapse.classList.contains(\"in\")) {\r\n mainNavCollapse.classList.remove(\"in\");\r\n }\r\n }\r\n\r\n //also scroll to the top of the page.\r\n window.scrollTo(0, 0);\r\n\r\n return next();\r\n }\r\n}\r\n","module.exports = \" \";"],"sourceRoot":""}