{"version":3,"sources":["Constants.tsx","Symbols.tsx","Models/CRUDOptions.tsx","Models/Store.tsx","Util/StringUtils.tsx","Validators/Util.tsx","Util/AttributeUtils.tsx","Util/EntityUtils.tsx","Util/GraphQLUtils.tsx","Models/Model.tsx","Views/Components/UserCRUD/UserService.tsx","Validators/Functions/Email.tsx","Validators/Functions/Integer.tsx","Validators/Functions/Length.tsx","Validators/Functions/Required.tsx","Validators/Functions/Unique.tsx","Models/Entities/User.tsx","Validators/Functions/Regex.tsx","Validators/Functions/Min.tsx","Models/Security/Acl/StaffActivityEntity.tsx","Models/Enums.tsx","Models/Security/Acl/SuperAdministratorScheme.tsx","Models/Entities/ActivityEntity.tsx","Models/Security/Acl/StaffContactEntity.tsx","Models/Entities/ContactEntity.tsx","Models/Security/Acl/StaffContactEmailEntity.tsx","Models/Entities/ContactEmailEntity.tsx","Models/Security/Acl/StaffDealEntity.tsx","Models/Entities/DealEntity.tsx","Models/Security/Acl/StaffEventEntity.tsx","Models/Security/Acl/VisitorsEventEntity.tsx","Models/Entities/EventEntity.tsx","Models/Security/Acl/StaffOrganisationEntity.tsx","Models/Entities/OrganisationEntity.tsx","Models/Security/Acl/StaffPipelineEntity.tsx","Models/Entities/PipelineEntity.tsx","Models/Security/Acl/StaffStaffEntity.tsx","Validators/Functions/Custom.tsx","Models/Entities/StaffEntity.tsx","Models/Security/Acl/StaffStageEntity.tsx","Models/Entities/StageEntity.tsx","Models/Entities/TrustedSourceEntity.tsx","Models/Entities/ContactTimelineEventsEntity.tsx","Models/Entities/DealTimelineEventsEntity.tsx","Models/Entities/OrganisationTimelineEventsEntity.tsx","Models/Security/Acl/StaffContactsReferenceManyToMany.tsx","Views/Components/Button/Button.tsx","Models/Entities/OrganisationsContacts.tsx","Models/Security/Acl/StaffDealsReferenceManyToMany.tsx","Models/Entities/StagesDeals.tsx","Views/Components/If/If.tsx","Views/Components/Button/ButtonGroup.tsx","Views/Components/Models/Enums.tsx","Views/Components/Inputs/InputWrapper.tsx","Views/Components/Tooltip/Tooltip.tsx","Views/Components/Helpers/InputsHelper.tsx","Views/Components/DateTimePicker/DateTimePicker.tsx","Views/Components/DateRangePicker/DateRangePicker.tsx","Views/Components/Collection/CollectionFilterAttributes/FilterDateRangePicker.tsx","Views/Components/Spinner/Spinner.tsx","Views/Components/Combobox/Combobox.tsx","Views/Components/Pagination/Pagination.tsx","Views/Components/Combobox/MultiCombobox.tsx","Views/Components/Collection/CollectionFilterAttributes/FilterEnumComboBox.tsx","Views/Components/Collection/CollectionFilterPanel.tsx","Views/Components/TextBox/TextBox.tsx","Views/Components/SearchForm/SearchForm.tsx","Views/Components/Collection/CollectionMenu.tsx","Views/Components/Checkbox/Checkbox.tsx","Views/Components/PageWrapper/BodyContent.tsx","Views/Components/ContextMenu/ContextMenu.tsx","Views/Components/EntityContextMenu/EntityContextMenu.tsx","Views/Components/Collection/CollectionRow.tsx","Views/Components/Collection/CollectionHeaders.tsx","Views/Components/Collection/Collection.tsx","Views/Components/ModelCollection/ModelQuery.tsx","Models/PaginationData.tsx","Services/SecurityService.tsx","Views/Components/Modal/ModalUtils.tsx","Util/ToastifyUtils.tsx","Views/Components/CRUD/EntityCollection.tsx","Views/Components/CRUD/FormErrors.tsx","Util/IterableUtils.tsx","Views/Components/Form/Form.tsx","Views/Components/Helpers/Common.tsx","Views/Components/CRUD/Attributes/AttributeTextField.tsx","Views/Components/TextArea/TextArea.tsx","Views/Components/CRUD/Attributes/AttributeTextArea.tsx","Views/Components/CRUD/Attributes/AttributeReferenceCombobox.tsx","Views/Components/DatePicker/DatePicker.tsx","Views/Components/CRUD/Attributes/AttributeDatePicker.tsx","Views/Components/TimePicker/TimePicker.tsx","Views/Components/CRUD/Attributes/AttributeTimePicker.tsx","Views/Components/CRUD/Attributes/AttributeCheckbox.tsx","Views/Components/Password/Password.tsx","Views/Components/CRUD/Attributes/AttributePassword.tsx","Views/Components/CRUD/Attributes/AttributeDisplayField.tsx","Views/Components/CRUD/Attributes/AttributeReferenceMultiCombobox.tsx","Views/Components/CRUD/Attributes/AttributeDateTimePicker.tsx","Views/Components/CRUD/Attributes/AttributeEnumCombobox.tsx","Views/Components/FileUpload/UploadPreview.tsx","Views/Components/FileUpload/FileUpload.tsx","Views/Components/CRUD/Attributes/AttributeFile.tsx","Views/Components/CRUD/Attributes/AttributeFactory.tsx","Views/Components/FieldSet/FieldSet.tsx","Views/Components/Navigation/Navigation.tsx","Views/Components/EntityFormLayout/EntityFormLayout.tsx","Views/Components/CRUD/EntityAttributeList.tsx","Views/Components/CRUD/EntityEdit.tsx","Views/Components/Security/SecuredAdminPage.tsx","Views/Components/CRUD/EntityCRUD.tsx","Views/Components/PageWrapper/PageWrapper.tsx","Views/Components/Security/SecuredPage.tsx","Views/Pages/Admin/Entity/ActivityEntityPage.tsx","Views/Pages/Admin/Entity/ContactEntityPage.tsx","Views/Pages/Admin/Entity/ContactEmailEntityPage.tsx","Views/Pages/Admin/Entity/DealEntityPage.tsx","Views/Pages/Admin/Entity/EventEntityPage.tsx","Views/Pages/Admin/Entity/OrganisationEntityPage.tsx","Views/Pages/Admin/Entity/PipelineEntityPage.tsx","Views/Pages/Admin/Entity/StaffEntityPage.tsx","Views/Pages/Admin/Entity/StageEntityPage.tsx","Views/Pages/Admin/Entity/TrustedSourceEntityPage.tsx","Views/Pages/Admin/Entity/ContactTimelineEventsEntityPage.tsx","Views/Pages/Admin/Entity/DealTimelineEventsEntityPage.tsx","Views/Pages/Admin/Entity/OrganisationTimelineEventsEntityPage.tsx","Views/Components/Auth/Auth.tsx","Views/Components/Modal/Modal.tsx","Views/Components/CRUD/UserList.tsx","Views/Pages/Admin/AllUsersPage.tsx","Views/Components/Card/Card.tsx","Views/Components/Card/CardGroup.tsx","Views/Pages/Admin/AdminPage.tsx","Views/Components/Topbar/Topbar.tsx","Views/Components/Navigation/NavigationLink.tsx","Views/Components/Navigation/NavigationLinks.tsx","Views/Components/RadioButton/RadioButtonGroup.tsx","Views/Pages/Admin/PageLinks.tsx","Views/Components/Checkbox/CheckboxGroup.tsx","Views/Components/DateTimeRangePicker/DateTimeRangePicker.tsx","Util/TimelineUtils.tsx","Views/Components/Breadcrumbs/Breadcrumbs.tsx","Views/Components/NumberTextBox/NumberTextBox.tsx","Views/Components/Tabs/Tabs.tsx","Views/Pages/Admin/StyleguidePage.tsx","Timelines/Shared/TimelineTopBar.tsx","Timelines/TimelineListView/ListViewItems.tsx","Timelines/TimelineListView/ListViewList.tsx","Timelines/TimelineListView/ListViewControls.tsx","Util/FetchUtils.tsx","Timelines/TimelineListView/ListViewSidebar.tsx","Timelines/TimelineListView/TimelineListView.tsx","Timelines/TimelineGraphView/GraphViewControls.tsx","Timelines/TimelineGraphView/GraphViewSidebar.tsx","Timelines/TimelineGraphView/GraphViewItem.tsx","Timelines/TimelineGraphView/GraphViewGraph.tsx","Timelines/TimelineGraphView/TimelineGraphView.tsx","Timelines/TimelineTile.tsx","Views/Pages/Admin/Timelines/TimelinePage.tsx","Views/Admin.tsx","Views/Pages/LoginPage.tsx","Models/UserEntity.tsx","Views/Pages/RegistrationPage.tsx","Views/Pages/RegistrationConfirmPage.tsx","Views/Pages/ResetPasswordRequestPage.tsx","Views/Pages/ResetPasswordPage.tsx","Views/Components/Logout/Logout.tsx","Views/Pages/PageNotFound.tsx","Views/Pages/PageAccessDenied.tsx","Views/Frontend.tsx","Views/Components/Modal/GlobalModal.tsx","App.tsx","index.tsx"],"names":["SERVER_URL","APPLICATION_ID","validator","Symbol","validatorMap","attributes","references","crudOptions","modelName","displayName","crudId","fileAttributes","Symbols","AttributeCRUDOptions","attributeName","options","name","className","displayType","headerColumn","searchable","searchFunction","searchTransform","attr","query","inputProps","referenceResolveFunction","enumResolveFunction","optionEqualFunc","isJoinEntity","displayFunction","onAfterChange","fileAttribute","readFieldType","createFieldType","updateFieldType","disableDefaultOptionRemoval","referenceTypeFunc","isReadonly","groupId","order","this","CRUD","target","key","store","routerHistory","apolloClient","modal","undefined","user","id","email","groups","some","ug","hasBackendAccess","userResult","observable","computed","action","lowerCaseFirst","str","toLowerCase","slice","ErrorType","PropertyType","initValidators","Array","standardiseDate","momentDate","moment","isValid","year","hours","minutes","seconds","format","standardiseInteger","value","Number","isNaN","isInteger","standardiseString","extraOptions","case","standardiseUuid","match","standardiseEnum","enumOptions","enumKey","_","invert","getModelName","modelType","modelNameSymbol","getModelDisplayName","displayNameSymbol","getAttributeCRUDOptions","attributeDisplay","Object","entries","prototype","displayOptions","push","getAttributes","getFiles","map","f","a","conditions","axios","post","headers","result","blob","Blob","data","type","saveAs","getFetchAllQuery","expandString","useListExpands","model","modelsName","gql","join","files","listExpands","defaultExpands","getFetchAllConditional","lowerModelName","makeJoinEqualsFunc","field","modelProp","option","makeFetchManyToManyFunc","queryOptions","joinEntity","oppositeEntity","queryString","args","getSearchConditions","existingArg","path","comparison","negate","relationOppositeName","x","oppositeEntityName","fetchPolicy","variables","ids","skip","take","orderBy","then","serverData","flatMap","i","uuid","display","getDisplayName","existingRelations","existingEntity","find","o","makeFetchOneToManyFunc","union","fetch","existingData","relationName","unionBy","r","makeEnumFetchFunction","isRequired","required","maybeValidator","indexOf","getCreatedModifiedCrudOptions","AttrUtils","getTheNetworkError","response","networkError","getErrorMessages","errors","isArray","message","convertCaseComparisonToPascalCase","attribute","attributesSymbol","referencesSymbol","initAttributes","isReference","file","entity","Model","_clientId","getErrorsForAttribute","validationErrors","OWN","chain","keys","error","attributeGroups","assignAttributes","prop","REFERENCE","length","CHILDREN","childErrors","_created","date","utc","toDate","_modified","created","modified","that","promise","Promise","resolve","reject","co","results","validatorSymbol","all","ownErrorsArrray","filter","isEmpty","hasOwnProperty","ownErrors","reduce","errorType","errorMessage","errs","referencesToValidate","includes","reference","item","validate","childrenErrors","oneChildErrors","referenceErrors","runInAction","err","forEach","clearErrors","excludeCrudFields","replacer","json","pathKeys","allKeys","uniq","concat","excludeList","constructor","k","Date","toJSON","JSON","parse","stringify","startsWith","fileBlob","referenceKeys","referenceObj","operationName","queryName","__proto__","functionName","variableName","mutate","mutation","update","cache","assign","catch","fieldsToUpdate","relationPath","createOptions","updateOptions","contentType","beforeSave","jsonModel","jsonTransformFn","graphQlInputType","v","graphQlType","queryVariables","n","FormData","append","loc","source","body","method","url","formMode","save","searchTerm","trim","values","attributeOption","valid","search","filterConfig","filters","active","value1","value2","add","element","orderByField","expendString","apolloOptions","acls","excludeFromCreate","excludeFromUpdate","createUser","userJson","updateUser","put","deleteUser","delete","isEmail","INVALID","test","number","min","max","LENGTH","REQUIRED","EXISTS","Group","pattern","User","Validators","RANGE","RegExp","get","groupName","password","StaffActivityEntity","group","isVisitorAcl","activityTypeOptions","OTHER","LEGACY","TASK","EMAIL","CALL","MEETING","DEMO","FORM_SUBMISSION","LOGIN","GITLAB","PAYMENT","LESSON","COURSE","REFERRAL","LAUNCH","FREE_TRIAL","LINKEDIN","SOCIALS","FORUM","runStatusOptions","QUEUED","RUNNING","FAILED","SUCCESS","EXCEPTION","SuperAdministratorScheme","ActivityEntity","Enums","Models","description","metadata","fingerprintId","activityType","contactId","contact","dealId","deal","organisationId","organisation","createdAttr","modifiedAttr","StaffContactEntity","ContactEntity","entityName","getTimelineEventEntity","activitiess","contactEmailss","loggedEvents","organisationss","StaffContactEmailEntity","ContactEmailEntity","StaffDealEntity","DealEntity","stagess","StaffEventEntity","VisitorsEventEntity","EventEntity","status","payload","batchId","batchOrder","ipAddress","sourceId","StaffOrganisationEntity","OrganisationEntity","dealss","contactss","StaffPipelineEntity","PipelineEntity","unnamedEntity1ss","validatorName","validatorFunction","StaffStaffEntity","StaffEntity","e","_confirmPassword","Error","StaffStageEntity","StageEntity","sortOrder","pipelineId","pipeline","TrustedSourceEntity","eventss","ContactTimelineEventsEntity","actionTitle","entityId","DealTimelineEventsEntity","OrganisationTimelineEventsEntity","Display","Colors","Sizes","Widths","QuickTypes","StaffContactsReferenceManyToMany","OrganisationsContacts","organisationsId","contactsId","organisations","contacts","StaffDealsReferenceManyToMany","StagesDeals","stagesId","dealsId","stages","deals","If","observer","props","condition","children","React","Alignment","Sizing","Button","icon","iconPos","quickTypes","colors","sizes","widths","disabled","clazz","onClick","buttonProps","labelVisible","classNames","aria-label","defaultProps","Primary","DisplayType","InputType","LabelPositions","ButtonGroup","innerProps","classes","alignment","sizing","Tooltip","content","InputWrapper","setFocusClass","focused","setHoverClass","isHovered","setTooltipClass","tooltip","isInputGroup","wrapperId","inputType","label","inputId","staticInput","subDescription","tooltipId","subDescriptionId","labelPostion","position","BEFORE","requiredMark","labelNode","htmlFor","text","BLOCK","labelText","Errors","idx","tooltipNode","subDescriptionNode","onFocus","onBlur","onBlue","onMouseEnter","handleHover","onMouseLeave","AFTER","event","InputsHelper","DateTimePicker","_input","valueWhenFocused","flatpickr","fieldId","ariaLabel","ariaDescribedby","getAriaDescribedBy","modelProperty","isEditable","isDisabled","isReadOnly","aria-describedby","onReady","dates","currentDateString","self","calendarContainer","classList","appLocation","flatpickerOptions","flatpickrOptions","placeholder","onChange","flatpickrProps","allowInput","enableTime","maxDate","minDate","mode","noCalendar","time_24hr","humanFriendly","altInput","dateFormat","altFormat","autoFocus","focus","toString","DATE","onChangeAndBlur","DateRangePicker","FilterDateRange","context","setDefaultValue","dateRange","classnames","Spinner","validPageOptions","Combobox","_reFetch","getOptionValue","inputName","ref","reFetch","minSearchLength","SyncCombobox","optionResults","loading","clearable","isClearable","AsyncCombobox","lastSearchQuery","searchOptions","initialOptions","partial","onSearchSuccess","onSearchFail","initialRequestState","onSearchChange","searchQuery","requestState","minCharacters","initial","console","InnerCombobox","isFixed","as","omit","data-id","multiple","optionsEqual","selected","Dropdown","selection","selectedItem","renderLabel","index","defaultLabelProps","Label","onRemove","MultiCombobox","styles","FilterEnumComboBox","CollectionFilterPanel","onFilterChanged","onApplyFilter","onClearFilter","HORIZONTAL","removeClearFilter","Outline","removeApplyFilter","Solid","TextField","clickToClear","inputClassName","readOnly","onClickToClear","defaultToUndefined","SearchForm","onSubmit","preventDefault","classNameSuffix","role","extraNodes","CollectionMenu","onSearchButtonClick","onSearchTriggered","totalSelectedItems","selectedBulkActions","additionalActions","bulkActionsBtnGroup","bulkActionButtons","actIdx","showIcon","buttonClass","bulkAction","selectedItems","hasFilter","showFilter","renderAdditionalActions","filterOrientationRow","showSelectAll","pagination","onSelectAll","Text","totalRecords","cancelAllSelection","Pagination","firstPage","gotoPage","previousPage","page","nextPage","lastPage","totalPages","onGoToPageFormSubmit","parseInt","pageTextBoxModel","pageNo","validPage","isValidPage","HIGH","LOW","onPageChange","VALID","renderFirstButton","renderPreviousButton","renderNextButton","renderLastButton","isFirstPage","noNextPage","noPreviousPage","isLastPage","showGoToPageBox","perPage","Math","ceil","Checkbox","CHECKBOX","onChecked","checked","onAfterChecked","BodyContentContext","isItemGroup","ContextMenu","menuRef","oldParent","onScroll","current","hide","addScrollListener","parent","addEventListener","throttle","throttleTime","passive","removeScrollListener","el","removeEventListener","getSubMenu","subActions","parentItemKey","menuItem","itemKey","menuItemNode","groupItem","customItem","arrow","actions","handleContextMenu","contextMenu","show","menuId","parentElement","menuItems","location","contextType","EntityContextMenu","tranformAction","addEntityProps","newOnClick","onEntityClick","CollectionRow","moreMenuRef","expandAction","expanded","colSpanOffset","selectableItems","colSpan","columns","column","itemIdx","displayValue","transformItem","nullValue","actionButtons","customButton","expandButton","showExpandButton","actionsMore","keyValue","prefixedDataFields","dataFields","idColumn","expandDom","CollectionHeaders","renderSelectAllCheckbox","header","scope","sortClicked","sortable","descending","headerName","allChecked","onCheckedAll","checkboxDisplayType","INLINE","Collection","hidePagination","list","collectionId","expandList","row","collection","isEqual","onRowChecked","hideHeaders","selectItems","checkAllPages","onCheckedAllPages","getSelectedItems","_selectedItems","computedHeader","intersectionWith","menuCountFunction","totalItems","selectedItemsCount","data-selected-count","data-total","menuFilterConfig","items","itemSelectionChanged","pullAllWith","checkedItem","ModelQuery","fetchAllQuery","notifyOnNetworkStatusChange","customQuery","constructVariables","orderByProp","getDisplayAttribute","PaginationQueryOptions","SecurityService","acl","canRead","userGroups","canCreate","canUpdate","canDelete","confirmModal","title","onCancel","confirmText","cancelText","confirmDom","onRequestClose","alert","errorMsg","toast","EntityCollection","models","renderCollection","refetch","tableHeaders","getHeaders","tableActions","getTableActions","dataModelName","countName","security","create","renderCreateButton","disableBulkExport","exportItems","disableBulkDelete","idsToDelete","allPagesSelected","idsCondition","allExcludedItemIds","allSelectedItemIds","deleteWhere","additionalBulkActions","ba","mapBulkAction","paginationQueryOptions","collectionProps","headerAttributes","getFilters","additionalFilters","removeCreatedFilter","removeModifiedFilter","enumFilters","getEnumFilters","rootFn","collectionFilters","andCondition","orCondition","exportAll","viewAction","updateAction","deleteAction","additionalTableActions","updateTableActions","override","defaultAction","read","history","pathname","defaultOrderBy","getOrderByField","disableCreateButtonSecurity","disableReadButtonSecurity","disableUpdateButtonSecurity","disableDeleteButtonSecurity","filterConditions","filterApplied","getFilterConditions","_orderBy","createAction","modelDisplayName","changedIds","changedItems","m","FormErrors","detailedErrors","displayErrors","showDetailedErrors","isObject","obj","arr","call","safeLookup","lookup","apply","EntityFormMode","AttributeFormMode","Form","actionGroups","cancelButton","Medium","submitButton","node","AttributeTextField","TextArea","textAreaInput","TEXTAREA","textAreaProps","AttributeTextArea","AttributeReferenceCombobox","resolveFunc","referenceType","dataReturnName","fetchReferenceEntity","fetchOptions","associatedObjects","d","existingValue","comboOptions","setInternalOptions","getOptions","AwesomeDebouncePromise","internalOptions","DatePicker","AttributeDatePicker","TimePicker","AttributeTimePicker","AttributeCheckbox","Password","PASSWORD","AttributePassword","autoComplete","AttributeDisplayField","AttributeReferenceMultiCombobox","_defaultOptions","mutateOptions","joinProp","defaultOptions","substring","getInitialOption","state","AttributeDateTimePicker","AttributeEnumCombobox","UploadPreview","imagePreview","FileUploadPreview","loadFile","reader","FileReader","onload","onImageLoaded","readAsDataURL","prevProps","base64File","fileName","onDelete","fileUrl","FileName","download","rel","href","ImagePreview","src","alt","FilePreview","FileUpload","inputRef","validateContentType","types","acceptType","split","endsWith","specialType","replace","setFile","onDragOver","click","preview","disableDelete","clearFile","imageUpload","errorsProp","internalErrors","disableDropArea","buttonText","instance","style","aria-hidden","accept","isBeingHovered","onDragEnter","onDragLeave","onDrop","warn","onAfterDelete","dataTransfer","AttributeFile","initialFileId","fileId","Axios","onFetchSucceeded","VIEW","EDIT","imageOnly","fileMetadata","setFileName","getAttributeComponent","attributeOptions","CREATE","Orientation","FieldSet","EntityFormLayout","getAttributeViewMode","viewMode","attributeBehaviours","attributeBehaviour","behaviour","HIDE","attrGroup","attrs","camelCase","showName","sort","b","onAttributeAfterChange","onAttributeChangeAndBlur","attributeGroup","getOneFieldSet","EntityAttributeList","validationPath","hasSubmittedOnce","renderEntityFormLayout","customRelationPath","hasValidationError","saveFromCrud","actionDone","log","redirect","goBack","code","detailedError","setErrors","onEdit","_generalFormError","customFields","sectionClassName","generalFormError","detailedFormError","generalError","fieldErrors","EntityEdit","inject","getFetchSingleQuery","params","SecuredAdminPage","canDo","to","EntityCRUD","URLExtension","renderEntityCollection","routeProps","collectionViewAction","collectionCreateAction","collectionUpdateAction","collectionDeleteAction","entityCollectionProps","renderEntityCreate","renderEntityEdit","renderEntityView","collectionComponent","createComponent","editComponent","viewComponent","exact","render","pageProps","PageWrapper","SecuredPage","ActivityEntityPage","contents","ContactEntityPage","ContactEmailEntityPage","DealEntityPage","EventEntityPage","OrganisationEntityPage","PipelineEntityPage","StaffEntityPage","StageEntityPage","TrustedSourceEntityPage","ContactTimelineEventsEntityPage","DealTimelineEventsEntityPage","OrganisationTimelineEventsEntityPage","Auth","loggedIn","onSuccess","onError","redirectLocation","checkOnly","setLoggedInUser","onAfterSuccess","clearLoggedInUser","onAfterError","modalElement","document","getElementById","Modal","overlayClassName","portalClassName","appElement","isOpen","onAfterOpen","contentLabel","shouldCloseOnEsc","shouldCloseOnOverlayClick","aria","live","modalProps","userTypes","UserList","sortParams","fetchData","PaginationOptions","urlParams","SearchConditions","searchParams","SortConditions","setData","discriminator","renderCreateModal","modalState","open","renderModalCombobox","userSelected","onCancelModal","userTypeSelected","selectedUser","getModalUserOptions","userOptions","u","userCollectionHeaders","onSort","emailConfirmed","renderDeactivateUserModal","activateModalState","setActivateUserModalState","activate","activateUser","deactivateUser","Username","updateEmailConfirmed","resetPassword","onResetPasswordSuccess","PageNo","PageSize","onOpenModal","users","countUsers","AllUsersPage","Card","window","rounded","iconOnly","Component","CardGroup","layout","AdminPage","Topbar","buttonLink","currentLocation","NavigationLink","liRef","isActive","matchPath","handleDocumentClick","subLinks","subLinksFilter","routerProps","subLinksNode","isParent","ulClazz","subLinksExpanded","links","textNode","customComponent","useATag","contains","lastElementChild","NavigationLinks","htmlLinks","link","shouldDisplay","RadioAlignment","Navigation","getOrientationClassName","orientation","VERTICAL","alwaysExpanded","linkGroups","navClassName","navCollapsed","onClickNavCollapse","getPageLinks","isMember","PageLinks","getAdminNavLinks","userLinks","entityLinks","entityLinkGroup","otherlinkGroup","bottomlinkGroup","CheckboxAlignment","RadioButtonGroup","RADIO","uuidKey","defaultChecked","DateTimeRangePicker","QuickJumpTimeFrame","CheckboxGroup","aria-live","Breadcrumbs","getTagNode","tag","isHomeTag","isCurrentTag","tags","NumberTextField","modelProps","modelValue","stringValue","allErrors","textValue","numberValue","acceptWholeNumbersOnly","TabHeader","onTabClicked","tabState","currentTab","tabIdx","tabChanged","Tabs","defaultTab","tabs","tab","component","StyleguidePage","modelEmpty","isMulti","getDate","Secondary","Success","Warning","Small","Large","GROW","collectionData","collectionSearch","firstOpen","alertDom","alertModal","autoClose","range","TimelineEntities","GroupEventsByDate","events","groupBy","SortEvents","CompareDateString","dateA","getTime","getTimelineEntityFromName","getTimelineActionOptions","timelineEntity","eventEntityName","getEventEntityNameFromTimelineEntity","getTimelineQueryWhereConditions","timelineFilter","eventEntityModel","selectedTimelineEntity","searchConditions","initialSearchConditions","startDate","endDate","selectedActionTypes","instanceIds","getActionShapeClassName","getQuickJumpConditional","TimelineTopBar","fetchInstanceOptions","timelineFilterClone","getAdvancedFilters","showAdvancedFilters","entityOptionsDropDown","timelineEntityOptions","canChangeTimelineEntity","timelineEntityConfiguration","onChangeEntity","findIndex","label-visible","actionTypeOptions","cloneDeep","selectedTimelineEntityName","ListViewItems","dateGroupedEvents","timelineEvents","dateGroupKeys","counter","eventComponent","eventComponentsRefs","onClickViewItem","scrollSectionRef","listHeadingRefs","groupDate","isSame","subtract","GetTimelineGroupDateDisplay","onEnter","waypoint","onScrollToExtreme","ListViewList","createRef","scrollCorrectionSettings","doScrollCorrection","scrollHeightOffset","targetEventIndex","scrollCorrectionType","disposerQuickJump","disposerFilter","updateComponent","loadingState","onQuickJump","quickJumpDate","scrollOffset","calculateScrollTotalOffset","scrollTo","orderedTimelineEvents","eventsAboveTarget","dateGroupedEventsAboveTarget","eventsAboveTargetTotalHeight","getBoundingClientRect","height","sum","numHeadingsAbove","marginHeight","getComputedStyle","valueOf","quickJumpBackToTop","fetchEvents","getQuickJumpTargetEvents","quickJumpToDate","sendQuickJumpQuery","endOf","preDateFilter","preDateSearchConditions","postDateFilter","postDateSearchConditions","argsPre","argsPost","orderByPre","orderByPost","processQuickJumpEventQueryResults","extremity","currentPosition","Waypoint","invisible","processInfiniteScrollDownwardsResults","previousPosition","above","processInfiniteScrollUpwardsResults","reaction","preAndPostEvents","preEvents","eventsPre","postEvents","eventsPost","uniqBy","prevTimelineEvents","scrollTop","ListViewTopBarControls","graphViewButton","hideGraphViewButton","formatConditionsForRest","ListViewQuickJumpSidebar","disposer","getQuickJumpOptions","timeFrame","timeFrameConfiguration","selectedTimeFrame","quickJumpOptions","formatQuickJumpOption","Months","Weeks","autorun","quickJumpTimeFrameOptions","TimelineListView","graphViewDisabledWarning","onSwitchToGraphView","graphViewDisabled","timelineViewDate","GraphViewControls","onJumpToToday","onZoomBackToDefault","onZoomIn","onZoomOut","onPanLeft","onPanRight","onSwitchToListView","GraphViewSidebar","fetchRecentEvents","recentEvents","typeOfChange","GraphViewItem","horizontalAxisDateItem","dateString","numberOfResults","graphViewEntry","dateTimeGroup","set","dateComponent","showDate","dateFormatString","firstResult","showInformation","windowTicks","graphWindowLimits","diff","positionalClassName","zoomToViewMoreComponent","onClickZoom","cardEvents","onClickViewInListView","dateItemInformation","GraphViewGraph","fetchTimelineEventsForCardDisplay","limits","timelineEventsForCardDisplay","fetchGraphData","timelineGroupDateQueryResults","getDateDisplayIndices","size","increment","round","displayIndices","getDateFormatString","dateDisplayIndices","hoursDiff","animationClassName","graphItem","onClickZoomItem","toggleGraphItemMoreInformationView","TimelineGraphView","prevMonthDate","now","fetchDefaultViewStartDate","setDefaultZoom","fetchedEntities","ticks","zoomInTickLimit","zoomOutTickLimit","startOf","TimelineTile","getActionOptions","loadingStatus","internalTimelineViewDate","disableGraphViewOnSmallScreenDetection","timelineFilterProps","width","innerWidth","onRouteToGraphView","replaceHistory","onRouteToListView","TimelinePage","routeToComponent","route","GraphiQlLazy","Admin","adminSwitch","AdminPages","setAppLocation","fallback","defaultLoginState","username","LoginPage","onLoginClicked","loginState","onForgottenPasswordClick","onLoginSuccess","errorMessages","UserFields","defaultRegistrationState","selectedRegisterType","modelToRegister","emailSending","emailSent","RegistrationPage","registerableEntities","getRegisterEntityAttributes","registrationState","bind","userEntityFactory","entityToRegister","resetRegistration","onLoginClick","displayMode","selectRegisterType","onTypeConfirmed","onCancelRegisterClicked","entityAttrs","registerNode","onSubmitRegisterClicked","onChangeUserType","startCase","emailSentMessageNode","submitRegister","userType","kebabCase","onRegistrationEmailSentSuccess","RegistrationConfirmPage","confirmEmailData","token","pageContent","onClickConfirm","confirmed","defaultResetRequestState","ResetPasswordRequestPage","onResetPasswordClicked","ResetRequestState","onCancelResetClicked","onResetPasswordSent","defaultResetPasswordState","confirmPassword","ResetPasswordPage","queryParams","resetPasswordState","onConfirmPasswordSent","errorMsgs","Logout","qry","PageNotFound","PageAccessDenied","Frontend","Pages","GlobalModal","defaultModalState","App","onApolloRequest","operation","setContext","Cookies","onApolloError","isServerError","statusCode","createBrowserHistory","ApolloClient","uri","request","configure","enforceActions","defineViewportHeight","vh","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MAAS5c,SAASC,eAAe,W","file":"static/js/main.b3332ef9.chunk.js","sourcesContent":["/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n\n// % protected region % [Override contents here] off begin\nexport const SERVER_URL = '';\n// % protected region % [Override contents here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport const APPLICATION_ID = \"dcc1d4d8-f8b9-42bd-a0f4-0444a649c276\";\n\nexport const validator: unique symbol = Symbol('Validators');\nexport const validatorMap: unique symbol = Symbol('Validator Map');\nexport const attributes: unique symbol = Symbol('Attributes');\nexport const references: unique symbol = Symbol('References');\nexport const crudOptions: unique symbol = Symbol('CRUDOptions');\nexport const modelName: unique symbol = Symbol('Model Name');\nexport const displayName: unique symbol = Symbol('Display Name');\nexport const crudId: unique symbol = Symbol('Crud Unique Id');\nexport const fileAttributes: unique symbol = Symbol('File Attributes');\n// % protected region % [Add any extra symbols here] off begin\n// % protected region % [Add any extra symbols here] end\n\nexport const Symbols = {\n\t'validator': validator,\n\t'validatorMap': validatorMap,\n\t'attributes': attributes,\n\t'references': references,\n\t'crudOptions': crudOptions,\n\t'modelName': modelName,\n\t'displayName': displayName,\n\t'crudId': crudId,\n\t'fileAttributes': fileAttributes,\n\t// % protected region % [Add extra symbols to the symbol map here] off begin\n\t// % protected region % [Add extra symbols to the symbol map here] end\n};","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { crudOptions } from 'Symbols';\nimport { Model } from './Model';\nimport { Comparators } from \"Views/Components/ModelCollection/ModelQuery\";\nimport { transformFunction } from 'Util/AttributeUtils';\n\nexport type displayType =\n\t'hidden' |\n\t'textfield' |\n\t'textarea' |\n\t'password' |\n\t'checkbox' |\n\t'form-data'|\n\t'workflow-data'|\n\t'datepicker' |\n\t'timepicker' |\n\t'datetimepicker' |\n\t'displayfield' |\n\t'enum-combobox'|\n\t'reference-combobox' |\n\t'reference-multicombobox' |\n\t'form-tile' |\n\t'file'\n\t// % protected region % [Add more display types here] off begin\n\t// % protected region % [Add more display types here] end\n\t;\n\nexport interface ICRUDOptions {\n\tname: string;\n\t/** Classname to render out to the DOM */\n\tclassName?: string;\n\t/** How to display the field on the crud form */\n\tdisplayType: displayType;\n\t/** Whether this is a header to be displayed in the crud list */\n\theaderColumn?: boolean;\n\t/** Is the column searchable */\n\tsearchable?: boolean;\n\t/** What graphql search function is used for the search */\n\tsearchFunction?: Comparators;\n\t/**\n\t * A function that takes the query and transforms it to a valid state for the search.\n\t * An example of this would be transforming dates into a format the server can understand.\n\t * If this function returns null then the search is not performed on this attribute.\n\t */\n\tsearchTransform?: transformFunction;\n\t/** Anonymous props for the attribute that is being used */\n\tinputProps?: {[key: string]: any};\n\t/** A function that can change the display of the element on the crud list */\n\tdisplayFunction?: (attribute: any, that: Model) => React.ReactNode;\n\tonAfterChange?: (model: Model) => void;\n\n\tfileAttribute?: string;\n\n\t// Reference Dropdown specific\n\treferenceTypeFunc?: () => {new (json?: {}): Model};\n\treferenceResolveFunction?: (search: string | string[], options: {model: Model}) => Promise>;\n\tenumResolveFunction?: Array<{display: string, value: string}>;\n\toptionEqualFunc?: (modelProperty: Model, option: string) => boolean;\n\t/**\n\t * Whether the reference to assign to the attribute is on a join field or is the entity\n\t */\n\tisJoinEntity?: boolean;\n\t/** Can default options be removed from the combobox */\n\tdisableDefaultOptionRemoval?: boolean;\n\n\treadFieldType?: displayType;\n\tcreateFieldType?: displayType;\n\tupdateFieldType?: displayType;\n\n\t/** The id of the attribute group which this attribute belongs to */\n\tgroupId?: number;\n\t/** The order of the attribute with the group which this attribute belongs to */\n\torder?: number;\n\t/** Whether this field is readonly in created and modified modes */\n\tisReadonly?: boolean;\n\t// % protected region % [Add more CRUD Option interface props here] off begin\n\t// % protected region % [Add more CRUD Option interface props here] end\n}\n\nexport class AttributeCRUDOptions implements ICRUDOptions {\n\tpublic name: string;\n\tpublic className?: string;\n\tpublic attributeName: string;\n\tpublic displayType: displayType;\n\tpublic headerColumn: boolean;\n\tpublic searchable: boolean;\n\tpublic searchFunction: Comparators;\n\tpublic searchTransform: transformFunction = (attr: string) => ({query: attr});\n\tpublic inputProps?: {[key: string]: any};\n\tpublic referenceResolveFunction?: (search: string | string[], options: {model: Model}) => Promise>;\n\tpublic enumResolveFunction?: Array<{display: string, value: string}>;\n\tpublic optionEqualFunc?: (modelProperty: any, option: any) => boolean;\n\tpublic isJoinEntity?: boolean = false;\n\tpublic displayFunction?: (attribute: any, that: Model) => React.ReactNode;\n\tpublic onAfterChange?: (model: Model) => void;\n\n\tpublic fileAttribute?: string;\n\n\tpublic readFieldType?: displayType;\n\tpublic createFieldType?: displayType;\n\tpublic updateFieldType?: displayType;\n\tpublic disableDefaultOptionRemoval?: boolean;\n\n\n\t// Reference Dropdown specific\n\tpublic referenceTypeFunc?: () => {new (json?: {}): Model};\n\tpublic isReadonly?: boolean = false;\n\t/** The id of the attribute group which this attribute belongs to */\n\tpublic groupId?: number;\n\t/** The order of the attribute with the group which this attribute belongs to */\n\tpublic order?: number;\n\t// % protected region % [Add more Attribute CRUD Option properties here] off begin\n\t// % protected region % [Add more Attribute CRUD Option properties here] end\n\n\tconstructor(attributeName: string, options: ICRUDOptions) {\n\t\tthis.attributeName = attributeName;\n\t\tthis.name = options.name;\n\t\tthis.className = options.className;\n\t\tthis.displayType = options.displayType;\n\t\tthis.headerColumn = !!options.headerColumn;\n\t\tthis.searchable = !!options.searchable;\n\t\tthis.referenceTypeFunc = options.referenceTypeFunc;\n\t\tthis.searchFunction = options.searchFunction || 'contains';\n\t\tthis.referenceResolveFunction = options.referenceResolveFunction;\n\t\tthis.enumResolveFunction = options.enumResolveFunction;\n\t\tthis.optionEqualFunc = options.optionEqualFunc;\n\t\tthis.isJoinEntity = options.isJoinEntity;\n\t\tthis.inputProps = options.inputProps;\n\t\tthis.displayFunction = options.displayFunction;\n\t\tthis.onAfterChange = options.onAfterChange;\n\t\tthis.disableDefaultOptionRemoval = options.disableDefaultOptionRemoval;\n\t\tif (options.searchTransform) {\n\t\t\tthis.searchTransform = options.searchTransform;\n\t\t}\n\n\t\tthis.readFieldType = options.readFieldType || options.displayType;\n\t\tthis.createFieldType = options.createFieldType || options.displayType;\n\t\tthis.updateFieldType = options.updateFieldType || options.displayType;\n\t\tthis.groupId = options.groupId;\n\t\tthis.order = options.order;\n\t\tthis.fileAttribute = options.fileAttribute;\n\t\tthis.isReadonly = options.isReadonly;\n\t\t// % protected region % [Add more Attribute CRUD Option constructor operations here] off begin\n\t\t// % protected region % [Add more Attribute CRUD Option constructor operations here] end\n\t}\n\n\tpublic get displayName() {\n\t\treturn this.name;\n\t}\n\n\t// % protected region % [Add more CRUD Option member functions here] off begin\n\t// % protected region % [Add more CRUD Option member functions here] end\n\n}\n\nexport function CRUD(options: ICRUDOptions) {\n\treturn (target: object, key: string) => {\n\t\tif (!target[crudOptions]) {\n\t\t\ttarget[crudOptions] = {};\n\t\t}\n\t\ttarget[crudOptions][key] = options;\n\t};\n}\n\n// % protected region % [Add more CRUD Option related functions here] off begin\n// % protected region % [Add more CRUD Option related functions here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { History } from 'history';\nimport { default as ApolloClient } from 'apollo-boost';\nimport { action, computed, observable } from 'mobx';\nimport { IGlobalModal } from '../Views/Components/Modal/GlobalModal';\n// % protected region % [Add any extra store imports here] off begin\n// % protected region % [Add any extra store imports here] end\n\n// % protected region % [Change the group return result as needed] off begin\nexport interface IGroupResult {\n\tname: string;\n\thasBackendAccess: boolean;\n}\n// % protected region % [Change the group return result as needed] end\n\n// % protected region % [Change The user return result as needed] off begin\nexport interface IUserResult {\n\tid: string;\n\temail: string;\n\tgroups: IGroupResult[];\n}\n// % protected region % [Change The user return result as needed] end\n\n/**\n * A global singleton store that contains a global state of data\n */\nexport class Store {\n\t@observable\n\tprivate user?: IUserResult;\n\n\t/**\n\t * The current location in the application\n\t */\n\t@observable\n\tpublic appLocation: 'frontend' | 'admin' = 'frontend';\n\n\t/**\n\t * The router history object for React Router\n\t */\n\tpublic routerHistory: History;\n\n\t/**\n\t * The client for Apollo\n\t */\n\tpublic apolloClient: ApolloClient<{}>;\n\n\t/**\n\t * The global modal that is stored in the app and can be called imperatively\n\t */\n\tpublic modal: IGlobalModal;\n\n\t/**\n\t * This signifies weather we are logged in or not\n\t * Only ever set this value to true if there is a value set in this.token\n\t */\n\t@computed\n\tpublic get loggedIn() {\n\t\t// % protected region % [Customise the loggedIn getter here] off begin\n\t\treturn this.user !== undefined;\n\t\t// % protected region % [Customise the loggedIn getter here] end\n\t}\n\n\t/**\n\t * The user Id of the logged-in user\n\t */\n\t@computed\n\tpublic get userId(): string | undefined {\n\t\t// % protected region % [Customise the userId getter here] off begin\n\t\treturn this.user ? this.user.id : undefined;\n\t\t// % protected region % [Customise the userId getter here] end\n\t};\n\t/**\n\t * The email of the current logged in user\n\t */\n\t@computed\n\tpublic get email(): string | undefined {\n\t\t// % protected region % [Customise the email getter here] off begin\n\t\treturn this.user ? this.user.email : undefined;\n\t\t// % protected region % [Customise the email getter here] end\n\t}\n\n\t/**\n\t * The groups that the logged in user are a part of\n\t */\n\t@computed\n\tpublic get userGroups(): IGroupResult[] {\n\t\t// % protected region % [Customise the userGroups getter here] off begin\n\t\tif (this.user) {\n\t\t\treturn [...this.user.groups];\n\t\t}\n\t\treturn [];\n\t\t// % protected region % [Customise the userGroups getter here] end\n\t};\n\n\t/**\n\t * Does this user have access to the backend admin views\n\t */\n\t@computed\n\tpublic get hasBackendAccess() {\n\t\t// % protected region % [Customise the hasBackendAccess getter here] off begin\n\t\tif (this.user) {\n\t\t\treturn this.user.groups.some(ug => ug.hasBackendAccess);\n\t\t}\n\t\treturn false;\n\t\t// % protected region % [Customise the hasBackendAccess getter here] end\n\t};\n\n\t/**\n\t * Is the frontend in edit mode\n\t */\n\t@observable\n\tpublic frontendEditMode = false;\n\n\t/**\n\t * Sets the current logged in user in the store\n\t * @param userResult\n\t */\n\t@action\n\tpublic setLoggedInUser(userResult: IUserResult) {\n\t\t// % protected region % [Customise the setLoggedInUser here] off begin\n\t\tthis.user = userResult;\n\t\t// % protected region % [Customise the setLoggedInUser here] end\n\t}\n\n\t/**\n\t * Clears the logged in user data from the store\n\t */\n\t@action clearLoggedInUser() {\n\t\t// % protected region % [Customise the clearLoggedInUser here] off begin\n\t\tthis.user = undefined;\n\t\t// % protected region % [Customise the clearLoggedInUser here] end\n\t}\n\n\t// % protected region % [Add any extra store methods or properties here] off begin\n\t// % protected region % [Add any extra store methods or properties here] end\n}\n\nexport const store = new Store();","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport function lowerCaseFirst(str: string) {\n\treturn str[0].toLowerCase() + str.slice(1);\n}\n\nexport function upperCaseFirst(str: string) {\n\treturn str[0].toUpperCase() + str.slice(1);\n}\n\nexport function camelCaseIntoWords(name: string) {\n\treturn name.replace(/([A-Z])/g, ' $1')\n\t\t.replace(/^./, (str) => str.toUpperCase());\n}\n\nexport function camelCase(str: string) {\n\tconst words = str.split(\" \");\n\tconst allLowerCase = words.map(w => w.toLowerCase());\n\treturn allLowerCase[0] + allLowerCase.slice(1).map(upperCaseFirst).join(\"\");\n}\n\nexport function lowerCaseNoSpaces(str: string) {\n\treturn str.toLowerCase().replace(/ /g, \"\")\n}\n\nexport function noSpaces(str: string) {\n\treturn str.replace(/ /g, \"\")\n}\n\n// % protected region % [Add extra StringUtil functions here] off begin\n// % protected region % [Add extra StringUtil functions here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { Model } from 'Models/Model';\n\nexport type IModelValidator = (model: Model) => Promise;\n\nexport function initValidators(target: any, key: string) {\n\tif (!target[Symbols.validator]) {\n\t\ttarget[Symbols.validator] = Array();\n\t}\n\tif (!target[Symbols.validatorMap]) {\n\t\ttarget[Symbols.validatorMap] = {};\n\t}\n\tif (!target[Symbols.validatorMap][key]) {\n\t\ttarget[Symbols.validatorMap][key] = [];\n\t}\n}\n\nexport interface IModelAttributeValidationError {\n\terrorType: ErrorType;\n\tattributeName: string;\n\terrorMessage: string;\n\ttarget: Model;\n}\n\nexport enum ErrorType {\n\tREQUIRED = 'required',\n\tEXISTS = 'exists',\n\tNOT_EXIST = 'notExist',\n\tLENGTH = 'length',\n\tINVALID = 'invalid',\n\tRANGE = 'range',\n\tUNKNOW = 'unknow'\n}\n\nexport enum PropertyType {\n\tOWN = 'own',\n\tREFERENCE = 'reference',\n\tCHILDREN = 'children',\n}\n\nexport type IFormFieldValidationError = {\n\t[key in ErrorType]?: string[];\n};\n\nexport interface IAttributeValidationErrorInfo{\n\ttype: PropertyType,\n\ttarget?: Model,\n\terrors: IFormFieldValidationError | IEntityValidationErrors | Array\n};\n\nexport interface IEntityValidationErrors {\n\t[prop: string]: IAttributeValidationErrorInfo\n}\n\n// todo: not finished\nexport function getFieldErrorMessages(fieldName: string, fieldErrors: IEntityValidationErrors){\n\tif(fieldErrors[fieldName]){\n\t\treturn Object.keys(fieldErrors[fieldName]).map((errorType, i)=>{\n\t\t\treturn fieldErrors[fieldName][errorType];\n\t\t})\n\t}else{\n\t\treturn undefined;\n\t}\n}\n\n// todo: not finished\nexport function setFieldValidate(fieldName: string, fieldErrors: IEntityValidationErrors, valid?: boolean) {\n\tif(fieldErrors[fieldName]){\n\t\tlet fieldError = fieldErrors[fieldName];\n\t\tif(fieldError){\n\t\t\tif(valid !== undefined){\n\t\t\t}\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as moment from 'moment'\nimport _ from 'lodash';\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport type transformFunction = (attr: any) => IStandardisedOption | null;\nexport interface IStandardisedOption {\n\tquery: string;\n\textraOptions?: {[option: string]: any};\n}\n\n/**\n * Converts a date string to a date string of format YYYY-MM-DD HH:mm:ss\n * @param attr The date string\n * @returns A date string in the format of YYYY-MM-DD HH:mm:ss or null if the provided date was not valid\n */\nexport function standardiseDate(attr: string): IStandardisedOption | null {\n\tconst formats = [\n\t\t\"DD-MM-YYYY 00:00:00\",\n\t\t\"DD-MM-YYYY HH:mm:ss\",\n\t\t\"DD/MM/YYYY 00:00:00\",\n\t\t\"DD/MM/YYYY HH:mm:ss\",\n\t\t\"YYYY-MM-DD 00:00:00\",\n\t\t\"YYYY-MM-DD HH:mm:ss\",\n\t\t\"YYYY/MM/DD 00:00:00\",\n\t\t\"YYYY/MM/DD HH:mm:ss\",\n\t\t\"MM-DD-YYYY 00:00:00\",\n\t\t\"MM-DD-YYYY HH:mm:ss\",\n\t\t\"MM/DD/YYYY 00:00:00\",\n\t\t\"MM/DD/YYYY HH:mm:ss\",\n\t];\n\tconst momentDate = moment(attr, formats);\n\n\t// Some invalid dates won't be marked invalid but just exist in year 0\n\tif (momentDate.isValid() && momentDate.year() !== 0) {\n\t\tconst dateOnly = momentDate.hours() === 0\n\t\t\t&& momentDate.minutes() === 0\n\t\t\t&& momentDate.seconds() === 0;\n\n\t\tif (dateOnly) {\n\t\t\treturn {\n\t\t\t\tquery: momentDate.format('YYYY-MM-DD'),\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tquery: momentDate.format('YYYY-MM-DD HH:mm:ss'),\n\t\t}\n\t}\n\treturn null;\n}\n\n/**\n * Determines if an input is an int for the purposes of search\n * @param attr The query string to check if it is an int\n */\nexport function standardiseInteger(attr: string): IStandardisedOption | null {\n\tconst value = Number(attr);\n\tif (isNaN(value) || !Number.isInteger(value)) {\n\t\treturn null;\n\t}\n\n\tconst maxInt = 2147483647;\n\tconst minInt = -2147483648;\n\n\tif (value > maxInt || value < minInt) {\n\t\treturn null;\n\t}\n\n\treturn {query: attr};\n}\n\n/**\n * Determines if an input is an float for the purposes of search\n * @param attr The query string to check if it is a float\n */\nexport function standardiseFloat(attr: string): IStandardisedOption | null {\n\tif (isNaN(Number(attr))) {\n\t\treturn null;\n\t}\n\treturn {query: attr};\n}\n\n/**\n * Determines if an input is an bool for the purposes of search\n * @param attr The query string to check if it is a bool\n */\nexport function standardiseBoolean(attr: string): IStandardisedOption | null {\n\tif (['true', 'false'].indexOf(attr) >= 0) {\n\t\treturn {query: attr};\n\t}\n\treturn null;\n}\n\n/**\n * Returns a search query for a string that is case insensitive\n * @param attr The string to search for\n */\nexport function standardiseString(attr: string): IStandardisedOption | null {\n\treturn {\n\t\tquery: `%${attr}%`,\n\t\textraOptions: {\n\t\t\tcase: 'INVARIANT_CULTURE_IGNORE_CASE'\n\t\t}\n\t}\n}\n\n/**\n * Returns a search query for a complete Uuid\n * @param attr The string to search for\n */\nexport function standardiseUuid(attr: string): IStandardisedOption | null {\n\tconst regex = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n\tif (!attr.match(regex)) {\n\t\treturn null;\n\t}\n\n\treturn {query: attr}\n}\n\n/**\n * Returns a search query for a string that is case insensitive\n * @param attr The string to search for\n */\nexport function standardiseEnum(attr: string, enumOptions: {} ): IStandardisedOption | null {\n\tconst enumKey = _.invert(enumOptions)[attr];\n\tif (!enumKey) {\n\t\treturn null;\n\t} else {\n\t\treturn {\n\t\t\tquery: enumKey\n\t\t}\n\t}\n}\n\n// % protected region % [Add extra AttributeUtils methods here] off begin\n// % protected region % [Add extra AttributeUtils methods here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as uuid from 'uuid';\nimport _ from 'lodash';\nimport axios from 'axios';\nimport { SERVER_URL } from 'Constants';\nimport { saveAs } from 'file-saver';\nimport gql from 'graphql-tag';\nimport { IConditionalFetchArgs, Model } from 'Models/Model';\nimport { AttributeCRUDOptions, ICRUDOptions } from 'Models/CRUDOptions';\nimport {\n\tcrudOptions,\n\tattributes,\n\tmodelName as modelNameSymbol,\n\tdisplayName as displayNameSymbol,\n\tcrudId,\n\tfileAttributes,\n} from 'Symbols';\nimport { lowerCaseFirst } from './StringUtils';\nimport { store } from 'Models/Store';\nimport { Symbols } from 'Symbols';\nimport { IOrderByCondition, IWhereCondition } from 'Views/Components/ModelCollection/ModelQuery';\nimport * as AttrUtils from 'Util/AttributeUtils';\nimport { IWhereConditionApi } from 'Views/Components/ModelCollection/ModelQuery';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n/**\n * Helper method to get model name based on the modelType - must be a Model or subclass\n * @param modelType The type of model\n */\nexport function getModelName(modelType: { new(): Model }) {\n\treturn modelType[modelNameSymbol];\n}\n\n/**\n * Helper method to get model display name based on the modelType - must be a Model or subclass\n * @param modelType The type of model\n */\nexport function getModelDisplayName(modelType: { new(): Model }) {\n\treturn modelType[displayNameSymbol];\n}\n\n/**\n * Helper method that reads the display metadata (decorators) of this type and returns it in a typed format\n */\nexport function getAttributeCRUDOptions(modelType: { new(): Model }): AttributeCRUDOptions[] {\n\tconst attributeDisplay = [];\n\tfor (const [attributeName, displayOptions] of Object.entries(modelType.prototype[crudOptions])) {\n\t\tattributeDisplay.push(new AttributeCRUDOptions(attributeName, displayOptions as ICRUDOptions));\n\t}\n\n\treturn attributeDisplay;\n}\n\n/*\n * Gets all attributes for the model\n */\nexport function getAttributes(modelType: { new(): Model }) {\n\treturn [...modelType.prototype[attributes]];\n}\n\nexport function getFiles(modelType: { new(): Model }) {\n\treturn [...modelType.prototype[fileAttributes]].map(f => f.name);\n}\n\nexport async function exportAll(modelType: { new(): Model }, conditions: IWhereConditionApi<{}>[][] = []): Promise {\n\tconst result = await axios.post(\n\t\t`${SERVER_URL}/api/entity/${getModelName(modelType)}/export`,\n\t\tconditions,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t}\n\t\t});\n\tconst blob = new Blob([result.data], {type: \"text/csv;charset=utf-8\"});\n\tsaveAs(blob, `export-${getModelName(modelType)}.csv`);\n}\n\n// % protected region % [Customize getFetchAllQuery method here] off begin\n/*\n * Gets all models\n */\nexport function getFetchAllQuery(modelType: { new(): Model }, expandString?: string, useListExpands?: boolean) {\n\tconst model = new modelType();\n\tconst modelsName = lowerCaseFirst(model.getModelName());\n\n\treturn gql`\n\t\tquery ${modelsName}($args: [WhereExpressionGraph], $skip:Int, $take:Int, $orderBy: [OrderByGraph], $ids: [ID] ) {\n\t\t\t${modelsName}s(where: $args, skip:$skip, take:$take, orderBy: $orderBy, ids: $ids) {\n\t\t\t\t${expandString ? expandString : \"\"}\n\t\t\t\t${model.attributes.join('\\n')}\n\t\t\t\t${model.files.map(f => f.name).join('\\n')}\n\t\t\t\t${useListExpands ? new modelType().listExpands : new modelType().defaultExpands}\n\t\t\t}\n\t\t\tcount${model.getModelName()}s(where: $args) {\n\t\t\t\tnumber\n\t\t\t}\n\t\t}`;\n}\n// % protected region % [Customize getFetchAllQuery method here] end\n\n\n// % protected region % [Customize FetchSingleQuery method here] off begin\n/**\n * Gets all models\n */\nexport function getFetchSingleQuery(modelType: { new(): Model }, expandString?: string, useListExpands?: boolean) {\n\tconst modelsName = lowerCaseFirst(getModelName(modelType));\n\n\treturn gql`\n\t\tquery ${modelsName} ($args:[WhereExpressionGraph]) {\n\t\t\t${modelsName} (where: $args) {\n\t\t\t\t${expandString ? expandString : \"\"}\n\t\t\t\t${getAttributes(modelType).join('\\n')}\n\t\t\t\t${getFiles(modelType).join('\\n')}\n\t\t\t\t${useListExpands ? new modelType().listExpands : new modelType().defaultExpands}\n\t\t\t}\n\t\t}`;\n}\n// % protected region % [Customize FetchSingleQuery method here] end\n\n\n// % protected region % [Customize fetchAllConditional method here] off begin\n/**\n * Creates a conditional query to send over graphql\n * @param modelType The model type to create the query for\n * @param expandString Custom string to be inserted into the graphql query\n * @param useListExpands Should the query only use the list query expands\n */\nexport function getFetchAllConditional(modelType: {new() : Model}, expandString?: string, useListExpands?: boolean) {\n\tconst modelName: string = modelType[modelNameSymbol];\n\tconst lowerModelName = lowerCaseFirst(modelName);\n\n\treturn gql`\n\t\tquery ${lowerModelName}($args: [[WhereExpressionGraph]], $skip:Int, $take:Int, $orderBy: [OrderByGraph], $ids: [ID] ) {\n\t\t\t${lowerModelName}s : ${lowerModelName}sConditional(conditions: $args, skip:$skip, take:$take, orderBy: $orderBy, ids: $ids) {\n\t\t\t\t${expandString ? expandString : \"\"}\n\t\t\t\t${getAttributes(modelType).join('\\n')}\n\t\t\t\t${getFiles(modelType).join('\\n')}\n\t\t\t\t${useListExpands ? new modelType().listExpands : new modelType().defaultExpands}\n\t\t\t}\n\t\t\tcount${modelName}s : count${modelName}sConditional(conditions: $args) {\n\t\t\t\tnumber\n\t\t\t}\n\t\t}`;\n}\n// % protected region % [Customize fetchAllConditional method here] end\n\n/**\n * Creates a function that checks if a field in the first argument equals the second argument\n * @param field The field to check\n * @returns A function that compares equality of the field to an option\n */\nexport function makeJoinEqualsFunc(field: string) {\n\treturn (modelProp: T, option: string) => modelProp[field] === option;\n}\n\nexport type manyToManyOptions = {\n\tentityName: string,\n\toppositeEntityName: string,\n\trelationName: string,\n\trelationOppositeName: string,\n\tentity: () => { new(attrs?: any): Model, getAttributes(): string[], getFiles(): {name: string, blob: string}[] },\n\tjoinEntity: () => { new(attrs?: any): Model, getAttributes(): string[], getFiles(): {name: string, blob: string}[] },\n\toppositeEntity: () => { new(attrs?: any): Model, getAttributes(): string[], getFiles(): {name: string, blob: string}[] },\n\targs?: (query: string, existingArgs: Array>>) => Array>>,\n\torderBy?: Array>;\n\ttake?: number,\n\tskip?: number,\n\tcase?: string,\n\tid?: string;\n\tids?: Array\n\t// % protected region % [Add additional manyToManyOptions attributes here] off begin\n\t// % protected region % [Add additional manyToManyOptions attributes here] end\n};\n\n// % protected region % [Customize makeFetchManyToManyFunc method here] off begin\n/**\n * Makes a function that fetches the entities needed for many to many queries\n * @param options options for the fetch function\n */\nexport function makeFetchManyToManyFunc(options: manyToManyOptions) {\n\treturn (query: string | string[], queryOptions: {model: Model}) => {\n\t\tconst joinEntity = options.joinEntity();\n\t\tconst oppositeEntity = options.oppositeEntity();\n\n\t\tconst queryString = typeof query === 'string'\n\t\t\t? query\n\t\t\t: '';\n\n\t\tconst args = new oppositeEntity().getSearchConditions(queryString) ?? [];\n\t\tconst existingIds = queryOptions.model[`${options.relationOppositeName}s`].map((x: any) => x[`${options.relationOppositeName}Id`]);\n\t\tconst existingArg: IWhereCondition = {\n\t\t\tpath: 'id',\n\t\t\tcomparison: 'in',\n\t\t\tnegate: true,\n\t\t\tvalue: existingIds\n\t\t};\n\t\targs.push([existingArg]);\n\n\t\treturn store.apolloClient\n\t\t\t.query({\n\t\t\t\tquery: gql`\n\t\t\t\t\tquery joinData($has: [[HasConditionType]], $args: [[WhereExpressionGraph]], $skip:Int, $take:Int, $orderBy: [OrderByGraph], $ids: [ID], $id: ID) {\n\t\t\t\t\t\tjoinData: ${options.oppositeEntityName}s(has: $has, conditions: $args, skip: $skip, take: $take, orderBy: $orderBy, ids: $ids, id: $id) {\n\t\t\t\t\t\t\t${oppositeEntity.getAttributes().join('\\n')}\n\t\t\t\t\t\t\t${oppositeEntity.getFiles().map(f => f.name).join('\\n')}\n\t\t\t\t\t\t}\n\t\t\t\t\t}`,\n\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t\tvariables: {\n\t\t\t\t\tid: options.id,\n\t\t\t\t\tids: options.ids,\n\t\t\t\t\targs: options.args?.(queryString, args) ?? args,\n\t\t\t\t\tskip: options.skip,\n\t\t\t\t\ttake: options.take ?? 10,\n\t\t\t\t\torderBy: options.orderBy,\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(result => {\n\t\t\t\tconst data = result.data['joinData'];\n\t\t\t\tconst serverData = _.flatMap(data, i => {\n\t\t\t\t\tconst join = new joinEntity({\n\t\t\t\t\t\t[`${options.relationOppositeName}Id`]: i.id,\n\t\t\t\t\t\t[`${options.relationOppositeName}`]: i,\n\t\t\t\t\t});\n\t\t\t\t\tjoin[crudId] = uuid.v4();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdisplay: new oppositeEntity(i).getDisplayName(),\n\t\t\t\t\t\tvalue: join,\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconst existingRelations = queryOptions.model[`${options.relationOppositeName}s`];\n\t\t\t\tfor (const existingEntity of existingRelations) {\n\t\t\t\t\texistingEntity[crudId] = existingEntity.id;\n\t\t\t\t\tif (!_.find(serverData, o => makeJoinEqualsFunc(`${options.relationOppositeName}Id`)(existingEntity, o.value[`${options.relationOppositeName}Id`]))) {\n\t\t\t\t\t\tserverData.push({\n\t\t\t\t\t\t\tdisplay: new oppositeEntity(existingEntity[options.relationOppositeName]).getDisplayName(),\n\t\t\t\t\t\t\tvalue: existingEntity,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn serverData;\n\t\t\t});\n\t}\n}\n// % protected region % [Customize makeFetchManyToManyFunc method here] end\n\nexport type oneToManyOptions = {\n\trelationName: string,\n\toppositeEntity: () => { new(): T, fetch(variables?: IConditionalFetchArgs): Promise },\n\targs?: Array>>\n};\n\nexport function makeFetchOneToManyFunc(options: oneToManyOptions) {\n\treturn async (query: string | string[], queryOptions: {model: Model}) => {\n\t\tconst oppositeEntity = options.oppositeEntity();\n\t\tlet args = typeof query === 'string' ? new oppositeEntity().getSearchConditions(query) : undefined;\n\t\tif (options.args) {\n\t\t\targs = (args && args !== []) ? _.union(args, options.args) : options.args\n\t\t}\n\n\t\tconst serverData = await oppositeEntity.fetch({\n\t\t\targs: args,\n\t\t\ttake: 10,\n\t\t});\n\n\t\tconst existingData: T[] = queryOptions.model[options.relationName];\n\n\t\treturn _\n\t\t\t.unionBy(existingData, serverData, 'id')\n\t\t\t.map(r => ({\n\t\t\t\tdisplay: r.getDisplayName(),\n\t\t\t\tvalue: r,\n\t\t\t}));\n\t}\n}\n\nexport function makeEnumFetchFunction(enumOptions: { [key in T]: string }) : {display: string, value: string}[] {\n\treturn _.map(enumOptions, (display, value) => ({display, value}));\n}\n\nexport function isRequired(model: Model, attributeName: string) {\n\tlet required = false;\n\tif (model[Symbols.validatorMap]) {\n\t\tconst maybeValidator = model[Symbols.validatorMap][attributeName];\n\t\trequired = maybeValidator ? maybeValidator.indexOf('Required') > -1 : false;\n\t}\n\treturn required;\n}\n\nexport function getCreatedModifiedCrudOptions(): [ ICRUDOptions, ICRUDOptions ] {\n\t// % protected region % [Modify the create and modified CRUD attributes here] off begin\n\tconst createdAttr: ICRUDOptions = {\n\t\tname: 'Created',\n\t\tdisplayType: 'datepicker',\n\t\theaderColumn: false,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseDate,\n\t\torder: 1000,\n\t\tisReadonly: true,\n\t\tcreateFieldType: 'hidden',\n\t};\n\tconst modifiedAttr: ICRUDOptions = {\n\t\tname: 'Modified',\n\t\tdisplayType: 'datepicker',\n\t\theaderColumn: false,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseDate,\n\t\torder: 1010,\n\t\tisReadonly: true,\n\t\tcreateFieldType: 'hidden',\n\t};\n\n\treturn [ createdAttr, modifiedAttr ];\n\t// % protected region % [Modify the create and modified CRUD attributes here] end\n}\n\n// % protected region % [Export additional EntityUtil functions here] off begin\n// % protected region % [Export additional EntityUtil functions here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { ServerError, ServerParseError } from 'apollo-link-http-common';\nimport { ErrorResponse } from 'apollo-link-error';\nimport { CaseComparison, CaseComparisonPascalCase, IWhereCondition } from 'Views/Components/ModelCollection/ModelQuery';\n\n/**\n * Check if a GraphQL error is a server error(instead of a GraphQL error)\n * @param error the returned error from server GraphQL\n * @param params The query params to use\n * @returns boolean, if the error is ServerError and have error['statusCode']\n */\nexport function isServerError(error: Error | ServerError | ServerParseError | undefined): error is ServerError | ServerParseError {\n\tif (error === undefined) {\n\t\treturn false;\n\t}\n\tif (error['statusCode'] === undefined) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function getTheNetworkError(response: ErrorResponse): string | null {\n\tif (!!response.networkError && !!response.networkError['result']\n\t\t&& !!response.networkError['result']['errors'] && !!response.networkError['result']['errors']['length']) {\n\t\tvar error = response.networkError['result']['errors'][0];\n\t\treturn error['message'];\n\t} else {\n\t\treturn null;\n\t}\n}\n\n/**\n * Return an array of error messages from graphQl error response\n * @param response \n */\nexport function getErrorMessages(response: ErrorResponse): string[] {\n\tconst errors = (!!response.response && !!response.response.data) ?\n\t\t(!!response.response.data.errors && Array.isArray(response.response.data.errors)) ? response.response.data.errors : [{ message: response.response.data }]\n\t\t: [];\n\treturn errors;\n}\n\n/**\n * Checks if the condition has any OR conditions\n * A query has OR conditions if it is an array of arrays\n * @param conditions The condition to check\n */\nexport function isOrCondition(conditions: Array> | Array>> | undefined):\n\tconditions is Array>>\n{\n\tif (conditions === undefined) {\n\t\treturn false;\n\t}\n\tif (conditions[0]) {\n\t\treturn Array.isArray(conditions[0]);\n\t}\n\treturn false;\n}\n\n/**\n * Converts a case comparison to its pascal case version\n * @param comparison The comparison to convert\n */\nexport function convertCaseComparisonToPascalCase(comparison: CaseComparison): CaseComparisonPascalCase {\n\tconst comparisonMap: {[key in CaseComparison]: CaseComparisonPascalCase} = {\n\t\t'CURRENT_CULTURE': 'CurrentCulture',\n\t\t'CURRENT_CULTURE_IGNORE_CASE': 'CurrentCultureIgnoreCase',\n\t\t'INVARIANT_CULTURE': 'InvariantCulture',\n\t\t'INVARIANT_CULTURE_IGNORE_CASE': 'InvariantCultureIgnoreCase',\n\t\t'ORDINAL': 'Ordinal',\n\t\t'ORDINAL_IGNORE_CASE': 'OrdinalIgnoreCase',\n\t};\n\treturn comparisonMap[comparison];\n}\n\n// % protected region % [Add any extra GraphQL utils here] off begin\n// % protected region % [Add any extra GraphQL utils here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as uuid from 'uuid';\nimport { observable, runInAction, computed } from 'mobx';\nimport {\n\tvalidator as validatorSymbol,\n\tattributes as attributesSymbol,\n\tcrudOptions,\n\treferences as referencesSymbol,\n\tmodelName as modelNameSymbol,\n\tdisplayName as displayNameSymbol,\n\tfileAttributes,\n\tAPPLICATION_ID,\n} from 'Symbols';\nimport { store } from './Store';\nimport gql from 'graphql-tag';\nimport { lowerCaseFirst } from 'Util/StringUtils';\nimport { ICRUDOptions, AttributeCRUDOptions } from './CRUDOptions';\nimport moment from 'moment';\nimport { IModelAttributeValidationError, IModelValidator, IEntityValidationErrors, IAttributeValidationErrorInfo, PropertyType, IFormFieldValidationError } from 'Validators/Util';\nimport { IAcl } from './Security/IAcl';\nimport { IOrderByCondition, IWhereCondition, Comparators } from '../Views/Components/ModelCollection/ModelQuery';\nimport { getFetchAllConditional, getModelName } from '../Util/EntityUtils';\nimport { ErrorResponse } from 'apollo-link-error';\nimport { getTheNetworkError } from 'Util/GraphQLUtils';\nimport { ICollectionFilterPanelProps } from 'Views/Components/Collection/CollectionFilterPanel';\nimport _ from 'lodash';\nimport co from \"co\";\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport axios from 'axios';\nimport { SERVER_URL } from 'Constants';\nimport { DocumentNode } from 'graphql';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport type jsonReplacerFn = (input: {[key: string]: any}) => {[key: string]: any};\n\nexport interface QueryOptions {\n\tquery: DocumentNode;\n\tvariables?: TVariables;\n\terrorPolicy?: 'none' | 'ignore' | 'all';\n\tfetchResults?: boolean;\n\tmetadata?: any;\n\tcontext?: any;\n\tfetchPolicy?: 'cache-first' | 'network-only' | 'cache-only' | 'no-cache' | 'standby';\n\t[key: string]: any;\n}\n\nexport interface IModelType {\n\tnew (attributes?: Partial): T;\n\tacls?: IAcl[];\n\tgetOrderByField?: () => IOrderByCondition | undefined;\n\tfetch(variables?: IConditionalFetchArgs): Promise;\n}\n\nexport interface IModelAttributes {\n\tid?: string;\n\tcreated?: Date;\n\tmodified?: Date;\n\t// % protected region % [Add any further abstract model properties here] off begin\n\t// % protected region % [Add any further abstract model properties here] end\n}\n\nexport type SaveOption = {key: string, value: any, graphQlType: string};\nexport interface ISaveOptions {\n\toptions?: SaveOption[];\n\tcreateOptions?: SaveOption[];\n\tupdateOptions?: SaveOption[];\n\tgraphQlInputType?: string;\n\tjsonTransformFn?: jsonReplacerFn;\n\tcontentType?: 'application/json' | 'multipart/form-data';\n\tfiles?: {attributeName: string, file: Blob}[];\n}\n\ninterface IBaseFetchArgs {\n\tid?: string;\n\tids?: Array\n\torderBy?: Array>;\n\tskip?: number;\n\ttake?: number;\n}\n\nexport interface IFetchArgs extends IBaseFetchArgs {\n\targs?: Array>;\n}\n\nexport interface IConditionalFetchArgs extends IBaseFetchArgs {\n\targs?: Array>>;\n}\n\n/**\n * Initialises the attributes array on a target model\n * Cannot be run on the abstract model since that will initialise the same array on all child models\n * @param target {T extends Model} The target class to initialise the attributes object on\n */\nfunction initAttributes(target: any) {\n\tif (target.getModelName() !== 'Model') {\n\t\tif (!target[attributesSymbol]) {\n\t\t\ttarget[attributesSymbol] = ['id', 'created', 'modified'];\n\t\t}\n\t\tif (!target[referencesSymbol]) {\n\t\t\ttarget[referencesSymbol] = [];\n\t\t}\n\t\tif (!target[fileAttributes]) {\n\t\t\ttarget[fileAttributes] = [];\n\t\t}\n\t}\n}\n\nexport interface IAttributeOptions {\n\tisReference?: boolean;\n\tfile?: string;\n}\n\n/**\n * The attribute decorator for all bot written model properties.\n * This will append to the attribute array and decorate with a mobx observer\n */\nexport function attribute(options?: IAttributeOptions) {\n\t// % protected region % [Add to the attribute decorator here] off begin\n\t// % protected region % [Add to the attribute decorator here] end\n\treturn (target: object, key: string) => {\n\t\t// Init attributes array\n\t\tinitAttributes(target);\n\n\t\t// Add to the attributes array for any attributes\n\t\tif (options?.isReference) {\n\t\t\ttarget[referencesSymbol].push(key);\n\t\t} else if (options?.file) {\n\t\t\ttarget[fileAttributes].push({name: key, blob: options.file});\n\t\t} else {\n\t\t\ttarget[attributesSymbol].push(key);\n\t\t}\n\n\t\t// Decorate the property with an observable\n\t\t// decorate(target, {[key]: observable});\n\t};\n}\n\n/**\n * @param modelName The name of the model\n * @param displayName The display name of the model for presentation purposes, defaults to the modelName\n */\nexport function entity(modelName: string, displayName?: string) {\n\treturn (target: object) => {\n\t\ttarget[modelNameSymbol] = modelName;\n\t\ttarget[displayNameSymbol] = displayName === undefined\n\t\t\t? modelName\n\t\t\t: displayName\n\t}\n}\n\nexport interface IAttributeGroup {\n\tid: number;\n\tname: string;\n\torder: number;\n\tshowName?: boolean;\n}\n\nexport class Model implements IModelAttributes {\n\t/**\n\t * The acl entries associated to this entity\n\t */\n\tpublic static acls: IAcl[] = [];\n\n\tpublic static excludeFromCreate: string[] = [];\n\tpublic static excludeFromUpdate: string[] = [];\n\n\t/**\n\t * Client only id for identifying entities before they are sent up to the server\n\t */\n\tpublic _clientId = uuid.v4();\n\n\t/* The default order by field when the collection is loaded */\n\tpublic get orderByField(): IOrderByCondition | undefined {\n\t\treturn undefined;\n\t}\n\n\tpublic static getOrderByField() {\n\t\treturn this.prototype.orderByField;\n\t}\n\n\t@observable\n\tpublic validationErrors: IEntityValidationErrors = {};\n\n\t@computed\n\tpublic get hasValidationError(): boolean {\n\t\treturn Object.keys(this.validationErrors).some((prop) => {\n\t\t\tvar propErrors = this.validationErrors[prop];\n\t\t\tswitch(propErrors.type){\n\t\t\t\tcase PropertyType.OWN:\n\t\t\t\t\treturn true;\n\t\t\t\tcase PropertyType.REFERENCE:\n\t\t\t\t\treturn Object.keys(this.validationErrors[prop].errors).length > 0;\n\t\t\t\tcase PropertyType.CHILDREN:\n\t\t\t\t\treturn (this.validationErrors[prop].errors as Array).some((childErrors) => {\n\t\t\t\t\t\treturn Object.keys(this.validationErrors[prop].errors).length > 0;\n\t\t\t\t\t})\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t})\n\t}\n\n\t// Does not support get reference errors and child entity errors yet for now\n\tpublic getErrorsForAttribute = (attributeName: string): string[] => {\n\t\tif(!!this.validationErrors[attributeName]){\n\t\t\tif(this.validationErrors[attributeName].type === PropertyType.OWN){\n\t\t\t\treturn _\n\t\t\t\t.chain(Object.keys((this.validationErrors[attributeName].errors)))\n\t\t\t\t.map((error)=>{\n\t\t\t\t\treturn this.validationErrors[attributeName].errors[error];\n\t\t\t\t})\n\t\t\t\t.flatMap(errors => {\n\t\t\t\t\treturn errors;\n\t\t\t\t}).value();\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Graphql query fragment that is always included when fetching this entity\n\t */\n\tpublic defaultExpands = '';\n\n\t/**\n\t * Graphql query fragment that is only included when fetched from the crud list.\n\t * This normally does not contain any references.\n\t * This field will not be used when defaultExpands is used.\n\t */\n\tpublic listExpands = '';\n\n\tpublic attributeGroups?: IAttributeGroup[];\n\n\t@observable\n\tpublic id: string;\n\n\t// % protected region % [Customize time format here] off begin\n\t@observable\n\tprivate _created: Date;\n\t@computed\n\tpublic get created() {\n\t\treturn this._created;\n\t}\n\tpublic set created(date: Date) {\n\t\tif (typeof (date) === 'string') {\n\t\t\tthis._created = moment.utc(date).toDate();\n\t\t} else {\n\t\t\tthis._created = date;\n\t\t}\n\t}\n\n\t@observable\n\tprivate _modified: Date;\n\t@computed\n\tpublic get modified() {\n\t\treturn this._modified;\n\t}\n\tpublic set modified(date: Date) {\n\t\tif (typeof(date) === 'string') {\n\t\t\tthis._modified = moment.utc(date).toDate();\n\t\t} else {\n\t\t\tthis._modified = date;\n\t\t}\n\t}\n\t// % protected region % [Customize time format here] end\n\n\t// % protected region % [Add any custom attributes to the abstract model here] off begin\n\t// % protected region % [Add any custom attributes to the abstract model here] end\n\n\tconstructor(attributes?: Partial) {\n\t\tthis.assignAttributes(attributes);\n\t}\n\n\tpublic assignAttributes(attributes?: Partial) {\n\t\tif (attributes) {\n\t\t\tif (attributes.id !== undefined) {\n\t\t\t\tthis.id = attributes.id;\n\t\t\t}\n\t\t\tif (attributes.created !== undefined) {\n\t\t\t\tthis.created = attributes.created;\n\t\t\t}\n\t\t\tif (attributes.modified !== undefined) {\n\t\t\t\tthis.modified = attributes.modified;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Validates a model and any submodels\n\t * @param path A path object for choosing which nested models to convert to JSON\n\t * @example\n\t * myModel.validate();\n\t * @example\n\t * myModel.validate({relation: {subrelation: {}}});\n\t */\n\tpublic validate(path: {} = {}): Promise {\n\t\tlet that: Model = this;\n\t\tvar promise = new Promise((resolve, reject) => {\n\t\t\t//@ts-ignore\n\t\t\tco(function* () {\n\t\t\t\tlet results: IEntityValidationErrors = {};\n\t\t\t\tif (that[validatorSymbol]) {\n\t\t\t\t\tconst ownErrorsArrray: IModelAttributeValidationError[] =\n\t\t\t\t\t\t(yield Promise.all(\n\t\t\t\t\t\t\t(that[validatorSymbol] as IModelValidator[]).map(\n\t\t\t\t\t\t\t\t(validator) => validator(that)\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t(error: IModelAttributeValidationError) => {\n\t\t\t\t\t\t\t\tif(!_.some(path, _.isEmpty)){\n\t\t\t\t\t\t\t\t\treturn !!error;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treturn (!!error && !!error.attributeName && (path as object).hasOwnProperty(error.attributeName)) ? !!error : null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\tconst ownErrors = ownErrorsArrray.reduce((errors, error) => {\n\t\t\t\t\t\tif (errors[error.attributeName] === undefined) {\n\t\t\t\t\t\t\terrors[error.attributeName] = {\n\t\t\t\t\t\t\t\ttype: PropertyType.OWN,\n\t\t\t\t\t\t\t\terrors: { [`${error.errorType}`]: [error.errorMessage] } as IFormFieldValidationError\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tlet errs = errors[error.attributeName].errors;\n\t\t\t\t\t\t\tif(errs[error.errorType] === undefined){\n\t\t\t\t\t\t\t\terrs[error.errorType] = [error.errorMessage];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\terrs[error.errorType].push(error.errorMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn errors;\n\t\t\t\t\t}, {} as IEntityValidationErrors);\n\n\t\t\t\t\tresults = { ...results, ...ownErrors };\n\t\t\t\t}\n\n\t\t\t\tconst referencesToValidate = Object.keys(path).filter(key => that.references.includes(key));\n\n\t\t\t\tfor (const reference of referencesToValidate) {\n\t\t\t\t\tif (Array.isArray(that[reference])) {\n\t\t\t\t\t\tconst childrenErrors: IEntityValidationErrors[] = (yield Promise.all(\n\t\t\t\t\t\t\tthat[reference].map(\n\t\t\t\t\t\t\t\t(item: Model) => item.validate(path[reference])\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t).map((oneChildErrors: IEntityValidationErrors) => {\n\t\t\t\t\t\t\tif (Object.keys(oneChildErrors).length > 0) {\n\t\t\t\t\t\t\t\treturn oneChildErrors;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tresults[reference] = {\n\t\t\t\t\t\t\ttype: PropertyType.CHILDREN,\n\t\t\t\t\t\t\ttarget: that[reference],\n\t\t\t\t\t\t\terrors: childrenErrors\n\t\t\t\t\t\t} as IAttributeValidationErrorInfo;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst referenceErrors = (yield that[reference].validate(path[reference])) as IEntityValidationErrors;\n\t\t\t\t\t\tif (Object.keys(referenceErrors).length > 0) {\n\t\t\t\t\t\t\tresults[reference] = { type: PropertyType.REFERENCE, target: that[reference], errors: referenceErrors } as IAttributeValidationErrorInfo;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthat.validationErrors = results;\n\t\t\t\t});\n\t\t\t\treturn results;\n\t\t\t}).then(function (results: any) {\n\t\t\t\tresolve(results as IEntityValidationErrors);\n\t\t\t}, function (err: any) {\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\n\t\treturn promise;\n\t}\n\n\t/**\n\t * Clear all the validation errors in a model\n\t * @example\n\t * myModel.clearErrors();\n\t */\n\tpublic clearErrors(): void {\n\t\trunInAction(() => {\n\t\t\tthis.validationErrors = {};\n\t\t\tfor (const reference of this.references) {\n\t\t\t\tif (Array.isArray(this[reference])) {\n\t\t\t\t\t(this[reference] as Model[]).forEach((model) => {\n\t\t\t\t\t\tif(!!model){\n\t\t\t\t\t\t\tmodel.clearErrors();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tif(!!this[reference]){\n\t\t\t\t\t\tif(typeof (this[reference] as Model).clearErrors === 'function') {\n\t\t\t\t\t\t\t(this[reference] as Model).clearErrors();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Turns the model into JSON. Can convert selected submodels to JSON as well using the path param.\n\t * @param path A path object for choosing which nested models to convert to JSON\n\t * @param excludeCrudFields Should excludeFromCreate and excludeFromUpdate be respected\n\t * @param replacer A function to mutate the JSON result\n\t * @returns A JSON form of the model\n\t * @example\n\t * myModel.toJSON();\n\t * @example\n\t * myModel.toJSON({relation: {subrelation: {}}});\n\t */\n\tpublic toJSON(path: {} = {}, excludeCrudFields = false, replacer: jsonReplacerFn | undefined = undefined) {\n\t\tconst json = {};\n\t\tconst pathKeys = Object.keys(path);\n\n\t\tlet allKeys = _.uniq(this.attributes.concat(this.references).concat(pathKeys));\n\t\tif (excludeCrudFields) {\n\t\t\tconst excludeList = this.id\n\t\t\t\t? this.constructor['excludeFromUpdate']\n\t\t\t\t: this.constructor['excludeFromCreate'];\n\t\t\tallKeys = allKeys.filter((k: string) => excludeList.indexOf(k) === -1);\n\t\t}\n\n\t\tfor (const key of allKeys) {\n\t\t\tif (this[key] === null && this.attributes.indexOf(key) !== -1) {\n\t\t\t\tjson[key] = null;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (typeof (this[key])) {\n\t\t\t\tcase 'function':\n\t\t\t\t\t// We never want functions\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'object':\n\t\t\t\t\t// Format dates as strings\n\t\t\t\t\tif (this[key] instanceof Date) {\n\t\t\t\t\t\tjson[key] = moment(this[key]).format('YYYY-MM-DD HH:mm:ss');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// We only want objects if they are defined in the provided path\n\t\t\t\t\tconst keyIdx = pathKeys.indexOf(key);\n\t\t\t\t\tif (keyIdx >= 0) {\n\t\t\t\t\t\tif (Array.isArray(this[key])) {\n\t\t\t\t\t\t\tjson[key] = this[key].map((model: any) => {\n\t\t\t\t\t\t\t\tif (typeof model.toJSON === 'function') {\n\t\t\t\t\t\t\t\t\treturn model.toJSON(path[key], true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn JSON.parse(JSON.stringify(model));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (this[key] === null) {\n\t\t\t\t\t\t\t\tjson[key] = null;\n\t\t\t\t\t\t\t} else if (typeof this[key].toJSON === 'function') {\n\t\t\t\t\t\t\t\tjson[key] = this[key].toJSON(path[key], true);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjson[key] = JSON.parse(JSON.stringify(this[key]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'undefined':\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!key.startsWith('_')) {\n\t\t\t\t\t\tjson[key] = this[key];\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const file of this.files) {\n\t\t\tconst fileBlob = this[file.blob];\n\t\t\tif (fileBlob instanceof Blob) {\n\t\t\t\tjson[file.name] = uuid.v5(`${this._clientId}.${file.name}`, APPLICATION_ID);\n\t\t\t} else if (this[file.name]) {\n\t\t\t\tjson[file.name] = this[file.name];\n\t\t\t}\n\t\t}\n\n\t\tif (replacer) {\n\t\t\treturn replacer(json);\n\t\t}\n\t\treturn json;\n\t}\n\n\tpublic getFiles(\n\t\tpath: {} = {},\n\t\texcludeCrudFields = false,\n\t\tresult: { attributeName: string, file: Blob }[] = []):\n\t\t{ attributeName: string, file: Blob }[] {\n\n\t\tfor (const file of this.files) {\n\t\t\tconst fileBlob = this[file.blob];\n\t\t\tif (fileBlob instanceof Blob) {\n\t\t\t\tresult.push({attributeName: uuid.v5(`${this._clientId}.${file.name}`, APPLICATION_ID), file: fileBlob});\n\t\t\t}\n\t\t}\n\n\t\tconst referenceKeys = Object.keys(path);\n\t\tfor (const key of referenceKeys) {\n\t\t\tconst referenceObj = this[key];\n\t\t\tif (referenceObj instanceof Model) {\n\t\t\t\treferenceObj.getFiles(path[key], excludeCrudFields, result);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Helper method that reads the display metadata of this object and returns it in a typed format.\n\t */\n\tpublic getAttributeCRUDOptions(): AttributeCRUDOptions[] {\n\t\tconst attributeDisplay = [];\n\t\tfor (const [attributeName, displayOptions] of Object.entries(this[crudOptions])) {\n\t\t\tattributeDisplay.push(new AttributeCRUDOptions(attributeName, displayOptions as ICRUDOptions));\n\t\t}\n\n\t\treturn attributeDisplay;\n\t}\n\n\t/*\n\t * Gets all attributes for the model\n\t */\n\tpublic get attributes(): string[] {\n\t\treturn [...this[attributesSymbol]];\n\t}\n\n\tpublic get references(): string[] {\n\t\treturn [...this[referencesSymbol]];\n\t}\n\n\tpublic get files(): {name: string, blob: string}[] {\n\t\treturn [...this[fileAttributes]];\n\t}\n\n\tpublic static getAttributes(): string[] {\n\t\treturn this.prototype[attributesSymbol];\n\t}\n\n\tpublic static getReferences(): string[] {\n\t\treturn this.prototype[referencesSymbol];\n\t}\n\n\tpublic static getFiles(): {name: string, blob: string}[] {\n\t\treturn this.prototype[fileAttributes];\n\t}\n\n\tpublic static async fetch(\n\t\tvariables?: IConditionalFetchArgs,\n\t\texpendString?: string,\n\t\tapolloOptions?: Partial>,\n\t\tuseListExpands?: boolean): Promise {\n\t\tconst { data } = await store.apolloClient.query({\n\t\t\tquery: getFetchAllConditional(this, expendString, useListExpands),\n\t\t\tvariables: variables,\n\t\t\tfetchPolicy: 'network-only',\n\t\t\t...apolloOptions\n\t\t});\n\t\treturn data[lowerCaseFirst(getModelName(this)) + 's'].map((r: any) => new this(r));\n\t}\n\n\t/**\n\t * Gets a fetch query with an option for expands\n\t * @param expandString A graphql subquery for this entity\n\t * @param operationName The name of the graphql operation. Will default to the model name\n\t * @param queryName The name of the query query to run\n\t * @param useListExpands Should the query only use the list query expands\n\t */\n\tpublic getFetchWithExpands(expandString: string, operationName?: string, queryName?: string, useListExpands?: boolean) {\n\t\tqueryName = queryName || lowerCaseFirst(this.getModelName());\n\t\tconst modelsName = operationName || queryName;\n\n\t\treturn gql`\n\t\t\tquery ${modelsName}($args: [WhereExpressionGraph], $ids: [ID] ) {\n\t\t\t\t${modelsName}: ${queryName}(where: $args, ids: $ids) {\n\t\t\t\t\t${expandString}\n\t\t\t\t\t${this.attributes.join('\\n')}\n\t\t\t\t\t${useListExpands ? this.listExpands : this.defaultExpands}\n\t\t\t\t\t${this.files.map(f => f.name).join('\\n')}\n\t\t\t\t}\n\t\t\t}`;\n\t}\n\n\t// % protected region % [Customize fetchAllQuery method here] off begin\n\t/*\n\t * Gets all models\n\t */\n\tpublic get fetchAllQuery() {\n\t\tconst modelsName = lowerCaseFirst(this.getModelName());\n\n\t\treturn gql`\n\t\t\tquery ${modelsName}($args: [WhereExpressionGraph], $skip:Int, $take:Int, $orderBy: [OrderByGraph], $ids: [ID] ) {\n\t\t\t\t${modelsName}s(where: $args, skip:$skip, take:$take, orderBy: $orderBy, ids: $ids) {\n\t\t\t\t\t${this.attributes.join('\\n')}\n\t\t\t\t\t${this.files.map(f => f.name).join('\\n')}\n\t\t\t\t\t${this.defaultExpands}\n\t\t\t\t}\n\t\t\t\tcount${this.getModelName()}s(where: $args) {\n\t\t\t\t\tnumber\n\t\t\t\t}\n\t\t\t}`;\n\t}\n\t// % protected region % [Customize fetchAllQuery method here] end\n\n\t/*\n\t * Gets all models\n\t */\n\tpublic get fetchSingleQuery() {\n\t\tconst modelsName = lowerCaseFirst(this.getModelName());\n\n\t\t// $args:[WhereExpressionGraph]\n\t\treturn gql`\n\t\t\tquery ${modelsName} {\n\t\t\t\t${modelsName} {\n\t\t\t\t\t${this.attributes.join('\\n')}\n\t\t\t\t\t${this.files.map(f => f.name).join('\\n')}\n\t\t\t\t\t${this.defaultExpands}\n\t\t\t\t}\n\t\t\t}`;\n\t}\n\n\tpublic getModelName() {\n\t\t// Ignore this since accessing proto is not avaliable in typescript\n\t\t// However the model name metadata is stored in the constructor so we need to go though the prototype first\n\t\t// @ts-ignore\n\t\treturn this.__proto__.constructor[modelNameSymbol];\n\t}\n\n\tpublic getModelDisplayName() {\n\t\t// @ts-ignore\n\t\treturn this.__proto__.constructor[displayNameSymbol];\n\t}\n\n\t/**\n\t * Deletes the model from the server\n\t */\n\tpublic async delete() {\n\t\tconst functionName = `delete${this.getModelName()}`;\n\n\t\tconst modelsName = lowerCaseFirst(this.getModelName());\n\t\tconst variableName = `${modelsName}Ids`;\n\n\t\treturn store.apolloClient\n\t\t\t.mutate({\n\t\t\t\tmutation: gql`\n\t\t\t\t\tmutation delete($${variableName}:[ID]) {\n\t\t\t\t\t\t${functionName}(${variableName}: $${variableName}) {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t}`,\n\t\t\t\tvariables: {[variableName]: [this.id]},\n\t\t\t\tupdate: (cache, results) => {\n\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tconst data = response.data[functionName][0];\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tObject.assign(this, data);\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((response: ErrorResponse) => {\n\t\t\t\tconst errorMessage = getTheNetworkError(response);\n\t\t\t\tthrow errorMessage;\n\t\t\t});\n\t}\n\n\t/**\n\t * Deletes the models from the server by conditions\n\t */\n\tpublic async deleteWhere(conditions?: Array> | Array>>, ids?: string[]) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst functionName = `delete${this.getModelName()}sConditional`;\n\n\t\t\treturn store.apolloClient\n\t\t\t\t.mutate({\n\t\t\t\t\tmutation: gql`\n\t\t\t\t\t\tmutation deleteModelsConditional($args: [[WhereExpressionGraph]], $ids:[ID]) {\n\t\t\t\t\t\t\t${functionName}(conditions: $args, ids: $ids){\n\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}`,\n\t\t\t\t\tvariables: {\n\t\t\t\t\t\t\"args\": conditions,\n\t\t\t\t\t\t\"ids\": ids || null\n\t\t\t\t\t},\n\t\t\t\t\tupdate: (cache, results) => {\n\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst result = response.data[functionName];\n\t\t\t\t\tresolve(result);\n\t\t\t\t})\n\t\t\t\t.catch((response: ErrorResponse) => {\n\t\t\t\t\tconst errorMessage = getTheNetworkError(response);\n\t\t\t\t\treject(errorMessage);\n\t\t\t\t});\n\t\t})\n\t}\n\n\t/**\n\t * Updates the models from the server by conditions\n\t */\n\tpublic async updateWhere(conditions?: Array> | Array>>, fieldsToUpdate?: string[], ids?: string[]) {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst functionName = `update${this.getModelName()}sConditional`;\n\n\t\t\treturn store.apolloClient\n\t\t\t\t.mutate({\n\t\t\t\t\tmutation: gql`\n\t\t\t\t\t\tmutation updateModelsConditional($where: [[WhereExpressionGraph]], $ids:[ID], $fieldsToUpdate: [String], $modelValuesToUpdate: ${this.getModelName()}Input) {\n\t\t\t\t\t\t\t${functionName}(conditions: $where, ids: $ids, fieldsToUpdate: $fieldsToUpdate, valuesToUpdate: $modelValuesToUpdate){\n\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}`,\n\t\t\t\t\tvariables: {\n\t\t\t\t\t\t\"where\": conditions,\n\t\t\t\t\t\t\"fieldsToUpdate\": fieldsToUpdate,\n\t\t\t\t\t\t\"modelValuesToUpdate\": this,\n\t\t\t\t\t\t\"ids\": ids || null\n\t\t\t\t\t},\n\t\t\t\t\tupdate: (cache, results) => {\n\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst result = response.data[functionName];\n\t\t\t\t\tresolve(result);\n\t\t\t\t});\n\t\t})\n\t}\n\n\t/**\n\t * Saves the model to the server\n\t * @param relationPath The relation path to be sent to the toJSON method\n\t * @param options\n\t */\n\tpublic async save(relationPath: {} = {}, options: ISaveOptions = {}) {\n\t\tconst variables = options.options ?? [];\n\t\tconst createOptions = options.createOptions ?? [];\n\t\tconst updateOptions = options.updateOptions ?? [];\n\t\tconst contentType = options.contentType ?? 'application/json';\n\n\t\t// Before we save, we run this overwriteable method.\n\t\tthis.beforeSave();\n\n\t\tlet functionName: string;\n\t\tlet jsonModel = this.toJSON(relationPath, true, options.jsonTransformFn);\n\n\t\tif (this.id === undefined) {\n\t\t\tfunctionName = `create${this.getModelName()}`;\n\t\t\tvariables.push(...createOptions);\n\t\t} else {\n\t\t\tfunctionName = `update${this.getModelName()}`;\n\t\t\tvariables.push(...updateOptions);\n\t\t}\n\n\t\tconst modelsName = lowerCaseFirst(this.getModelName());\n\t\tconst graphQlInputType = options.graphQlInputType || `[${this.getModelName()}Input]`;\n\n\t\tconst mutation = gql`\n\t\t\tmutation ${functionName}($${modelsName}:${graphQlInputType}${variables.map(v => `,$${v.key}:${v.graphQlType}`).join(',')}) {\n\t\t\t\t${functionName}(${modelsName}s: $${modelsName}${variables.map(v => `,${v.key}: $${v.key}`)}) {\n\t\t\t\t\t${this.attributes.join('\\n')}\n\t\t\t\t\t${this.files.map(f => f.name).join('\\n')}\n\t\t\t\t}\n\t\t\t}` as DocumentNode;\n\n\t\tconst queryVariables = {\n\t\t\t[modelsName]: [jsonModel],\n\t\t\t...variables.reduce((a, n) => ({[n.key]: n.value, ...a}), {})\n\t\t};\n\n\t\tswitch (contentType) {\n\t\t\tcase 'application/json':\n\t\t\t\treturn store.apolloClient\n\t\t\t\t\t.mutate({\n\t\t\t\t\t\tmutation: mutation,\n\t\t\t\t\t\tvariables: queryVariables,\n\t\t\t\t\t\tupdate: (cache, results) => {\n\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tconst data = response.data[functionName][0];\n\t\t\t\t\t\trunInAction(() => {\n\t\t\t\t\t\t\tthis.assignAttributes(data);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\tcase 'multipart/form-data':\n\t\t\t\tconst data = new FormData();\n\t\t\t\tdata.append('variables', JSON.stringify(queryVariables));\n\t\t\t\tdata.append('operationName', functionName);\n\t\t\t\tdata.append('query', mutation.loc?.source.body ?? '');\n\n\t\t\t\tfor (const file of this.getFiles(relationPath, true)) {\n\t\t\t\t\tdata.append(file.attributeName, file.file);\n\t\t\t\t}\n\n\t\t\t\treturn axios({\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\turl: `${SERVER_URL}/api/graphql`,\n\t\t\t\t\tdata: data,\n\t\t\t\t}).then((response) => {\n\t\t\t\t\tconst data = response.data.data[functionName][0];\n\t\t\t\t\trunInAction(() => {\n\t\t\t\t\t\tthis.assignAttributes(data);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tdefault:\n\t\t\t\treturn Promise.reject(\"Invalid content type\");\n\n\t\t}\n\t}\n\n\tpublic beforeSave() {\n\t\t// Do nothing. This function is here to be overridden\n\t}\n\n\tpublic saveFromCrud(formMode?: EntityFormMode) {\n\t\treturn this.save();\n\t}\n\n\t/**\n\t * Method to return display name for this model - default is id but can be overridden in sub classes\n\t */\n\tpublic getDisplayName() {\n\t\treturn this.id;\n\t}\n\n\t/**\n\t * Method to return the display attribute for this model - default is id but can be overridden in sub classes\n\t */\n\tpublic getDisplayAttribute() {\n\t\treturn 'id';\n\t}\n\n\t/**\n\t * Method to return default search condition for searching the string of searchTerm parameter\n\t */\n\tpublic getSearchConditions(searchTerm?: string): Array>> | undefined {\n\t\tif (searchTerm && searchTerm.trim() !== '') {\n\t\t\tconst crudOptions = this.getAttributeCRUDOptions();\n\t\t\tconst values: IWhereCondition[] = _\n\t\t\t\t.chain(crudOptions)\n\t\t\t\t.filter(attributeOption => attributeOption.searchable)\n\t\t\t\t.flatMap(attributeOption => {\n\t\t\t\t\tconst valid = attributeOption.searchTransform(searchTerm.trim());\n\t\t\t\t\tif (valid) {\n\t\t\t\t\t\treturn [{option: attributeOption, search: valid.query, extraOptions: valid.extraOptions}];\n\t\t\t\t\t}\n\t\t\t\t\treturn [];\n\t\t\t\t})\n\t\t\t\t.map(attr => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t\"path\": attr.option.attributeName,\n\t\t\t\t\t\t\"comparison\": attr.option.searchFunction,\n\t\t\t\t\t\t\"value\": attr.search,\n\t\t\t\t\t\t...attr.extraOptions,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.value();\n\n\t\t\t// If the search is a uuid then we should search on the id of the entity.\n\t\t\t// The following is the regex to match a uuid\n\t\t\tconst regex = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n\t\t\tif (searchTerm.match(regex)) {\n\t\t\t\tvalues.push({\n\t\t\t\t\t\"path\": 'id',\n\t\t\t\t\t\"comparison\": 'equal',\n\t\t\t\t\t\"value\": searchTerm,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn [values];\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Method to convert collection filter array into where condition for collection query\n\t */\n\tpublic getFilterConditions(filterConfig: ICollectionFilterPanelProps): IWhereCondition[][] | undefined {\n\t\tif (filterConfig && filterConfig.filters && filterConfig.filters.some(filter => filter.active === true)) {\n\t\t\tlet filterConditions = _\n\t\t\t\t.chain(filterConfig.filters)\n\t\t\t\t.filter(filter => filter.active)\n\t\t\t\t.flatMap(filter => {\n\t\t\t\t\tif (filter.comparison === 'range') {\n\t\t\t\t\t\tif (filter.displayType === 'datepicker') {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{ ...filter, path: filter.path, comparison: 'greaterThanOrEqual' as Comparators, value1: filter.value1 },\n\t\t\t\t\t\t\t\t{ ...filter, path: filter.path, comparison: 'lessThanOrEqual' as Comparators, value1: moment(filter.value2 as Date).add('day', 1).format('YYYY-MM-DD')}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{ ...filter, path: filter.path, comparison: 'greaterThanOrEqual' as Comparators, value1: filter.value1 },\n\t\t\t\t\t\t\t\t{ ...filter, path: filter.path, comparison: 'lessThanOrEqual' as Comparators, value1: filter.value2 }\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn [filter];\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.map(filter => {\n\t\t\t\t\tif (filter.displayType === 'enum-combobox' && Array.isArray(filter.value1)) {\n\t\t\t\t\t\treturn filter.value1.map(element => {\n\t\t\t\t\t\t\treturn { path: filter.path, comparison: filter.comparison, value: element } as IWhereCondition\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn [{\n\t\t\t\t\t\t\tpath: filter.path,\n\t\t\t\t\t\t\tcomparison: filter.comparison,\n\t\t\t\t\t\t\tvalue: filter.value1,\n\t\t\t\t\t\t}] as IWhereCondition[];\n\t\t\t\t\t}\n\t\t\t\t}).value();\n\t\t\treturn filterConditions;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t// % protected region % [Add additional methods here] off begin\n\t// % protected region % [Add additional methods here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport axios from 'axios';\nimport User from 'Models/Entities/User';\nimport { SERVER_URL } from 'Constants';\n\nexport const getUsers = async (): Promise => {\n\tconst response = await axios.get(`${SERVER_URL}/api/account`);\n\tconst usersJson = response.data as Array<{}>;\n\treturn usersJson.map(userData => new User(userData));\n};\n\nexport const getUser = async (id: string): Promise => {\n\tconst response = await axios.get(`${SERVER_URL}/api/account/${id}`);\n\treturn new User({\n\t\t...response.data,\n\t\tgroups: response.data.groups.map((g: any) => g.name)\n\t});\n};\n\nexport const createUser = async (userJson: {}) => {\n\tconst response = await axios.post(`${SERVER_URL}/api/account`, userJson);\n\treturn response.data;\n};\n\nexport const updateUser = async (userJson: {}) => {\n\tconst response = await axios.put(`${SERVER_URL}/api/account`, userJson);\n\treturn response.data;\n};\n\nexport const deleteUser = async (id: string) => {\n\treturn await axios.delete(`${SERVER_URL}/api/account?id=${id}`);\n};","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate() {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Email');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif(model[key] === null || model[key] === undefined){\n\t\t\t\t\tresolve(null);\n\t\t\t\t}else{\n\t\t\t\t\tresolve(isEmail(model[key])\n\t\t\t\t\t? null\n\t\t\t\t\t:\n\t\t\t\t\t{\n\t\t\t\t\t\terrorType: ErrorType.INVALID,\n\t\t\t\t\t\terrorMessage: `The value is not a valid email`,\n\t\t\t\t\t\tattributeName: key,\n\t\t\t\t\t\ttarget: model\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t};\n}\n\nexport function isEmail(email: string): boolean {\n\treturn /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/\n\t\t.test(email)\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate() {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Integer');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif(model[key] === null || model[key] === undefined){\n\t\t\t\t\tresolve(null);\n\t\t\t\t} else if (!(typeof (model[key]) === 'string'\n\t\t\t\t\t&& (model[key] as string).indexOf('.') >= 0)\n\t\t\t\t\t&&!isNaN(model[key])\n\t\t\t\t) {\n\t\t\t\t\tconst number = Number(model[key]);\n\t\t\t\t\tif (Number.isInteger(number)) {\n\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst errorMessage = `This field must be an integer`;\n\t\t\t\tresolve({ errorType: ErrorType.INVALID, errorMessage, attributeName: key, target: model });\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Model } from 'Models/Model';\nimport { Symbols } from 'Symbols';\nimport { ErrorType, IModelAttributeValidationError, initValidators } from '../Util';\n\nexport default function validate(min?: number, max?: number) {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Length');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif (model[key] === null || model[key] === undefined || (!min && !max)) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet isValid = true;\n\t\t\t\tif (min && (model[key].length < min)) {\n\t\t\t\t\tisValid = false;\n\t\t\t\t}\n\t\t\t\tif (max && model[key].length > max) {\n\t\t\t\t\tisValid = false;\n\t\t\t\t}\n\t\t\t\tif (isValid) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet errorMessage;\n\t\t\t\tif (min && max) {\n\t\t\t\t\terrorMessage = `The length of this field is not ${min} and ${max}. Actual Length: ${model[key].length}`;\n\t\t\t\t} else if (min) {\n\t\t\t\t\terrorMessage = `The length of this field is not greater than ${min}. Actual Length: ${model[key].length}`;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = `The length of this field is not less than ${max}. Actual Length: ${model[key].length}`;\n\t\t\t\t}\n\n\t\t\t\tresolve({\n\t\t\t\t\terrorType: ErrorType.LENGTH, \n\t\t\t\t\terrorMessage, \n\t\t\t\t\tattributeName: key, \n\t\t\t\t\ttarget: model \n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate() {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Required');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif ((model[key] || model[key] === 0 || model[key] === false) && !((typeof model[key] === 'string') && model[key].trim() === '')) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst errorMessage = 'This field is required';\n\t\t\t\tresolve({ \n\t\t\t\t\terrorType: ErrorType.REQUIRED,\n\t\t\t\t\terrorMessage, \n\t\t\t\t\tattributeName: key,\n\t\t\t\t\ttarget: model });\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\nimport { getFetchAllQuery } from 'Util/EntityUtils';\nimport { store } from 'Models/Store';\nimport { modelName as modelNameSymbol } from 'Symbols';\nimport { lowerCaseFirst } from 'Util/StringUtils';\n\nexport default function validate() {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Unique');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif(model[key] === null || model[key] === undefined){\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst modelName = lowerCaseFirst(target.constructor[modelNameSymbol]);\n\t\t\t\tconst query = getFetchAllQuery(target.constructor as { new(): Model });\n\t\t\t\tconst variables = { \"args\": [{ \"path\": key, \"comparison\": \"equal\", \"value\": model[key] }] };\n\t\t\t\tstore.apolloClient.query({ query: query, fetchPolicy: 'network-only', variables: variables }).then(\n\t\t\t\t\t({data}) => {\n\t\t\t\t\t\tif (!!data[`${modelName}s`] && !!data[`${modelName}s`][0] && !!data[`${modelName}s`][0]['id'] && model['id'] !== data[`${modelName}s`][0]['id']) {\n\t\t\t\t\t\t\tconst errorMessage = `This value entered has already been used`;\n\t\t\t\t\t\t\tresolve({\n\t\t\t\t\t\t\t\terrorType: ErrorType.EXISTS,\n\t\t\t\t\t\t\t\terrorMessage, \n\t\t\t\t\t\t\t\tattributeName: key, \n\t\t\t\t\t\t\t\ttarget: model });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// if error happens to asynchronous validation, just consider this as valid for now\n\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { CRUD } from '../CRUDOptions';\nimport { IModelAttributes, Model, attribute, entity } from '../Model';\nimport { createUser, updateUser, deleteUser } from '../../Views/Components/UserCRUD/UserService';\nimport { action, observable } from 'mobx';\nimport { SERVER_URL } from 'Constants';\nimport * as Validators from '../../Validators';\nimport axios from 'axios';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface IGroupAttributes extends IModelAttributes {\n\tname: string;\n}\n\n@entity('group')\nexport class Group extends Model implements IGroupAttributes {\n\t@attribute()\n\t@observable\n\tpublic name: string;\n\n\tconstructor(attributes?: Partial) {\n\t\tsuper(attributes);\n\t\tif (attributes) {\n\t\t\tif (attributes.name) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t}\n\t}\n\tpublic getDisplayName(): string {\n\t\treturn this.name;\n\t}\n}\n\nexport interface IUserAttributes extends IModelAttributes {\n\temail: string;\n\tpassword: string;\n\tgroups: string[];\n\t// % protected region % [Add any extra user attributes here] off begin\n\t// % protected region % [Add any extra user attributes here] end\n}\n\nfunction getGroups() {\n\treturn axios.get(`${SERVER_URL}/api/account/groups`)\n\t\t.then(({ data }) => {\n\t\t\treturn data.map((groupName: any) => { return { display: groupName, value: groupName }});\n\t\t});\n}\n\n// % protected region % [Customise user model name here] off begin\n@entity('user')\n// % protected region % [Customise user model name here] end\nexport default class User extends Model implements IUserAttributes {\n\t// % protected region % [Add any class properties here] off begin\n\t// % protected region % [Add any class properties here] end\n\n\t// % protected region % [Customize User fields here] off begin\n\t@Validators.Required()\n\t@Validators.Length(0, 255)\n\t@Validators.Email()\n\t@attribute()\n\t@observable\n\t@CRUD({name:'Username', displayType: 'displayfield', headerColumn: true, searchable: true})\n\tpublic email: string;\n\n\t@Validators.Min(6)\n\t@Validators.Regex(new RegExp(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])\"), \"The password must contain an uppercase letter, a number and a symbol\")\n\t@attribute()\n\tpublic password: string;\n\t// % protected region % [Customize User fields here] end\n\n\t// % protected region % [Add any extra user fields here] off begin\n\t// % protected region % [Add any extra user fields here] end\n\n\t// % protected region % [Customize user groups here] off begin\n\t@attribute()\n\t@observable\n\t@CRUD({name:'Groups', displayType: 'reference-multicombobox', referenceTypeFunc: () => Group, headerColumn: false, searchable: false, referenceResolveFunction: getGroups})\n\tpublic groups: string[];\n\t// % protected region % [Customize user groups here] end\n\n\tconstructor(attributes?: Partial) {\n\t\tsuper(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.email) {\n\t\t\t\tthis.email = attributes.email;\n\t\t\t}\n\t\t\tif (attributes.password) {\n\t\t\t\tthis.password = attributes.password;\n\t\t\t}\n\t\t\tif (attributes.groups) {\n\t\t\t\tthis.groups = attributes.groups;\n\t\t\t}\n\t\t\t// % protected region % [Add any extra user fields to the constructor here] off begin\n\t\t\t// % protected region % [Add any extra user fields to the constructor here] end\n\t\t}\n\n\t\t// % protected region % [Add any extra constructor params here] off begin\n\t\t// % protected region % [Add any extra constructor params here] end\n\t}\n\tpublic async save(relationPath: {} = {}) {\n\t\t// % protected region % [Add any logic before save here] off begin\n\t\t// % protected region % [Add any logic before save here] end\n\n\t\tif (this.id === undefined) {\n\t\t\treturn createUser(this.toJSON(relationPath))\n\t\t\t\t.then(({ data }) => this.updateUser(data));\n\t\t} \n\t\treturn updateUser(this.toJSON(relationPath))\n\t\t\t.then(({ data }) => this.updateUser(data));\n\t}\n\n\tpublic async delete() {\n\t\t// % protected region % [Add any logic before delete here] off begin\n\t\t// % protected region % [Add any logic before delete here] end\n\n\t\tawait deleteUser(this.id);\n\t}\n\n\t@action\n\tprivate updateUser(data: {}) {\n\t\t// % protected region % [Add any logic before update here] off begin\n\t\t// % protected region % [Add any logic before update here] end\n\n\t\tObject.assign(this, data);\n\t}\n\n\tpublic toJSON(path: {} = {}): {} {\n\t\t// % protected region % [Overwrite toJSON here] off begin\n\t\treturn {\n\t\t\tid: this.id,\n\t\t\temail: this.email,\n\t\t\tgroups: this.groups,\n\t\t};\n\t\t// % protected region % [Overwrite toJSON here] end\n\t}\n\n\t// % protected region % [Add additional methods here] off begin\n\t// % protected region % [Add additional methods here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate(pattern: RegExp, message?: string) {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Regex');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif (model[key] === null || model[key] === undefined || pattern.test(model[key])) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst errorMessage = message ? message : `This fields requires value to match the pattern ${pattern}`;\n\t\t\t\tresolve({\n\t\t\t\t\terrorType: ErrorType.INVALID,\n\t\t\t\t\terrorMessage, \n\t\t\t\t\tattributeName: key, \n\t\t\t\t\ttarget: model });\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate(value: number) {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push('Min');\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise((resolve) => {\n\t\t\t\tif (model[key] === null || model[key] === undefined) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(model[key] >= value\n\t\t\t\t\t\t? null \n\t\t\t\t\t\t: { \n\t\t\t\t\t\t\terrorType: ErrorType.RANGE,\n\t\t\t\t\t\t\terrorMessage: `The value is ${model[key]} which is less than the required amount of ${value}`, \n\t\t\t\t\t\t\tattributeName: key, \n\t\t\t\t\t\t\ttarget: model \n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffActivityEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n\nexport type activityType =\n\t// % protected region % [Override activityType keys here] off begin\n\t'OTHER' |\n\t\t'LEGACY' |\n\t\t'TASK' |\n\t\t'EMAIL' |\n\t\t'CALL' |\n\t\t'MEETING' |\n\t\t'DEMO' |\n\t\t'FORM_SUBMISSION' |\n\t\t'LOGIN' |\n\t\t'GITLAB' |\n\t\t'PAYMENT' |\n\t\t'LESSON' |\n\t\t'COURSE' |\n\t\t'REFERRAL' |\n\t\t'LAUNCH' |\n\t\t'FREE_TRIAL' |\n\t\t'LINKEDIN' |\n\t\t'SOCIALS' |\n\t\t'FORUM';\n\t// % protected region % [Override activityType keys here] end\n\nexport const activityTypeOptions: { [key in activityType]: string } = {\n\t// % protected region % [Override activityType display fields here] off begin\n\tOTHER: 'Other',\n\tLEGACY: 'Legacy',\n\tTASK: 'Task',\n\tEMAIL: 'Email',\n\tCALL: 'Call',\n\tMEETING: 'Meeting',\n\tDEMO: 'Demo',\n\tFORM_SUBMISSION: 'Form Submission',\n\tLOGIN: 'Login',\n\tGITLAB: 'GitLab',\n\tPAYMENT: 'Payment',\n\tLESSON: 'Lesson',\n\tCOURSE: 'Course',\n\tREFERRAL: 'Referral',\n\tLAUNCH: 'Launch',\n\tFREE_TRIAL: 'Free Trial',\n\tLINKEDIN: 'LinkedIn',\n\tSOCIALS: 'Socials',\n\tFORUM: 'Forum',\n\t// % protected region % [Override activityType display fields here] end\n};\n\nexport type runStatus =\n\t// % protected region % [Override runStatus keys here] off begin\n\t'QUEUED' |\n\t\t'RUNNING' |\n\t\t'FAILED' |\n\t\t'SUCCESS' |\n\t\t'EXCEPTION';\n\t// % protected region % [Override runStatus keys here] end\n\nexport const runStatusOptions: { [key in runStatus]: string } = {\n\t// % protected region % [Override runStatus display fields here] off begin\n\tQUEUED: 'QUEUED',\n\tRUNNING: 'RUNNING',\n\tFAILED: 'FAILED',\n\tSUCCESS: 'SUCCESS',\n\tEXCEPTION: 'EXCEPTION',\n\t// % protected region % [Override runStatus display fields here] end\n};\n\n// % protected region % [Add any extra enums here] off begin\n// % protected region % [Add any extra enums here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class SuperAdministratorScheme implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Super Administrators';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeEnumFetchFunction,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffActivityEntity } from 'Models/Security/Acl/StaffActivityEntity';\nimport * as Enums from '../Enums';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IActivityEntityAttributes extends IModelAttributes {\n\tdescription: string;\n\tmetadata: string;\n\tfingerprintId: string;\n\tactivityType: Enums.activityType;\n\n\tcontactId?: string;\n\tcontact?: Models.ContactEntity | Models.IContactEntityAttributes;\n\tdealId?: string;\n\tdeal?: Models.DealEntity | Models.IDealEntityAttributes;\n\torganisationId?: string;\n\torganisation?: Models.OrganisationEntity | Models.IOrganisationEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('ActivityEntity', 'Activity')\n// % protected region % [Customise your entity metadata here] end\nexport default class ActivityEntity extends Model implements IActivityEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffActivityEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textarea',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Metadata',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic metadata: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Fingerprint Id'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Fingerprint Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic fingerprintId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Fingerprint Id'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Activity Type'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Activity Type',\n\t\tdisplayType: 'enum-combobox',\n\t\torder: 40,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: (attr: string) => {\n\t\t\treturn AttrUtils.standardiseEnum(attr, Enums.activityTypeOptions);\n\t\t},\n\t\tenumResolveFunction: makeEnumFetchFunction(Enums.activityTypeOptions),\n\t\tdisplayFunction: (attribute: Enums.activityType) => Enums.activityTypeOptions[attribute],\n\t})\n\tpublic activityType: Enums.activityType;\n\t// % protected region % [Modify props to the crud options here for attribute 'Activity Type'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact'] off begin\n\t\tname: 'Contact',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.ContactEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact'] end\n\t})\n\tpublic contactId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic contact: Models.ContactEntity;\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deal'] off begin\n\t\tname: 'Deal',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 60,\n\t\treferenceTypeFunc: () => Models.DealEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deal'] end\n\t})\n\tpublic dealId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic deal: Models.DealEntity;\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisation'] off begin\n\t\tname: 'Organisation',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 70,\n\t\treferenceTypeFunc: () => Models.OrganisationEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisation'] end\n\t})\n\tpublic organisationId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic organisation: Models.OrganisationEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.metadata !== undefined) {\n\t\t\t\tthis.metadata = attributes.metadata;\n\t\t\t}\n\t\t\tif (attributes.fingerprintId !== undefined) {\n\t\t\t\tthis.fingerprintId = attributes.fingerprintId;\n\t\t\t}\n\t\t\tif (attributes.activityType !== undefined) {\n\t\t\t\tthis.activityType = attributes.activityType;\n\t\t\t}\n\t\t\tif (attributes.contactId !== undefined) {\n\t\t\t\tthis.contactId = attributes.contactId;\n\t\t\t}\n\t\t\tif (attributes.contact !== undefined) {\n\t\t\t\tif (attributes.contact === null) {\n\t\t\t\t\tthis.contact = attributes.contact;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.contact instanceof Models.ContactEntity) {\n\t\t\t\t\t\tthis.contact = attributes.contact;\n\t\t\t\t\t\tthis.contactId = attributes.contact.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.contact = new Models.ContactEntity(attributes.contact);\n\t\t\t\t\t\tthis.contactId = this.contact.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.dealId !== undefined) {\n\t\t\t\tthis.dealId = attributes.dealId;\n\t\t\t}\n\t\t\tif (attributes.deal !== undefined) {\n\t\t\t\tif (attributes.deal === null) {\n\t\t\t\t\tthis.deal = attributes.deal;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.deal instanceof Models.DealEntity) {\n\t\t\t\t\t\tthis.deal = attributes.deal;\n\t\t\t\t\t\tthis.dealId = attributes.deal.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.deal = new Models.DealEntity(attributes.deal);\n\t\t\t\t\t\tthis.dealId = this.deal.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.organisationId !== undefined) {\n\t\t\t\tthis.organisationId = attributes.organisationId;\n\t\t\t}\n\t\t\tif (attributes.organisation !== undefined) {\n\t\t\t\tif (attributes.organisation === null) {\n\t\t\t\t\tthis.organisation = attributes.organisation;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.organisation instanceof Models.OrganisationEntity) {\n\t\t\t\t\t\tthis.organisation = attributes.organisation;\n\t\t\t\t\t\tthis.organisationId = attributes.organisation.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.organisation = new Models.OrganisationEntity(attributes.organisation);\n\t\t\t\t\t\tthis.organisationId = this.organisation.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tcontact {\n\t\t\t${Models.ContactEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tdeal {\n\t\t\t${Models.DealEntity.getAttributes().join('\\n')}\n\t\t}\n\t\torganisation {\n\t\t\t${Models.OrganisationEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(ActivityEntity.prototype, 'created');\nCRUD(modifiedAttr)(ActivityEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffContactEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchManyToManyFunc,\n\tmakeJoinEqualsFunc,\n\tmakeFetchOneToManyFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffContactEntity } from 'Models/Security/Acl/StaffContactEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport { TimelineModel } from 'Timelines/TimelineModel';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IContactEntityAttributes extends IModelAttributes {\n\tname: string;\n\tmetadata: string;\n\n\tactivitiess: Array;\n\tcontactEmailss: Array;\n\tloggedEvents: Array;\n\torganisationss: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('ContactEntity', 'Contact')\n// % protected region % [Customise your entity metadata here] end\nexport default class ContactEntity extends Model implements IContactEntityAttributes, TimelineModel {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffContactEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Metadata',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic metadata: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] end\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] off begin\n\t\tname: \"Activitiess\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 30,\n\t\treferenceTypeFunc: () => Models.ActivityEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'activitiess',\n\t\t\toppositeEntity: () => Models.ActivityEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] end\n\t})\n\tpublic activitiess: Models.ActivityEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact Emails'] off begin\n\t\tname: \"Contact Emailss\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 40,\n\t\treferenceTypeFunc: () => Models.ContactEmailEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'contactEmailss',\n\t\t\toppositeEntity: () => Models.ContactEmailEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact Emails'] end\n\t})\n\tpublic contactEmailss: Models.ContactEmailEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] off begin\n\t\tname: \"Logged Events\",\n\t\tdisplayType: 'hidden',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.ContactTimelineEventsEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'loggedEvents',\n\t\t\toppositeEntity: () => Models.ContactTimelineEventsEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] end\n\t})\n\tpublic loggedEvents: Models.ContactTimelineEventsEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisations'] off begin\n\t\tname: 'Organisations',\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 60,\n\t\tisJoinEntity: true,\n\t\treferenceTypeFunc: () => Models.OrganisationsContacts,\n\t\toptionEqualFunc: makeJoinEqualsFunc('organisationsId'),\n\t\treferenceResolveFunction: makeFetchManyToManyFunc({\n\t\t\tentityName: 'contactEntity',\n\t\t\toppositeEntityName: 'organisationEntity',\n\t\t\trelationName: 'contacts',\n\t\t\trelationOppositeName: 'organisations',\n\t\t\tentity: () => Models.ContactEntity,\n\t\t\tjoinEntity: () => Models.OrganisationsContacts,\n\t\t\toppositeEntity: () => Models.OrganisationEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisations'] end\n\t})\n\tpublic organisationss: Models.OrganisationsContacts[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.metadata !== undefined) {\n\t\t\t\tthis.metadata = attributes.metadata;\n\t\t\t}\n\t\t\tif (attributes.activitiess !== undefined && Array.isArray(attributes.activitiess)) {\n\t\t\t\tfor (const model of attributes.activitiess) {\n\t\t\t\t\tif (model instanceof Models.ActivityEntity) {\n\t\t\t\t\t\tthis.activitiess.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.activitiess.push(new Models.ActivityEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.contactEmailss !== undefined && Array.isArray(attributes.contactEmailss)) {\n\t\t\t\tfor (const model of attributes.contactEmailss) {\n\t\t\t\t\tif (model instanceof Models.ContactEmailEntity) {\n\t\t\t\t\t\tthis.contactEmailss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.contactEmailss.push(new Models.ContactEmailEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.loggedEvents !== undefined && Array.isArray(attributes.loggedEvents)) {\n\t\t\t\tfor (const model of attributes.loggedEvents) {\n\t\t\t\t\tif (model instanceof Models.ContactTimelineEventsEntity) {\n\t\t\t\t\t\tthis.loggedEvents.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.loggedEvents.push(new Models.ContactTimelineEventsEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.organisationss !== undefined && Array.isArray(attributes.organisationss)) {\n\t\t\t\tfor (const model of attributes.organisationss) {\n\t\t\t\t\tif (model instanceof Models.OrganisationsContacts) {\n\t\t\t\t\t\tthis.organisationss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.organisationss.push(new Models.OrganisationsContacts(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\torganisationss {\n\t\t\t${Models.OrganisationsContacts.getAttributes().join('\\n')}\n\t\t\torganisations {\n\t\t\t\t${Models.OrganisationEntity.getAttributes().join('\\n')}\n\t\t\t}\n\t\t}\n\t\tactivitiess {\n\t\t\t${Models.ActivityEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tcontactEmailss {\n\t\t\t${Models.ContactEmailEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tloggedEvents {\n\t\t\t${Models.ContactTimelineEventsEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\torganisationss: {},\n\t\t\tactivitiess: {},\n\t\t\tcontactEmailss: {},\n\t\t\tloggedEvents: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'activitiess',\n\t\t\t\t\t\t\t'contactEmailss',\n\t\t\t\t\t\t\t'loggedEvents',\n\t\t\t\t\t\t\t'organisationss',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\t/**\n\t * Gets the timeline event entity type for this form.\n\t */\n\tpublic getTimelineEventEntity = () => {\n\t\t// % protected region % [Modify the getTimelineEventEntity here] off begin\n\t\treturn Models.ContactTimelineEventsEntity;\n\t\t// % protected region % [Modify the getTimelineEventEntity here] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(ContactEntity.prototype, 'created');\nCRUD(modifiedAttr)(ContactEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffContactEmailEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffContactEmailEntity } from 'Models/Security/Acl/StaffContactEmailEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IContactEmailEntityAttributes extends IModelAttributes {\n\temail: string;\n\n\tcontactId?: string;\n\tcontact?: Models.ContactEntity | Models.IContactEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('ContactEmailEntity', 'Contact Email')\n// % protected region % [Customise your entity metadata here] end\nexport default class ContactEmailEntity extends Model implements IContactEmailEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffContactEmailEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Email'] off begin\n\t@Validators.Required()\n\t@Validators.Email()\n\t@Validators.Unique()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Email',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic email: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Email'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact'] off begin\n\t\tname: 'Contact',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 20,\n\t\treferenceTypeFunc: () => Models.ContactEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contact'] end\n\t})\n\tpublic contactId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic contact: Models.ContactEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.email !== undefined) {\n\t\t\t\tthis.email = attributes.email;\n\t\t\t}\n\t\t\tif (attributes.contactId !== undefined) {\n\t\t\t\tthis.contactId = attributes.contactId;\n\t\t\t}\n\t\t\tif (attributes.contact !== undefined) {\n\t\t\t\tif (attributes.contact === null) {\n\t\t\t\t\tthis.contact = attributes.contact;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.contact instanceof Models.ContactEntity) {\n\t\t\t\t\t\tthis.contact = attributes.contact;\n\t\t\t\t\t\tthis.contactId = attributes.contact.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.contact = new Models.ContactEntity(attributes.contact);\n\t\t\t\t\t\tthis.contactId = this.contact.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tcontact {\n\t\t\t${Models.ContactEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(ContactEmailEntity.prototype, 'created');\nCRUD(modifiedAttr)(ContactEmailEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffDealEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchManyToManyFunc,\n\tmakeJoinEqualsFunc,\n\tmakeFetchOneToManyFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffDealEntity } from 'Models/Security/Acl/StaffDealEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport { TimelineModel } from 'Timelines/TimelineModel';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IDealEntityAttributes extends IModelAttributes {\n\tname: string;\n\tmetadata: string;\n\n\tactivitiess: Array;\n\torganisationId?: string;\n\torganisation?: Models.OrganisationEntity | Models.IOrganisationEntityAttributes;\n\tloggedEvents: Array;\n\tstagess: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('DealEntity', 'Deal')\n// % protected region % [Customise your entity metadata here] end\nexport default class DealEntity extends Model implements IDealEntityAttributes, TimelineModel {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffDealEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@Validators.Unique()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Metadata',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic metadata: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] end\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] off begin\n\t\tname: \"Activitiess\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 30,\n\t\treferenceTypeFunc: () => Models.ActivityEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'activitiess',\n\t\t\toppositeEntity: () => Models.ActivityEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] end\n\t})\n\tpublic activitiess: Models.ActivityEntity[] = [];\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisation'] off begin\n\t\tname: 'Organisation',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 40,\n\t\treferenceTypeFunc: () => Models.OrganisationEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Organisation'] end\n\t})\n\tpublic organisationId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic organisation: Models.OrganisationEntity;\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] off begin\n\t\tname: \"Logged Events\",\n\t\tdisplayType: 'hidden',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.DealTimelineEventsEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'loggedEvents',\n\t\t\toppositeEntity: () => Models.DealTimelineEventsEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] end\n\t})\n\tpublic loggedEvents: Models.DealTimelineEventsEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Stages'] off begin\n\t\tname: 'Stages',\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 60,\n\t\tisJoinEntity: true,\n\t\treferenceTypeFunc: () => Models.StagesDeals,\n\t\toptionEqualFunc: makeJoinEqualsFunc('stagesId'),\n\t\treferenceResolveFunction: makeFetchManyToManyFunc({\n\t\t\tentityName: 'dealEntity',\n\t\t\toppositeEntityName: 'stageEntity',\n\t\t\trelationName: 'deals',\n\t\t\trelationOppositeName: 'stages',\n\t\t\tentity: () => Models.DealEntity,\n\t\t\tjoinEntity: () => Models.StagesDeals,\n\t\t\toppositeEntity: () => Models.StageEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Stages'] end\n\t})\n\tpublic stagess: Models.StagesDeals[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.metadata !== undefined) {\n\t\t\t\tthis.metadata = attributes.metadata;\n\t\t\t}\n\t\t\tif (attributes.activitiess !== undefined && Array.isArray(attributes.activitiess)) {\n\t\t\t\tfor (const model of attributes.activitiess) {\n\t\t\t\t\tif (model instanceof Models.ActivityEntity) {\n\t\t\t\t\t\tthis.activitiess.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.activitiess.push(new Models.ActivityEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.organisationId !== undefined) {\n\t\t\t\tthis.organisationId = attributes.organisationId;\n\t\t\t}\n\t\t\tif (attributes.organisation !== undefined) {\n\t\t\t\tif (attributes.organisation === null) {\n\t\t\t\t\tthis.organisation = attributes.organisation;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.organisation instanceof Models.OrganisationEntity) {\n\t\t\t\t\t\tthis.organisation = attributes.organisation;\n\t\t\t\t\t\tthis.organisationId = attributes.organisation.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.organisation = new Models.OrganisationEntity(attributes.organisation);\n\t\t\t\t\t\tthis.organisationId = this.organisation.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.loggedEvents !== undefined && Array.isArray(attributes.loggedEvents)) {\n\t\t\t\tfor (const model of attributes.loggedEvents) {\n\t\t\t\t\tif (model instanceof Models.DealTimelineEventsEntity) {\n\t\t\t\t\t\tthis.loggedEvents.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.loggedEvents.push(new Models.DealTimelineEventsEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.stagess !== undefined && Array.isArray(attributes.stagess)) {\n\t\t\t\tfor (const model of attributes.stagess) {\n\t\t\t\t\tif (model instanceof Models.StagesDeals) {\n\t\t\t\t\t\tthis.stagess.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.stagess.push(new Models.StagesDeals(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tstagess {\n\t\t\t${Models.StagesDeals.getAttributes().join('\\n')}\n\t\t\tstages {\n\t\t\t\t${Models.StageEntity.getAttributes().join('\\n')}\n\t\t\t}\n\t\t}\n\t\tactivitiess {\n\t\t\t${Models.ActivityEntity.getAttributes().join('\\n')}\n\t\t}\n\t\torganisation {\n\t\t\t${Models.OrganisationEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tloggedEvents {\n\t\t\t${Models.DealTimelineEventsEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\tstagess: {},\n\t\t\tactivitiess: {},\n\t\t\tloggedEvents: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'activitiess',\n\t\t\t\t\t\t\t'loggedEvents',\n\t\t\t\t\t\t\t'stagess',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\t/**\n\t * Gets the timeline event entity type for this form.\n\t */\n\tpublic getTimelineEventEntity = () => {\n\t\t// % protected region % [Modify the getTimelineEventEntity here] off begin\n\t\treturn Models.DealTimelineEventsEntity;\n\t\t// % protected region % [Modify the getTimelineEventEntity here] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(DealEntity.prototype, 'created');\nCRUD(modifiedAttr)(DealEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffEventEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class VisitorsEventEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = true;\n\tpublic constructor() {\n\t\tthis.group = 'Visitors';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn false;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeEnumFetchFunction,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffEventEntity } from 'Models/Security/Acl/StaffEventEntity';\nimport { VisitorsEventEntity } from 'Models/Security/Acl/VisitorsEventEntity';\nimport * as Enums from '../Enums';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IEventEntityAttributes extends IModelAttributes {\n\tstatus: Enums.runStatus;\n\tfingerprintId: string;\n\tname: string;\n\tpayload: string;\n\tbatchId: string;\n\tbatchOrder: number;\n\tresult: string;\n\tipAddress: string;\n\n\tsourceId?: string;\n\tsource?: Models.TrustedSourceEntity | Models.ITrustedSourceEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('EventEntity', 'Event')\n// % protected region % [Customise your entity metadata here] end\nexport default class EventEntity extends Model implements IEventEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffEventEntity(),\n\t\tnew VisitorsEventEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Status'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Status',\n\t\tdisplayType: 'enum-combobox',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: (attr: string) => {\n\t\t\treturn AttrUtils.standardiseEnum(attr, Enums.runStatusOptions);\n\t\t},\n\t\tenumResolveFunction: makeEnumFetchFunction(Enums.runStatusOptions),\n\t\tdisplayFunction: (attribute: Enums.runStatus) => Enums.runStatusOptions[attribute],\n\t})\n\tpublic status: Enums.runStatus;\n\t// % protected region % [Modify props to the crud options here for attribute 'Status'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Fingerprint Id'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Fingerprint Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic fingerprintId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Fingerprint Id'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Payload'] off begin\n\t/**\n\t * JSON\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Payload',\n\t\tdisplayType: 'textarea',\n\t\torder: 40,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic payload: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Payload'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Batch Id'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Batch Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 50,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic batchId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Batch Id'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Batch Order'] off begin\n\t@Validators.Integer()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Batch Order',\n\t\tdisplayType: 'textfield',\n\t\torder: 60,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseInteger,\n\t})\n\tpublic batchOrder: number;\n\t// % protected region % [Modify props to the crud options here for attribute 'Batch Order'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Result'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Result',\n\t\tdisplayType: 'textarea',\n\t\torder: 70,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic result: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Result'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'IP Address'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'IP Address',\n\t\tdisplayType: 'textfield',\n\t\torder: 80,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic ipAddress: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'IP Address'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Source'] off begin\n\t\tname: 'Source',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 90,\n\t\treferenceTypeFunc: () => Models.TrustedSourceEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Source'] end\n\t})\n\tpublic sourceId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic source: Models.TrustedSourceEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.status !== undefined) {\n\t\t\t\tthis.status = attributes.status;\n\t\t\t}\n\t\t\tif (attributes.fingerprintId !== undefined) {\n\t\t\t\tthis.fingerprintId = attributes.fingerprintId;\n\t\t\t}\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.payload !== undefined) {\n\t\t\t\tthis.payload = attributes.payload;\n\t\t\t}\n\t\t\tif (attributes.batchId !== undefined) {\n\t\t\t\tthis.batchId = attributes.batchId;\n\t\t\t}\n\t\t\tif (attributes.batchOrder !== undefined) {\n\t\t\t\tthis.batchOrder = attributes.batchOrder;\n\t\t\t}\n\t\t\tif (attributes.result !== undefined) {\n\t\t\t\tthis.result = attributes.result;\n\t\t\t}\n\t\t\tif (attributes.ipAddress !== undefined) {\n\t\t\t\tthis.ipAddress = attributes.ipAddress;\n\t\t\t}\n\t\t\tif (attributes.sourceId !== undefined) {\n\t\t\t\tthis.sourceId = attributes.sourceId;\n\t\t\t}\n\t\t\tif (attributes.source !== undefined) {\n\t\t\t\tif (attributes.source === null) {\n\t\t\t\t\tthis.source = attributes.source;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.source instanceof Models.TrustedSourceEntity) {\n\t\t\t\t\t\tthis.source = attributes.source;\n\t\t\t\t\t\tthis.sourceId = attributes.source.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.source = new Models.TrustedSourceEntity(attributes.source);\n\t\t\t\t\t\tthis.sourceId = this.source.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tsource {\n\t\t\t${Models.TrustedSourceEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(EventEntity.prototype, 'created');\nCRUD(modifiedAttr)(EventEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffOrganisationEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchManyToManyFunc,\n\tmakeJoinEqualsFunc,\n\tmakeFetchOneToManyFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffOrganisationEntity } from 'Models/Security/Acl/StaffOrganisationEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport { TimelineModel } from 'Timelines/TimelineModel';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IOrganisationEntityAttributes extends IModelAttributes {\n\tname: string;\n\tmetadata: string;\n\n\tactivitiess: Array;\n\tdealss: Array;\n\tloggedEvents: Array;\n\tcontactss: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('OrganisationEntity', 'Organisation')\n// % protected region % [Customise your entity metadata here] end\nexport default class OrganisationEntity extends Model implements IOrganisationEntityAttributes, TimelineModel {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffOrganisationEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@Validators.Unique()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Metadata',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic metadata: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Metadata'] end\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] off begin\n\t\tname: \"Activitiess\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 30,\n\t\treferenceTypeFunc: () => Models.ActivityEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'activitiess',\n\t\t\toppositeEntity: () => Models.ActivityEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Activities'] end\n\t})\n\tpublic activitiess: Models.ActivityEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deals'] off begin\n\t\tname: \"Dealss\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 40,\n\t\treferenceTypeFunc: () => Models.DealEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'dealss',\n\t\t\toppositeEntity: () => Models.DealEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deals'] end\n\t})\n\tpublic dealss: Models.DealEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] off begin\n\t\tname: \"Logged Events\",\n\t\tdisplayType: 'hidden',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.OrganisationTimelineEventsEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'loggedEvents',\n\t\t\toppositeEntity: () => Models.OrganisationTimelineEventsEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Logged Event'] end\n\t})\n\tpublic loggedEvents: Models.OrganisationTimelineEventsEntity[] = [];\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contacts'] off begin\n\t\tname: 'Contacts',\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 60,\n\t\tisJoinEntity: true,\n\t\treferenceTypeFunc: () => Models.OrganisationsContacts,\n\t\toptionEqualFunc: makeJoinEqualsFunc('contactsId'),\n\t\treferenceResolveFunction: makeFetchManyToManyFunc({\n\t\t\tentityName: 'organisationEntity',\n\t\t\toppositeEntityName: 'contactEntity',\n\t\t\trelationName: 'organisations',\n\t\t\trelationOppositeName: 'contacts',\n\t\t\tentity: () => Models.OrganisationEntity,\n\t\t\tjoinEntity: () => Models.OrganisationsContacts,\n\t\t\toppositeEntity: () => Models.ContactEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Contacts'] end\n\t})\n\tpublic contactss: Models.OrganisationsContacts[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.metadata !== undefined) {\n\t\t\t\tthis.metadata = attributes.metadata;\n\t\t\t}\n\t\t\tif (attributes.activitiess !== undefined && Array.isArray(attributes.activitiess)) {\n\t\t\t\tfor (const model of attributes.activitiess) {\n\t\t\t\t\tif (model instanceof Models.ActivityEntity) {\n\t\t\t\t\t\tthis.activitiess.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.activitiess.push(new Models.ActivityEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.dealss !== undefined && Array.isArray(attributes.dealss)) {\n\t\t\t\tfor (const model of attributes.dealss) {\n\t\t\t\t\tif (model instanceof Models.DealEntity) {\n\t\t\t\t\t\tthis.dealss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.dealss.push(new Models.DealEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.loggedEvents !== undefined && Array.isArray(attributes.loggedEvents)) {\n\t\t\t\tfor (const model of attributes.loggedEvents) {\n\t\t\t\t\tif (model instanceof Models.OrganisationTimelineEventsEntity) {\n\t\t\t\t\t\tthis.loggedEvents.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.loggedEvents.push(new Models.OrganisationTimelineEventsEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.contactss !== undefined && Array.isArray(attributes.contactss)) {\n\t\t\t\tfor (const model of attributes.contactss) {\n\t\t\t\t\tif (model instanceof Models.OrganisationsContacts) {\n\t\t\t\t\t\tthis.contactss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.contactss.push(new Models.OrganisationsContacts(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tcontactss {\n\t\t\t${Models.OrganisationsContacts.getAttributes().join('\\n')}\n\t\t\tcontacts {\n\t\t\t\t${Models.ContactEntity.getAttributes().join('\\n')}\n\t\t\t}\n\t\t}\n\t\tactivitiess {\n\t\t\t${Models.ActivityEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tdealss {\n\t\t\t${Models.DealEntity.getAttributes().join('\\n')}\n\t\t}\n\t\tloggedEvents {\n\t\t\t${Models.OrganisationTimelineEventsEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\tcontactss: {},\n\t\t\tactivitiess: {},\n\t\t\tdealss: {},\n\t\t\tloggedEvents: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'activitiess',\n\t\t\t\t\t\t\t'dealss',\n\t\t\t\t\t\t\t'loggedEvents',\n\t\t\t\t\t\t\t'contactss',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\t/**\n\t * Gets the timeline event entity type for this form.\n\t */\n\tpublic getTimelineEventEntity = () => {\n\t\t// % protected region % [Modify the getTimelineEventEntity here] off begin\n\t\treturn Models.OrganisationTimelineEventsEntity;\n\t\t// % protected region % [Modify the getTimelineEventEntity here] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(OrganisationEntity.prototype, 'created');\nCRUD(modifiedAttr)(OrganisationEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffPipelineEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchOneToManyFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffPipelineEntity } from 'Models/Security/Acl/StaffPipelineEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IPipelineEntityAttributes extends IModelAttributes {\n\tname: string;\n\tdescription: string;\n\n\tunnamedEntity1ss: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('PipelineEntity', 'Pipeline')\n// % protected region % [Customise your entity metadata here] end\nexport default class PipelineEntity extends Model implements IPipelineEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffPipelineEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@Validators.Unique()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Unnamed Entity 1s'] off begin\n\t\tname: \"Unnamed Entity 1ss\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 30,\n\t\treferenceTypeFunc: () => Models.StageEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'unnamedEntity1ss',\n\t\t\toppositeEntity: () => Models.StageEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Unnamed Entity 1s'] end\n\t})\n\tpublic unnamedEntity1ss: Models.StageEntity[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.unnamedEntity1ss !== undefined && Array.isArray(attributes.unnamedEntity1ss)) {\n\t\t\t\tfor (const model of attributes.unnamedEntity1ss) {\n\t\t\t\t\tif (model instanceof Models.StageEntity) {\n\t\t\t\t\t\tthis.unnamedEntity1ss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.unnamedEntity1ss.push(new Models.StageEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tunnamedEntity1ss {\n\t\t\t${Models.StageEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\tunnamedEntity1ss: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'unnamedEntity1ss',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(PipelineEntity.prototype, 'created');\nCRUD(modifiedAttr)(PipelineEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffStaffEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Symbols } from 'Symbols';\nimport { initValidators, IModelAttributeValidationError, ErrorType } from '../Util';\nimport { Model } from 'Models/Model';\n\nexport default function validate(validatorName: string, validatorFunction: (property: any, target: any) => Promise) {\n\treturn (target: object, key: string) => {\n\t\tinitValidators(target, key);\n\t\ttarget[Symbols.validatorMap][key].push(validatorName);\n\t\ttarget[Symbols.validator].push(\n\t\t\t(model: Model): Promise => new Promise(async (resolve) => {\n\t\t\t\tconst error = await validatorFunction(model[key], model);\n\t\t\t\tif (error === null) {\n\t\t\t\t\tresolve(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tresolve({\n\t\t\t\t\terrorType: ErrorType.INVALID,\n\t\t\t\t\terrorMessage: error,\n\t\t\t\t\tattributeName: key,\n\t\t\t\t\ttarget: model\n\t\t\t\t});\n\t\t\t})\n\t\t);\n\t};\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffStaffEntity } from 'Models/Security/Acl/StaffStaffEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IStaffEntityAttributes extends IModelAttributes {\n\temail: string;\n\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('StaffEntity', 'Staff')\n// % protected region % [Customise your entity metadata here] end\nexport default class StaffEntity extends Model implements IStaffEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffStaffEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t'email',\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Email'] off begin\n\t@Validators.Email()\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Email',\n\t\tdisplayType: 'displayfield',\n\t\torder: 10,\n\t\tcreateFieldType: 'textfield',\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic email: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Email'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Password'] off begin\n\t@Validators.Length(6)\n\t@observable\n\t@CRUD({\n\t\tname: 'Password',\n\t\tdisplayType: 'hidden',\n\t\torder: 20,\n\t\tcreateFieldType: 'password',\n\t})\n\tpublic password: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Password'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Confirm Password'] off begin\n\t@Validators.Custom('Password Match', (e: string, target: StaffEntity) => {\n\t\treturn new Promise(resolve => resolve(target.password !== e ? \"Password fields do not match\" : null))\n\t})\n\t@observable\n\t@CRUD({\n\t\tname: 'Confirm Password',\n\t\tdisplayType: 'hidden',\n\t\torder: 30,\n\t\tcreateFieldType: 'password',\n\t})\n\tpublic _confirmPassword: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Confirm Password'] end\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.email !== undefined) {\n\t\t\t\tthis.email = attributes.email;\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\n\t\tif (formMode === 'create') {\n\t\t\trelationPath['password'] = {};\n\n\t\t\tif (this.password !== this._confirmPassword) {\n\t\t\t\tthrow Error(\"Password fields do not match\");\n\t\t\t}\n\t\t}\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\tgraphQlInputType: formMode === 'create'\n\t\t\t\t\t? `[${this.getModelName()}CreateInput]`\n\t\t\t\t\t: `[${this.getModelName()}Input]`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.email;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(StaffEntity.prototype, 'created');\nCRUD(modifiedAttr)(StaffEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffStageEntity implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchManyToManyFunc,\n\tmakeJoinEqualsFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffStageEntity } from 'Models/Security/Acl/StaffStageEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IStageEntityAttributes extends IModelAttributes {\n\tname: string;\n\tdescription: string;\n\tsortOrder: number;\n\n\tpipelineId?: string;\n\tpipeline?: Models.PipelineEntity | Models.IPipelineEntityAttributes;\n\tdealss: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('StageEntity', 'Stage')\n// % protected region % [Customise your entity metadata here] end\nexport default class StageEntity extends Model implements IStageEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffStageEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textarea',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Sort Order'] off begin\n\t@Validators.Integer()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Sort Order',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseInteger,\n\t})\n\tpublic sortOrder: number;\n\t// % protected region % [Modify props to the crud options here for attribute 'Sort Order'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Pipeline'] off begin\n\t\tname: 'Pipeline',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 40,\n\t\treferenceTypeFunc: () => Models.PipelineEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Pipeline'] end\n\t})\n\tpublic pipelineId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic pipeline: Models.PipelineEntity;\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deals'] off begin\n\t\tname: 'Deals',\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 50,\n\t\tisJoinEntity: true,\n\t\treferenceTypeFunc: () => Models.StagesDeals,\n\t\toptionEqualFunc: makeJoinEqualsFunc('dealsId'),\n\t\treferenceResolveFunction: makeFetchManyToManyFunc({\n\t\t\tentityName: 'stageEntity',\n\t\t\toppositeEntityName: 'dealEntity',\n\t\t\trelationName: 'stages',\n\t\t\trelationOppositeName: 'deals',\n\t\t\tentity: () => Models.StageEntity,\n\t\t\tjoinEntity: () => Models.StagesDeals,\n\t\t\toppositeEntity: () => Models.DealEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Deals'] end\n\t})\n\tpublic dealss: Models.StagesDeals[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.sortOrder !== undefined) {\n\t\t\t\tthis.sortOrder = attributes.sortOrder;\n\t\t\t}\n\t\t\tif (attributes.pipelineId !== undefined) {\n\t\t\t\tthis.pipelineId = attributes.pipelineId;\n\t\t\t}\n\t\t\tif (attributes.pipeline !== undefined) {\n\t\t\t\tif (attributes.pipeline === null) {\n\t\t\t\t\tthis.pipeline = attributes.pipeline;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.pipeline instanceof Models.PipelineEntity) {\n\t\t\t\t\t\tthis.pipeline = attributes.pipeline;\n\t\t\t\t\t\tthis.pipelineId = attributes.pipeline.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.pipeline = new Models.PipelineEntity(attributes.pipeline);\n\t\t\t\t\t\tthis.pipelineId = this.pipeline.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attributes.dealss !== undefined && Array.isArray(attributes.dealss)) {\n\t\t\t\tfor (const model of attributes.dealss) {\n\t\t\t\t\tif (model instanceof Models.StagesDeals) {\n\t\t\t\t\t\tthis.dealss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.dealss.push(new Models.StagesDeals(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tdealss {\n\t\t\t${Models.StagesDeals.getAttributes().join('\\n')}\n\t\t\tdeals {\n\t\t\t\t${Models.DealEntity.getAttributes().join('\\n')}\n\t\t\t}\n\t\t}\n\t\tpipeline {\n\t\t\t${Models.PipelineEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\tdealss: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'dealss',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(StageEntity.prototype, 'created');\nCRUD(modifiedAttr)(StageEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tmakeFetchOneToManyFunc,\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface ITrustedSourceEntityAttributes extends IModelAttributes {\n\tname: string;\n\tkey: string;\n\n\teventss: Array;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('TrustedSourceEntity', 'Trusted Source')\n// % protected region % [Customise your entity metadata here] end\nexport default class TrustedSourceEntity extends Model implements ITrustedSourceEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] off begin\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Name',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic name: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Name'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Key'] off begin\n\t@Validators.Required()\n\t@Validators.Unique()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Key',\n\t\tdisplayType: 'textfield',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic key: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Key'] end\n\n\t@observable\n\t@attribute({isReference: true})\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Events'] off begin\n\t\tname: \"Eventss\",\n\t\tdisplayType: 'reference-multicombobox',\n\t\torder: 30,\n\t\treferenceTypeFunc: () => Models.EventEntity,\n\t\treferenceResolveFunction: makeFetchOneToManyFunc({\n\t\t\trelationName: 'eventss',\n\t\t\toppositeEntity: () => Models.EventEntity,\n\t\t}),\n\t\t// % protected region % [Modify props to the crud options here for reference 'Events'] end\n\t})\n\tpublic eventss: Models.EventEntity[] = [];\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.name !== undefined) {\n\t\t\t\tthis.name = attributes.name;\n\t\t\t}\n\t\t\tif (attributes.key !== undefined) {\n\t\t\t\tthis.key = attributes.key;\n\t\t\t}\n\t\t\tif (attributes.eventss !== undefined && Array.isArray(attributes.eventss)) {\n\t\t\t\tfor (const model of attributes.eventss) {\n\t\t\t\t\tif (model instanceof Models.EventEntity) {\n\t\t\t\t\t\tthis.eventss.push(model);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.eventss.push(new Models.EventEntity(model));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\teventss {\n\t\t\t${Models.EventEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t\teventss: {},\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t\t'eventss',\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(TrustedSourceEntity.prototype, 'created');\nCRUD(modifiedAttr)(TrustedSourceEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffContactEntity } from 'Models/Security/Acl/StaffContactEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IContactTimelineEventsEntityAttributes extends IModelAttributes {\n\taction: string;\n\tactionTitle: string;\n\tdescription: string;\n\tgroupId: string;\n\n\tentityId?: string;\n\tentity?: Models.ContactEntity | Models.IContactEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('ContactTimelineEventsEntity', 'Contact Timeline Events')\n// % protected region % [Customise your entity metadata here] end\nexport default class ContactTimelineEventsEntity extends Model implements IContactTimelineEventsEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffContactEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] off begin\n\t/**\n\t * The action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic action: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] off begin\n\t/**\n\t * The title of the action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action Title',\n\t\tdisplayType: 'textfield',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic actionTitle: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t/**\n\t * Decription of the event\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] off begin\n\t/**\n\t * Id of the group the events belong to\n\t */\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Group Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 40,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseUuid,\n\t})\n\tpublic groupId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] off begin\n\t\tname: 'Entity',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.ContactEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] end\n\t})\n\tpublic entityId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic entity: Models.ContactEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.action !== undefined) {\n\t\t\t\tthis.action = attributes.action;\n\t\t\t}\n\t\t\tif (attributes.actionTitle !== undefined) {\n\t\t\t\tthis.actionTitle = attributes.actionTitle;\n\t\t\t}\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.groupId !== undefined) {\n\t\t\t\tthis.groupId = attributes.groupId;\n\t\t\t}\n\t\t\tif (attributes.entityId !== undefined) {\n\t\t\t\tthis.entityId = attributes.entityId;\n\t\t\t}\n\t\t\tif (attributes.entity !== undefined) {\n\t\t\t\tif (attributes.entity === null) {\n\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.entity instanceof Models.ContactEntity) {\n\t\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t\t\tthis.entityId = attributes.entity.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.entity = new Models.ContactEntity(attributes.entity);\n\t\t\t\t\t\tthis.entityId = this.entity.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tentity {\n\t\t\t${Models.ContactEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(ContactTimelineEventsEntity.prototype, 'created');\nCRUD(modifiedAttr)(ContactTimelineEventsEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffDealEntity } from 'Models/Security/Acl/StaffDealEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IDealTimelineEventsEntityAttributes extends IModelAttributes {\n\taction: string;\n\tactionTitle: string;\n\tdescription: string;\n\tgroupId: string;\n\n\tentityId?: string;\n\tentity?: Models.DealEntity | Models.IDealEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('DealTimelineEventsEntity', 'Deal Timeline Events')\n// % protected region % [Customise your entity metadata here] end\nexport default class DealTimelineEventsEntity extends Model implements IDealTimelineEventsEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffDealEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] off begin\n\t/**\n\t * The action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic action: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] off begin\n\t/**\n\t * The title of the action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action Title',\n\t\tdisplayType: 'textfield',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic actionTitle: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t/**\n\t * Decription of the event\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] off begin\n\t/**\n\t * Id of the group the events belong to\n\t */\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Group Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 40,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseUuid,\n\t})\n\tpublic groupId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] off begin\n\t\tname: 'Entity',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.DealEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] end\n\t})\n\tpublic entityId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic entity: Models.DealEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.action !== undefined) {\n\t\t\t\tthis.action = attributes.action;\n\t\t\t}\n\t\t\tif (attributes.actionTitle !== undefined) {\n\t\t\t\tthis.actionTitle = attributes.actionTitle;\n\t\t\t}\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.groupId !== undefined) {\n\t\t\t\tthis.groupId = attributes.groupId;\n\t\t\t}\n\t\t\tif (attributes.entityId !== undefined) {\n\t\t\t\tthis.entityId = attributes.entityId;\n\t\t\t}\n\t\t\tif (attributes.entity !== undefined) {\n\t\t\t\tif (attributes.entity === null) {\n\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.entity instanceof Models.DealEntity) {\n\t\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t\t\tthis.entityId = attributes.entity.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.entity = new Models.DealEntity(attributes.entity);\n\t\t\t\t\t\tthis.entityId = this.entity.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tentity {\n\t\t\t${Models.DealEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(DealTimelineEventsEntity.prototype, 'created');\nCRUD(modifiedAttr)(DealTimelineEventsEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { action, observable } from 'mobx';\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport * as Validators from 'Validators';\nimport { CRUD } from '../CRUDOptions';\nimport * as AttrUtils from \"Util/AttributeUtils\";\nimport { IAcl } from 'Models/Security/IAcl';\nimport {\n\tgetCreatedModifiedCrudOptions,\n} from 'Util/EntityUtils';\nimport { StaffOrganisationEntity } from 'Models/Security/Acl/StaffOrganisationEntity';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport {SuperAdministratorScheme} from '../Security/Acl/SuperAdministratorScheme';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IOrganisationTimelineEventsEntityAttributes extends IModelAttributes {\n\taction: string;\n\tactionTitle: string;\n\tdescription: string;\n\tgroupId: string;\n\n\tentityId?: string;\n\tentity?: Models.OrganisationEntity | Models.IOrganisationEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n// % protected region % [Customise your entity metadata here] off begin\n@entity('OrganisationTimelineEventsEntity', 'Organisation Timeline Events')\n// % protected region % [Customise your entity metadata here] end\nexport default class OrganisationTimelineEventsEntity extends Model implements IOrganisationTimelineEventsEntityAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew SuperAdministratorScheme(),\n\t\tnew StaffOrganisationEntity(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in create operations.\n\t */\n\tpublic static excludeFromCreate: string[] = [\n\t\t// % protected region % [Add any custom create exclusions here] off begin\n\t\t// % protected region % [Add any custom create exclusions here] end\n\t];\n\n\t/**\n\t * Fields to exclude from the JSON serialization in update operations.\n\t */\n\tpublic static excludeFromUpdate: string[] = [\n\t\t// % protected region % [Add any custom update exclusions here] off begin\n\t\t// % protected region % [Add any custom update exclusions here] end\n\t];\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] off begin\n\t/**\n\t * The action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action',\n\t\tdisplayType: 'textfield',\n\t\torder: 10,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic action: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] off begin\n\t/**\n\t * The title of the action taken\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Action Title',\n\t\tdisplayType: 'textfield',\n\t\torder: 20,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic actionTitle: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Action Title'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] off begin\n\t/**\n\t * Decription of the event\n\t */\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Description',\n\t\tdisplayType: 'textfield',\n\t\torder: 30,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'like',\n\t\tsearchTransform: AttrUtils.standardiseString,\n\t})\n\tpublic description: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Description'] end\n\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] off begin\n\t/**\n\t * Id of the group the events belong to\n\t */\n\t@Validators.Required()\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\tname: 'Group Id',\n\t\tdisplayType: 'textfield',\n\t\torder: 40,\n\t\theaderColumn: true,\n\t\tsearchable: true,\n\t\tsearchFunction: 'equal',\n\t\tsearchTransform: AttrUtils.standardiseUuid,\n\t})\n\tpublic groupId: string;\n\t// % protected region % [Modify props to the crud options here for attribute 'Group Id'] end\n\n\t@observable\n\t@attribute()\n\t@CRUD({\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] off begin\n\t\tname: 'Entity',\n\t\tdisplayType: 'reference-combobox',\n\t\torder: 50,\n\t\treferenceTypeFunc: () => Models.OrganisationEntity,\n\t\t// % protected region % [Modify props to the crud options here for reference 'Entity'] end\n\t})\n\tpublic entityId?: string;\n\t@observable\n\t@attribute({isReference: true})\n\tpublic entity: Models.OrganisationEntity;\n\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\t// eslint-disable-next-line @typescript-eslint/no-useless-constructor\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t/**\n\t * Assigns fields from a passed in JSON object to the fields in this model.\n\t * Any reference objects that are passed in are converted to models if they are not already.\n\t * This function is called from the constructor to assign the initial fields.\n\t */\n\t@action\n\tpublic assignAttributes(attributes?: Partial) {\n\t\t// % protected region % [Override assign attributes here] off begin\n\t\tsuper.assignAttributes(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.action !== undefined) {\n\t\t\t\tthis.action = attributes.action;\n\t\t\t}\n\t\t\tif (attributes.actionTitle !== undefined) {\n\t\t\t\tthis.actionTitle = attributes.actionTitle;\n\t\t\t}\n\t\t\tif (attributes.description !== undefined) {\n\t\t\t\tthis.description = attributes.description;\n\t\t\t}\n\t\t\tif (attributes.groupId !== undefined) {\n\t\t\t\tthis.groupId = attributes.groupId;\n\t\t\t}\n\t\t\tif (attributes.entityId !== undefined) {\n\t\t\t\tthis.entityId = attributes.entityId;\n\t\t\t}\n\t\t\tif (attributes.entity !== undefined) {\n\t\t\t\tif (attributes.entity === null) {\n\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t} else {\n\t\t\t\t\tif (attributes.entity instanceof Models.OrganisationEntity) {\n\t\t\t\t\t\tthis.entity = attributes.entity;\n\t\t\t\t\t\tthis.entityId = attributes.entity.id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.entity = new Models.OrganisationEntity(attributes.entity);\n\t\t\t\t\t\tthis.entityId = this.entity.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// % protected region % [Override assign attributes here] end\n\n\t\t\t// % protected region % [Add any extra assign attributes logic here] off begin\n\t\t\t// % protected region % [Add any extra assign attributes logic here] end\n\t\t}\n\t}\n\n\t/**\n\t * Additional fields that are added to GraphQL queries when using the\n\t * the managed model APIs.\n\t */\n\t// % protected region % [Customize Default Expands here] off begin\n\tpublic defaultExpands = `\n\t\tentity {\n\t\t\t${Models.OrganisationEntity.getAttributes().join('\\n')}\n\t\t}\n\t`;\n\t// % protected region % [Customize Default Expands here] end\n\n\t/**\n\t * The save method that is called from the admin CRUD components.\n\t */\n\t// % protected region % [Customize Save From Crud here] off begin\n\tpublic async saveFromCrud(formMode: EntityFormMode) {\n\t\tconst relationPath = {\n\t\t};\n\t\treturn this.save(\n\t\t\trelationPath,\n\t\t\t{\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: 'mergeReferences',\n\t\t\t\t\t\tgraphQlType: '[String]',\n\t\t\t\t\t\tvalue: [\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}\n\t// % protected region % [Customize Save From Crud here] end\n\n\t/**\n\t * Returns the string representation of this entity to display on the UI.\n\t */\n\tpublic getDisplayName() {\n\t\t// % protected region % [Customise the display name for this entity] off begin\n\t\treturn this.id;\n\t\t// % protected region % [Customise the display name for this entity] end\n\t}\n\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}\n\n// % protected region % [Modify the create and modified CRUD attributes here] off begin\n/*\n * Retrieve the created and modified CRUD attributes for defining the CRUD views and decorate the class with them.\n */\nconst [ createdAttr, modifiedAttr ] = getCreatedModifiedCrudOptions();\nCRUD(createdAttr)(OrganisationTimelineEventsEntity.prototype, 'created');\nCRUD(modifiedAttr)(OrganisationTimelineEventsEntity.prototype, 'modified');\n// % protected region % [Modify the create and modified CRUD attributes here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffContactsReferenceManyToMany implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport classNames from 'classnames';\nimport { IIconProps } from '../Helpers/Common';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport enum Display {\n\tSolid = 'btn--solid',\n\tOutline = 'btn--outline',\n\tText = 'btn--text',\n\tNone = '',\n\t// % protected region % [Add extra Display literals here] off begin\n\t// % protected region % [Add extra Display literals here] end\n}\n\nexport enum Colors {\n\tPrimary = 'btn--primary',\n\tSecondary = 'btn--secondary',\n\tWarning = 'btn--warning',\n\tError = 'btn--error',\n\tSuccess = 'btn--success',\n\tNone = '',\n\t// % protected region % [Add extra Color literals here] off begin\n\t// % protected region % [Add extra Color literals here] end\n}\n\nexport enum Sizes {\n\tExtraSmall = 'btn--xsm',\n\tSmall = 'btn--sm',\n\tMedium = 'btn--md',\n\tLarge = 'btn--lg',\n\tExtraLarge = 'btn--xlg',\n\tNone = '',\n\t// % protected region % [Add extra Sizes literals here] off begin\n\t// % protected region % [Add extra Sizes literals here] end\n}\n\nexport enum Widths {\n\tauto = 'btn--auto-width',\n\tfullWidth = 'btn--full-width',\n\t// % protected region % [Add extra widths literals here] off begin\n\t// % protected region % [Add extra widths literals here] end\n}\n\nexport enum QuickTypes {\n\tPrimary = 'btn--primary',\n\tSecondary = 'btn--secondary',\n\tNone = '',\n\t// % protected region % [Add extra QuickTypes literals here] off begin\n\t// % protected region % [Add extra QuickTypes literals here] end\n}\n\nexport interface ICbButtonProps {\n\ttype?: 'submit' | 'reset' | 'button';\n\tdisplay?: Display;\n\tcolors?: Colors;\n\tsizes?: Sizes;\n\twidths?: Widths;\n\tquickTypes?: QuickTypes;\n\tbuttonProps?: React.ButtonHTMLAttributes;\n\tclassName?: string;\n\tdisabled?: boolean;\n\tonClick?: ((event: React.MouseEvent) => void);\n\ticon?: IIconProps;\n\tlabelVisible?: false;\n\t// % protected region % [Add extra ICbButtonProps fields here] off begin\n\t// % protected region % [Add extra ICbButtonProps fields here] end\n}\n\n@observer\nexport class Button extends React.Component {\n\tstatic defaultProps: Partial = {\n\t\tcolors: Colors.Primary,\n\t\t// % protected region % [Add extra default props here] off begin\n\t\t// % protected region % [Add extra default props here] end\n\t}\n\n\t// % protected region % [Add extra methods and fields here] off begin\n\t// % protected region % [Add extra methods and fields here] end\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tconst icon = this.props.icon ? `btn--icon icon-${this.props.icon.icon} ${this.props.icon.iconPos}` : '';\n\t\tconst quickTypes = this.props.quickTypes ? this.props.quickTypes : '';\n\t\tconst display = this.props.display ? this.props.display : '';\n\t\tconst colors = this.props.colors ? this.props.colors : '';\n\t\tconst sizes = this.props.sizes ? this.props.sizes : '';\n\t\tconst widths = this.props.widths ? this.props.widths : '';\n\t\tconst className = this.props.className ? this.props.className : '';\n\t\tconst { disabled } = this.props;\n\n\t\tconst clazz = ['btn', icon, quickTypes, display, colors, sizes, widths, className];\n\n\t\tconst onClick = this.props.onClick || (this.props.buttonProps ? this.props.buttonProps.onClick : () => {});\n\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{labelVisible ? this.props.children : null}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport { IAcl } from '../Security/IAcl';\nimport { observable } from 'mobx';\nimport { StaffContactsReferenceManyToMany } from '../Security/Acl/StaffContactsReferenceManyToMany';\n\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IOrganisationsContactsAttributes extends IModelAttributes {\n\torganisationsId: string;\n\tcontactsId: string;\n\n\torganisations: Models.OrganisationEntity | Models.IOrganisationEntityAttributes;\n\tcontacts: Models.ContactEntity | Models.IContactEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n@entity('OrganisationsContacts')\nexport default class OrganisationsContacts extends Model implements IOrganisationsContactsAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew StaffContactsReferenceManyToMany(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t@observable\n\t@attribute()\n\tpublic organisationsId: string;\n\n\t@observable\n\t@attribute()\n\tpublic contactsId: string;\n\n\t@observable\n\t@attribute({isReference: true})\n\tpublic organisations: Models.OrganisationEntity;\n\n\t@observable\n\t@attribute({isReference: true})\n\tpublic contacts: Models.ContactEntity;\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.organisationsId) {\n\t\t\t\tthis.organisationsId = attributes.organisationsId;\n\t\t\t}\n\t\t\tif (attributes.contactsId) {\n\t\t\t\tthis.contactsId = attributes.contactsId;\n\t\t\t}\n\n\t\t\tif (attributes.organisations) {\n\t\t\t\tif (attributes.organisations instanceof Models.OrganisationEntity) {\n\t\t\t\t\tthis.organisations = attributes.organisations;\n\t\t\t\t\tthis.organisationsId = attributes.organisations.id;\n\t\t\t\t} else {\n\t\t\t\t\tthis.organisations = new Models.OrganisationEntity(attributes.organisations);\n\t\t\t\t\tthis.organisationsId = this.organisations.id;\n\t\t\t\t}\n\t\t\t} else if (attributes.organisationsId !== undefined) {\n\t\t\t\tthis.organisationsId = attributes.organisationsId;\n\t\t\t}\n\n\t\t\tif (attributes.contacts) {\n\t\t\t\tif (attributes.contacts instanceof Models.ContactEntity) {\n\t\t\t\t\tthis.contacts = attributes.contacts;\n\t\t\t\t\tthis.contactsId = attributes.contacts.id;\n\t\t\t\t} else {\n\t\t\t\t\tthis.contacts = new Models.ContactEntity(attributes.contacts);\n\t\t\t\t\tthis.contactsId = this.contacts.id;\n\t\t\t\t}\n\t\t\t} else if (attributes.contactsId !== undefined) {\n\t\t\t\tthis.contactsId = attributes.contactsId;\n\t\t\t}\n\t\t}\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { IAcl } from '../IAcl';\n\nexport class StaffDealsReferenceManyToMany implements IAcl {\n\tpublic group?: string;\n\tpublic isVisitorAcl = false;\n\tpublic constructor() {\n\t\tthis.group = 'Staff';\n\t}\n\tpublic canRead(): boolean {\n\t\t// % protected region % [Override read rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override read rule contents here here] end\n\t}\n\tpublic canCreate(): boolean {\n\t\t// % protected region % [Override create rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override create rule contents here here] end\n\t}\n\tpublic canUpdate(): boolean {\n\t\t// % protected region % [Override update rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override update rule contents here here] end\n\t}\n\tpublic canDelete(): boolean {\n\t\t// % protected region % [Override delete rule contents here here] off begin\n\t\treturn true;\n\t\t// % protected region % [Override delete rule contents here here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { Model, IModelAttributes, attribute, entity } from 'Models/Model';\nimport * as Models from 'Models/Entities';\nimport { IAcl } from '../Security/IAcl';\nimport { observable } from 'mobx';\nimport { StaffDealsReferenceManyToMany } from '../Security/Acl/StaffDealsReferenceManyToMany';\n\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface IStagesDealsAttributes extends IModelAttributes {\n\tstagesId: string;\n\tdealsId: string;\n\n\tstages: Models.StageEntity | Models.IStageEntityAttributes;\n\tdeals: Models.DealEntity | Models.IDealEntityAttributes;\n\t// % protected region % [Add any custom attributes to the interface here] off begin\n\t// % protected region % [Add any custom attributes to the interface here] end\n}\n\n@entity('StagesDeals')\nexport default class StagesDeals extends Model implements IStagesDealsAttributes {\n\tpublic static acls: IAcl[] = [\n\t\tnew StaffDealsReferenceManyToMany(),\n\t\t// % protected region % [Add any further ACL entries here] off begin\n\t\t// % protected region % [Add any further ACL entries here] end\n\t];\n\n\t@observable\n\t@attribute()\n\tpublic stagesId: string;\n\n\t@observable\n\t@attribute()\n\tpublic dealsId: string;\n\n\t@observable\n\t@attribute({isReference: true})\n\tpublic stages: Models.StageEntity;\n\n\t@observable\n\t@attribute({isReference: true})\n\tpublic deals: Models.DealEntity;\n\t// % protected region % [Add any custom attributes to the model here] off begin\n\t// % protected region % [Add any custom attributes to the model here] end\n\n\tconstructor(attributes?: Partial) {\n\t\t// % protected region % [Add any extra constructor logic before calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic before calling super here] end\n\n\t\tsuper(attributes);\n\n\t\tif (attributes) {\n\t\t\tif (attributes.stagesId) {\n\t\t\t\tthis.stagesId = attributes.stagesId;\n\t\t\t}\n\t\t\tif (attributes.dealsId) {\n\t\t\t\tthis.dealsId = attributes.dealsId;\n\t\t\t}\n\n\t\t\tif (attributes.stages) {\n\t\t\t\tif (attributes.stages instanceof Models.StageEntity) {\n\t\t\t\t\tthis.stages = attributes.stages;\n\t\t\t\t\tthis.stagesId = attributes.stages.id;\n\t\t\t\t} else {\n\t\t\t\t\tthis.stages = new Models.StageEntity(attributes.stages);\n\t\t\t\t\tthis.stagesId = this.stages.id;\n\t\t\t\t}\n\t\t\t} else if (attributes.stagesId !== undefined) {\n\t\t\t\tthis.stagesId = attributes.stagesId;\n\t\t\t}\n\n\t\t\tif (attributes.deals) {\n\t\t\t\tif (attributes.deals instanceof Models.DealEntity) {\n\t\t\t\t\tthis.deals = attributes.deals;\n\t\t\t\t\tthis.dealsId = attributes.deals.id;\n\t\t\t\t} else {\n\t\t\t\t\tthis.deals = new Models.DealEntity(attributes.deals);\n\t\t\t\t\tthis.dealsId = this.deals.id;\n\t\t\t\t}\n\t\t\t} else if (attributes.dealsId !== undefined) {\n\t\t\t\tthis.dealsId = attributes.dealsId;\n\t\t\t}\n\t\t}\n\n\t\t// % protected region % [Add any extra constructor logic after calling super here] off begin\n\t\t// % protected region % [Add any extra constructor logic after calling super here] end\n\t}\n\n\t// % protected region % [Add any further custom model features here] off begin\n\t// % protected region % [Add any further custom model features here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\n\ninterface IIfProps {\n\tcondition: boolean | undefined;\n}\n\n@observer\nexport default class If extends React.Component {\n\tpublic render() {\n\t\tif (this.props.condition) {\n\t\t\treturn this.props.children;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport classNames from 'classnames';\n\nexport enum Alignment {\n\tVERTICAL = \"btn-group--vertical\",\n\tHORIZONTAL = \"btn-group--horizontal\",\n}\n\nexport enum Sizing {\n\tGROW = \"btn-group--grow-elements\",\n\tSTATIC = \"btn-group--static-elements\",\n}\n\nexport interface IButtonGroupProps {\n\tclassName?: string;\n\talignment?: Alignment;\n\tsizing?: Sizing;\n\tinnerProps?: React.DetailedHTMLProps, HTMLElement>;\n}\n\n\n@observer\nexport class ButtonGroup extends React.Component {\n\tpublic render() {\n\t\tconst innerProps = this.props.innerProps || {};\n\t\tconst className = `btn-group ${innerProps.className ? innerProps.className : ''}`;\n\t\tlet classes = className;\n\n\t\tconst {alignment, sizing} = this.props; \n\t\tclasses = classNames(classes, alignment ? alignment : '');\n\t\tclasses = classNames(classes, sizing ? sizing : '');\n\t\tclasses = classNames(classes, this.props.className);\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.children}\n\t\t\t
\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nexport enum DisplayType {\n\tBLOCK = 'block',\n\tINLINE = 'inline',\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport classNames from 'classnames';\nimport { action, observable } from 'mobx';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport If from '../If/If';\nimport { DisplayType } from '../Models/Enums';\n\n// % protected region % [Add extra imports or definitoins here] off begin\n// % protected region % [Add extra imports or definitoins here] end\n\nexport enum InputType {\n\tINPUT = 'input',\n\tTEXTAREA = 'textarea',\n\tCHECKBOX = 'checkbox',\n\tRADIO = 'radio',\n\tDATE = 'date',\n\tTIME = 'time',\n\tPASSWORD = 'password',\n}\n\ninterface IInputWrapperProps {\n\tisInputGroup?: boolean;\n\twrapperId?: string;\n\tid?: string;\n\tinputType?: InputType;\n\tinputName?: string;\n\tinputId?: string;\n\tlabel?: ILabelOptions | string;\n\tlabelVisible?: boolean;\n\tclassName?: string;\n\tdisplayType?: DisplayType;\n\tisRequired?: boolean;\n\tstaticInput?: boolean;\n\ttooltip?: string;\n\tsubDescription?: string;\n\terrors?: string | string[];\n\tinnerProps?: React.DetailedHTMLProps, HTMLDivElement>;\n\t// % protected region % [Add extra inputwrapper props here] off begin\n\t// % protected region % [Add extra inputwrapper props here] end\n}\n\nexport enum LabelPositions {\n\tBEFORE,\n\tAFTER,\n}\n\nexport interface ILabelOptions{\n\ttext: string;\n\tposition?: LabelPositions;\n\t// % protected region % [Add extra lable options here] off begin\n\t// % protected region % [Add extra lable options here] end\n}\n\n@observer\nclass InputWrapper extends React.Component {\n\t// % protected region % [Add extra options class properties here] off begin\n\t// % protected region % [Add extra options class properties here] end\n\n\t@observable\n\tprivate focused: boolean;\n\n\t@observable\n\tprivate isHovered: boolean;\n\n\tpublic render() {\n\t\t// % protected region % [Customize options render here] off begin\n\t\tconst {isInputGroup, wrapperId, inputType, id, label, children, className, displayType, inputId, isRequired, staticInput, tooltip, subDescription, errors } = this.props;\n\t\tconst tooltipId = `${id}-tooltip`;\n\t\tconst subDescriptionId = `${id}-sub-description`;\n\t\tconst labelPostion = (typeof(label) === 'object')? label.position : LabelPositions.BEFORE;\n\t\tconst requiredMark = (label && isRequired) ? * : undefined;\n\t\tconst labelNode = label ? : '';\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\n\t\tlet classes = isRequired ? classNames(\"input-group--is-required\", className) : className;\n\t\tclasses = this.setTooltipClass(classes, tooltip);\n\t\tclasses = classNames(classes, !isInputGroup ? 'input-group' : null);\n\t\tclasses = classNames(classes, inputType ? `input-group__${inputType}` : null);\n\t\tclasses = classNames(classes, `input-group-${displayType ? displayType : DisplayType.BLOCK}`);\n\t\tclasses = classNames(classes, (errors && (typeof(errors) === 'string' || errors.some(e => !!e)))? 'input-group--error': null )\n\t\tclasses = classNames(classes, staticInput? \"input-group--static\" : null);\n\n\t\tconst Errors = (props: {errors?: string | string[]}) => {\n\t\t\tif (!props.errors) {\n\t\t\t\treturn null;\n\t\t\t} else if (typeof(props.errors) === 'string') {\n\t\t\t\treturn (\n\t\t\t\t\t
\n\t\t\t\t\t\t

{errors}

\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{props.errors.map((error, idx) => {\n\t\t\t\t\t\treturn

{error}

;\n\t\t\t\t\t})}\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tconst tooltipNode = tooltip ? : '';\n\t\tconst subDescriptionNode = (!tooltip && subDescription) ?

{subDescription}

: '';\n\n\t\tlet labelText: string | undefined;\n\t\tif (typeof(label) === \"string\") {\n\t\t\tlabelText = label;\n\t\t} else if (label === undefined) {\n\t\t\tlabelText = undefined;\n\t\t} else {\n\t\t\tlabelText = label.text;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{labelNode}\n\t\t\t\t\n\t\t\t\t{children}\n\t\t\t\t\n\t\t\t\t\t{labelNode}\n\t\t\t\t\n\t\t\t\t{tooltipNode}\n\t\t\t\t{subDescriptionNode}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize options render here] end\n\t}\n\n\t@action\n\tprivate onFocus = (event: React.ChangeEvent): void => {\n\t\tthis.focused = true;\n\t};\n\n\t@action\n\tprivate onBlue = (event: React.ChangeEvent): void => {\n\t\tthis.focused = false;\n\t};\n\n\t@action\n\tprivate handleHover = (): void => {\n\t\tthis.isHovered = !this.isHovered;\n\t};\n\n\tprivate setFocusClass = (classes?: string) => {\n\t\tif (this.focused) {\n\t\t\treturn classNames('input-group--focus', classes);\n\t\t}\n\t\treturn classes;\n\t};\n\n\tprivate setHoverClass = (classes?: string) => {\n\t\tif (this.isHovered) {\n\t\t\treturn classNames('input-group--hover', classes);\n\t\t}\n\t\treturn classes;\n\t};\n\n\tprivate setTooltipClass = (classes?: string, tooltip?: React.ReactNode) => {\n\t\tif (tooltip) {\n\t\t\treturn classNames('input-group--tooltip', classes);\n\t\t}\n\t\treturn classes;\n\t};\n\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\nexport default InputWrapper;\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport interface ITooltipProps {\n\tid: string;\n\tcontent: React.ReactNode;\n\t// % protected region % [Add extra props here] off begin\n\t// % protected region % [Add extra props here] end\n}\n\nexport class Tooltip extends React.Component, any> {\n\tpublic render(){\n\t\t// % protected region % [Override render here] off begin\n\t\tconst {id, content} = this.props;\n\t\treturn (\n\t\t\t
\n\t\t\t\t{content}\n\t\t\t
\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n\t// % protected region % [Add extra class fields here] off begin\n\t// % protected region % [Add extra class fields here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nexport default class InputsHelper {\n\tpublic static getAriaDescribedBy(id: string, tooltip?:string, subDescription?: string) {\n\t\tconst tooltipId = `${id}-tooltip`;\n\t\tconst subDescriptionId = `${id}-sub-description`;\n\t\tconst ariaDescribedBy = tooltip ? tooltipId : (subDescription ? subDescriptionId : undefined);\n\t\treturn ariaDescribedBy;\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport * as uuid from 'uuid';\nimport { action, computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { DisplayType } from '../Models/Enums';\nimport InputWrapper, { InputType } from '../Inputs/InputWrapper';\nimport InputsHelper from '../Helpers/InputsHelper';\nimport Flatpickr, { DateTimePickerProps } from 'react-flatpickr';\nimport { BaseOptions } from 'flatpickr/dist/types/options';\nimport { Instance } from 'flatpickr/dist/types/instance';\nimport { store } from 'Models/Store';\n// % protected region % [Override flatpicker theme here] off begin\nimport 'flatpickr/dist/themes/material_green.css';\n// % protected region % [Override flatpicker theme here] end\n\n// % protected region % [Override default date formats here] off begin\nconst defaultDateFormat = 'Y-m-d H:i';\nconst defaultAltFormat = 'h:i K j F, Y';\n// % protected region % [Override default date formats here] end\n\n/**\n * Root properties inheritted by all Flatpickr wrapper classes.\n *\n * Implementing Classes:\n *\t- DatePicker\n *\t- DateRangePicker\n *\t- DateTimePicker\n *\t- DateTimeRangePicker\n *\t- TimePicker\n */\nexport interface IDateTimePickerProps {\n\t/* Component Props */\n\t/** Accept direct user input via the input field iff true. */\n\tallowInput?: boolean;\n\t/** String format to display when altInput is true. */\n\taltFormat?: string;\n\t/** Convert internal representation to an alt format for presentation iff true. */\n\taltInput?: boolean;\n\t/** Brings the component into focus on the page after rendering iff true. */\n\tautoFocus?: boolean;\n\t/** Name of the styling class for this component. */\n\tclassName?: string;\n\t/** Internal string format. Used in conjunction with altFormat. */\n\tdateFormat?: string;\n\t/** Flatpickr core options. See https://flatpickr.js.org/options/ for details. */\n\tflatpickrOptions?: Partial;\n\t/** Flatpickr base properties. */\n\tflatpickrProps?: DateTimePickerProps;\n\t/** CSS display type. */\n\tdisplayType?: DisplayType;\n\t/** Enable the time input field. */\n\tenableTime?: boolean;\n\t/** Errors. */\n\terrors?: string | string[];\n\t/** Display in the the component-specific human-friendly format.\n\t * Abstraction of the altFormat, altInput and dateFormat props. */\n\thumanFriendly?: boolean;\n\t/** Component id. */\n\tid?: string;\n\t/** Input entry is required before form submission iff true. */\n\tisRequired?: boolean;\n\t/** Input field is disabled iff true. */\n\tisDisabled?: boolean;\n\t/** Input field is read-only iff true (same as disabled in practice). */\n\tisReadOnly?: boolean;\n\t/** Label for the input field. */\n\tlabel?: string;\n\t/** Display the input field label iff true. */\n\tlabelVisible?: boolean;\n\t/** Maximum (i.e. latest) selectable date. */\n\tmaxDate?: string;\n\t/** Minimum (i.e. earliest) selectable date. */\n\tminDate?: string;\n\t/** Flatpickr mode. No wrapper component currently implemented for multiple. */\n\tmode?: \"single\" | \"multiple\" | \"range\" | \"time\";\n\t/** Model datastructure for input state preservation. */\n\tmodel: T;\n\t/** Index of the modelProperty storing the state of the input to this component. */\n\tmodelProperty: string;\n\t/** Name for the component instance. */\n\tname?:string;\n\t/** Display the calendar input field iff false. */\n\tnoCalendar?: boolean;\n\t/** Placeholder text string. */\n\tplaceholder?: string;\n\t/** Static input field iff true (same as disabled in practice). */\n\tstaticInput?: boolean;\n\t/** */\n\tsubDescription?: string;\n\t/* Set the time selection field to select from 24hr or 12hr time.\n\t * Note: if you wish to display the the time shown by the input\n\t * field after selection in 12hr format, please set the humanFriendly\n\t * property to true. */\n\ttime_24hr?: boolean;\n\t/** Tooltip string. */\n\ttooltip?: string;\n\t/* Event handlers */\n\t/** Callback run after an input change is detected. */\n\tonAfterChange?: (dates: Date[], currentDateString: string, self: Instance, data?: any) => void;\n\t/** Callback run on input change and loss of focus. */\n\tonChangeAndBlur?: (event: React.ChangeEvent)=>void;\n}\n\n/**\n * Creates a datetime picker component. Root Flatpickr wrapper class. All other datetime-related\n * components create an instance of this component and modify the requisite properties.\n *\n * Derived Classes:\n *\t- DatePicker\n *\t- DateRangePicker\n *\t- DateTimeRangePicker\n *\t- TimePicker\n */\n@observer\nexport class DateTimePicker extends React.Component> {\n\t/* Component instance-specific properties */\n\tprivate uuid = uuid.v4();\n\tprivate _input?: HTMLInputElement;\n\tprivate valueWhenFocused: string = '';\n\n\t/* Component pre-render and construction functions. */\n\n\t/**\n\t * Compiles the options to be passed to the Flatpickr component from the properties passed\n\t * to this component.\n\t */\n\t@computed\n\tprivate get flatpickerOptions(): Partial {\n\t\t/* Flatpickr custom options. See https://flatpickr.js.org/options/ for docs. */\n\t\tconst options = {\n\t\t\tallowInput: this.props.allowInput ?? true,\n\t\t\tenableTime: ((this.props.enableTime === undefined) ? true : this.props.enableTime),\n\t\t\tmaxDate: this.props.maxDate,\n\t\t\tminDate: this.props.minDate,\n\t\t\tmode: (this.props.mode || \"single\"),\n\t\t\tnoCalendar: this.props.noCalendar,\n\t\t\ttime_24hr: this.props.time_24hr,\n\t\t};\n\n\t\t/* Pass in the class-specific formatting if the humanReadable option was specified\n\t\t * to the Component constructor of a wrapping class. */\n\t\tif (this.props.humanFriendly) {\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\taltInput: true,\n\t\t\t\tdateFormat: (this.props.dateFormat ?? defaultDateFormat),\n\t\t\t\taltFormat: (this.props.altFormat ?? defaultAltFormat),\n\t\t\t};\n\t\t}\n\n\t\treturn options;\n\t}\n\n\t/**\n\t * Returns the Flatpickr HTML for this instance.\n\t */\n\tprivate flatpickr = (id: string, fieldId: string, labelVisible: boolean): React.ReactNode => {\n\t\tconst ariaLabel = !labelVisible ? this.props.label : undefined;\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(\n\t\t\tid, this.props.tooltip, this.props.subDescription);\n\n\t\t/* Type check the value in the model before passing it to the Flatpickr component. */\n\t\tlet value = this.props.model[this.props.modelProperty];\n\t\tif (! (value instanceof Date || (value instanceof Array && value.length > 0\n\t\t\t&& value[0] instanceof Date))) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\tconst isEditable = !(this.props.isDisabled || this.props.staticInput || this.props.isReadOnly);\n\n\t\t/* Flatpickr component: handles all datetime picker logic */\n\t\treturn {\n\t\t\t\t\tself.calendarContainer?.classList?.add(store.appLocation);\n\t\t\t\t},\n\t\t\t\t...this.flatpickerOptions,\n\t\t\t\t...this.props.flatpickrOptions,\n\t\t\t}}\n\t\t\tplaceholder={this.props.placeholder\n\t\t\t\t? this.props.placeholder : (this.props.label ? this.props.label : undefined)}\n\t\t\ttype=\"date\"\n\t\t\tonChange={this.onChange}\n\t\t\t{...this.props.flatpickrProps}\n\t\t/>\n\t}\n\n\t/* Component lifecycle functions. */\n\n\tcomponentDidMount() {\n\t\tif(this.props.autoFocus && this._input){\n\t\t\tthis._input.focus();\n\t\t}\n\t}\n\n\tpublic render() {\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst fieldId = `${id}-field`;\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\t/* Render DateTimePicker */\n\t\t\t\t\tthis.flatpickr(id, fieldId, labelVisible)\n\t\t\t\t}\n\t\t\t\n\t\t);\n\t}\n\n\t/* Render/post-render action functions. */\n\n\t@action\n\tprivate onChange = (dates: Date[], currentDateString: string, self: Instance, data?: any) => {\n\t\tif (this.props.mode === 'range') {\n\t\t\tthis.props.model[this.props.modelProperty] = dates;\n\t\t} else {\n\t\t\tthis.props.model[this.props.modelProperty] = dates[0];\n\t\t}\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(dates, currentDateString, self, data);\n\t\t}\n\t}\n\n\t@action\n\tprivate onFocus = (event: React.ChangeEvent) => {\n\t\tthis.valueWhenFocused = event.target.value;\n\t}\n\n\t@action\n\tprivate onBlur = (event: React.ChangeEvent) => {\n\t\tif(this.valueWhenFocused !== event.target.value && this.props.onChangeAndBlur){\n\t\t\tthis.props.onChangeAndBlur(event);\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { DateTimePicker, IDateTimePickerProps } from '../DateTimePicker/DateTimePicker';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n/** DateRangePicker-specific properties. Extend as necessary. */\nexport interface IDateRangePickerProps extends IDateTimePickerProps {\n\t// % protected region % [Add extra props here] off begin\n\t// % protected region % [Add extra props here] end\n}\n\n/**\n * DateRangePicker Component. Wraps DateTimePicker, which in turn wraps Flatpickr.\n * See IDateTimePickerProps for root property definitions. Can pass Flatpickr\n * properties that are not implemented by this interface via this.flatpickrProps.\n */\n@observer\nexport class DateRangePicker extends React.Component> {\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { IFilter } from '../CollectionFilterPanel';\nimport { observer } from 'mobx-react';\nimport { observable, action } from 'mobx';\nimport { DateRangePicker, IDateRangePickerProps } from '../../DateRangePicker/DateRangePicker';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport { Instance } from 'flatpickr/dist/types/instance';\n\n\ninterface IFilterDateRangeProps extends Partial> {\n\tfilter: IFilter;\n\tclassName?: string;\n}\n\n@observer\nclass FilterDateRange extends React.Component> {\n\t@observable\n\tprivate model :{ dateRange: [Date | undefined, Date | undefined]} = {dateRange:[undefined, undefined]};\n\tconstructor(props: IFilterDateRangeProps, context: any) {\n\t\tsuper(props, context);\n\t\tthis.setDefaultValue();\n\t}\n\n\t@action\n\tcomponentDidUpdate(){\n\t\tthis.setDefaultValue();\n\t}\n\n\tprivate setDefaultValue(){\n\t\tthis.model.dateRange = [\n\t\t\t!!this.props.filter.value1 ? moment(this.props.filter.value1).toDate() : undefined,\n\t\t\t!!this.props.filter.value2 ? moment(this.props.filter.value2).toDate() : undefined\n\t\t];\n\t}\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\tconst { filter, className} = this.props;\n\t\tconst classes = classnames('collection-filter-date-range', className);\n\t\treturn {\n\t\t\t\tfilter.value1 = !!this.model.dateRange[0] ? moment(this.model.dateRange[0]).format('YYYY-MM-DD') : undefined;\n\t\t\t\tfilter.value2 = !!this.model.dateRange[1] ? moment(this.model.dateRange[1]).format('YYYY-MM-DD') : undefined;\n\t\t\t\tif (filter.value2 === undefined && filter.value1) {\n\t\t\t\t\tfilter.value2 = filter.value1;\n\t\t\t\t}\n\t\t\t\tfilter.active = !!filter.value1 && !!filter.value2;\n\t\t\t\tif (this.props.onAfterChange) {\n\t\t\t\t\tthis.props.onAfterChange(dates, currentDateString, self, data);\n\t\t\t\t}\n\t\t\t}}\n\t\t/>;\n\t}\n\t// % protected region % [Override render here] end\n}\n\nexport default FilterDateRange;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\n\nexport default function Spinner() {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t
\n\t);\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport _ from 'lodash';\nimport { observer } from 'mobx-react';\nimport { DisplayType } from '../Models/Enums';\nimport {\n\tDropdown,\n\tDropdownItemProps,\n\tDropdownProps,\n\tLabel,\n\tStrictDropdownProps,\n} from 'semantic-ui-react';\nimport InputWrapper from 'Views/Components/Inputs/InputWrapper';\nimport classNames from 'classnames';\nimport { action, computed, observable } from 'mobx';\nimport Spinner from 'Views/Components/Spinner/Spinner';\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface ComboboxOption {\n\t/** The value to display in the combobox item dropdown */\n\tdisplay: React.ReactNode;\n\t/** The value to select */\n\tvalue: I | undefined;\n\t/** In a multi combobox can the value be removed */\n\tisFixed?: boolean;\n\n\t// % protected region % [Add extra ComboboxOption fields here] off begin\n\t// % protected region % [Add extra ComboboxOption fields here] end\n}\n\ninterface InternalComboboxProps {\n\t/** The model to change the attribute of */\n\tmodel: T;\n\t/** The property on the model to change */\n\tmodelProperty: string;\n\t/**\n\t * Gets an identifying property from the value object. This must be a unique value and not an object.\n\t * By default this will get the value object itself\n\t */\n\tgetOptionValue?: (option: I | undefined) => undefined | boolean | number | string;\n\t/**\n\t * A function to compare the model property to the selected option\n\t * @param modelProperty The model property to compare\n\t * @param option The option from the combobox\n\t */\n\toptionEqualFunc?: (modelProperty: string | number | boolean | undefined, option: I | undefined) => boolean;\n\t/** The to display around the combobox */\n\tlabel: string;\n\t/** Weather the label is visible */\n\tlabelVisible?: boolean;\n\t/** The tooltip to display */\n\ttooltip?: string;\n\t/** The display type to use */\n\tdisplayType?: DisplayType;\n\t/** The classname for to combobox */\n\tclassName?: string;\n\t/** Raw props that are passed through to the react-select component */\n\tinputProps?: DropdownProps;\n\t/** The placeholder text when the combobox is empty */\n\tplaceholder?: string;\n\t/** A list of errors that are to be displayed around the combobox */\n\terrors?: string | string[];\n\t/** The minimum length of search string with can be searched, default to 1 */\n\tminSearchLength?: number;\n\t/** If the combobox is isDisabled */\n\tisDisabled?: boolean;\n\t/** If the field is required */\n\tisRequired?: boolean;\n\t/** Override of the onChange function. Using this will remove the model binding logic of the component */\n\tonChange?: (event: React.SyntheticEvent, data: DropdownProps) => void;\n\t/** Action to perform after the onChange method is called */\n\tonAfterChange?: (event: React.SyntheticEvent, data: DropdownProps) => void;\n\t/** Is the select value clearable **/\n\tisClearable?: boolean;\n\n\t// % protected region % [Add extra InternalComboboxProps fields here] off begin\n\t// % protected region % [Add extra InternalComboboxProps fields here] end\n}\n\nexport interface SyncComboboxProps extends InternalComboboxProps {\n\t/**\n\t * The options on the dropdown\n\t * An array of JSON objects that by default will have the form of {display: string, value: string}\n\t *\n\t * The key and value properties can be overriden with the getOptionLabel and getOptionValue props\n\t */\n\toptions: ComboboxOption[];\n\t/** If the combobox is searchable */\n\tsearchable?: boolean | ((options: DropdownItemProps[], value: string) => DropdownItemProps[]);\n\t/** If the combobox is in a loading state */\n\tloading?: boolean;\n\n\t// % protected region % [Add extra SyncComboboxProps fields here] off begin\n\t// % protected region % [Add extra SyncComboboxProps fields here] end\n}\n\nexport interface AsyncComboboxProps extends InternalComboboxProps {\n\t/**\n\t * The options on the dropdown\n\t * A function that returns an promise resolving to an array of JSON objects that by default will have the form of\n\t * {display: string, value: string}\n\t *\n\t * The key and value properties can be overriden with the getOptionLabel and getOptionValue props\n\t */\n\toptions: (input: string) => Promise[]>;\n\t/**\n\t * The initial options that are displayed in the combobox before any search occurs\n\t */\n\tinitialOptions?: () => Promise[]>;\n\n\t// % protected region % [Add extra AsyncComboboxProps fields here] off begin\n\t// % protected region % [Add extra AsyncComboboxProps fields here] end\n}\n\ninterface InternalSyncComboboxProps extends SyncComboboxProps {\n\tgetOptionValue: (option: I | undefined) => undefined | boolean | number | string;\n}\n\ninterface InternalAsyncComboboxProps extends AsyncComboboxProps {\n\tgetOptionValue: (option: I | undefined) => undefined | boolean | number | string;\n}\n\nexport type IComboboxProps = AsyncComboboxProps | SyncComboboxProps;\n\n/**\n * A dropdown selection menu for selecting an item from a list of options\n */\n@observer\nexport class Combobox extends React.Component> {\n\tstatic defaultProps = {\n\t\tlabelVisible: true,\n\t\tminSearchLength: 0,\n\t\tsearchable: true\n\t};\n\n\tprivate _reFetch?: () => void = undefined;\n\tpublic get reFetch() {\n\t\tif (this._reFetch) {\n\t\t\treturn this._reFetch;\n\t\t}\n\t\treturn function() {};\n\t}\n\n\tprivate getOptionValue = (option: I | undefined) => this.props.getOptionValue\n\t\t? this.props.getOptionValue(option)\n\t\t: option as string | number | boolean | undefined;\n\n\t// % protected region % [Add extra Combobox fields here] off begin\n\t// % protected region % [Add extra Combobox fields here] end\n\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\ttypeof this.props.options === 'function'\n\t\t\t\t\t? this._reFetch = ref?.reFetch}\n\t\t\t\t\t\t\toptions={this.props.options}\n\t\t\t\t\t\t\tgetOptionValue={this.getOptionValue}\n\t\t\t\t\t\t/>\n\t\t\t\t\t: \n\t\t\t\t}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add extra Combobox methods here] off begin\n\t// % protected region % [Add extra Combobox methods here] end\n}\n\n@observer\nclass SyncCombobox extends React.Component> {\n\tpublic render() {\n\t\treturn ;\n\t}\n}\n\ntype loadingState = 'loading' | 'error' | 'done';\n\n@observer\nclass AsyncCombobox extends React.Component> {\n\t@observable\n\tprivate requestState: loadingState = 'done';\n\n\t@observable\n\tprivate initialRequestState: loadingState = 'loading';\n\n\t@observable\n\tprivate optionResults: ComboboxOption[] = [];\n\n\tprivate lastSearchQuery = '';\n\n\tpublic reFetch = () => this.searchOptions(this.lastSearchQuery);\n\n\t@action\n\tprivate searchOptions = (data: string): Promise => {\n\t\tthis.requestState = 'loading';\n\t\tthis.lastSearchQuery = data;\n\t\treturn this.props.options(data)\n\t\t\t.then(this.onSearchSuccess)\n\t\t\t.catch(this.onSearchFail);\n\t}\n\n\t@action\n\tprivate onSearchSuccess = (options: ComboboxOption[], initial?: boolean) => {\n\t\tthis.optionResults.length = 0;\n\t\tthis.optionResults.push(...options);\n\t\tif (initial) {\n\t\t\tthis.initialRequestState = 'done';\n\t\t} else {\n\t\t\tthis.requestState = 'done';\n\t\t}\n\t};\n\n\t@action\n\tprivate onSearchFail = (error: any, initial?: boolean) => {\n\t\tconsole.error(error);\n\t\tif (initial) {\n\t\t\tthis.initialRequestState = 'error';\n\t\t} else {\n\t\t\tthis.requestState = 'error';\n\t\t}\n\t};\n\n\tconstructor(props: InternalAsyncComboboxProps, context: any) {\n\t\tsuper(props, context);\n\t\tif (this.props.initialOptions) {\n\t\t\tthis.props.initialOptions()\n\t\t\t\t.then(_.partial(this.onSearchSuccess, _, true))\n\t\t\t\t.catch(_.partial(this.onSearchFail, _, true));\n\t\t} else {\n\t\t\tthis.onSearchSuccess([], true);\n\t\t}\n\t}\n\n\t// % protected region % [Add any extra Component lifecycle methods here] off begin\n\t// % protected region % [Add any extra Component lifecycle methods here] end\n\n\tpublic render() {\n\t\tswitch (this.initialRequestState) {\n\t\t\tcase 'loading':\n\t\t\t\treturn ;\n\t\t\tcase 'error':\n\t\t\t\treturn
There was an error loading the combobox data
;\n\t\t\tcase 'done':\n\t\t\t\treturn options}\n\t\t\t\t\toptionResults={this.optionResults}\n\t\t\t\t\tonSearchChange={(e, data) => this.searchOptions(data.searchQuery)}\n\t\t\t\t\tplaceholder={this.props.placeholder}\n\t\t\t\t\tloading={this.requestState === 'loading'}\n\t\t\t\t\tdisabled={this.props.isDisabled}\n\t\t\t\t\tminCharacters={this.props.minSearchLength}\n\t\t\t\t\tclearable={this.props.isClearable}\n\t\t\t\t\tonAfterChange={this.props.onAfterChange}\n\t\t\t\t\tonChange={this.props.onChange}\n\t\t\t\t\toptionEqualFunc={this.props.optionEqualFunc}\n\t\t\t\t\t{...this.props.inputProps}\n\t\t\t\t/>;\n\t\t}\n\t}\n}\n\ninterface InnerComboboxProps extends StrictDropdownProps {\n\tmodel: T;\n\tmodelProperty: string;\n\toptionResults: ComboboxOption[];\n\tgetOptionValue: (option: I | undefined) => undefined | boolean | number | string;\n\tonAfterChange?: (event: React.SyntheticEvent, data: DropdownProps) => void;\n\toptionEqualFunc?: (modelProperty: string | number | boolean | undefined, option: I | undefined) => boolean;\n\n\t// % protected region % [Add extra InnerComboboxProps fields here] off begin\n\t// % protected region % [Add extra InnerComboboxProps fields here] end\n}\n\n@observer\nclass InnerCombobox extends React.Component> {\n\t@computed\n\tprivate get options() {\n\t\treturn this.props.optionResults.map((option) => ({\n\t\t\ttext: option.display,\n\t\t\tvalue: this.props.getOptionValue(option.value),\n\t\t\tisFixed: option.isFixed,\n\t\t\tkey: this.props.getOptionValue(option.value),\n\t\t\tas: (props: any) =>
\n\t\t\t\t{props.children}\n\t\t\t
\n\t\t}));\n\t}\n\n\t@computed\n\tprivate get selectedItem() {\n\t\tconst modelProperty = this.props.model[this.props.modelProperty];\n\n\t\tif (!(modelProperty === null || modelProperty === undefined)) {\n\t\t\tif (this.props.multiple && Array.isArray(modelProperty)) {\n\t\t\t\treturn _.chain(this.props.optionResults)\n\t\t\t\t\t.filter(option => {\n\t\t\t\t\t\treturn _.some(modelProperty, modelProp => this.optionsEqual(this.props.getOptionValue(modelProp), option));\n\t\t\t\t\t})\n\t\t\t\t\t.flatMap(option => {\n\t\t\t\t\t\tconst value = this.props.getOptionValue(option.value);\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t})\n\t\t\t\t\t.value();\n\t\t\t} else {\n\t\t\t\t// If there is a value already selected in the model then we want that one to be selected\n\t\t\t\tconst value = this.props.optionResults.find(option => {\n\t\t\t\t\treturn this.optionsEqual(this.props.getOptionValue(modelProperty), option);\n\t\t\t\t});\n\t\t\t\tif (value) {\n\t\t\t\t\treturn this.props.getOptionValue(value.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate set selectedItem(value: undefined | boolean | number | string | (boolean | number | string)[]) {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (!Array.isArray(this.props.model[this.props.modelProperty])) {\n\t\t\t\tthis.props.model[this.props.modelProperty] = [];\n\t\t\t}\n\n\t\t\tthis.props.model[this.props.modelProperty].length = 0;\n\t\t\tconst selected = this.props.optionResults\n\t\t\t\t.filter(option => {\n\t\t\t\t\treturn _.some(value, modelProp => this.optionsEqual(modelProp, option));\n\t\t\t\t})\n\t\t\t\t.map(option => option.value);\n\t\t\tthis.props.model[this.props.modelProperty].push(...selected);\n\t\t} else {\n\t\t\tconst selected = this.props.optionResults.find(option => {\n\t\t\t\treturn this.optionsEqual(value, option);\n\t\t\t});\n\n\t\t\tif (!(selected === null || selected === undefined)) {\n\t\t\t\tthis.props.model[this.props.modelProperty] = selected.value;\n\t\t\t} else {\n\t\t\t\tthis.props.model[this.props.modelProperty] = undefined;\n\t\t\t}\n\t\t}\n\t}\n\n\t@action\n\tprivate onChange = (event: React.SyntheticEvent, data: DropdownProps) => {\n\t\t// If the onChange is overwritten then we should just use that one instead\n\t\tif (this.props.onChange) {\n\t\t\treturn this.props.onChange(event, data);\n\t\t} else {\n\t\t\tconst { value } = data;\n\t\t\tthis.selectedItem = value;\n\t\t\t// this.props.model[this.props.modelProperty] = value;\n\t\t}\n\n\t\t// If there is any logic to be done after the change of the combobox, do it here\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event, data);\n\t\t}\n\t};\n\n\tprivate optionsEqual(modelProp: string | number | boolean | undefined, option: ComboboxOption) {\n\t\tif (this.props.optionEqualFunc) {\n\t\t\treturn this.props.optionEqualFunc(modelProp, option.value);\n\t\t}\n\t\treturn this.props.getOptionValue(option.value) === modelProp;\n\t}\n\n\tpublic render() {\n\t\treturn {\n\t\t\t\treturn <>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}}\n\t\t\t// % protected region % [Add any extra props to Dropdown in InnerCombobox here] off begin\n\t\t\t// % protected region % [Add any extra props to Dropdown in InnerCombobox here] end\n\t\t\t{..._.omit(\n\t\t\t\tthis.props,\n\t\t\t\t'model',\n\t\t\t\t'modelProperty',\n\t\t\t\t'optionResults',\n\t\t\t\t'getOptionValue',\n\t\t\t\t'onAfterChange',\n\t\t\t\t'optionEqualFunc',\n\t\t\t\t'selection',\n\t\t\t\t'onChange',\n\t\t\t\t'value',\n\t\t\t\t'data-id',\n\t\t\t\t'options',\n\t\t\t\t'className',\n\t\t\t\t'renderLabel',\n\t\t\t)}\n\t\t/>;\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Button, Display } from '../Button/Button';\nimport { TextField } from '../TextBox/TextBox';\nimport { observer } from 'mobx-react';\nimport { observable } from 'mobx';\nimport IPaginationData from 'Models/PaginationData';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IPaginationProps {\n\t// % protected region % [Customize IPaginationProps here] off begin\n\tpagination: IPaginationData;\n\tshowGoToPageBox?: boolean;\n\tonPageChange?: () => void;\n\t// % protected region % [Customize IPaginationProps here] end\n}\n\nenum validPageOptions {\n\tHIGH,\n\tVALID,\n\tLOW,\n}\n\n@observer\nclass Pagination extends React.Component {\n\t// % protected region % [Add extra options class properties here] off begin\n\t// % protected region % [Add extra options class properties here] end\n\n\t@observable\n\tprivate pageTextBoxModel = { page: '1' };\n\n\tpublic render() {\n\t\t// % protected region % [Customize options render here] off begin\n\t\tconst { queryOptions } = this.props.pagination;\n\t\tconst { page } = queryOptions;\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize options render here] end\n\t}\n\n\tpublic renderFirstButton() {\n\t\t// % protected region % [Customize renderFirstButton here] off begin\n\t\tconst { page } = this.props.pagination.queryOptions;\n\t\tlet isFirstPage = (page === 0);\n\t\treturn (\n\t\t\t\n\t\t\t\tFirst\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize renderFirstButton here] end\n\t}\n\n\tpublic renderNextButton() {\n\t\t// % protected region % [Customize renderNextButton here] off begin\n\t\tconst { page } = this.props.pagination.queryOptions;\n\t\tconst noNextPage = (page >= ((this.totalPages()) - 1));\n\t\treturn (\n\t\t\t\n\t\t\t\tNext\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize renderNextButton here] end\n\t}\n\n\tpublic renderPreviousButton() {\n\t\t// % protected region % [Customize renderPreviousButton here] off begin\n\t\tconst { page } = this.props.pagination.queryOptions;\n\t\tconst noPreviousPage = (page < 1);\n\t\treturn (\n\t\t\t\n\t\t\t\tPrevious\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize renderPreviousButton here] end\n\t}\n\n\tpublic renderLastButton() {\n\t\t// % protected region % [Customize renderLastButton here] off begin\n\t\tconst { page } = this.props.pagination.queryOptions;\n\t\tconst isLastPage = (page >= ((this.totalPages()) - 1));\n\t\treturn (\n\t\t\t\n\t\t\t\tLast\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize renderLastButton here] end\n\t}\n\n\tpublic renderGoToPageBox() {\n\t\t// % protected region % [Customize renderGoToPageBox here] off begin\n\t\tif (this.props.showGoToPageBox) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t\t// % protected region % [Customize renderGoToPageBox here] end\n\t}\n\n\tprivate firstPage = () => {\n\t\t// % protected region % [Customize firstPageMethod here] off begin\n\t\tthis.gotoPage(0);\n\t\t// % protected region % [Customize firstPageMethod here] end\n\t}\n\n\tprivate previousPage = () => {\n\t\t// % protected region % [Customize previousPageMethod here] off begin\n\t\tconst { queryOptions } = this.props.pagination;\n\t\tthis.gotoPage(queryOptions.page - 1);\n\t\t// % protected region % [Customize previousPageMethod here] end\n\t}\n\n\tprivate nextPage = () => {\n\t\t// % protected region % [Customize nextPageMethod here] off begin\n\t\tconst { queryOptions } = this.props.pagination;\n\t\tthis.gotoPage(queryOptions.page + 1);\n\t\t// % protected region % [Customize nextPageMethod here] end\n\t}\n\n\tprivate lastPage = () => {\n\t\t// % protected region % [Customize lastPage method here] off begin\n\t\tthis.gotoPage(this.totalPages() - 1);\n\t\t// % protected region % [Customize lastPage method here] end\n\t}\n\n\tprivate onGoToPageFormSubmit = (event: React.FormEvent) => {\n\t\t// % protected region % [Customize onGoToPageFormSubmit here] off begin\n\t\tevent.preventDefault();\n\n\t\tconst n = Number.parseInt(this.pageTextBoxModel.page, 10);\n\t\tif (!isNaN(n)) {\n\t\t\tthis.gotoPage(n - 1);\n\t\t}\n\t\t// % protected region % [Customize onGoToPageFormSubmit here] end\n\t}\n\n\tpublic gotoPage = (pageNo: number) => {\n\t\t// % protected region % [Customize gotoPage method here] off begin\n\t\tconst { queryOptions } = this.props.pagination;\n\n\t\tconst validPage = this.isValidPage(pageNo);\n\n\t\tif (validPage === validPageOptions.HIGH) {\n\t\t\tqueryOptions.gotoPage(this.totalPages() - 1);\n\t\t} else if (validPage === validPageOptions.LOW) {\n\t\t\tqueryOptions.gotoPage(0);\n\t\t}\n\n\t\tqueryOptions.gotoPage(pageNo);\n\n\t\tif (this.props.onPageChange) {\n\t\t\tthis.props.onPageChange();\n\t\t}\n\t\t// % protected region % [Customize gotoPage method here] end\n\t}\n\n\tprivate isValidPage = (pageNo: number): validPageOptions => {\n\t\t// % protected region % [Customize isValidPage method here] off begin\n\t\tif (pageNo >= this.totalPages()) {\n\t\t\treturn validPageOptions.HIGH;\n\t\t} else if (pageNo < 0) {\n\t\t\treturn validPageOptions.LOW;\n\t\t}\n\t\treturn validPageOptions.VALID;\n\t\t// % protected region % [Customize isValidPage method here] end\n\t}\n\n\tprivate totalPages () {\n\t\t// % protected region % [Customize totalPages method here] off begin\n\t\tconst { queryOptions, totalRecords } = this.props.pagination;\n\t\tconst { perPage } = queryOptions;\n\n\t\tif (totalRecords > 0) {\n\t\t\treturn Math.ceil(totalRecords / perPage);\n\t\t}\n\t\treturn 1;\n\t\t// % protected region % [Customize totalPages method here] end\n\t}\n}\n\nexport default Pagination;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { AsyncComboboxProps, Combobox, SyncComboboxProps } from './Combobox';\n\nexport interface SyncMultiComboboxProps extends SyncComboboxProps {\n\n}\n\nexport interface AsyncMultiComboboxProps extends AsyncComboboxProps {\n\n}\n\nexport type IMultiComboboxProps = SyncMultiComboboxProps | AsyncComboboxProps;\n\n/**\n * A MultiCombobox is a view that allows allows selection of many elements from a dropdown menu\n */\n@observer\nexport class MultiCombobox extends React.Component> {\n\tstatic defaultProps = {\n\t\tstyles: {}\n\t}\n\n\tpublic render() {\n\t\t// return \"Not yet done\";\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { IFilter } from '../CollectionFilterPanel';\nimport { observer } from 'mobx-react';\nimport { computed } from 'mobx';\nimport { SyncComboboxProps } from 'Views/Components/Combobox/Combobox';\nimport { MultiCombobox } from 'Views/Components/Combobox/MultiCombobox';\n\ninterface IFilterEnumComboBoxProps extends Partial> {\n\tfilter: IFilter;\n\tclassName?: string;\n}\n\n@observer\nclass FilterEnumComboBox extends React.Component> {\n\t@computed\n\tprivate get options() {\n\t\treturn this.props.filter.enumResolveFunction || [];\n\t}\n\n\tpublic render() {\n\t\tconst { filter, className} = this.props;\n\n\t\treturn {\n\t\t\t\tfilter.active = !!filter.value1 && ((filter.value1 as string[]).length > 0);\n\t\t\t\tif (this.props.onAfterChange) {\n\t\t\t\t\tthis.props.onAfterChange(event, data);\n\t\t\t\t}\n\t\t\t}}\n\t\t/>;\n\t}\n}\n\nexport default FilterEnumComboBox;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { Comparators } from '../ModelCollection/ModelQuery';\nimport { displayType } from 'Models/CRUDOptions';\nimport { Button, Display } from '../Button/Button';\nimport FilterDateRange from './CollectionFilterAttributes/FilterDateRangePicker';\nimport FilterEnumComboBox from './CollectionFilterAttributes/FilterEnumComboBox';\nimport { ButtonGroup, Alignment } from '../Button/ButtonGroup';\n\n// % protected region % [Add extra imports and exports here] off begin\n// % protected region % [Add extra imports and exports here] end\n\nexport interface IFilter {\n\t/** The column name to filter on */\n\tpath: string;\n\t/** The comparison operator */\n\tcomparison: Comparators | 'range';\n\t/** The value to filter on */\n\tvalue1: string | string[] | Date | number | undefined;\n\t/** \n\t * The second value to filter\n\t * Only valid for 'range' type comparison for now where this represents the end of the range \n\t */\n\tvalue2: string | Date | number | undefined;\n\t/** this is specifically for the model of date range */\n\tactive: boolean;\n\t/** The display type of the filter */\n\tdisplayType: displayType;\n\t/** The display name of the filter */\n\tdisplayName: string;\n\t/** The function to resolve and return the options of the enum-combobox (for now only enum-combobox) */\n\tenumResolveFunction?: Array<{display: string, value: string}>;\n\t// % protected region % [Add extra IFilter props here] off begin\n\t// % protected region % [Add extra IFilter props here] end\n}\n\n// % protected region % [Override ICollectionFilterPanelProps here] off begin\nexport interface ICollectionFilterPanelProps {\n\tfilters: IFilter[];\n\tonClearFilter: () => void;\n\tonApplyFilter: () => void;\n\tonFilterChanged?: () => void;\n\tremoveApplyFilter?: boolean;\n\tremoveClearFilter?: boolean;\n\tdateFormat?: string;\n\taltFormat?: string;\n}\n// % protected region % [Override ICollectionFilterPanelProps here] end\n\n@observer\nclass CollectionFilterPanel extends React.Component> {\n\n\tpublic render() {\n\t\tconst {\n\t\t\tfilters,\n\t\t\tonFilterChanged,\n\t\t\tonApplyFilter,\n\t\t\tonClearFilter,\n\t\t} = this.props;\n\n\t\tif (filters === undefined || !filters.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t\tfilters.map(filter => {\n\t\t\t\t\t\t\tswitch (filter.displayType) {\n\t\t\t\t\t\t\t\t// % protected region % [Override datepicker case here] off begin\n\t\t\t\t\t\t\t\tcase 'datepicker':\n\t\t\t\t\t\t\t\t\tif (filter.comparison === 'range') {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (onFilterChanged) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonFilterChanged();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\t// % protected region % [Override datepicker case here] end\n\t\t\t\t\t\t\t\t// % protected region % [Override enum-combobox case here] off begin\n\t\t\t\t\t\t\t\tcase 'enum-combobox':\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tif (onFilterChanged) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tonFilterChanged();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// % protected region % [Override enum-combobox case here] end\n\t\t\t\t\t\t\t\t// % protected region % [Add extra filter cases here] off begin\n\t\t\t\t\t\t\t\t// % protected region % [Add extra filter cases here] end\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tconsole.error(`The filter display type ${filter.displayType} is not supported.`);\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Alter ButtonGroup here] off begin\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t{!this.props.removeClearFilter && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tClear Filters\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.props.removeApplyFilter && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tApply Filters\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Alter ButtonGroup here] end\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default CollectionFilterPanel;\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { action } from 'mobx';\nimport If from '../If/If';\nimport InputWrapper from '../Inputs/InputWrapper';\nimport * as uuid from 'uuid';\nimport { DisplayType } from '../Models/Enums';\nimport InputsHelper from '../Helpers/InputsHelper';\n\nexport interface ITextFieldProps {\n\tmodel: T;\n\tmodelProperty: string;\n\tid?: string;\n\tname?:string;\n\tclassName?: string;\n\tinputClassName?: string;\n\tdefaultToUndefined?: boolean;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\tlabelVisible?: boolean;\n\tisRequired?: boolean;\n\tisDisabled?: boolean;\n\tisReadOnly?: boolean;\n\tstaticInput?: boolean;\n\ttooltip?: string;\n\tsubDescription?: string;\n\tinputProps?: React.InputHTMLAttributes;\n\tplaceholder?: string;\n\tclickToClear?: boolean;\n\tautoFocus?: boolean;\n\terrors?: string | string[];\n\tonAfterChange?: (event: React.ChangeEvent) => void;\n\tonChangeAndBlur?: (event: React.ChangeEvent) => void;\n\tonClickToClear?: (event: React.MouseEvent) => void;\n\t// % protected region % [Add extra ITextFieldProps here] off begin\n\t// % protected region % [Add extra ITextFieldProps here] end\n}\n\n@observer\nexport class TextField extends React.Component, any> {\n\tpublic static defaultProps = {\n\t\tclickToClear: false,\n\t\tinputProps: {},\n\t\tclassName: '',\n\t};\n\tprivate _input?: HTMLInputElement;\n\tprivate uuid = uuid.v4();\n\tprivate valueWhenFocused: string = '';\n\n\tcomponentDidMount() {\n\t\tif(this.props.autoFocus && this._input){\n\t\t\tthis._input.focus();\n\t\t}\n\t}\n\n\tpublic render() {\n\t\tconst {\n\t\t\tmodel,\n\t\t\tmodelProperty,\n\t\t\tname,\n\t\t\tclassName,\n\t\t\tdisplayType,\n\t\t\tlabel,\n\t\t\tisRequired,\n\t\t\tisDisabled,\n\t\t\tisReadOnly,\n\t\t\tstaticInput,\n\t\t\ttooltip,\n\t\t\tsubDescription,\n\t\t\tclickToClear,\n\t\t\tplaceholder,\n\t\t\terrors,\n\t\t\tinputClassName,\n\t\t\t// % protected region % [Add extra props here] off begin\n\t\t\t// % protected region % [Add extra props here] end\n\t\t} = this.props;\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst fieldId = `${id}-field`;\n\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\t\tconst ariaLabel = !labelVisible ? label : undefined;\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(id, tooltip, subDescription);\n\t\t// % protected region % [Override render return here] off begin\n\t\treturn (\n\t\t\t\n\t\t\t\t (this._input = i || undefined)}\n\t\t\t\t\t{...this.props.inputProps}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render method of SearchForm here] end\n\t/**\n\t * Handler for the text box changing\n\t * @param event The HTML input event\n\t */\n\tprivate onChange: React.ChangeEventHandler = (event) => {\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(event.target.value);\n\t\t}\n\t}\n\t/**\n\t * Handler for the form being submitted\n\t * @param event The HTML form input event\n\t */\n\tprivate onSubmit: React.FormEventHandler = (event) => {\n\t\tevent.preventDefault();\n\t\tif (this.props.onSubmit) {\n\t\t\tthis.props.onSubmit();\n\t\t}\n\t}\n\t/**\n\t * Clears the text field and submits the form\n\t */\n\t@action\n\tprivate onClickToClear = () => {\n\t\tthis.props.model.searchTerm = '';\n\t\tif (this.props.onSubmit) {\n\t\t\tthis.props.onSubmit();\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { observable, runInAction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { Button, Display } from 'Views/Components/Button/Button';\nimport { Alignment, ButtonGroup } from 'Views/Components/Button/ButtonGroup';\nimport If from 'Views/Components/If/If';\nimport classNames from 'classnames';\nimport { ICollectionHeaderProps } from './CollectionHeaders';\nimport { ICollectionBulkActionProps } from './Collection';\nimport PaginationData from \"Models/PaginationData\";\nimport CollectionFilterPanel, { ICollectionFilterPanelProps } from './CollectionFilterPanel';\nimport SearchForm from 'Views/Components/SearchForm/SearchForm';\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\ninterface ICollectionMenuProps {\n\tselectedItems: T[];\n\tsearch?: boolean;\n\tfilterConfig?: ICollectionFilterPanelProps;\n\theaders?: Array>;\n\tonSearchTriggered?: (searchTerm: string) => void;\n\tadditionalActions?: React.ReactNode[];\n\tcancelAllSelection?: () => void;\n\ttotalSelectedItems: number;\n\tselectedBulkActions?: Array>;\n\tpagination?: PaginationData;\n\tshowSelectAll?: boolean;\n\tonSelectAll?: () => void;\n\tfilterOrientationRow?: boolean;\n\t// % protected region % [Add any extra ICollectionMenuProps fields here] off begin\n\t// % protected region % [Add any extra ICollectionMenuProps fields here] end\n}\n\ninterface ISearch {\n\tsearchTerm: string;\n}\n\n@observer\nclass CollectionMenu extends React.Component> {\n\t@observable\n\tprivate exportExpanded: boolean = false;\n\n\t@observable\n\tprivate search: ISearch = { searchTerm: \"\" };\n\n\t@observable\n\tprivate showFilter: boolean = false;\n\n\t// % protected region % [Add extra fields here] off begin\n\t// % protected region % [Add extra fields here] end\n\n\t// % protected region % [Override render method of CollectionMenu here] off begin\n\tpublic render() {\n\t\t// TODO: handle more buttons and button group rendering properly\n\t\tconst { filterConfig, totalSelectedItems, selectedBulkActions, search } = this.props;\n\t\tconst additionalActions = this.props.additionalActions || [];\n\n\t\t// The action buttons\n\n\t\tlet bulkActionsBtnGroup = undefined;\n\t\tif(totalSelectedItems && selectedBulkActions && selectedBulkActions.length){\n\t\t\tconst bulkActionButtons = selectedBulkActions.map((action, actIdx) => {\n\t\t\t\tconst icon = action.showIcon && action.icon && action.iconPos \n\t\t\t\t\t? { icon: action.icon, iconPos: action.iconPos } \n\t\t\t\t\t: undefined;\n\t\t\t\treturn {\n\t\t\t\t\t\t\taction.bulkAction(this.props.selectedItems, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}>\n\t\t\t\t\t{action.label}\n\t\t\t\t;\n\t\t\t});\n\n\t\t\tif (bulkActionButtons && bulkActionButtons.length) {\n\t\t\t\tbulkActionsBtnGroup =\n\t\t\t\t\t\n\t\t\t\t\t\t{bulkActionButtons}\n\t\t\t\t\t;\n\t\t\t}\n\t\t}\n\n\t\tlet hasFilter = !!filterConfig && !!filterConfig.filters.length;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t 0} >\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.renderAdditionalActions()}\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t { }}\n\t\t\t\t\t\t\tonClearFilter={this.props.filterConfig ? this.props.filterConfig.onClearFilter : () => { }}\n\t\t\t\t\t\t\tonFilterChanged={(this.props.filterConfig && this.props.filterConfig.onFilterChanged) ? this.props.filterConfig.onFilterChanged : () => { }} />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{bulkActionsBtnGroup}\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{totalSelectedItems} items are selected\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render method of CollectionMenu here] end\n\n\t// % protected region % [Override renderAdditionalActions method here] off begin\n\tprivate renderAdditionalActions(): React.ReactNode {\n\t\tconst additionalActions = this.props.additionalActions || [];\n\t\tif (additionalActions.length > 0) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{additionalActions}\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n\t// % protected region % [Override renderAdditionalActions method here] end\n\n\tprivate onSearchButtonClick = () => {\n\t\tconst { onSearchTriggered } = this.props;\n\t\tif (onSearchTriggered) {\n\t\t\tonSearchTriggered(this.search.searchTerm);\n\t\t}\n\t}\n\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\n\nexport default CollectionMenu;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { action } from 'mobx';\nimport * as uuid from 'uuid';\nimport InputWrapper, { InputType, LabelPositions } from '../Inputs/InputWrapper';\nimport { DisplayType } from '../Models/Enums'\nimport InputsHelper from '../Helpers/InputsHelper';\n\ninterface ICbCheckboxProps {\n\tmodel: T;\n\tmodelProperty: string;\n\tid?: string;\n\tname?: string;\n\tclassName?: string;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\tlabelVisible?: boolean;\n\tisRequired?: boolean;\n\tisDisabled?: boolean;\n\tisReadOnly?: boolean;\n\ttooltip?: string;\n\tsubDescription?: string;\n\tonChecked?: ((event: React.ChangeEvent, checked: boolean) => void);\n\tonAfterChecked?: ((event: React.ChangeEvent, checked: boolean) => void);\n\tinputProps?: React.DetailedHTMLProps, HTMLInputElement>;\n\terrors?: string | string[];\n}\n\n@observer\nexport class Checkbox extends React.Component, any> {\n\tpublic static defaultProps = {};\n\tprivate uuid = uuid.v4();\n\n\tpublic render() {\n\t\tconst {name, className, displayType, label, isRequired, isDisabled, isReadOnly, tooltip, subDescription, errors} = this.props;\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst fieldId = `${id}-field`;\n\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\t\tconst ariaLabel = !labelVisible ? label : undefined;\n\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(id, tooltip, subDescription);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t@action\n\tpublic onChecked = (event: React.ChangeEvent) => {\n\t\tif (this.props.onChecked) {\n\t\t\treturn this.props.onChecked(event, event.target.checked);\n\t\t}\n\n\t\tthis.props.model[this.props.modelProperty] = event.target.checked;\n\n\t\treturn this.props.onAfterChecked?.(event, event.target.checked);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n/**\n * Elements that are defined on the body content context.\n */\nexport interface BodyContentContextElements {\n\t/** The body content div element ref */\n\telement: HTMLElement | null;\n\t// % protected region % [Add any extra BodyContentContextElements here] off begin\n\t// % protected region % [Add any extra BodyContentContextElements here] end\n}\n\n/**\n * The body content context. This is provided to allow children of the body content access the body content tag.\n */\nexport const BodyContentContext = React.createContext({\n\telement: null,\n\t// % protected region % [Add any extra BodyContentContext defaults here] off begin\n\t// % protected region % [Add any extra BodyContentContext defaults here] end\n});\n\n/**\n * Props for the body content.\n */\nexport interface BodyContentProps extends React.DetailedHTMLProps, HTMLDivElement> {\n\t// % protected region % [Add any extra BodyContentProps here] off begin\n\t// % protected region % [Add any extra BodyContentProps here] end\n}\n\n/**\n * The body content component. This contains the content of every page.\n */\nconst BodyContent = (props: BodyContentProps) => {\n\t// % protected region % [Customise the BodyContent component here] off begin\n\tconst [ el, setEl ] = React.useState(null)\n\n\treturn (\n\t\t
setEl(ref)}>\n\t\t\t\n\t\t\t\t{props.children}\n\t\t\t\n\t\t
\n\t);\n\t// % protected region % [Customise the BodyContent component here] end\n}\n\n// % protected region % [Customise the default export here] off begin\nexport default BodyContent;\n// % protected region % [Customise the default export here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { throttle } from 'lodash';\nimport classNames from 'classnames';\nimport { observer } from 'mobx-react';\nimport { contextMenu, Menu, Item, Submenu } from 'react-contexify';\nimport { Button } from '../Button/Button';\nimport { IconPositions } from '../Helpers/Common';\nimport { MenuItemEventHandler } from 'react-contexify/lib/types';\nimport { BodyContentContext } from '../PageWrapper/BodyContent';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n/**\n * A context menu item is a clickable element in the context menu with a callback function.\n */\nexport interface IContextMenuItemProps {\n\t/** A label for the action button */\n\tlabel?: string;\n\t/** A class for the action button */\n\tbuttonClass?: string;\n\t/** An icon class for the action button */\n\ticon?: string;\n\t/** The position of the icon */\n\ticonPos?: IconPositions;\n\t/** Should the label be displayed*/\n\tshowLabel?: boolean;\n\t/** Callback function on click */\n\tonClick?: (args: MenuItemEventHandler) => any;\n\t/**\n\t * A custom button that is displayed, instead of the one provided by the collection.\n\t * If this field is provided then the label, icon and class related properties are ignored.\n\t * */\n\tcustomItem?: React.ReactNode;\n\t// % protected region % [Add any extra IContextMenuItemProps here] off begin\n\t// % protected region % [Add any extra IContextMenuItemProps here] end\n}\n\n/**\n * Context menu group options. A context menu group is a submenu of actions.\n */\nexport interface IContextMenuItemGroup {\n\t/** The name of the menu group */\n\tgroupName?: string;\n\t/** List of actions in this menu group */\n\tactions: IContextMenuActions;\n\t/** Menu expand icon */\n\tarrow?: string;\n\t/** A custom component to use for this item */\n\tcustomItem?: React.ReactNode;\n\t// % protected region % [Add any extra IContextMenuItemGroup here] off begin\n\t// % protected region % [Add any extra IContextMenuItemGroup here] end\n}\n\n/**\n * A context menu action can either be a nested group or a single item.\n */\nexport type IContextMenuActions = Array;\n\n/**\n * Props for the context menu\n */\nexport interface IContextMenuProps {\n\t/** Unique id for this instance of the menu */\n\tmenuId: string;\n\t/** The actions inside of this menu */\n\tactions: IContextMenuActions;\n\t/** Class name for the menu */\n\tclassName?: string;\n\t/** Parent element of the context menu. Will attempt to use the page context otherwise. */\n\tparentElement?: HTMLElement | null;\n\t/** The throttle time for the menu close scroll listener */\n\tthrottleTime?: number;\n\t/** Location where the menu is hosted */\n\tlocation?: 'admin' | 'frontend';\n\t// % protected region % [Add any extra IContextMenuProps here] off begin\n\t// % protected region % [Add any extra IContextMenuProps here] end\n}\n\n/**\n * Determines weather a context menu item is a group of actions or not.\n * @param item The menu item to check.\n */\nexport function isItemGroup(item: IContextMenuItemProps | IContextMenuItemGroup): item is IContextMenuItemGroup {\n\treturn item['groupName'] !== undefined;\n}\n\n/**\n * A context menu is a menu that is displayed at the location where a user clicks to invoke it.\n */\n@observer\nexport class ContextMenu extends React.Component {\n\tstatic defaultProps: Partial = {\n\t\tlocation: 'frontend',\n\t\tthrottleTime: 50,\n\t\t// % protected region % [Add any extra defaultProps here] off begin\n\t\t// % protected region % [Add any extra defaultProps here] end\n\t}\n\n\t// % protected region % [Customise the static context here] off begin\n\t/** Context for the current page to attach a scroll listener to if no parent is provided */\n\tstatic contextType = BodyContentContext;\n\tcontext: React.ContextType | undefined;\n\t// % protected region % [Customise the static context here] end\n\n\t/** Ref of the rendered menu */\n\tmenuRef = React.createRef();\n\n\t/** The parent element which the scroll listener is attached to */\n\tget parent() {\n\t\t// % protected region % [Customise the parent getter here] off begin\n\t\treturn (this.props.parentElement ?? this.context?.element) ?? null;\n\t\t// % protected region % [Customise the parent getter here] end\n\t}\n\n\t/** The last element that has had the scroll listener attached to it */\n\toldParent: HTMLElement | null = null;\n\n\t/** Parent scroll callback. This will close the current menu */\n\tonScroll = () => {\n\t\t// % protected region % [Customise the onScroll method here] off begin\n\t\tthis.menuRef.current?.hide();\n\t\t// % protected region % [Customise the onScroll method here] end\n\t}\n\n\t/**\n\t * Adds a scroll listener to the parent el to close the menu on scroll.\n\t */\n\taddScrollListener = () => {\n\t\t// % protected region % [Customise the addScrollListener method here] off begin\n\t\tif (this.parent) {\n\t\t\tthis.oldParent = this.parent;\n\t\t\tthis.parent.addEventListener('scroll', throttle(this.onScroll, this.props.throttleTime), { passive: true });\n\t\t}\n\t\t// % protected region % [Customise the addScrollListener method here] end\n\t}\n\n\t/**\n\t * Removes the scroll listener from the provided element.\n\t * @param el The element to remove the scroll listener from.\n\t */\n\tremoveScrollListener = (el: HTMLElement | null) => {\n\t\t// % protected region % [Customise the removeScrollListener method here] off begin\n\t\tif (el) {\n\t\t\tel?.removeEventListener('scroll', this.onScroll)\n\t\t}\n\t\t// % protected region % [Customise the removeScrollListener method here] end\n\t};\n\n\tcomponentDidMount() {\n\t\t// % protected region % [Customise the componentDidMount method here] off begin\n\t\tthis.addScrollListener();\n\t\t// % protected region % [Customise the componentDidMount method here] end\n\t}\n\n\tcomponentDidUpdate() {\n\t\t// % protected region % [Customise the componentDidUpdate method here] off begin\n\t\tif (this.oldParent !== this.parent) {\n\t\t\tthis.removeScrollListener(this.oldParent);\n\t\t\tthis.addScrollListener();\n\t\t}\n\t\t// % protected region % [Customise the componentDidUpdate method here] end\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// % protected region % [Customise the componentWillUnmount method here] off begin\n\t\tthis.removeScrollListener(this.parent);\n\t\t// % protected region % [Customise the componentWillUnmount method here] end\n\t}\n\n\trender() {\n\t\t// % protected region % [Customise the render method here] off begin\n\t\tconst menuItems = this.getSubMenu(this.props.actions, this.props.menuId);\n\t\treturn (\n\t\t\t\n\t\t\t\t{menuItems}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customise the render method here] end\n\t}\n\n\t/**\n\t * Gets the submenu items for this menu.\n\t * @param subActions A list of actions for the context menu.\n\t * @param parentItemKey The unique key for the menu parent.\n\t */\n\tgetSubMenu = (subActions: Array, parentItemKey: string) => {\n\t\t// % protected region % [Customise the getSubMenu method here] off begin\n\t\treturn subActions.map((menuItem, index) => {\n\t\t\tconst itemKey = `${parentItemKey}-${index}`;\n\t\t\tlet menuItemNode = undefined;\n\t\t\tif (!isItemGroup(menuItem)) {\n\t\t\t\tif (menuItem.label) {\n\t\t\t\t\tconst iconPos = menuItem.iconPos ?? 'icon-left'\n\t\t\t\t\tconst icon = menuItem.icon ? { icon: menuItem.icon, iconPos: iconPos } : undefined;\n\t\t\t\t\tmenuItemNode = ;\n\t\t\t\t} else {\n\t\t\t\t\tmenuItemNode = menuItem.customItem ?? '-';\n\t\t\t\t}\n\n\t\t\t\treturn menuItem.onClick?.(args)} key={itemKey}>\n\t\t\t\t\t{menuItemNode}\n\t\t\t\t;\n\t\t\t} else {\n\t\t\t\tlet groupItem: React.ReactNode;\n\t\t\t\tif (menuItem.customItem) {\n\t\t\t\t\tgroupItem = menuItem.customItem;\n\t\t\t\t} else {\n\t\t\t\t\tgroupItem = \n\t\t\t\t\t\t{menuItem.groupName ?? '-'}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn \n\t\t\t\t\t{this.getSubMenu(menuItem.actions, itemKey)}\n\t\t\t\t;\n\t\t\t}\n\t\t});\n\t\t// % protected region % [Customise the getSubMenu method here] end\n\t}\n\n\t/**\n\t * Shows this menu at the location specified by the provided mouse event.\n\t * @param e\n\t */\n\thandleContextMenu = (e: React.MouseEvent) => {\n\t\t// % protected region % [Customise the handleContextMenu method here] off begin\n\t\t// Always prevent default behavior\n\t\te.preventDefault();\n\n\t\tcontextMenu.show({\n\t\t\tid: this.props.menuId,\n\t\t\tevent: e,\n\t\t});\n\t\t// % protected region % [Customise the handleContextMenu method here] end\n\t}\n\n\t// % protected region % [Add any extra methods here] off begin\n\t// % protected region % [Add any extra methods here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { contextMenu } from 'react-contexify';\nimport { IContextMenuProps, ContextMenu, IContextMenuItemProps, isItemGroup, IContextMenuItemGroup } from '../ContextMenu/ContextMenu';\nimport { MenuItemEventHandler } from 'react-contexify/lib/types';\n\nexport interface IEntityContextMenuItemActionProps extends IContextMenuItemProps {\n\t/** Callback function on click with entity */\n\tonEntityClick: (args: MenuItemEventHandler, entity: T) => any;\n\tcondition?: (model: T) => boolean; \n}\n\ninterface IEntityContextMenuItemGroup extends IContextMenuItemGroup {\n\tactions: IEntityContextMenuActions;\n}\n\nexport type IEntityContextMenuActions = Array | IEntityContextMenuItemGroup>;\n\ninterface IEntityContextMenuProps extends IContextMenuProps {\n\tactions: IEntityContextMenuActions;\n\tentity: T;\n}\n\n@observer\nexport class EntityContextMenu extends React.Component> {\n\tpublic render() {\n\t\treturn (\n\t\t\t (isItemGroup(action) ? true : action.condition?.(this.props.entity) ?? true)).map(this.tranformAction)\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate tranformAction = (action: IEntityContextMenuItemActionProps | IEntityContextMenuItemGroup) : IEntityContextMenuItemActionProps | IEntityContextMenuItemGroup => {\n\t\tif (!isItemGroup(action)) {\n\t\t\treturn this.addEntityProps(action);\n\t\t} else {\n\t\t\treturn {\n\t\t\t\t...action,\n\t\t\t\tactions: action.actions.map(this.tranformAction)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate addEntityProps = (action: IEntityContextMenuItemActionProps) => {\n\t\tconst newOnClick = action.onClick ||\n\t\t\t((args: MenuItemEventHandler) => { \n\t\t\t\taction.onEntityClick(args, this.props.entity) \n\t\t\t});\n\t\treturn {\n\t\t\t...action,\n\t\t\tonClick: newOnClick\n\t\t}\n\t}\n\n\tpublic handleContextMenu = (e: React.MouseEvent) => {\n\t\t// always prevent default behavior\n\t\te.preventDefault();\n\n\t\tcontextMenu.show({\n\t\t\tid: this.props.menuId,\n\t\t\tevent: e,\n\t\t});\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { observer } from \"mobx-react\";\nimport * as React from 'react';\nimport { ICollectionItemActionProps, expandFn, showExpandFn, actionFilterFn } from './Collection';\nimport { observable, computed, runInAction } from 'mobx';\nimport { Checkbox } from '../Checkbox/Checkbox';\nimport { Button } from '../Button/Button';\nimport { ButtonGroup, Alignment } from '../Button/ButtonGroup';\nimport { ICollectionHeaderPropsPrivate } from './CollectionHeaders';\nimport classNames from 'classnames';\nimport * as moment from 'moment';\nimport If from '../If/If';\nimport { EntityContextMenu, IEntityContextMenuActions } from '../EntityContextMenu/EntityContextMenu';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface ICollectionRowProps {\n\titem: T;\n\theaders: Array>;\n\tactions?: Array> | actionFilterFn;\n\tactionsMore?: IEntityContextMenuActions;\n\tselectableItems?: boolean;\n\texpandAction?: expandFn;\n\tshowExpandButton?: showExpandFn;\n\tchecked?: boolean;\n\tonChecked?: (event: React.ChangeEvent, checked: boolean, checkedItem: T) => void;\n\tidColumn?: string;\n\tkeyValue: string;\n\tdataFields?: (row: T) => { [key: string]: string };\n\t// % protected region % [Add extra collection row props here] off begin\n\t// % protected region % [Add extra collection row props here] end\n}\n\n/**\n * This is a row in a collection component\n */\n@observer\nclass CollectionRow extends React.Component, any> {\n\t@observable\n\tprivate expanded = false;\n\n\t@observable\n\tprivate checked = {checked: this.props.checked}\n\n\tprivate moreMenuRef : EntityContextMenu | null;\n\n\t// % protected region % [Add extra attributes here] off begin\n\t// % protected region % [Add extra attributes here] end\n\n\t/**\n\t * The dom for the expanded row\n\t */\n\t@computed\n\tprivate get expandDom() {\n\t\t// % protected region % [Customize expandDom computed field here] off begin\n\t\tif (this.props.expandAction && this.expanded) {\n\t\t\t// The magic number is since we have an extra column for the checkbox and another for the actions\n\t\t\tconst colSpanOffset = this.props.selectableItems ? 2 : 1;\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.expandAction(this.props.item)}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t// % protected region % [Customize expandDom computed field here] end\n\t}\n\n\tconstructor(props: ICollectionRowProps, context: any) {\n\t\tsuper(props, context);\n\t\tthis.checked.checked = this.props.checked;\n\t\t// % protected region % [Add extra constructor logic here] off begin\n\t\t// % protected region % [Add extra constructor logic here] end\n\t}\n\n\tpublic render() {\n\t\t// % protected region % [Customize render logic here] off begin\n\t\tconst columns = [];\n\n\t\t// The checkbox at the start of the row\n\t\tif (!!this.props.selectableItems) {\n\t\t\tcolumns.push(\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\t\tif (this.props.onChecked) {\n\t\t\t\t\t\t\t\t\tthis.props.onChecked(event, event.target.checked, this.props.item);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t,\n\t\t\t);\n\t\t}\n\n\t\t// The columns from the item to display\n\t\tcolumns.push(this.props.headers.map((column, itemIdx) => {\n\t\t\tlet displayValue: any;\n\n\t\t\tif (column.transformItem) {\n\t\t\t\tdisplayValue = column.transformItem(this.props.item, column.name);\n\t\t\t} else if (this.props.item[column.name] || this.props.item[column.name] === 0) {\n\t\t\t\tif (typeof(this.props.item[column.name]['toLocaleDateString']) === 'function') {\n\t\t\t\t\tdisplayValue = moment(this.props.item[column.name]).format('DD/MM/YYYY');\n\t\t\t\t} else if (typeof(this.props.item[column.name]['toString']) === 'function') {\n\t\t\t\t\tdisplayValue = this.props.item[column.name]['toString']();\n\t\t\t\t} else {\n\t\t\t\t\tdisplayValue = this.props.item;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdisplayValue = column.nullValue || 'None';\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{displayValue}\n\t\t\t\t\n\t\t\t);\n\t\t}));\n\n\t\t// The action buttons\n\t\tlet actionButtons: JSX.Element[] = [];\n\n\t\tif (typeof(this.props.actions) === 'function') {\n\t\t\tactionButtons = this.props.actions(this.props.item)\n\t\t\t\t.map((action, actIdx) => {\n\t\t\t\t\tif (!action.customButton) {\n\t\t\t\t\t\tconst icon = action.showIcon && action.icon && action.iconPos ? {icon: action.icon, iconPos: action.iconPos} : undefined;\n\t\t\t\t\t\treturn {action.action(this.props.item, event);}} } >\n\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {action.customButton(this.props.item)}\n\t\t\t\t});\n\t\t} else if (Array.isArray(this.props.actions)) {\n\t\t\tactionButtons = this.props.actions\n\t\t\t\t.map((action, actIdx) => {\n\t\t\t\t\tif (!action.customButton) {\n\t\t\t\t\t\tconst icon = action.showIcon && action.icon && action.iconPos ? {icon: action.icon, iconPos: action.iconPos} : undefined;\n\t\t\t\t\t\treturn {action.action(this.props.item, event);}} } >\n\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {action.customButton(this.props.item)}\n\t\t\t\t});\n\t\t}\n\n\t\t// The expand button if needed\n\t\tlet expandButton = null;\n\t\tif (this.props.expandAction && (!this.props.showExpandButton || this.props.showExpandButton(this.props.item))) {\n\t\t\texpandButton = (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tif (expandButton || this.props.actions || (this.props.actionsMore && this.props.actionsMore.length > 0)) {\n\t\t\tcolumns.push(\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{actionButtons}\n\t\t\t\t\t\t{expandButton}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t { this.moreMenuRef = ref || null }}\n\t\t\t\t\t\t\t\tentity={this.props.item}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\tif (this.moreMenuRef) {\n\t\t\t\t\t\t\t\t\t\tthis.moreMenuRef.handleContextMenu(event);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={{ icon: \"more-horizontal\", iconPos: 'icon-top' }}>More\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t,\n\t\t\t);\n\t\t}\n\n\t\tlet prefixedDataFields = {};\n\t\tif (this.props.dataFields) {\n\t\t\tconst dataFields = this.props.dataFields(this.props.item);\n\t\t\tObject.keys(dataFields).forEach(key => {\n\t\t\t\tprefixedDataFields[`data-${key}`] = dataFields[key];\n\t\t\t});\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{columns}\n\t\t\t\t\n\t\t\t\t{this.expandDom}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize render logic here] end\n\t}\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\n\nexport default CollectionRow;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { Checkbox } from '../Checkbox/Checkbox';\nimport If from '../If/If';\nimport { ICollectionItemActionProps, actionFilterFn } from './Collection';\nimport { observable, runInAction } from 'mobx';\nimport { IOrderByCondition } from '../ModelCollection/ModelQuery';\nimport { DisplayType } from '../Models/Enums';\n// % protected region % [Add extra imports and exports here] off begin\n// % protected region % [Add extra imports and exports here] end\n\ntype nameFn = (name: string) => (string | React.ReactNode);\ntype transformFn = (item: T, name: string) => (string | React.ReactNode);\n\nexport interface ICollectionHeaderProps {\n\tname: string;\n\tdisplayName: string | nameFn;\n\tsortable?: boolean;\n\ttransformItem?: transformFn;\n\tnullValue?: string;\n\tsortClicked?: (event: React.MouseEvent) => IOrderByCondition | undefined | void;\n\t// % protected region % [Add extra header props here] off begin\n\t// % protected region % [Add extra header props here] end\n}\n\nexport interface ICollectionHeaderPropsPrivate extends ICollectionHeaderProps {\n\theaderName?: string | React.ReactNode;\n\t// % protected region % [Add extra private header props here] off begin\n\t// % protected region % [Add extra private header props here] end\n}\n\nexport interface ICollectionHeadersProps {\n\theaders: Array>;\n\tactions?: Array> | actionFilterFn;\n\tselectableItems?: boolean;\n\tallChecked: boolean;\n\tonCheckedAll?: (event: React.ChangeEvent, checked: boolean) => void\n\t/** The default order by condition */\n\torderBy?: IOrderByCondition | undefined;\n\t// % protected region % [Add extra headers props here] off begin\n\t// % protected region % [Add extra headers props here] end\n}\n\n@observer\nexport default class CollectionHeaders extends React.Component> {\n\t@observable\n\tprivate orderBy: IOrderByCondition | undefined | void;\n\n\t// % protected region % [Add extra class fields here] off begin\n\t// % protected region % [Add extra class fields here] end\n\n\tconstructor(props: ICollectionHeadersProps, context: any){\n\t\t// % protected region % [Customise constructor here] off begin\n\t\tsuper(props, context);\n\t\tconst { orderBy } = this.props;\n\t\tthis.orderBy = orderBy;\n\t\t// % protected region % [Customise constructor here] end\n\t}\n\tpublic render() {\n\t\t// % protected region % [Customise render here] off begin\n\t\tconst { selectableItems, headers, actions } = this.props;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.renderSelectAllCheckbox()}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{headers.map((header, idx) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\trunInAction(() => {\n\t\t\t\t\t\t\t\t\t\tif (header.sortClicked) {\n\t\t\t\t\t\t\t\t\t\t\tthis.orderBy = header.sortClicked(event);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\tclassName={header.sortable ? ((!this.orderBy || this.orderBy.path !== header.name) ? 'sortable' : (this.orderBy.descending ? \"sortable--des\" : \"sortable--asc\")) : ''}>\n\t\t\t\t\t\t\t\t{header.headerName ? header.headerName : `Column ${idx}`}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customise render here] end\n\t}\n\n\t// % protected region % [Customize renderSelectAllCheckbox here] off begin\n\tpublic renderSelectAllCheckbox() {\n\t\tconst { allChecked, onCheckedAll } = this.props;\n\t\tconst checkboxDisplayType = DisplayType.INLINE;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\t\trunInAction(() => {\n\t\t\t\t\t\t\tif (onCheckedAll) {\n\t\t\t\t\t\t\t\tonCheckedAll(event, event.target.checked);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n\t// % protected region % [Customize renderSelectAllCheckbox here] end\n\n}\n\n// % protected region % [Add methods here] off begin\n// % protected region % [Add methods here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { IconPositions } from '../Helpers/Common';\nimport { observer } from 'mobx-react';\nimport {action, computed, observable} from 'mobx';\nimport If from '../If/If';\nimport CollectionMenu from './CollectionMenu';\nimport Pagination from '../Pagination/Pagination';\nimport { ReactNode } from 'react';\nimport CollectionRow from './CollectionRow';\nimport CollectionHeaders, { ICollectionHeaderProps, ICollectionHeaderPropsPrivate } from './CollectionHeaders';\nimport IPaginationData from 'Models/PaginationData';\nimport * as uuid from 'uuid';\nimport classNames from 'classnames';\nimport { union, intersectionWith, isEqual, pullAllWith } from 'lodash';\nimport { IEntityContextMenuActions } from '../EntityContextMenu/EntityContextMenu';\nimport { ICollectionFilterPanelProps } from './CollectionFilterPanel';\nimport { IOrderByCondition } from '../ModelCollection/ModelQuery';\n\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport type actionFn = (model: T, event: React.MouseEvent) => void;\nexport type bulkActionFn = (models: T[], event: React.MouseEvent) => void;\nexport type expandFn = (model: T) => React.ReactNode | string;\nexport type showExpandFn = (model: T) => boolean;\nexport type actionFilterFn = (item: T) => Array>;\n\nexport interface ICollectionActionProps {\n\t/** A label for the action button */\n\tlabel: string;\n\t/** A class for the action button */\n\tbuttonClass?: string;\n\t/** An icon class for the action button */\n\ticon?: string;\n\t/** The position of the icon */\n\ticonPos?: IconPositions;\n\t/** Should the icon be displayed */\n\tshowIcon?: boolean;\n\t/** Should the label be displayed*/\n\tshowLabel?: boolean;\n\t/** Is the action an additional action, this is displayed in the more menu */\n\tisAdditional?: boolean;\n\t/** \n\t * A custom button that is displayed, instead of the one provided by the collection \n\t * Using this will override any and all presentation level options also provided\n\t */\n\tcustomButton?: (model: T) => React.ReactNode;\n\t// % protected region % [Add any extra ICollectionActionProps fields here] off begin\n\t// % protected region % [Add any extra ICollectionActionProps fields here] end\n}\n\nexport interface ICollectionItemActionProps extends ICollectionActionProps {\n\t/** The callback function for the action */\n\taction: actionFn;\n}\n\nexport interface ICollectionBulkActionProps extends ICollectionActionProps {\n\t/** The callback function for the action */\n\tbulkAction: bulkActionFn;\n}\n\nexport interface ICollectionListProps {\n\t/** The headers to provide to the collection, this defines the columns that are displayed */\n\theaders: Array>;\n\t/** The actions that are displayed for each item on the collection */\n\tactions?: Array> | actionFilterFn;\n\t/** More actions that will be put into a context menu with will be triggered by clicking a button on the each row */\n\tactionsMore?: IEntityContextMenuActions;\n\t/** The actions that are defined */\n\tselectedBulkActions?: Array>;\n\t/**\n\t * A function that takes a row and returns a component to render in the expand section\n\t * If this property exists an expand button is rendered on every row\n\t */\n\texpandList?: expandFn;\n\t/**\n\t * A function that takes a row and returns a boolean, to determine whether to show the expand button\n\t */\n\tshowExpandButton?: showExpandFn;\n\t/** A class name for the collection */\n\tclassName?: string;\n\t/** Pass through for any props to pass to the top level section */\n\tinnerProps?: React.DetailedHTMLProps, HTMLElement>;\n\t/** Should items be selectable, if this is true then checkboxes are rendered for each row */\n\tselectableItems?: boolean;\n\t/** Should the column headers be hidden */\n\thideHeaders?: boolean;\n\t/** Callback for the search textbox */\n\tonSearchTriggered?: (searchTerm: string) => void;\n\t/** Any additional actions that should be displayed in the collection menu */\n\tadditionalActions?: ReactNode[];\n\t/** A filter function for the data displayed on the collection */\n\tfilter?: (model: T) => boolean;\n\t/** menu filter config */\n\tmenuFilterConfig?: ICollectionFilterPanelProps;\n\t/** Callback when the selected checkboxes change */\n\titemSelectionChanged?: (checked: boolean, changedItems: T[]) => T[];\n\t/** Callback for when the select items on all pages button is pressed */\n\tonCheckedAllPages?: (checked: boolean)=> T[]\n\t/** Callback for when the deselect items on all pages button is pressed */\n\tcancelAllSelection?: () => void;\n\t/** A function to display the total number of selected items, will default to only showing this on this page */\n\tmenuCountFunction?: (selectedItems: T[]) => number;\n\t/** A function get the selected items on the collection, this overwrite the default selection logic */\n\tgetSelectedItems?: () => T[];\n\t/**\n\t * A on the models that uniquely identifies the model.\n\t * If provided will display in the `data-id` property in the dom\n\t */\n\tidColumn?: string;\n\t/** The data attributs to be inserted into collection row tag */\n\tdataFields?: (row: T) => {[key: string]: string};\n\t/** The default order by condition */\n\torderBy?: IOrderByCondition | undefined;\n\t// % protected region % [Add any extra ICollectionListProps fields here] off begin\n\t// % protected region % [Add any extra ICollectionListProps fields here] end\n}\n\nexport interface ICollectionProps extends ICollectionListProps {\n\t/** The collection to display */\n\tcollection: T[];\n\t/** Should the pagination be hidden */\n\thidePagination?: boolean;\n\t/** The pagination data for the collection */\n\tpagination?: IPaginationData;\n\t/** Function to call on page change */\n\tonPageChange?: () => void;\n\tfilterOrientationRow?: boolean;\n\t// % protected region % [Add any extra ICollectionProps fields here] off begin\n\t// % protected region % [Add any extra ICollectionProps fields here] end\n}\n\n/**\n * Displays a collection of items\n */\n@observer\nexport default class Collection extends React.Component, any> {\n\t/**\n\t * The currently selected items on the page\n\t */\n\t@observable\n\tprivate _selectedItems: T[] = [];\n\t@computed\n\tprivate get selectedItems() {\n\t\tif (this.props.getSelectedItems) {\n\t\t\treturn this.props.getSelectedItems();\n\t\t}\n\t\treturn this._selectedItems;\n\t}\n\n\t/**\n\t * The headers of the collection\n\t */\n\t@computed\n\tprivate get headers(): Array> {\n\t\treturn this.props.headers.map(header => {\n\t\t\tconst computedHeader: ICollectionHeaderPropsPrivate = {...header};\n\n\t\t\tif (typeof header.displayName === 'string') {\n\t\t\t\tcomputedHeader.headerName = header.displayName;\n\t\t\t} else if (typeof header.displayName === 'function') {\n\t\t\t\tcomputedHeader.headerName = header.displayName(header.name);\n\t\t\t}\n\n\t\t\treturn computedHeader;\n\t\t});\n\t}\n\n\t/**\n\t * Should the all items checkbox be selected\n\t */\n\t@computed\n\tprivate get allChecked() {\n\t\treturn ((intersectionWith(this.selectedItems, this.props.collection, isEqual).length === this.props.collection.length) && (this.props.collection.length > 0));\n\t}\n\n\t/**\n\t * The total number of items that exist over all pages\n\t */\n\t@computed\n\tprivate get totalItems() {\n\t\treturn this.props.pagination\n\t\t\t? this.props.pagination.totalRecords\n\t\t\t: this.props.collection.length;\n\t}\n\n\t/**\n\t * Gets the number of items that have been checked\n\t */\n\t@computed\n\tprivate get selectedItemsCount() {\n\t\tif (this.props.menuCountFunction) {\n\t\t\treturn this.props.menuCountFunction(this.selectedItems);\n\t\t}\n\t\treturn this.selectedItems.length;\n\t}\n\n\t/**\n\t * Should the select all items on all pages button be shown\n\t */\n\t@computed\n\tprivate get showSelectAll() {\n\t\treturn this.allChecked && this.totalItems > this.selectedItemsCount;\n\t};\n\n\t// % protected region % [Override render method of Collection here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.cancelAllSelection();\n\t\t\t\t\t}}\n\t\t\t\t\tpagination={this.props.pagination}\n\t\t\t\t\tshowSelectAll={this.showSelectAll}\n\t\t\t\t\tonSelectAll={this.checkAllPages}\n\t\t\t\t\ttotalSelectedItems={this.selectedItemsCount}\n\t\t\t\t\tselectedBulkActions={this.props.selectedBulkActions}\n\t\t\t\t\tfilterOrientationRow={this.props.filterOrientationRow}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render method of Collection here] end\n\n\n\t/**\n\t * The collection pagination component\n\t */\n\tpublic pagination = () => {\n\t\tconst { pagination, hidePagination } = this.props;\n\t\tif (hidePagination || !pagination) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\n\t/**\n\t * The table list component\n\t */\n\tprivate list = () => {\n\t\tconst collectionId = uuid.v4();\n\t\t// % protected region % [change any classes for all collectionlists] off begin\n\t\tconst className = classNames('collection__list', `${this.props.expandList ? 'collection__list--expandable' : null}`);\n\t\t// % protected region % [change any classes for all collectionlists] end\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{this.header()}\n\t\t\t\t\t\n\t\t\t\t\t\t{this.row({id: collectionId}) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\t// % protected region % [Override method row of Collection here] off begin\n\t/**\n\t * The table row component\n\t * @param props Contains the id of the row\n\t */\n\tprivate row = (props: {id: string}) => {\n\t\tconst filter = this.props.filter || (() => true);\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.props.collection.filter(filter).map((item, idx) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t isEqual(i, item))}\n\t\t\t\t\t\t\tonChecked={this.onRowChecked}\n\t\t\t\t\t\t\texpandAction={this.props.expandList}\n\t\t\t\t\t\t\tshowExpandButton={this.props.showExpandButton}\n\t\t\t\t\t\t\tkey={this.props.idColumn ? item[this.props.idColumn] : `${idx}-${props.id}`}\n\t\t\t\t\t\t\tkeyValue={this.props.idColumn ? item[this.props.idColumn] : `${idx}-${props.id}`}\n\t\t\t\t\t\t\tidColumn={this.props.idColumn}\n\t\t\t\t\t\t\tdataFields={this.props.dataFields}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override method row of Collection here] end\n\n\t// % protected region % [Override method header of Collection here] off begin\n\t/**\n\t * The header row component\n\t */\n\tprivate header = () => {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\theaders={this.headers}\n\t\t\t\t\tselectableItems={this.props.selectableItems}\n\t\t\t\t\tactions={this.props.actions}\n\t\t\t\t\tallChecked={this.allChecked}\n\t\t\t\t\tonCheckedAll={this.onCheckedAll}\n\t\t\t\t\torderBy={this.props.orderBy} />\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override method header of Collection here] end\n\n\t/**\n\t * Selects or deselects items from the collection\n\t * @param checked Weather to select or deselect the items\n\t * @param items The items to change\n\t */\n\t@action\n\tprivate selectItems(checked: boolean, items: T[]) {\n\t\tif (this.props.itemSelectionChanged) {\n\t\t\tthis.props.itemSelectionChanged(checked, items);\n\t\t} else {\n\t\t\tif (checked) {\n\t\t\t\tthis._selectedItems = union(this._selectedItems, items);\n\t\t\t} else {\n\t\t\t\tpullAllWith(this._selectedItems, items, isEqual)\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * The callback for when a row is checked\n\t * @param event The checkbox change event\n\t * @param checked Weather the checkbox was checked or unchecked\n\t * @param checkedItem The item that was checked\n\t */\n\t@action\n\tprivate onRowChecked = (event: React.ChangeEvent, checked: boolean, checkedItem: T) => {\n\t\tthis.selectItems(checked, [checkedItem]);\n\t}\n\n\t/**\n\t * Callback when the checkbox in the collection header was changed\n\t * @param event The checkbox change event\n\t * @param checked Weather the checkbox was checked or unchecked\n\t */\n\tprivate onCheckedAll = (event: React.ChangeEvent, checked: boolean) => {\n\t\tthis.selectItems(checked, this.props.collection);\n\t}\n\n\t/**\n\t * Callback for when the select all pages button was pressed\n\t */\n\tprivate checkAllPages = () => {\n\t\tif (this.props.onCheckedAllPages) {\n\t\t\tthis.selectItems(true, this.props.onCheckedAllPages(true));\n\t\t}\n\t}\n\n\t/**\n\t * Callback when the cancel selection button was pressed\n\t */\n\tprivate cancelAllSelection() {\n\t\tthis.selectItems(false, this.props.collection);\n\t\tif(this.props.cancelAllSelection) {\n\t\t\tthis.props.cancelAllSelection();\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { QueryResult, Query, OperationVariables } from 'react-apollo';\nimport { DocumentNode } from 'graphql';\nimport { Model } from 'Models/Model';\nimport { PaginationQueryOptions } from 'Models/PaginationData';\nimport { getFetchAllQuery, getFetchAllConditional } from 'Util/EntityUtils';\nimport { observer } from 'mobx-react';\nimport { isOrCondition } from 'Util/GraphQLUtils';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport type Comparators = 'contains'\n\t| 'endsWith'\n\t| 'equal'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'in'\n\t| 'notIn'\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'like'\n\t| 'notEqual'\n\t| 'startsWith'\n\t// % protected region % [Add extra comparators here] off begin\n\t// % protected region % [Add extra comparators here] end\n\t;\n\nexport interface IOrderByCondition {\n\tpath: string;\n\tdescending?: boolean;\n\t// % protected region % [Add any extra order by condition fields here] off begin\n\t// % protected region % [Add any extra order by condition fields here] end\n}\n\nexport type CaseComparison = 'CURRENT_CULTURE'\n\t| 'CURRENT_CULTURE_IGNORE_CASE'\n\t| 'INVARIANT_CULTURE'\n\t| 'INVARIANT_CULTURE_IGNORE_CASE'\n\t| 'ORDINAL'\n\t| 'ORDINAL_IGNORE_CASE'\n\t// % protected region % [Add extra case comparisons here] off begin\n\t// % protected region % [Add extra case comparisons here] end\n\t;\n\nexport type CaseComparisonPascalCase = 'CurrentCulture'\n\t| 'CurrentCultureIgnoreCase'\n\t| 'InvariantCulture'\n\t| 'InvariantCultureIgnoreCase'\n\t| 'Ordinal'\n\t| 'OrdinalIgnoreCase'\n\t// % protected region % [Add extra pascal case comparators here] off begin\n\t// % protected region % [Add extra pascal case comparators here] end\n\t;\n\ninterface BaseWhereCondition {\n\tpath: string;\n\tcomparison: Comparators;\n\tvalue: any;\n\tnegate?: boolean;\n\t// % protected region % [Add any extra base where condition fields here] off begin\n\t// % protected region % [Add any extra base where condition fields here] end\n}\n\nexport interface IWhereCondition extends BaseWhereCondition {\n\tcase?: CaseComparison;\n\t// % protected region % [Add any extra where condition fields here] off begin\n\t// % protected region % [Add any extra where condition fields here] end\n}\n\nexport interface IWhereConditionApi extends BaseWhereCondition {\n\tcase?: CaseComparisonPascalCase;\n\t// % protected region % [Add any extra api where condition fields here] off begin\n\t// % protected region % [Add any extra api where condition fields here] end\n}\n\nexport interface IModelQueryVariables {\n\tskip?: number;\n\ttake?: number;\n\targs?: Array>;\n\torderBy: Array>;\n\tids?: string[];\n\t// % protected region % [Add any extra model query variables fields here] off begin\n\t// % protected region % [Add any extra model query variables fields here] end\n}\n\nexport interface IModelQueryProps {\n\tchildren: (result: QueryResult) => JSX.Element | null;\n\tmodel: {new(json?: {}): T};\n\tconditions?: Array> | Array>>;\n\tids?: string[];\n\torderBy?: IOrderByCondition;\n\tcustomQuery?: DocumentNode;\n\tpagination: PaginationQueryOptions;\n\tuseListExpands?: boolean;\n\texpandString?: string;\n\t// % protected region % [Add any extra model query props here] off begin\n\t// % protected region % [Add any extra model query props here] end\n}\n\n@observer\nclass ModelQuery extends React.Component> {\n\t// % protected region % [Add any extra class methods here] off begin\n\t// % protected region % [Add any extra class methods here] end\n\n\tpublic render() {\n\t\t// % protected region % [Customize render here] off begin\n\t\tlet fetchAllQuery;\n\n\t\tif (isOrCondition(this.props.conditions)) {\n\t\t\tfetchAllQuery = getFetchAllConditional(this.props.model, this.props.expandString, this.props.useListExpands);\n\t\t} else {\n\t\t\tfetchAllQuery = getFetchAllQuery(this.props.model, this.props.expandString, this.props.useListExpands);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{this.props.children}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customize render here] end\n\t}\n\n\tprivate constructVariables() {\n\t\t// % protected region % [Customize construct variables method here] off begin\n\t\tconst { conditions, ids, orderBy : orderByProp, pagination } = this.props;\n\t\tconst { page, perPage } = pagination;\n\n\t\tlet orderBy: IOrderByCondition = {\n\t\t\tpath: new this.props.model().getDisplayAttribute(),\n\t\t\tdescending: false\n\t\t};\n\n\t\tif (orderByProp) {\n\t\t\torderBy = orderByProp;\n\t\t}\n\n\t\treturn {\n\t\t\tskip: page * perPage,\n\t\t\ttake: perPage,\n\t\t\targs: conditions,\n\t\t\torderBy: [orderBy],\n\t\t\tids,\n\t\t};\n\t\t// % protected region % [Customize construct variables method here] end\n\t}\n}\n\n// % protected region % [Customize default export here] off begin\nexport default ModelQuery;\n// % protected region % [Customize default export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { observable, action } from 'mobx';\n\nexport interface IPaginationQueryOptions {\n\tpage: number;\n\tperPage: number;\n}\n\nexport class PaginationQueryOptions implements IPaginationQueryOptions {\n\t@observable\n\tpublic page: number = 0;\n\t@observable\n\tpublic perPage = 10;\n\t@action\n\tpublic gotoPage = (pageNo: number) => {\n\t\tthis.page = pageNo;\n\t}\n}\n\n\nexport default interface IPaginationData {\n\tqueryOptions: PaginationQueryOptions;\n\ttotalRecords: number;\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { store } from 'Models/Store';\nimport { IAcl } from 'Models/Security/IAcl';\n// % protected region % [Add any extra security service imports here] off begin\n// % protected region % [Add any extra security service imports here] end\n\nexport class SecurityService {\n\t// % protected region % [Add any extra security service properties here] off begin\n\t// % protected region % [Add any extra security service properties here] end\n\n\tpublic static canRead}>(modelType: T): boolean {\n\t\tif (modelType.acls && modelType.acls.some(acl => {\n\t\t\tif (acl.isVisitorAcl && acl.canRead()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn store.userGroups.some(ug => {\n\t\t\t\tif (acl.group === ug.name) {\n\t\t\t\t\treturn acl.canRead();\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t})) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static canCreate}>(modelType: T): boolean {\n\t\tif (modelType.acls && modelType.acls.some(acl => {\n\t\t\tif (acl.isVisitorAcl && acl.canCreate()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn store.userGroups.some(ug => {\n\t\t\t\tif (acl.group === ug.name) {\n\t\t\t\t\treturn acl.canCreate();\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t})) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static canUpdate}>(modelType: T): boolean {\n\t\tif (modelType.acls && modelType.acls.some(acl => {\n\t\t\tif (acl.isVisitorAcl && acl.canUpdate()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn store.userGroups.some(ug => {\n\t\t\t\tif (acl.group === ug.name) {\n\t\t\t\t\treturn acl.canUpdate();\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t})) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static canDelete}>(modelType: T): boolean {\n\t\tif (modelType.acls && modelType.acls.some(acl => {\n\t\t\tif (acl.isVisitorAcl && acl.canDelete()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn store.userGroups.some(ug => {\n\t\t\t\tif (acl.group === ug.name) {\n\t\t\t\t\treturn acl.canDelete();\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t})) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// % protected region % [Add any extra security service methods here] off begin\n\t// % protected region % [Add any extra security service methods here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { store } from '../../../Models/Store';\nimport { Button, Display } from '../Button/Button';\n\n// % protected region % [Add any additional includes] off begin\n// % protected region % [Add any additional includes] end\n\nexport interface IConfirmModalOptions {\n\t/** The text to be placed in the confirm button */\n\tconfirmText?: string;\n\t/** The text to be placed in the cancel button */\n\tcancelText?: string\n}\n\n/**\n * Opens a confirm modal which gives a user an option to confirm or cancel\n * @param title The title on the modal\n * @param message The message to display in the modal\n * @param options Extra options for the modal\n * @returns A promise that is resolved on the user confirming or rejected on the user cancelling\n */\nexport function confirmModal(title: string, message: React.ReactNode, options: IConfirmModalOptions = {}) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst onConfirm = () => {\n\t\t\tstore.modal.hide();\n\t\t\tresolve();\n\t\t};\n\n\t\tconst onCancel = () => {\n\t\t\tstore.modal.hide();\n\t\t\treject();\n\t\t};\n\n\t\tconst confirmText = options.confirmText || 'Confirm';\n\t\tconst cancelText = options.cancelText || 'Cancel';\n\n\t\t// % protected region % [update confirm modal if required] off begin\n\t\tconst confirmDom = (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t

{title}

\n\t\t\t\t\t\n\t\t\t\t\t\t{cancelText}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{message}\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t\t// % protected region % [update confirm modal if required] end\n\n\t\tstore.modal.show(title, confirmDom, {\n\t\t\tclassName: 'confirm-modal',\n\t\t\tonRequestClose: () => {\n\t\t\t\tstore.modal.hide();\n\t\t\t\treject();\n\t\t\t},\n\t\t\t// % protected region % [Add additional options to the confirm modal] off begin\n\t\t\t// % protected region % [Add additional options to the confirm modal] end\n\t\t});\n\t});\n}\n\nexport interface IAlertModalProps {\n\t/** The text to be placed in the cancel button */\n\tcancelText?: string;\n}\n\n/**\n * Displays an alert on the screen\n * @param title A title for the modal\n * @param message The message content for the modal\n * @param options Extra options for the modal\n * @returns A promise that is resolved when the modal is closed\n */\nexport function alertModal(title: string, message: React.ReactNode, options: IAlertModalProps = {}) {\n\treturn new Promise((resolve) => {\n\t\tconst onClose = () => {\n\t\t\tstore.modal.hide();\n\t\t\tresolve();\n\t\t};\n\n\t\tconst cancelText = options.cancelText || 'Cancel';\n\n\t\t// % protected region % [update alert modal if required] off begin\n\t\tconst alertDom = (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t

{title}

\n\t\t\t\t\t\n\t\t\t\t\t\t{cancelText}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{message}\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t\t// % protected region % [update alert modal if required] end\n\n\t\tstore.modal.show(title, alertDom, {\n\t\t\tclassName: 'alert-modal',\n\t\t\tonRequestClose: () => {\n\t\t\t\tstore.modal.hide();\n\t\t\t\tresolve();\n\t\t\t},\n\t\t\t// % protected region % [Add additional options to the alert modal] off begin\n\t\t\t// % protected region % [Add additional options to the alert modal] end\n\t\t});\n\t});\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {ToastOptions, toast, TypeOptions } from 'react-toastify';\nimport classNames from 'classnames';\nimport 'react-toastify/dist/ReactToastify.css';\n\n/**\n * Show alert as a toast\n * @param errorMsg the text to be printed on the alert toast\n * @param type The type of the toast\n * @param options additional options such as 'autoClose' | 'position'\n */\nexport default function alert(errorMsg: React.ReactNode, type: TypeOptions = 'info', options: ToastOptions = {}) {\n\ttoast(

{errorMsg}

, {\n\t\tclassName: classNames('alert', 'alert__' + type),\n\t\ttype,\n\t\t...options,\n\t});\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport Collection, {\n\texpandFn,\n\tICollectionActionProps,\n\tICollectionBulkActionProps,\n\tICollectionItemActionProps,\n\tICollectionProps,\n\tshowExpandFn,\n} from '../Collection/Collection';\nimport { Button, Display } from '../Button/Button';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { IModelType, Model } from 'Models/Model';\nimport { exportAll, getAttributeCRUDOptions, getModelDisplayName, getModelName } from 'Util/EntityUtils';\nimport { action, computed, observable, runInAction } from 'mobx';\nimport Spinner from '../Spinner/Spinner';\nimport { ICollectionHeaderProps } from '../Collection/CollectionHeaders';\nimport ModelQuery, { IOrderByCondition, IWhereCondition } from '../ModelCollection/ModelQuery';\nimport { ICollectionFilterPanelProps, IFilter } from '../Collection/CollectionFilterPanel';\nimport { PaginationQueryOptions } from 'Models/PaginationData';\nimport { QueryResult } from 'react-apollo';\nimport { lowerCaseFirst } from 'Util/StringUtils';\nimport { SecurityService } from 'Services/SecurityService';\nimport { OperationVariables } from 'apollo-boost';\nimport * as _ from 'lodash';\nimport classNames from 'classnames';\nimport { confirmModal } from '../Modal/ModalUtils';\nimport alert from 'Util/ToastifyUtils';\nimport { IEntityContextMenuActions } from '../EntityContextMenu/EntityContextMenu';\nimport moment from 'moment';\nimport { AttributeCRUDOptions } from 'Models/CRUDOptions';\nimport { convertCaseComparisonToPascalCase } from 'Util/GraphQLUtils';\nimport { IWhereConditionApi } from '../ModelCollection/ModelQuery';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport type refetchFn = (variables?: any) => Promise;\nexport type actionOverrideFn = (refetchFn: viewActionOptions) => ICollectionItemActionProps | undefined;\nexport type viewActionOptions = {\n\trefetch: refetchFn,\n\tself: EntityCollection,\n}\n\nexport interface AdditionalBulkActions extends ICollectionActionProps {\n\tbulkAction: (mode: 'includedIds' | 'excludedIds', models: T[], event: React.MouseEvent) => void;\n\t// % protected region % [Add any extra AdditionalBulkActions fields here] off begin\n\t// % protected region % [Add any extra AdditionalBulkActions fields here] end\n}\n\nexport interface IEntityCollectionProps extends RouteComponentProps {\n\tmodelType: IModelType;\n\texpandList?: expandFn;\n\tshowExpandButton?: showExpandFn;\n\tadditionalBulkActions?: AdditionalBulkActions[];\n\tadditionalFilters?: Array>;\n\tperPage?: number;\n\torderBy?: IOrderByCondition;\n\tactionsMore?: IEntityContextMenuActions;\n\turl?: string;\n\tadditionalTableActions?: Array>;\n\tconditions?: Array>>;\n\tremoveCreatedFilter?: boolean;\n\tremoveModifiedFilter?: boolean;\n\tfilterOrientationRow?: boolean;\n\tcreateAction?: (refetchFn: viewActionOptions) => React.ReactNode;\n\tviewAction?: actionOverrideFn;\n\tdeleteAction?: actionOverrideFn;\n\tupdateAction?: actionOverrideFn;\n\tdisableBulkExport?: boolean;\n\tdisableBulkDelete?: boolean;\n\tcollectionProps?: Partial>;\n\tdisableCreateButtonSecurity?: boolean;\n\tdisableReadButtonSecurity?: boolean;\n\tdisableUpdateButtonSecurity?: boolean;\n\tdisableDeleteButtonSecurity?: boolean;\n\theaderAttributes?: AttributeCRUDOptions[];\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\nexport interface ISearch {\n\tsearchTerm: string;\n\t// % protected region % [Add any extra ISearch fields here] off begin\n\t// % protected region % [Add any extra ISearch fields here] end\n}\n\n\n@observer\nclass EntityCollection extends React.Component, any> {\n\n\t@observable\n\tpublic search: ISearch = { searchTerm: '' };\n\n\t@observable\n\tpublic filterConfig: ICollectionFilterPanelProps;\n\n\t@observable\n\tpublic filterApplied: boolean = false;\n\n\t@observable\n\tpublic orderBy: IOrderByCondition | undefined;\n\n\t// % protected region % [Customize _orderBy method here] off begin\n\t@computed\n\tpublic get _orderBy() {\n\t\tif (this.orderBy === undefined) {\n\t\t\t// set the default order by to display the options in reverse creation order\n\t\t\treturn { path: 'Created', descending: true };\n\t\t}\n\t\treturn this.orderBy;\n\t}\n\t// % protected region % [Customize _orderBy method here] end\n\n\t@observable\n\tpublic paginationQueryOptions: PaginationQueryOptions = new PaginationQueryOptions();\n\n\t@observable\n\tpublic allSelectedItemIds: string[] = new Array();\n\n\t@observable\n\tpublic allExcludedItemIds: string[] = new Array();\n\n\t@observable\n\tpublic allPagesSelected: boolean = false;\n\n\t@computed\n\tpublic get security() {\n\t\tconst {\n\t\t\tmodelType,\n\t\t\tdisableCreateButtonSecurity,\n\t\t\tdisableReadButtonSecurity,\n\t\t\tdisableUpdateButtonSecurity,\n\t\t\tdisableDeleteButtonSecurity\n\t\t} = this.props;\n\t\treturn {\n\t\t\tcreate: disableCreateButtonSecurity ? true : SecurityService.canCreate(modelType),\n\t\t\tread: disableReadButtonSecurity ? true : SecurityService.canRead(modelType),\n\t\t\tupdate: disableUpdateButtonSecurity ? true : SecurityService.canUpdate(modelType),\n\t\t\tdelete: disableDeleteButtonSecurity ? true : SecurityService.canDelete(modelType),\n\t\t}\n\t}\n\n\t// % protected region % [Customize collectionFilters method here] off begin\n\t@computed\n\tpublic get collectionFilters() {\n\t\tlet conditions = this.getSearchConditions();\n\t\tlet filterConditions: IWhereCondition[][] | undefined;\n\n\t\tif (this.filterApplied) {\n\t\t\tfilterConditions = new this.props.modelType().getFilterConditions(this.filterConfig);\n\t\t}\n\n\t\tif (!!this.props.conditions && !!this.props.conditions.length) {\n\t\t\tconditions = [...conditions, ...this.props.conditions]\n\t\t\t.map(andCondition => andCondition.map(orCondition => ({\n\t\t\t\t...orCondition,\n\t\t\t\tvalue: Array.isArray(orCondition.value) ? orCondition.value : [orCondition.value],\n\t\t\t})));\n\t\t}\n\n\t\tif (filterConditions && !!filterConditions.length) {\n\t\t\tconditions = [...conditions, ...filterConditions]\n\t\t\t\t.map(andCondition => andCondition.map(orCondition => ({\n\t\t\t\t\t...orCondition,\n\t\t\t\t\tvalue: _.isArray(orCondition.value) ? orCondition.value : [orCondition.value],\n\t\t\t\t})));\n\t\t}\n\n\t\treturn conditions;\n\t}\n\t// % protected region % [Customize collectionFilters method here] end\n\n\t// % protected region % [Customize url method here] off begin\n\tpublic get url() {\n\t\tconst { url, match } = this.props;\n\t\treturn url ?? match.url;\n\t}\n\t// % protected region % [Customize url method here] end\n\n\tprivate models: T[] = [];\n\n\t// % protected region % [Customize constructor method here] off begin\n\tconstructor(props: IEntityCollectionProps, context: any) {\n\t\tsuper(props, context);\n\t\tconst { modelType } = this.props;\n\n\t\tthis.filterConfig = {\n\t\t\tfilters: this.getFilters(),\n\t\t\tonClearFilter: this.onClearFilter,\n\t\t\tonApplyFilter: this.onApplyFilter,\n\t\t\tonFilterChanged: this.onFilterChanged,\n\t\t};\n\t\tconst defaultOrderBy = modelType.getOrderByField ? modelType.getOrderByField() : undefined;\n\t\tthis.orderBy = defaultOrderBy ? defaultOrderBy : props.orderBy;\n\t}\n\t// % protected region % [Customize constructor method here] end\n\n\t// % protected region % [Customize componentDidUpdate method here] off begin\n\tcomponentDidUpdate() {\n\t\trunInAction(() => {\n\t\t\tthis.paginationQueryOptions.page = 0;\n\t\t});\n\t}\n\t// % protected region % [Customize componentDidUpdate method here] end\n\n\t// % protected region % [Customize render method here] off begin\n\tpublic render() {\n\t\tconst { perPage, modelType } = this.props;\n\t\trunInAction(() => this.paginationQueryOptions.perPage = perPage || 10);\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{this.renderCollection}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Customize render method here] end\n\n\t// % protected region % [Customize renderCollection method here] off begin\n\tprotected renderCollection = (result: QueryResult) : JSX.Element => {\n\n\t\tconst { loading, error, data, refetch } = result;\n\t\tif (error) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t

An unexpected error occurred:

\n\t\t\t\t\t{JSON.stringify(error.message)}\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tconst { modelType } = this.props;\n\t\tconst modelName = getModelName(modelType);\n\n\t\tconst tableHeaders = this.getHeaders();\n\t\tconst tableActions = this.getTableActions(refetch);\n\n\t\tthis.models = [];\n\t\tconst dataModelName = lowerCaseFirst(modelName + 's');\n\t\tif (data[dataModelName]) {\n\t\t\tthis.models = data[dataModelName].map((e: any) => new modelType(e));\n\t\t}\n\n\t\tconst countName = `count${modelName}s`;\n\t\tlet totalRecords = 0;\n\t\tif (data[countName]) {\n\t\t\ttotalRecords = data[countName]['number'];\n\t\t}\n\n\t\tlet additionalActions: React.ReactNode[] = [];\n\t\tif(this.security.create) {\n\t\t\tadditionalActions.push(this.renderCreateButton(refetch));\n\t\t}\n\n\t\tlet menuCountFunction = () => {\n\t\t\tif(this.allPagesSelected){\n\t\t\t\treturn totalRecords - this.allExcludedItemIds.length;\n\t\t\t}else{\n\t\t\t\treturn this.allSelectedItemIds.length;\n\t\t\t}\n\t\t};\n\n\t\tconst selectedBulkActions :Array> = [];\n\t\tif (SecurityService.canRead(this.props.modelType) && this.props.disableBulkExport !== true){\n\t\t\tselectedBulkActions.push({\n\t\t\t\tbulkAction: this.exportItems,\n\t\t\t\tlabel: \"Export\",\n\t\t\t\tshowIcon: true,\n\t\t\t\ticon: \"export\",\n\t\t\t\ticonPos: 'icon-left',\n\t\t\t});\n\t\t}\n\t\tif (SecurityService.canDelete(this.props.modelType) && this.props.disableBulkDelete !== true) {\n\t\t\tselectedBulkActions.push({\n\t\t\t\tbulkAction: () => {\n\t\t\t\t\tconfirmModal('Please confirm', \"Are you sure you want to delete all the selected items?\").then(()=>{\n\t\t\t\t\t\tlet idsToDelete: Array | undefined;\n\t\t\t\t\t\tlet conditions: Array>> | undefined;\n\t\t\t\t\t\tif (this.allPagesSelected) {\n\t\t\t\t\t\t\tconditions = this.getSearchConditions() as Array>>;\n\t\t\t\t\t\t\tif(!conditions){\n\t\t\t\t\t\t\t\tconditions = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlet idsCondition = new Array>();\n\t\t\t\t\t\t\tidsCondition.push({path:'id', comparison:'notIn', value: this.allExcludedItemIds });\n\t\t\t\t\t\t\t(conditions as Array>>).push(idsCondition);\n\t\t\t\t\t\t\tidsToDelete = undefined;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tidsToDelete = this.allSelectedItemIds;\n\t\t\t\t\t\t\tconditions = this.getSearchConditions() as Array>>;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnew this.props.modelType().deleteWhere(conditions, idsToDelete).then((result) => {\n\t\t\t\t\t\t\tif(!!result && result['value'] === true){\n\t\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\t\tthis.cancelAllSelection();\n\t\t\t\t\t\t\t\talert('All selected items are deleted successfully', 'success');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).catch((errorMessage) => {\n\t\t\t\t\t\t\talert(\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

These records could not be deleted because of an association

\n\t\t\t\t\t\t\t\t\t

Message:

\n\t\t\t\t\t\t\t\t\t

{errorMessage}

\n\t\t\t\t\t\t\t\t
,\n\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tlabel: \"Delete\",\n\t\t\t\tshowIcon: true,\n\t\t\t\ticon: \"bin-full\",\n\t\t\t\ticonPos: 'icon-left',\n\t\t\t});\n\t\t}\n\n\t\treturn(\n\t\t\t<>\n\t\t\t\t{loading && }\n\t\t\t\t this.mapBulkAction(ba))\n\t\t\t\t\t\t: [])}\n\t\t\t\t\tonSearchTriggered={this.onSearchTriggered}\n\t\t\t\t\tmenuFilterConfig={this.filterConfig}\n\t\t\t\t\tcollection={this.models}\n\t\t\t\t\tpagination={{totalRecords, queryOptions: this.paginationQueryOptions }}\n\t\t\t\t\titemSelectionChanged={this.itemSelectionChanged}\n\t\t\t\t\tcancelAllSelection={this.cancelAllSelection}\n\t\t\t\t\tmenuCountFunction={menuCountFunction}\n\t\t\t\t\texpandList={this.props.expandList}\n\t\t\t\t\tshowExpandButton={this.props.showExpandButton}\n\t\t\t\t\tgetSelectedItems={this.getSelectedItems}\n\t\t\t\t\tonCheckedAllPages={this.onCheckedAllPages}\n\t\t\t\t\tidColumn=\"id\"\n\t\t\t\t\tdataFields={row => ({\n\t\t\t\t\t\tcreated: moment(row.created).format('YYYY-MM-DD'),\n\t\t\t\t\t\tmodified: moment(row.modified).format('YYYY-MM-DD'),\n\t\t\t\t\t})}\n\t\t\t\t\torderBy={this.orderBy}\n\t\t\t\t\tfilterOrientationRow={this.props.filterOrientationRow}\n\t\t\t\t\t{...this.props.collectionProps}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Customize renderCollection method here] end\n\n\t// % protected region % [Customize getSelectedItems method here] off begin\n\tpublic getSelectedItems = () => {\n\t\treturn this.models.filter(model => {\n\t\t\tif (this.allPagesSelected) {\n\t\t\t\treturn !this.allExcludedItemIds.some(id => {\n\t\t\t\t\treturn model.id === id;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn this.allSelectedItemIds.some(id => {\n\t\t\t\t\treturn model.id === id;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\t// % protected region % [Customize getSelectedItems method here] end\n\n\t// % protected region % [Customize onCheckedAllPages method here] off begin\n\t@action\n\tpublic onCheckedAllPages = (checked: boolean) => {\n\t\tthis.allPagesSelected = checked;\n\t\tif(checked){\n\t\t\tthis.allExcludedItemIds = [];\n\t\t\tlet changedIds = this.models.map(item => item.id);\n\t\t\tif (checked) {\n\t\t\t\tthis.allSelectedItemIds = _.union(this.allSelectedItemIds, changedIds);\n\t\t\t} else {\n\t\t\t\tthis.allSelectedItemIds = _.pull(this.allSelectedItemIds, ...changedIds);\n\t\t\t}\n\t\t\tlet selectedItems = (new Array());\n\t\t\tselectedItems.push(...this.models);\n\t\t\treturn selectedItems;\n\t\t}else{\n\t\t\tthis.allSelectedItemIds = [];\n\t\t\tlet changedIds = this.models.map(item => item.id);\n\t\t\tif (!checked) {\n\t\t\t\tthis.allExcludedItemIds = _.union(this.allSelectedItemIds, changedIds);\n\t\t\t} else {\n\t\t\t\tthis.allExcludedItemIds = _.pull(this.allSelectedItemIds, ...changedIds);\n\t\t\t}\n\t\t\treturn [];\n\t\t}\n\t}\n\t// % protected region % [Customize onCheckedAllPages method here] end\n\n\t// % protected region % [Customize itemSelectionChanged method here] off begin\n\t@action\n\tpublic itemSelectionChanged = (checked: boolean, changedItems: Model[]) => {\n\t\tlet changedIds = changedItems.map(item => item.id);\n\t\tif (this.allPagesSelected) {\n\t\t\tif (!checked) {\n\t\t\t\tthis.allExcludedItemIds = _.union(this.allExcludedItemIds, changedIds);\n\t\t\t} else {\n\t\t\t\tthis.allExcludedItemIds = _.pull(this.allExcludedItemIds, ...changedIds);\n\t\t\t}\n\t\t} else {\n\t\t\tif (checked) {\n\t\t\t\tthis.allSelectedItemIds = _.union(this.allSelectedItemIds, changedIds);\n\t\t\t} else {\n\t\t\t\tthis.allSelectedItemIds = _.pull(this.allSelectedItemIds, ...changedIds);\n\t\t\t}\n\t\t}\n\t\treturn this.models.filter((m: Model) => {\n\t\t\tif (this.allPagesSelected) {\n\t\t\t\treturn !this.allExcludedItemIds.some(id => {\n\t\t\t\t\treturn m.id === id;\n\t\t\t\t}) ;\n\t\t\t} else {\n\t\t\t\treturn this.allSelectedItemIds.some(id => {\n\t\t\t\t\treturn m.id === id;\n\t\t\t\t}) ;\n\t\t\t}\n\t\t});\n\t}\n\t// % protected region % [Customize itemSelectionChanged method here] end\n\n\t// % protected region % [Customize renderCreateButton method here] off begin\n\tpublic renderCreateButton(refetch: refetchFn): React.ReactNode {\n\t\tconst { modelType, createAction } = this.props;\n\t\tif (createAction) {\n\t\t\treturn createAction({refetch: refetch, self: this});\n\t\t} else {\n\t\t\tconst modelDisplayName = getModelDisplayName(modelType);\n\t\t\treturn (\n\t\t\t\t { this.props.history.push(`${this.url}/create`); } }}>\n\t\t\t\t\tCreate {modelDisplayName}\n\t\t\t\t\n\t\t\t);\n\t\t}\n\t}\n\t// % protected region % [Customize renderCreateButton method here] end\n\n\t// % protected region % [Customize GetHeaders method here] off begin\n\tpublic getHeaders = (): Array> => {\n\n\t\tconst attributeOptions = this.props.headerAttributes ?? getAttributeCRUDOptions(this.props.modelType);\n\n\t\treturn attributeOptions.filter(attributeOption => attributeOption.headerColumn)\n\t\t\t.map(attributeOption => {\n\t\t\t\t\tconst headers: ICollectionHeaderProps = {\n\t\t\t\t\t\tname: attributeOption.attributeName,\n\t\t\t\t\t\tdisplayName: attributeOption.displayName,\n\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t\tsortClicked: () => {\n\t\t\t\t\t\t\tif (this.orderBy && this.orderBy.path === attributeOption.attributeName) {\n\t\t\t\t\t\t\t\tif (this.orderBy.descending) {\n\t\t\t\t\t\t\t\t\tconst descending = !this.orderBy.descending;\n\t\t\t\t\t\t\t\t\trunInAction(() => this.orderBy = { path: attributeOption.attributeName, descending });\n\t\t\t\t\t\t\t\t} else if (!this.orderBy.descending) {\n\t\t\t\t\t\t\t\t\trunInAction(() => this.orderBy = undefined);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn this.orderBy;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trunInAction(() => this.orderBy = { path: attributeOption.attributeName, descending: true });\n\t\t\t\t\t\t\t\treturn this.orderBy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tif (attributeOption.displayFunction) {\n\t\t\t\t\t\theaders.transformItem = (item: any) => {\n\t\t\t\t\t\t\tif (attributeOption.displayFunction) {\n\t\t\t\t\t\t\t\treturn attributeOption.displayFunction(item[attributeOption.attributeName], item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn item[attributeOption.name];\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn headers;\n\t\t\t\t}\n\t\t\t);\n\t}\n\t// % protected region % [Customize GetHeaders method here] end\n\n\t// % protected region % [Customize getFilters method here] off begin\n\tpublic getFilters = (): Array> => {\n\t\tconst { additionalFilters, removeCreatedFilter, removeModifiedFilter } = this.props;\n\t\tlet filters = new Array>();\n\n\t\tif (!removeCreatedFilter) {\n\t\t\tfilters.push({\n\t\t\t\tpath: \"created\",\n\t\t\t\tcomparison: \"range\",\n\t\t\t\tvalue1: undefined,\n\t\t\t\tvalue2: undefined,\n\t\t\t\tactive: false,\n\t\t\t\tdisplayType: \"datepicker\",\n\t\t\t\tdisplayName: \"Range of Date Created\"\n\t\t\t} as IFilter);\n\t\t}\n\n\t\tif (!removeModifiedFilter) {\n\t\t\tfilters.push({\n\t\t\t\tpath: \"modified\",\n\t\t\t\tcomparison: \"range\",\n\t\t\t\tvalue1: undefined,\n\t\t\t\tvalue2: undefined,\n\t\t\t\tdisplayType: \"datepicker\",\n\t\t\t\tdisplayName: \"Range of Date Last Modified\",\n\t\t\t} as IFilter);\n\t\t}\n\n\t\tfilters = [...filters ,..._.cloneDeep(additionalFilters) || []];\n\n\t\tconst enumFilters = this.getEnumFilters();\n\n\t\tfilters = [...filters, ...enumFilters];\n\n\t\treturn filters;\n\t};\n\t// % protected region % [Customize getFilters method here] end\n\n\t// % protected region % [Customise retrieving enum filters logic] off begin\n\tpublic getEnumFilters = () => {\n\t\tconst attributeOptions = getAttributeCRUDOptions(this.props.modelType);\n\t\treturn attributeOptions\n\t\t\t.filter(attributeOption => attributeOption.displayType === 'enum-combobox')\n\t\t\t.map(attributeOption => {\n\t\t\t\treturn {\n\t\t\t\t\tpath: attributeOption.attributeName,\n\t\t\t\t\tcomparison: 'equal',\n\t\t\t\t\tvalue1: [] as string[],\n\t\t\t\t\tdisplayName: attributeOption.displayName,\n\t\t\t\t\tdisplayType: 'enum-combobox',\n\t\t\t\t\tenumResolveFunction: attributeOption.enumResolveFunction\n\t\t\t\t} as IFilter;\n\t\t\t});\n\t}\n\t// % protected region % [Customise retrieving enum filters logic] end\n\n\t// % protected region % [Customize onClearFilter method here] off begin\n\t@action\n\tpublic onClearFilter = () => {\n\t\tthis.filterConfig.filters = this.getFilters();\n\t\tthis.filterApplied = false;\n\t};\n\t// % protected region % [Customize onClearFilter method here] end\n\n\t// % protected region % [Customize onApplyFilter method here] off begin\n\t@action\n\tpublic onApplyFilter = () => {\n\t\tthis.filterApplied = true;\n\t};\n\t// % protected region % [Customize onApplyFilter method here] end\n\n\t// % protected region % [Customize onFilterChanged method here] off begin\n\t@action\n\tpublic onFilterChanged = () => {\n\t\tthis.filterApplied = false;\n\t}\n\t// % protected region % [Customize onFilterChanged method here] end\n\n\t// % protected region % [Customize mapBulkAction method here] off begin\n\tpublic mapBulkAction = (bulkAction: AdditionalBulkActions): ICollectionBulkActionProps => {\n\t\tconst rootFn = bulkAction.bulkAction;\n\n\t\treturn {\n\t\t\t...bulkAction,\n\t\t\tbulkAction: (models, event) => {\n\t\t\t\tconst mode = this.allPagesSelected ? 'includedIds' : 'excludedIds';\n\t\t\t\treturn rootFn(mode, models, event);\n\t\t\t}\n\t\t};\n\t};\n\t// % protected region % [Customize mapBulkAction method here] end\n\n\t// % protected region % [Customize exportItems method here] off begin\n\tpublic exportItems = () => {\n\t\tlet conditions: IWhereConditionApi[][];\n\t\tif (this.allPagesSelected && this.collectionFilters) {\n\t\t\tconditions = [\n\t\t\t\t...this.collectionFilters.map(andCondition => andCondition.map(orCondition => {\n\t\t\t\t\tif (orCondition.case) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...orCondition,\n\t\t\t\t\t\t\tcase: convertCaseComparisonToPascalCase(orCondition.case),\n\t\t\t\t\t\t\tvalue: [orCondition.value],\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn orCondition as IWhereConditionApi;\n\t\t\t\t})),\n\t\t\t\t[{\n\t\t\t\t\tpath: \"id\",\n\t\t\t\t\tcomparison: \"notIn\",\n\t\t\t\t\tvalue: this.allExcludedItemIds,\n\t\t\t\t}]\n\t\t\t];\n\t\t} else {\n\t\t\tconditions = [[\n\t\t\t\t{\n\t\t\t\t\tpath: \"id\",\n\t\t\t\t\tcomparison: \"in\",\n\t\t\t\t\tvalue: this.allSelectedItemIds\n\t\t\t\t}\n\t\t\t]];\n\t\t}\n\t\treturn exportAll(this.props.modelType, conditions);\n\t}\n\t// % protected region % [Customize exportItems method here] end\n\n\tpublic getTableActions = (refetch: refetchFn) => {\n\t\tconst tableActions: Array> = [];\n\t\t// % protected region % [Customise custom table actions here] off begin\n\t\tconst { viewAction, updateAction, deleteAction, additionalTableActions } = this.props;\n\n\t\tconst updateTableActions = (override: actionOverrideFn | undefined, defaultAction: ICollectionItemActionProps) => {\n\t\t\tif (override) {\n\t\t\t\tconst action = override({refetch: refetch, self: this});\n\t\t\t\tif (action) {\n\t\t\t\t\ttableActions.push(action);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttableActions.push(defaultAction);\n\t\t\t}\n\t\t};\n\n\t\tif (this.security.read) {\n\t\t\tupdateTableActions(viewAction, {\n\t\t\t\taction: (item) => {\n\t\t\t\t\tthis.props.history.push({ pathname: `${this.url}/view/${item['id']}` });\n\t\t\t\t},\n\t\t\t\tlabel: \"View\",\n\t\t\t\tshowIcon: true,\n\t\t\t\ticon: \"look\",\n\t\t\t\ticonPos: 'icon-top',\n\t\t\t});\n\t\t}\n\t\tif (this.security.update) {\n\t\t\tupdateTableActions(updateAction, {\n\t\t\t\taction: (item) => {\n\t\t\t\t\tthis.props.history.push({ pathname: `${this.url}/edit/${item['id']}` });\n\t\t\t\t},\n\t\t\t\tlabel: \"Edit\",\n\t\t\t\tshowIcon: true,\n\t\t\t\ticon: \"edit\",\n\t\t\t\ticonPos: 'icon-top',\n\t\t\t});\n\t\t}\n\t\tif (this.security.delete) {\n\t\t\tupdateTableActions(deleteAction, {\n\t\t\t\taction: (item) => {\n\t\t\t\t\tconfirmModal('Please confirm', \"Are you sure you want to delete this item?\").then(() => {\n\t\t\t\t\t\tnew this.props.modelType(item).delete().then(() => {\n\t\t\t\t\t\t\trefetch();\n\t\t\t\t\t\t\talert('Deleted successfully', 'success');\n\t\t\t\t\t\t}).catch((errorMessage) => {\n\t\t\t\t\t\t\talert(\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

This record could not be deleted because of an association

\n\t\t\t\t\t\t\t\t\t

Message:

\n\t\t\t\t\t\t\t\t\t

{errorMessage}

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t, 'error'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tlabel: \"Delete\",\n\t\t\t\tshowIcon: true,\n\t\t\t\ticon: \"bin-full\",\n\t\t\t\ticonPos: 'icon-top',\n\t\t\t});\n\t\t}\n\t\tif (additionalTableActions) {\n\t\t\ttableActions.push(...additionalTableActions);\n\t\t}\n\t\t// % protected region % [Customise custom table actions here] end\n\t\treturn tableActions;\n\t}\n\n\t// % protected region % [Customize onSearchTriggered method here] off begin\n\t@action\n\tpublic onSearchTriggered = (searchTerm: string) => {\n\t\tthis.search.searchTerm = searchTerm;\n\t}\n\t// % protected region % [Customize onSearchTriggered method here] end\n\n\t// % protected region % [Customize cancelAllSelection method here] off begin\n\t@action\n\tpublic cancelAllSelection = () => {\n\t\tthis.allPagesSelected = false;\n\t\tthis.allSelectedItemIds = [];\n\t\tthis.allExcludedItemIds = [];\n\t}\n\t// % protected region % [Customize cancelAllSelection method here] end\n\n\t// % protected region % [Customize getSearchConditions method here] off begin\n\tpublic getSearchConditions() {\n\t\treturn new this.props.modelType().getSearchConditions(this.search.searchTerm);\n\t}\n\t// % protected region % [Customize getSearchConditions method here] end\n\n\t// % protected region % [Add any extra EntityCollection fields here] off begin\n\t// % protected region % [Add any extra EntityCollection fields here] end\n}\n\nexport default EntityCollection;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport If from '../If/If';\nimport { action, observable } from 'mobx';\nimport { Button, Display } from 'Views/Components/Button/Button';\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\ninterface IFormErrorsProps {\n\terror: React.ReactNode;\n\tdetailedErrors?: React.ReactNode;\n}\n\n@observer\nclass FormErrors extends React.Component {\n\t@observable\n\tpublic showDetailedErrors: boolean;\n\tpublic render() {\n\t\tconst { error } = this.props;\n\t\t// % protected region % [Add form error logic here] off begin\n\t\t// % protected region % [Add form error logic here] end\n\n\t\t// % protected region % [Customize form error dom here] off begin\n\t\treturn (\n\t\t\t
\n\t\t\t\t{error}\n\t\t\t\t{this.props.detailedErrors\n\t\t\t\t\t? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
{this.props.detailedErrors}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t)\n\t\t\t\t\t: null}\n\t\t\t
\n\t\t// % protected region % [Customize form error dom here] end\n\t\t);\n\t}\n\t@action\n\tpublic displayErrors() {\n\t\tthis.showDetailedErrors = !this.showDetailedErrors;\n\t}\n}\n\nexport default FormErrors;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n\n/**\n * Runs a map function over an iterator, returning an iterator of the mapped values\n * @param iterator The iterable to map over\n * @param callback The mapping function\n * @returns An iterator of the mapped values\n */\nexport function * LazyMap(iterator: Iterable, callback: (item: T) => U): Iterable {\n\tfor (const item of iterator) {\n\t\tyield callback(item);\n\t}\n}\n\n/**\n * Runs a map function over an iterator, returning an array of the mapped values\n * @param iterator The iterable to map over\n * @param callback The mapping function\n * @returns An array of the mapped values\n */\nexport function IterableMap(iterator: Iterable, callback: (item: T) => U): U[] {\n\treturn Array.from(LazyMap(iterator, callback));\n}\n\n/**\n * Runs a filter function over an iterator, returning an iterator of the filtered values\n * @param iterator The iterable to filter over\n * @param predicate The filter predicate\n * @returns An iterator of the filtered values\n */\nexport function * LazyFilter(iterator: Iterable, predicate: (item: T) => boolean): Iterable {\n\tfor (const item of iterator) {\n\t\tif (predicate(item)) {\n\t\t\tyield item;\n\t\t}\n\t}\n}\n\n/**\n * Runs a filter function over an iterator, returning an array of the filtered values\n * @param iterator The iterable to filter over\n * @param predicate The filter predicate\n * @returns An array of the filtered values\n */\nexport function IterableFilter(iterator: Iterable, predicate: (item: T) => boolean): T[] {\n\treturn Array.from(LazyFilter(iterator, predicate));\n}\n\n/**\n * Finds the first itemn in an iterable that matches a predicate\n * @param iterator The iterable to find the value in\n * @param predicate The predicate to find by\n * @returns The first item to match the predicate or undefined if there is no match\n */\nexport function IterableFind(iterator: Iterable, predicate: (item: T) => boolean): T | undefined {\n\tfor (const item of iterator) {\n\t\tif (predicate(item)) {\n\t\t\treturn item;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function IterableValuesArray(iterator: Iterable): T[] {\n\tconst results = [];\n\tfor (const item of iterator) {\n\t\tresults.push(item);\n\t}\n\treturn results;\n}\n\nfunction isObject(obj: any) {\n\tconst type = typeof obj;\n\treturn type === 'function' || (type === 'object' && !!obj);\n}\n\nfunction isArray(arr: any) {\n\tconst arrayFunc = Array.isArray || ((obj: any) => {\n\t\treturn toString.call(obj) === '[object Array]';\n\t});\n\treturn arrayFunc(arr);\n}\n\nexport function safeLookup(obj: any, ...lookup: any[]) {\n\tlet result = obj;\n\tfor (const item of lookup) {\n\t\tif (result === null || result === undefined) {\n\t\t\treturn result;\n\t\t}\n\t\tif (isObject(item)) {\n\t\t\tconst keys = Object.keys(item);\n\t\t\tif (keys.length > 0) {\n\t\t\t\tif (typeof result[keys[0]] !== 'function') {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tlet v;\n\t\t\t\tif (isArray(item[keys[0]])) {\n\t\t\t\t\tv = item[keys[0]];\n\t\t\t\t} else {\n\t\t\t\t\tv = [item[keys[0]]];\n\t\t\t\t}\n\t\t\t\tresult = result[keys[0]].apply(result, v);\n\t\t\t}\n\t\t} else {\n\t\t\tresult = result[item];\n\t\t}\n\t}\n\treturn result;\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport If from 'Views/Components/If/If';\nimport { ButtonGroup } from 'Views/Components/Button/ButtonGroup';\nimport { Button, Display, Colors, Sizes } from 'Views/Components/Button/Button';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IFormProps {\n\t/** Use the default Submit button or not */\n\tsubmitButton?: boolean;\n\t/** Use the default Cancel button or not */\n\tcancelButton?: boolean;\n\t/**\n\t * Action Groups\n\t * If specified, the default submit and cancel action buttons will not display unconditionally\n\t * Then you need to use this actionGroups to specify all the actions button\n\t */\n\tactionGroups?: React.ReactNode[];\n\t/** The callback function when submit event is triggered */\n\tonSubmit?: React.FormEventHandler;\n\t/** The callback function when cencel button is pressed */\n\tonCancel?: React.FormEventHandler;\n\t// % protected region % [Add extra form props here] off begin\n\t// % protected region % [Add extra form props here] end\n}\n\n@observer\nexport class Form extends React.Component {\n // % protected region % [Modify render method] off begin\n\trender() {\n\t\tlet actionGroups: React.ReactNode[] | undefined;\n\t\tif (this.props.actionGroups) {\n\t\t\tactionGroups = this.props.actionGroups;\n\t\t} else {\n\t\t\tactionGroups = [\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t];\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{this.props.children}\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{actionGroups.map((node, i) => {node})}\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\t// % protected region % [Modify render method] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nexport type IconPositions = 'icon-top' | 'icon-left' | 'icon-bottom' | 'icon-right';\n\nexport interface IIconProps {\n\ticon?: string;\n\ticonPos?: IconPositions;\n}\n\nexport enum EntityFormMode {\n\tVIEW = 'view',\n\tCREATE = 'create',\n\tEDIT = 'edit'\n}\n\nexport enum AttributeFormMode {\n\tVIEW = 'view',\n\tEDIT = 'edit',\n\tHIDE = 'hide'\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { TextField } from '../../TextBox/TextBox';\nimport { IAttributeProps } from './IAttributeProps';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\n// % protected region % [Modify IAttributeTextFieldProps here] off begin\ninterface IAttributeTextFieldProps extends IAttributeProps {\n\tonChangeAndBlur?: (event: React.ChangeEvent) => void;\n\tdefaultToUndefined?: boolean;\n}\n// % protected region % [Modify IAttributeTextFieldProps here] end\n\n// % protected region % [Modify AttributeTextField here] off begin\nclass AttributeTextField extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, errors, className, isReadonly, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n// % protected region % [Modify AttributeTextField here] end\n\nexport default AttributeTextField;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport * as uuid from 'uuid';\nimport { action } from 'mobx';\nimport InputWrapper, { InputType } from '../Inputs/InputWrapper';\nimport { DisplayType } from '../Models/Enums';\nimport InputsHelper from '../Helpers/InputsHelper';\n\ninterface ITextAreaProps {\n\tmodel: T;\n\tmodelProperty: string;\n\tid?: string;\n\tname?: string;\n\tclassName?: string;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\tlabelVisible?: boolean;\n\tisRequired?: boolean;\n\tisDisabled?: boolean;\n\tisReadOnly?: boolean;\n\tstaticInput?: boolean;\n\ttooltip?: string;\n\tsubDescription?: string;\n\ttextAreaProps?: React.DetailedHTMLProps, HTMLTextAreaElement>;\n\tplaceholder?: string;\n\terrors?: string | string[];\n\tonAfterChange?: (event: React.ChangeEvent) => void;\n\tonChangeAndBlur?: (event: React.ChangeEvent) => void;\n}\n\n@observer\nexport class TextArea extends React.Component, any> {\n\tprivate uuid = uuid.v4();\n\tpublic textAreaInput = React.createRef();\n\tprivate valueWhenFocused: string = '';\n\n\tpublic render() {\n\t\tconst { name, className, displayType, label, isRequired, isDisabled, isReadOnly, staticInput, tooltip, subDescription, errors } = this.props;\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst fieldId = `${id}-field`;\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\t\tconst ariaLabel = !labelVisible ? label : undefined;\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(id, tooltip, subDescription);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\tpublic focus = () => {\n\t\tif(this.textAreaInput.current){\n\t\t\tthis.textAreaInput.current.focus();\n\t\t}\n\t}\n\n\t@action\n\tprivate onChange = (event: React.ChangeEvent) => {\n\t\tif (this.props.textAreaProps && this.props.textAreaProps.onChange) {\n\t\t\treturn this.props.textAreaProps.onChange(event);\n\t\t}\n\t\tthis.props.model[this.props.modelProperty] = event.target.value;\n\n\t\t// % protected region % [Add any additional onChange actions here] off begin\n\t\t// % protected region % [Add any additional onChange actions here] end\n\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event);\n\t\t}\n\t}\n\n\t@action\n\tprivate onBlur = (event: React.ChangeEvent) => {\n\t\tif(this.valueWhenFocused !== event.target.value && this.props.onChangeAndBlur){\n\t\t\tthis.props.onChangeAndBlur(event);\n\t\t}\n\t}\n\t@action\n\tprivate onFocus = (event: React.ChangeEvent) => {\n\t\tthis.valueWhenFocused = event.target.value;\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { IAttributeProps } from './IAttributeProps';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\n// % protected region % [Modify IAttributeTextAreaProps here] off begin\ninterface IAttributeTextAreaProps extends IAttributeProps {\n\tonChangeAndBlur?: (event: React.ChangeEvent) => void;\n}\n// % protected region % [Modify IAttributeTextAreaProps here] end\n\n// % protected region % [Modify AttributeTextArea here] off begin\nclass AttributeTextArea extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, errors, className, isReadonly, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n// % protected region % [Modify AttributeTextArea here] end\n\nexport default AttributeTextArea;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport _ from 'lodash';\nimport AwesomeDebouncePromise from 'awesome-debounce-promise';\nimport { store } from 'Models/Store';\nimport { IModelAttributes, Model } from 'Models/Model';\nimport { Combobox } from 'Views/Components/Combobox/Combobox';\nimport { getFetchAllConditional, getModelName, isRequired } from 'Util/EntityUtils';\nimport { lowerCaseFirst } from 'Util/StringUtils';\nimport { action, computed, observable } from 'mobx';\nimport { IAttributeProps } from './IAttributeProps';\nimport { DropdownProps } from 'semantic-ui-react';\nimport {dropdownData} from './AttributeReferenceMultiCombobox';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\ninterface IAttributeReferenceComboboxProps extends IAttributeProps {\n\t/** A function that returns an object that can construct a model */\n\treferenceType: { new(json?: {}): Model };\n\t/** A function to override loading of the data into the dropdown */\n\treferenceResolveFunction?: (search: string | string[], options: {model: T}) => Promise;\n\t/**\n\t * If this is true then changing the option in the combobox will assign the entire entity to the property in the\n\t * model as opposed to just the id\n\t */\n\tfetchReferenceEntity?: boolean;\n\t/** A function to compare an option value with a value */\n\toptionEqualFunc?: (modelProperty: Model, option: string) => boolean;\n\t/** Is the combobox readonly */\n}\n\nclass AttributeReferenceCombobox extends React.Component> {\n\t@observable\n\tprivate internalOptions: Model[] = [];\n\n\t@computed\n\tpublic get isRequired() {\n\t\treturn isRequired(this.props.model, this.props.options.attributeName);\n\t}\n\n\t@action\n\tprivate setInternalOptions = (options: Model[]) => {\n\t\tthis.internalOptions = options;\n\t}\n\n\t@action\n\tprivate onChange = (event: React.SyntheticEvent, data: DropdownProps) => {\n\t\tconst { value } = data;\n\t\tif (value !== undefined && value !== null) {\n\t\t\tif (this.props.fetchReferenceEntity) {\n\t\t\t\tthis.props.model[this.props.options.attributeName] = _.find(this.internalOptions, x => x.id === value);\n\t\t\t} else {\n\t\t\t\tthis.props.model[this.props.options.attributeName] = value;\n\t\t\t}\n\t\t}\n\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event);\n\t\t}\n\t}\n\n\t// % protected region % [Override resolveFunc here] off begin\n\tprivate resolveFunc = async (query?: string | string[]) => {\n\t\tif (this.props.referenceResolveFunction) {\n\t\t\treturn this.props.referenceResolveFunction(query ?? '', {model: this.props.model})\n\t\t\t\t.then(data => {\n\t\t\t\t\treturn data.map(x => x.value)\n\t\t\t\t});\n\t\t}\n\t\tif (Array.isArray(query)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst { referenceType } = this.props;\n\t\tconst modelName = getModelName(referenceType);\n\t\tconst dataReturnName = lowerCaseFirst(modelName) + \"s\";\n\t\treturn store.apolloClient\n\t\t\t.query({\n\t\t\t\tquery: getFetchAllConditional(this.props.referenceType),\n\t\t\t\tvariables: {\n\t\t\t\t\targs: query ? new this.props.referenceType().getSearchConditions(this.props.fetchReferenceEntity ? query['id'] : query) : null,\n\t\t\t\t\ttake: 10,\n\t\t\t\t},\n\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t})\n\t\t\t.then(({ data }) => {\n\t\t\t\tlet associatedObjects: any[] = data[dataReturnName];\n\t\t\t\treturn associatedObjects.map(obj => new referenceType(obj));\n\t\t\t})\n\t}\n\t// % protected region % [Override resolveFunc here] end\n\n\t// % protected region % [Override fetchOptions here] off begin\n\tprivate fetchOptions = async (query?: string | string[]) => {\n\t\tconst { referenceType } = this.props;\n\t\treturn this.resolveFunc(query)\n\t\t\t.then(associatedObjects => {\n\t\t\t\tif (this.props.model.id !== null && this.props.model.id !== undefined) {\n\t\t\t\t\tassociatedObjects = associatedObjects.filter((d: IModelAttributes) => d.id !== this.props.model.id);\n\t\t\t\t}\n\t\t\t\tlet existingValue = undefined;\n\t\t\t\tif (this.props.fetchReferenceEntity) {\n\t\t\t\t\texistingValue = this.props.model[this.props.options.attributeName];\n\t\t\t\t} else {\n\t\t\t\t\texistingValue = this.props.model[this.props.options.attributeName.slice(0, -2)];\n\t\t\t\t}\n\t\t\t\tif (existingValue) {\n\t\t\t\t\tassociatedObjects = _.unionBy(associatedObjects, [new referenceType(existingValue)], x => x.id);\n\t\t\t\t}\n\t\t\t\tlet comboOptions: Array<{ display: string, value: string }> = [];\n\t\t\t\tif (associatedObjects) {\n\t\t\t\t\tthis.setInternalOptions(associatedObjects);\n\t\t\t\t\tcomboOptions = associatedObjects\n\t\t\t\t\t\t.map(obj => ({ display: obj.getDisplayName(), value: obj.id }));\n\t\t\t\t}\n\n\t\t\t\treturn comboOptions;\n\t\t\t})\n\t}\n\t// % protected region % [Override fetchOptions here] end\n\n\tprivate getOptions = () => {\n\t\treturn AwesomeDebouncePromise(this.fetchOptions, 500);\n\t}\n\n\t// % protected region % [Override render method here] off begin\n\tpublic render() {\n\t\treturn {\n\t\t\t\tif (this.props.fetchReferenceEntity && modelProperty) {\n\t\t\t\t\treturn modelProperty['id'] === option\n\t\t\t\t}\n\t\t\t\treturn modelProperty === option;\n\t\t\t}}\n\t\t/>;\n\t}\n\t// % protected region % [Override render method here] end\n}\n\nexport default AttributeReferenceCombobox;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { DateTimePicker, IDateTimePickerProps } from '../DateTimePicker/DateTimePicker';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n/** DatePicker-specific properties. Extend as necessary. */\nexport interface IDatePickerProps extends IDateTimePickerProps {\n\t// % protected region % [Add extra props here] off begin\n\t// % protected region % [Add extra props here] end\n}\n\n/**\n * DatePicker Component. Wraps DateTimePicker, which in turn wraps Flatpickr.\n * See IDateTimePickerProps for root property definitions. Can pass Flatpickr\n * properties that are not implemented by this interface via this.flatpickrProps.\n */\n@observer\nexport class DatePicker extends React.Component> {\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\t// % protected region % [Override render method here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render method here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { DatePicker } from '../../DatePicker/DatePicker';\nimport { IAttributeProps } from './IAttributeProps';\n\ninterface IAttributeDatePickerProps extends IAttributeProps {\n}\n\nclass AttributeDatePicker extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, className, isReadonly, errors, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n\nexport default AttributeDatePicker;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\n// % protected region % [Override flatpicker theme here] off begin\nimport 'flatpickr/dist/themes/material_green.css'\n// % protected region % [Override flatpicker theme here] end\nimport { DateTimePicker, IDateTimePickerProps } from '../DateTimePicker/DateTimePicker';\n\n/** TimePicker-specific properties. Extend as necessary. */\nexport interface ITimePickerProps extends IDateTimePickerProps {}\n\n/**\n * TimePicker Component. Wraps DateTimePicker, which in turn wraps Flatpickr.\n * See IDateTimePickerProps for root property definitions. Can pass Flatpickr\n * properties that are not implemented by this interface via this.flatpickrProps.\n */\n@observer\nexport class TimePicker extends React.Component> {\n\n\tpublic render() {\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { TimePicker } from '../../TimePicker/TimePicker';\nimport { IAttributeProps } from './IAttributeProps';\n\ninterface IAttributeTimePickerProps extends IAttributeProps {\n}\n\nclass AttributeTimePicker extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, className, isReadonly, errors, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n\nexport default AttributeTimePicker;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { IAttributeProps } from './IAttributeProps'\nimport { Checkbox } from '../../Checkbox/Checkbox';\n\ninterface IAttributeCheckboxProps extends IAttributeProps {\n}\n\nclass AttributeCheckbox extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, className, isReadonly, isRequired, errors} = this.props;\n\t\treturn ;\n\t}\n}\n\nexport default AttributeCheckbox;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { action } from 'mobx';\nimport InputWrapper, { InputType } from '../Inputs/InputWrapper';\nimport { DisplayType } from '../Models/Enums';\nimport * as uuid from 'uuid';\nimport InputsHelper from '../Helpers/InputsHelper';\n\ninterface IPasswordProps {\n\tmodel: T;\n\tmodelProperty: string;\n\tid?: string;\n\tname?:string;\n\tclassName?: string;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\tlabelVisible?: boolean;\n\tisRequired?: boolean;\n\tisDisabled?: boolean;\n\tisReadOnly?: boolean;\n\ttooltip?: string;\n\tsubDescription?: string;\n\tplaceholder?: string;\n\tclickToClear?: boolean;\n\terrors?: string | string[];\n\tonAfterChange?: (event: React.ChangeEvent) => void;\n\tonChangeAndBlur?: (event: React.ChangeEvent) => void;\n\tinputProps?: React.InputHTMLAttributes;\n}\n\n@observer\nexport class Password extends React.Component, any> {\n\tpublic static defaultProps = {\n\t\tinputProps: {},\n\t\tclassName: '',\n\t};\n\tprivate uuid = uuid.v4();\n\tprivate valueWhenFocused: string = '';\n\n\tpublic render() {\n\t\tconst { model, modelProperty, name, className, displayType, label, isRequired, isDisabled, isReadOnly, tooltip, subDescription, placeholder, errors } = this.props;\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst fieldId = `${id}-field`;\n\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\t\tconst ariaLabel = !labelVisible ? label : undefined;\n\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(id, tooltip, subDescription);\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t@action\n\tprivate onChange = (event: React.ChangeEvent) => {\n\t\tthis.props.model[this.props.modelProperty] = event.target.value;\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event);\n\t\t}\n\t}\n\n\t@action\n\tprivate onBlur = (event: React.ChangeEvent) => {\n\t\tif(this.valueWhenFocused !== event.target.value && this.props.onChangeAndBlur){\n\t\t\tthis.props.onChangeAndBlur(event);\n\t\t}\n\t}\n\n\t@action\n\tprivate onClickToClear = (event: React.MouseEvent) => {\n\t\tthis.props.model[this.props.modelProperty] = '';\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { Password } from '../../Password/Password';\nimport { IAttributeProps } from './IAttributeProps';\n\ninterface IAttributePasswordProps extends IAttributeProps {\n}\n\nclass AttributePassword extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, errors, className, isReadonly, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n\nexport default AttributePassword;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { observer } from 'mobx-react';\nimport { IAttributeProps } from './IAttributeProps';\nimport classNames from 'classnames';\nimport { TextField } from 'Views/Components/TextBox/TextBox';\n\ninterface IAttributeTextFieldProps extends IAttributeProps {\n\tdisplayFunction?: (model: T) => React.ReactNode;\n}\n\n@observer\nexport default class AttributeDisplayField extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, className,displayFunction} = this.props;\n\t\tconst modelProperty = model[options.attributeName];\n\t\tconst value = displayFunction\n\t\t\t? displayFunction(modelProperty)\n\t\t\t: (modelProperty === null || modelProperty === undefined ? undefined : modelProperty.toString());\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { getFetchAllQuery, getModelName } from 'Util/EntityUtils';\nimport { lowerCaseFirst } from 'Util/StringUtils';\nimport { observer } from 'mobx-react';\nimport { action, computed, observable, runInAction } from 'mobx';\nimport { MultiCombobox } from '../../Combobox/MultiCombobox';\nimport { store } from 'Models/Store';\nimport _ from 'lodash';\nimport AwesomeDebouncePromise from 'awesome-debounce-promise';\nimport { IAttributeProps } from './IAttributeProps';\nimport { ComboboxOption } from 'Views/Components/Combobox/Combobox';\nimport { crudId } from 'Symbols';\n\nexport type dropdownData = Array<{ display: string, value: any }>;\ntype state = 'loading' | 'error' | 'success';\n\nexport interface IAttributeReferenceComboboxProps extends IAttributeProps {\n\t/** A function that returns the type of model that is on the combobox */\n\treferenceType: { new(json?: {}): Model };\n\t/** A function to override loading of the data into the dropdown */\n\treferenceResolveFunction?: (search: string | string[], options: {model: T}) => Promise;\n\t/** Should data be loaded immediately on placing this element into the DOM */\n\t// synchronousLoad?: boolean;\n\t/** A function to compare an option value with a value */\n\toptionEqualFunc?: (modelProperty: Model, option: string) => boolean;\n\t/** Is the entity in this combobox a join entity */\n\tisJoinEntity?: boolean;\n\t/** Can default options be removed from the combobox */\n\tdisableDefaultOptionRemoval?: boolean;\n}\n\n/**\n * A dropdown menu that populates itself with references to other objects\n */\n@observer\nexport default class AttributeReferenceMultiCombobox extends React.Component> {\n\tstatic defaultProps: Partial> = {\n\t\toptionEqualFunc: (modelProperty, option) => modelProperty.id === option,\n\t};\n\n\t@observable\n\tpublic requestState: {state: state, data?: dropdownData} = {state: 'loading'};\n\n\t@observable\n\tpublic options: T[] = [];\n\n\t@computed\n\tprivate get modelName() {\n\t\tconst modelName = getModelName(this.props.referenceType);\n\t\treturn lowerCaseFirst(modelName) + \"s\";\n\t}\n\n\t@computed\n\tprivate get joinProp() {\n\t\treturn this.props.options.attributeName.substring(0, this.props.options.attributeName.length - 1);\n\t}\n\n\tprivate _defaultOptions: Model[] = [];\n\n\t@computed\n\tprivate get defaultOptions(): ComboboxOption[] {\n\t\treturn this._defaultOptions.map(r => {\n\t\t\tr[crudId] = r.id;\n\t\t\treturn {\n\t\t\t\tdisplay: this.props.isJoinEntity ? r[this.joinProp].getDisplayName() : r.getDisplayName(),\n\t\t\t\tvalue: r,\n\t\t\t\tisFixed: this.props.disableDefaultOptionRemoval,\n\t\t\t}\n\t\t});\n\t}\n\n\t@computed\n\tpublic get resolveFunc() {\n\t\tif (this.props.referenceResolveFunction) {\n\t\t\treturn _.partial(this.props.referenceResolveFunction, _, {model: this.props.model});\n\t\t}\n\n\t\tconst query = getFetchAllQuery(this.props.referenceType);\n\t\treturn () => store.apolloClient.query({query: query, fetchPolicy: 'network-only'})\n\t\t\t.then((data) => {\n\t\t\t\tconst associatedObjects: any[] = data[this.modelName];\n\t\t\t\tlet comboOptions: dropdownData = [];\n\t\t\t\tif (associatedObjects) {\n\t\t\t\t\tcomboOptions = associatedObjects.map(obj => new this.props.referenceType(obj))\n\t\t\t\t\t\t.map(obj => ({ display: obj.getDisplayName(), value: obj }));\n\t\t\t\t}\n\t\t\t\treturn comboOptions;\n\t\t\t});\n\t}\n\n\tconstructor(props: IAttributeReferenceComboboxProps, context: any) {\n\t\tsuper(props, context);\n\n\t\tconst modelProp: Model[] | undefined = this.props.model[this.props.options.attributeName];\n\t\tif (Array.isArray(modelProp)) {\n\t\t\tthis._defaultOptions = [...modelProp];\n\t\t}\n\t}\n\n\tpublic mutateOptions = (query: string | string[]): Promise[]> => {\n\t\tconst { isJoinEntity } = this.props;\n\t\treturn this.resolveFunc(query)\n\t\t\t.then(e => {\n\t\t\t\tif (this.props.model.id !== null && this.props.model.id !== undefined) {\n\t\t\t\t\te = e.filter(d => d.value.id !== this.props.model.id);\n\t\t\t\t}\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthis.options = _.unionBy(\n\t\t\t\t\t\tthis.options,\n\t\t\t\t\t\tthis.props.model[this.props.options.attributeName],\n\t\t\t\t\t\te.map(x => x.value),\n\t\t\t\t\t\tisJoinEntity ? this.joinProp + 'Id' : 'id',\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t\treturn e.map(x => {\n\t\t\t\t\tconst option = {\n\t\t\t\t\t\tdisplay: isJoinEntity ? x.value[this.joinProp].getDisplayName() : x.value.getDisplayName(),\n\t\t\t\t\t\tvalue: x.value,\n\t\t\t\t\t\tisFixed: false,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (this.props.disableDefaultOptionRemoval) {\n\t\t\t\t\t\tif (_.find(this.defaultOptions, x.value)) {\n\t\t\t\t\t\t\toption.isFixed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn option;\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tpublic getOptions = () => {\n\t\treturn AwesomeDebouncePromise(this.mutateOptions, 500);\n\t}\n\n\t@action\n\tprivate updateData = (data: dropdownData) => {\n\t\tthis.requestState = {\n\t\t\tstate: 'success',\n\t\t\tdata,\n\t\t};\n\t}\n\n\t@action\n\tprivate errorData = () => {\n\t\tthis.requestState = {\n\t\t\tstate: 'error',\n\t\t};\n\t}\n\n\t@action\n\tprivate getInitialOption = (): Promise[]> => {\n\t\treturn this.mutateOptions('')\n\t\t\t.then(d => {\n\t\t\t\treturn _.unionBy(d, this.defaultOptions, option =>\n\t\t\t\t\tthis.props.isJoinEntity\n\t\t\t\t\t\t? option.value ? option.value[[this.props.options.attributeName.slice(0, -1)] + 'Id'] : undefined\n\t\t\t\t\t\t: (option.value ? option.value.id : undefined)\n\t\t\t\t);\n\t\t\t})\n\t\t\t.catch(e => this.defaultOptions);\n\t};\n\n\tpublic render() {\n\t\treturn \n\t\t\tlabel={this.props.options.displayName}\n\t\t\tmodel={this.props.model}\n\t\t\tmodelProperty={this.props.options.attributeName}\n\t\t\toptions={this.getOptions()}\n\t\t\terrors={this.props.errors}\n\t\t\tclassName={this.props.className}\n\t\t\tisDisabled={this.props.isReadonly}\n\t\t\tonAfterChange={this.props.onAfterChange}\n\t\t\tisRequired={this.props.isRequired}\n\t\t\tinitialOptions={this.getInitialOption}\n\t\t\tgetOptionValue={option => {\n\t\t\t\treturn this.props.isJoinEntity\n\t\t\t\t\t? (option ? option[this.props.options.attributeName.slice(0, -1)].id : undefined)\n\t\t\t\t\t: (option ? option.id : undefined)\n\t\t\t}}\n\t\t\tinputProps={{\n\t\t\t\theader: 'Type to search for entities'\n\t\t\t}}\n\t\t/>;\n\t}\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model } from 'Models/Model';\nimport { DateTimePicker } from '../../DateTimePicker/DateTimePicker';\nimport { IAttributeProps } from './IAttributeProps';\n\n\ninterface IAttributeDateTimePickerProps extends IAttributeProps {\n}\n\nclass AttributeDateTimePicker extends React.Component> {\n\tpublic render() {\n\t\tconst { model, options, className, isReadonly, errors, isRequired } = this.props;\n\t\treturn ;\n\t}\n}\n\nexport default AttributeDateTimePicker;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Combobox } from '../../Combobox/Combobox';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { IAttributeProps } from './IAttributeProps';\nimport { Model } from 'Models/Model';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IAttributeEnumComboboxProps extends IAttributeProps {\n\t// % protected region % [Add IAttributeEnumCombobox props here] off begin\n\t// % protected region % [Add IAttributeEnumCombobox props here] end\n}\n\n@observer\nexport default class AttributeEnumCombobox extends React.Component> {\n\t// % protected region % [Add extra options class properties here] off begin\n\t// % protected region % [Add extra options class properties here] end\n\n\t@computed\n\tprivate get options() {\n\t\t// % protected region % [Customize get options here] off begin\n\t\treturn this.props.options.enumResolveFunction || [];\n\t\t// % protected region % [Customize get options here] end\n\t}\n\n\tpublic render() {\n\t\t// % protected region % [Customize options render here] off begin\n\t\treturn ;\n\t\t// % protected region % [Customize options render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { observer } from 'mobx-react';\nimport { action, computed, observable } from 'mobx';\nimport { Button, Display } from 'Views/Components/Button/Button';\nimport If from 'Views/Components/If/If';\n\nexport interface PreviewProps {\n\t/**\n\t * The file to preview.\n\t */\n\tfileName?: string;\n\t/**\n\t * Should the preview show an image.\n\t */\n\tfileUrl?: string;\n\t/**\n\t * Callback to delete this file. If this function is not defined then this function will not be displayed.\n\t */\n\tonDelete?: () => void;\n\t/**\n\t * Is the preview of an image\n\t */\n\timagePreview?: boolean;\n\t/**\n\t * Should name of this file be a link to the url\n\t */\n\tdownload?: boolean;\n}\n\n/**\n * Preview display for the file upload component\n */\n@observer\nexport class UploadPreview extends React.Component {\n\t@computed\n\tprotected get className() {\n\t\treturn classNames(this.props.imagePreview ? 'upload__image' : 'upload__file', 'preview');\n\t}\n\n\tpublic render() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.imagePreview\n\t\t\t\t\t? \n\t\t\t\t\t: }\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport interface FilePreviewProps extends Omit {\n\t/**\n\t * The file to accept\n\t */\n\tfileBlob: Blob;\n}\n\n/**\n * Preview for the file upload that takes a base64 file instead of a URL\n */\n@observer\nexport class FileUploadPreview extends React.Component {\n\t@observable\n\tprotected base64File?: string = undefined;\n\n\t@action\n\tprotected onImageLoaded = (event: ProgressEvent) => {\n\t\tconst result = event.target?.result;\n\t\tif (typeof result === 'string') {\n\t\t\tthis.base64File = result;\n\t\t}\n\t};\n\n\tprotected loadFile = (file: Blob) => {\n\t\tconst reader = new FileReader();\n\t\treader.onload = this.onImageLoaded;\n\t\treader.readAsDataURL(file);\n\n\t};\n\n\tpublic componentDidMount() {\n\t\tthis.loadFile(this.props.fileBlob);\n\t}\n\n\tpublic componentDidUpdate(prevProps: Readonly) {\n\t\tif (this.props.fileBlob !== prevProps.fileBlob) {\n\t\t\tthis.loadFile(this.props.fileBlob);\n\t\t}\n\t}\n\n\tpublic render() {\n\t\tif (!this.base64File) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { fileName, onDelete, imagePreview } = this.props;\n\n\t\treturn ;\n\t}\n}\n\nconst FileName = ({fileUrl, fileName, download}: PreviewProps) => {\n\tif (download && fileUrl) {\n\t\treturn \n\t\t\t{fileName}\n\t\t;\n\t}\n\treturn

{fileName}

;\n};\n\nconst ImagePreview = (props: PreviewProps) => (\n\t
\n\t\t{props.fileName}/\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t
\n);\n\nconst FilePreview = (props: PreviewProps) => (\n\t
\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t
\n);","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { ChangeEventHandler } from 'react';\nimport * as uuid from 'uuid';\nimport classNames from 'classnames';\nimport InputWrapper from '../Inputs/InputWrapper';\nimport InputsHelper from '../Helpers/InputsHelper';\nimport { DisplayType } from '../Models/Enums';\nimport { action, computed, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { Button, Display } from 'Views/Components/Button/Button';\nimport { FileUploadPreview } from 'Views/Components/FileUpload/UploadPreview';\nimport If from 'Views/Components/If/If';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface FileUploadProps {\n\t// % protected region % [Override props here] off begin\n\t/**\n\t * The model to load the result data into.\n\t */\n\tmodel: T;\n\t/**\n\t * The property to load the file into. The datatype of this field is the Javascript File type.\n\t */\n\tmodelProperty: string;\n\t/**\n\t * Should a file preview be shown or a function to override the preview. If this is not set then the preview will\n\t * not be displayed\n\t */\n\tpreview?: boolean | ((file?: File, onDelete?: () => void) => React.ReactNode);\n\t/**\n\t * The content types to accept. This takes the format of the accept tag in a HTML input.\n\t *\n\t * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept\n\t */\n\tcontentType?: string;\n\t/**\n\t * Allow only images? This will restrict the content type to images only (this can be overwritten by the contentType\n\t * prop). This will also enable an image preview window to see the image to be uploaded before submitting.\n\t */\n\timageUpload?: boolean;\n\t/**\n\t * Id for the component.\n\t */\n\tid?: string;\n\t/**\n\t * The name of the input.\n\t */\n\tname?: string;\n\t/**\n\t * The class name of the component.\n\t */\n\tclassName?: string;\n\t/**\n\t * The display mode for the input.\n\t */\n\tdisplayType?: DisplayType;\n\t/**\n\t * The label for the input.\n\t */\n\tlabel?: string;\n\t/**\n\t * Should the label be visible. If this is set the false the label will still exist in the aria-label attribute.\n\t */\n\tlabelVisible?: boolean;\n\t/**\n\t * Is this field required.\n\t */\n\tisRequired?: boolean;\n\t/**\n\t * Is this field disabled.\n\t */\n\tisDisabled?: boolean;\n\t/**\n\t * Is this a readonly field. This will disable the field and remove all inputs.\n\t */\n\tisReadOnly?: boolean;\n\t/**\n\t * Is this a static input.\n\t */\n\tstaticInput?: boolean;\n\t/**\n\t * The a tooltip for this input.\n\t */\n\ttooltip?: string;\n\t/**\n\t * A description for this input.\n\t */\n\tsubDescription?: string;\n\t/**\n\t * Props to directly pass to the HTML input element.\n\t */\n\tinputProps?: React.InputHTMLAttributes;\n\t/**\n\t * Errors to display for this component.\n\t */\n\terrors?: string | string[];\n\t/**\n\t * An override for the onchange function.\n\t * @param file The file the user selected\n\t */\n\tonChange?: (file: File) => boolean;\n\t/**\n\t * Callback after onChange has been completed. This is not called if onChange was overwritten.\n\t * @param file The file the user selected\n\t */\n\tonAfterChange?: (file: File) => void;\n\t/**\n\t * Override for when the delete file button is pressed.\n\t */\n\tonDelete?: () => void;\n\t/**\n\t * Callback after a file has been cleared. This is not called if onDelete was overwritten.\n\t */\n\tonAfterDelete?: () => void;\n\t/**\n\t * Should the drop area for files be disabled. If this component is in read only mode then the area will also be \n\t * disabled.\n\t */\n\tdisableDropArea?: boolean;\n\t/**\n\t * Override to be used for the choose file button text.\n\t */\n\tbuttonText?: string;\n\t// % protected region % [Override props here] end\n\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n/**\n * This component provides an interface to load a file from the users device.\n */\n@observer\nclass FileUpload extends React.Component> {\n\t// % protected region % [Override class fields here] off begin\n\tprotected uuid = uuid.v4();\n\tprotected inputRef: HTMLInputElement | null = null;\n\n\t@observable\n\tpublic isBeingHovered = false;\n\n\t@observable\n\tprotected internalErrors: string[] = [];\n\t// % protected region % [Override class fields here] end\n\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\t// % protected region % [Override file here] off begin\n\t@computed\n\tpublic get file() {\n\t\treturn this.props.model[this.props.modelProperty] as File;\n\t}\n\t// % protected region % [Override file here] end\n\n\t// % protected region % [Override disableDelete here] off begin\n\t@computed\n\tpublic get disableDelete() {\n\t\treturn this.props.isRequired || this.props.isDisabled || this.props.isReadOnly;\n\t}\n\t// % protected region % [Override disableDelete here] end\n\n\t// % protected region % [Override acceptType here] off begin\n\t@computed\n\tprotected get acceptType() {\n\t\tconst { contentType, imageUpload } = this.props;\n\t\treturn contentType ?? (imageUpload ? 'image/*' : undefined);\n\t}\n\t// % protected region % [Override acceptType here] end\n\n\t// % protected region % [Override errors here] off begin\n\t@computed\n\tprotected get errors() {\n\t\tconst errorsProp = this.props.errors;\n\t\tif (typeof errorsProp === 'string') {\n\t\t\treturn [...this.internalErrors, errorsProp];\n\t\t} else if (Array.isArray(errorsProp)) {\n\t\t\treturn [...this.internalErrors, ...errorsProp];\n\t\t}\n\t\treturn this.internalErrors;\n\t}\n\t// % protected region % [Override errors here] end\n\n\t// % protected region % [Override setFile here] off begin\n\t@action\n\tpublic setFile = (file: File) => {\n\t\tif (this.props.onChange) {\n\t\t\treturn this.props.onChange(file);\n\t\t}\n\n\t\tthis.internalErrors = [];\n\t\tif (!this.validateContentType(file)) {\n\t\t\tconst message = `Content type ${file.type} is not valid for ${this.acceptType}`;\n\t\t\tthis.internalErrors.push(message);\n\t\t\tconsole.warn(message);\n\t\t\treturn false;\n\t\t}\n\n\t\t(this.props.model[this.props.modelProperty] as File) = file;\n\t\tthis.props.onAfterChange?.(file);\n\n\t\treturn true;\n\t};\n\t// % protected region % [Override setFile here] end\n\n\t// % protected region % [Override clearFile here] off begin\n\t@action\n\tpublic clearFile = () => {\n\t\tthis.internalErrors = [];\n\t\tif (this.props.onDelete) {\n\t\t\treturn this.props.onDelete();\n\t\t}\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.value = '';\n\t\t}\n\n\t\tthis.props.model[this.props.modelProperty] = undefined;\n\t\tthis.props.onAfterDelete?.()\n\t};\n\t// % protected region % [Override clearFile here] end\n\n\t// % protected region % [Override validateContentType here] off begin\n\tpublic validateContentType = (file: File) => {\n\t\tconst types = this.acceptType?.split(',').map(x => x.trim());\n\n\t\t// If this is null then there is no validation\n\t\tif (!types) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Iterate over each allowed type and validate it against the file\n\t\tfor (const type of types) {\n\t\t\t// Check file content types\n\t\t\tif (file.type === type) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// File extension match\n\t\t\tif (type.startsWith('.') && file.name.endsWith(type)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Check special content types\n\t\t\tif (type === 'audio/*' || type === 'video/*' || type === 'image/*') {\n\t\t\t\tconst specialType = type.replace('/*', '');\n\t\t\t\tif (file.type.startsWith(specialType)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\t// % protected region % [Override validateContentType here] end\n\n\t// % protected region % [Override onChange here] off begin\n\tprotected onChange: ChangeEventHandler = event => {\n\t\tconst { files } = event.target;\n\t\tif (files) {\n\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\tthis.setFile(files[i]);\n\t\t\t}\n\t\t}\n\t};\n\t// % protected region % [Override onChange here] end\n\n\t// % protected region % [Override onDragOver here] off begin\n\tprotected onDragOver = (event: React.DragEvent) => event.preventDefault();\n\t// % protected region % [Override onDragOver here] end\n\n\t// % protected region % [Override onDragEnter here] off begin\n\t@action\n\tprotected onDragEnter = () => this.isBeingHovered = true;\n\t// % protected region % [Override onDragEnter here] end\n\n\t// % protected region % [Override onDragLeave here] off begin\n\t@action\n\tprotected onDragLeave = () => this.isBeingHovered = false;\n\t// % protected region % [Override onDragLeave here] end\n\n\t// % protected region % [Override onDrop here] off begin\n\t@action\n\tprotected onDrop = (event: React.DragEvent) => {\n\t\tevent.preventDefault();\n\t\tthis.isBeingHovered = false;\n\t\tconst file = event.dataTransfer.files[0];\n\t\tif (file) {\n\t\t\tthis.setFile(file);\n\t\t}\n\t};\n\t// % protected region % [Override onDrop here] end\n\n\t// % protected region % [Override onClick here] off begin\n\tprotected onClick = () => {\n\t\tthis.inputRef?.focus();\n\t\tthis.inputRef?.click();\n\t};\n\t// % protected region % [Override onClick here] end\n\n\t// % protected region % [Override preview here] off begin\n\tprotected preview = () => {\n\t\tif (typeof this.props.preview === 'function') {\n\t\t\treturn this.props.preview(this.file, this.disableDelete ? undefined : this.clearFile);\n\t\t}\n\n\t\tif (this.props.preview && this.file) {\n\t\t\treturn \n\t\t}\n\t\treturn null;\n\t};\n\t// % protected region % [Override preview here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\tconst {\n\t\t\tname,\n\t\t\tclassName,\n\t\t\tdisplayType,\n\t\t\tlabel,\n\t\t\tisRequired,\n\t\t\tisDisabled,\n\t\t\tisReadOnly,\n\t\t\tstaticInput,\n\t\t\ttooltip,\n\t\t\tsubDescription,\n\t\t\tdisableDropArea,\n\t\t\tbuttonText,\n\t\t} = this.props;\n\n\t\tconst wrapperId = this.uuid.toString();\n\t\tconst fieldId = `${wrapperId}-field`;\n\n\t\tconst labelVisible = (this.props.labelVisible === undefined) ? true : this.props.labelVisible;\n\t\tconst ariaLabel = !labelVisible ? label : undefined;\n\t\tconst ariaDescribedby = InputsHelper.getAriaDescribedBy(wrapperId, tooltip, subDescription);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.inputRef = instance}\n\t\t\t\t\t\tstyle={{display: 'none'}}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\taccept={this.acceptType}\n\t\t\t\t\t\tmultiple={false}\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\treadOnly={staticInput}\n\t\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\t\taria-describedby={ariaDescribedby}\n\t\t\t\t\t\t{...this.props.inputProps}/>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{buttonText ?? 'Choose File'}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{this.preview()}\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render here] end\n\n\t// % protected region % [Add any extra methods here] off begin\n\t// % protected region % [Add any extra methods here] end\n}\n\n// % protected region % [Override default export here] off begin\nexport default FileUpload;\n// % protected region % [Override default export here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport Axios from 'axios';\nimport FileUpload from 'Views/Components/FileUpload/FileUpload';\nimport { Model } from 'Models/Model';\nimport { IAttributeProps } from 'Views/Components/CRUD/Attributes/IAttributeProps';\nimport { action, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { SERVER_URL } from 'Constants';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport { FileUploadPreview, UploadPreview } from 'Views/Components/FileUpload/UploadPreview';\n\nexport interface AttributeFileProps extends IAttributeProps {\n\tfileAttribute: string;\n\timageOnly?: boolean;\n}\n\ninterface FileMetadata {\n\tid: string;\n\tcreated: string;\n\tmodified: string;\n\tfileName: string;\n\tcontentType: string;\n\tlength: number;\n}\n\n@observer\nexport default class AttributeFile extends React.Component> {\n\tprotected readonly initialFileId?: string;\n\n\t@observable\n\tprotected fileMetadata?: FileMetadata;\n\n\t@action\n\tprotected onFetchSucceeded = (metadata: FileMetadata) => {\n\t\tthis.fileMetadata = metadata;\n\t};\n\n\t@action\n\tprotected onAfterDelete = () => {\n\t\tthis.props.model[this.props.options.attributeName] = undefined;\n\t};\n\n\tconstructor(props: AttributeFileProps) {\n\t\tsuper(props);\n\n\t\tif (this.props.model[this.props.options.attributeName]) {\n\t\t\tthis.initialFileId = this.props.model[this.props.options.attributeName];\n\t\t}\n\t}\n\n\tprotected loadFile = () => {\n\t\tconst fileId = this.props.model[this.props.options.attributeName];\n\t\tif (fileId) {\n\t\t\tAxios.get(`${SERVER_URL}/api/files/metadata/${fileId}`)\n\t\t\t\t.then(x => x.data)\n\t\t\t\t.then(metadata => this.onFetchSucceeded(metadata));\n\t\t}\n\t};\n\n\tpublic componentDidMount() {\n\t\t// For view or edit mode load the initial file from the server\n\t\tswitch (this.props.formMode) {\n\t\t\tcase EntityFormMode.VIEW:\n\t\t\tcase EntityFormMode.EDIT:\n\t\t\t\tthis.loadFile();\n\t\t}\n\t}\n\n\tpublic render() {\n\t\tconst {\n\t\t\tfileAttribute,\n\t\t\tisReadonly,\n\t\t\timageOnly,\n\t\t\tmodel,\n\t\t\tisRequired,\n\t\t\tonAfterChange,\n\t\t\tclassName,\n\t\t\terrors,\n\t\t\toptions\n\t\t} = this.props;\n\n\t\treturn {\n\t\t\t\tif (!file && model[options.attributeName]) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\tif (file) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}}\n\t\t\tmodel={model}\n\t\t\tmodelProperty={fileAttribute}\n\t\t\timageUpload={imageOnly}\n\t\t\tlabel={options.displayName}\n\t\t\terrors={errors}\n\t\t\tclassName={className}\n\t\t\tisReadOnly={isReadonly}\n\t\t\tisRequired={isRequired}\n\t\t\tonAfterChange={onAfterChange}\n\t\t\tonAfterDelete={this.onAfterDelete}/>;\n\t}\n}\n\n@observer\nexport class FileListPreview extends React.Component<{ url: string }> {\n\t@observable\n\tprivate fileName?: string = undefined;\n\t@action\n\tprivate setFileName = (metadata: FileMetadata) => {\n\t\tthis.fileName = metadata.fileName;\n\t};\n\tpublic componentDidMount() {\n\t\tAxios.get(`${SERVER_URL}/api/files/metadata/${this.props.url}`)\n\t\t\t.then(x => x.data)\n\t\t\t.then(this.setFileName);\n\t}\n\tpublic render() {\n\t\treturn \n\t\t\t{this.fileName ?? 'Download'}\n\t\t\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { AttributeCRUDOptions } from 'Models/CRUDOptions';\nimport { Model } from 'Models/Model';\nimport AttributeTextField from './AttributeTextField';\nimport AttributeTextArea from './AttributeTextArea';\nimport AttributeReferenceCombobox from './AttributeReferenceCombobox';\nimport AttributeDatePicker from './AttributeDatePicker';\nimport AttributeTimePicker from './AttributeTimePicker';\nimport AttributeCheckbox from './AttributeCheckbox';\nimport AttributePassword from './AttributePassword';\nimport AttributeDisplayField from './AttributeDisplayField';\nimport AttributeReferenceMultiCombobox from './AttributeReferenceMultiCombobox';\nimport AttributeDateTimePicker from './AttributeDateTimePicker';\nimport AttributeEnumCombobox from './AttributeEnumCombobox';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport AttributeFile from 'Views/Components/CRUD/Attributes/AttributeFile';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport function getAttributeComponent (\n\tattributeOptions: AttributeCRUDOptions,\n\tmodel: Model,\n\terrors: string[],\n\tformMode: EntityFormMode = EntityFormMode.VIEW,\n\tisRequired: boolean = false,\n\tonAfterChange?: (attributeName: string) => void,\n\tonChangeAndBlur?: (attributeName: string) => void)\n{\n\tconst className = attributeOptions.className \n\t\t? `${attributeOptions.attributeName} ${attributeOptions.className}`\n\t\t: attributeOptions.attributeName;\n\n\tconst isReadonly = formMode === EntityFormMode.VIEW || attributeOptions.isReadonly;\n\n\tconst displayType = {\n\t\t[EntityFormMode.VIEW]: attributeOptions.readFieldType,\n\t\t[EntityFormMode.CREATE]: attributeOptions.createFieldType,\n\t\t[EntityFormMode.EDIT]: attributeOptions.updateFieldType,\n\t}[formMode];\n\n\tswitch (displayType) {\n\t\tcase 'textfield':\n\t\t\t// % protected region % [Override textfield here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onAfterChange) {\n\t\t\t\t\t\tonAfterChange(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonChangeAndBlur={() => {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override textfield here] end\n\t\tcase 'textarea':\n\t\t\t// % protected region % [Override textarea here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onAfterChange) {\n\t\t\t\t\t\tonAfterChange(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonChangeAndBlur={() => {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override textarea here] end\n\t\tcase 'password':\n\t\t\t// % protected region % [Override password here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override password here] end\n\t\tcase 'datepicker':\n\t\t\t// % protected region % [Override date picker here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override date picker here] end\n\t\tcase 'timepicker':\n\t\t\t// % protected region % [Override time picker here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override time picker here] end\n\t\tcase 'datetimepicker':\n\t\t\t// % protected region % [Override datetime picker here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override datetime picker here] end\n\t\tcase 'checkbox':\n\t\t\t// % protected region % [Override checkbox here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override checkbox here] end\n\t\tcase 'displayfield':\n\t\t\t// % protected region % [Override displayfield here] off begin\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override displayfield here] end\n\t\tcase 'reference-combobox':\n\t\t\t// % protected region % [Override reference-combobox here] off begin\n\t\t\tif (attributeOptions.referenceTypeFunc === undefined) {\n\t\t\t\tthrow new Error('Must have a defined referenceType for display type' + attributeOptions.displayType);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override reference-combobox here] end\n\t\tcase 'reference-multicombobox':\n\t\t\t// % protected region % [Override refernce-multicombobox here] off begin\n\t\t\tif (attributeOptions.referenceTypeFunc === undefined) {\n\t\t\t\tthrow new Error('Must have a defined referenceType for display type' + attributeOptions.displayType);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps} />;\n\t\t\t// % protected region % [Override refernce-multicombobox here] end\n\t\tcase 'enum-combobox':\n\t\t\t// % protected region % [Override enum-combobox here] off begin\n\t\t\tif (attributeOptions.enumResolveFunction === undefined) {\n\t\t\t\tthrow new Error('Must have a defined enumType for display type' + attributeOptions.displayType);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t\tif (!!onChangeAndBlur) {\n\t\t\t\t\t\tonChangeAndBlur(attributeOptions.attributeName);\n\t\t\t\t\t}\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t/>;\n\t\t\t// % protected region % [Override enum-combobox here] end\n\t\tcase 'file':\n\t\t\t// % protected region % [Override file input here] off begin\n\t\t\tif (attributeOptions.fileAttribute === undefined) {\n\t\t\t\tthrow new Error(`Must have a defined file attribute for ${attributeOptions.attributeName}`)\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t\tif (attributeOptions.onAfterChange) {\n\t\t\t\t\t\tattributeOptions.onAfterChange(model);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...attributeOptions.inputProps} />;\n\t\t\t// % protected region % [Override file input here] end\n\t\tcase 'hidden':\n\t\t\t// % protected region % [Override hidden here] off begin\n\t\t\treturn null;\n\t\t\t// % protected region % [Override hidden here] end\n\t\t// % protected region % [Add more customized cases here] off begin\n\t\t// % protected region % [Add more customized cases here] end\n\t\tdefault:\n\t\t\tthrow new Error(`No attribute component is defined to handle ${attributeOptions.displayType} for attr ${attributeOptions.attributeName}`);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\n\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\ninterface IFieldSet {\n\t/** The unique id for FieldSet component which will be used as key */\n\tid: string;\n\t/** The displayed content of the fildset legend */\n\tname: string;\n\t/** The extra class for fieldSet */\n\tclassName?: string;\n\t/** Whether to display the name of the group */\n\tshowName?: boolean;\n}\n\n@observer\nexport class FieldSet extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.name.length > 0 ? {this.props.name} : <>}\n\t\t\t\t
{this.props.children}
\n\t\t\t
\n\t\t);\n\t}\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { IIconProps } from '../Helpers/Common';\nimport { observer } from 'mobx-react';\nimport { observable, action, computed } from 'mobx';\nimport classNames from 'classnames';\nimport NavigationLinks from './NavigationLinks';\n// % protected region % [Add extra page imports here] off begin\n// % protected region % [Add extra page imports here] end\n\nexport enum Orientation {\n\tVERTICAL,\n\tHORIZONTAL,\n\t// % protected region % [Add orientations here] off begin\n\t// % protected region % [Add orientations here] end\n}\n\nexport interface ILink extends IIconProps {\n\tshouldDisplay?: () => boolean;\n\tpath: string;\n\tlabel: React.ReactNode;\n\tonClick?: (event?: any) => void;\n\tsubLinks?: ILink[];\n\tsubLinksFilter?: (link: ILink) => boolean;\n\tisDisabled?: boolean;\n\tuseATag?: boolean;\n\tcustomComponent?: React.ReactNode;\n\tclassName?: string;\n\t// % protected region % [Add extra ILink fields here] off begin\n\t// % protected region % [Add extra ILink fields here] end\n}\n\nexport interface INavigationProps extends RouteComponentProps {\n\tclassName?: string;\n\torientation: Orientation;\n\tlinkGroups: Array>;\n\tfilter?: (link: T) => boolean;\n\talwaysExpanded?: boolean;\n\t// % protected region % [Add extra INavigationProps fields here] off begin\n\t// % protected region % [Add extra INavigationProps fields here] end\n}\n\n// % protected region % [Add extra interfaces here] off begin\n// % protected region % [Add extra interfaces here] end\n\n@observer\n// % protected region % [Customise class implementation here] off begin\nclass Navigation extends React.Component> {\n// % protected region % [Customise class implementation here] end\n\t// % protected region % [Customise navigation fields here] off begin\n\t@computed\n\tprivate get alwaysExpanded() {\n\t\tconst { alwaysExpanded, orientation } = this.props;\n\t\tif (orientation === Orientation.HORIZONTAL && alwaysExpanded === undefined) {\n\t\t\treturn true;\n\t\t}\n\t\treturn alwaysExpanded;\n\t}\n\n\t@observable\n\tprivate navCollapsed: boolean = true;\n\t// % protected region % [Customise navigation fields here] end\n\n\tpublic render() {\n\t\t// % protected region % [Customise expand button here] off begin\n\t\tconst { className, linkGroups, ...routerProps } = this.props;\n\n\t\tlet expandButton = null;\n\t\tlet navClassName = classNames(className, 'nav', this.getOrientationClassName());\n\n\t\tif (!this.alwaysExpanded) {\n\t\t\tnavClassName = classNames(navClassName, this.navCollapsed ? 'nav--collapsed' : 'nav--expanded');\n\t\t\texpandButton = (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customise expand button here] end\n\t}\n\n\tprivate getOrientationClassName = () => {\n\t\t// % protected region % [Customise getOrientationClassName here] off begin\n\t\tconst { orientation } = this.props;\n\t\tswitch (orientation) {\n\t\t\tcase Orientation.HORIZONTAL:\n\t\t\t\treturn 'nav--horizontal';\n\t\t\tcase Orientation.VERTICAL:\n\t\t\t\treturn 'nav--vertical';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn '';\n\t\t// % protected region % [Customise getOrientationClassName here] end\n\t};\n\n\t@action\n\tprivate onClickNavCollapse = () => {\n\t\t// % protected region % [Customise onClickNavCollapse here] off begin\n\t\tthis.navCollapsed = !this.navCollapsed;\n\t\t// % protected region % [Customise onClickNavCollapse here] end\n\t};\n\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\n\n// % protected region % [Customise export here] off begin\nexport default Navigation;\n// % protected region % [Customise export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { Model, IAttributeGroup } from 'Models/Model';\nimport { AttributeCRUDOptions } from 'Models/CRUDOptions';\nimport { getAttributeComponent } from '../CRUD/Attributes/AttributeFactory';\nimport _ from 'lodash';\nimport {AttributeFormMode, EntityFormMode} from '../Helpers/Common';\nimport { isRequired } from 'Util/EntityUtils';\nimport { FieldSet } from '../FieldSet/FieldSet';\nimport {IEntityAttributeBehaviour} from \"../CRUD/EntityAttributeList\";\n\ninterface IEntityFormLayout {\n\t/** The model containing the data to render */\n\tmodel: T;\n\t/** The callback function used to get error messges by attribute name from outside the component */\n\tgetErrorsForAttribute?: (attributeName: string) => string[];\n\t/** The current form mode. EntityFormMode: VIEW = 'view', CREATE = 'create', EDIT = 'edit' */\n\tformMode?: EntityFormMode;\n\t/** The callback function which will be triggered when any of the attribute got changed, no matter the onBlur (out focus) event is triggered or not */\n\tonAttributeAfterChange?: (attributeName: string) => void;\n\t/** The callback function which will be triggered when any of the attribute got changed, and also onBlur (out focus) event is triggered */\n\tonAttributeChangeAndBlur?: (attributeName: string) => void;\n\t/** Specifies if an attribute should be read-only, editable or hidden */\n\tattributeBehaviours?: Array;\n}\n\n@observer\nexport class EntityFormLayout extends React.Component> {\n\tprivate getOneFieldSet(attrGroup: IAttributeGroup, attrs: AttributeCRUDOptions[]) {\n\t\t// % protected region % [Modify getOneFieldSet method here] off begin\n\t\tconst id = attrGroup.id.toString();\n\t\treturn (\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\tattrs\n\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\tif(b.order === undefined){\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t} else if (a.order === undefined) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.map(attributeOption => {\n\t\t\t\t\t\tconst formMode = this.getAttributeViewMode(attributeOption);\n\n\t\t\t\t\t\tif (!formMode) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn getAttributeComponent(\n\t\t\t\t\t\t\tattributeOption,\n\t\t\t\t\t\t\tthis.props.model,\n\t\t\t\t\t\t\tthis.props.getErrorsForAttribute ? this.props.getErrorsForAttribute(attributeOption.attributeName) : [],\n\t\t\t\t\t\t\tformMode,\n\t\t\t\t\t\t\tisRequired(this.props.model, attributeOption.attributeName),\n\t\t\t\t\t\t\tthis.props.onAttributeAfterChange,\n\t\t\t\t\t\t\tthis.props.onAttributeChangeAndBlur\n\t\t\t\t\t\t)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Modify getOneFieldSet method here] end\n\t}\n\n\tprivate getAttributeViewMode = (attributeOption: AttributeCRUDOptions) => {\n\t\tlet viewMode = this.props.formMode;\n\t\tif (this.props.attributeBehaviours) {\n\t\t\tconst attributeBehaviour = this.props.attributeBehaviours\n\t\t\t\t.find(x => x.name === attributeOption.attributeName);\n\t\t\tif (attributeBehaviour) {\n\t\t\t\tswitch(attributeBehaviour.behaviour) {\n\t\t\t\t\tcase AttributeFormMode.EDIT:\n\t\t\t\t\t\tviewMode = EntityFormMode.EDIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AttributeFormMode.VIEW:\n\t\t\t\t\t\tviewMode = EntityFormMode.VIEW;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AttributeFormMode.HIDE:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn viewMode;\n\t};\n\n\trender() {\n\t\tlet attributeOptions = this.props.model.getAttributeCRUDOptions();\n\n\t\tconst model = this.props.model;\n\t\t/** If the attributeGroups is not defined or empty in the model class, the fields in the form should be shown as default order and with no grouping.\n\t\t * Otherwise display them with grouping and ordering defined in the model class\n\t\t */\n\t\t// % protected region % [Modify how attributes are rendered to the page here] off begin\n\t\tif (model.attributeGroups && model.attributeGroups.length > 0) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.attributeGroups\n\t\t\t\t\t\t\t.sort((a, b) => { return a.order - b.order })\n\t\t\t\t\t\t\t.map(attributeGroup =>\n\t\t\t\t\t\t\t\tthis.getOneFieldSet(attributeGroup,\n\t\t\t\t\t\t\t\t\tattributeOptions.filter(attr => attr.groupId === attributeGroup.id)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t);\n\t\t} else {\n\t\t\treturn attributeOptions\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\tif(b.order === undefined){\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t} else if (a.order === undefined) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn a.order - b.order;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.map(attributeOption => {\n\t\t\t\t\tconst formMode = this.getAttributeViewMode(attributeOption);\n\n\t\t\t\t\tif (!formMode) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn getAttributeComponent(\n\t\t\t\t\t\tattributeOption,\n\t\t\t\t\t\tmodel,\n\t\t\t\t\t\tthis.props.getErrorsForAttribute ? this.props.getErrorsForAttribute(attributeOption.attributeName) : [],\n\t\t\t\t\t\tformMode,\n\t\t\t\t\t\tisRequired(model, attributeOption.attributeName),\n\t\t\t\t\t\tthis.props.onAttributeAfterChange,\n\t\t\t\t\t\tthis.props.onAttributeChangeAndBlur\n\t\t\t\t\t)\n\t\t\t\t});\n\t\t}\n\t\t// % protected region % [Modify how attributes are rendered to the page here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport * as queryString from \"querystring\";\nimport { Model } from 'Models/Model';\nimport { RouteComponentProps } from 'react-router';\nimport { observer } from 'mobx-react';\nimport { Button, Display } from '../Button/Button';\nimport { store } from 'Models/Store';\nimport FormErrors from './FormErrors';\nimport { observable, action, computed } from 'mobx';\nimport { IEntityValidationErrors } from 'Validators/Util';\nimport { safeLookup } from 'Util/IterableUtils';\nimport alert from 'Util/ToastifyUtils';\nimport { SecurityService } from 'Services/SecurityService';\nimport { IAcl } from 'Models/Security/IAcl';\nimport { Form } from '../Form/Form';\nimport {AttributeFormMode, EntityFormMode} from '../Helpers/Common';\nimport { EntityFormLayout } from '../EntityFormLayout/EntityFormLayout';\n\n// % protected region % [Add extra page imports here] off begin\n// % protected region % [Add extra page imports here] end\n\nconst VALIDATION_ERROR = \"Some of the fields are missing or invalid, please check your form.\";\n\nexport interface IEntityAttributeBehaviour {\n\tname: string;\n\tbehaviour: AttributeFormMode\n}\n\ninterface IEntityCreateProps extends RouteComponentProps {\n\tmodel: T;\n\tmodelType: { acls?: IAcl[], new(...args: any[]): T };\n\tformMode: EntityFormMode;\n\ttitle: string;\n\tsectionClassName: string;\n\tcustomFields?: React.ReactNode;\n\tcustomRelationPath?: any;\n\tattributeBehaviours?: Array;\n}\n\n// % protected region % [Add extra implementation here] off begin\n// % protected region % [Add extra implementation here] end\n\n@observer\nclass EntityAttributeList extends React.Component, any> {\n\t@observable\n\tprivate _generalFormError: React.ReactNode;\n\tprivate validationPath: {} = {};\n\tprivate hasSubmittedOnce: boolean;\n\n\t@computed\n\tprivate get generalFormError(): React.ReactNode{\n\t\tif(this.props.model.hasValidationError){\n\t\t\treturn VALIDATION_ERROR;\n\t\t}\n\t\treturn this._generalFormError;\n\t};\n\n\tprivate set generalFormError(value: React.ReactNode) {\n\t\tthis._generalFormError = value;\n\t}\n\n\t@observable\n\tprivate detailedFormError: React.ReactNode;\n\n\t@observable\n\tprivate fieldErrors?: IEntityValidationErrors = {};\n\n\tpublic render() {\n\t\t// % protected region % [Modify Entity attribute render] off begin\n\t\tconst { title, modelType, formMode, customFields, sectionClassName } = this.props;\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t{SecurityService.canUpdate(modelType) && formMode === EntityFormMode.VIEW\n\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

{title}

\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)\n\t\t\t\t\t:

{title}

}\n\t\t\t\t\t\n\n\t\t\t\t\t\t{this.renderEntityFormLayout()}\n\t\t\t\t\t\t{customFields}\n\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t\t// % protected region % [Modify Entity attribute render] end\n\t}\n\n\t// % protected region % [Customize EntityFormLayout here] off begin\n\tprotected renderEntityFormLayout = (): React.ReactNode => {\n\t\tconst { model, formMode, attributeBehaviours } = this.props;\n\t\treturn (\n\t\t\t\n\t\t);\n\t};\n\t// % protected region % [Customize EntityFormLayout here] end\n\n\tprotected onSubmit = (event: React.FormEvent) => {\n\t\tevent.preventDefault();\n\n\t\tconst { model } = this.props;\n\t\tconst modelName = model.getModelDisplayName();\n\t\tmodel.clearErrors();\n\n\t\tmodel.validate(this.props.customRelationPath).then(() => {\n\t\t\tif (model.hasValidationError) {\n\t\t\t\tthis.hasSubmittedOnce = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn model.saveFromCrud(this.props.formMode)\n\t\t\t\t.then((result) => {\n\t\t\t\t\tconst actionDone = this.props.formMode === 'create'\n\t\t\t\t\t\t? 'added'\n\t\t\t\t\t\t: (this.props.formMode === 'edit' ? 'edited' : '');\n\n\t\t\t\t\tconsole.log(`Successfully ${actionDone} ${modelName}`, result);\n\t\t\t\t\talert(`Successfully ${actionDone} ${modelName}`, 'success');\n\n\t\t\t\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\n\t\t\t\t\tif (redirect && !Array.isArray(redirect)) {\n\t\t\t\t\t\tstore.routerHistory.push(redirect.replace('{id}', model.id));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstore.routerHistory.goBack();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.error(`Failed adding ${modelName}`, error);\n\n\t\t\t\t\tif (typeof error === 'string') {\n\t\t\t\t\t\talert(error, 'error');\n\t\t\t\t\t}\n\n\t\t\t\t\tconst errors: Array<{code: string, message: string}> | undefined = safeLookup(\n\t\t\t\t\t\terror,\n\t\t\t\t\t\t'networkError',\n\t\t\t\t\t\t'result',\n\t\t\t\t\t\t'errors',\n\t\t\t\t\t\t{map: (x: any) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tcode: safeLookup(x, 'extensions', 'data', 'Code'),\n\t\t\t\t\t\t\t\tmessage: safeLookup(x, 'extensions', 'data', 'Detail'),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}}\n\t\t\t\t\t);\n\n\t\t\t\t\tif (errors && errors.length) {\n\t\t\t\t\t\tconst errorCodes = errors.map(x => x.code);\n\t\t\t\t\t\tlet detailedError = 'Could not save entity.';\n\n\t\t\t\t\t\tif (errorCodes.indexOf(\"23505\") >= 0) {\n\t\t\t\t\t\t\tdetailedError += ' A duplicate reference was found.';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.setErrors(\n\t\t\t\t\t\t\tdetailedError,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\terrors.map(x => x.message).join(' '));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.setErrors(error.message, {});\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t@action\n\tprivate setErrors(generalError: React.ReactNode, errors?: IEntityValidationErrors, detailedErrors?: React.ReactNode) {\n\t\tthis.generalFormError = generalError;\n\t\tthis.fieldErrors = errors;\n\t\tthis.detailedFormError = detailedErrors;\n\t}\n\n\t@action\n\tprivate clearErrors() {\n\t\tthis.generalFormError = \"\";\n\t\tthis.fieldErrors = {};\n\t}\n\n\tprivate onCancel = (event: React.MouseEvent) => {\n\t\tstore.routerHistory.goBack();\n\t}\n\n\tprivate onEdit = (event: React.MouseEvent) => {\n\t\tthis.props.history.push(`../Edit/${this.props.model.id}`);\n\t}\n\n\tprivate onAttributeAfterChange = (attributeName: string) => {\n\t\tconst { model } = this.props;\n\t\tif(!!this.validationPath[attributeName] || this.hasSubmittedOnce){\n\t\t\tif(this.props.model.getErrorsForAttribute(attributeName).length > 0){\n\t\t\t\tmodel.validate(this.hasSubmittedOnce ? this.props.customRelationPath : this.validationPath).then(() => {\n\t\t\t\t\tif (!model.hasValidationError) {\n\t\t\t\t\t\tthis.clearErrors();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onAttributeChangeAndBlur = (attributeName: string) => {\n\t\tconst { model } = this.props;\n\t\tthis.validationPath = {...this.validationPath, [`${attributeName}`]: true};\n\t\tmodel.validate(this.hasSubmittedOnce ? this.props.customRelationPath : this.validationPath).then(() => {\n\t\t\tif (!model.hasValidationError) {\n\t\t\t\tthis.clearErrors();\n\t\t\t}\n\t\t});\n\t}\n\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\n\nexport default EntityAttributeList;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { Model, IModelType } from 'Models/Model';\nimport { RouteComponentProps } from 'react-router';\nimport { observer, inject } from 'mobx-react';\nimport EntityAttributeList from './EntityAttributeList';\nimport { EntityFormMode } from '../Helpers/Common'\nimport { Query, QueryResult } from 'react-apollo';\nimport { getFetchSingleQuery, getModelDisplayName, getModelName } from 'Util/EntityUtils';\nimport { lowerCaseFirst } from 'Util/StringUtils';\n\ninterface IEntityEditProps extends RouteComponentProps {\n\tmodelType: IModelType;\n\tformMode: EntityFormMode;\n}\n\ninterface IEntityEditRouteParams {\n\tid?: string;\n}\n\n@inject('store')\n@observer\nclass EntityEdit extends React.Component, any> {\n\tpublic render() {\n\t\tconst { modelType } = this.props;\n\t\tconst query = getFetchSingleQuery(modelType);\n\t\tconst modelName = getModelDisplayName(modelType);\n\t\tconst dataReturnName = lowerCaseFirst(getModelName(modelType));\n\n\t\tconst title = `${this.props.formMode === 'create' ? 'Create' : (this.props.formMode === 'edit' ? 'Edit' : 'View')} ${modelName}`;\n\t\tconst sectionClassName = 'crud__' + this.props.formMode;\n\t\tconst options = { title, sectionClassName };\n\n\t\tif (this.props.match.params.id === null) {\n\t\t\tthrow new Error('Expected id of model to fetch for edit');\n\t\t}\n\n\t\t/* Refetch the model */\n\t\treturn (\n\t\t\t\n\t\t\t\t{({ loading, error, data }: QueryResult) => {\n\t\t\t\t\tif (loading) {\n\t\t\t\t\t\treturn
Loading {modelName}...
;\n\t\t\t\t\t}\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\treturn
Error Loading {modelName}
;\n\t\t\t\t\t}\n\t\t\t\t\treturn ();\n\t\t\t\t}}\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default EntityEdit;","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from \"mobx-react\";\nimport { Link } from 'react-router-dom';\n\nexport interface ISecuredAdminPageProps {\n\tcanDo: boolean;\n}\n\n@observer\nexport default class SecuredAdminPage extends React.Component {\n\n\tpublic render() {\n\t\tconst { canDo } = this.props;\n\t\tif (!canDo){\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\tAccess denied. Click Here to return to the admin main page\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t\telse{\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { Route, RouteComponentProps, Switch } from 'react-router';\nimport { IModelType, Model } from 'Models/Model';\nimport EntityCollection, { AdditionalBulkActions, IEntityCollectionProps, viewActionOptions } from './EntityCollection';\nimport EntityAttributeList from './EntityAttributeList';\nimport EntityEdit from './EntityEdit';\nimport { getModelDisplayName, getModelName } from 'Util/EntityUtils';\nimport SecuredAdminPage from '../Security/SecuredAdminPage';\nimport { SecurityService } from 'Services/SecurityService';\nimport { expandFn, showExpandFn, ICollectionItemActionProps } from '../Collection/Collection';\nimport { IEntityContextMenuActions } from '../EntityContextMenu/EntityContextMenu';\nimport { EntityFormMode } from '../Helpers/Common';\nimport { IFilter } from '../Collection/CollectionFilterPanel';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\ninterface IEntityCRUDProps extends RouteComponentProps {\n\t/** The type of model to render */\n\tmodelType: IModelType;\n\t/** Function to determine the expanded content of the list */\n\texpandList?: expandFn;\n\t/** Function to determine whether expand button, to display expand list, shows */\n\tshowExpandButton?: showExpandFn;\n\t/** Number of entities per page */\n\tperPage?: number;\n\t/** Context menu actions for each row */\n\tactionsMore?: IEntityContextMenuActions;\n\t/** Url suffix to add to the route */\n\tURLExtension?: string;\n\t/** Additional actions for the bulk actions menu */\n\tadditionalBulkActions?: Array>;\n\t/** Additional table actions for the collection view */\n\tadditionalTableActions?: Array>;\n\t/** Additional filters to add to the collection view */\n\tadditionalFilters?: Array>;\n\t/** Remove the view action from the collection */\n\tremoveViewAction?: boolean;\n\t/** Override for the collection component */\n\tcollectionComponent?: (routeProps: RouteComponentProps) => React.ReactNode;\n\t/** Override for the create component */\n\tcreateComponent?: (routeProps: RouteComponentProps) => React.ReactNode;\n\t/** If this is set to true then remove the created date filter from the collection view */\n\tremoveCreatedFilter?: boolean;\n\t/** If this is set to true then remove the modified date filter from the collection view */\n\tremoveModifiedFilter?: boolean;\n\t/** Change the filter orientation to row */\n\tfilterOrientationRow?: boolean;\n\t/** Override for the view component */\n\tviewComponent?: (routeProps: RouteComponentProps) => React.ReactNode;\n\t/** Override for the edit component */\n\teditComponent?: (routeProps: RouteComponentProps) => React.ReactNode;\n\t/** Custom action for view on the collection. If this function returns undefined then it will disable view */\n\tcollectionViewAction?: (options: viewActionOptions) => ICollectionItemActionProps | undefined;\n\t/** Custom action for create on the collection. If this function returns undefined then it will disable create */\n\tcollectionCreateAction?: (options: viewActionOptions) => React.ReactNode;\n\t/** Custom action for delete on the collection. If this function returns undefined then it will disable delete */\n\tcollectionDeleteAction?: (options: viewActionOptions) => ICollectionItemActionProps | undefined;\n\t/** Custom action for update on the collection. If this function returns undefined then it will disable update */\n\tcollectionUpdateAction?: (options: viewActionOptions) => ICollectionItemActionProps | undefined;\n\t/** Custom props to be passed to the entity collection for when it is being rendered. */\n\tentityCollectionProps?: Partial>;\n\t/** Override for disabling bulk export on the bulk select all */\n\tdisableBulkExport?: boolean;\n\t/** Override for disabling bulk delete on the bulk select all */\n\tdisableBulkDelete?: boolean;\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n/**\n * This component is used to render a CRUD (create, read, update, delete) view for a specific entity type.\n */\n@observer\nclass EntityCRUD extends React.Component> {\n\tprivate url = () => {\n\t\t// % protected region % [Override url function here] off begin\n\t\tconst { URLExtension, match } = this.props;\n\n\t\tif (URLExtension) {\n\t\t\treturn `${match.url}/${URLExtension}`;\n\t\t}\n\n\t\treturn match.url;\n\t\t// % protected region % [Override url function here] end\n\t};\n\n\tpublic render() {\n\t\tconst { match, modelType, collectionComponent, createComponent, editComponent, viewComponent } = this.props;\n\n\t\t// Wrap the pages with secured page component\n\t\t// % protected region % [Override read list view here] off begin\n\t\tconst entityCollectionPage = (pageProps: RouteComponentProps) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t};\n\t\t// % protected region % [Override read list view here] end\n\n\t\t// % protected region % [Override create view here] off begin\n\t\tconst entityCreatePage = (pageProps: RouteComponentProps) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t};\n\t\t// % protected region % [Override create view here] end\n\n\t\t// % protected region % [Override read view here] off begin\n\t\tconst entityViewPage = (pageProps: RouteComponentProps) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t};\n\t\t// % protected region % [Override read view here] end\n\n\t\t// % protected region % [Override edit view here] off begin\n\t\tconst entityEditPage = (pageProps: RouteComponentProps) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t};\n\t\t// % protected region % [Override edit view here] end\n\n\t\t// % protected region % [Override return value here] off begin\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t\t// % protected region % [Override return value here] end\n\t};\n\t// % protected region % [Customize renderEntityCollection here] off begin\n\tprotected renderEntityCollection = (routeProps: RouteComponentProps) => {\n\t\tconst {\n\t\t\tmodelType,\n\t\t\texpandList,\n\t\t\tshowExpandButton,\n\t\t\tperPage,\n\t\t\tactionsMore,\n\t\t\tadditionalBulkActions,\n\t\t\tadditionalFilters,\n\t\t\tadditionalTableActions,\n\t\t\tcollectionViewAction,\n\t\t\tcollectionCreateAction,\n\t\t\tcollectionUpdateAction,\n\t\t\tcollectionDeleteAction,\n\t\t\tentityCollectionProps,\n\t\t\tfilterOrientationRow,\n\t\t\tdisableBulkDelete,\n\t\t\tdisableBulkExport,\n\t\t\tremoveCreatedFilter,\n\t\t\tremoveModifiedFilter\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t};\n\t// % protected region % [Customize renderEntityCollection here] end\n\n\tprotected renderEntityCreate = (routeProps: RouteComponentProps) => {\n\t\t// % protected region % [Override create component render here] off begin\n\t\tconst { modelType } = this.props;\n\t\tconst modelDisplayName = getModelDisplayName(modelType);\n\t\treturn (\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override create component render here] end\n\t};\n\n\tprotected renderEntityEdit = (routeProps: RouteComponentProps) => {\n\t\t// % protected region % [Override edit component render here] off begin\n\t\tconst { modelType } = this.props;\n\t\treturn ;\n\t\t// % protected region % [Override edit component render here] end\n\t};\n\n\tprotected renderEntityView = (routeProps: RouteComponentProps) => {\n\t\t// % protected region % [Override read component render here] off begin\n\t\tconst { modelType } = this.props;\n\t\treturn ;\n\t\t// % protected region % [Override read component render here] end\n\t};\n\n\t// % protected region % [Add any extra fields here] off begin\n\t// % protected region % [Add any extra fields here] end\n}\n\n// % protected region % [Override default export here] off begin\nexport default EntityCRUD;\n// % protected region % [Override default export here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { RouteComponentProps } from 'react-router';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport class PageWrapper extends React.Component {\n\tpublic render() {\n\t\t// % protected region % [Override contents here] off begin\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.props.children}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from \"mobx-react\";\nimport { Redirect } from 'react-router';\nimport { store } from 'Models/Store';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface ISecuredPageProps {\n\t/**\n\t * The groups that can access this page.\n\t * If this is undefined then the page will be available to all\n\t */\n\tgroups?: string[];\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n/**\n * A secured page is a component to manage the page access with respect to security groups\n */\n@observer\nexport default class SecuredPage extends React.Component {\n\t// % protected region % [Add any extra fields here] off begin\n\t// % protected region % [Add any extra fields here] end\n\tpublic render() {\n\t\t// % protected region % [Override contents here] off begin\n\t\tif (this.props.groups) {\n\t\t\tconst { groups } = this.props;\n\t\t\tif (!groups || !groups.length) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tif (groups.some(r => store.userGroups.map(ug => ug.name).includes(r))) {\n\t\t\t\treturn this.props.children;\n\t\t\t}\n\t\t\treturn ;\n\t\t}\n\n\t\treturn this.props.children;\n\t\t// % protected region % [Override contents here] end\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class ActivityEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\nimport {MenuItemEventHandler} from \"react-contexify/lib/types\";\nimport {ContactEntity} from \"Models/Entities\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class ContactEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tthis.props.history.push(`/admin/timelines/graph/Contact/${entity.id}`)\n\t\t\t\t\t}]}\n\t\t\t\t\t{...this.props}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class ContactEmailEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\nimport {MenuItemEventHandler} from \"react-contexify/lib/types\";\nimport {DealEntity} from \"Models/Entities\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class DealEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tthis.props.history.push(`/admin/timelines/graph/Deal/${entity.id}`)\n\t\t\t\t\t}]}\n\t\t\t\t\t{...this.props}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class EventEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\nimport {MenuItemEventHandler} from \"react-contexify/lib/types\";\nimport {OrganisationEntity} from \"Models/Entities\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class OrganisationEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tthis.props.history.push(`/admin/timelines/graph/Organisation/${entity.id}`)\n\t\t\t\t\t}]}\n\t\t\t\t\t{...this.props}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class PipelineEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class StaffEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class StageEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class TrustedSourceEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class ContactTimelineEventsEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class DealTimelineEventsEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport EntityCRUD from 'Views/Components/CRUD/EntityCRUD';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class OrganisationTimelineEventsEntityPage extends React.Component {\n\t// % protected region % [Add any extra attributes here] off begin\n\t// % protected region % [Add any extra attributes here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{contents}\n\t\t\t\n\t\t);\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from \"mobx-react\";\nimport { IUserResult, store } from 'Models/Store';\nimport axios from 'axios';\nimport { action, observable } from 'mobx';\nimport Spinner from '../Spinner/Spinner';\nimport { Redirect, RouteComponentProps } from 'react-router';\nimport { SERVER_URL } from 'Constants';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface AuthProps extends Partial {\n\t/** If true then don't redirect on login check failure. */\n\tcheckOnly?: boolean\n\t/** The location that the component will redirect to on login check failure. */\n\tredirectLocation?: string;\n\t/** Callback on login check success. */\n\tonAfterSuccess?: () => void;\n\t/** Callback on login check failure. Note that if checkOnly is not set to true the user will still be redirected. */\n\tonAfterError?: () => void;\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n/**\n * This component handles the requirement for a user being logged in before they can access the child components.\n *\n * If the user is logged in then the this component will just render the child props.\n *\n * If the user is not flagged as logged in with Javascript then it will send a request to the server to see if they are\n * actually authenticated. If they are then the user is set as logged in, otherwise they are redirected to the login\n * page.\n */\n@observer\nexport default class Auth extends React.Component {\n\t// % protected region % [Add any extra fields here] off begin\n\t// % protected region % [Add any extra fields here] end\n\n\t@observable\n\t// % protected region % [Override requestState here] off begin\n\tprivate requestState: 'pending' | 'error' | 'success' = 'pending';\n\t// % protected region % [Override requestState here] end\n\n\t@action\n\tprivate onSuccess = (userResult?: IUserResult) => {\n\t\t// % protected region % [Override onSuccess here] off begin\n\t\tif (userResult) {\n\t\t\tstore.setLoggedInUser(userResult);\n\t\t}\n\t\tthis.requestState = 'success';\n\t\tthis.props.onAfterSuccess?.();\n\t\t// % protected region % [Override onSuccess here] end\n\t};\n\n\t@action\n\tprivate onError = () => {\n\t\t// % protected region % [Override onError here] off begin\n\t\tstore.clearLoggedInUser();\n\t\tthis.requestState = 'error';\n\t\tthis.props.onAfterError?.()\n\t\t// % protected region % [Override onError here] end\n\t}\n\n\tpublic componentDidMount() {\n\t\t// % protected region % [Override componentDidMount here] off begin\n\t\t// If we are already logged in then we don't need to check again\n\t\tif (store.loggedIn) {\n\t\t\tthis.onSuccess();\n\t\t\treturn;\n\t\t}\n\n\t\t// Otherwise send a request to the server to see if the token is valid\n\t\taxios.get(`${SERVER_URL}/api/account/me`)\n\t\t\t.then(({data}) => this.onSuccess(data))\n\t\t\t.catch(this.onError);\n\t\t// % protected region % [Override componentDidMount here] end\n\t}\n\n\tpublic render() {\n\t\t// % protected region % [Override contents here] off begin\n\t\tconst { location, redirectLocation, children, checkOnly } = this.props;\n\t\tconst redirect = redirectLocation ?? location?.pathname ?? store.routerHistory.location.pathname;\n\n\t\tswitch (this.requestState) {\n\t\t\tcase 'pending':\n\t\t\t\treturn ;\n\t\t\tcase 'success':\n\t\t\t\treturn this.props.children;\n\t\t\tcase 'error':\n\t\t\t\tif (checkOnly) {\n\t\t\t\t\treturn children;\n\t\t\t\t}\n\t\t\t\treturn ;\n\n\t\t}\n\t\t// % protected region % [Override contents here] end\n\t}\n\n\t// % protected region % [Add any extra functions here] off begin\n\t// % protected region % [Add any extra functions here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport ReactModal, { Props as ModalProps } from 'react-modal';\nimport { observer } from 'mobx-react';\nimport { store } from \"Models/Store\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface IModalProps {\n\t/** Is the modal open */\n\tisOpen: boolean;\n\t/** A label for the modal for screen readers */\n\tlabel: string;\n\t/** The classname for the modal */\n\tclassName?: string;\n\t/** The classname for the modal overlay */\n\toverlayClassName?: string;\n\t/** Function that will be run after the modal has opened. */\n\tonAfterOpen?: () => void;\n\t/** Function that will be run after the modal has closed. */\n\tonAfterClose?: () => void;\n\t/**\n\t * Function that will be run when the modal is requested to be closed, prior to actually closing.\n\t * If the isOpen prop is not changed in this callback then it will not actually close!\n\t */\n\tonRequestClose?: (event: (React.MouseEvent | React.KeyboardEvent)) => void;\n\t/**\n\t * Raw props to be passed to react-modal.\n\t * This will overwrite any props that are placed on the modal by this component\n\t */\n\tmodalProps?: ModalProps;\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n// % protected region % [Override root node here] off begin\nconst rootId = 'root';\nconst modalElement = document.getElementById(rootId);\n// % protected region % [Override root node here] end\n\n/**\n * A modal dialog that can display any content inside of it\n */\n@observer\nclass Modal extends React.Component {\n\t// % protected region % [Add any extra methods here] off begin\n\t// % protected region % [Add any extra methods here] end\n\n\tpublic render() {\n\t\t// % protected region % [Override render method here] off begin\n\t\tif (!modalElement) {\n\t\t\tconsole.error(`Could not find the #${rootId} element in the html. Could not create modal`);\n\t\t\treturn <>;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{this.props.children}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render method here] end\n\t}\n}\n\n// % protected region % [Override default export here] off begin\nexport default Modal;\n// % protected region % [Override default export here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {action, computed, observable, runInAction} from 'mobx';\nimport {Button, Display} from '../Button/Button';\nimport {observer} from \"mobx-react\";\nimport { SERVER_URL } from 'Constants';\nimport Collection, {ICollectionItemActionProps} from '../Collection/Collection';\nimport {PaginationQueryOptions} from 'Models/PaginationData';\nimport axios from 'axios';\nimport {SecurityService} from 'Services/SecurityService';\nimport { StaffEntity, } from 'Models/Entities';\nimport {RouteComponentProps} from 'react-router';\nimport {confirmModal} from '../Modal/ModalUtils';\nimport alert from '../../../Util/ToastifyUtils';\nimport classNames from 'classnames';\nimport Modal from '../Modal/Modal';\nimport {Combobox} from 'Views/Components/Combobox/Combobox';\nimport {IOrderByCondition} from '../ModelCollection/ModelQuery';\nimport {ICollectionHeaderProps} from \"../Collection/CollectionHeaders\";\n\ninterface IEntityEditRouteParams {\n\tid?: string;\n}\n\nconst userTypes = {\n\t\"StaffEntity\" : StaffEntity,\n};\n\ninterface ISearch {\n\tsearchTerm: string;\n}\n\ninterface ModalOptions {\n\tdisplay: string;\n\tvalue: string;\n}\n\ninterface ModalState {\n\topen: boolean;\n\tuser: IUser | undefined;\n\tactivate: boolean;\n}\n\ninterface IUser {\n\tid: string;\n\temail: string;\n\tdiscriminator: string;\n\temailConfirmed: boolean;\n\tusername: string;\n}\n\n@observer\nexport default class UserList extends React.Component> {\n\t@observable\n\tprivate users: IUser[] = [];\n\n\tprivate paginationQueryOptions: PaginationQueryOptions = new PaginationQueryOptions();\n\n\t@observable\n\tprivate totalRecords: number;\n\n\tprivate sortParams : IOrderByCondition = {\n\t\tpath: \"id\",\n\t\tdescending: true,\n\t};\n\n\t@observable\n\tprivate search: ISearch = { searchTerm: \"\" };\n\n\t@computed\n\tprivate get urlParams() {\n\t\treturn {\n\t\t\tPageNo: this.paginationQueryOptions.page + 1,\n\t\t\tPageSize: this.paginationQueryOptions.perPage\n\t\t};\n\t}\n\n\t// configure the search parameters that are sent to the server-side in the next request\n\t@computed\n\tprivate get searchParams() {\n\t\tconst regex = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n\t\tlet params =\n\t\t\t[\n\n\t\t\t\t{comparison: \"Like\", path: \"Email\", value: [`%${this.search.searchTerm}%`]},\n\t\t\t\t{comparison: \"Like\", path: \"discriminator\", value: [`%${this.search.searchTerm}%`]}\n\t\t\t];\n\n\t\tif (this.search.searchTerm.match(regex)) {\n\t\t\treturn [params.concat({comparison: \"Equal\", path: \"id\", value: [`${this.search.searchTerm}`]})];\n\t\t}\n\t\treturn [params];\n\t}\n\n\t@observable\n\tprivate modalState = {\n\t\topen: false,\n\t};\n\n\t@observable\n\tprivate activateModalState : ModalState = {\n\t\topen: false,\n\t\tuser: undefined,\n\t\tactivate: true,\n\t};\n\n\tpublic componentDidMount() {\n\t\tthis.fetchData();\n\t};\n\n\tprivate fetchData = () => {\n\t\taxios.post(`${SERVER_URL}/api/account/users`, {\n\t\t\tPaginationOptions: this.urlParams,\n\t\t\tSearchConditions: this.searchParams,\n\t\t\tSortConditions: [this.sortParams]\n\t\t}).then(this.setData)\n\t};\n\n\t@action\n\tprivate setData = (data: any) => {\n\t\tthis.totalRecords = data.data.countUsers;\n\t\tthis.users = data.data.users;\n\t};\n\n\t// Gets the actions (Read - Update - Delete) that can be performed on each row in the\n\t// all user list, depending on security.\n\tprotected getTableActions = (entity: IUser) => {\n\t\tconst tableActions: Array> = [];\n\n\t\tif(userTypes[entity.discriminator] !== undefined){\n\t\t\tif(SecurityService.canRead(userTypes[entity.discriminator])){\n\t\t\t\ttableActions.push({\n\t\t\t\t\taction: (entity: IUser) => {\n\t\t\t\t\t\tthis.props.history.push({ pathname: `/admin/${entity.discriminator}/view/${entity.id}` });\n\t\t\t\t\t},\n\t\t\t\t\tlabel: \"View\",\n\t\t\t\t\tshowIcon: true,\n\t\t\t\t\ticon: \"look\",\n\t\t\t\t\ticonPos: 'icon-top',\n\t\t\t\t});\n\t\t\t}\n\t\t\tif(SecurityService.canUpdate(userTypes[entity.discriminator])){\n\t\t\t\ttableActions.push({\n\t\t\t\t\taction: (entity: IUser) => {\n\t\t\t\t\t\tthis.props.history.push({ pathname: `/admin/${entity.discriminator}/edit/${entity.id}` });\n\t\t\t\t\t},\n\t\t\t\t\tlabel: \"Edit\",\n\t\t\t\t\tshowIcon: true,\n\t\t\t\t\ticon: \"edit\",\n\t\t\t\t\ticonPos: 'icon-top',\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (SecurityService.canDelete(userTypes[entity.discriminator])) {\n\t\t\t\ttableActions.push({\n\t\t\t\t\taction: (entity: IUser) => {\n\t\t\t\t\t\tconfirmModal('Please confirm', \"Are you sure you want to delete this item?\").then(() => {\n\t\t\t\t\t\t\tnew userTypes[entity.discriminator](entity).delete().then(() => {\n\t\t\t\t\t\t\t\tthis.fetchData();\n\t\t\t\t\t\t\t\talert('Deleted successfully', 'success');\n\t\t\t\t\t\t\t}).catch((errorMessage: any) => {\n\t\t\t\t\t\t\t\talert(\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t

This record could not be deleted because of an association

\n\t\t\t\t\t\t\t\t\t\t

Message:

\n\t\t\t\t\t\t\t\t\t\t

{errorMessage}

\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t, 'error'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\tlabel: \"Delete\",\n\t\t\t\t\tshowIcon: true,\n\t\t\t\t\ticon: \"bin-full\",\n\t\t\t\t\ticonPos: 'icon-top',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn tableActions;\n\t};\n\n\tprotected renderCreateButton(): React.ReactNode {\n\t\treturn (\n\t\t\t this.onOpenModal()}}>\n\t\t\t\tCreate new\n\t\t\t\n\t\t);\n\t}\n\n\t@action\n\tprivate onOpenModal = () => {\n\t\tthis.modalState.open = true;\n\t\tthis.userTypeSelected.selectedUser = null;\n\t};\n\n\t// The modal shown when the user clicks on the 'create' button.\n\tprotected renderCreateModal = () => {\n\t\treturn (\n\t\t\t runInAction(() => this.modalState.open = false)}>\n\t\t\t\t

Select user type

\n\t\t\t\t

What type of user would you like to create?

\n\t\t\t\t{this.renderModalCombobox()}\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t)\n\t};\n\n\t@action\n\tprotected onCancelModal = () => {\n\t\tthis.modalState.open = false;\n\t};\n\n\tprotected userSelected = () => {\n\t\tif (this.userTypeSelected.selectedUser != null) {\n\t\t\tthis.props.history.push({ pathname: `/admin/${this.userTypeSelected.selectedUser}/create` })\n\t\t}\n\t\telse {\n\t\t\talert('Please select a user type.','warning',{position: 'top-center'})\n\t\t}\n\t};\n\n\tprivate userTypeSelected = {\n\t\tselectedUser: null\n\t};\n\n\tprotected renderModalCombobox = () => {\n\t\treturn (\n\t\t\t\n\t\t)\n\t};\n\n\tprotected getModalUserOptions = () => {\n\t\tconst userOptions: ModalOptions[] = [];\n\t\tObject.keys(userTypes).forEach(\n\t\t\tu => {\n\t\t\t\tif (SecurityService.canCreate(userTypes[u])) {\n\t\t\t\t\tuserOptions.push({display:u, value: u})\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\treturn userOptions;\n\t};\n\n\t// % protected region % [Customise user collection headers here] off begin\n\t// The column headings shown at the top of the all users list.\n\t// includes actions for sorting and on clicking the headings.\n\tprivate userCollectionHeaders : Array> = [\n\t\t{\n\t\t\tname: 'discriminator',\n\t\t\tdisplayName: 'Type',\n\t\t\tsortable: true,\n\t\t\tsortClicked: () => this.onSort('discriminator')\n\t\t},\n\t\t{\n\t\t\tname: 'email',\n\t\t\tdisplayName: 'Email',\n\t\t\tsortable: true,\n\t\t\tsortClicked: () => this.onSort('email')},\n\t\t{\n\t\t\tname: 'emailConfirmed',\n\t\t\tdisplayName: 'Activated',\n\t\t\tsortable: true,\n\t\t\ttransformItem: model => model.emailConfirmed ? 'True' : 'False',\n\t\t\tsortClicked: () => this.onSort('emailConfirmed')\n\t\t}\n\t];\n\t// % protected region % [Customise user collection headers here] end\n\n\tpublic render() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.renderCreateModal()}\n\t\t\t\t{this.renderDeactivateUserModal()}\n\t\t\t\tToggle activation,\n\t\t\t\t\t\t\tonEntityClick: (event, entity) => this.setActivateUserModalState(entity, true)\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcustomItem: ,\n\t\t\t\t\t\t\tonEntityClick: (event, entity) => this.resetPassword(entity)\n\t\t\t\t\t\t},\n\t\t\t\t\t]}/>\n\t\t\t\n\t\t);\n\t}\n\n\t@action\n\tprotected onSort = (attribute: string) => {\n\t\tif (!this.sortParams.descending && this.sortParams.path === attribute){\n\t\t\tthis.sortParams = {\n\t\t\t\tpath: \"id\",\n\t\t\t\tdescending: true\n\t\t\t};\n\t\t}\n\t\telse{\n\t\t\tlet descending = this.sortParams.path === attribute ? !this.sortParams.descending : true;\n\t\t\tthis.sortParams = {\n\t\t\t\tpath: attribute,\n\t\t\t\tdescending: descending\n\t\t\t};\n\t\t}\n\n\t\tthis.fetchData();\n\t\treturn this.sortParams;\n\t};\n\n\t@action\n\tprotected setActivateUserModalState = (user: IUser | undefined, open: boolean) => {\n\t\tthis.activateModalState.user = user;\n\t\tthis.activateModalState.open = open;\n\t\tif (user !== undefined && !user.emailConfirmed){\n\t\t\tthis.activateModalState.activate = true;\n\t\t} else {\n\t\t\tthis.activateModalState.activate = false;\n\t\t}\n\t};\n\n\t// The modal shown when a user selects 'deactivate user' on an entry\n\t// in the all user list.\n\tprotected renderDeactivateUserModal = () => {\n\t\tconst user = this.activateModalState.user;\n\t\tif (user === undefined) {\n\t\t\treturn;\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t runInAction(() => this.setActivateUserModalState(undefined, false))}>\n\t\t\t\t\t

{this.activateModalState.activate ? 'Activate' : 'Deactivate'} User

\n\t\t\t\t\t

Are you sure you wish to {this.activateModalState.activate ? 'activate' : 'deactivate'} {user.email}?

\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t)\n\t\t}\n\t};\n\n\tprotected deactivateUser = (entity: IUser) => {\n\t\tthis.setActivateUserModalState(undefined, false);\n\t\tif(entity.emailConfirmed){\n\t\t\taxios\n\t\t\t\t.post(`${SERVER_URL}/api/account/deactivate`, {Username: entity.email})\n\t\t\t\t.then(data => {\n\t\t\t\t\talert(`Successfully deactivated ${entity.email}`, 'success');\n\t\t\t\t\tthis.updateEmailConfirmed(entity, false);\n\t\t\t\t})\n\t\t\t\t.catch(data => alert(`Unable to deactivate ${entity.email}`, 'error'))\n\t\t}\n\t\telse{\n\t\t\talert('Account already deactivated', 'warning')\n\t\t}\n\t};\n\n\tprotected activateUser = (entity: IUser) => {\n\t\tthis.setActivateUserModalState(undefined, false);\n\t\tif (!entity.emailConfirmed) {\n\t\t\taxios\n\t\t\t\t.post(`${SERVER_URL}/api/account/activate`, {Username: entity.email})\n\t\t\t\t.then(data => {\n\t\t\t\t\talert(`Successfully activated ${entity.email}`, 'success');\n\t\t\t\t\tthis.updateEmailConfirmed(entity, true);\n\t\t\t\t})\n\t\t\t\t.catch(data => {\n\t\t\t\t\talert(`Unable to activate ${entity.email}`, 'error');\n\t\t\t\t\tconsole.error(data);\n\t\t\t\t})\n\t\t} else {\n\t\t\talert('Account already activated', 'warning')\n\t\t}\n\t};\n\n\t@action\n\tprivate updateEmailConfirmed = (entity: IUser, status: boolean) => {\n\t\tentity.emailConfirmed = status;\n\t};\n\n\tprotected resetPassword = (entity: IUser) => axios\n\t\t.post(`${SERVER_URL}/api/account/reset-password-request`, {Username: entity.email})\n\t\t.then(data => this.onResetPasswordSuccess(entity))\n\t\t.catch(data => alert(`${data}`, 'error'));\n\n\tprotected onResetPasswordSuccess = (entity: IUser) => {\n\t\talert(`Successfully reset password for ${entity.email}`, 'success');\n\t};\n\n\t@action\n\tprotected onSearchTriggered = (searchTerm: string) => {\n\t\tthis.paginationQueryOptions.page = 0;\n\t\tthis.search.searchTerm = searchTerm.trim();\n\t\tthis.fetchData();\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport UserList from 'Views/Components/CRUD/UserList';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport SecuredPage from 'Views/Components/Security/SecuredPage';\n\n@observer\nexport default class AllUsersPage extends React.Component {\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport React, {Component} from 'react';\nimport classNames from 'classnames';\n\n// % protected region % [Add extra page imports here] off begin\n// % protected region % [Add extra page imports here] end\n\n// % protected region % [Modify CardProps here] off begin\ninterface CardProps {\n\trounded?: boolean;\n\tclassName?: string;\n\ticon?: string | React.ReactNode;\n\ticonOnly?: boolean;\n\thref?: string;\n}\n// % protected region % [Modify CardProps here] end\n\n// % protected region % [Add extra implementation here] off begin\n// % protected region % [Add extra implementation here] end\n\nexport default class Card extends Component {\n\t// % protected region % [Modify onClick here] off begin\n\tprivate onClick = () => {\n\t\tif (this.props.href) {\n\t\t\twindow.open(this.props.href);\n\t\t}\n\t};\n\t// % protected region % [Modify onClick here] end\n\t// % protected region % [Add extra class implementation here] off begin\n\t// % protected region % [Add extra class implementation here] end\n\t// % protected region % [Modify render here] off begin\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.props.icon \n\t\t\t\t\t\t\t? typeof(this.props.icon) === 'string' \n\t\t\t\t\t\t\t?
\n\t\t\t\t\t\t\t:
{this.props.icon}
\n\t\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t\t{this.props.children}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\t// % protected region % [Modify render here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport React, {Component} from 'react';\nimport classNames from 'classnames';\n\n// % protected region % [Add extra page imports here] off begin\n// % protected region % [Add extra page imports here] end\n\n// % protected region % [Modify CardGroupProps here] off begin\ninterface CardGroupProps {\n\tlayout?: 'horizontal' | 'vertical';\n\tclassName?: string;\n}\n// % protected region % [Modify CardGroupProps here] end\n\n// % protected region % [Add extra implementation here] off begin\n// % protected region % [Add extra implementation here] end\n\nexport default class CardGroup extends Component {\n\t// % protected region % [Add extra class implementation here] off begin\n\t// % protected region % [Add extra class implementation here] end\n\t// % protected region % [Modify render here] off begin\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.children}\n\t\t\t
\n\t\t);\n\t}\n\t// % protected region % [Modify render here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { PageWrapper } from 'Views/Components/PageWrapper/PageWrapper';\nimport Card from '../../Components/Card/Card';\nimport CardGroup from '../../Components/Card/CardGroup';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n@observer\nexport default class AdminPage extends React.Component {\n\n\tpublic render() {\n\t\t// % protected region % [Override contents here] off begin\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

Bot version: 2.3.1.0

\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

View GraphiQL

\n\t\t\t\t\t\t\t\t

View the GraphiQL developer tool to write your api requests.

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

View OpenAPI

\n\t\t\t\t\t\t\t\t

View the app's swagger docs and the structure of the API.

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

View Git

\n\t\t\t\t\t\t\t\t

Access your source code by cloning from your git repository.

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Want to learn more?

\n\t\t\t\t\t\t\t\t

Codebots academy has a variety of lessons and courses that can help you build your app.

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\t}\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from \"mobx-react\";\nimport { Link } from \"react-router-dom\";\nimport { Checkbox } from \"../Checkbox/Checkbox\";\nimport { store } from 'Models/Store';\nimport If from \"../If/If\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport type uiLocation = 'frontend' | 'admin';\nexport interface ITopBarProps {\n\t/** The current location of the application */\n\tcurrentLocation: uiLocation;\n\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n} \n\n/**\n * The Topbar component displays the topbar for admins to toggle between the frontend and the backend\n */\n// % protected region % [Add any customisations to default class definition here] off begin\n@observer\nclass Topbar extends React.Component {\n// % protected region % [Add any customisations to default class definition here] end\n\n\t// % protected region % [Override buttonLink here] off begin\n\tprivate buttonLink = ({ location }: { location: uiLocation }) => {\n\t\tif (location === 'admin') {\n\t\t\treturn Frontend;\n\t\t}\n\t\treturn Admin;\n\t}\n\t// % protected region % [Override buttonLink here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t)\n\t}\n\t// % protected region % [Override render here] end\n\n\t// % protected region % [Add any extra methods here] off begin\n\t// % protected region % [Add any extra methods here] end\n}\n\n// % protected region % [Override export here] off begin\nexport default Topbar;\n// % protected region % [Override export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { RouteComponentProps, matchPath } from \"react-router\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Link } from 'react-router-dom';\nimport { observer } from 'mobx-react';\nimport { computed, action, observable } from 'mobx';\nimport { IIconProps } from '../Helpers/Common';\nimport { ILink } from './Navigation';\nimport NavigationLinks from './NavigationLinks';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\ninterface INavigationLinkProps extends RouteComponentProps, IIconProps {\n\tpath: string;\n\tclassName?: string;\n\tlabel: React.ReactNode;\n\tisParent?: boolean;\n\tsubLinks?: ILink[];\n\tsubLinksFilter?: (link: ILink) => boolean;\n\tonClick?: (event: React.MouseEvent) => void;\n\tisActive?: boolean;\n\tisDisabled?: boolean;\n\tuseATag?: boolean;\n\tcustomComponent?: React.ReactNode;\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n@observer\nclass NavigationLink extends React.Component {\n\tstatic defaultProps = {\n\t\ticonPos: 'left',\n\t\t// % protected region % [Add any extra default props here] off begin\n\t\t// % protected region % [Add any extra default props here] end\n\t}\n\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\tprivate liRef: HTMLLIElement | null = null;\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('click', this.handleDocumentClick);\n\t\t// % protected region % [Change componentDidMount here] off begin\n\t\t// % protected region % [Change componentDidMount here] end\n\t}\n\tcomponentWillMount() {\n\t\tdocument.removeEventListener('click', this.handleDocumentClick);\n\t\t// % protected region % [Change componentWillMount here] off begin\n\t\t// % protected region % [Change componentWillMount here] end\n\t}\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('click', this.handleDocumentClick);\n\t\t// % protected region % [Change componentWillUnmount here] off begin\n\t\t// % protected region % [Change componentWillUnmount here] end\n\t}\n\n\t@observable\n\tprivate subLinksExpanded: boolean = false;\n\n\t@computed\n\tprivate get icon() {\n\t\tif (this.props.icon) {\n\t\t\treturn `icon-${this.props.icon}`;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t@computed\n\tprivate get iconPos() {\n\t\tif (this.icon) {\n\t\t\treturn this.props.iconPos;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic render() {\n\t\t// % protected region % [Customise render here] off begin\n\t\tconst { path, label, subLinks, subLinksFilter, ...routerProps } = this.props;\n\t\tlet subLinksNode = null;\n\t\tif (this.props.isParent && !!this.props.subLinks) {\n\t\t\tconst ulClazz = classNames('nav__sublinks', this.subLinksExpanded ? 'nav__sublinks--visible' : '');\n\t\t\tsubLinksNode = (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tconst isActive = this.props.isActive ? this.props.isActive : (this.isActive(path));\n\n\t\tlet textNode = !!this.icon ? {label} : label;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tif (!!ref) {\n\t\t\t\t\t\tthis.liRef = ref;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tclassName={classNames({ 'nav__parent-link--active': this.subLinksExpanded && this.props.isParent, 'active': isActive && !this.props.isParent }, this.props.className)} key={path}\n\t\t\t\tonClick={this.onClick}\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\t(this.props.isParent || this.props.isDisabled)\n\t\t\t\t\t\t? {textNode}\n\t\t\t\t\t\t: this.props.customComponent !== undefined\n\t\t\t\t\t\t? this.props.customComponent\n\t\t\t\t\t\t: this.props.useATag\n\t\t\t\t\t\t? {textNode}\n\t\t\t\t\t\t: {textNode}\n\t\t\t\t}\n\t\t\t\t{subLinksNode}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Customise render here] end\n\t}\n\n\t@action\n\tprivate onClick = (event: React.MouseEvent) => {\n\t\t// % protected region % [Customise onClick here] off begin\n\t\tif (this.props.isParent) {\n\t\t\tthis.subLinksExpanded = !this.subLinksExpanded;\n\t\t}\n\t\tif (this.props.onClick) {\n\t\t\tthis.props.onClick(event);\n\t\t}\n\t\t// % protected region % [Customise onClick here] end\n\t}\n\n\tprivate isActive = (path: string) => {\n\t\t// % protected region % [Customise isActive here] off begin\n\t\treturn !!matchPath(this.props.location.pathname, { path, exact: true });\n\t\t// % protected region % [Customise isActive here] end\n\t}\n\n\t@action\n\tprivate handleDocumentClick = (e: any) => {\n\t\t// % protected region % [Customise handleDocumentClick here] off begin\n\t\tif (this.subLinksExpanded && !!this.liRef && (!this.liRef.contains(e.target) || (!!this.liRef.lastElementChild && this.liRef.lastElementChild.contains(e.target)))) {\n\t\t\tthis.subLinksExpanded = !this.subLinksExpanded;\n\t\t}\n\t\t// % protected region % [Customise handleDocumentClick here] end\n\t}\n}\n\n// % protected region % [Customise export here] off begin\nexport default NavigationLink;\n// % protected region % [Customise export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { filter } from 'lodash';\nimport NavigationLink from './NavigationLink';\nimport { ILink } from './Navigation';\nimport { observer } from 'mobx-react';\nimport { action } from 'mobx';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface INavigationLinksProps extends RouteComponentProps {\n\tclassName?: string;\n\tlinks: Array;\n\tfilter?: (link: T) => boolean;\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n@observer\nclass NavigationLinks extends React.Component> {\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\tpublic render() {\n\t\tconst { className, links, ...routerProps } = this.props;\n\t\tconst htmlLinks = filter(links, this.props.filter)\n\t\t\t.filter(link => link.shouldDisplay ? link.shouldDisplay() : true)\n\t\t\t.map((link) => this.onClick(link)}\n\t\t\t\tisDisabled={link.isDisabled}\n\t\t\t\tsubLinksFilter={link.subLinksFilter}\n\t\t\t\tclassName={link.className}\n\t\t\t/>);\n\n\t\tlet content = (\n\t\t\t
    \n\t\t\t\t{htmlLinks}\n\t\t\t
\n\t\t);\n\n\t\t// % protected region % [Customise navigation link dom here] off begin\n\t\t// % protected region % [Customise navigation link dom here] end\n\t\treturn content;\n\t}\n\n\t@action\n\tprivate onClick = (link: ILink) => {\n\t\tif (!!link.onClick) {\n\t\t\tlink.onClick();\n\t\t}\n\t}\n}\n\n// % protected region % [Customise export here] off begin\nexport default NavigationLinks;\n// % protected region % [Customise export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport classNames from 'classnames';\nimport InputWrapper, { LabelPositions, InputType } from '../Inputs/InputWrapper';\nimport { action } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { DisplayType } from '../Models/Enums';\nimport * as uuid from 'uuid';\nimport { Tooltip } from '../Tooltip/Tooltip';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\nexport enum RadioAlignment {\n\tVERTICAL = \"radio-group--vertical\",\n\tHORIZONTAL = \"radio-group--horizontal\",\n}\n\nexport interface IRadioButtonGroupProps {\n\tid?: string;\n\tmodel: T;\n\tmodelProperty: string;\n\tclassName?: string;\n\tname?: string;\n\talignment?: RadioAlignment;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\ttooltip?: string;\n\tisRequired?: boolean;\n\tisDisabled?: boolean;\n\tisReadOnly?: boolean;\n\tinnerProps?: React.DetailedHTMLProps, HTMLDivElement>;\n\toptions: Array<{value: string, display: string}>;\n\terrors?: string | string[];\n\t/** Action to perform after the onChange method is called */\n\tonAfterChange?: (value: string) => void;\n\t/**\n\t * Should the key for the fields be random uuids. This is useful for when there is a chance for non unique values.\n\t * If this is not set or is false then the option field is used as the key.\n\t */\n\tuuidKey?: boolean;\n\t// % protected region % [Add any further props here] off begin\n\t// % protected region % [Add any further props here] end\n}\n\n@observer\nexport class RadioButtonGroup extends React.Component, any> {\n\tprivate uuid = uuid.v4();\n\n\t// % protected region % [Add any further methods and fields here] off begin\n\t// % protected region % [Add any further methods and fields here] end\n\t// % protected region % [customize the RadioButtonGroup render function] off begin\n\tpublic render() {\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst { displayType, tooltip, isDisabled, isReadOnly, isRequired, errors } = this.props;\n\t\tlet classes = this.props.className;\n\t\tclasses = classNames(classes, 'input-group-wrapper__radio');\n\t\tclasses = this.props.alignment? classNames(classes, this.props.alignment): classes;\n\n\t\tconst label = this.props.label;\n\t\tconst tooltipId = `${id}-tooltip`;\n\t\tconst requiredMark = (label && isRequired)? * : undefined;\n\t\tconst labelNode = label ?

{label}{requiredMark}

: null;\n\t\tconst tooltipNode = (label && tooltip) ? : '';\n\t\tconst groupName = this.props.name || 'DefaultName';\n\n\t\tif(this.props.innerProps){\n\t\t\tthis.props.innerProps['aira-live'] = 'assertive';\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{labelNode}\n\t\t\t\t{tooltipNode}\n\t\t\t\t{this.props.options.map(option => \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t,\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [customize the RadioButtonGroup render function] end\n\n\t@action\n\tpublic onChecked = (event: React.ChangeEvent) => {\n\t\tthis.props.model[this.props.modelProperty] = event.target.id;\n\t\t// If there is any logic to be done after the change of the Radio Button Group, do it here\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event.target.id);\n\t\t}\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport Navigation, { Orientation, ILink } from 'Views/Components/Navigation/Navigation';\nimport { RouteComponentProps } from 'react-router';\nimport * as Models from 'Models/Entities';\nimport { Model } from 'Models/Model';\nimport { IIconProps } from \"Views/Components/Helpers/Common\";\nimport { SecurityService } from \"Services/SecurityService\";\nimport { getModelDisplayName } from 'Util/EntityUtils';\n// % protected region % [Add any further imports here] off begin\n// % protected region % [Add any further imports here] end\n\ninterface AdminLink extends IIconProps {\n\tpath: string;\n\tlabel: string;\n\tentity: {new (args: any): Model};\n\tisMember?: boolean;\n\t// % protected region % [Add extra AdminLink fields here] off begin\n\t// % protected region % [Add extra AdminLink fields here] end\n}\n\nconst getPageLinks = (): AdminLink[] => [\n\t{\n\t\t// % protected region % [Override navigation link for ActivityEntity here] off begin\n\t\tpath: '/admin/activityentity',\n\t\tlabel: getModelDisplayName(Models.ActivityEntity),\n\t\tentity: Models.ActivityEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for ActivityEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for ContactEntity here] off begin\n\t\tpath: '/admin/contactentity',\n\t\tlabel: getModelDisplayName(Models.ContactEntity),\n\t\tentity: Models.ContactEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for ContactEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for ContactEmailEntity here] off begin\n\t\tpath: '/admin/contactemailentity',\n\t\tlabel: getModelDisplayName(Models.ContactEmailEntity),\n\t\tentity: Models.ContactEmailEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for ContactEmailEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for DealEntity here] off begin\n\t\tpath: '/admin/dealentity',\n\t\tlabel: getModelDisplayName(Models.DealEntity),\n\t\tentity: Models.DealEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for DealEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for EventEntity here] off begin\n\t\tpath: '/admin/evententity',\n\t\tlabel: getModelDisplayName(Models.EventEntity),\n\t\tentity: Models.EventEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for EventEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for OrganisationEntity here] off begin\n\t\tpath: '/admin/organisationentity',\n\t\tlabel: getModelDisplayName(Models.OrganisationEntity),\n\t\tentity: Models.OrganisationEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for OrganisationEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for PipelineEntity here] off begin\n\t\tpath: '/admin/pipelineentity',\n\t\tlabel: getModelDisplayName(Models.PipelineEntity),\n\t\tentity: Models.PipelineEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for PipelineEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for StaffEntity here] off begin\n\t\tpath: '/admin/staffentity',\n\t\tlabel: getModelDisplayName(Models.StaffEntity),\n\t\tentity: Models.StaffEntity,\n\t\tisMember: true\n\t\t// % protected region % [Override navigation link for StaffEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for StageEntity here] off begin\n\t\tpath: '/admin/stageentity',\n\t\tlabel: getModelDisplayName(Models.StageEntity),\n\t\tentity: Models.StageEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for StageEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for TrustedSourceEntity here] off begin\n\t\tpath: '/admin/trustedsourceentity',\n\t\tlabel: getModelDisplayName(Models.TrustedSourceEntity),\n\t\tentity: Models.TrustedSourceEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for TrustedSourceEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for ContactTimelineEventsEntity here] off begin\n\t\tpath: '/admin/contacttimelineeventsentity',\n\t\tlabel: getModelDisplayName(Models.ContactTimelineEventsEntity),\n\t\tentity: Models.ContactTimelineEventsEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for ContactTimelineEventsEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for DealTimelineEventsEntity here] off begin\n\t\tpath: '/admin/dealtimelineeventsentity',\n\t\tlabel: getModelDisplayName(Models.DealTimelineEventsEntity),\n\t\tentity: Models.DealTimelineEventsEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for DealTimelineEventsEntity here] end\n\t},\n\t{\n\t\t// % protected region % [Override navigation link for OrganisationTimelineEventsEntity here] off begin\n\t\tpath: '/admin/organisationtimelineeventsentity',\n\t\tlabel: getModelDisplayName(Models.OrganisationTimelineEventsEntity),\n\t\tentity: Models.OrganisationTimelineEventsEntity,\n\t\tisMember: false\n\t\t// % protected region % [Override navigation link for OrganisationTimelineEventsEntity here] end\n\t},\n\t// % protected region % [Add any extra page links here] off begin\n\t// % protected region % [Add any extra page links here] end\n];\n\nexport default class PageLinks extends React.Component {\n\tprivate filter = (link: AdminLink) => {\n\t\treturn SecurityService.canRead(link.entity);\n\t}\n\n\tpublic render() {\n\t\treturn ;\n\t}\n\n\tprivate getAdminNavLinks = () : ILink[][] => {\n\t\t// % protected region % [Add custom logic before all here] off begin\n\t\t// % protected region % [Add custom logic before all here] end\n\n\t\tconst links = getPageLinks();\n\t\tlet userLinks = links.filter(link => link.isMember).filter(this.filter);\n\t\tlet entityLinks = links.filter(link => ! link.isMember).filter(this.filter);\n\n\t\tlet linkGroups: ILink[][] = [];\n\n\t\t// % protected region % [Add any custom logic here before groups are made] off begin\n\t\t// % protected region % [Add any custom logic here before groups are made] end\n\n\t\tconst homeLinkGroup: ILink[] = [\n\t\t\t{ path: '/admin', label: 'Home', icon: 'home', iconPos: 'icon-left' },\n\t\t\t// { path: '/admin/settings', label: 'Settings', icon: 'settings', iconPos: 'icon-left', isDisabled: true }\n\n\t\t\t// % protected region % [Updated your home link group here] off begin\n\t\t\t// % protected region % [Updated your home link group here] end\n\t\t];\n\t\tlinkGroups.push(homeLinkGroup);\n\n\t\tconst entityLinkGroup: ILink[] = [];\n\t\tif (userLinks.length > 0) {\n\t\t\tentityLinkGroup.push(\n\t\t\t\t{\n\t\t\t\t\tpath: '/admin/users',\n\t\t\t\t\tlabel: 'Users',\n\t\t\t\t\ticon: 'person-group',\n\t\t\t\t\ticonPos: 'icon-left',\n\t\t\t\t\tsubLinks: [\n\t\t\t\t\t\t{path: \"/admin/user\", label: \"All Users\"},\n\t\t\t\t\t\t...userLinks.map(link => ({path: link.path, label: link.label}))\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tif (entityLinks.length > 0) {\n\t\t\tentityLinkGroup.push(\n\t\t\t\t{\n\t\t\t\t\tpath: '/admin/entities',\n\t\t\t\t\tlabel: 'Entities',\n\t\t\t\t\ticon: 'list',\n\t\t\t\t\ticonPos: 'icon-left',\n\t\t\t\t\tsubLinks: entityLinks.map(link => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tpath: link.path,\n\t\t\t\t\t\t\tlabel: link.label,\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tlinkGroups.push(entityLinkGroup);\n\n\t\t// % protected region % [Add any new link groups here before other and bottom] off begin\n\t\t// % protected region % [Add any new link groups here before other and bottom] end\n\n\t\tconst otherlinkGroup: ILink[] = [];\n\t\totherlinkGroup.push({ path: '/admin/timelines', label: 'Timelines', icon: 'timeline', iconPos: 'icon-left', isDisabled: false });\n\t\tif (otherlinkGroup.length > 0) {\n\t\t\tlinkGroups.push(otherlinkGroup);\n\t\t}\n\n\t\tconst bottomlinkGroup: ILink[] = [];\n\t\tbottomlinkGroup.push(\n\t\t\t{\n\t\t\t\tpath: '/admin/',\n\t\t\t\tlabel: 'Utility',\n\t\t\t\ticon: 'file',\n\t\t\t\ticonPos: 'icon-left',\n\t\t\t\tsubLinks: [\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: '/admin/styleguide',\n\t\t\t\t\t\tlabel: 'Style Guide',\n\t\t\t\t\t\tuseATag: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: '/admin/graphiql',\n\t\t\t\t\t\tlabel: 'GraphiQL',\n\t\t\t\t\t\tuseATag: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: '/api/hangfire',\n\t\t\t\t\t\tlabel: 'Hangfire',\n\t\t\t\t\t\tuseATag: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: '/api/swagger',\n\t\t\t\t\t\tlabel: 'OpenAPI',\n\t\t\t\t\t\tuseATag: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: 'https://gitlab.codebots.dev',\n\t\t\t\t\t\tlabel: 'Git',\n\t\t\t\t\t\tuseATag: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\n\t\tbottomlinkGroup.push({ path: '/logout', label: 'Logout', icon: 'room', iconPos: 'icon-left' });\n\t\tlinkGroups.push(bottomlinkGroup);\n\n\t\t// % protected region % [Modify your link groups here before returning] off begin\n\t\t// % protected region % [Modify your link groups here before returning] end\n\n\t\treturn linkGroups;\n\t}\n\n\t// % protected region % [Add custom methods here] off begin\n\t// % protected region % [Add custom methods here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { DisplayType } from '../Models/Enums';\nimport classNames from 'classnames';\nimport * as uuid from 'uuid';\nimport { Tooltip } from '../Tooltip/Tooltip';\n\nexport enum CheckboxAlignment {\n\tVERTICAL = \"checkbox-group--vertical\",\n\tHORIZONTAL = \"checkbox-group--horizontal\",\n}\n\nexport interface ICheckboxGroupProps {\n\tid?: string;\n\tclassName?: string;\n\talignment?: CheckboxAlignment;\n\tdisplayType?: DisplayType;\n\tlabel?: string;\n\ttooltip?: string;\n\tinnerProps?: React.DetailedHTMLProps, HTMLDivElement>;\n}\n\n@observer\nexport class CheckboxGroup extends React.Component {\n\tprivate uuid = uuid.v4();\n\n\tpublic render() {\n\t\tconst id = this.props.id || this.uuid.toString();\n\t\tconst innerProps = this.props.innerProps || {};\n\t\tconst {displayType, label, tooltip} = this.props;\n\t\tconst tooltipId = `${id}-tooltip`;\n\t\tconst labelNode = label ?

{label}

: null;\n\t\tconst tooltipNode = (label && tooltip) ? : '';\n\t\tconst className = `input-group-wrapper__checkbox ${this.props.className ? innerProps.className : ''}`;\n\t\tlet classes = classNames(className, `input-group-${displayType ? displayType : DisplayType.BLOCK}`);\n\t\treturn (\n\t\t\t
\n\t\t\t\t{labelNode}\n\t\t\t\t{tooltipNode}\n\t\t\t\t{this.props.children}\n\t\t\t
\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { DateTimePicker, IDateTimePickerProps } from '../DateTimePicker/DateTimePicker';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n/** DateTimeRangePicker-specific properties. Extend as necessary. */\nexport interface IDateTimeRangePickerProps extends IDateTimePickerProps {\n\t// % protected region % [Add extra props here] off begin\n\t// % protected region % [Add extra props here] end\n}\n\n/**\n * DateTimeRangePicker Component. Wraps DateTimePicker, which in turn wraps Flatpickr.\n * See IDateTimePickerProps for root property definitions. Can pass Flatpickr\n * properties that are not implemented by this interface via this.flatpickrProps.\n */\n@observer\nexport class DateTimeRangePicker extends React.Component> {\n\t// % protected region % [Add any extra class fields here] off begin\n\t// % protected region % [Add any extra class fields here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport moment from \"moment\";\nimport { getAttributes, getModelName} from 'Util/EntityUtils';\nimport {IModelType, Model} from 'Models/Model';\nimport _ from \"lodash\";\nimport {modelName as modelNameSymbol} from \"../Symbols\";\nimport {lowerCaseFirst} from \"./StringUtils\";\nimport {gql} from \"apollo-boost\";\nimport * as Models from \"../Models/Entities\";\nimport {IWhereCondition} from 'Views/Components/ModelCollection/ModelQuery';\nimport axios from \"axios\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport { TimelineModel } from 'Timelines/TimelineModel';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n// % protected region % [Override DateRange here] off begin\nexport interface DateRange {\n\tstartDate: Date,\n\tendDate: Date\n}\n// % protected region % [Override DateRange here] end\n\n// % protected region % [Override QuickJumpTimeFrame here] off begin\nexport enum QuickJumpTimeFrame {\n\t'Weeks',\n\t'Months' \n}\n// % protected region % [Override QuickJumpTimeFrame here] end\n\n// % protected region % [Override TimelineEntities here] off begin\nexport const TimelineEntities = [\n\tModels.ContactEntity,\n\tModels.DealEntity,\n\tModels.OrganisationEntity,\n];\n// % protected region % [Override TimelineEntities here] end\n\n// % protected region % [Override GroupEventsByDate here] off begin\nexport const GroupEventsByDate = (events: TimelineEvent[]) => {\n\treturn _(events)\n\t\t.groupBy(event => moment(event.created).format('YYYY-MM-DD'))\n\t\t.value();\n};\n// % protected region % [Override GroupEventsByDate here] end\n\n// % protected region % [Override SortEvents here] off begin\nexport const SortEvents = (a: TimelineEvent, b:TimelineEvent) => {\n\treturn CompareDateString(a.created, b.created)\n};\n// % protected region % [Override SortEvents here] end\n\n// % protected region % [Override CompareDateString here] off begin\nexport const CompareDateString = (a: string | Date, b: string | Date) => {\n\tconst dateA = new Date(a).getTime();\n\tconst dateB = new Date(b).getTime();\n\treturn dateB - dateA;\n};\n// % protected region % [Override CompareDateString here] end\n\n// % protected region % [Override GetTimelineGroupDateDisplay here] off begin\nexport const GetTimelineGroupDateDisplay = (groupDate: Date) => {\n\tconst date = moment();\n\n\tif (moment(date).isSame(groupDate, 'day')){\n\t\treturn 'Today'\n\t} if (moment(date.subtract(1, 'day')).isSame(groupDate, 'day')) {\n\t\treturn 'Yesterday'\n\t} return moment(groupDate).format('DD/MM/YYYY');\n};\n// % protected region % [Override GetTimelineGroupDateDisplay here] end\n\n// % protected region % [Override getTimelineEventEntity here] off begin\nexport const getTimelineEventEntity = (model: IModelType) => {\n\treturn new model().getTimelineEventEntity()\n};\n// % protected region % [Override getTimelineEventEntity here] end\n\n// % protected region % [Override getTimelineEntityFromName here] off begin\nexport const getTimelineEntityFromName = (modelName: string | undefined) => {\n\tif (!modelName) {\n\t\treturn undefined;\n\t}\n\tswitch (modelName.toLowerCase().replace(\" \", \"\")) {\n\t\tcase 'contact':\n\t\t\treturn Models.ContactEntity;\n\t\tcase 'deal':\n\t\t\treturn Models.DealEntity;\n\t\tcase 'organisation':\n\t\t\treturn Models.OrganisationEntity;\n\t\tdefault:\n\t\t\treturn undefined;\n\t}\n};\n// % protected region % [Override getTimelineEntityFromName here] end\n\n// % protected region % [Override getTimelineActionOptions here] off begin\nexport const getTimelineActionOptions = async (timelineEntity: IModelType) : Promise => {\n\tconst eventEntityName = getEventEntityNameFromTimelineEntity(timelineEntity);\n\treturn axios\n\t\t.get(`/api/entity/${eventEntityName}/action-types`)\n\t\t.then(data => {return data.data})\n};\n// % protected region % [Override getTimelineActionOptions here] end\n\n// % protected region % [Override getEventEntityNameFromTimelineEntity here] off begin\nexport const getEventEntityNameFromTimelineEntity = (model: IModelType) => {\n\treturn getModelName(getTimelineEventEntity(model))\n};\n// % protected region % [Override getEventEntityNameFromTimelineEntity here] end\n\n// % protected region % [Override getTimelineQueryWhereConditions here] off begin\nexport const getTimelineQueryWhereConditions = (timelineFilter: ITimelineFilter): Array>> => {\n\tconst eventEntityModel = getTimelineEventEntity(timelineFilter.selectedTimelineEntity);\n\tif (eventEntityModel) {\n\n\t\t// Create initial search conditions coupled to base model\n\t\tlet searchConditions = new eventEntityModel().getSearchConditions(timelineFilter.searchTerm) ?? [];\n\t\t// Add initial search conditions passed in from component\n\t\tif (timelineFilter.initialSearchConditions && timelineFilter.initialSearchConditions.length > 0) {\n\t\t\tsearchConditions.push(timelineFilter.initialSearchConditions);\n\t\t}\n\n\t\t// Add search conditions from filters\n\t\tif (timelineFilter.startDate) {\n\t\t\tsearchConditions.push([{ comparison: 'greaterThanOrEqual', path: 'created', value: [moment(timelineFilter.startDate).format('YYYY-MM-DD HH:mm:ss')]}])\n\t\t} if (timelineFilter.endDate) {\n\t\t\tsearchConditions.push([{ comparison: \"lessThanOrEqual\", path: 'created', value: [moment(timelineFilter.endDate).format('YYYY-MM-DD HH:mm:ss')]}])\n\t\t} if (timelineFilter.selectedActionTypes.length > 0) {\n\t\t\tsearchConditions.push(timelineFilter.selectedActionTypes.map(action => { return { comparison: \"equal\", path: 'Action', value: [action] } }));\n\t\t} if (timelineFilter.instanceIds.length > 0) {\n\t\t\tsearchConditions.push(timelineFilter.instanceIds.map(id => { return { comparison: \"equal\", path: 'entityId', value: [id] } }));\n\t\t}\n\n\t\treturn searchConditions;\n\t}\n\treturn [];\n};\n// % protected region % [Override getTimelineQueryWhereConditions here] end\n\n// % protected region % [Override getActionShapeClassName here] off begin\nexport const getActionShapeClassName = (action: string) => {\n\tswitch (action) {\n\t\tcase 'Created':\n\t\t\treturn 'diamond';\n\t\tcase 'Updated':\n\t\t\treturn 'square';\n\t\tcase 'Deleted':\n\t\t\treturn 'circle';\n\t\tdefault:\n\t\t\treturn 'default';\n\t}\n};\n// % protected region % [Override getActionShapeClassName here] end\n\n// % protected region % [Override TimelineEvent here] off begin\nexport interface TimelineEvent {\n\tid: string,\n\tcreated: Date,\n\tmodified: Date,\n\taction: string,\n\tactionTitle: string,\n\tdescription: string,\n\tentityId: string,\n\tgroupId: string\n}\n// % protected region % [Override TimelineEvent here] end\n\n// % protected region % [Override QuickJumpConditionalResult here] off begin\nexport interface QuickJumpConditionalResult {\n\teventsPre: Array,\n\teventsPost: Array\n}\n// % protected region % [Override QuickJumpConditionalResult here] end\n\n// % protected region % [Override getQuickJumpConditional here] off begin\nexport function getQuickJumpConditional (modelType: {new() : Model}, expandString?: string) {\n\tconst modelName: string = modelType[modelNameSymbol];\n\tconst lowerModelName = lowerCaseFirst(modelName);\n\n\treturn gql`\n\t\tquery ${lowerModelName}($argsPre: [[WhereExpressionGraph]], $argsPost: [[WhereExpressionGraph]], $skip:Int, $take:Int, $orderByPre: [OrderByGraph], $orderByPost: [OrderByGraph], $ids: [ID] ) {\n\t\t\teventsPre : ${lowerModelName}sConditional(conditions: $argsPre, skip:$skip, take:$take, orderBy: $orderByPre, ids: $ids) {\n\t\t\t\t${expandString ? expandString : \"\"}\n\t\t\t\t${getAttributes(modelType).join('\\n')}\n\t\t\t}\n\t\t\teventsPost : ${lowerModelName}sConditional(conditions: $argsPost, skip:$skip, take:$take, orderBy: $orderByPost, ids: $ids) {\n\t\t\t\t${expandString ? expandString : \"\"}\n\t\t\t\t${getAttributes(modelType).join('\\n')}\n\t\t\t}\n\t\t}`;\n}\n// % protected region % [Override getQuickJumpConditional here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { IIconProps } from '../Helpers/Common';\n\nexport interface IBreadCrumbsTag {\n\tlabel: string;\n\tlink?: string;\n\tclassName?: string;\n\tisHomeTag?: boolean;\n\tisCurrentTag?: boolean;\n}\n\nexport interface IBreadcrumbsProps {\n\ttags: IBreadCrumbsTag[];\n\tclassName?: string;\n\ticon?: IIconProps,\n}\n\n@observer\nexport class Breadcrumbs extends React.Component {\n\n\tprivate getTagNode = (tag: IBreadCrumbsTag) => {\n\t\tlet className = classNames(tag.className)\n\n\t\tif (!tag.isHomeTag) {\n\t\t\tclassName = classNames(\n\t\t\t\tclassName,\n\t\t\t\t`icon-${(this.props.icon && this.props.icon) ? this.props.icon.icon : 'chevron-right'}`,\n\t\t\t\t(this.props.icon && this.props.icon) ? this.props.icon.iconPos : 'icon-left'\n\t\t\t);\n\t\t}\n\n\t\tif (tag.isCurrentTag) {\n\t\t\treturn (\n\t\t\t\t
  • \n\t\t\t\t\t{tag.label}\n\t\t\t\t
  • \n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t
  • \n\t\t\t\t\t\n\t\t\t\t\t\t{tag.label}\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst className = classNames('breadcrumbs', this.props.className);\n\t\treturn (\n\t\t\t
      \n\t\t\t\t{\n\t\t\t\t\tthis.props.tags.map((tag, index) => {\n\t\t\t\t\t\treturn this.getTagNode(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...tag,\n\t\t\t\t\t\t\t\tisHomeTag: (index === 0),\n\t\t\t\t\t\t\t\tisCurrentTag: (this.props.tags.length === (index + 1))\n\t\t\t\t\t\t\t});\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t
    \n\t\t);\n\t}\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from \"react\";\nimport { observer } from 'mobx-react';\nimport { action, computed, observable } from 'mobx';\nimport { TextField, ITextFieldProps } from '../TextBox/TextBox';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n// % protected region % [Adjust validation message here] off begin\nconst errorMessage = 'The value must be a number';\nconst notWholeNumberErrorMessage = 'The value must be a whole number';\n// % protected region % [Adjust validation message here] end\n\ntype numberModel = {\n\tnumber?: string,\n};\n\nexport interface INumberTextFieldProps extends ITextFieldProps {\n\tacceptWholeNumbersOnly?: boolean;\n\t// % protected region % [Add extra INumberTextFieldProps here] off begin\n\t// % protected region % [Add extra INumberTextFieldProps here] end\n}\n\n/**\n * A text field that will cast the value typed into it to a number and will not allow non numbers to be typed into it\n */\n@observer\nexport class NumberTextField extends React.Component> {\n\t/**\n\t * An internal model that contains the string value of the number that is stored in the real model\n\t * This allows for values such as '1.' to be displayed even though it is really just '1'\n\t */\n\t@observable\n\tprivate model: numberModel = {number: undefined};\n\n\t/**\n\t * The string value of the text field so the display value does not get mutated unexpectedly\n\t */\n\t@observable\n\tprivate stringValue: string = '';\n\n\t/**\n\t * An error message to display in the case of an invalid number\n\t */\n\t@observable\n\tprivate error?: string = undefined;\n\n\t/**\n\t * A combination of any provided errors and the number error\n\t */\n\t@computed\n\tprivate get allErrors() {\n\t\tif (this.props.errors) {\n\t\t\tif (Array.isArray(this.props.errors)) {\n\t\t\t\treturn this.error\n\t\t\t\t\t? [this.error, ...this.props.errors]\n\t\t\t\t\t: this.props.errors;\n\t\t\t}\n\t\t\treturn this.error\n\t\t\t\t? [this.error, this.props.errors]\n\t\t\t\t: this.props.errors;\n\t\t}\n\t\treturn this.error;\n\t}\n\n\tpublic render() {\n\t\tconst modelValue = this.props.model[this.props.modelProperty];\n\t\tconst stringValue = this.model.number;\n\n\t\tlet modelProps;\n\t\tif (\n\t\t\tmodelValue === Number(stringValue) ||\n\t\t\t(modelValue === undefined && stringValue === '-')\n\t\t) {\n\t\t\tmodelProps = {\n\t\t\t\tmodel: this.model,\n\t\t\t\tmodelProperty: 'number',\n\t\t\t}\n\t\t} else {\n\t\t\tmodelProps = {\n\t\t\t\tmodel: this.props.model,\n\t\t\t\tmodelProperty: this.props.modelProperty,\n\t\t\t}\n\t\t}\n\n\t\treturn ;\n\t}\n\n\t@action\n\tprivate onChange = (event: React.ChangeEvent) => {\n\t\tconst textValue = event.target.value.trim();\n\t\tconst numberValue = Number(textValue);\n\n\t\t// Check if the input is actually a number\n\t\tif (isNaN(numberValue) && textValue !== '-') {\n\t\t\tthis.error = errorMessage;\n\t\t\treturn;\n\t\t}\n\n\t\t// If this input only accepts whole numbers, check that next\n\t\tif(this.props.acceptWholeNumbersOnly && textValue.includes('.')) {\n\t\t\tthis.error = notWholeNumberErrorMessage;\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear errors since we know we have a real number\n\t\tthis.error = undefined;\n\n\t\t// Assign the correct text value\n\t\tif (textValue === '' || textValue === '-') {\n\t\t\tthis.props.model[this.props.modelProperty] = undefined;\n\t\t} else {\n\t\t\tthis.props.model[this.props.modelProperty] = numberValue;\n\t\t}\n\t\tthis.model.number = textValue;\n\n\t\tif (this.props.onAfterChange) {\n\t\t\tthis.props.onAfterChange(event);\n\t\t}\n\t}\n\n\t@action\n\tprivate onClickToClear = (event: React.MouseEvent) => {\n\t\tif (this.props.onClickToClear) {\n\t\t\treturn this.props.onClickToClear(event);\n\t\t}\n\t\tthis.props.model[this.props.modelProperty] = '';\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { observable, action, computed } from 'mobx';\nimport classNames from 'classnames';\nimport { Button, Display } from '../Button/Button';\n\nexport interface ITabConfig {\n\tname: string,\n\tcomponent: React.ReactNode,\n\tkey: string,\n\tclassName?: string\n};\n\nexport interface ITabsProps {\n\ttabs: Array;\n\tclassName?: string;\n\tinnerProps?: React.DetailedHTMLProps, HTMLElement>;\n\tdefaultTab?: number;\n\tcurrentTab?: number;\n\tonTabClicked?: (tabIndex: number, event: React.MouseEvent) => void;\n}\n\ninterface ITabHeaderProps {\n\ttabState: { currentTab: number };\n\ttabIdx: number;\n\ttabChanged?: (() => void);\n\tonTabClicked?: (tabIndex: number, event: React.MouseEvent) => void;\n}\n\nclass TabHeader extends React.Component {\n\tpublic render() {\n\t\treturn ;\n\t}\n\n\t@action\n\tprivate onTabClicked = (event: React.MouseEvent) => {\n\t\tif(this.props.tabState.currentTab !== this.props.tabIdx && this.props.tabChanged){\n\t\t\tthis.props.tabChanged();\n\t\t}\n\t\tthis.props.tabState.currentTab = this.props.tabIdx;\n\t\tif (this.props.onTabClicked) {\n\t\t\tthis.props.onTabClicked(this.props.tabIdx, event);\n\t\t}\n\t}\n}\n\n@observer\nexport default class Tabs extends React.Component {\n\t@observable\n\tpublic tabState = {\n\t\tcurrentTab: 0,\n\t};\n\n\t@computed\n\tpublic get currentTab() {\n\t\treturn this.props.currentTab || this.tabState.currentTab;\n\t}\n\tconstructor(props: ITabsProps, context: any) {\n\t\tsuper(props, context);\n\t\tif (this.props.defaultTab) {\n\t\t\tthis.tabState.currentTab = this.props.defaultTab;\n\t\t}\n\t}\n\n\tpublic render(){\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t{this.props.tabs[this.currentTab].component}\n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { TextField } from 'Views/Components/TextBox/TextBox';\nimport { DisplayType } from 'Views/Components/Models/Enums';\nimport { RadioButtonGroup } from 'Views/Components/RadioButton/RadioButtonGroup';\nimport { observable, runInAction } from 'mobx';\nimport { Checkbox } from 'Views/Components/Checkbox/Checkbox';\nimport { TextArea } from 'Views/Components/TextArea/TextArea';\nimport { DatePicker } from 'Views/Components/DatePicker/DatePicker';\nimport { DateRangePicker } from 'Views/Components/DateRangePicker/DateRangePicker';\nimport { DateTimePicker } from 'Views/Components/DateTimePicker/DateTimePicker';\nimport { DateTimeRangePicker } from 'Views/Components/DateTimeRangePicker/DateTimeRangePicker';\nimport { TimePicker } from 'Views/Components/TimePicker/TimePicker';\nimport { Combobox } from 'Views/Components/Combobox/Combobox';\nimport { MultiCombobox } from 'Views/Components/Combobox/MultiCombobox';\nimport { CheckboxGroup } from 'Views/Components/Checkbox/CheckboxGroup';\nimport Collection from 'Views/Components/Collection/Collection';\nimport { Breadcrumbs } from 'Views/Components/Breadcrumbs/Breadcrumbs';\nimport { ContextMenu } from 'Views/Components/ContextMenu/ContextMenu';\nimport { contextMenu } from 'react-contexify';\nimport { ButtonGroup, Alignment, Sizing } from 'Views/Components/Button/ButtonGroup';\nimport Modal from 'Views/Components/Modal/Modal';\nimport { confirmModal, alertModal } from 'Views/Components/Modal/ModalUtils';\nimport alert from 'Util/ToastifyUtils';\nimport { NumberTextField } from 'Views/Components/NumberTextBox/NumberTextBox';\nimport Tabs from 'Views/Components/Tabs/Tabs';\nimport { Button, Colors, Display, Sizes } from 'Views/Components/Button/Button';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport interface StyleguidePageProps extends RouteComponentProps {\n\t// % protected region % [Add any extra props here] off begin\n\t// % protected region % [Add any extra props here] end\n}\n\n@observer\n// % protected region % [Add any customisations to default class definition here] off begin\nclass StyleguidePage extends React.Component {\n// % protected region % [Add any customisations to default class definition here] end\n\n\t@observable\n\tprivate model = {\n\t\temail: 'admin@example.com',\n\t\tdate: new Date(),\n\t\trange: [new Date(), new Date()],\n\t};\n\t@observable\n\tprivate modelEmpty = {};\n\t@observable\n\tprivate collectionSearch = '';\n\t@observable\n\tprivate collectionData = [\n\t\t{ id: \"1\", title: \"Hello 1\", description: \"world 1\" },\n\t\t{ id: \"2\", title: \"Hello 2\", description: \"world 2\" },\n\t\t{ id: \"3\", title: \"Hello 3\", description: \"world 3\" },\n\t\t{ id: \"4\", title: \"Hello 4\", description: \"world 4\" },\n\t\t{ id: \"5\", title: \"Hello 5\", description: \"world 5\" },\n\t];\n\t@observable\n\tprivate modalState = {\n\t\tfirstOpen: false,\n\t};\n\n\t// % protected region % [Add class properties here] off begin\n\t// % protected region % [Add class properties here] end\n\n\trender() {\n\n\t\t// % protected region % [Add logic before rendering contents here] off begin\n\t\t// % protected region % [Add logic before rendering contents here] end\n\n\t\tlet contents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Headings

    \n\t\t\t\t\t\t

    Heading 1

    \n\t\t\t\t\t\t

    Heading 2

    \n\t\t\t\t\t\t

    Heading 3

    \n\t\t\t\t\t\t

    Heading 4

    \n\t\t\t\t\t\t
    Heading 5
    \n\t\t\t\t\t\t
    Heading 6
    \n\n\n\n\t\t\t\t\t\t

    Text Tags

    \n\t\t\t\t\t\t

    Just the regular old body text within the application. Just the regular old body text within the application. Just the regular old body text within the application. Just the regular old body text within the application. Just the regular old body text within the application. Just the regular old body text within the application. Just the regular old body text within the application.

    \n\t\t\t\t\t\t

    The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application. The smaller body text within the application.

    \n\t\t\t\t\t\t

    The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application. The larger body text within the application.

    \n\t\t\t\t\t\t

    The text which will be italics within the application. The text which will be italics within the application. The text which will be italics within the application. The text which will be italics within the application. The text which will be italics within the application. The text which will be italics within the application. The text which will be italics within the application.

    \n\t\t\t\t\t\t

    The text which will be bold within the application. The text which will be bold within the application. The text which will be bold within the application. The text which will be bold within the application. The text which will be bold within the application. The text which will be bold within the application. The text which will be bold within the application.

    \n\n\t\t\t\t\t\t

    Lists

    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    1. Ordered Item
    2. \n\t\t\t\t\t\t\t
    3. Ordered Item
    4. \n\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t
      • Unordered Item
      • \n\t\t\t\t\t\t\t\t
      • Unordered Item
      • \n\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    5. Ordered Item
    6. \n\t\t\t\t\t\t\t
    7. Ordered Item\n\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t
      1. Ordered Item
      2. \n\t\t\t\t\t\t\t\t\t
      3. Ordered Item
      4. \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    8. \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • Unordered Item
    • \n\t\t\t\t\t\t\t
    • Unordered Item
    • \n\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t
      • Unordered Item
      • \n\t\t\t\t\t\t\t\t
      • Unordered Item
      • \n\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • Unordered Item
    • \n\t\t\t\t\t\t\t
    • Unordered Item
    • \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • Unstyled Item
    • \n\t\t\t\t\t\t\t
    • Unstyled Item
    • \n\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t
      • Indented Unstyled Item
      • \n\t\t\t\t\t\t\t\t
      • Indented Unstyled Item
      • \n\t\t\t\t\t\t\t\t
      • Indented Unstyled Item
      • \n\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • Unstyled Item
    • \n\t\t\t\t\t\t\t
    • Unstyled Item
    • \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t

    Links

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tSmall Link\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tMedium Link\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tLarge Link\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tItalics Link\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tBold Link\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tNo Style Link\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t

    Text Field

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    TextArea

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Dropdown

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Radio Buttons

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Checkbox

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Date Picker

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Date Range Picker

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Date-Time Picker

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Date-Time Range Picker

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Time Picker

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Input Validation

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Buttons

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Colours

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Outline Colours

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Text Colours

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Sizes

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Icons

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Button Groups

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Collection

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Collection with context menu

    \n\t\t\t\t\t\t { console.log(entity) } },\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgroupName: \"group1\", actions: [\n\t\t\t\t\t\t\t\t\t\t{ label: 'aaaa', icon: 'edit', iconPos: 'icon-left', onEntityClick: (event, entity) => { console.log(entity) } },\n\t\t\t\t\t\t\t\t\t\t{ customItem: 'bbbb', onEntityClick: (event, entity) => { console.log(entity) } },\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tgroupName: \"group11\", actions: [\n\t\t\t\t\t\t\t\t\t\t\t\t{ label: 'aaaa', icon: 'edit', iconPos: 'icon-left', onEntityClick: (event, entity) => { console.log(entity) } },\n\t\t\t\t\t\t\t\t\t\t\t\t{ customItem: 'bbbb', onEntityClick: (event, entity) => { console.log(entity) } }\n\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{ customItem: 'bbbb', onEntityClick: (event, entity) => { console.log(entity) } }\n\t\t\t\t\t\t\t]} />\n\n\t\t\t\t\t\t

    Searchable Collection

    \n\t\t\t\t\t\t this.collectionSearch.trim()\n\t\t\t\t\t\t\t\t\t? model.id === this.collectionSearch.trim()\n\t\t\t\t\t\t\t\t\t: true)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tselectableItems={true}\n\t\t\t\t\t\t\tonSearchTriggered={searchTerm => runInAction(() => this.collectionSearch = searchTerm)}\n\t\t\t\t\t\t\tidColumn=\"id\"\n\t\t\t\t\t\t\theaders={[\n\t\t\t\t\t\t\t\t{ displayName: \"id\", name: \"id\" },\n\t\t\t\t\t\t\t\t{ displayName: \"title\", name: \"title\" },\n\t\t\t\t\t\t\t\t{ displayName: \"description\", name: \"description\" },\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\tactions={[\n\t\t\t\t\t\t\t\t{ label: 'Alert', action: model => alert(`Model ${model.id} alerted`) }\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\texpandList={model => \"id: \" + model.id + \" | title: \" + model.title + \" | description: \" + model.description} />\n\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

    Modals & Alerts

    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t runInAction(() => this.modalState.firstOpen = false)}>\n\t\t\t\t\t\t\t\t

    This is some modal content

    \n\t\t\t\t\t\t\t\t

    This is a paragraph!!!

    \n\t\t\t\t\t\t\t\tWow, an {''} tag\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t alert(\"Clicked\") },\n\t\t\t\t\t\t\t\t\t{ label: \"ohh\", onClick: () => alert(\"Clicked Again\") },\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgroupName: \"Wow\", arrow: 'ramp', actions: [\n\t\t\t\t\t\t\t\t\t\t\t{ label: 'A sub item', onClick: () => alert(\"Clicked Again 1\") },\n\t\t\t\t\t\t\t\t\t\t\t{ label: 'Another sub item', onClick: () => alert(\"Clicked Again 2\") }\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t

    Breadcrumbs

    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\n\t\t// % protected region % [Override contents here] off begin\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn contents;\n\t}\n}\n\n// % protected region % [Override export here] off begin\nexport default StyleguidePage;\n// % protected region % [Override export here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport SearchForm from \"../../Views/Components/SearchForm/SearchForm\";\nimport {Alignment, ButtonGroup} from 'Views/Components/Button/ButtonGroup';\nimport {Button, Display, Colors} from 'Views/Components/Button/Button';\nimport {action, observable, runInAction} from \"mobx\";\nimport {MultiCombobox} from 'Views/Components/Combobox/MultiCombobox';\nimport AwesomeDebouncePromise from \"awesome-debounce-promise\";\nimport {DatePicker} from 'Views/Components/DatePicker/DatePicker';\nimport {observer} from \"mobx-react\";\nimport {Combobox} from 'Views/Components/Combobox/Combobox';\nimport {getFetchAllConditional, getModelDisplayName, getModelName} from 'Util/EntityUtils';\nimport {dropdownData} from 'Views/Components/CRUD/Attributes/AttributeReferenceMultiCombobox';\nimport {store} from 'Models/Store';\nimport {lowerCaseFirst} from 'Util/StringUtils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { getTimelineActionOptions, getTimelineEntityFromName, TimelineEntities } from 'Util/TimelineUtils';\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport _ from 'lodash';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\ninterface ITimelineTopBarProps {\n\t// % protected region % [Override ITimelineTopBarProps here] off begin\n\ttimelineFilter: ITimelineFilter\n\t// % protected region % [Override ITimelineTopBarProps here] end\n}\n\n@observer\nexport default class TimelineTopBar extends React.Component {\n\t@observable\n\tprivate timelineFilterClone: ITimelineFilter = cloneDeep(this.props.timelineFilter);\n\t@observable\n\tprivate showAdvancedFilters = false;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\t@observable\n\tprivate timelineEntityConfiguration = {\n\t\t// % protected region % [Override timelineEntityConfiguration here] off begin\n\t\tselectedTimelineEntityName: getModelDisplayName(this.props.timelineFilter.selectedTimelineEntity)\n\t\t// % protected region % [Override timelineEntityConfiguration here] end\n\t};\n\n\tprivate fetchInstanceOptions = (queryString: string | string[]): Promise => {\n\t\t// % protected region % [Override fetchInstanceOptions here] off begin\n\t\tconst modelName = getModelName(this.timelineFilterClone.selectedTimelineEntity);\n\t\tconst searchConditions = (new this.timelineFilterClone.selectedTimelineEntity()).getSearchConditions(!Array.isArray(queryString) ? queryString : '');\n\t\treturn store.apolloClient\n\t\t\t.query({\n\t\t\t\tquery: getFetchAllConditional(this.timelineFilterClone.selectedTimelineEntity),\n\t\t\t\tvariables: { args: searchConditions, take: 10 },\n\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t})\n\t\t\t.then((data) => {\n\t\t\t\tconst associatedObjects: any[] = data.data[`${lowerCaseFirst(modelName)}s`];\n\t\t\t\tlet comboOptions: dropdownData = [];\n\t\t\t\tif (associatedObjects) {\n\t\t\t\t\tassociatedObjects.map(obj => new this.timelineFilterClone.selectedTimelineEntity(obj))\n\t\t\t\t\t\t.map(obj => comboOptions.push({ display: obj.getDisplayName(), value: obj.id }));\n\t\t\t\t}\n\t\t\t\tthis.timelineFilterClone.instanceIds.forEach(id => {\n\t\t\t\t\tif (!comboOptions.some(option => option.value === id)){\n\t\t\t\t\t\tcomboOptions.push({display: id, value: id})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn comboOptions;\n\t\t\t});\n\t\t// % protected region % [Override fetchInstanceOptions here] end\n\t};\n\t@action\n\tprivate onApplyFilter = () => {\n\t\t// % protected region % [Override onApplyFilter here] off begin\n\t\tthis.props.timelineFilter.searchTerm = this.timelineFilterClone.searchTerm;\n\t\tthis.props.timelineFilter.instanceIds = this.timelineFilterClone.instanceIds;\n\t\tthis.props.timelineFilter.selectedActionTypes = this.timelineFilterClone.selectedActionTypes;\n\t\tthis.props.timelineFilter.startDate = this.timelineFilterClone.startDate;\n\t\tthis.props.timelineFilter.endDate = this.timelineFilterClone.endDate;\n\t\tthis.props.timelineFilter.selectedTimelineEntity = this.timelineFilterClone.selectedTimelineEntity;\n\t\tthis.props.timelineFilter.actionTypeOptions = this.timelineFilterClone.actionTypeOptions;\n\t\tthis.timelineFilterClone = cloneDeep(this.props.timelineFilter);\n\t\t// % protected region % [Override onApplyFilter here] end\n\t};\n\n\t@action\n\tprivate onClearFilter = () => {\n\t\t// % protected region % [Override onClearFilter here] off begin\n\t\tthis.props.timelineFilter.instanceIds = [];\n\t\tthis.props.timelineFilter.selectedActionTypes = [];\n\t\tthis.props.timelineFilter.startDate = undefined;\n\t\tthis.props.timelineFilter.endDate = undefined;\n\t\tthis.timelineFilterClone = cloneDeep(this.props.timelineFilter);\n\t\t// % protected region % [Override onClearFilter here] end\n\t};\n\t@action\n\tprivate onChangeEntity = () => {\n\t\t// % protected region % [Override onChangeEntity here] off begin\n\t\tconst entity = getTimelineEntityFromName(this.timelineEntityConfiguration.selectedTimelineEntityName);\n\t\tif (entity) {\n\t\t\tthis.timelineFilterClone.selectedTimelineEntity = entity;\n\t\t}\n\t\tthis.timelineFilterClone.instanceIds = [];\n\t\tthis.timelineFilterClone.selectedActionTypes = [];\n\t\tgetTimelineActionOptions(this.timelineFilterClone.selectedTimelineEntity)\n\t\t\t.then(options => runInAction(() => this.timelineFilterClone.actionTypeOptions = options))\n\t\t// % protected region % [Override onChangeEntity here] end\n\t};\n\tprivate getAdvancedFilters = () => {\n\t\t// % protected region % [Override getAdvancedFilters here] off begin\n\t\tif (! this.showAdvancedFilters) {\n\t\t\treturn null;\n\t\t}\n\t\tlet entityOptionsDropDown = null;\n\n\t\t// Display entity selector if more than 1 option or explicitly specified\n\t\tif (this.timelineFilterClone.timelineEntityOptions \n\t\t\t\t&& (this.timelineFilterClone.timelineEntityOptions.length > 1 \n\t\t\t\t|| this.timelineFilterClone.canChangeTimelineEntity === true)) {\n\t\t\tentityOptionsDropDown = (\n\t\t\t\t {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tdisplay: getModelDisplayName(x),\n\t\t\t\t\t\t\tvalue: getModelDisplayName(x)\n\t\t\t\t\t\t}\n\t\t\t\t\t})}\n\t\t\t\t\tonAfterChange={this.onChangeEntity}\n\t\t\t\t\tmodelProperty={'selectedTimelineEntityName'}/>\n\t\t\t)\n\t\t}\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{entityOptionsDropDown}\n\t\t\t\t x === this.timelineFilterClone.selectedTimelineEntity)}\n\t\t\t\t\tinitialOptions={() => this.fetchInstanceOptions('')}\n\t\t\t\t\tmodel={this.timelineFilterClone}\n\t\t\t\t\tmodelProperty={'instanceIds'}\n\t\t\t\t\toptions={AwesomeDebouncePromise(this.fetchInstanceOptions, 500)}\n\t\t\t\t\tlabel=\"Instances\"\n\t\t\t\t\tlabel-visible=\"true\" />\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t {return {display: x, value: x}})}\n\t\t\t\t\tlabel=\"Type of change\"\n\t\t\t\t\tlabel-visible=\"true\" />\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tClear Filters\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tApply Filters\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override getAdvancedFilters here] end\n\t};\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
    \n\t\t\t\t\t

    Timelines

    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t this.showAdvancedFilters = !this.showAdvancedFilters)}\n\t\t\t\t\t\t\ticon={{ icon: \"filter\", iconPos: \"icon-top\" }}\n\t\t\t\t\t\t\tcolors={Colors.Primary}\n\t\t\t\t\t\t\tdisplay={Display.Solid}>\n\t\t\t\t\t\t\tFilter\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t{this.showAdvancedFilters ? this.getAdvancedFilters() : null}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {\n\tCompareDateString,\n\tGetTimelineGroupDateDisplay,\n\tGroupEventsByDate,\n\tSortEvents,\n\tTimelineEvent\n} from 'Util/TimelineUtils';\nimport moment from \"moment\";\nimport {Waypoint} from \"react-waypoint\";\nimport {RefObject} from \"react\";\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IListViewComponentProps {\n\t// % protected region % [Override IListViewComponentProps here] off begin\n\ttimelineEvents: Array\n\tonScrollToExtreme :(waypoint: Waypoint.CallbackArgs, date: Date, extremity: 'Bottom' | 'Top') => void;\n\tonClickViewItem: (id: string) => void;\n\tscrollSectionRef: RefObject;\n\teventComponentsRefs: Array>;\n\tlistHeadingRefs: Array>;\n\t// % protected region % [Override IListViewComponentProps here] end\n}\n\nexport default class ListViewItems extends React.Component {\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tpublic render() {\n\n\t\tconst dateGroupedEvents = GroupEventsByDate(this.props.timelineEvents);\n\t\tconst dateGroupKeys = Object.keys(dateGroupedEvents);\n\t\tlet counter = 0;\n\n\t\t// % protected region % [Override render eventComponent here] off begin\n\t\tconst eventComponent = (event: TimelineEvent, index: number) => {\n\t\t\treturn (\n\t\t\t\t this.props.onClickViewItem(event.entityId)}\n\t\t\t\t\tclassName = \"list-view__topic\"\n\t\t\t\t\tkey={index}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    {event.actionTitle}
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{moment(event.created).format('DD/MM/YYYY hh:mm:ss A')}\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t

    {event.description}

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t)\n\t\t};\n\t\t// % protected region % [Override render eventComponent here] end\n\n\t\t// % protected region % [Override render return here] off begin\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
      \n\t\t\t\t\t{dateGroupKeys.sort(CompareDateString).map((date, key) =>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

      \n\t\t\t\t\t\t\t\t{GetTimelineGroupDateDisplay(moment(date).toDate())}\n\t\t\t\t\t\t\t

      \n\t\t\t\t\t\t\t{dateGroupedEvents[date].sort(SortEvents).map((event, index) => {\n\t\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t\t\tif (counter === 1 || counter === this.props.timelineEvents.length){\n\t\t\t\t\t\t\t\t\t\tconst position = counter === 1? 'Top' : 'Bottom';\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.onScrollToExtreme(waypoint, event.created, position)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{eventComponent(event, index)}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn eventComponent(event, index)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
      \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override render return here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {\n\tgetQuickJumpConditional, getTimelineEventEntity,\n\tgetTimelineQueryWhereConditions, GroupEventsByDate, QuickJumpConditionalResult,\n\tSortEvents, TimelineEvent\n} from 'Util/TimelineUtils';\nimport moment, {Moment} from \"moment\";\nimport {Waypoint} from \"react-waypoint\";\nimport {RefObject} from \"react\";\nimport {createRef} from \"react\";\nimport { action, IReactionDisposer, observable, reaction} from \"mobx\";\nimport {getFetchAllConditional, getModelName} from 'Util/EntityUtils';\nimport {store} from 'Models/Store';\nimport {lowerCaseFirst} from 'Util/StringUtils';\nimport {RouteComponentProps} from \"react-router\";\nimport ListViewItems from \"./ListViewItems\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport _ from \"lodash\";\nimport {observer} from \"mobx-react\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport Spinner from 'Views/Components/Spinner/Spinner';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IListViewListProps {\n\t// % protected region % [Override IListViewListProps here] off begin\n\ttimelineFilter: ITimelineFilter;\n\tquickJumpDate: Moment | undefined;\n\tonClickViewItem?: (entity: string, id: string) => void;\n\t// % protected region % [Override IListViewListProps here] end\n}\n\ninterface ScrollCorrectionSettings {\n\t// % protected region % [Override ScrollCorrectionSettings here] off begin\n\tdoScrollCorrection: boolean;\n\tscrollHeightOffset: number;\n\ttargetEventIndex: number | undefined;\n\tscrollCorrectionType: 'Quick-Jump' | 'Load-More' | undefined;\n\t// % protected region % [Override ScrollCorrectionSettings here] end\n}\n\n@observer\nexport default class ListViewList extends React.Component {\n\n\t@observable\n\tprivate timelineEvents: Array = [];\n\n\t@observable\n\tprivate loadingState: 'Loading' | 'Done' | 'Error' = 'Done';\n\n\tprivate orderBy = [{ descending: true, path: 'Created' }];\n\n\tprivate scrollSectionRef: RefObject = createRef();\n\tprivate eventComponentsRefs: Array> = [];\n\tprivate listHeadingRefs: Array> = [];\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tprivate scrollCorrectionSettings: ScrollCorrectionSettings = {\n\t\t// % protected region % [Override scrollCorrectionSettings here] off begin\n\t\tdoScrollCorrection: false,\n\t\tscrollHeightOffset: 0,\n\t\ttargetEventIndex: undefined,\n\t\tscrollCorrectionType: undefined\n\t\t// % protected region % [Override scrollCorrectionSettings here] end\n\t};\n\n\tprivate readonly disposerQuickJump : IReactionDisposer;\n\tprivate readonly disposerFilter : IReactionDisposer;\n\n\tconstructor(props: IListViewListProps & RouteComponentProps) {\n\t\t// % protected region % [Override constructor here] off begin\n\t\tsuper(props);\n\t\tthis.updateComponent();\n\t\tthis.disposerQuickJump = reaction(() => this.props.quickJumpDate, this.updateComponent);\n\t\tthis.disposerFilter = reaction(() => ({...this.props.timelineFilter}), this.updateComponent);\n\t\t// % protected region % [Override constructor here] end\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\t// % protected region % [Override componentWillUnmount here] off begin\n\t\tthis.disposerQuickJump();\n\t\tthis.disposerFilter();\n\t\t// % protected region % [Override componentWillUnmount here] end\n\t}\n\n\tprivate updateComponent = () => {\n\t\t// % protected region % [Override updateComponent here] off begin\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn;\n\t\t}\n\t\tthis.onQuickJump(this.props.quickJumpDate);\n\t\t// % protected region % [Override updateComponent here] end\n\t};\n\n\tcomponentDidUpdate(): void {\n\t\t// % protected region % [Override componentDidUpdate here] off begin\n\t\tif (this.scrollCorrectionSettings.doScrollCorrection) {\n\t\t\tthis.doScrollCorrection()\n\t\t}\n\t\t// % protected region % [Override componentDidUpdate here] end\n\t}\n\n\t/**\n\t * Will run scroll correction after quick-jumping or infinite scrolling upwards\n\t */\n\tprivate doScrollCorrection = () => {\n\t\t// % protected region % [Override doScrollCorrection here] off begin\n\t\tconst scrollOffset = this.calculateScrollTotalOffset();\n\t\tthis.scrollSectionRef.current?.scrollTo(0, scrollOffset);\n\t\tthis.scrollCorrectionSettings = {\n\t\t\tdoScrollCorrection: false,\n\t\t\tscrollHeightOffset: 0,\n\t\t\ttargetEventIndex: undefined,\n\t\t\tscrollCorrectionType: undefined,\n\t\t}\n\t\t// % protected region % [Override doScrollCorrection here] end\n\t};\n\n\t/**\n\t * Calculates in pixes how far to scroll to focus on an event. Is used when quick-jumping in the list view,\n\t * or infinite scrolling upwards.\n\t */\n\tprivate calculateScrollTotalOffset = (): number => {\n\t\t// % protected region % [Override calculateScrollTotalOffset here] off begin\n\t\tconst orderedTimelineEvents = this.timelineEvents.slice().sort(SortEvents);\n\n\t\tconst eventsAboveTarget = _.slice(orderedTimelineEvents, 0 , this.scrollCorrectionSettings.targetEventIndex);\n\t\tconst dateGroupedEventsAboveTarget = GroupEventsByDate(eventsAboveTarget);\n\t\tconst dateGroupKeys = Object.keys(dateGroupedEventsAboveTarget);\n\n\t\t// height of all the list entries/events shown in the scroll view above the target event/entry\n\t\tlet eventsAboveTargetTotalHeight = _.chain(this.eventComponentsRefs)\n\t\t\t.slice(0, eventsAboveTarget.length)\n\t\t\t.map(x => x.current?.getBoundingClientRect().height)\n\t\t\t.sum()\n\t\t\t.value();\n\n\t\t// quick jump should quick jump to the date heading, whereas scroll up/ load more\n\t\t// is not focused on headings.\n\t\tlet numHeadingsAbove = dateGroupKeys.length;\n\n\t\tif (this.scrollCorrectionSettings.scrollCorrectionType === 'Quick-Jump'){\n\t\t\tnumHeadingsAbove += 1;\n\t\t}\n\n\t\t// sum the heights of all the headings, but only include margin for the last heading.\n\t\tlet headingsAboveTargetTotalHeight = _.chain(this.listHeadingRefs)\n\t\t\t.slice(0, numHeadingsAbove)\n\t\t\t.map((x, index) => {\n\t\t\t\tlet marginHeight = 0;\n\t\t\t\tif (x.current) {\n\t\t\t\t\tmarginHeight =Number(window.getComputedStyle(x.current)['marginTop'].replace('px', ''))\n\t\t\t\t}\n\t\t\t\tif (index === numHeadingsAbove - 1){\n\t\t\t\t\treturn marginHeight;\n\t\t\t\t}\n\t\t\t\treturn x.current? x.current.getBoundingClientRect().height + marginHeight : 0;\n\t\t\t})\n\t\t\t.sum()\n\t\t\t.valueOf();\n\n\t\treturn eventsAboveTargetTotalHeight + headingsAboveTargetTotalHeight + this.scrollCorrectionSettings.scrollHeightOffset;\n\t\t// % protected region % [Override calculateScrollTotalOffset here] end\n\t};\n\n\t/**\n\t * Called when a quick jump item has been selected.\n\t */\n\t @action\n\tprivate onQuickJump = (option: Moment | undefined) => {\n\t\t// % protected region % [Override onQuickJump here] off begin\n\t\tthis.loadingState = 'Loading';\n\t\tif ( !option ) {\n\t\t\tthis.quickJumpBackToTop()\n\t\t} else {\n\t\t\tthis.quickJumpToDate(option);\n\t\t}\n\t\t// % protected region % [Override onQuickJump here] end\n\t};\n\n\t/**\n\t * Executes a quick jump to the top of the list\n\t */\n\tprivate quickJumpBackToTop = () => {\n\t\t// % protected region % [Override quickJumpBackToTop here] off begin\n\t\tconst filter = cloneDeep(this.props.timelineFilter);\n\t\tfilter.endDate = undefined;\n\t\tthis.fetchEvents(filter)\n\t\t\t?.then(action((events) => {\n\t\t\t\tthis.timelineEvents = events;\n\t\t\t\tthis.loadingState = 'Done';\n\t\t\t\tthis.scrollCorrectionSettings = {\n\t\t\t\t\tdoScrollCorrection: true,\n\t\t\t\t\tscrollHeightOffset: 0,\n\t\t\t\t\ttargetEventIndex: 0,\n\t\t\t\t\tscrollCorrectionType: 'Quick-Jump',\n\t\t\t\t};\n\t\t\t}));\n\t\t// % protected region % [Override quickJumpBackToTop here] end\n\t};\n\n\tprivate getQuickJumpTargetEvents = (date: Moment): Promise> | undefined => {\n\t\t// % protected region % [Override getQuickJumpTargetEvents here] off begin\n\t\tconst eventEntityModel = getTimelineEventEntity(this.props.timelineFilter.selectedTimelineEntity);\n\t\tconst filter = cloneDeep(this.props.timelineFilter);\n\t\tfilter.startDate = date.toDate();\n\t\tconst searchConditions = getTimelineQueryWhereConditions(filter);\n\t\tif (eventEntityModel) {\n\t\t\tconst eventEntityName = getModelName(eventEntityModel);\n\t\t\treturn store.apolloClient\n\t\t\t\t.query({\n\t\t\t\t\tquery: getFetchAllConditional(eventEntityModel),\n\t\t\t\t\tvariables: { args: searchConditions, take: 1, orderBy: [{ descending: false, path: 'Created' }] },\n\t\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t\t})\n\t\t\t\t.then((data) => {\n\t\t\t\t\treturn data.data[`${lowerCaseFirst(eventEntityName)}s`];\n\t\t\t\t})\n\t\t\t\t.catch(action(() => this.loadingState = 'Error' ));\n\t\t}\n\t\treturn undefined;\n\t\t// % protected region % [Override getQuickJumpTargetEvents here] end\n\t};\n\n\tprivate quickJumpToDate = (date: Moment) => {\n\t\t// % protected region % [Override quickJumpToDate here] off begin\n\t\tthis.getQuickJumpTargetEvents(date)?.then(action((events) => {\n\t\t\tif (events.length === 0){\n\t\t\t\tthis.loadingState = 'Done';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.sendQuickJumpQuery(moment(events[0].created).endOf('day'))\n\t\t}))\n\t\t// % protected region % [Override quickJumpToDate here] end\n\t};\n\n\t/**\n\t * Fetches events for a given quick-jump date\n\t */\n\tprivate sendQuickJumpQuery = (date: Moment) => {\n\t\t// % protected region % [Override sendQuickJumpQuery here] off begin\n\t\tconst preDateFilter = cloneDeep(this.props.timelineFilter);\n\t\tpreDateFilter.endDate = date.toDate();\n\t\tconst preDateSearchConditions = getTimelineQueryWhereConditions(preDateFilter);\n\n\t\tconst postDateFilter = cloneDeep(this.props.timelineFilter);\n\t\tpostDateFilter.startDate = date.toDate();\n\t\tconst postDateSearchConditions = getTimelineQueryWhereConditions(postDateFilter);\n\n\t\tconst eventEntityModel = getTimelineEventEntity(this.props.timelineFilter.selectedTimelineEntity);\n\n\t\tif (eventEntityModel) {\n\t\t\tstore.apolloClient\n\t\t\t\t.query({\n\t\t\t\t\tquery: getQuickJumpConditional(eventEntityModel),\n\t\t\t\t\tvariables: {\n\t\t\t\t\t\targsPre: preDateSearchConditions,\n\t\t\t\t\t\targsPost: postDateSearchConditions,\n\t\t\t\t\t\ttake: 10,\n\t\t\t\t\t\torderByPre: [{ descending: true, path: 'Created' }],\n\t\t\t\t\t\torderByPost: [{ descending: false, path: 'Created' }],\n\t\t\t\t\t},\n\t\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t\t})\n\t\t\t\t.then(action((data) => {\n\t\t\t\t\tthis.loadingState = 'Done';\n\t\t\t\t\tthis.processQuickJumpEventQueryResults(data.data);\n\t\t\t\t}))\n\t\t\t\t.catch(action(() => this.loadingState = 'Error' ));\n\t\t}\n\t\t// % protected region % [Override sendQuickJumpQuery here] end\n\t};\n\n\t/*\n\t* Updates component state with new events and sets up a scroll correction event\n\t* */\n\t@action\n\tprivate processQuickJumpEventQueryResults = (preAndPostEvents : QuickJumpConditionalResult) => {\n\t\t// % protected region % [Override processQuickJumpEventQueryResults here] off begin\n\t\tconst preEvents = preAndPostEvents.eventsPre;\n\t\tconst postEvents = preAndPostEvents.eventsPost;\n\t\tthis.loadingState = 'Done';\n\t\tthis.timelineEvents = _.uniqBy(preEvents.concat(postEvents), 'id');\n\t\tif (postEvents.length > 0){\n\n\t\t\t// we want to quick jump to the first entry for the date, not the last\n\t\t\tthis.scrollCorrectionSettings = {\n\t\t\t\tdoScrollCorrection: true,\n\t\t\t\tscrollHeightOffset: 0,\n\t\t\t\ttargetEventIndex: postEvents.length,\n\t\t\t\tscrollCorrectionType: 'Quick-Jump',\n\t\t\t}\n\t\t}\n\t\t// % protected region % [Override processQuickJumpEventQueryResults here] end\n\t};\n\n\t/**\n\t * Fetches timeline events from the server\n\t * @param timelineFilter a filter to apply to the fetch events query\n\t */\n\tprivate fetchEvents = (timelineFilter: ITimelineFilter): Promise> | undefined => {\n\t\t// % protected region % [Override fetchEvents here] off begin\n\t\tconst eventEntityModel = getTimelineEventEntity(timelineFilter.selectedTimelineEntity);\n\t\tconst searchConditions = getTimelineQueryWhereConditions(timelineFilter);\n\t\tif (eventEntityModel) {\n\t\t\tconst eventEntityName = getModelName(eventEntityModel);\n\t\t\treturn store.apolloClient\n\t\t\t\t.query({\n\t\t\t\t\tquery: getFetchAllConditional(eventEntityModel),\n\t\t\t\t\tvariables: { args: searchConditions, take: 10, orderBy: this.orderBy },\n\t\t\t\t\tfetchPolicy: 'network-only',\n\t\t\t\t})\n\t\t\t\t.then(action((data) => {\n\t\t\t\t\tthis.loadingState = 'Done';\n\t\t\t\t\treturn data.data[`${lowerCaseFirst(eventEntityName)}s`];\n\t\t\t\t}))\n\t\t\t\t.catch(action(() => this.loadingState = 'Error' ));\n\t\t}\n\t\treturn undefined;\n\t\t// % protected region % [Override fetchEvents here] end\n\t};\n\n\t/*\n\t* Called when a user has scrolled to the top or bottom of the list view\n\t* */\n\tprivate onScrollToExtreme = (waypoint: Waypoint.CallbackArgs, date: Date, extremity: 'Bottom' | 'Top') => {\n\t\t// % protected region % [Override onScrollToExtreme here] off begin\n\t\tif ((waypoint.currentPosition !== Waypoint.invisible)){\n\t\t\tconst timelineFilter = cloneDeep(this.props.timelineFilter);\n\t\t\tif (extremity === 'Bottom'){\n\t\t\t\ttimelineFilter.endDate = date;\n\t\t\t\tthis.fetchEvents(timelineFilter)?.then(events => this.processInfiniteScrollDownwardsResults(events));\n\t\t\t} else if (waypoint.previousPosition === Waypoint.above) {\n\t\t\t\ttimelineFilter.startDate = date;\n\t\t\t\tthis.orderBy = [{ descending: false, path: 'Created' }];\n\t\t\t\tthis.fetchEvents(timelineFilter)?.then(events => this.processInfiniteScrollUpwardsResults(events));\n\t\t\t}\n\t\t}\n\t\t// % protected region % [Override onScrollToExtreme here] end\n\t};\n\n\t/*\n\t* Adds more events to the current list of timeline events so user can scroll down further\n\t* */\n\t@action\n\tprivate processInfiniteScrollDownwardsResults = (events: TimelineEvent[]) => {\n\t\t// % protected region % [Override processInfiniteScrollDownwardsResults here] off begin\n\t\tthis.timelineEvents = _.uniqBy(this.timelineEvents.concat(events), 'id');\n\t\t// % protected region % [Override processInfiniteScrollDownwardsResults here] end\n\t};\n\n\t/*\n\t* Adds more events to the top of the list and set up a scroll correction event\n\t* */\n\t@action\n\tprivate processInfiniteScrollUpwardsResults = (events: TimelineEvent[]) => {\n\t\t// % protected region % [Override processInfiniteScrollUpwardsResults here] off begin\n\t\tif (events.length > 0){\n\t\t\tconst prevTimelineEvents = cloneDeep(this.timelineEvents);\n\t\t\tthis.orderBy = [{ descending: true, path: 'Created' }];\n\t\t\tthis.timelineEvents = _.uniqBy(this.timelineEvents.concat(events), 'id');\n\t\t\tthis.scrollCorrectionSettings = {\n\t\t\t\tdoScrollCorrection: true,\n\t\t\t\tscrollHeightOffset: (this.scrollSectionRef.current?.scrollTop ?? 0),\n\t\t\t\ttargetEventIndex: this.timelineEvents.length - prevTimelineEvents.length,\n\t\t\t\tscrollCorrectionType: \"Load-More\"\n\t\t\t};\n\t\t}\n\t\t// % protected region % [Override processInfiniteScrollUpwardsResults here] end\n\t};\n\n\tprivate onClickViewItem = (entity: string, id: string) => {\n\t\t// % protected region % [Override onClickViewItem here] off begin\n\t\tif (this.props.onClickViewItem) {\n\t\t\tthis.props.onClickViewItem(entity, id)\n\t\t}\n\t\t// % protected region % [Override onClickViewItem here] end\n\t};\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingState === 'Error'){\n\t\t\treturn 'Error';\n\t\t}\n\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn \n\t\t}\n\t\tthis.eventComponentsRefs = this.timelineEvents.map(event => createRef());\n\t\tthis.listHeadingRefs = Object.keys(GroupEventsByDate(this.timelineEvents)).map(key => createRef());\n\t\treturn (\n\t\t\t this.onClickViewItem(getModelName(this.props.timelineFilter.selectedTimelineEntity), id)}\n\t\t\t\tscrollSectionRef={this.scrollSectionRef}\n\t\t\t\teventComponentsRefs={this.eventComponentsRefs}\n\t\t\t\tlistHeadingRefs={this.listHeadingRefs} />\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {Button, Display, Colors} from 'Views/Components/Button/Button';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IListViewTopBarControlsProps {\n\t// % protected region % [Override IListViewTopBarControlsProps here] off begin\n\tonClick: () => void;\n\thideGraphViewButton?: boolean;\n\t// % protected region % [Override IListViewTopBarControlsProps here] end\n}\n\nexport default class ListViewTopBarControls extends React.Component {\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\t\tconst graphViewButton = (\n\t\t\t\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.props.hideGraphViewButton ? null : graphViewButton}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as queryString from 'querystring';\nimport { convertCaseComparisonToPascalCase } from 'Util/GraphQLUtils';\nimport { IWhereCondition, IWhereConditionApi } from 'Views/Components/ModelCollection/ModelQuery';\n\n/**\n * Handles the response from a javascript fetch call\n * @param response The response to handle\n * @returns the response as a json\n */\nexport function handleFetchedResponse(response: Response) {\n\tconst responseJson = response.json();\n\tif (!response.ok) {\n\t\treturn responseJson.then(Promise.reject.bind(Promise));\n\t} \n\treturn responseJson;\n}\n\n\n/**\n * Builds a url from a route and query params\n * @param route The route of the url\n * @param params The query params to use\n * @returns The built url\n */\nexport function buildUrl(route: string, params?: {[key: string]: string}) {\n\tif (params) {\n\t\treturn `${route}?${queryString.stringify(params)}`;\n\t}\n\n\treturn route;\n}\n\n/**\n * Formats a collection filter for use with rest endpoints\n * @param collectionFilters an array of array of IWhereCondition\n */\nexport function formatConditionsForRest(collectionFilters: Array>>){\n\treturn [\n\t\t...collectionFilters.map(andCondition => andCondition.map(orCondition => {\n\t\t\tif (orCondition.case) {\n\t\t\t\treturn {\n\t\t\t\t\t...orCondition,\n\t\t\t\t\tcase: convertCaseComparisonToPascalCase(orCondition.case),\n\t\t\t\t\tvalue: [orCondition.value]\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn orCondition as IWhereConditionApi;\n\t\t}))];\n}\n\n// % protected region % [Add any extra fetch utils here] off begin\n// % protected region % [Add any extra fetch utils here] end","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {\n\tDateRange,\n\tgetEventEntityNameFromTimelineEntity,\n\tgetTimelineQueryWhereConditions,\n\tQuickJumpTimeFrame,\n} from 'Util/TimelineUtils';\nimport {Combobox} from 'Views/Components/Combobox/Combobox';\nimport moment from \"moment\";\nimport { action, autorun, IReactionDisposer, observable} from \"mobx\";\nimport {observer} from \"mobx-react\";\nimport axios from \"axios\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport { formatConditionsForRest } from 'Util/FetchUtils';\nimport { Button, Display, Sizes } from 'Views/Components/Button/Button';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n\nexport interface IListViewQuickJumpSidebarProps {\n\t// % protected region % [Override IListViewQuickJumpSidebarProps here] off begin\n\tonQuickJump: (options: DateRange | undefined) => void;\n\ttimelineFilter: ITimelineFilter;\n\t// % protected region % [Override IListViewQuickJumpSidebarProps here] end\n}\n\n@observer\nexport default class ListViewQuickJumpSidebar extends React.Component {\n\n\t@observable\n\tprivate quickJumpOptions: DateRange[] = [];\n\t@observable\n\tprivate timeFrameConfiguration = {\n\t\tselectedTimeFrame: QuickJumpTimeFrame.Months\n\t};\n\n\t@observable\n\tprivate loadingState: 'Loading' | 'Done' | 'Error' = 'Loading';\n\tprivate readonly disposer : IReactionDisposer;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tconstructor(props: IListViewQuickJumpSidebarProps) {\n\t\t// % protected region % [Override constructor here] off begin\n\t\tsuper(props);\n\t\tthis.disposer = autorun(this.getQuickJumpOptions)\n\t\t// % protected region % [Override constructor here] end\n\t}\n\tcomponentWillUnmount(): void {\n\t\t// % protected region % [Override componentWillUnmount here] off begin\n\t\tthis.disposer();\n\t\t// % protected region % [Override componentWillUnmount here] end\n\t}\n\n\t/**\n\t * Fetches quick-jump sidebar options from the server and updates the component state to\n\t * display them\n\t */\n\tprivate getQuickJumpOptions = () => {\n\t\t// % protected region % [Override getQuickJumpOptions here] off begin\n\t\tconst timelineFilter = {\n\t\t\ttimeFrame: this.timeFrameConfiguration.selectedTimeFrame,\n\t\t\tconditions: formatConditionsForRest(getTimelineQueryWhereConditions(this.props.timelineFilter))\n\t\t};\n\t\tconst timelineEntity = this.props.timelineFilter.selectedTimelineEntity;\n\t\tconst eventEntityName = getEventEntityNameFromTimelineEntity(timelineEntity);\n\t\taxios\n\t\t\t.post>(`/api/entity/${eventEntityName}/quick-jump-options`, timelineFilter)\n\t\t\t.then(action((data) => {\n\t\t\t\tthis.quickJumpOptions = data.data;\n\t\t\t\tthis.loadingState = 'Done';\n\t\t\t}))\n\t\t\t.catch(action(() => this.loadingState = 'Error' ))\n\t\t// % protected region % [Override getQuickJumpOptions here] end\n\t};\n\n\t/*\n\t* Formats how quick jump options are displayed depending on the user specified timeframe\n\t* of weeks or months\n\t* */\n\tprivate formatQuickJumpOption = (date: Date, timeFrame: QuickJumpTimeFrame) => {\n\t\t// % protected region % [Override formatQuickJumpOption here] off begin\n\t\tswitch(timeFrame) {\n\t\t\tcase QuickJumpTimeFrame.Months:\n\t\t\t\treturn moment(date).format('MM/YYYY');\n\t\t\tcase QuickJumpTimeFrame.Weeks:\n\t\t\t\treturn moment(date).format('DD/MM/YYYY')\n\t\t}\n\t\t// % protected region % [Override formatQuickJumpOption here] end\n\t};\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingState === 'Error'){\n\t\t\treturn 'Error';\n\t\t}\n\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn \n\t\t}\n\t\tconst quickJumpTimeFrameOptions = [\n\t\t\t{display: 'Months', value: QuickJumpTimeFrame.Months},\n\t\t\t{display: 'Weeks', value: QuickJumpTimeFrame.Weeks}\n\t\t];\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Quick Jump
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
      \n\t\t\t\t\t\t\n\t\t\t\t\t\t{this.quickJumpOptions.map((option, index) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport TimelineTopBar from \"../Shared/TimelineTopBar\";\nimport ListViewList from \"./ListViewList\";\nimport {observer} from \"mobx-react\";\nimport {action, observable} from \"mobx\";\nimport {DateRange} from 'Util/TimelineUtils';\nimport moment, {Moment} from \"moment\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport ListViewTopBarControls from 'Timelines/TimelineListView/ListViewControls';\nimport ListViewQuickJumpSidebar from 'Timelines/TimelineListView/ListViewSidebar';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface ITimelineListViewProps {\n\t// % protected region % [Override ITimelineListViewProps here] off begin\n\ttimelineFilter: ITimelineFilter\n\tonClickViewItem?: (entity: string, id: string) => void;\n\tonSwitchToGraphView: () => void;\n\ttimelineViewDate?: Moment;\n\tgraphViewDisabled?: boolean;\n\t// % protected region % [Override ITimelineListViewProps here] end\n}\n\n@observer\nexport default class TimelineListView extends React.Component {\n\t@observable\n\tquickJumpDate: Moment | undefined = this.props.timelineViewDate;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\t@action\n\tprivate onQuickJump = (quickJumpDate: DateRange | undefined) => {\n\t\t// % protected region % [Override onQuickJump here] off begin\n\t\tthis.quickJumpDate = quickJumpDate ? moment(quickJumpDate.startDate) : undefined;\n\t\t// % protected region % [Override onQuickJump here] end\n\t};\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tconst graphViewDisabledWarning = (\n\t\t\t

    View timelines graph view on screens larger than 900px.

    \n\t\t)\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t{this.props.graphViewDisabled ? graphViewDisabledWarning : null}\n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {Button, Display, Colors} from \"../../Views/Components/Button/Button\";\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IGraphViewTopBarControlsProps {\n\t// % protected region % [Override IGraphViewTopBarControlsProps here] off begin\n\tonJumpToToday: () => void;\n\tonZoomBackToDefault: () => void;\n\tonZoomIn: () => void;\n\tonZoomOut: () => void;\n\tonPanLeft: () => void;\n\tonPanRight: () => void;\n\tonSwitchToListView: () => void;\n\t// % protected region % [Override IGraphViewTopBarControlsProps here] end\n}\n\n\nexport default class GraphViewControls extends React.Component {\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\treturn (\n\t\t\t<>\n\t\t\t\t Today \n\t\t\t\t Reset \n\t\t\t\t Zoom in \n\t\t\t\t Zoom out \n\t\t\t\t View left \n\t\t\t\t View right \n\t\t\t\t this.props.onSwitchToListView()}\n\t\t\t\t\ticon={{icon: 'ol-list', iconPos: 'icon-top'}}\n\t\t\t\t\tcolors={Colors.Secondary}\n\t\t\t\t\tdisplay={Display.Solid}\n\t\t\t\t\taria-label=\"list view\"> List \n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport moment from \"moment\";\nimport classNames from \"classnames\";\nimport { action, autorun, IReactionDisposer, observable } from 'mobx';\nimport {observer} from \"mobx-react\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport {\n\tgetActionShapeClassName,\n\tgetTimelineEventEntity,\n\tgetTimelineQueryWhereConditions,\n\tTimelineEvent\n} from 'Util/TimelineUtils';\nimport {getFetchAllConditional, getModelName} from 'Util/EntityUtils';\nimport {store} from 'Models/Store';\nimport {lowerCaseFirst} from 'Util/StringUtils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport {RouteComponentProps} from 'react-router';\nimport {TimelineGraphViewProps} from 'Timelines/TimelineGraphView/GraphViewGraph';\nimport Spinner from 'Views/Components/Spinner/Spinner';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface ITimelineGraphViewSidebarProps {\n\t// % protected region % [Override ITimelineGraphViewSidebarProps here] off begin\n\ttimelineFilter: ITimelineFilter\n\t// % protected region % [Override ITimelineGraphViewSidebarProps here] end\n}\n\n@observer\nexport default class GraphViewSidebar extends React.Component {\n\n\t@observable\n\tprivate recentEvents: Array = [];\n\n\t@observable\n\tprivate loadingState: 'Loading' | 'Done' | 'Error' = 'Loading';\n\tprivate readonly disposer : IReactionDisposer;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tconstructor(props: TimelineGraphViewProps & RouteComponentProps) {\n\t\t// % protected region % [Override constructor here] off begin\n\t\tsuper(props);\n\t\tthis.disposer = autorun(this.fetchRecentEvents)\n\t\t// % protected region % [Override constructor here] end\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\t// % protected region % [Override componentWillUnmount here] off begin\n\t\tthis.disposer();\n\t\t// % protected region % [Override componentWillUnmount here] end\n\t}\n\n\tprivate fetchRecentEvents = () => {\n\t\t// % protected region % [Override fetchRecentEvents here] off begin\n\t\tconst eventEntityModel = getTimelineEventEntity(this.props.timelineFilter.selectedTimelineEntity);\n\t\tif (eventEntityModel) {\n\t\t\tconst eventEntityName = getModelName(eventEntityModel);\n\t\t\tconst filter = cloneDeep(this.props.timelineFilter);\n\t\t\tfilter.startDate = undefined;\n\t\t\tfilter.endDate = undefined;\n\t\t\tstore.apolloClient\n\t\t\t.query({\n\t\t\t\tquery: getFetchAllConditional(eventEntityModel),\n\t\t\t\tvariables: { \n\t\t\t\t\targs: getTimelineQueryWhereConditions(filter), \n\t\t\t\t\ttake: 7, \n\t\t\t\t\torderBy: [{ descending: true, path: 'Created' }] \n\t\t\t\t},\n\t\t\t\tfetchPolicy: 'network-only'})\n\t\t\t.then(action((data) => {\n\t\t\t\t\tthis.recentEvents = data.data[`${lowerCaseFirst(eventEntityName)}s`];\n\t\t\t\t\tthis.loadingState = 'Done'}))\n\t\t\t.catch(action(() => this.loadingState = 'Error' ))\n\t\t}\n\t\t// % protected region % [Override fetchRecentEvents here] end\n\t};\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingState === 'Error'){\n\t\t\treturn 'Error';\n\t\t}\n\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn \n\t\t}\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Recent Activity
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t{this.recentEvents.map((event, index) =>\n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t{moment(event.created).format('DD/MM/YYYY')}\n\t\t\t\t\t\t\t\t\t{event.actionTitle}\n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Legend
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t{this.props.timelineFilter.actionTypeOptions.map((typeOfChange, index) =>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{typeOfChange}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport classNames from \"classnames\";\nimport moment from \"moment\";\nimport {GraphWindowLimits, TimelineGroupDateQueryResult} from './GraphViewGraph'\nimport {DateRange, getActionShapeClassName, TimelineEvent} from 'Util/TimelineUtils';\nimport {observer} from \"mobx-react\";\nimport {Button, Display} from 'Views/Components/Button/Button';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface IGraphViewEntryProps {\n\t// % protected region % [Override IGraphViewEntryProps here] off begin\n\tgraphWindowLimits: GraphWindowLimits\n\tclassName?: string;\n\tgraphViewEntry: TimelineGroupDateQueryResult;\n\tonClick: (graphItem: TimelineGroupDateQueryResult) => void;\n\tcardEvents? : Array;\n\tonClickViewInListView: (date: Date) => void;\n\tonClickViewItem: (id: string) => void;\n\tshowDate: boolean;\n\tdateFormatString: string;\n\tonClickZoom: (range: DateRange) => void;\n\t// % protected region % [Override IGraphViewEntryProps here] end\n}\n\n@observer\nexport default class GraphViewItem extends React.Component {\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\tpublic render() {\n\n\t\t// % protected region % [Override render variables here] off begin\n\t\tconst {numberOfResults} = this.props.graphViewEntry;\n\t\tconst startDate = moment(this.props.graphViewEntry.dateTimeGroup.startDate);\n\t\tstartDate.set(\"seconds\", 0);\n\t\tstartDate.set(\"minutes\", 0);\n\t\t// % protected region % [Override render variables here] end\n\n\t\t// % protected region % [Override render item here] off begin\n\t\tconst dateItemInformation = () => {\n\t\t\tconst windowTicks = this.props.graphWindowLimits.endDate.diff(this.props.graphWindowLimits.startDate);\n\t\t\tconst itemTicks = this.props.graphWindowLimits.endDate.diff(this.props.graphViewEntry.dateTimeGroup.startDate);\n\n\t\t\tlet positionalClassName = itemTicks < windowTicks/2 ? 'right' : 'left';\n\t\t\tconst zoomToViewMoreComponent = (\n\t\t\t\t\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.graphViewEntry.numberOfResults > 1 ? zoomToViewMoreComponent : null}\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)\n\t\t};\n\t\t// % protected region % [Override render item here] end\n\n\t\t// % protected region % [Override render date here] off begin\n\t\tconst dateComponent = this.props.showDate \n\t\t\t? startDate.minutes(0).seconds(0).format(this.props.dateFormatString)\n\t\t\t: null;\n\n\t\tif (!this.props.graphViewEntry.firstResult) {\n\t\t\treturn (\n\t\t\t\t
    \n\t\t\t\t\t{this.horizontalAxisDateItem(dateComponent)}\n\t\t\t\t
    \n\t\t\t)\n\t\t}\n\t\t// % protected region % [Override render date here] end\n\n\t\t// % protected region % [Override render return here] off begin\n\t\treturn (\n\t\t\t
    this.props.onClick(this.props.graphViewEntry)} className=\"date__item\">\n\t\t\t\t 1 ? 'timelines__items' : 'timelines__item',\n\t\t\t\t\t\t\tgetActionShapeClassName(this.props.graphViewEntry.firstResult?.action))}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.graphViewEntry.numberOfResults}\n\t\t\t\t\t
    \n\t\t\t\t\t{this.props.graphViewEntry.showInformation ? dateItemInformation() : null}\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t
    \n\t\t\t\t{this.horizontalAxisDateItem(dateComponent)}\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render return here] end\n\t}\n\n\tprivate horizontalAxisDateItem = (dateString: string | null) => {dateString}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {action, autorun, IReactionDisposer, observable, runInAction} from \"mobx\";\nimport axios from 'axios';\nimport moment, {Moment} from \"moment\";\nimport {observer} from \"mobx-react\";\nimport classNames from \"classnames\";\nimport {RouteComponentProps} from \"react-router\";\nimport GraphViewItem from \"./GraphViewItem\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport {\n\tDateRange,\n\tgetEventEntityNameFromTimelineEntity,\n\tgetTimelineEventEntity,\n\tgetTimelineQueryWhereConditions,\n\tTimelineEvent\n} from 'Util/TimelineUtils';\nimport {getFetchAllConditional, getModelName} from 'Util/EntityUtils';\nimport {store} from 'Models/Store';\nimport {lowerCaseFirst} from 'Util/StringUtils';\nimport {Button} from 'Views/Components/Button/Button';\nimport cloneDeep from 'lodash/cloneDeep';\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport { formatConditionsForRest } from 'Util/FetchUtils';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface GraphWindowLimits {\n\t// % protected region % [Override GraphWindowLimits here] off begin\n\tstartDate: Moment,\n\tendDate: Moment\n\t// % protected region % [Override GraphWindowLimits here] end\n}\n\nexport interface TimelineGraphViewProps {\n\t// % protected region % [Override TimelineGraphViewProps here] off begin\n\tonPanLeft: () => void;\n\tonPanRight: () => void;\n\ttimelineFilter: ITimelineFilter;\n\tgraphWindowLimits: GraphWindowLimits\n\tonClickViewInListView: (date: Date) => void;\n\tonClickViewItem?: (entity: string, id: string) => void;\n\tanimationClassName: string;\n\tonClickZoomItem: (range: DateRange) => void;\n\t// % protected region % [Override TimelineGraphViewProps here] end\n}\n\nexport interface TimelineGroupDateQueryResult {\n\t// % protected region % [Override TimelineGroupDateQueryResult here] off begin\n\tfirstResult: TimelineEvent,\n\tnumberOfResults: number,\n\tdateTimeGroup: DateRange,\n\tshowInformation: boolean\n\t// % protected region % [Override TimelineGroupDateQueryResult here] end\n}\n\n@observer\nexport default class GraphViewGraph extends React.Component {\n\n\t@observable\n\tprivate timelineGroupDateQueryResults: Array = [];\n\n\t@observable\n\tprivate recentEvents: Array = [];\n\n\t@observable\n\tprivate timelineEventsForCardDisplay : Array = [];\n\t@observable\n\tprivate loadingState: 'Loading' | 'Done' | 'Error' = 'Loading';\n\n\tprivate readonly disposer : IReactionDisposer;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tconstructor(props: TimelineGraphViewProps & RouteComponentProps) {\n\t\t// % protected region % [Override constructor here] off begin\n\t\tsuper(props);\n\t\tthis.disposer = autorun(this.fetchGraphData)\n\t\t// % protected region % [Override constructor here] end\n\t}\n\n\tcomponentWillUnmount(): void {\n\t\t// % protected region % [Override componentWillUnmount here] off begin\n\t\tthis.disposer();\n\t\t// % protected region % [Override componentWillUnmount here] end\n\t}\n\n\tprivate fetchTimelineEventsForCardDisplay = (limits: GraphWindowLimits) => {\n\t\t// % protected region % [Override fetchTimelineEventsForCardDisplay here] off begin\n\t\tconst eventEntityModel = getTimelineEventEntity(this.props.timelineFilter.selectedTimelineEntity);\n\t\tconst filter = cloneDeep(this.props.timelineFilter);\n\t\tfilter.startDate = limits.startDate.toDate();\n\t\tfilter.endDate = limits.endDate.toDate();\n\t\tconst searchConditions = getTimelineQueryWhereConditions(filter);\n\t\tif (eventEntityModel) {\n\t\t\tconst eventEntityName = getModelName(eventEntityModel);\n\t\t\tstore.apolloClient\n\t\t\t\t.query({\n\t\t\t\t\tquery: getFetchAllConditional(eventEntityModel),\n\t\t\t\t\tvariables: { args: searchConditions, take: 2, orderBy: [{ descending: true, path: 'Created' }] },\n\t\t\t\t\tfetchPolicy: 'network-only',})\n\t\t\t\t.then(action((data) => this.timelineEventsForCardDisplay = data.data[`${lowerCaseFirst(eventEntityName)}s`]))\n\t\t\t\t.catch(action(() => this.loadingState = 'Error' ))\n\t\t}\n\t\t// % protected region % [Override fetchTimelineEventsForCardDisplay here] end\n\t};\n\tprivate fetchGraphData = () => {\n\t\t// % protected region % [Override fetchGraphData here] off begin\n\t\trunInAction(() => this.loadingState = 'Loading');\n\t\tconst timelineFilter = {\n\t\t\tconditions: formatConditionsForRest(getTimelineQueryWhereConditions(this.props.timelineFilter)),\n\t\t\tdateRange: {\n\t\t\t\tstartDate: this.props.graphWindowLimits.startDate.format('YYYY-MM-DD HH:mm:ss'),\n\t\t\t\tendDate: this.props.graphWindowLimits.endDate.format('YYYY-MM-DD HH:mm:ss'),\n\t\t\t}\n\t\t};\n\t\taxios\n\t\t\t.post>(\n\t\t\t`/api/entity/${getEventEntityNameFromTimelineEntity(this.props.timelineFilter.selectedTimelineEntity)}/timeline-graph-data`, timelineFilter)\n\t\t\t.then(action((data) => {\n\t\t\t\t\tthis.timelineGroupDateQueryResults = data.data;\n\t\t\t\t\tthis.loadingState = 'Done';\n\t\t\t}))\n\t\t\t.catch(action(() => this.loadingState = 'Error' ))\n\t\t// % protected region % [Override fetchGraphData here] end\n\t};\n\n\t@action\n\tprivate toggleGraphItemMoreInformationView = (graphItem: TimelineGroupDateQueryResult) => {\n\t\t// % protected region % [Override toggleGraphItemMoreInformationView here] off begin\n\t\tconst showInformation = !graphItem.showInformation;\n\t\tthis.timelineGroupDateQueryResults.map(x => x.showInformation = false);\n\t\tgraphItem.showInformation = showInformation;\n\t\tthis.timelineEventsForCardDisplay = [];\n\t\tthis.fetchTimelineEventsForCardDisplay({\n\t\t\tstartDate: moment(graphItem.dateTimeGroup.startDate),\n\t\t\tendDate: moment(graphItem.dateTimeGroup.endDate)\n\t\t});\n\t\t// % protected region % [Override toggleGraphItemMoreInformationView here] end\n\t};\n\n\tprivate getDateDisplayIndices = () => {\n\t\t// % protected region % [Override getDateDisplayIndices here] off begin\n\t\tconst size = this.timelineGroupDateQueryResults.length;\n\t\tconst increment = Math.round(size / 6);\n\t\tconst displayIndices = [];\n\t\tfor (let i = 0; i < size; i ++) {\n\t\t\tif(!(i % increment)) {\n\t\t\t\tdisplayIndices.push(i)\n\t\t\t}\n\t\t}\n\t\treturn displayIndices;\n\t\t// % protected region % [Override getDateDisplayIndices here] end\n\t};\n\n\tprivate getDateFormatString = (dateDisplayIndices: number[]) => {\n\t\t// % protected region % [Override getDateFormatString here] off begin\n\t\tlet dateFormatString = 'DD/MM/YYYY HH:mm';\n\t\tif (!dateDisplayIndices[2]) {\n\t\t\treturn dateFormatString;\n\t\t}\n\t\tconst startDate = moment(this.timelineGroupDateQueryResults[dateDisplayIndices[1]].dateTimeGroup.startDate);\n\t\tconst endDate = moment(this.timelineGroupDateQueryResults[dateDisplayIndices[2]].dateTimeGroup.startDate);\n\t\tconst hoursDiff = endDate.diff(startDate, \"hours\");\n\n\t\tswitch (true) {\n\t\t\tcase (hoursDiff >= (24 * 2) && hoursDiff < (28 * 24)):\n\t\t\t\tdateFormatString = 'DD/MM/YYYY';\n\t\t\t\tbreak;\n\t\t\tcase (hoursDiff >= (28 * 24) && hoursDiff < (24 * 360)):\n\t\t\t\tdateFormatString = 'MM/YYYY';\n\t\t\t\tbreak;\n\t\t\tcase (hoursDiff >= (24 * 360)):\n\t\t\t\tdateFormatString = 'MM/YYYY';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn dateFormatString;\n\t\t// % protected region % [Override getDateFormatString here] end\n\t};\n\n\tprivate onClickViewItem = (entity: string, id: string) => {\n\t\t// % protected region % [Override onClickViewItem here] off begin\n\t\tthis.props.onClickViewItem?.(entity, id)\n\t\t// % protected region % [Override onClickViewItem here] end\n\t};\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingState === 'Error'){\n\t\t\treturn 'Error';\n\t\t}\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn \n\t\t}\n\t\tconst dateDisplayIndices = this.getDateDisplayIndices();\n\t\tconst dateFormatString = this.getDateFormatString(dateDisplayIndices);\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport TimelineTopBar from \"../Shared/TimelineTopBar\";\nimport GraphViewTopBarControls from \"./GraphViewControls\";\nimport moment, {Moment} from \"moment\";\nimport {observer} from \"mobx-react\";\nimport {action, observable} from 'mobx';\nimport cloneDeep from \"lodash/cloneDeep\";\nimport GraphViewSidebar from \"./GraphViewSidebar\";\nimport GraphViewGraph from \"./GraphViewGraph\";\nimport {ITimelineFilter} from 'Timelines/TimelineTile';\nimport {DateRange, getTimelineEventEntity, getTimelineQueryWhereConditions, TimelineEvent} from 'Util/TimelineUtils';\nimport {getFetchAllConditional, getModelName} from 'Util/EntityUtils';\nimport {store} from 'Models/Store';\nimport {lowerCaseFirst} from 'Util/StringUtils';\nimport {Model} from 'Models/Model';\nimport Spinner from 'Views/Components/Spinner/Spinner';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport interface ITimelineGraphViewProps {\n\t// % protected region % [Override ITimelineGraphViewProps here] off begin\n\ttimelineFilter: ITimelineFilter\n\tonClickViewItem?: (entity: string, id: string) => void;\n\tonSwitchToListView: (date?: Date) => void;\n\tgraphViewDisabled?: boolean;\n\t// % protected region % [Override ITimelineGraphViewProps here] end\n}\n\nexport interface GraphWindowLimits {\n\t// % protected region % [Override GraphWindowLimits here] off begin\n\tstartDate: Moment,\n\tendDate: Moment\n\t// % protected region % [Override GraphWindowLimits here] end\n}\n\n@observer\nexport default class TimelineGraphView extends React.Component {\n\n\t@observable\n\tpublic graphWindowLimits: GraphWindowLimits = {\n\t\t// % protected region % [Override graphWindowLimits here] off begin\n\t\tstartDate: moment(Date.now()).subtract(1, \"month\"),\n\t\tendDate: moment(Date.now())\n\t\t// % protected region % [Override graphWindowLimits here] end\n\t};\n\t@observable\n\tprivate loadingState: 'Loading' | 'Done' | 'Error' = 'Loading';\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\tcomponentDidMount(): void {\n\t\t// % protected region % [Override componentDidMount here] off begin\n\t\tif (this.props.graphViewDisabled) {\n\t\t\tthis.props.onSwitchToListView();\n\t\t}\n\t\tthis.onZoomBackToDefault();\n\t\t// % protected region % [Override componentDidMount here] end\n\t}\n\n\tpublic animationClassName = '';\n\n\t@action\n\tprivate onZoomIn = () => {\n\t\t// % protected region % [Override onZoomIn here] off begin\n\t\tconst graphWindowLimits = cloneDeep(this.graphWindowLimits);\n\t\tconst ticks = graphWindowLimits.endDate.diff(graphWindowLimits.startDate);\n\t\tconst startDate = graphWindowLimits.startDate.add(ticks/4, \"ms\");\n\t\tconst endDate = graphWindowLimits.endDate.add(-ticks/4, \"ms\");\n\t\tconst zoomInTickLimit = moment(Date.now()).add(4, 'hours').diff(moment(Date.now()));\n\t\tif(endDate.diff(startDate) > zoomInTickLimit) {\n\t\t\tthis.graphWindowLimits = {startDate: startDate, endDate: endDate};\n\t\t\tthis.animationClassName = this.animationClassName === 'view-zoom' ? 'zoom-view' : 'view-zoom';\n\t\t}\n\t\t// % protected region % [Override onZoomIn here] end\n\t};\n\n\t@action\n\tprivate onZoomOut = () => {\n\t\t// % protected region % [Override onZoomOut here] off begin\n\t\tconst graphWindowLimits = cloneDeep(this.graphWindowLimits);\n\t\tconst ticks = graphWindowLimits.endDate.diff(graphWindowLimits.startDate);\n\t\tconst startDate = graphWindowLimits.startDate.add(-ticks/2, \"ms\");\n\t\tconst endDate = graphWindowLimits.endDate.add(ticks/2, \"ms\");\n\t\tconst zoomOutTickLimit = moment(Date.now()).add(10, 'years').diff(moment(Date.now()));\n\t\tif(endDate.diff(startDate) < zoomOutTickLimit) {\n\t\t\tthis.graphWindowLimits = {startDate: startDate, endDate: endDate};\n\t\t\tthis.animationClassName = this.animationClassName === 'view-zoom' ? 'zoom-view' : 'view-zoom';\n\t\t}\n\t\t// % protected region % [Override onZoomOut here] end\n\t};\n\n\t@action\n\tprivate onPanLeft = () => {\n\t\t// % protected region % [Override onPanLeft here] off begin\n\t\tconst ticks = this.graphWindowLimits.endDate.diff(this.graphWindowLimits.startDate);\n\t\tconst endDate = cloneDeep(this.graphWindowLimits.startDate)\n\t\tconst startDate = this.graphWindowLimits.startDate.add(-ticks, \"ms\")\n\t\tthis.graphWindowLimits = {startDate: startDate, endDate: endDate};\n\t\tthis.animationClassName = this.animationClassName === 'view-left' ? 'left-view' : 'view-left';\n\t\t// % protected region % [Override onPanLeft here] end\n\t};\n\n\t@action\n\tprivate onPanRight = () => {\n\t\t// % protected region % [Override onPanRight here] off begin\n\t\tconst ticks = this.graphWindowLimits.endDate.diff(this.graphWindowLimits.startDate);\n\t\tconst startDate = cloneDeep(this.graphWindowLimits.endDate);\n\t\tconst endDate = this.graphWindowLimits.endDate.add(ticks, \"ms\");\n\t\tthis.graphWindowLimits = {startDate: startDate, endDate: endDate};\n\t\tthis.animationClassName = this.animationClassName === 'view-right' ? 'right-view' : 'view-right';\n\t\t// % protected region % [Override onPanRight here] end\n\t};\n\n\t@action\n\tprivate onJumpToToday = () => {\n\t\t// % protected region % [Override onJumpToToday here] off begin\n\t\tthis.graphWindowLimits = {\n\t\t\tstartDate: moment(Date.now()).startOf(\"day\"),\n\t\t\tendDate: moment(Date.now()).add(1, \"day\").startOf(\"day\")\n\t\t}\n\t\t// % protected region % [Override onJumpToToday here] end\n\t};\n\n\tprivate onZoomBackToDefault = () => {\n\t\t// % protected region % [Override onZoomBackToDefault here] off begin\n\t\tconst prevMonthDate = moment(Date.now()).add(-1, \"month\");\n\t\tconst eventEntityModel = getTimelineEventEntity(this.props.timelineFilter.selectedTimelineEntity);\n\t\tif (eventEntityModel){\n\t\t\tthis.fetchDefaultViewStartDate(eventEntityModel)\n\t\t\t\t.then(startDate => {\n\t\t\t\t\tif (!startDate || startDate > prevMonthDate) {\n\t\t\t\t\t\tstartDate = prevMonthDate;\n\t\t\t\t\t}\n\t\t\t\t\tthis.setDefaultZoom(startDate)\n\t\t\t\t});\n\t\t} else {\n\t\t\tthis.setDefaultZoom(prevMonthDate)\n\t\t}\n\t\t// % protected region % [Override onZoomBackToDefault here] end\n\t};\n\t@action\n\tprivate setDefaultZoom = (startDate: Moment) => {\n\t\t// % protected region % [Override setDefaultZoom here] off begin\n\t\tthis.graphWindowLimits = {\n\t\t\tstartDate: startDate,\n\t\t\tendDate: moment(Date.now())\n\t\t};\n\t\tif (this.loadingState === 'Loading'){\n\t\t\tthis.loadingState = 'Done';\n\t\t}\n\t\t// % protected region % [Override setDefaultZoom here] end\n\t};\n\n\tprivate fetchDefaultViewStartDate = (eventEntityModel: { new(): Model }) => {\n\t\t// % protected region % [Override fetchDefaultViewStartDate here] off begin\n\t\tconst filter = cloneDeep(this.props.timelineFilter);\n\t\tfilter.startDate = undefined;\n\t\tfilter.endDate = undefined;\n\t\tconst searchConditions = getTimelineQueryWhereConditions(filter);\n\t\tconst eventEntityName = getModelName(eventEntityModel);\n\t\treturn store.apolloClient\n\t\t\t.query({\n\t\t\t\tquery: getFetchAllConditional(eventEntityModel),\n\t\t\t\tvariables: { args: searchConditions, take: 1, orderBy: [{ descending: false, path: 'Created' }] },\n\t\t\t\tfetchPolicy: 'network-only'\n\t\t\t})\n\t\t\t.then((data) => {\n\t\t\t\tconst fetchedEntities: Array = data.data[`${lowerCaseFirst(eventEntityName)}s`];\n\t\t\t\treturn fetchedEntities.length > 0 ? moment(fetchedEntities[0].created) : undefined\n\t\t\t})\n\t\t\t.catch(action(() => {\n\t\t\t\tthis.loadingState = 'Error';\n\t\t\t\treturn undefined;\n\t\t\t}))\n\t\t// % protected region % [Override fetchDefaultViewStartDate here] end\n\t};\n\t@action\n\tprivate onClickZoomItem = (range: DateRange) => {\n\t\t// % protected region % [Override onClickZoomItem here] off begin\n\t\tthis.graphWindowLimits = {\n\t\t\tstartDate: moment(range.startDate),\n\t\t\tendDate: moment(range.endDate)\n\t\t}\n\t\t// % protected region % [Override onClickZoomItem here] end\n\t};\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingState === 'Error'){\n\t\t\treturn 'Error';\n\t\t}\n\n\t\tif (this.loadingState === 'Loading'){\n\t\t\treturn \n\t\t}\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { IModelType, Model } from 'Models/Model';\nimport {observer} from \"mobx-react\";\nimport {action, computed, observable, runInAction} from 'mobx';\nimport { TimelineModel } from 'Timelines/TimelineModel';\nimport TimelineListView from \"./TimelineListView/TimelineListView\";\nimport TimelineGraphView from \"./TimelineGraphView/TimelineGraphView\";\nimport {getTimelineActionOptions, TimelineEntities} from 'Util/TimelineUtils';\nimport moment, {Moment} from \"moment\";\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport { IWhereCondition } from 'Views/Components/ModelCollection/ModelQuery';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\nexport type TTimelineEntityOption = IModelType\n\nexport interface ITimelineTileProps {\n\t// % protected region % [Override ITimelineTileProps here] off begin\n\ttimelineEntity?: TTimelineEntityOption\n\tentityId?: string;\n\tcomponent?: 'list' | 'graph'\n\tonClickViewItem?: (entity: string, id: string) => void;\n\tonRouteToListView?: (date?: Date, replaceHistory?: boolean) => void;\n\tonRouteToGraphView?: (replaceHistory?: boolean) => void;\n\ttimelineViewDate?: Moment;\n\ttimelineFilterProps?: Partial\n\t// % protected region % [Override ITimelineTileProps here] end\n}\n\nexport interface ITimelineFilter {\n\t// % protected region % [Override ITimelineFilter here] off begin\n\tsearchTerm: string,\n\tinstanceIds: string[],\n\tstartDate: Date | undefined,\n\tendDate: Date | undefined,\n\tselectedActionTypes: string[],\n\tactionTypeOptions: string[],\n\tselectedTimelineEntity: TTimelineEntityOption\n\ttimelineEntityOptions?: TTimelineEntityOption[]\n\tcanChangeTimelineEntity?: boolean\n\tinitialSearchConditions?: Array>;\n\t// % protected region % [Override ITimelineFilter here] end\n}\n\n@observer\nexport default class TimelineTile extends React.Component {\n\n\t@observable\n\tprivate component = this.props.component ?? 'graph';\n\n\t@observable\n\tprivate loadingStatus: 'Loading' | 'Done' = 'Loading';\n\t@observable\n\tprivate graphViewDisabled: boolean = false;\n\n\t@observable\n\tprivate internalTimelineViewDate: Moment | undefined = undefined;\n\n\t// % protected region % [Add extra component variables here] off begin\n\t// % protected region % [Add extra component variables here] end\n\n\t@computed\n\tprivate get timelineViewDate() {\n\t\t// % protected region % [Override timelineViewDate here] off begin\n\t\tif (this.props.timelineViewDate) {\n\t\t\treturn this.props.timelineViewDate;\n\t\t}\n\t\treturn this.internalTimelineViewDate;\n\t\t// % protected region % [Override timelineViewDate here] end\n\t}\n\n\t@observable\n\tprivate timelineFilter: ITimelineFilter = {\n\t\t// % protected region % [Override timelineFilter here] off begin\n\t\tsearchTerm: this.props.timelineFilterProps?.searchTerm ?? '',\n\t\tinstanceIds: this.props.entityId ? [this.props.entityId] : [],\n\t\tstartDate: this.props.timelineFilterProps?.startDate ?? undefined,\n\t\tendDate: this.props.timelineFilterProps?.endDate ?? undefined,\n\t\tselectedActionTypes: this.props.timelineFilterProps?.selectedActionTypes ?? [],\n\t\tactionTypeOptions: this.props.timelineFilterProps?.actionTypeOptions ?? [],\n\t\tselectedTimelineEntity: this.props.timelineEntity ?? TimelineEntities[0],\n\t\ttimelineEntityOptions: this.props.timelineFilterProps?.timelineEntityOptions ?? TimelineEntities,\n\t\tcanChangeTimelineEntity: this.props.timelineFilterProps?.canChangeTimelineEntity ?? false,\n\t\tinitialSearchConditions: this.props.timelineFilterProps?.initialSearchConditions ?? []\n\t\t// % protected region % [Override timelineFilter here] end\n\t};\n\n\tcomponentDidMount(): void {\n\t\t// % protected region % [Override componentDidMount here] off begin\n\t\tthis.disableGraphViewOnSmallScreenDetection();\n\t\twindow.addEventListener('resize', this.disableGraphViewOnSmallScreenDetection);\n\t\tthis.getActionOptions();\n\t\t// % protected region % [Override componentDidMount here] end\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// % protected region % [Override componentWillUnmount here] off begin\n\t\twindow.removeEventListener('resize', this.disableGraphViewOnSmallScreenDetection);\n\t\t// % protected region % [Override componentWillUnmount here] end\n\t}\n\n\t@action\n\tprivate disableGraphViewOnSmallScreenDetection = () => {\n\t\t// % protected region % [Override disableGraphViewOnSmallScreenDetection here] off begin\n\t\tlet width = window.innerWidth;\n\t\tif (width < 900 && !this.graphViewDisabled) {\n\t\t\tthis.onSwitchToListView(undefined, true);\n\t\t\tthis.graphViewDisabled = true;\n\t\t}\n\t\tif (width > 900 && this.graphViewDisabled) {\n\t\t\tthis.graphViewDisabled = false;\n\t\t}\n\t\t// % protected region % [Override disableGraphViewOnSmallScreenDetection here] end\n\t};\n\n\tprivate getActionOptions = () => {\n\t\t// % protected region % [Override getActionOptions here] off begin\n\t\tgetTimelineActionOptions(this.timelineFilter.selectedTimelineEntity)\n\t\t\t.then(options => runInAction(() => {\n\t\t\t\tthis.timelineFilter.actionTypeOptions = options;\n\t\t\t\tthis.loadingStatus = 'Done';\n\t\t\t}))\n\t\t// % protected region % [Override getActionOptions here] end\n\t};\n\n\t@action\n\tprivate onSwitchToGraphView = () => {\n\t\t// % protected region % [Override onSwitchToGraphView here] off begin\n\t\tif (this.props.onRouteToGraphView){\n\t\t\tthis.props.onRouteToGraphView()\n\t\t} else {\n\t\t\tthis.component = 'graph';\n\t\t}\n\t\t// % protected region % [Override onSwitchToGraphView here] end\n\t};\n\n\t@action\n\tprivate onSwitchToListView = (date?: Date, replaceHistory?: boolean) => {\n\t\t// % protected region % [Override onSwitchToListView here] off begin\n\t\tif (this.props.onRouteToListView){\n\t\t\tthis.props.onRouteToListView(date, replaceHistory)\n\t\t} else {\n\t\t\tthis.component = 'list';\n\t\t\tthis.internalTimelineViewDate = date ? moment(date) : undefined;\n\t\t}\n\t\t// % protected region % [Override onSwitchToListView here] end\n\t};\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tif (this.loadingStatus === 'Loading') {\n\t\t\treturn ;\n\t\t}\n\n\t\tswitch (this.props.component ?? this.component){\n\t\t\tcase 'list':\n\t\t\t\treturn ;\n\t\t\tcase 'graph':\n\t\t\t\treturn ;\n\t\t}\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport {Redirect, Route, RouteComponentProps, Switch} from \"react-router\";\nimport moment, {Moment} from \"moment\";\nimport TimelineTile from 'Timelines/TimelineTile';\nimport {observer} from 'mobx-react';\nimport {observable} from 'mobx';\nimport {getTimelineEntityFromName} from 'Util/TimelineUtils';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\n@observer\nexport default class TimelinePage extends React.Component {\n\n\t@observable\n\tprivate timelineViewDate: Moment | undefined = undefined;\n\n\t// % protected region % [Add extra component logic here] off begin\n\t// % protected region % [Add extra component logic here] end\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tconst timelineTile = (pageProps: RouteComponentProps) => {\n\t\t\tconst params = pageProps.match.params;\n\t\t\tconst entityName = params['entity'];\n\t\t\tconst entityId = params['id'];\n\t\t\tconst component = params['component'];\n\n\t\t\tconst routeToComponent = (component: 'list' | 'graph', replace?: boolean) => {\n\t\t\t\tlet route = this.props.match.url + `/${component}`;\n\t\t\t\tif (entityName) {\n\t\t\t\t\troute += `/${entityName}`\n\t\t\t\t} if (entityId) {\n\t\t\t\t\troute += `/${entityId}`\n\t\t\t\t}\n\t\t\t\treplace\n\t\t\t\t\t? this.props.history.replace(route)\n\t\t\t\t\t: this.props.history.push(route);\n\t\t\t};\n\n\t\t\tconst routeToListView = (date? : Date, replaceHistory?: boolean) => {\n\t\t\t\tthis.timelineViewDate = date ? moment(date) : undefined;\n\t\t\t\trouteToComponent('list', replaceHistory);\n\t\t\t};\n\n\t\t\tconst routeToGraphView = (replaceHistory?: boolean) => {\n\t\t\t\trouteToComponent('graph', replaceHistory);\n\t\t\t};\n\n\t\t\tconst onClickViewItem = (entity: string, id: string) => {\n\t\t\t\tif (id) {\n\t\t\t\t\tthis.props.history.push(`/admin/${entity}/view/${id}`)\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t};\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { action } from 'mobx';\nimport * as AdminPages from './Pages/Admin/Entity';\nimport Auth from \"./Components/Auth/Auth\";\nimport AllUsersPage from './Pages/Admin/AllUsersPage';\nimport AdminPage from './Pages/Admin/AdminPage';\nimport Topbar from \"./Components/Topbar/Topbar\";\nimport PageLinks from './Pages/Admin/PageLinks';\nimport StyleguidePage from './Pages/Admin/StyleguidePage';\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport { Redirect, Route, RouteComponentProps, Switch } from 'react-router';\nimport { store } from \"Models/Store\";\nimport TimelinePage from \"./Pages/Admin/Timelines/TimelinePage\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n// % protected region % [Customize lazy imports here] off begin\nconst GraphiQlLazy = React.lazy(() => import(\"./Pages/Admin/Graphiql\"));\n// % protected region % [Customize lazy imports here] end\n\nexport default class Admin extends React.Component {\n\tprivate path = this.props.match.path === '/' ? '' : this.props.match.path;\n\t@action\n\tprivate setAppLocation = () => {\n\t\tstore.appLocation = 'admin';\n\t}\n\n\tpublic componentDidMount() {\n\t\tthis.setAppLocation();\n\t}\n\n\tpublic render() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
    \n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Topbar] off begin\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Topbar] end\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [Modify top level admin routing here] off begin\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [Modify top level admin routing here] end\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t}\n\n\tprivate adminSwitch = () => {\n\t\tif (!store.userGroups.some(ug => ug.hasBackendAccess)) {\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{\n\t\t\t\t// % protected region % [Override contents here] off begin\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t{\n\t\t\t\t// % protected region % [Override contents here] end\n\t\t\t\t}\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t{/* These routes require a login to view */}\n\n\t\t\t\t\t\t{/* Admin entity pages */}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any extra page routes here] off begin\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any extra page routes here] end\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t{\n\t\t\t\t// % protected region % [Add any admin footer content here] off begin\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t// % protected region % [Add any admin footer content here] end\n\t\t\t\t}\n\t\t\t\n\t\t);\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Redirect } from 'react-router';\nimport { Button, Display, Colors, Sizes } from '../Components/Button/Button';\nimport { action, observable } from 'mobx';\nimport { TextField } from '../Components/TextBox/TextBox';\nimport { IUserResult, store } from 'Models/Store';\nimport { SERVER_URL } from 'Constants';\nimport axios from 'axios';\nimport * as queryString from 'querystring';\nimport { ButtonGroup, Alignment } from 'Views/Components/Button/ButtonGroup';\nimport { Password } from 'Views/Components/Password/Password';\nimport { isEmail } from 'Validators/Functions/Email';\nimport alert from '../../Util/ToastifyUtils';\nimport { getErrorMessages } from 'Util/GraphQLUtils';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n// % protected region % [Customise ILoginState here] off begin\ninterface ILoginState {\n\tusername: string;\n\tpassword: string;\n\terrors: { [attr: string]: string };\n}\n// % protected region % [Customise ILoginState here] end\n\n// % protected region % [Customise defaultLoginState here] off begin\nconst defaultLoginState: ILoginState = {\n\tusername: '',\n\tpassword: '',\n\terrors: {},\n};\n// % protected region % [Customise defaultLoginState here] end\n\n// % protected region % [Add any extra constants here] off begin\n// % protected region % [Add any extra constants here] end\n\n@observer\n// % protected region % [Override class signature here] off begin\nexport default class LoginPage extends React.Component {\n// % protected region % [Override class signature here] end\n\t@observable\n\tprivate loginState: ILoginState = defaultLoginState;\n\n\t// % protected region % [Add any extra fields here] off begin\n\t// % protected region % [Add any extra fields here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\tif (store.loggedIn) {\n\t\t\treturn ;\n\t\t}\n\n\t\tcontents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    Login

    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t\treturn contents;\n\t}\n\t// % protected region % [Override render here] end\n\n\t// % protected region % [Override onLoginClicked here] off begin\n\t@action\n\tprivate onLoginClicked = (event: React.FormEvent) => {\n\t\tevent.preventDefault();\n\n\t\tthis.loginState.errors = {};\n\n\t\tif (!this.loginState.username) {\n\t\t\tthis.loginState.errors['username'] = \"Email Address is required\";\n\t\t} else if (!isEmail(this.loginState.username)) {\n\t\t\tthis.loginState.errors['username'] = \"This is not a valid email address\";\n\t\t}\n\t\tif (!this.loginState.password) {\n\t\t\tthis.loginState.errors['password'] = \"Password is required\";\n\t\t}\n\n\t\tif (Object.keys(this.loginState.errors).length > 0) {\n\t\t\treturn;\n\t\t} else {\n\t\t\taxios.post(\n\t\t\t\t`${SERVER_URL}/api/authorization/login`,\n\t\t\t\t{\n\t\t\t\t\tusername: this.loginState.username,\n\t\t\t\t\tpassword: this.loginState.password,\n\t\t\t\t})\n\t\t\t\t.then(({ data }) => {\n\t\t\t\t\tthis.onLoginSuccess(data);\n\t\t\t\t})\n\t\t\t\t.catch(response => {\n\t\t\t\t\tconst errorMessages = getErrorMessages(response).map((error: any) => {\n\t\t\t\t\t\tconst message = typeof error.message === 'object'\n\t\t\t\t\t\t\t? JSON.stringify(error.message)\n\t\t\t\t\t\t\t: error.message;\n\t\t\t\t\t\treturn (

    {message}

    );\n\t\t\t\t\t});\n\t\t\t\t\talert(\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    Login failed
    \n\t\t\t\t\t\t\t{errorMessages}\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t'error'\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t};\n\t// % protected region % [Override onLoginClicked here] end\n\n\t// % protected region % [Override onStartRegisterClicked here] off begin\n\t@action\n\tprivate onStartRegisterClicked = (event: React.MouseEvent) => {\n\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\t\tstore.routerHistory.push(`/register?${!!redirect ? `redirect=${redirect}` : ''}`);\n\t};\n\t// % protected region % [Override onStartRegisterClicked here] end\n\n\t// % protected region % [Override login success logic here] off begin\n\t@action\n\tprivate onLoginSuccess = (userResult: IUserResult) => {\n\t\tstore.setLoggedInUser(userResult);\n\n\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\n\t\tif (redirect && !Array.isArray(redirect)) {\n\t\t\tstore.routerHistory.push(redirect);\n\t\t} else {\n\t\t\tstore.routerHistory.push('/');\n\t\t}\n\t};\n\t// % protected region % [Override login success logic here] end\n\n\t// % protected region % [Override onForgottenPasswordClick here] off begin\n\t@action\n\tprivate onForgottenPasswordClick() {\n\t\tstore.routerHistory.push(`/reset-password-request`);\n\t};\n\t// % protected region % [Override onForgottenPasswordClick here] end\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}\n\n// % protected region % [Add additional exports here] off begin\n// % protected region % [Add additional exports here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\n\nexport interface IUserEntity {\n\temail: string,\n\tpassword: string,\n\t_confirmPassword: string,\n}\n\nexport const UserFields: ReadonlyArray = [\n\t'email',\n\t'password',\n\t'_confirmPassword',\n];","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Redirect } from 'react-router';\nimport { Button, Display, Colors, Sizes } from '../Components/Button/Button';\nimport { action, observable, runInAction } from 'mobx';\nimport { store } from 'Models/Store';\nimport axios from 'axios';\nimport * as queryString from 'querystring';\nimport { ButtonGroup, Alignment } from 'Views/Components/Button/ButtonGroup';\nimport If from 'Views/Components/If/If';\nimport { Combobox } from 'Views/Components/Combobox/Combobox';\nimport * as Models from '../../Models/Entities';\nimport _ from 'lodash';\nimport { Model } from 'Models/Model';\nimport { isRequired } from 'Util/EntityUtils';\nimport { getAttributeComponent } from 'Views/Components/CRUD/Attributes/AttributeFactory';\nimport alert from '../../Util/ToastifyUtils';\nimport { SERVER_URL } from 'Constants';\nimport { getErrorMessages } from 'Util/GraphQLUtils';\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport { EntityFormMode } from 'Views/Components/Helpers/Common';\nimport { IUserEntity, UserFields } from 'Models/UserEntity';\n// % protected region % [Add any extra imports or interfaces here] off begin\n// % protected region % [Add any extra imports or interfaces here] end\n\ninterface IRegistrationState {\n\terrors: { [attr: string]: string };\n\tselectedRegisterType: string,\n\tmodelToRegister: Model & IUserEntity | null,\n\temailSending: boolean,\n\temailSent: boolean,\n\t// % protected region % [Add extra registration state properties here] off begin\n\t// % protected region % [Add extra registration state properties here] end\n}\n\nconst defaultRegistrationState: IRegistrationState = {\n\tselectedRegisterType: '',\n\tmodelToRegister: null,\n\terrors: {},\n\temailSending: false,\n\temailSent: false,\n\t// % protected region % [Instantiate extra registration state properties here] off begin\n\t// % protected region % [Instantiate extra registration state properties here] end\n}\n\n// % protected region % [Customise class signature and class properties] off begin\n@observer\nexport default class RegistrationPage extends React.Component {\n\t// % protected region % [Customise class signature and class properties] end\n\t@observable\n\tprivate registrationState: IRegistrationState = defaultRegistrationState;\n\n\t@observable\n\tprivate displayMode: 'select-type' | 'register' = 'register';\n\n\tprivate registerableEntities: {value: string, display: string}[] = [\n\t];\n\n\t// % protected region % [Add extra constructor logic here] off begin\n\tconstructor(props: RouteComponentProps, context: any) {\n\t\tsuper(props, context);\n\n\t\tif (this.registerableEntities.length > 1) {\n\t\t\tthis.displayMode = 'select-type';\n\t\t} else {\n\t\t\tthis.displayMode = 'register';\n\t\t\tif (this.registerableEntities.length === 1) {\n\t\t\t\tthis.registrationState.selectedRegisterType = this.registerableEntities[0].display;\n\t\t\t\tthis.registrationState.modelToRegister = this.userEntityFactory(this.registerableEntities[0].value);\n\t\t\t}\n\t\t}\n\t}\n\t// % protected region % [Add extra constructor logic here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\tif (store.loggedIn) {\n\t\t\t// % protected region % [Override redirect here] off begin\n\t\t\treturn ;\n\t\t\t// % protected region % [Override redirect here] end\n\t\t}\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tconst selectRegisterType = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    What type of user are you?

    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\n\t\tconst entityAttrs = this.getRegisterEntityAttributes();\n\n\t\tconst registerNode = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t 1}>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t

    Registration

    \n\t\t\t\t\t
    Registering as a {_.startCase(this.registrationState.selectedRegisterType)}
    \n\t\t\t\t\t{entityAttrs}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\n\t\tconst emailSentMessageNode = (\n\t\t\t
    \n\t\t\t\t

    Registration successful

    \n\t\t\t\t

    Registration for email {this.registrationState.modelToRegister ? this.registrationState.modelToRegister.email : 'the user'} is successful.

    \n\t\t\t\t

    We already sent you a confirmation email. You have to confirm your email address before you can login

    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\n\t\tcontents = (\n\t\t\t<>\n\t\t\t\t{this.registrationState.emailSending && }\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{selectRegisterType}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{registerNode}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{emailSentMessageNode}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\n\t\treturn contents;\n\t}\n\n\tprivate getRegisterEntityAttributes = () => {\n\t\t// % protected region % [Override getRegisterEntityAttributes here] off begin\n\t\tif (!this.registrationState.modelToRegister) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tlet attributeOptions = this.registrationState.modelToRegister.getAttributeCRUDOptions();\n\t\t\tconst model = this.registrationState.modelToRegister;\n\t\t\treturn attributeOptions\n\t\t\t\t.filter(attributeOption => {\n\t\t\t\t\treturn isRequired(model, attributeOption.attributeName) ||\n\t\t\t\t\t\t(UserFields as string[]).indexOf(attributeOption.attributeName) >= 0\n\t\t\t\t})\n\t\t\t\t.map(attributeOption =>\n\t\t\t\t\tgetAttributeComponent(\n\t\t\t\t\t\tattributeOption,\n\t\t\t\t\t\tmodel,\n\t\t\t\t\t\tmodel.getErrorsForAttribute(attributeOption.attributeName),\n\t\t\t\t\t\tEntityFormMode.CREATE,\n\t\t\t\t\t\tisRequired(model, attributeOption.attributeName),\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tmodel ? model.validate.bind(model) : undefined\n\t\t\t\t\t));\n\t\t}\n\t\t// % protected region % [Override getRegisterEntityAttributes here] end\n\t};\n\n\t@action\n\tprivate onSubmitRegisterClicked = async (event: React.FormEvent) => {\n\t\t// % protected region % [Override onSubmitRegisterClicked here] off begin\n\t\tevent.preventDefault();\n\n\t\tthis.registrationState.errors = {};\n\t\tif (this.registrationState.modelToRegister) {\n\t\t\tawait this.registrationState.modelToRegister.validate();\n\t\t\tif (this.registrationState.modelToRegister.hasValidationError) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.submitRegister();\n\t\t}\n\t\t// % protected region % [Override onSubmitRegisterClicked here] end\n\t};\n\n\t@action\n\tprivate submitRegister = () => {\n\t\t// % protected region % [Override submitRegister here] off begin\n\t\tif (this.registrationState.modelToRegister) {\n\t\t\tconst userType = this.registrationState.modelToRegister.getModelName();\n\t\t\tconst data = this.registrationState.modelToRegister.toJSON({password: {}});\n\n\t\t\tthis.registrationState.emailSending = true;\n\n\t\t\taxios.post(\n\t\t\t\t`${SERVER_URL}/api/register/${_.kebabCase(userType)}`, data)\n\t\t\t\t.then(({ data }) => {\n\t\t\t\t\tthis.onRegistrationEmailSentSuccess();\n\t\t\t\t})\n\t\t\t\t.catch(response => {\n\t\t\t\t\trunInAction(() => {\n\t\t\t\t\t\tthis.registrationState.emailSending = false;\n\t\t\t\t\t});\n\t\t\t\t\tconst errorMessages = getErrorMessages(response).map((error: any) => (

    {error.message}

    ));\n\t\t\t\t\talert(\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    Registration is not successful
    \n\t\t\t\t\t\t\t{errorMessages}\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t'error'\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t\t// % protected region % [Override submitRegister here] end\n\t};\n\n\t@action\n\tprivate onCancelRegisterClicked = (event: React.MouseEvent) => {\n\t\t// % protected region % [Override onCancelRegisterClicked here] off begin\n\t\tevent.preventDefault();\n\t\tthis.resetRegistration();\n\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\t\tstore.routerHistory.push(`/login?${!!redirect ? `redirect=${redirect}` : ''}`);\n\t\t// % protected region % [Override onCancelRegisterClicked here] end\n\t};\n\n\t@action\n\tprivate onTypeConfirmed = (event: React.MouseEvent) => {\n\t\t// % protected region % [Override onTypeConfirmed here] off begin\n\t\tevent.preventDefault();\n\n\t\tthis.registrationState.errors = {};\n\t\tif (this.registerableEntities.length > 1 && !this.registrationState.selectedRegisterType) {\n\t\t\tthis.registrationState.errors['selectedRegisterType'] = \"You need to choose the registration type\";\n\t\t}\n\t\tif (Object.keys(this.registrationState.errors).length > 0) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tlet entityToRegister = null;\n\t\t\tif (this.registerableEntities.length > 1 && !!this.registrationState.selectedRegisterType) {\n\t\t\t\tentityToRegister = this.registrationState.selectedRegisterType;\n\t\t\t} else if (this.registerableEntities.length === 1) {\n\t\t\t\tentityToRegister = this.registerableEntities[0].value;\n\t\t\t}\n\t\t\tthis.displayMode = 'register';\n\t\t\tthis.registrationState.modelToRegister = this.userEntityFactory(entityToRegister);\n\t\t}\n\t\t// % protected region % [Override onTypeConfirmed here] end\n\t};\n\n\tprivate userEntityFactory = (entityToRegister: string | null): Model & IUserEntity | null => {\n\t\t// % protected region % [Override userEntityFactory here] off begin\n\t\tswitch(entityToRegister){\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t\t// % protected region % [Override userEntityFactory here] end\n\t};\n\n\t@action\n\tprivate onChangeUserType = (e: React.MouseEvent) => {\n\t\t// % protected region % [Override onChangeUserType here] off begin\n\t\te.preventDefault();\n\t\tthis.resetRegistration();\n\t\tthis.displayMode = 'select-type';\n\t\t// % protected region % [Override onChangeUserType here] end\n\t};\n\n\tprivate resetRegistration = () => {\n\t\t// % protected region % [Override resetRegistration here] off begin\n\t\tthis.registrationState = defaultRegistrationState;\n\t\t// % protected region % [Override resetRegistration here] end\n\t};\n\n\t@action\n\tprivate onRegistrationEmailSentSuccess = () => {\n\t\t// % protected region % [Override onRegistrationEmailSentSuccess here] off begin\n\t\tthis.registrationState.emailSending = false;\n\t\tthis.registrationState.emailSent = true;\n\t\t// % protected region % [Override onRegistrationEmailSentSuccess here] end\n\t};\n\n\tprivate onLoginClick = () => {\n\t\t// % protected region % [Override onLoginClick here] off begin\n\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\t\tstore.routerHistory.push(`/login?redirect=${redirect}`);\n\t\t// % protected region % [Override onLoginClick here] end\n\t};\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}\n\n// % protected region % [Add extra features here] off begin\n// % protected region % [Add extra features here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { SERVER_URL } from '../../Constants';\nimport { RouteComponentProps } from \"react-router\";\nimport queryString from \"querystring\";\nimport Spinner from 'Views/Components/Spinner/Spinner';\nimport If from 'Views/Components/If/If';\nimport axios from 'axios';\nimport { getErrorMessages } from 'Util/GraphQLUtils';\nimport { observable, runInAction, action } from 'mobx';\nimport alert from '../../Util/ToastifyUtils';\nimport { store } from 'Models/Store';\nimport { ButtonGroup, Alignment } from 'Views/Components/Button/ButtonGroup';\nimport { Button, Display, Sizes } from 'Views/Components/Button/Button';\n// % protected region % [Add any extra imports or interfaces here] off begin\n// % protected region % [Add any extra imports or interfaces here] end\n\n/**\n * Logs the user out of the application\n *\n * Can take a location query param that will redirect after the logout occurs\n */\n// % protected region % [Customise class signature and class properties] off begin\n@observer\nexport default class RegistrationConfirmPage extends React.Component {\n\t// % protected region % [Customise class signature and class properties] end\n\t@observable\n\tprivate loading: boolean = false;\n\t@observable\n\tprivate confirmed: boolean = false;\n\tprivate confirmEmailData: { token: string, email: string };\n\n\tpublic componentDidMount() {\n\t\tconst { token, username } = queryString.parse(this.props.location.search.substring(1)) || undefined;\n\t\tthis.confirmEmailData = {\n\t\t\ttoken: token as string,\n\t\t\temail: username as string\n\t\t};\n\t}\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\tlet pageContent = (\n\t\t\t
    \n\t\t\t\t

    Confirm your registration

    \n\t\t\t\t

    Please click the button below to finish your registration

    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\n\t\tif (this.confirmed) {\n\t\t\tpageContent = (\n\t\t\t\t
    \n\t\t\t\t\t{this.loading && }\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Registration successful

    \n\t\t\t\t\t\t\t

    Your email has been confirmed successfully

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\n\t\treturn pageContent;\n\t\t// % protected region % [Override render here] end\n\t}\n\n\tprivate onLoginClick = () => {\n\t\t// % protected region % [Override onLoginClick here] off begin\n\t\tconst { redirect } = queryString.parse(this.props.location.search.substring(1));\n\t\tif (redirect) {\n\t\t\tstore.routerHistory.push(`/login?redirect=${redirect}`);\n\t\t}\n\t\tstore.routerHistory.push('/login');\n\t\t// % protected region % [Override onLoginClick here] end\n\t};\n\n\t@action\n\tprivate onClickConfirm = () => {\n\t\t// % protected region % [Override onClickConfirm here] off begin\n\t\tthis.loading = true;\n\t\taxios.post(\n\t\t\t`${SERVER_URL}/api/register/confirm-email`, this.confirmEmailData)\n\t\t\t.then(({ data }) => {\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthis.loading = false;\n\t\t\t\t\tthis.confirmed = true;\n\t\t\t\t})\n\t\t\t})\n\t\t\t.catch(response => {\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthis.loading = false;\n\t\t\t\t})\n\t\t\t\tconst errorMessages = getErrorMessages(response).map((error: any) => (

    {error.message}

    ));\n\t\t\t\talert(\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    Email Confirmation was not successful
    \n\t\t\t\t\t\t{errorMessages}\n\t\t\t\t\t
    ,\n\t\t\t\t\t'error'\n\t\t\t\t);\n\t\t\t});\n\t\t// % protected region % [Override onClickConfirm here] end\n\t};\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}\n\n// % protected region % [Add extra features here] off begin\n// % protected region % [Add extra features here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Redirect } from 'react-router';\nimport { Button, Display, Sizes, Colors } from '../Components/Button/Button';\nimport { action, observable } from 'mobx';\nimport { TextField } from '../Components/TextBox/TextBox';\nimport { store } from 'Models/Store';\nimport { SERVER_URL } from 'Constants';\nimport axios from 'axios';\nimport { ButtonGroup, Alignment } from 'Views/Components/Button/ButtonGroup';\nimport { isEmail } from 'Validators/Functions/Email';\nimport alert from '../../Util/ToastifyUtils';\nimport { getErrorMessages } from 'Util/GraphQLUtils';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\ninterface IResetRequestState {\n\tusername: string;\n\terrors: { [attr: string]: string };\n\t// % protected region % [Add extra reset password request state properties here] off begin\n\t// % protected region % [Add extra reset password request state properties here] end\n}\n\nconst defaultResetRequestState: IResetRequestState = {\n\tusername: '',\n\terrors: {},\n\t// % protected region % [Instantiate extra reset password request state properties here] off begin\n\t// % protected region % [Instantiate extra reset password request state properties here] end\n};\n\n@observer\nexport default class ResetPasswordRequestPage extends React.Component {\n\t@observable\n\tprivate ResetRequestState: IResetRequestState = defaultResetRequestState;\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\tif (store.loggedIn) {\n\t\t\t// % protected region % [Override redirect here] off begin\n\t\t\treturn ;\n\t\t\t// % protected region % [Override redirect here] end\n\t\t}\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    Reset Password

    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override contents here] end\n\t\treturn contents;\n\t}\n\n\t@action\n\tprivate onResetPasswordClicked = (event: React.FormEvent) => {\n\t\t// % protected region % [Override onResetPasswordClicked here] off begin\n\t\tevent.preventDefault();\n\n\t\tthis.ResetRequestState.errors = {};\n\n\t\tif (!this.ResetRequestState.username) {\n\t\t\tthis.ResetRequestState.errors['username'] = \"Email Address is required\";\n\t\t} else if (!isEmail(this.ResetRequestState.username)) {\n\t\t\tthis.ResetRequestState.errors['username'] = \"This is not a valid email address\";\n\t\t}\n\n\t\tif (Object.keys(this.ResetRequestState.errors).length > 0) {\n\t\t\treturn;\n\t\t} else {\n\t\t\taxios.post(\n\t\t\t\t`${SERVER_URL}/api/account/reset-password-request`,\n\t\t\t\t{\n\t\t\t\t\tusername: this.ResetRequestState.username,\n\t\t\t\t})\n\t\t\t\t.then(({ data }) => {\n\t\t\t\t\tthis.onResetPasswordSent();\n\t\t\t\t})\n\t\t\t\t.catch(response => {\n\t\t\t\t\tconst errorMessages = getErrorMessages(response).map((error: any) => (

    {error.message}

    ));\n\t\t\t\t\talert(\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    Sending request failed
    \n\t\t\t\t\t\t\t{errorMessages}\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t'error'\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t\t// % protected region % [Override onResetPasswordClicked here] end\n\t};\n\n\t@action\n\tprivate onCancelResetClicked = (event: React.MouseEvent) => {\n\t\t// % protected region % [Override onCancelResetClicked here] off begin\n\t\tstore.routerHistory.push(`/login`);\n\t\t// % protected region % [Override onCancelResetClicked here] end\n\t};\n\n\t@action\n\tprivate onResetPasswordSent = () => {\n\t\t// % protected region % [Override onResetPasswordSent here] off begin\n\t\talert(`Reset Password Email has been sent to ${this.ResetRequestState.username}`, 'success');\n\t\tstore.routerHistory.push(`/login`);\n\t\t// % protected region % [Override onResetPasswordSent here] end\n\t};\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Redirect } from 'react-router';\nimport { Button, Display, Sizes } from '../Components/Button/Button';\nimport { action, observable } from 'mobx';\nimport { store } from 'Models/Store';\nimport { SERVER_URL } from 'Constants';\nimport axios from 'axios';\nimport { ButtonGroup, Alignment } from 'Views/Components/Button/ButtonGroup';\nimport alert from '../../Util/ToastifyUtils';\nimport { Password } from 'Views/Components/Password/Password';\nimport * as queryString from 'querystring';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\ninterface IResetPasswordState {\n\ttoken: string;\n\tusername: string;\n\tpassword: string;\n\tconfirmPassword: string,\n\terrors: { [attr: string]: string };\n\t// % protected region % [Add extra reset password state properties here] off begin\n\t// % protected region % [Add extra reset password state properties here] end\n}\n\nconst defaultResetPasswordState: IResetPasswordState = {\n\ttoken:'',\n\tusername: '',\n\tpassword: '',\n\tconfirmPassword:'',\n\terrors: {},\n\t// % protected region % [Instantiate extra reset password state properties here] off begin\n\t// % protected region % [Instantiate extra reset password state properties here] end\n};\n\n@observer\nexport default class ResetPasswordPage extends React.Component {\n\t@observable\n\tprivate resetPasswordState: IResetPasswordState = defaultResetPasswordState;\n\n\tconstructor(props:RouteComponentProps, context: any){\n\t\tsuper(props, context);\n\t\tlet queryParams = this.props.location.search.substring(1);\n\t\tconst { token, username } = queryString.parse(queryParams);\n\t\tthis.resetPasswordState.token = token as string;\n\t\tthis.resetPasswordState.username = username as string;\n\t}\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\tif (store.loggedIn) {\n\t\t\t// % protected region % [Override redirect here] off begin\n\t\t\treturn ;\n\t\t\t// % protected region % [Override redirect here] end\n\t\t}\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    Reset Password

    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override contents here] end\n\t\treturn contents;\n\t}\n\n\t@action\n\tprivate onResetPasswordClicked = (event: React.FormEvent) => {\n\t\t// % protected region % [Override onLoginClicked here] off begin\n\t\tevent.preventDefault();\n\n\t\tthis.resetPasswordState.errors = {};\n\n\t\tif (!this.resetPasswordState.password) {\n\t\t\tthis.resetPasswordState.errors['password'] = \"Password is required\";\n\t\t} else if (this.resetPasswordState['password'].length < 6) {\n\t\t\tthis.resetPasswordState.errors['password'] = \"The minimum length of password is 6\";\n\t\t} else if (!this.resetPasswordState['confirmPassword']){\n\t\t\tthis.resetPasswordState.errors['confirmPassword'] = \"Confirm password is required\";\n\t\t} else if (this.resetPasswordState['confirmPassword'] !== this.resetPasswordState.password) {\n\t\t\tthis.resetPasswordState.errors['confirmPassword'] = \"Password and confirm password does not match\";\n\t\t}\n\n\t\tif (Object.keys(this.resetPasswordState.errors).length > 0) {\n\t\t\treturn;\n\t\t} else {\n\t\t\taxios.post(\n\t\t\t\t`${SERVER_URL}/api/account/reset-password`,\n\t\t\t\t{\n\t\t\t\t\ttoken: this.resetPasswordState.token,\n\t\t\t\t\tusername: this.resetPasswordState.username,\n\t\t\t\t\tpassword: this.resetPasswordState.password,\n\t\t\t\t})\n\t\t\t\t.then(({ data }) => {\n\t\t\t\t\tthis.onConfirmPasswordSent();\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tconst errorMsgs = error.response.data.errors.map((error: any) => (

    {error.message}

    ));\n\t\t\t\t\talert(\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    Password could not be changed:
    \n\t\t\t\t\t\t\t{errorMsgs}\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t'error'\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t\t// % protected region % [Override onLoginClicked here] end\n\t};\n\n\t@action\n\tprivate onConfirmPasswordSent = () => {\n\t\t// % protected region % [Override login success logic here] off begin\n\t\talert(`Your password has been reset`, 'success');\n\t\tstore.routerHistory.push(`/login`);\n\t\t// % protected region % [Override login success logic here] end\n\t};\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { SERVER_URL } from '../../../Constants';\nimport { RouteComponentProps } from \"react-router\";\nimport queryString from \"querystring\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n/**\n * Logs the user out of the application\n *\n * Can take a location query param that will redirect after the logout occurs\n */\n@observer\nexport default class Logout extends React.Component {\n\tpublic componentDidMount() {\n\t\tconst location = queryString.parse(this.props.location.search.substring(1))['redirect'] || undefined;\n\t\tlet qry = `?redirect=${location ? `${location}` : '/'}`;\n\t\twindow.location.href = `${SERVER_URL}/api/authorization/logout${qry}`;\n\t}\n\n\tpublic render() {\n\t\treturn null;\n\t}\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Button, Colors } from 'Views/Components/Button/Button';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n// % protected region % [Customise class signature and class properties] off begin\n@observer\nexport default class PageNotFound extends React.Component {\n// % protected region % [Customise class signature and class properties] end\n\n\t// % protected region % [Add class properties here] off begin\n\t// % protected region % [Add class properties here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    404

    \n\t\t\t\t\t

    Oops! It seems like the page you are looking for does not exist!

    \n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn contents;\n\t}\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}\n\n// % protected region % [Add extra features here] off begin\n// % protected region % [Add extra features here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { observer } from 'mobx-react';\nimport { RouteComponentProps } from 'react-router';\nimport { Link } from 'react-router-dom';\nimport { Button, Colors } from 'Views/Components/Button/Button';\nimport { Alignment, ButtonGroup } from 'Views/Components/Button/ButtonGroup';\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\n// % protected region % [Customise class signature and class properties] off begin\n@observer\nexport default class PageAccessDenied extends React.Component {\n// % protected region % [Customise class signature and class properties] end\n\n\t// % protected region % [Add class properties here] off begin\n\t// % protected region % [Add class properties here] end\n\n\tpublic render() {\n\t\tlet contents = null;\n\n\t\t// % protected region % [Override contents here] off begin\n\t\tcontents = (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    403

    \n\t\t\t\t\t

    Oops! Unfortunately you are not allowed to access this page!

    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLogout\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t\t// % protected region % [Override contents here] end\n\n\t\treturn contents;\n\t}\n\n\t// % protected region % [Add class methods here] off begin\n\t// % protected region % [Add class methods here] end\n}\n\n// % protected region % [Add extra features here] off begin\n// % protected region % [Add extra features here] end\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport { action } from 'mobx';\nimport { store } from \"Models/Store\";\nimport { Route, RouteComponentProps, Switch, Redirect } from 'react-router';\nimport * as Pages from './Pages';\nimport Logout from \"./Components/Logout/Logout\";\nimport Auth from \"./Components/Auth/Auth\";\nimport PageNotFound from './Pages/PageNotFound';\nimport PageAccessDenied from './Pages/PageAccessDenied';\nimport Topbar from \"./Components/Topbar/Topbar\";\n// % protected region % [Add any extra imports here] off begin\n// % protected region % [Add any extra imports here] end\n\nexport default class Frontend extends React.Component {\n\t@action\n\tprivate setAppLocation = () => {\n\t\tstore.appLocation = 'frontend';\n\t}\n\n\tpublic componentDidMount() {\n\t\tthis.setAppLocation();\n\t}\n\n\tpublic render() {\n\t\tconst path = this.props.match.path === '/' ? '' : this.props.match.path;\n\n\t\t// % protected region % [Add any extra render logic here] off begin\n\t\t// % protected region % [Add any extra render logic here] end\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
    \n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Topbar] off begin\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Topbar] end\n\t\t\t\t\t}\n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Frontend] off begin\n\t\t\t\t\t}\n\t\t\t\t\t
    \n\t\t\t\t\t{\n\t\t\t\t\t// % protected region % [Modify Frontend] end\n\t\t\t\t\t}\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any header content here] off begin\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any header content here] end\n\t\t\t\t\t\t}\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{/* Public routes */}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// % protected region % [customize the universal public routes] off begin\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// % protected region % [customize the universal public routes] end\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// % protected region % [Add additional routes here] off begin\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// % protected region % [Add additional routes here] end\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{/* These routes require a login to view */}\n\t\t\t\t\t\t\t\t\t\t{/* Pages from the ui model */}\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [customize the page routes] off begin\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [customize the page routes] end\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [Add any extra page routes here] off begin\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// % protected region % [Add any extra page routes here] end\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any footer content here] off begin\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// % protected region % [Add any footer content here] end\n\t\t\t\t\t\t}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t}\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { action, observable } from 'mobx';\nimport Modal, { IModalProps } from './Modal';\n// % protected region % [Add extra imports here] off begin\n// % protected region % [Add extra imports here] end\n\ntype globalModalState = IModalProps & {children: React.ReactNode};\n\nexport interface IGlobalModal {\n\t/**\n\t * Shows a modal on the screen\n\t * @param label A label for the modal for screen readers\n\t * @param children The content to display inside the modal\n\t * @param modalProps\n\t */\n\tshow: (label: string, children: React.ReactNode, modalProps?: Partial) => void;\n\t/**\n\t * Hides the global dialog\n\t */\n\thide: () => void;\n}\n\n/**\n * A global modal that can be called imperatively from the store\n * This component should only be constructed by the top level App component\n */\n@observer\nexport default class GlobalModal extends React.Component implements IGlobalModal {\n\t// % protected region % [Override defaultModalState here] off begin\n\t/** Defaults for the modal state */\n\tprivate get defaultModalState(): globalModalState {\n\t\treturn {\n\t\t\tlabel: '',\n\t\t\tchildren: null,\n\t\t\tisOpen: false,\n\t\t\tclassName: undefined,\n\t\t\tonRequestClose: this.hide,\n\t\t};\n\t}\n\t// % protected region % [Override defaultModalState here] end\n\n\t/**\n\t * The props of the modal controlled by this component\n\t */\n\t@observable\n\tprivate modalState: globalModalState = this.defaultModalState;\n\t// % protected region % [Override show here] off begin\n\t/** @inheritDoc */\n\t@action\n\tpublic show = (label: string, children: React.ReactNode, modalProps: Partial = {}) => {\n\t\tthis.modalState = {\n\t\t\t...this.defaultModalState,\n\t\t\tisOpen: true,\n\t\t\tchildren,\n\t\t\tlabel,\n\t\t\t...modalProps,\n\t\t};\n\t}\n\t// % protected region % [Override show here] end\n\t// % protected region % [Override hide here] off begin\n\t/** @inheritDoc */\n\t@action\n\tpublic hide = () => {\n\t\tthis.modalState.isOpen = false;\n\t}\n\t// % protected region % [Override hide here] end\n\n\t// % protected region % [Override render here] off begin\n\tpublic render() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{this.modalState.children}\n\t\t\t\n\t\t);\n\t}\n\t// % protected region % [Override render here] end\n}","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport * as React from 'react';\nimport Cookies from 'js-cookie';\nimport Admin from './Views/Admin';\nimport Frontend from './Views/Frontend';\nimport { Route, Router, Switch } from 'react-router';\nimport { Provider } from 'mobx-react';\nimport { store } from './Models/Store';\nimport { ApolloProvider } from 'react-apollo';\nimport { default as ApolloClient, Operation } from 'apollo-boost';\nimport { SERVER_URL } from 'Constants';\nimport { isServerError } from './Util/GraphQLUtils';\nimport { configure, runInAction } from 'mobx';\nimport { createBrowserHistory } from 'history';\nimport { ErrorResponse } from 'apollo-link-error';\nimport { ToastContainer } from 'react-toastify';\nimport GlobalModal from './Views/Components/Modal/GlobalModal';\n// % protected region % [Add extra page imports here] off begin\n// % protected region % [Add extra page imports here] end\n\nexport default class App extends React.Component {\n\tconstructor(props: any, context: any) {\n\t\tsuper(props, context);\n\t\tstore.routerHistory = createBrowserHistory();\n\n\t\tstore.apolloClient = new ApolloClient({\n\t\t\turi: `${SERVER_URL}/api/graphql`,\n\t\t\trequest: this.onApolloRequest,\n\t\t\tonError: this.onApolloError,\n\t\t});\n\n\t\t// All state changes should be run in an action so enforce that\n\t\tconfigure({ enforceActions: 'observed' });\n\n\t\t// For cross platform mobile responsiveness\n\t\tconst defineViewportHeight = () => {\n\t\t\tlet vh = window.innerHeight * 0.01;\n\t\t\tdocument.documentElement.style.setProperty('--vh', `${vh}px`);\n\t\t};\n\t\tdefineViewportHeight();\n\t\twindow.addEventListener('resize', () => defineViewportHeight());\n\n\t\t// % protected region % [Add extra constructor logic here] off begin\n\t\t// % protected region % [Add extra constructor logic here] end\n\n\t};\n\n\tpublic render() {\n\t\t// % protected region % [Override render here] off begin\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t<>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t ref ? store.modal = ref : undefined} />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t\t// % protected region % [Override render here] end\n\t};\n\n\t/**\n\t * Request handler for the apollo client\n\t * @param operation\n\t */\n\tprivate onApolloRequest = async (operation: Operation) => {\n\t\toperation.setContext({\n\t\t\theaders: {\n\t\t\t\t'X-XSRF-TOKEN': Cookies.get('XSRF-TOKEN'),\n\t\t\t},\n\t\t});\n\t};\n\n\t/**\n\t * Error Handler for the apollo client\n\t * @param error\n\t */\n\tprivate onApolloError = (error: ErrorResponse) => {\n\t\tif (isServerError(error.networkError) && error.networkError.statusCode === 401) {\n\t\t\trunInAction(() => {\n\t\t\t\tstore.clearLoggedInUser();\n\t\t\t\tstore.routerHistory.push(`/login?redirect=${store.routerHistory.location.pathname}`);\n\t\t\t});\n\t\t}\n\t};\n\n\t// % protected region % [Add extra methods here] off begin\n\t// % protected region % [Add extra methods here] end\n}\n","/*\n * @bot-written\n *\n * WARNING AND NOTICE\n * Any access, download, storage, and/or use of this source code is subject to the terms and conditions of the\n * Full Software Licence as accepted by you before being granted access to this source code and other materials,\n * the terms of which can be accessed on the Codebots website at https://codebots.com/full-software-licence. Any\n * commercial use in contravention of the terms of the Full Software Licence may be pursued by Codebots through\n * licence termination and further legal action, and be required to indemnify Codebots for any loss or damage,\n * including interest and costs. You are deemed to have accepted the terms of the Full Software Licence on any\n * access, download, storage, and/or use of this source code.\n *\n * BOT WARNING\n * This file is bot-written.\n * Any changes out side of \"protected regions\" will be lost next time the bot makes any changes.\n */\nimport 'graphiql/graphiql.css';\nimport 'react-toastify/dist/ReactToastify.css';\nimport 'react-contexify/dist/ReactContexify.min.css';\nimport 'semantic-ui-css/semantic.min.css';\nimport './scss/main.scss';\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport App from './App';\nimport { store } from './Models/Store';\nimport * as Models from 'Models/Entities'\n// % protected region % [Add any extra index imports here] off begin\n// % protected region % [Add any extra index imports here] end\n\n// Add the store to the global scope for easy debugging from the console\nwindow['store'] = store;\nwindow['Models'] = Models;\n\n// % protected region % [Add any extra index fields here] off begin\n// % protected region % [Add any extra index fields here] end\n\n\n// % protected region % [Override render here] off begin\nReactDOM.render(, document.getElementById('root') as HTMLElement);\n// % protected region % [Override render here] end\n"],"sourceRoot":""}