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A,OAEJlmC,WAAYL,IAAem8J,cAGnC,CACIlmH,IAAK,UACL/oC,MAAO,CACHq5B,WAAY,CACR,KACA,MACA,MACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,OAEJlmC,WAAYL,IAAem8J,cAGnC,CACIlmH,IAAK,QACL/oC,MAAO,CACHq5B,WAAY,CACR,MACA,OACA,MACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,MAEJlmC,WAAYL,IAAem8J,cAGnC,CACIlmH,IAAK,WACL/oC,MAAO,CACHq5B,WAAY,CACR,OACA,YACA,MACA,MACA,OAEJlmC,WAAYL,IAAem8J,cAGnC,CACIlmH,IAAK,OACL/oC,MAAO,CACHq5B,WAAY,CACR,OACA,MACA,MACA,MACA,KACA,MACA,MACA,OACA,MACA,MACA,MACA,OACA,aACA,cACA,eACA,SACA,MACA,MACA,MACA,QACA,UACA,IACA,MACA,MACA,UACA,KACA,MACA,MACA,OACA,KACA,MACA,MACA,QACA,MACA,SACA,SACA,MACA,MACA,MACA,KACA,SACA,OACA,SACA,MACA,MACA,MACA,IACA,MACA,KACA,QACA,MACA,MACA,OACA,KACA,YACA,MACA,MACA,IACA,MACA,MACA,KACA,MACA,WACA,MACA,UACA,UACA,YACA,KACA,SACA,MACA,IACA,MACA,OACA,aACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,QACA,OACA,MACA,OACA,KACA,OACA,MACA,SACA,MACA,IACA,OACA,MACA,OACA,MACA,MACA,MACA,MACA,IACA,MACA,OACA,WACA,SACA,KACA,SACA,WACA,QACA,OACA,KACA,MACA,MACA,MACA,KACA,MACA,MACA,OACA,YACA,IACA,MACA,QACA,MACA,OACA,OACA,OACA,OACA,QACA,KACA,KACA,MACA,KACA,UACA,MACA,SACA,OACA,OACA,MACA,KACA,KACA,MACA,IAC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B,CAEOE,kBACH,IAAIzsP,EAEJ,OAAI3E,KAAKkxP,YAAc/2G,IAAahY,KAChCx9H,EAASw1I,IAAanY,OACjBhiI,KAAKkxP,YAAc/2G,IAAa+4B,gBACrCvuK,EAASw1I,IAAag5B,uBAEnBxuK,CACX,mDC5EG,MAAMC,EAAc,CACvBysP,OAAO,EACPC,YAAY,EACZnmP,OAAQomP,yBAAyBC,UACjC/hP,aAAc8hP,yBAAyBC,UACvCv7N,UAAW,QACXE,WAAY,SACZsrL,sBAAsB,EACtBgwC,+BAA+B,EAC/BC,aAAc,CACVzvP,IAAK,8BACLwI,GAAI,IAERpE,SAAU,cACVxB,YAAa0sP,yBAAyBI,qGCPtC/sP,EAAY0sP,eACZM,SAGJC,OAAyBC,gBAAgB3oO,KACpC9d,MAAM6N,GAAOvJ,QAAQnE,MAAM0N","names":["i0","_c1","ctx_r1","SiteName","$event","_r1","blockDrop","AppComponent_div_3_a_3_Template","AppComponent_div_3_div_4_Template","BannerColor","ShowAppChrome","_c2","BackgroundColor","_c3","TextColor","LeftText","CenterText","RightText","AppComponent","ScriptableBaseComponent","resetTimer","event","this","millsecondsSinceLastInteraction","constructor","router","route","currentUserService","currentSiteService","communicationService","keepAliveService","dialog","matIconRegistry","domSanitizer","settingsService","localStorageService","fieldDefinitionService","navigationService","queryParamsService","renderer","dateAdapter","attachmentService","formFieldTypeAndNameService","elForBaseClass","super","showHeader","currentUrl","skipLink","showFooter","events","pipe","filter","e","NavigationStart","subscribe","url","toLowerCase","indexOf","workflowURLRefresh","get","BrowserStorageEnums","NEW_WORKFLOW_REFRESH","navigate","clearWorkflowURLRefresh","formInstanceURLRefresh","NEW_FORM_INSTANCE_REFRESH","clearFormInstanceURLRefresh","set","GOTO","NavigationEnd","pushOnUrl","nav","getCurrentNavigation","extras","state","menuText","PREVNAVBREADCRUMBSLABEL","loadAppMatIcons","loadSettings","then","response","settings","listenForTimeout","initializeFieldTypesAndNames","ngOnInit","setTimeout","applicationIsAvailableToTheUser","isForcedLogout","getAll","fieldDefinitions","HideAppChrome","ev","UtilityHelper","setWorkflowURLRefresh","setFormInstanceURLRefresh","appClick","ShowBanner","retVal","environment","bannerColor","SealImagePath","FileType","ItemTypeEnum","FILE","Site","leftBannerText","centerBannerText","rightBannerText","backgroundColor","textColor","doOnActiviation","component","skipLinkChanged","newLink","LandingPageComponent","landingPageComponent","loginEmitterSubscription","loginEmitter","logInOutComponent","logIn","ShowFooter","deactivateAll","unsubscribe","sitename","interval","timeoutAfter","warn","timeout","setInterval","user","clearInterval","logOut","dialogRef","open","ConfirmationDialogComponent","data","ConfirmationDialogModel","minutes","seconds","hideNo","dialogType","ConfirmationDialogEnums","WARNING","disableClose","afterClosed","yes","pingTheBackend","bellFillUrl","bypassSecurityTrustResourceUrl","addSvgIcon","bellOutlineUrl","notificationAddUrl","puzzlePieceUrl","trashUrl","static","__ngFactoryType__","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12","i13","i14","i15","i16","_angular_core__WEBPACK_IMPORTED_MODULE_20__","VBU","selectors","viewQuery","rf","ctx","AppComponent_div_3_Template","AppComponent_div_4_Template","ClaimResolver","claimService","resolve","getClaims","claims","core","jDH","factory","ɵfac","DataCollectionResolver","dataCollectionService","id","params","isCurrentSite","Promise","reject","site","skipLocationChange","MenuService","http","serviceUrl","apiUrl","toPromise","catch","handleError","x","error","message","loadAppMenu","loadCollectionMenu","MenuResolver","menuService","menu","AdminComponent","navMenu","userClaims","inputs","standalone","decls","vars","consts","template","HomeComponent","ctx_r0","Message","HttpErrorComponent","location","updateUrlStateToRoot","Url","replaceState","HttpErrorComponent_div_1_Template","HttpErrorComponent_div_2_Template","SiteComponent","element","hasMatListItems","AdditionalElementInfo","innerTextSelector","currentSite","foo","UserClaims","features","name","currentStatus","routes","path","loadChildren","all","__webpack_require__","bind","module","HomeModule","requiredClaim","canActivate","ClaimGuard","AdminModule","SiteModule","PrintableFormComponent","formInstance","FormInstanceResolver","AppRoutingModule","$C","G2t","UnsavedChangesGuard","HomePageRouteGuard","imports","RouterModule","forRoot","onSameUrlNavigation","scrollPositionRestoration","CasService","casUrl","loginSiteUrl","getProxyTicket","console","log","body","toString","JSON","stringify","statusText","targetUrl","substr","length","ticket","headers","keys","status","getDomain","simpleGet","domain","HttpRequestInterceptor","intercept","req","next","clone","withCredentials","handle","LoadingSpinnerComponent","loaderService","showLoadingSpinner","showPollingSpinner","showLoadingMask","isLoading","v","loadingTimeoutId","hideLoadingMask","clearTimeout","isPolling","pollingTimeoutId","showPollingMask","hidePollingMask","$","modal","uppercaseSiteWorkflowState","SideNavContainerComponent_mat_sidenav_1_span_3_span_2_Template","menuTitle","showStatusInTitle","item_r4","icon","text","_r3","$implicit","navigateTo","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_1_mat_icon_1_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_1_mat_icon_2_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_1_div_3_Template","_c0","HasMatIcon","HasSvgIcon","opened","_r5","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_2_mat_icon_1_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_2_mat_icon_2_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_2_div_3_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_1_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_mat_list_item_2_Template","has","claim","ShowHomePageMenuItem","toggleMenu","SideNavContainerComponent_mat_sidenav_1_span_3_Template","SideNavContainerComponent_mat_sidenav_1_mat_icon_4_Template","SideNavContainerComponent_mat_sidenav_1_mat_icon_5_Template","SideNavContainerComponent_mat_sidenav_1_ng_container_8_Template","AppSideNavClasses","siteWorkflowState","navItems","SideNavContainerComponent","activatedRoute","browserStorageService","userToggled","SIDENAV_WIDTH","split","emitChangeToSkipNavLink","setOpenedState","setMenuExpansion","ngOnChanges","changes","previousValue","currentValue","forEach","PREV","PREVNAVBREADCRUMBSURL","selectCurrentRoute","workflowState","folders","currentWorkflowState","toUpperCase","urls","item","foundItem","DataCollectionStatus","SETUP","CLOSED","opt","isChild","found","endsWith","openMenu","toggleOpenedState","IconFormatMatIcon","IconFormatEnum","MAT_ICON","IconFormatSvg","SVG_ICON","undefined","iconFormat","savedOpenState","SIDE_NAV_OPEN","cls","AppSideNavContentClasses","SiteHomePage","isActive","showWhenSiteHomePageEnabledAndActive","content","runWhenStackClear","attr","menuOption","urlSegment","goBack","startsWith","snapshot","join","previousUrl","popOffPreviousUrl","navigateByUrl","mainContent","focus","title","SideNavContainerComponent_mat_sidenav_1_Template","URLS_TO_SKIP","LoaderIntercepter","progressIndicatorService","requests","removeRequest","i","splice","skipThisRequest","push","Observable","create","observer","subscription","HttpResponse","err","showErrorDialog","setForcedLogout","setIdleLogout","logout","Description","substring","document","hideProgress","complete","matched","match","technicalInfo","correlationId","trim","detail","AlertDialogComponent","maxWidth","AlertDialogModel","TestConfiguration","TestConfigurationService","CollectApiServiceBase","providedIn","StatusText","Mode","Value","BufferValue","Color","ProgressIndicatorComponent","changeDetector","mode","ProgressBarConstants","BUFFER_MODE","color","THEME_PALETTE_WARN","progressUpdateInfo","registerListener","ngOnDestroy","progressUpdated","statusMessage","statusTextParam","statusUpdate","ProgressStatusUpdateEnum","PROGRESS_UPDATED","PROGRESS_COMPLETED","detectChanges","ProgressUpdateInfo","statusValue","bufferValue","ProgressIndicatorComponent_div_1_Template","ProgressIndicatorComponent_ng_template_2_Template","showSiteName_r2","GlobalErrorHandler","injector","Router","includes","Logging","test","stack","window","reload","DragDropFilesDirective","fileDropped","EventEmitter","fileEntered","onDragOver","evt","preventDefault","stopPropagation","fileOver","emit","onDragLeave","ondrop","files","dataTransfer","FsC","hostVars","hostBindings","CrossSiteUserFavoriteFormsStateInfo","gridState","sort","skip","take","filters","logic","CrossSiteUserFavoriteFormsResults","results","resultsAsPlainObjects","total","CrossSiteUserFavoriteFormsService","BehaviorSubject","endpoint","loading","read","fetch","tap","gridData","action","post","map","dataFromServer","dc","plainObj","formId","formName","siteId","folderId","siteName","modifiedDate","CustomDateFormatDirective","applyDateFormattingUsing","modifiedBy","isFavorite","CrossSiteUserFavoriteFormsRemoteBindingDirective","DataBindingDirective","grid","service","serviceSubscription","notifyDataChange","rebind","exportAs","dataItem_r3","_r2","ctx_r3","openForm","toggleFave","favIcon","columnDef_r5","fieldName","CrossSiteUserFavoriteFormsComponent","formInstanceService","helper","KendoGridHelper","kendoGridData","columnDefs","width","dataItem","doToggleFavorite","toggleIsFavorite","fi","SortSettings","initialDirection","allowUnsort","showIndexes","ColumnDefs","Helper","PageSize","Skip","Sort","setIndexOfClickedRow","Filters","CrossSiteUserFavoriteFormsComponent_ng_template_3_Template","CrossSiteUserFavoriteFormsComponent_ng_container_4_Template","applyClickedRowClassToClickedRow","SiteGridData","SiteGridDataService","getAllForSystemAdmin","modifiedByUserName","lastAccessedDate","lastAccessedByCurrentUser","description","purpose","siteIsAdministerable","SiteGridRemoteBindingDirective","siteGridDataService","ShowAllForAdmin","showAllForAdmin","value","SiteGridStateInfo","ctx_r2","toggleShowAllForAdmin","ShowAllForAdminButtonText","_r4","handleNewSite","handleSiteImport","_r6","handleClearFilters","SiteGridComponent_ng_template_2_button_0_Template","SiteGridComponent_ng_template_2_button_1_Template","SiteGridComponent_ng_template_2_button_2_Template","SiteGridComponent_ng_template_2_ng_container_3_Template","ShowAllForAdminButton","IsBeingFiltered","dataItem_r8","_r7","toggleFavorite","SiteGridComponent_kendo_grid_column_3_ng_template_1_Template","FavoriteColumnDef","dataItem_r10","_r9","toggleSiteAdmin","showAllForAdminIcon","SiteGridComponent_kendo_grid_column_4_ng_template_1_Template","_r13","dataItem_r12","deleteSite","_r11","openSite","SiteGridComponent_ng_template_6_mat_icon_3_Template","ShowDeleteButtons","columnDef_r14","SiteGridComponent_ng_container_7_kendo_grid_column_1_Template","CopyLink_MenuItem","SiteGridComponent","clipboard","menuItems","delete","remoteBindingDirectiveRef","addAsSiteAdmin","removeAsSiteAdmin","CollectionDetailDialog","result","collection","DataCollection","ProgressConfig","dialogConfig","MatDialogConfig","hasBackdrop","ImportSiteDialog","importedSiteId","onCellClick","type","originalEvent","ContextMenuDataItem","gridContextMenu","show","left","pageX","top","pageY","onContextMenuSelect","eventData","origin","copy","isSystemAdmin","CommandColumnWidth","MenuItems","find","SiteGridComponent_ng_template_2_Template","SiteGridComponent_kendo_grid_column_3_Template","SiteGridComponent_kendo_grid_column_4_Template","SiteGridComponent_ng_template_6_Template","SiteGridComponent_ng_container_7_Template","CrossSiteUserNotificationsStateInfo","CrossSiteUserNotificationsService","CrossSiteUserNotificationsResults","isSuscribedToWorkflowChanges","CrossSiteUserNotificationsRemoteBindingDirective","toggleSubscribed","SubscribedIcon","CrossSiteUserNotificationsComponent","doToggleSubscribed","newIsSubscribedValue","toggleIsSubscribedToWorkflowChanges","CrossSiteUserNotificationsComponent_ng_template_3_Template","CrossSiteUserNotificationsComponent_ng_container_4_Template","AppInjector","AppModule","bootstrap","provide","MAT_DIALOG_DEFAULT_OPTIONS","useValue","autoFocus","HTTP_INTERCEPTORS","useClass","multi","LoaderService","KeepAliveService","AsyncJobService","CurrentUserService","AdminService","ClaimService","CommunicationService","NavigationService","DataCollectionService","FolderService","FormInstanceService","SiteResponseManagementService","SiteResponseManagementResolver","WorkflowService","WorkflowResolver","SettingsService","BrowserStorageService","ProgressIndicatorService","AttachmentService","DeleteOnConfirmDialogService","CopySiteService","PermissionsPreviewService","DragDropService","ImportMetadataService","ExportMetadataService","ImportDataService","ExportDataService","ExcelExportService","GeocodeService","FormFieldTypeAndNameService","NotificationService","EventSubscriptionService","ComponentHierarchyService","HtmlElementTypeService","ExcelTemplateService","SiteIconService","SiteETLService","RoleService","ExcelImportService","FormBuilderService","ErrorHandler","DateAdapter","CustomDatePickerAdapter","MAT_DATE_FORMATS","CUSTOM_DATE_FORMATS","GridModule","SharedModule","BrowserModule","BrowserAnimationsModule","MatTooltipModule","HttpClientModule","ContextMenuComponent","FormsModule","ReactiveFormsModule","MatProgressBarModule","MatDatepickerModule","MatNativeDateModule","TreeModule","ContextMenuModule","LogInOutComponent","FileUploadDialogComponent","DocumentPublishingComponent","SelectedComponentInfoComponent","SelectedNodeElementComponent","UITestCenterDialog","i17","i18","i19","NgDragDropModule","ngModule","providers","NgDragDropService","fesm2022_core","FieldDefinitionService","CommonModule","MatMenuModule","MatCardModule","MatSidenavModule","MatIconModule","MatListModule","MatToolbarModule","MatExpansionModule","MatInputModule","MatFormFieldModule","MatButtonModule","MatSelectModule","MatDialogModule","MatRadioModule","MatCheckboxModule","MatSlideToggleModule","MatButtonToggleModule","MatProgressSpinnerModule","MatTableModule","MatSortModule","MatTabsModule","MatAutocompleteModule","DragDropModule","DndModule","MatBottomSheetModule","ListViewComponent","TileViewComponent","GridViewComponent","IconDirective","currentFolderService","SPECIAL_CASES","SITE_SUMMARY","SITE_PERMISSIONS","doClaimServiceCall","hasClaim","parent","redirectToWhenCannotActivate","siteIdFromParentRoute","parseInt","Folder","getRootFolder","_angular_core__WEBPACK_IMPORTED_MODULE_4__","initialRouteToActiviateForUser","_angular_core__WEBPACK_IMPORTED_MODULE_1__","canDeactivate","hasUnsavedChanges","confirm","_angular_core__WEBPACK_IMPORTED_MODULE_0__","CurrentUser","groups","isSiteCreator","isProdSiteCreator","hasAccessibleSites","accessibleSites","setCookieUrl","checkCookieUrl","noOpUrl","initialRouteToActiviateUrl","cookieName","initialLoad","_browserOk","parseUri","host","_user","userIsLoggedIn","browserOk","siteUrl","getIdleLogout","IDLELOGOUT","SESSION_SCOPE","isIdleLogout","val","FORCEDLOGOUT","browserCheck","preFlight","options","login","loginPromise","Object","assign","displayName","firstName","middleName","lastName","orgTag","authenticationGroups","maxAuthenticationGroups","idleLogout","localStorage","setItem","href","UserImpersonationService","impersonate","userId","stopImpersonating","checkIfImpersonating","getImpersonatableUsers","openUITestCenter","user_r6","mfUserid","LogInOutComponent_div_0_div_2_ng_container_2_ng_container_17_button_1_Template","impersonatableUsers","sendFeedback","userinfo","about","whatsnew","LogInOutComponent_div_0_div_2_ng_container_2_ng_container_14_Template","LogInOutComponent_div_0_div_2_ng_container_2_ng_container_17_Template","LogInOutComponent_div_0_div_2_ng_container_2_button_18_Template","menu_r8","UserIsSystemAdmin","doingImpersonation","LogInOutComponent_div_0_div_2_div_1_Template","LogInOutComponent_div_0_div_2_ng_container_2_Template","LogInOutComponent_div_0_ng_container_1_Template","LogInOutComponent_div_0_div_2_Template","isLoggedIn","loginButtonHidden","impersonationService","myUrl","myLocation","startingUrl","setStartingUrl","loginPage","encodeURIComponent","logoutPage","hideLoginButton","alert","UITestCenterDialogManager","openDialogUsing","URL","lastUrl","getItem","pathname","LogInOutComponent_div_0_Template","AccessibilityHelper","MOUSE_EVENT","KEYBOARD_EVENT","addAttribute","attribute","retries","int","setFocus","wait","is","focusOnMainContent","isNotFirstNavigationEvent","originalEventIsKeyboardEvent","history","originalEventType","navigationId","preventDoubleHitOnEvent","target","blur","deduceEventType","MouseEvent","clientX","clientY","KeyboardEvent","parse","dateInput","month","year","day","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","NativeDateAdapter","format","date","select_r3","removeChip","removeAllChips","data_r7","optionClicked","toggleSelection","selected","AutocompleteComponent_div_4_ng_container_4_Template","AutocompleteComponent_div_4_mat_chip_row_5_Template","blurred","clearOptions","preventBackspaceExitingFocus","setTriggerStatusIconClick","AutocompleteComponent_div_4_mat_option_14_Template","chipControl","Required","SelectedData","ShowRemoveAll","auto_r9","chipList_r8","separatorKeysCodes","selectControl","DropDownIcon","filteredData","data_r12","optionSelectedSingle","_r10","singleBlurred","AutocompleteComponent_ng_template_5_mat_option_6_Template","auto_r13","AutocompleteComponent","autocompleteService","selectedItems","onBlur","UntypedFormControl","ENTER","COMMA","singleDropDownOptions","displayFn","searchValue","fie_id","rawData","filterString","_dropDownIcon","_totalCount","hasStartsWith","hasContains","isRequired","showChipList","_autocompleteService","selectableValues","current","firstValueIsBlank","secondValueIsSelectedValue","getRawValue","setValue","Title","HideRequiredMarker","TotalCount","ShowChipList","autocompleteInput","nativeElement","matAutocompleteTrigger","panelOpen","closePanel","openPanel","setTriggerStatusInputClick","valid","inputValue","some","setData","passedData","isSingle","valueChanges","debounceTime","switchMap","autocompleteServiceSearch","panelClosingActions","setFIE_ID","setHasStartsWith","setHasContains","setIsRequired","setShowChipList","emitAdjustedData","queryString","fie_ID","request","formInstanceElement","formFieldId","FlexibleSelectionFieldInstructionsRequest","selectedValuesByFormField","search","contains","totalCount","_angular_core__WEBPACK_IMPORTED_MODULE_3__","AutocompleteComponent_span_3_Template","AutocompleteComponent_div_4_Template","AutocompleteComponent_ng_template_5_Template","noChipList_r14","FileUploaderComponent","filesUploaded","openUploadDialog","formInstanceElementId","attachmentId","attachmentTitle","keyValues","FileUploadDialogKeyValues","dataCollectionId","formInstanceId","attachmentCount","height","hshUploadedFileInfo","handleFilesUploaded","outputs","pair_r5","deleteFCpair","constraintName","listConstraintColumnName","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_div_52_div_9_Template","FieldColumnPairs","con_r6","col_r7","src_r8","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_option_79_span_1_Template","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_option_79_span_2_Template","handleModelChange","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_div_52_Template","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_spinner_57_Template","onSelectConstraint","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_option_59_Template","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_spinner_64_Template","onSelectColumn","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_option_66_Template","onSelectSourceField","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_mat_option_79_Template","FieldNameErrorMsg","LoadingConstraints","Constraints","LoadingColumns","Columns","AvailableSourceFields","onSave","FlexibleSelectionFieldConfigurationComponent_form_0_div_1_Template","cancelClicked","ngFormGroup","NgFormGroup","formField","FormFieldListConstraintColumn","columnId","listConstraintColumnId","FlexibleSelectionFieldConfigurationComponent","formFieldService","flexibleSelectionFieldService","fb","save","loadingConstraints","loadingColumns","selectedConstraintIsSimpleList","form","Form","fieldInsideGridCol","group","toolTip","placeholderText","instructionsText","hasFootnote","autoCompleteEnabled","minimumSelections","maximumSelections","selectedConstraintName","selectedConstraintColumnName","ListConstraintColumnId","dependsOnParentFormFieldId","dependsOnParentFormFieldName","formFields","fieldColumnPairs","required","defaultValue","formTemplateId","gridColClientId","getSiteNamedListValueConstraints","constraints","selectedConstraint","c","listValuesConstraintName","constraintType","FormFieldConstraintTypeEnum","SimpleListValues","index","newCol","columnName","getMetadataFields","metadataFields","allFieldInfo","AllFieldInfo","availableSourceFields","AllFieldsSortedByNameAscending","getFieldClientLogicHandler","fieldDefinitionClassName","canParticipateInFlexFieldBehavior","fieldNameErrorMsg","FieldInsideGridCol","SelectedConstraintId","SelectedColumnId","GetColumns","res","controls","disable","simpleListCol","formFieldListValuesConstraintId","fcp","formFieldName","constraintId","enable","col","addFCpair","selectedSourceField","getFieldDefinition","isMetadataField","metadataFormField","FormField","getOrCreateMetaDataField","selectedMetadataField","FCpair","formVals","sourceField","f","returnValues","constraintIsSimpleList","selectConstraintId","dependsOnParentFormFieldDefinitionClassName","close","propertyName","internalName","FormFieldPropertyEnum","NAME","StringUtil","isEmptyString","nameForFormFieldNotUnique","isNaN","Number","charAt","RegExp","MAT_DIALOG_DATA","_angular_core__WEBPACK_IMPORTED_MODULE_9__","FlexibleSelectionFieldConfigurationComponent_form_0_Template","FormFieldCascadingDropdownConstraintLiaison","FieldConstraintLiaisonBase","constraintTypeForEndUser","FormFieldConstraintTypeForUsersEnum","CascadingDropdown","managesConstraintsOfType","getPrimaryPropertyName","getConstraintId","cascadingDropdownConstraintId","setConstraintId","getConstraintName","cascadingDropdownConstraintName","setConstraintName","getConstraintValue","cascadingDropdownConstraintValue","setConstraintValue","getConstraintFailureMessage","setConstraintFailureMessage","getConstraintFormFieldPropertyValue","jsonConfig","copyConstraintValueToCorrespondFormFieldProperty","createNewConstraint","FormFieldCascadingDropdownConstraintWithMetrics","createNewConstraintFrom","constraintParam","constraint","constraintExpression","packageConstraint","FormFieldCascadingDropdownConstraint","updateOrCreateConstraint","cachedFormFieldService","updatedConstraintParam","updatedConstraint","updateOrCreateCascadingDropdownConstraint","createNamedConstraintMethodName","updateNamedConstraintMethodName","updateOrCreateNamedConstraintMethodName","siteNamedConstraintsMethodName","usedByFormFieldClasses","CascadingDropDownFieldType","applyConstraintPropertiesToFormField","constraintJson","createFromConstraintProperties","constraintProperties","useCount","FormFieldCascadingListValueConstraintLiaison","CascadingListValues","listValuesConstraintId","cascadingListValuesConstraintValue","csvOptionsData","rawCsv","FormFieldListValuesConstraintWithMetrics","createCascadingListValuesConstraintFrom","FormFieldListValuesConstraint","selectOptionsConstraintId","selectOptionsConstraintName","selectOptionsConstraintValue","updateOrCreateCascadingListValuesConstraint","DropDownFieldType","RadioButtonsFieldType","selectOptions","proposeConstraintNameIfApplicable","proposedName","siteConstraints","inputField","setInputFieldFocusNow","ConstraintNameProposed","select","enableEditing","updateFormFieldWithLatestConstraintValues","siteNamedConstraints","updatedApplied","siteConstraint","updateOtherFieldConstraintValues","otherField","constraintUpdated","updateOtherFieldIfUsingSameConstraint","formFieldConstraint","FormFieldConstraintLiaisonManager","constraintLiaisons","getConstraintLiaisons","numLiaisonsProcessed","numConstraintUpdatesApplied","constraintLiaison","getSiteConstraintMethodName","synchronousUpdateFormFieldWithLatestConstraintValues","FormFieldSelectOptionsConstraintLiaison","FormFieldRegularExpressionConstraintLiaison","FormFieldNumericRangeConstraintLiaison","FormFieldDateRangeConstraintLiaison","FormFieldSimpleListValueConstraintLiaison","DateRange","dateRangeConstraintId","dateRangeConstraintName","DateRangeDataForJsonSerialization","dateRangeConstraintMinDate","dateRangeConstraintMaxDate","toJson","minDate","maxDate","serializationObject","fromJson","FormFieldDateRangeConstraintWithMetrics","constraintExpr","FormFieldDateRangeConstraint","constructConstraint","updateOrCreateDateRangeConstraint","DateFieldType","dateRangeConstraint","NumericRange","numericRangeConstraintId","numericRangeConstraintName","NumericRangeDataForJsonSerialization","numericRangeConstraintMinValue","numericRangeConstraintMaxValue","minValue","maxValue","FormFieldNumericRangeConstraintWithMetrics","FormFieldNumericRangeConstraint","updateOrCreateNumericRangeConstraint","IntegerFieldType","CurrencyFieldType","numericRangeConstraint","RegularExpression","regularExpressionConstraintId","regularExpressionConstraintName","regularExpressionConstraintValue","regularExpressionConstraintMessage","regex","FormFieldRegularExpressionConstraintWithMetrics","FormFieldRegularExpressionConstraint","updateOrCreateRegularExpressionConstraint","ShortTextFieldType","constraintFailureMessage","regularExpressionValue","regularExpressionMessage","SelectOptions","FormFieldSelectOptionsConstraintWithMetrics","FormFieldSelectOptionsConstraint","updateOrCreateSelectOptionsConstraint","selectOptionsValue","simpleListValuesConstraintValue","createSimpleListValuesConstraintFrom","updateOrCreateSimpleListValuesConstraint","actOnAllAttachments","DeleteRestoreAttachmentDialog","deleteOrRestore","IsDeleteAction","IsRestoreAction","onCancel","onConfirm","disableAttachment","restoreAttachment","DeleteRestoreAttachmentDialog_div_3_Template","DeleteRestoreAttachmentDialog_div_4_Template","AttachmentFormFieldComponent_div_5_mat_label_2_span_2_Template","DisplayName","AttachmentFormFieldComponent_div_5_mat_label_2_Template","AttachmentFormFieldComponent_div_5_ng_container_4_Template","ShowLabel","WrappedGridFormFieldComponent","additionalInfoDiv_r2","AttachmentFormFieldComponent_div_6_div_1_Template","FormInstanceElement","toggleShowAll","handleEditorGridValidation","handleConditionalLogicColumnDefsFilter","handleGridEvent","readOnly","ToggleShowAllButtonText","AttachmentsGridFlavor","FormInstance","DataCollectionId","FolderId","FormInstanceId","AttachmentCount","AttachmentFormFieldComponent","FormFieldBaseComponent","resolver","hostElement","cachedFormFieldConstraintsService","onInit","onEdit","requestFormInstanceIds","attachmentItems","gridConfig","runtimeMetadata","RuntimeMetadata","disableUploadButton","hasCheckboxes","hideActionButtons","formFieldProperties","FIELD_GROUP","REQUIRED","DISPLAY_NAME","HELP_TEXT","PLACEHOLDER_TEXT","TOOL_TIP","INSTRUCTIONS_TEXT","DISPLAY_KENDO_GRID_ROWS","GRID_KEY_COLUMNS","HIDE_GRID_FILTERING","LIBRARY_ADD","STANDARD","NONE","EDITABLE","CHECKED_OUT","MORE_VERT","INFO","contextMenuPosition","y","_fileTypeIconMap","_selectedAttachments","_enableAttachments","_selectedAttachment","_attachmentHistory","_editInputAppearance","_editEnabled","selectedItemFileName","wrappedGridFormFieldComponent","GridFormFieldComponent","flavor","flavorModifier","GridFlavorModifiersEnum","ShowLatestOnly","hshProperties","getProperties","hshGetIdsInfo","saveConfiguration","reasonForSave","GridConfig","CachedGridColumnDefs","allComponentsAndFormFields","AllComponents","iComponent","Component","childFormFields","iCol","ColumnCount","gridColDef","getColumnDef","childFormField","assignFrom","__gridRow","databaseId","GridEventTypeEnum","Download","viewFile","Upload","AttachmentStandardColumnNames","Delete","openDeleteRestoreDialog","Restore","GridFlavorEnum","AttachmentsGrid","ShowAll","fileUploaderComponent","gridFieldEditorComponent","modifier","FlavorModifier","resetFormField","FileTypeIconMap","FabricFileTypeIconMapping","FormFieldId","ContextMenuPositionX","ContextMenuPositionY","GetMiniViewerURL","miniViewUrl","ShowEditInBrowser","contextMenu","menuOpen","menuData","canCheckOut","OnlyShowDelete","FileExtension","pop","AttachmentInfo","EditInputAppearance","EditEnabled","EditFileName","SelectedItemDescription","selectedItemDescription","ModifiedDate","createdDate","SelectedAttachment","Attachments","attachmentDetails","AttachmentItems","createAttachmentInfoWithUrlsForList","toAdd","AttachmentInfoWithUrls","fileName","createdByName","setId","comment","createdByEmail","size","versionLabel","editInBrowserUrl","editInAppUrl","viewInBrowserUrl","downloadUrl","displayOrder","saveAttachmentProperties","newName","newDescription","renameAttachment","deselectAttachment","properties","AttachmentProperties","setCustomProperties","buildButtonConfig","itemActions","ButtonConfig","buttonConfig","right","item_actions","trash","TrashConfig","deleteOnConfirm","entity","callback","desc","panelClass","getAssociatedFabricIconProperties","extension","findKey","extensions","getFileExtension","canPreview","fileType","canpreview","EditButtonClicked","EditFocusOut","field","selectedItemDisplayOrder","getSelectedId","getId","saveClicked","doOnItemMoved","moveData","NothingMoved","movedItems","MovedItems","targetItem","TargetOfMove","reorderedItems","reorderItems","reorderAttachments","movedItem","idOfMovedItem","idOfTargetItem","oldIndex","newIndex","allItems","otherItems","reordered","slice","doOnItemAction","button","displayAttachmentDetails","AttachmentHistory","doOnItemContextMenu","attachment","replace","ActivityListIcon","ATTACHMENT_ACTIVITY","getAttachmentHistories","h","formatBytes","bytes","decimals","dm","Math","floor","parseFloat","pow","toFixed","formInstanceElementReceived","getCanUseAttachments","writeValueTriggered","IsInPreviewOrInstanceMode","childGridRows","createConfigFromChildGridRows","parentReceivedFormInstanceElement","pseudoStatic_getDisplayValue","formFieldParam","formInstanceElementParam","gridRow","processingPhase","UserUpdatedData","textValue","TextValue","getFormFieldClass","openEditInAppUrl","openEditInBrowserUrl","openViewInBrowserUrl","openDownloadUrl","matMenuDeleteAttachment","items","deleteAttachment","file","updateTableSource","doOnItemDelete","fileNames","doOnButtonClick","source","attachmentListComponent","MatMenuTrigger","GridFieldEditorComponent","NG_VALUE_ACCESSOR","useExisting","ngContentSelectors","AttachmentFormFieldComponent_ng_template_0_Template","AttachmentFormFieldComponent_ng_container_2_Template","AttachmentFormFieldComponent_ng_template_3_Template","AttachmentFormFieldComponent_div_5_Template","AttachmentFormFieldComponent_div_6_Template","instructionsTemplate_r4","IsInDesignMode","CascadingDropDownFormFieldComponent_div_4_div_1_span_2_Template","dropDownHeader_r3","getSelectedValue","hshOption_r5","ValueText","Index","i_r4","CascadingDropDownFormFieldComponent_div_4_div_4_div_1_ng_container_8_ng_container_1_Template","tooltipTemplate_r6","CascadingDropDownFormFieldComponent_div_4_div_4_div_1_mat_label_3_Template","DropDownValues","HeaderIndexOffset","dropDownValueChanged","handleOnModelChange","CascadingDropDownFormFieldComponent_div_4_div_4_div_1_mat_option_7_Template","CascadingDropDownFormFieldComponent_div_4_div_4_div_1_ng_container_8_Template","IsHorizontalAndNotFirstSelection","AdditionalMatFormFieldStyles","FieldIsInGrid","ReadOnly","HeaderSelectionDisabled","DropDownOptionsForHeader","CascadingDropDownFormFieldComponent_div_4_div_4_div_1_Template","IsHorizontal","DropDownHeaders","Error","CascadingDropDownFormFieldComponent_div_4_div_1_Template","CascadingDropDownFormFieldComponent_div_4_ng_container_2_Template","CascadingDropDownFormFieldComponent_div_4_div_3_Template","CascadingDropDownFormFieldComponent_div_4_div_4_Template","CascadingDropDownFormFieldComponent_div_4_div_5_Template","UsesMainFieldLabel","instructionsTemplate_r7","DisplayConfigTip","CascadingDropDownFormFieldComponent","CascadingDropDownFormFieldBaseComponent","injectedCurrentUserServiceForBaseClass","displayValue","config","CascadingDropDownFormFieldConfig","parseJsonConfig","CascadingDropDownFormFieldData","getDisplayValue","pseudoStatic_pasteValue","elementWrapper","valueType","FormInstanceElementValueTypeEnum","TypeText","standinDisplayValue","CascadingDropDownFormFieldComponent_ng_template_0_Template","CascadingDropDownFormFieldComponent_ng_template_2_Template","CascadingDropDownFormFieldComponent_div_4_Template","ReadyToRender","CheckboxFormFieldComponent_div_4_ng_container_2_div_1_Template","CheckboxFormFieldComponent_div_4_ng_container_2_ng_container_2_Template","instructionsTemplate_r3","CheckboxFormFieldComponent_div_4_ng_container_2_Template","DefaultCheckboxValue","CheckboxFormFieldComponent_div_4_span_4_Template","CheckboxFormFieldComponent_div_4_ng_container_5_Template","CheckboxFormFieldComponent_div_4_ng_container_6_Template","HasInstructions","tooltipTemplate_r4","CheckboxFormFieldComponent_div_5_ng_container_2_div_1_Template","CheckboxFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","handleOnBlur","handleOnFocus","CheckboxFormFieldComponent_div_5_ng_container_3_span_3_Template","MatInputId","FormControl","CheckboxFormFieldComponent_div_5_ng_container_2_Template","CheckboxFormFieldComponent_div_5_ng_container_3_Template","CheckboxFormFieldComponent_div_5_ng_container_5_Template","ControlType","CheckboxFormFieldComponent","InputFormFieldBaseComponent","rendererParam","DEFAULT_VALUE","GRID_COLUMN_WIDTH","bSaveInProgress","matInputId","generateUniqueId","saveDataRequired","bChecked","bValue","saveData","saveCompleted","REACTIVE_FORMS","setDefaultBooleanValue","setupBooleanFormControl","SetupFormControlFromWriteValue","notifyValueChanged","booleanValue","BooleanValue","TypeBoolean","doSetFocus","doDoSetFocus","matCheckboxElement","CheckboxFormFieldComponent_ng_template_0_Template","CheckboxFormFieldComponent_ng_template_2_Template","CheckboxFormFieldComponent_div_4_Template","CheckboxFormFieldComponent_div_5_Template","UserTypeEnum","CommentUserOrGroupInfo","nextClientId","userType","userOrGroupId","displayText","clientId","User","Group","Role","CommentInfo","SelectedText","isSelected","ViewableByText","viewableByUsersAndGroups","numViewableBy","numUsers","vb","isFirstViewableBy","viewableBy","isLastViewableBy","isLast","lastIndex","commenter","commentTimestamp","editingEnabled","toggleSelected","__decorate","Type","tslib_es6","Sn","Array","prototype","CommentsFormFieldData","comments","Comments","CommentCount","SelectedComment","addNewComment","deselectAllComments","addComment","popComments","popCount","poppedComments","numPopped","poppedComment","selectComment","selectedComment","deleteComment","commentToDelete","deleteCommentById","deletedComment","addViewableByToSelectedComment","userOrGroupData","isUser","key","addViewableByToComment","deleteViewableBy","moveViewableByUp","moveViewableBy","moveViewableByDown","isViewableByUser","userMaxId","containsUser","u","deserializeData","hshData","plainToClass","indexChange","currentIndex","removedViewableBy","i_r3","TextAreaRowCount","element_r4","CommentsFormFieldComponent_div_2_td_16_ng_container_1_Template","CommentsFormFieldComponent_div_2_td_16_ng_container_2_Template","element_r6","element_r8","showViewableByRowsFor","element_r10","editComment","EditCommentButtonDisabled","getEditCommentTooltip","TooltipPosition","CommentsFormFieldComponent_div_2_td_25_button_4_Template","CommentSelectionDisabled","EnableCommentEditing","TrashCanButtonDisabled","TrashCanTooltip","viewableBy_r14","element_r15","MoveViewableByUpTooltip","_r16","MoveViewableByDownTooltip","CommentsFormFieldComponent_div_2_td_27_ng_container_3_tr_2_mat_icon_8_Template","CommentsFormFieldComponent_div_2_td_27_ng_container_3_tr_2_mat_icon_10_Template","_r12","CommentViewableByTableRowStyle","ViewableUserOrGroup","ViewableUserOrGroupType","ViewableByCanMoveUp","ViewableByCanMoveDown","DeleteViewableByTooltip","CommentsFormFieldComponent_div_2_td_27_ng_container_3_tr_2_Template","CommentViewableByTableStyle","ViewableByUsersAndGroups","CommentsFormFieldComponent_div_2_td_27_ng_container_2_Template","CommentsFormFieldComponent_div_2_td_27_ng_container_3_Template","HasViewableByUsersAndGroups","CommentViewableByStyle","row_r17","CommentViewableByClass","CommentsFormFieldComponent_div_2_ng_container_4_Template","CommentsFormFieldComponent_div_2_th_12_Template","CommentsFormFieldComponent_div_2_td_13_Template","CommentsFormFieldComponent_div_2_th_15_Template","CommentsFormFieldComponent_div_2_td_16_Template","CommentsFormFieldComponent_div_2_th_18_Template","CommentsFormFieldComponent_div_2_td_19_Template","CommentsFormFieldComponent_div_2_th_21_Template","CommentsFormFieldComponent_div_2_td_22_Template","CommentsFormFieldComponent_div_2_th_24_Template","CommentsFormFieldComponent_div_2_td_25_Template","CommentsFormFieldComponent_div_2_td_27_Template","CommentsFormFieldComponent_div_2_mat_header_row_28_Template","CommentsFormFieldComponent_div_2_mat_row_29_Template","CommentsFormFieldComponent_div_2_mat_row_30_Template","addViewableByButtonClicked","instructionsTemplate_r18","Disabled","getCommentTableCssClasses","CommentsListing","columnIsSticky","DisplayedColumns","HeaderRowIsSticky","PickerInputDisabled","AddViewableByUserOrGroupLabel","AddViewableByUserOrGroupButtonTitle","AddViewableByButtonAdditionalStyle","AddViewableByButtonFlyoverText","AddViewableByButtonCanEnable","CommentsFormFieldComponent","numDisplayRows","commentsData","BLANK_VALUE","NUMBER_OF_DISPLAY_ROWS","SHOW_COMMENTS_PROPERTIES","displayedColumns","numDisplayRowsValues","propertyUpdated","createExampleComments","deriveDisplayedColumns","ngAfterViewInit","colName","NumDisplayRows","isDiv","cssClasses","displayRows","getShowViewableByRowsTooltip","isExpanded","AddNewCommentButtonDisabled","AddNewCommentIconTitle","AddNewCommentIconTooltip","userOrGroup","style","selectedComments","clearMemberInput","alertDlgModel","table","renderRows","displayRowsValues","propertyUpdateRequired","hasNumericData","numRows","ignoredComponentDataToSave","packageDataAndUpdateFlags","Date","numCommentsCreated","exampleComment","rowIndex","MatTable","CommentsFormFieldComponent_ng_template_0_Template","CommentsFormFieldComponent_div_2_Template","AddContactData","selectedUser","isPrimaryConact","AddContactDialog","isPrimaryContact","onUserSet","closeDialog","ContactName","Phone","phone","Email","secondaryDisplayName","Agency","agencyShortName","SelectedUser","ContactInfo","FIELD_INTERNAL_NAME_CONTACT_NAME","FIELD_INTERNAL_NAME_CONTACT_EMAIL","FIELD_INTERNAL_NAME_CONTACT_PHONE","FIELD_INTERNAL_NAME_CONTACT_AGENCY","FIELD_INTERNAL_NAME_IS_PRIMARY_CONTACT","pickerItem","fullName","email","ContactsFormFieldData","contacts","ContactsFormFieldComponent_div_3_mat_label_2_span_2_Template","ContactsFormFieldComponent_div_3_mat_label_2_Template","handleGridFieldFieldDesignerInit","handleEditFieldProperty","ContactsFormFieldComponent_div_4_div_1_Template","openNewContactDialog","addMeButtonClicked","showEmailDialog","EmailAllToolTip","ContactsGridFlavor","ContactsFormFieldComponent","emailService","contactsData","selfAddedFlag","SHOW_CONTACTS_PROPERTIES","contactsInWrappedKendoGrid","contactFieldNames","createExampleContacts","addContactAsGridRow","PickerItem","maxId","emailAddress","agencyName","contact","KendoGridService","addGridColumn","CheckboxFieldType","getEmailAllUrl","Data","emails","composeAllEmailUrl","formInstanceName","ContactsGrid","getContactTableCssClasses","ContactsListing","getColumnStyle","numDataCols","AddContactLabel","AddContactButtonTitle","AddContactButtonAdditionalStyle","AddContactButtonFlyoverText","AddMeButtonTitle","AddMeButtonCanEnable","AddMeButtonFlyoverText","EnableContactEditing","getEditContactTooltip","EditContactButtonDisabled","EnableEmailEditing","EmailToolTip","EmailButtonDisabled","EmailAllButtonDisabled","ICON","BypassSitePopUpWarning","showOk","EMAIL","afterOpened","getEmail","contactName","composeInvEmail","checkSelfAdded","addContactButtonClicked","deleteContact","editContact","GridFieldDesignerComponent","ContactsFormFieldComponent_ng_template_0_Template","ContactsFormFieldComponent_ng_container_2_Template","ContactsFormFieldComponent_div_3_Template","ContactsFormFieldComponent_div_4_Template","CurrencyFormFieldComponent_div_5_ng_container_2_div_1_span_2_Template","CurrencyFormFieldComponent_div_5_ng_container_2_div_1_Template","CurrencyFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","instructionsTemplate_r2","CurrencyFormFieldComponent_div_5_mat_label_4_span_2_Template","CurrencyFormFieldComponent_div_5_ng_container_2_Template","CurrencyFormFieldComponent_div_5_mat_label_4_Template","CurrencyFormFieldComponent_div_5_ng_container_8_Template","PlaceholderText","DefaultValue","tooltipTemplate_r3","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_span_2_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_2_Template","CurrencyFormFieldComponent_div_6_ng_container_2_mat_label_3_span_2_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_1_Template","CurrencyFormFieldComponent_div_6_ng_container_2_mat_label_3_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_4_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_5_Template","CurrencyFormFieldComponent_div_6_ng_container_2_ng_container_6_Template","ShowFormattedValue","CurrencyFormFieldComponent_div_6_ng_container_2_Template","CurrencyFormFieldComponent_div_6_ng_container_3_Template","CurrencyFormFieldComponent_div_7_ng_container_2_ng_container_1_div_1_span_2_Template","CurrencyFormFieldComponent_div_7_ng_container_2_ng_container_1_div_1_Template","CurrencyFormFieldComponent_div_7_ng_container_2_ng_container_1_ng_container_2_Template","CurrencyFormFieldComponent_div_7_ng_container_2_mat_label_3_span_2_Template","CurrencyFormFieldComponent_div_7_ng_container_2_ng_container_1_Template","CurrencyFormFieldComponent_div_7_ng_container_2_mat_label_3_Template","onChange","CurrencyFormFieldComponent_div_7_ng_container_2_ng_container_7_Template","NumberFormatPreview","CurrencyFormFieldComponent_div_7_div_3_ng_container_1_Template","CurrencyFormFieldComponent_div_7_div_3_ng_container_2_Template","CurrencyFormFieldComponent_div_7_ng_container_2_Template","CurrencyFormFieldComponent_div_7_div_3_Template","hasFocus","CurrencyFormFieldComponent","DecimalInputFormFieldBaseComponent","decimalPipe","DecimalPipe","formattedPreviewValue","FormatCurrency","controlData","formControl","decimalValue","transientOriginalDecimalValue","inputVal","transform","CurrencyFormFieldComponent_ng_template_0_Template","CurrencyFormFieldComponent_ng_template_2_Template","CurrencyFormFieldComponent_div_5_Template","CurrencyFormFieldComponent_div_6_Template","CurrencyFormFieldComponent_div_7_Template","FormFieldMode","DESIGN","PREVIEW","INSTANCE","DateFormFieldComponent_div_4_ng_container_2_div_1_span_2_Template","DateFormFieldComponent_div_4_ng_container_2_div_1_Template","DateFormFieldComponent_div_4_ng_container_2_ng_container_2_Template","DateFormFieldComponent_div_4_mat_label_4_span_2_Template","DateFormFieldComponent_div_4_ng_container_2_Template","DateFormFieldComponent_div_4_mat_label_4_Template","DateFormFieldComponent_div_4_ng_container_6_Template","DateFormFieldComponent_div_4_ng_container_7_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_1_div_1_span_2_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_1_div_1_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_1_ng_container_2_Template","DateFormFieldComponent_div_5_ng_container_2_mat_label_4_span_2_Template","picker_r5","DatePipeFormat","MinDate","MaxDate","DateFormFieldComponent_div_5_ng_container_2_ng_container_6_ng_container_5_Template","FormattedDateValue","DateFormFieldComponent_div_5_ng_container_2_ng_container_1_Template","DateFormFieldComponent_div_5_ng_container_2_mat_label_4_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_5_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_6_Template","DateFormFieldComponent_div_5_ng_container_2_ng_container_7_Template","FormGroup","DateFormFieldComponent_div_5_ng_container_2_Template","DateFormFieldComponent_div_5_ng_container_3_Template","JANUARY_1_1900_STRING","DECEMBER_31_2300_STRING","DateFormFieldComponent","strDatePipeFormat","MIN_DATE","MAX_DATE","DISPLAY_FORMAT","displayFormats","formattedDateValue","displayFormatValues","FormFieldOnInitPropertyEnum","REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT","REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT","hshEventProperties","displayFormatToDatePipeFormat","setFormattedValueIfValueExists","ngAfterViewChecked","writeValue","customDateFormatDirective","unformattedDateValue","bGroupAlreadyExists","setupTextFormGroup","localFormControl","hshDateInfo","DateToUtcDate","strUTCDate","utcDate","dateValue","strMinDate","strMaxDate","handleStatusChangesFor","_this","_asyncToGenerator","d","valueOf","toUTCString","formInstanceElementUpdated","inputSelector","selectRootElement","formattedDateSpanClicked","picker","dateNumToDateString","iDate","strDate","iYear","round","iMonth","iDay","getFullYear","getMonth","getDate","dateToConvert","convertDateToLocalTime","iTimeOffsetInMinutes","getTimezoneOffset","setHours","getHours","displayFormat","validatorFn","validationPropertyName","control","enteredDate","enteredDateWithoutTime","toLocaleDateString","minDateWithoutTime","DateFormFieldComponent_ng_template_0_Template","DateFormFieldComponent_ng_template_2_Template","DateFormFieldComponent_div_4_Template","DateFormFieldComponent_div_5_Template","DecimalFormatDirective","elementRef","fnOnChange","_ignored","_value","formatValue","onInput","_onChange","_onBlur","onFocus","unFormatValue","registerOnChange","fn","applyDecimalFormatting","minDigits","maxDigits","digitsAfterDecimal","showTrailingZeroes","fmt","MAT_INPUT_VALUE_ACCESSOR","DecimalFormFieldComponent_div_5_ng_container_2_div_1_span_2_Template","DecimalFormFieldComponent_div_5_ng_container_2_div_1_Template","DecimalFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","DecimalFormFieldComponent_div_5_mat_label_4_span_2_Template","DecimalFormFieldComponent_div_5_ng_container_2_Template","DecimalFormFieldComponent_div_5_mat_label_4_Template","DecimalFormFieldComponent_div_5_ng_container_6_Template","DecimalFormFieldComponent_div_5_ng_container_7_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_span_2_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_2_Template","DecimalFormFieldComponent_div_6_ng_container_2_mat_label_3_span_2_Template","DecimalStepIncrementExpr","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_1_Template","DecimalFormFieldComponent_div_6_ng_container_2_mat_label_3_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_4_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_5_Template","DecimalFormFieldComponent_div_6_ng_container_2_ng_container_6_Template","DecimalFormFieldComponent_div_6_ng_container_2_Template","DecimalFormFieldComponent_div_6_ng_container_3_Template","DecimalFormFieldComponent_div_7_ng_container_2_ng_container_1_div_1_span_2_Template","DecimalFormFieldComponent_div_7_ng_container_2_ng_container_1_div_1_Template","DecimalFormFieldComponent_div_7_ng_container_2_ng_container_1_ng_container_2_Template","DecimalFormFieldComponent_div_7_ng_container_2_mat_label_3_span_2_Template","DecimalFormFieldComponent_div_7_ng_container_2_ng_container_1_Template","DecimalFormFieldComponent_div_7_ng_container_2_mat_label_3_Template","DecimalFormFieldComponent_div_7_ng_container_2_ng_container_5_Template","DigitsToShow","ShowTrailing","DecimalFormFieldComponent_div_7_div_3_ng_container_1_Template","DecimalFormFieldComponent_div_7_ng_container_2_Template","DecimalFormFieldComponent_div_7_div_3_Template","DecimalFormFieldComponent_div_7_ng_container_4_Template","DecimalFormFieldComponent","userChangedFieldValue","propertyNames","NUM_DIGITS_AFTER_DECIMAL_POINT","SHOW_TRAILING_ZEROES_AFTER_DECIMAL_POINT","decimalFormatDirective","increment","numDigitsAfterDecimalPoint","showTrailingZeroesAfterDecimalPoint","CheckFieldForValidation","formFieldUpdated","unformattedDecimalValue","notifyControlTouched","DecimalFormFieldComponent_ng_template_0_Template","DecimalFormFieldComponent_ng_template_2_Template","DecimalFormFieldComponent_div_5_Template","DecimalFormFieldComponent_div_6_Template","DecimalFormFieldComponent_div_7_Template","ValuesFromPriorDropDownConfig","numHeaders","textValues","DisplayFormatEnum","VERTICAL","HORIZONTAL","myConfig","dropDownData","strError","valuesFromPriorDropDownConfig","SELECT_OPTIONS_FILE","SHOW_CASCADING_DROPDOWN_INDICES_IN_PREVIEW_MODE","saveJsonConfig","parseConfig","hasDisplayFormatProperty","p","displayPropertiesEdit","displayPropertiesEditIcon","saveConfigurationRequired","minHeight","minHeightRequired","dropdownHeaders","ROWS_OF_TEXT_TO_DISPLAY_IN_UNSELECTED_GRID_ROW","HasConfig","HasData","primaryFieldName","Config","dropDownHeaders","dropDownValues","iHeader","useCaching","dropDownOptionsAsHierarchy","previouslySelectedHeaderValuePair","HeaderValuePair","iOption","headerValuePair","previouslySelectedHeaderValuePairs","findOptionsValuesForHeader","cachedHeaders","previousHeaderSelectedIndex","headerValuePairs","getPreviouslySelectedHeaderValuePair","headerIndex","disabled","LastHeaderSelectedIndex","IsPrimaryCascadingField","IsSecondaryCascadingField","lastHeaderSelectedIndex","ProtectedAccessConfig","ProtectedAccessDropDownData","ProtectedAccessLastHeaderSelectedIndex","optionIndex","warning","dropDownSavedValues","selectedOptionIndex","savedValue","needToShowIndicesInValues","transientShowCascadingDropdownIndicesInPreviewMode","SELECTED_CASCADING_DROPDOWN_CONSTRAINT","processCsvOptionsFile","csvOptionsFileProcessed","createEmptyDataFromConfig","unpackFormInstanceElement","FormModeEnum","FormFieldConfigurationSaveReason","SavingFormToServer","preparingToSaveConfigToServer","saveConfigurationCompleted","emptyCache","formInstanceElements","saveChangedDataToFormInstanceElement","deserializeDropDownData","dropDownTextValues","o","setDropDownValue","handlingEditPropertiesClickEvent","iHeaderParam","dropDownValuesForHeader","localDropDownData","selectedHeaderValuePair","clearCacheValuesPastHeader","lastHeaderSelected","headerOptions","headerValueChanged","CachedDropDownValuesForHeader","selectedValue","createDropDownSavedValuesFromHeaders","doParseConfig","ancestorHeaderValuePairs","ancestorDropDownValues","iCurrentAncestor","resultHeaderValuePairs","iAncestorDropDownValue","ancestorPreviouslySelectedHeaderValuePair","getPreviouslySelectedValueForHeader","ancestorHeaderValuePair","hvp","ChildValuePairs","currentAncestorSelectedIndex","csvOptions","createConfigFromCsvOptionsData","jsonConfigSaved","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_2_div_1_span_2_Template","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_2_div_1_Template","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_2_ng_container_2_Template","DropDownFormFieldComponent_ng_template_4_div_1_mat_label_5_span_2_Template","hshOption_r4","OptionText","OptionId","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_2_Template","DropDownFormFieldComponent_ng_template_4_div_1_mat_label_5_Template","DefaultDropdownValue","DropDownFormFieldComponent_ng_template_4_div_1_mat_option_9_Template","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_10_Template","DropDownFormFieldComponent_ng_template_4_div_1_ng_container_11_Template","DefaultDropdownValueText","ConfiguredOptions","tooltipTemplate_r5","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_ng_container_1_div_1_span_2_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_ng_container_1_div_1_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_ng_container_1_ng_container_2_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_mat_label_4_span_2_Template","strSelectOption_r7","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_ng_container_1_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_mat_label_4_Template","handleValidationOnBlur","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_mat_option_6_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_2_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_3_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_4_Template","DropDownFormFieldComponent_ng_template_4_div_2_ng_container_5_Template","DropDownFormFieldComponent_ng_template_4_div_1_Template","DropDownFormFieldComponent_ng_template_4_div_2_Template","_r8","selectChange","blurValidation","DropDownOptionsTitle","DropDownFormFieldComponent_ng_template_6_div_0_Template","DropDownFormFieldComponent_ng_template_6_ng_container_1_Template","AutocompleteEnabled","IsDesign","noAutoComplete_r9","DropDownFormFieldComponent","onPropertyUpdated","SELECT_OPTIONS","strDefaultText","formGroupName","arrConfiguredOptions","iNextConfiguredOptionIndex","astrSelectOptions","strNewOptionText","bDefaultIsValid","iSelectOption","setDisplayedConfiguredOptionValue","setDefaultTextSelectValue","SetupFormGroupFromWriteValue","autoCompleteObject","toPass","autocomplete_StartsWith","autocomplete_Contains","TextInputFormFieldBaseComponent","pasteValue","DropDownFormFieldComponent_ng_template_0_Template","DropDownFormFieldComponent_ng_template_2_Template","DropDownFormFieldComponent_ng_template_4_Template","DropDownFormFieldComponent_ng_template_6_Template","DropDownFormFieldComponent_ng_template_11_Template","DropDownFormFieldComponent_ng_container_12_Template","singleDropDown_r10","EditorNameFormFieldComponent_div_3_mat_label_3_Template","EditorNameFormFieldComponent_div_3_ng_container_5_Template","tooltipTemplate_r2","EditorNameFormFieldComponent_div_4_ng_container_2_ng_container_1_mat_label_2_Template","EditorNameFormFieldComponent_div_4_ng_container_2_ng_container_1_ng_container_3_Template","EditorNameFormFieldComponent_div_4_ng_container_2_ng_container_1_ng_container_4_Template","UseGridSpecificStyling","EditorNameFormFieldComponent_div_4_ng_container_2_ng_container_1_Template","EditorNameFormFieldComponent_div_4_ng_container_2_Template","EditorNameFormFieldComponent_div_4_ng_container_3_Template","EditorNameFormFieldComponent","MAX_LENGTH","validationOptions","IS_CUSTOM_REGULAR_EXPRESSION","REGULAR_EXPRESSION","ERROR_MESSAGE","currentUser","hshOnInitProperties","validationNames","iValidation","validationInfo","constraintNames","customRegexConstraintName","canHaveFieldConditionalLogic","CurrentEditor","editor","fieldIsInGrid","setDefaultTextValue","setupTextFormControl","fieldType","EditorNameFieldType","buildValidatorFunctionsAndMessages","arrValidatorsParam","arrValidationMessagesParam","arrValidationOption","vi","validationOption","Validators","pattern","_angular_core__WEBPACK_IMPORTED_MODULE_6__","EditorNameFormFieldComponent_ng_template_0_Template","EditorNameFormFieldComponent_div_3_Template","EditorNameFormFieldComponent_div_4_Template","handleAutoCompleteSelectionChange","SelectedValuesByFieldId","FlexibleSelectionFormFieldComponent_ng_template_4_div_0_Template","FlexibleSelectionFormFieldComponent_ng_template_4_ng_container_1_Template","noAutoComplete_r4","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_2_div_1_span_2_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_2_div_1_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_2_ng_container_2_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_mat_label_5_span_2_Template","hshOption_r6","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_2_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_mat_label_5_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_mat_option_9_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_10_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_ng_container_11_Template","tooltipTemplate_r7","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_1_div_1_span_2_Template","MaxSelections","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_1_div_1_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_1_ng_container_2_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_1_div_3_Template","IsMultiSelect","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_3_mat_label_1_span_2_Template","strSelectOption_r9","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_3_mat_label_1_Template","handleSingleSelectChange","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_3_mat_option_3_Template","DropdownPlaceHolderText","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_mat_label_1_span_2_Template","openSelections","closeSelections","SelectedChips","canDisableOption","strSelectOption_r13","selected_r15","_r14","onRemove","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_mat_label_1_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_button_3_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_button_4_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_span_5_Template","handleMultiSelectChange","multiSelectOpened","multiSelectClosed","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_mat_option_9_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_mat_chip_option_11_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_mat_chip_option_12_Template","SelectionsOpen","DropDownOptionsFormControl","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_1_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_3_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_mat_form_field_4_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_ng_container_5_Template","IsSingleSelect","IsAutoComplete","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_2_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_ng_container_3_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_1_Template","FlexibleSelectionFormFieldComponent_ng_template_6_div_2_Template","FlexibleSelectionFormFieldComponent","mimickedNgModelChange","defaultText","singleSelectFormGroupName","multiSelectFormGroupName","gridRowsImpactedBySelectionChange","selectionsOpen","configuredOptions","dropDownOptionsFormControl","multiSelectFormControl","_autoCompleteItemDataOptions","derivedDropDownOptions","formGroup","fieldHasConfiguration","rebuildDropDownOptionsData","ValueType","TypeMultiText","AutoSelectFieldValuesSubject","singleOptionsByFieldId","handleUpdateOfFieldsWithOnlyOneOption","dropdownPlaceHolderText","childFormInstanceElements","addChildFormInstanceElement","handleSelectionFieldValueChanged","multiselectApplyUpdatedValues","updatedValues","hashWithFormFieldAndFormInstanceElement","selectedValues","childEl","parentFormInstanceElementId","maxSelections","childElementForSingleValue","el","getFormInstanceElement","isDeleted","parentEl","parentValues","selectionFieldValueChanged","GridRowId","GridColumnDefs","gridRowsImpacted","autocomplete","GridRowsImpactedBySelectionChange","MaxSelectionsReached","DropDownOptions","MultiSelectFormControl","option","removeFirst","array","toRemove","multiSelect","multiSelectBlur","AutoSelectFieldValues","setupMultiSelectFormControl","handleSettingOfDefaultFields","setValidators","updateValueAndValidity","singleSelectControl","multiSelectionControl","defaultValues","astrExistingValues","iChild","childFormInstanceElement","hshControlProperties","setupMultiSelectFormGroup","formControlCreated","processSelectedValuesFromMutiSelect","passedValues","iChildElement","arrFoundValue","fie","iValue","strValue","arrExistingChildFormInstanceElement","transientInSetupFlag","userEnteredValue","arrDropDownOptions","dropDownOption","optionValue","_angular_core__WEBPACK_IMPORTED_MODULE_7__","FlexibleSelectionFormFieldComponent_ng_template_0_Template","FlexibleSelectionFormFieldComponent_ng_template_2_Template","FlexibleSelectionFormFieldComponent_ng_template_4_Template","FlexibleSelectionFormFieldComponent_ng_template_6_Template","FlexibleSelectionFormFieldComponent_ng_template_11_Template","FlexibleSelectionFormFieldComponent_ng_container_12_Template","templateOutput_r17","FootnoteRowModel","GridCellDataForSerialization","FootnotesTitle","FootnoteFormFieldComponent_ng_container_0_div_2_Template","FootnoteFormFieldComponent_ng_container_2_div_6_Template","handleEditRow","handleAddOrUpdate","handleRemove","addRowToUI","handleCancel","FootnoteFormFieldComponent_ng_container_2_ng_template_8_Template","FootnoteFormFieldComponent_ng_container_2_ng_template_12_Template","FootnoteData","FootnoteFormFieldComponent","formBuilder","formFieldNames","FORM_INSTANCE_SERVICE_REQUIRED","gridFormField","gridFormInstanceElement","updatedGridFormInstanceElement","gridComponent","editOfRowInProgress","gridChildFormFieldsAttributes","isFootnote","iChildFF","childFFAttrs","myFormField","args","ignoreEditEvent","fg","createFormGroupForFootnoteRowModel","sender","editRow","isNew","footnotesForKendoGrid","savedItem","identifier","newFootnote","addRow","closeRow","HasDesignConfiguration","HasPreviewInstanceConfiguration","count","populateFootnotesForKendoGrid","hshComponentDataToSave","childFootnoteRows","totalFootnoteRows","footnote","gridRowVM","GridRowViewModel","underLyingGridRowId","cellDataHash","identifierGridCell","c0","textGridCell","c1","createFormGroupForColumn","columnIndex","newGridFIE","totalChildGridRows","footnoteRow","column","CommandColumnComponent","FootnoteFormFieldComponent_ng_container_0_Template","FootnoteFormFieldComponent_ng_container_1_Template","FootnoteFormFieldComponent_ng_container_2_Template","TEMPLATE","OnFocusData","registeringComponent","fnOnFocus","componentWithFocus","focusEvent","FormFieldBaseCallbackFunctions","fnPropagateChanges","fnOnTouched","FormFieldBaseControlData","arrValidationMessages","controlType","ngOnInitExecuted","FormFieldBaseFlags","bSelectOptionsParsed","bViewInitialized","bSetFocusPending","writeValueForFormInstanceElementCalled","formInstanceElementReceivedCalled","KendoGridBaseComponent","iNextComponentId","displayHints","revealValidationErrors","useGridSpecificStyling","canEditProperties","invalid","touched","displayError","formFieldValidated","wsValidatorName","rmacValidatorName","callbackFunctions","flags","fieldHasValidationError","iComponentId","getFormField","getStandardPropertyNames","setRedBorderManually","isCompoundObjectComponent","applyFilter","filterValue","filterOperator","childFieldName","resetConditionalLogicSettings","applyChildFieldAttributes","showChildField","childFieldIsReadOnly","childFieldIsRequired","getValidationErrors","errorMessages","errorFound","validationMessage","ValidationMessages","errors","dirty","getNumericValue","hasCalculatedValue","substantivelyChangedLogicApplies","gridRowId","gridColumnDefs","FieldHasValidationError","markAsTouched","rootText","random","viewHasInitialized","DefaultProperties","HAS_FOOTNOTE","IsInPreviewMode","IsInInstanceMode","CanBeReadOnly","FieldDefinitionClassName","InternalName","bResult","HasTooltipText","TooltipText","ComponentHasInitialized","CanEditProperties","DispayHints","bShowLabel","showLabel","arrSelectOptions","ParseSelectOptions","raiseException","errorMessage","emitValidation","notifyControlReceivedFocus","TypeInteger","IntValue","TypeDecimal","DecimalValue","TypeDouble","DoubleValue","TypeMultiBoolean","saveDataTo","receiveFormFieldNames","hshColNameToFormField","requiresFieldValueUpdate","formFieldValueUpdated","iColIndex","staticCreateFormFieldDynamically","componentFactoryResolver","viewContainerRef","formFieldClass","bReadOnly","parentComponentPrefix","componentFactory","resolveComponentFactory","componentRef","createComponent","formFieldInstance","instance","fieldDefinition","customLogicHandler","setFieldSpecificValuesForDynamicallyCreatedField","createFormFieldDynamically","createFormControl","initialValue","arrValidators","arrAsyncValidators","compose","composeAsync","absolutelyNeededDefault","strInitialValue","valueHasSubstantivelyChanged","textValueOnInitialSetup","setupIntegerFormControl","intValue","setupDecimalFormControl","decInitialValue","bInitialValue","createFormGroup","strControlName","UntypedFormGroup","addControl","arrayValues","bSubscribeToValueChanges","statusChanges","statusChangeName","INVALID","VALID","bValueSet","staticSetDefaultTextSelectValue","bValidOption","staticSetDefaultBooleanValue","setDefaultDecimalValue","setDefaultDecimalValueFor","decDefaultValue","bHasDefaultValue","setDefaultIntegerValue","setDefaultIntegerValueFor","iDefaultValue","formGroupCreatedCompleted","formControlCreatedCompleted","groupName","passedFormControls","subscribeToEvents","setupFormGroupBase","setFormFieldValueInGrid","setupFormControlBase","passedFormInstanceElement","passedFormControlNames","secondaryControlName","fc","createFormControlBase","formControlSubscriptions","returnSavedValue","GetDefaultValue","setValueType","DecimalFieldType","RichTextFieldType","ParagraphFieldType","GridCascadingDropDownFieldType","HTMLLinkFieldType","LastEditedDateFieldType","clearValidators","addValidators","passedFC","FlexibleSelectionFieldType","registerOnTouched","registerOnFocus","onFocusData","canHaveInstructions","formInstanceElementLoaded","formIntsanceElement","configureAnySecondaryComponents","staticToggleFormControlDisabledBasedOnReadOnlyAttribute","toggleFormControlDisabledBasedOnReadOnlyAttribute","arrAsyncValidatorsParam","fnValidator","strMessage","noWhitespaceValidator","requireMatchAutoComplete","maxLength","asyncFnc","asyncValidatorFn","formatDate","min","max","msg","controlVal","dateString","valCurrent","valPrevious","re","alphaNumericValCurrent","alphaNumericValPrevious","logWarning","componentClassName","FieldNameHashes","hshDisplayVariableNameToFormField","hshFieldIdToFieldName","FormulaEvaluationHelper","RoundTo","roundTo","roundToNumDigitsAfterDecimalPoint","init","gridRowColumnDefs","variableNameToField","nameToField","fieldIdToFieldName","fieldNameHashes","FormulaEvaluator","evaluateUrl","formulaEvaluationHelper","formulaParam","hshFieldValues","formula","replaceTokens","evaluateFormula","hshValues","parser","math","buildComputationScope","scope","evaluate","CalculationError","parserScope","colNameToFormFieldsHash","gridVariableName","values","token","hasOwnProperty","FormulaFormFieldComponent_div_2_ng_container_5_Template","PreviewModeValue","instructions_r2","FormulaFormFieldComponent_div_3_ng_container_3_Template","FormattedCalculatedValue","FormulaFormFieldComponent","previewModeValue","calculatedValue","FORMULA","ROUND_TO_NUM_DIGITS_AFTER_DECIMAL_POINT","ROUND_TO_WHOLE_NUMBER","SHOW_DIGITS_WITH_COMMA_SEPARATORS","SHOW_DOLLAR_SIGN_PREFIX","formulaCalculationErrorValidatorName","calculationError","formFieldNamesRequired","formFieldValueUpdatesRequired","doubleValue","CalculatedValue","roundResultToWholeNumber","formattedValue","showDigitsWithCommandSeparators","toLocaleString","showDollarSignPrefix","formFieldNamesParam","hshColNameToFormFieldParam","gridFieldVariableName","displayNameToVariableName","transientFormulaError","hshResult","numValue","isNumeric","toNumber","formInstanceElementPropertyName","hshDebugFieldValues","getNumericValuesHashByFieldName","Intl","NumberFormat","minimumFractionDigits","formulaCalculationErrorValidator","formulaCalculationError","FormFieldProcessingPhaseEnum","EDITING_DATA","LOADING_DATA","CREATING_DATA","FormulaFormFieldComponent_ng_template_0_Template","FormulaFormFieldComponent_div_2_Template","FormulaFormFieldComponent_div_3_Template","GridCascadingDropDownFormFieldComponent_div_4_div_1_span_2_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_div_1_ng_container_8_ng_container_1_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_div_1_mat_label_3_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_div_1_mat_option_7_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_div_1_ng_container_8_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_div_1_Template","GridCascadingDropDownFormFieldComponent_div_4_div_1_Template","GridCascadingDropDownFormFieldComponent_div_4_ng_container_2_Template","GridCascadingDropDownFormFieldComponent_div_4_div_3_Template","GridCascadingDropDownFormFieldComponent_div_4_div_4_Template","GridCascadingDropDownFormFieldComponent_div_4_div_5_Template","GridCascadingDummyAndTransientData","dummyDropDownValues","dummyDropDownOptions","GridCascadingDropDownFormFieldComponent","transientData","isPrimaryCascadingField","transientVirtualFormFields","setupSecondaryFieldTransientData","saveMyFormInstanceElementInDropDownData","dummyDropDownOption","isSecondaryCascadingField","hasConfig","secondaryGridCascadingFieldTransientData","transientPrimaryGridCascadingDropDownComponent","transientCascadingDropdownConfig","hasData","transientCascadingDropdownData","registerVirtualFormFieldFormInstanceElement","virtualFormField","fieldSecondaryOrder","configHeaders","headerIndexOffset","privateDropDownOptionsForHeader","myHeaderIndex","setDropDownTextValue","debugIndex","saveHeaderValue","myOneBasedIndexValue","myDropDownValue","ddv","transientGridCascadingDropDownName","preparingToSaveToServer","GridCascadingDropDownFormFieldComponent_ng_template_0_Template","GridCascadingDropDownFormFieldComponent_ng_template_2_Template","GridCascadingDropDownFormFieldComponent_div_4_Template","GRID_ROW_ID_KEY","GridDesignerEditorBase","isFootnotesGrid","AllModesDataSource","gridFormFieldComponent","doNotDisplayInGrid","colDefs","ExpandableGridColumnDefs","GridColumnNames","bIncludeAddColumn","astrColumnNames","ff","FieldTypesAndNames","getAllGridFieldTypesAndNameFields","FormFieldDisplayHints","ShowNumericTotalsFooter","getKendoGridColumnWidth","columnDef","getColumnTooltip","hshColumnDef","columnTooltip","handleNgModelChangeLogic","wrapper","fieldTypeAndName","getFieldTypeAndField","fieldLogicHandler","ColumnIndex","affectedComponents","notifyComponentsOfValueChanges","numericValue","componentRepresentative","CALCULATING_COLUMN_TOTAL","cellValueChanged","iComp","comp","compFormField","compFormInstanceElement","affectedComponentNumericValue","gridColumnInit","hshEventData","hshUnusedColumnDef","RuntimeData","iNumRowFormFieldsInitialized","componentFormField","addOrReplaceAllComponents","transientValuesHash","AllComponentsCount","notifyComponentOfFieldNames","astrFieldNames","getAllComponentsFormFieldComponent","columnFormField","getAllComponentsFormField","getColumnIndex","styles","GridCellContextMenuInfo","contextMenuXPos","contextMenuYPos","ReorderGridColumnsDialog","columns","handleRowReorder","dropTargetRow","originalIndexOfMovedRow","draggedRows","originalIndexOfTargetRow","dropPosition","movedRow","before","after","getColumnTypeIconName","hshColumnDef_r2","hshFieldTypeAndName_r4","IconName","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_mat_option_6_mat_icon_1_Template","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_mat_option_6_mat_icon_2_Template","iconType","gridColumnContextMenuClick","handleFieldDefinitionChange","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_mat_icon_4_Template","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_mat_icon_5_Template","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_mat_option_6_Template","getFieldTypeTitle","getColumnTypeIconType","iColIndex_r6","removeGridColumnClicked","gridColumnEdit","onCellDoubleClick","handleOnPropertyUpdated","GridFieldDesignerComponent_ng_container_3_mat_cell_2_ng_container_5_Template","displayDeleteIconForColumn","getNumericTotalPreviewValue","GridFieldDesignerComponent_ng_container_3_mat_header_cell_1_Template","GridFieldDesignerComponent_ng_container_3_mat_cell_2_Template","GridFieldDesignerComponent_ng_container_3_mat_footer_cell_3_Template","addGridColumnClicked","reorderColumnsClicked","GridFieldDesignerComponent_ng_container_4_mat_header_cell_1_ng_container_7_Template","additionalInfoTemplate_r10","onFieldDropped","GridFieldDesignerComponent_ng_container_4_mat_header_cell_1_Template","GridFieldDesignerComponent_ng_container_4_mat_cell_2_Template","GridFieldDesignerComponent_ng_container_4_mat_footer_cell_3_Template","formTemplateInstancesService","initialized","mouseEvent","gridCellContextMenuInfo","componentColDef","gridCellContextMenu","cols","reOrderedColumnDefs","colDef","fieldOrder","handleColumnOrderUpdate","designChange","strIconName","errorMsg","strIconType","getFieldNameFromFieldType","componentBeingEdited","onEditSaveCallback","onEditSave","getFields","sourceFormFields","FormFieldTypeEnum","GridFieldType","sff","CascadingDropdownConstraintId","formFieldListConstraintColumns","SetDependsOnParentFormFieldId","copyFormFieldUpdatesFromTo","displayDeleteIconInGridFor","removeGridColumn","fieldDefinitionClassNameParam","dragData","className","previewTotalValue","GridFieldDesignerComponent_ng_template_0_Template","GridFieldDesignerComponent_ng_container_3_Template","GridFieldDesignerComponent_ng_container_4_Template","GridFieldDesignerComponent_mat_header_row_5_Template","GridFieldDesignerComponent_mat_row_6_Template","GridFieldDesignerComponent_mat_footer_row_7_Template","griddata","pasteMode","GridPasteKendoDialog","parseInfo","parseError","disableCopyButton","showLengthWarning","clickCancel","pasteData","handleNgOnChange","pasteDataLines","pasteColCount","colCount","GridPasteKendoDialog_mat_radio_group_11_Template","GridPasteKendoDialog_span_14_Template","gridHasData","GeocodeDialog_ng_container_0_div_7_div_6_Template","GeocodeDialog_ng_container_0_div_7_div_7_Template","GeocodeDialog_ng_container_0_div_7_div_10_Template","GeocodeDialog_ng_container_0_div_7_div_11_Template","GeocodeDialog_ng_container_0_div_7_div_14_Template","GeocodeDialog_ng_container_0_div_7_div_15_Template","GeocodeDialog_ng_container_0_div_7_div_18_Template","GeocodeDialog_ng_container_0_div_7_div_19_Template","GeocodeDialog_ng_container_0_div_7_div_22_Template","GeocodeDialog_ng_container_0_div_7_div_23_Template","GeocodeDialog_ng_container_0_div_7_div_26_Template","GeocodeDialog_ng_container_0_div_7_div_27_Template","GeocodeDialog_ng_container_0_div_7_div_30_Template","GeocodeDialog_ng_container_0_div_7_div_31_Template","GeocodeDialog_ng_container_0_div_7_div_34_Template","GeocodeDialog_ng_container_0_div_7_div_35_Template","GeocodeDialog_ng_container_0_div_7_div_38_Template","GeocodeDialog_ng_container_0_div_7_div_39_Template","GeocodeDialog_ng_container_0_div_7_div_42_Template","GeocodeDialog_ng_container_0_div_7_div_43_Template","GeocodeDialog_ng_container_0_div_7_div_46_Template","GeocodeDialog_ng_container_0_div_7_div_47_Template","GeocodeDialog_ng_container_0_div_7_div_50_Template","GeocodeDialog_ng_container_0_div_7_div_51_Template","GeocodeDialog_ng_container_0_div_7_div_54_Template","GeocodeDialog_ng_container_0_div_7_div_55_Template","GridHasColumn","GeocodeDialog_ng_container_0_div_7_Template","onStart","onDismiss","ShowConfiguration","GeocodeDialogModel","gridCols","GeocodeDialog","GridCols","LookupType","lookupType","lookupTypeValue","StreetColId","streetColId","CityColId","cityColId","StateColId","stateColId","ZipColId","zipColId","LatitudeColId","latitudeColId","LongitudeColId","longitudeColId","gc","streetColumnId","cityColumnId","stateColumnId","zipColumnId","GeocodeDialog_ng_container_0_Template","GridEvent","DataUsedWithKendoGrid","_selectedGridRow","CurrentDataItem","currentDataItem","selectedGridRow","FormInstanceElementWrappers","backupForCancel","elementsInInitialState","ElementsInInitialState","ImportExcelDataIntoGridMetrics","ImportMetricsBase","jsonData","startExcelGridImport","DisableStartImportButton","ImportGridDataDialogInitInfo","asyncJob","truncateExistingGridRows","ImportGridDataDialog","ImportAsyncJobDialogBase","initInfo","importDataService","injectedAsyncJobService","importMetrics","showSaveImportedDataMessage","jobCompletedOrUpdatedArrowFunction","jobCompletedMessageText","parseMetrics","stdOut","startMonitoringJob","ComponentClassName","SelectedFileName","ShowStartImportButton","DismissButtonTitle","ImportStatus","jobInProgress","asyncJobInfo","jobErrorOccurred","numRowsFailedValidation","DetailedSaveResultMessage","JobCompleted","JobErrorOccurred","ExecutionSummaryText","deriveExecutionSummaryText","AllowMultipleFiles","TruncateExistingGridRows","truncateExistingGridRowsChanged","importExcelFileIntoGrid","dismissClicked","copyJobErrorTextToClipboard","jobErrorText","metrics","summaryText","getErrorLog","getWarningLog","getJobSummaryText","jobMetricsJson","jobCompletedMessageJson","ImportGridDataDialog_ng_container_35_Template","JobInProgress","JobTimeElapsed","JobInitiated","addValidationAndFlagForNewKendoRow","ModifyRowDisabled","NewRowDisabled","turnOnGridFilter","turnOffGridFilter","preset_r8","selectPresetFilter","filterName","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_div_1_ng_container_3_button_1_Template","FilterPresets","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_div_1_button_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_div_1_button_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_div_1_ng_container_3_Template","ShowGridFilter","geoCodeGrid","showPasteAreaKendo","onExcelFileChanged","importGridDataClicked","ShowingXofN","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_button_0_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_div_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_button_3_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_button_4_Template","exportGridDataClicked","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_ng_container_7_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_ng_container_8_Template","ShowAddRowButton","GridIsFilterable","ShowGeocodeGrid","ShowPasteButton","ShowUpdloadFromExcelButton","column_r13","getCellDisplayValueForKendo","dataItem_r14","columnDef_r16","iColIndex_r17","_r18","ctx_r14","openUrl","allParamsSuppliedForUrlBuilder","ButtonLabel","getNumericFooterTotalValueFor","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_ng_container_4_ng_template_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_span_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_a_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_button_3_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_ng_container_4_Template","ShowColumnAs","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_3_ng_container_1_ng_template_1_Template","_r19","handleMimickedNgModelChange","handleValidityChange","handleWrapperFormControlCreated","handleTouched","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_3_ng_container_1_Template","DatabaseId","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_ng_template_3_Template","FilterType","IsReadOnlyGrid","ColumnIsFilterable","IsSortable","GetColumnWidth","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_kendo_grid_column_1_Template","ShowColumnInRow","validationFormGroup","_r20","removeNewKendoRowFlag","_r21","dataItem_r22","emitGridEvent","_r23","_r24","_r25","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_0_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_3_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_4_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_5_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_6_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_button_7_Template","rowUsesButton","HideRowDelete","userCanRestore","_r26","iColIndex_r27","columnDef_r28","ctx_r28","gridColumnValueChanged","dataItem_r30","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_ng_template_0_ng_container_2_ng_container_1_app_form_field_wrapper_1_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_ng_template_0_ng_container_2_ng_container_1_div_2_Template","RowEditInProgress","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_ng_template_0_ng_container_2_ng_container_1_Template","ShowColumnInDetail","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_ng_template_0_ng_container_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_ng_template_0_Template","handleLoaded","handleEditCellClick","handleEdit","handleCellClose","handleDetailExpand","handleDetailCollapse","filterChange","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_3_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_kendo_grid_rowreorder_column_4_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_container_5_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_ng_template_7_Template","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_8_Template","ScrollMode","FormInstanceElementId","VirtualScrollingPageSize","VirtualScrollingSkip","dataUsedWithKendoGrid","GetGridHeight","HasFixedRowHeadings","GridHasDetail","GridFieldEditorComponent_ng_container_0_ng_container_2_kendo_grid_1_Template","_r31","GridFieldEditorComponent_ng_container_0_ng_container_2_Template","GridFieldEditorComponent_ng_container_0_ng_container_3_Template","GridFieldEditorComponent_ng_container_0_span_5_Template","HideFormFieldBody","Saving","ConditionalLogicColumnDefsFilterData","filteredColumnDefs","childFieldColumnDef","GridColumnTotalsHelper","dataRows","numericColumnDefs","cellTotals","dataLoaded","loadedData","calculateAllColumnTotals","fieldDef","rowValues","calculateColumnTotal","getFooterValue","rowData","cellValue","getNumericValueFrom","rowDetailPanel","exportDataService","geocodeService","asyncJobService","fieldConditionalLogicService","httpClient","ngZone","RegularGrid","editorGridValidation","gridEvent","newRowIsBeingAdded","conditionalLogicColumnDefsFilter","rowHeight","toolbarHeadersFilters","detailRowHeight","extraHeightWhenEditingRow","showGridFilter","validationCount","resizable","loadingDataProgress","LoadingDataProgressInfo","filterPresets","openExportedDataExcelSpreadsheet","successFlag","downloadFileName","downloadFileURL","getResultFileDownloadUrl","dummyFormInstanceElement","kendoGridRemoteBindingRef","gridFlavorImpl","scrollMode","isAttachmentsGridFlavorAndRowIsEnabled","retValue","IsAttachmentsGridFlavor","hshFormInstanceElementsByName","IsDisabled","isAttachmentsGridFlavorAndRowIsDisabled","canAdmin","IsRegularGridFlavor","gridCommandColumnWidth","saveAnyUnsavedRows","loc","rowEditInProgress","kendoGridInstance","editedRowIndex","_results","saving","kendoGridService","addOrUpdateRow","getSelectedValuesByFieldId","closeAnyExistingRowEditor","DISABLED","GridFlavorFactory","getImplementation","registerGrid","totalsHelper","DataSpy","adjustToolbarHeadersFiltersHeight","gridField","g","filterPresetsJson","formTemplateInstancesGridJsonConfig","presetGridFilters","hideGridBodyIfSoConfigured","componentFormInstanceElement","cellFormInstanceElementWrapper","getFormInstanceElementWrapper","copyWithAnyChildElements","ConditionalLogicColumnDefs","cd","columnDefsToFilter","outputData","kendoGridComponent","componentInfo","applyFieldConditionalLogicInstructions","targetFieldInstructions","instructionsForFormRenderer","targetFieldInstruction","targetFieldId","showTargetField","makeTargetFieldEditable","makeTargetFieldRequired","conditionalLogicInstructions","IsLoading","Loading","disableGridRowDeleteForNonAdmins","fixedFirstColumnJson","hideFormFieldBody","colIndex","operator","filterOperatorAbbreviation","filterMatchValue","presetFilterSelected","showGeocodeGrid","gcd","GeocodeGrid","resp","flagDirty","rowCount","TotalRowCount","beforeClosed","replaceGridData","replaceGridDataFlag","importExcelPasteDataIntoGrid","MonitorExcelImportToGridHelper","dialogInitInfo","readPending","selectExcelFile","click","exportGridDataAsExcelSpreadsheet","monitorJobUntilCompletion","filename","FileInputUtil","clearFileSelection","hideGridFiltering","filterType","isFilterable","gridColumnWidth","gridColumnBehavior","whenInGridShowAs","ShowColumnAsURLLink","handler","isURLLink","colId","onStateChange","getFlexibleSelectFieldInstructionsForGridRow","GridRowDef","removeRow","doNotEnterEditMode","doNotTriggerGridRowEditFor","isHTMLColumn","isEdited","gridIsDirty","dataItemToSave","setupRowForEditing","fitColumns","usesButton","canAddNewRow","longestHeader","reduce","a","b","row","IsSelected","GridFlavor","valuesToFieldIds","cannotMoveRowMessage","movedRowId","targetRowId","position","repositionRow","flagClean","setFormInstanceElementValue","backup","offsetHeight","formFieldComponent","sourceFormInstanceElement","formInstanceCopy","fieClone","cellKeys","HshFormInstanceElementsByName","cellKeyIndex","cellKey","cellValueCopy","customValue","sourceFieldValueChanged","openLink","getCellDisplayValue","RenderAsHtml","label","transientUrlBuilderButtonLabel","tryToReproduceOriginalNgModelError","DummyNgModel","GridIsInvalid","gridValidity","DataResult","rowsDisplayed","GetDisplayKendoGridRows","CalculateGridHeight","isValid","ColumnIsSticky","GridColumnDisplayName","strDisplayName","ClientId","SiteIsInBetaMode","betaFeaturesEnabled","ignoredNgModelChange","columnFound","formInstanceElementWrapper","getCellNameFor","gridElement","gridBodyElement","remove","KendoGridRemoteBindingDirective","MatPaginator","DynamicComponentHostDirective","GridFieldEditorComponent_ng_container_0_Template","trigger","transition","animate","GridRuntimeData","templateDirectives","hshDirectivesByName","dynamicallyCreatedFormFieldsByName","selectedGridRowIndex","selectedGridColumnIndex","iMaxComponentPreviewInstanceHeightRequired","invalidGridRows","gridCellContextMenuItemClicked","GridFormFieldComponent_div_5_div_1_Template","GridFormFieldComponent_div_5_ng_container_2_Template","GridFormFieldComponent_div_5_ng_template_6_Template","gridCellContextMenu_r3","GridFormFieldComponent_div_6_div_1_Template","GridFormFieldComponent_div_6_ng_container_2_Template","showExportToExcelButton","loadFormInstanceElement","mainGridValidation","FIXED_FIRST_COLUMN_FILE","FOOTER","EXCEL_IMPORT_EXPORT_TEMPLATE","HIDE_GRID_BODY","DISABLE_GRID_ROW_DELETE","PRESET_FILTERS","allModesDataSource","runtimeData","formFieldDisplayHints","formFieldConstraintUpdated","acceptsConstraintUpdateFrom","READ_ONLY","createEmptyGridConfig","removeAnyExistingVirtualColDefs","createAnyVirtualColDefs","createGridConfig","hasFixedFirstColumnJsonConfig","transientFixedFirstColumnValues","FixedFirstColumnValues","createFromJson","GridAllModesDataSource","setConstraintUpdatedCallback","setAcceptsConstraintUpdateFrom","ngAfterContentInit","SelectedGridRowIndex","SectedGridColumnIndex","iPageSize","PageSizeOptions","arrPageSizeOptions","ShowFirstLastButtons","IsLoadingGridData","isLoadingGridData","LoadingDataText","loadingDataMessage","LoadDataProgressMode","LoadDataProgressValue","iLoadingDataProgressValue","LoadDataProgressBufferValue","iLoadingDataProgressBufferValue","LoadDataProgressColor","THEME_PALETTE_PRIMARY","PaginatorDisabled","FooterCellClass","cellClass","isCalculatedField","iColumnIndex","bIsCalculatedField","formInstanceElementWrapperParam","GridColumnNamesWithActions","getUnselectedGridRowCellClass","fieldClass","menuItemName","bSuccess","hshComponentProperties","gridConfigColDef","getColumnDefByName","componentAndFormField","cff","processFixedFirstColumnFile","clearAnyFixedFirstColumnConfig","fixedValues","createFromHeaderValuePairs","linesOfHeaderValuePairs","setFirstGridColAsFixedValues","fixedColDef","valuesAreFixed","firstChildField","setIsFootnote","loadGridDataFromViewModelElements","trackColumnTotalsIfSoConfigured","bShowPaginator","numericFFCompPairs","AllNumericComponents","trackColumnTotals","copyDataToGrid","replaceOrAppend","hasColumnDefWithVirtualFormFieldsFor","maxClientId","getMaxClientIdFor","getChildAndAnyVirtualFormFieldsFor","transientFieldIsVirtual","instanceOrPreviewChildFormFieldComponents","formFieldComponents","formFieldComponentsQueryList","toArray","ff1","ff2","fixGridColumnPositionsIfNecessary","colPositionFound","dataColumn","dataColIndex","reorderColumn","GridFormFieldComponent_ng_template_3_Template","GridFormFieldComponent_div_5_Template","GridFormFieldComponent_div_6_Template","HtmlLinkFieldComponent_div_5_ng_container_2_div_1_span_2_Template","HtmlLinkFieldComponent_div_5_ng_container_2_div_1_Template","HtmlLinkFieldComponent_div_5_ng_container_2_ng_container_2_Template","HtmlLinkFieldComponent_div_5_mat_label_4_span_2_Template","HtmlLinkFieldComponent_div_5_ng_container_2_Template","HtmlLinkFieldComponent_div_5_mat_label_4_Template","HtmlLinkFieldComponent_div_5_ng_container_6_Template","HtmlLinkFieldComponent_div_5_ng_container_7_Template","htmlPlaceHolderText","htmlDefaultValue","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_span_2_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_ng_container_2_Template","FormControlValue","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_template_3_mat_label_1_span_2_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_template_3_mat_label_1_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_template_3_ng_container_2_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_template_3_ng_container_3_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_div_2_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_template_3_Template","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_5_Template","htmlLinkNotReadOnly_r7","HtmlLinkFieldComponent_div_6_ng_container_2_ng_container_1_Template","HtmlLinkFieldComponent_div_6_ng_container_2_Template","HtmlLinkFieldComponent_div_6_ng_container_3_Template","HtmlLinkFieldComponent","CONSTRAINT","beginURlText","linkToOpen","HtmlLinkFieldComponent_ng_template_0_Template","HtmlLinkFieldComponent_ng_template_2_Template","HtmlLinkFieldComponent_div_5_Template","HtmlLinkFieldComponent_div_6_Template","Resource","InlineContentFormFieldComponent","inlineContentService","resource","showLoading","buttonName","IFRAME_SRC","ButtonName","Ready","ShowLoading","handleOpenContentButtonClick","getUrl","handleOpenContentButtonClickForGridRow_FOR_DEV_ONLY","getUrlFromGridRow","handleGetContentButtonClick","getContent","InlineContentFormFieldComponent_div_5_Template","InlineContentFormFieldComponent_div_6_Template","encapsulation","_angular_core__WEBPACK_IMPORTED_MODULE_2__","InstructionsFormFieldComponent","InstructionsFormFieldComponent_div_1_Template","IntegerInputFormFieldBaseComponent","NumericInputFormFieldBaseComponent","IntegerOnlyDirective","editingKeys","controlKeys","onKeyDown","ctrlKey","metaKey","onPaste","pastedInput","clipboardData","getData","execCommand","IntegerFormFieldComponent_div_5_ng_container_2_div_1_span_2_Template","IntegerFormFieldComponent_div_5_ng_container_2_div_1_Template","IntegerFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","IntegerFormFieldComponent_div_5_mat_label_4_span_2_Template","DesignModePreviewValue","IntegerFormFieldComponent_div_5_ng_container_2_Template","IntegerFormFieldComponent_div_5_mat_label_4_Template","IntegerFormFieldComponent_div_5_ng_container_6_Template","IntegerFormFieldComponent_div_5_div_7_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_span_2_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_1_div_1_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_2_Template","IntegerFormFieldComponent_div_6_ng_container_2_mat_label_3_span_2_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_1_Template","IntegerFormFieldComponent_div_6_ng_container_2_mat_label_3_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_4_Template","IntegerFormFieldComponent_div_6_ng_container_2_ng_container_5_Template","IntegerFormFieldComponent_div_6_ng_container_2_Template","IntegerFormFieldComponent_div_6_ng_container_3_Template","IntegerFormFieldComponent_div_7_ng_container_2_mat_label_2_span_2_Template","IntegerFormFieldComponent_div_7_ng_container_2_mat_label_2_Template","IntegerFormFieldComponent_div_7_ng_container_2_mat_icon_4_Template","IntegerFormFieldComponent_div_7_ng_container_2_Template","IntegerFormFieldComponent_div_7_ng_container_4_Template","IntegerFormFieldComponent_div_7_ng_container_5_Template","PreviewInstanceModesOutDivCssClass","IntegerFormFieldComponent","MIN_VALUE","MAX_VALUE","SHOW_PREVIEW","IntegerFormFieldComponent_ng_template_0_Template","IntegerFormFieldComponent_ng_template_2_Template","IntegerFormFieldComponent_div_5_Template","IntegerFormFieldComponent_div_6_Template","IntegerFormFieldComponent_div_7_Template","wrapHeaderTextEnabled","gridHeight","CssClass","LabelFormFieldComponent","strCssClass","LabelFormFieldComponent_div_0_Template","LastEditedDateFormFieldComponent_div_3_mat_label_3_Template","LastEditedDateFormFieldComponent_div_3_ng_container_5_Template","LastEditedDateFormFieldComponent_div_4_ng_container_2_ng_container_1_mat_label_2_Template","LastEditedDateFormFieldComponent_div_4_ng_container_2_ng_container_1_ng_container_3_Template","LastEditedDateFormFieldComponent_div_4_ng_container_2_ng_container_1_ng_container_4_Template","LastEditedDateFormFieldComponent_div_4_ng_container_2_ng_container_1_Template","LastEditedDateFormFieldComponent_div_4_ng_container_2_Template","LastEditedDateFormFieldComponent_div_4_ng_container_3_Template","LastEditedDateFormFieldComponent","LastEditedDate","currentDate","DatePipe","_angular_core__WEBPACK_IMPORTED_MODULE_5__","LastEditedDateFormFieldComponent_ng_template_0_Template","LastEditedDateFormFieldComponent_div_3_Template","LastEditedDateFormFieldComponent_div_4_Template","checkboxData_r2","handleCheckboxModelChange","MultiCheckboxFormFieldComponent_div_5_ng_container_4_ng_container_3_ng_container_3_Template","MultiCheckboxFormFieldComponent_div_5_ng_container_4_ng_container_3_ng_container_4_Template","CheckboxValueCount","MultiCheckboxFormFieldComponent_div_5_ng_container_4_ng_container_2_Template","MultiCheckboxFormFieldComponent_div_5_ng_container_4_ng_container_3_Template","instructionsTemplate_r5","CheckboxData","MultiCheckboxFormFieldComponent_div_5_ng_container_3_Template","MultiCheckboxFormFieldComponent_div_5_ng_container_4_Template","MultiCheckboxFormFieldComponent_div_5_ng_container_5_Template","MultiCheckboxFormFieldComponent_div_6_ng_container_3_ng_container_3_ng_container_3_Template","MultiCheckboxFormFieldComponent_div_6_ng_container_3_ng_container_3_ng_container_4_Template","getCheckboxFormControl","i_r9","checkboxData_r8","MultiCheckboxFormFieldComponent_div_6_ng_container_3_ng_container_2_Template","MultiCheckboxFormFieldComponent_div_6_ng_container_3_ng_container_3_Template","MultiCheckboxFormFieldComponent_div_6_div_1_Template","MultiCheckboxFormFieldComponent_div_6_ng_container_2_Template","MultiCheckboxFormFieldComponent_div_6_ng_container_3_Template","MultiCheckboxFormFieldComponent","derivedCheckboxData","iDerivedCheckboxValueCount","rebuildCheckboxData","checkboxValueChanged","checkboxData","ALL","indexParam","checkboxFormControl","iCheckbox","setupFormControl","iNumValuesSelected","child","checkboxIndex","arrCheckboxTitles","bPreviewOrInstanceMode","checkboxTitle","MultiCheckboxFormFieldComponent_ng_template_0_Template","MultiCheckboxFormFieldComponent_ng_template_2_Template","MultiCheckboxFormFieldComponent_div_5_Template","MultiCheckboxFormFieldComponent_div_6_Template","MultiCheckboxFormFieldComponent_ng_container_7_Template","MultiDropDownFormFieldComponent_ng_template_4_ng_container_0_div_1_span_2_Template","MultiDropDownFormFieldComponent_ng_template_4_ng_container_0_div_1_Template","MultiDropDownFormFieldComponent_ng_template_4_ng_container_0_ng_container_2_Template","MultiDropDownFormFieldComponent_ng_template_4_mat_label_2_span_2_Template","dropDownOption_r6","selected_r8","MultiDropDownFormFieldComponent_ng_template_4_ng_container_0_Template","MultiDropDownFormFieldComponent_ng_template_4_mat_label_2_Template","MultiDropDownFormFieldComponent_ng_template_4_button_4_Template","MultiDropDownFormFieldComponent_ng_template_4_button_5_Template","MultiDropDownFormFieldComponent_ng_template_4_span_6_Template","MultiDropDownFormFieldComponent_ng_template_4_mat_option_10_Template","MultiDropDownFormFieldComponent_ng_template_4_mat_chip_option_12_Template","MultiDropDownFormFieldComponent_ng_template_4_mat_chip_option_13_Template","MultiDropDownFormFieldComponent_ng_template_6_ng_container_0_div_1_Template","MultiDropDownFormFieldComponent_ng_template_6_ng_container_0_ng_container_2_Template","noAutoComplete_r11","MultiDropDownFormFieldComponent_ng_template_6_ng_container_0_Template","DropDownReadyToDisplay","MultiDropDownFormFieldComponent","AUTOCOMPLETE","AUTOCOMPLETE_STARTSWITH","AUTOCOMPLETE_CONTAINS","placeholderSelectOption","handleSelectionChange","astrValues","processSelectedValues","setErrors","MultiDropDownFormFieldComponent_ng_template_0_Template","MultiDropDownFormFieldComponent_ng_template_2_Template","MultiDropDownFormFieldComponent_ng_template_4_Template","MultiDropDownFormFieldComponent_ng_template_6_Template","MultiDropDownFormFieldComponent_ng_template_11_Template","MultiDropDownFormFieldComponent_ng_container_12_Template","multiDropDown_r13","tooltipTemplate_r12","removeAnyExtraDigitsAfterDecimalPoint","numberParts","digitsAfterDecimalPoint","showPreview","previewValue","DesignModeOuterDivCssClass","cssClassName","ParagraphFormFieldComponent_div_5_ng_container_2_div_1_span_2_Template","ParagraphFormFieldComponent_div_5_ng_container_2_div_1_Template","ParagraphFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","ParagraphFormFieldComponent_div_5_mat_label_4_span_2_Template","ParagraphFormFieldComponent_div_5_ng_container_2_Template","ParagraphFormFieldComponent_div_5_mat_label_4_Template","ParagraphFormFieldComponent_div_5_ng_container_7_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_span_2_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_ng_container_2_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_mat_label_3_span_2_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_mat_label_3_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_4_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_5_Template","ParagraphFormFieldComponent_div_6_ng_container_2_ng_container_1_Template","ParagraphFormFieldComponent_div_6_ng_container_2_Template","ParagraphFormFieldComponent_div_6_ng_container_3_Template","ParagraphFormFieldComponent","REGEX","COMPONENT","FORM_FIELD","PROPERTIES","ParagraphFormFieldComponent_ng_template_0_Template","ParagraphFormFieldComponent_ng_template_2_Template","ParagraphFormFieldComponent_div_5_Template","ParagraphFormFieldComponent_div_6_Template","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_1_ng_container_2_ng_container_1_Template","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_1_ng_container_2_ng_container_2_Template","IsVertical","strRadioButton_r3","DefaultRadioButtonValue","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_1_ng_container_2_Template","strRadioButton_r5","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_2_ng_container_2_Template","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_1_Template","RadioButtonsFormFieldComponent_div_5_ng_container_7_div_2_Template","UseHorizontalTabFormat","RadioButtonsFormFieldComponent_div_5_span_4_Template","RadioButtonsFormFieldComponent_div_5_ng_container_5_Template","RadioButtonsFormFieldComponent_div_5_ng_container_6_Template","RadioButtonsFormFieldComponent_div_5_ng_container_7_Template","RadioButtonsFormFieldComponent_div_5_ng_container_9_Template","instructionsTemplate_r6","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_ng_container_6_ng_container_1_Template","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_ng_container_6_ng_container_2_Template","i_r10","strRadioButton_r9","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_span_3_Template","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_ng_container_4_Template","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_ng_container_6_Template","radioTabClick","strRadioButton_r13","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_3_ng_container_2_Template","selectedTabIndex","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_2_Template","RadioButtonsFormFieldComponent_div_6_ng_container_2_div_3_Template","RadioButtonsFormFieldComponent_div_6_ng_container_2_Template","RadioButtonsFormFieldComponent_div_6_ng_container_3_Template","RadioButtonsFormFieldComponent_div_6_ng_container_5_Template","RadioButtonsFormFieldComponent","HORIZONTALTABS","selectedTabName","NoRadioButtonsConfiguredMessage","radio_buttons_form","RadioButtonsFormFieldComponent_ng_template_0_Template","RadioButtonsFormFieldComponent_ng_template_2_Template","RadioButtonsFormFieldComponent_div_5_Template","RadioButtonsFormFieldComponent_div_6_Template","RawHtmlFormFieldComponent","HTML_TEXT","testHTML","HTML","htmlText","onHistoryClick","exportRichTextHistoryClicked","RichTextFormFieldComponent_div_9_span_1_Template","RichTextFormFieldComponent_div_9_span_2_Template","RichTextFormFieldComponent_div_9_span_3_Template","ShowHistoryLink","RichTextFormFieldComponent_ng_container_10_ng_container_1_Template","onViewVersion","onVersionRestore","onCloseHistory","FormInstanceElementForHistory","versionToShow","getExtraInfo","_c4","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_3_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_4_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_dropdownlist_5_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_dropdownlist_6_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_dropdownlist_7_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_colorpicker_8_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_colorpicker_9_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_10_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_11_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_12_Template","RichTextFormFieldComponent_ng_container_13_kendo_editor_insert_table_button_13_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_14_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_15_Template","RichTextFormFieldComponent_ng_container_13_kendo_toolbar_buttongroup_16_Template","getEditorCssDefaults","includeSimpleTextButtons","includeAllButtons","includeBulletButtons","HtmlValue","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_3_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_4_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_dropdownlist_5_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_dropdownlist_6_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_dropdownlist_7_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_colorpicker_8_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_colorpicker_9_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_10_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_11_Template","RichTextFormFieldComponent_ng_container_14_kendo_editor_insert_table_button_12_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_13_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_14_Template","RichTextFormFieldComponent_ng_container_14_kendo_toolbar_buttongroup_15_Template","RichTextFormFieldComponent","showHistoryLink","domParser","DOMParser","xmlSerializer","XMLSerializer","editorSubject","AsyncSubject","basic","bullets","TOOLBARS","simpleText","simpleTextWithBullets","selectedToolbar","openExcelHistory","ShowHistory","ListItems","listItems","ret","showHistory","showComparison","getFormInstanceElementHistory","elements","exportRichTextHistoryAsExcelSpreadsheet","initialHtmlValue","ShowComparison","VersionToShow","DISPLAY_FORMAT_VALUES","PROPERTY_UPDATE_REQUIRED","initRichTextControl","setContent","convertToXHTML","html","xhtml","nodes","from","parseFromString","children","node","serializeToString","characterCount","plugins","wordcount","getCharacterCount","maxlength","requiredLength","actualLength","RichTextFormFieldComponent_ng_template_0_Template","RichTextFormFieldComponent_ng_template_2_Template","RichTextFormFieldComponent_div_9_Template","RichTextFormFieldComponent_ng_container_10_Template","RichTextFormFieldComponent_div_11_Template","RichTextFormFieldComponent_div_12_Template","RichTextFormFieldComponent_ng_container_13_Template","RichTextFormFieldComponent_ng_container_14_Template","RichTextFormFieldComponent_ng_container_15_Template","RichTextFormFieldComponent_ng_container_17_Template","ShortTextFormFieldComponent_div_5_ng_container_2_div_1_span_2_Template","ShortTextFormFieldComponent_div_5_ng_container_2_div_1_Template","ShortTextFormFieldComponent_div_5_ng_container_2_ng_container_2_Template","ShortTextFormFieldComponent_div_5_mat_label_4_span_2_Template","ShortTextFormFieldComponent_div_5_ng_container_2_Template","ShortTextFormFieldComponent_div_5_mat_label_4_Template","ShortTextFormFieldComponent_div_5_ng_container_6_Template","ShortTextFormFieldComponent_div_5_ng_container_7_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_span_2_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_div_1_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_ng_container_2_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_mat_label_3_span_2_Template","NumGridOnlyTextAreaRows","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_1_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_mat_label_3_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_4_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_5_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_ng_container_6_Template","ShortTextFormFieldComponent_div_6_ng_container_2_ng_container_1_Template","ShortTextFormFieldComponent_div_6_ng_container_2_Template","ShortTextFormFieldComponent_div_6_ng_container_3_Template","ShortTextFormFieldComponent","ShortTextFormFieldComponent_ng_template_0_Template","ShortTextFormFieldComponent_ng_template_2_Template","ShortTextFormFieldComponent_div_5_Template","ShortTextFormFieldComponent_div_6_Template","IndentationStyle","DescriptiveDisplayName","ConfigurationHintText","ConfiguredRoleNames","ConditionalNestingLevel","ShowToHideFromComponent_div_0_div_4_ng_container_1_Template","ShowToHideFromComponent_div_0_div_4_ng_container_2_Template","ShowConfiguredRoleNames","DebugMode","ShowToHideFromComponent_div_0_mat_label_2_Template","ShowToHideFromComponent_div_0_div_3_Template","ShowToHideFromComponent_div_0_div_4_Template","ShowConfigurationHint","ShowToHideFromComponent","ROLE_NAMES","isShowTo","ShowToFieldType","isConditionalBeginElement","FieldTypeName","BeginOrEndTag","transientMatchingBeginOrEndField","transientBeginFieldDisplayName","showToHideFromRoleNames","transientConditionalNestingLevel","indentationStyle","ShowToHideFromComponent_div_0_Template","UrlBuilderFormFieldComponent","URL_BUILDER","URL_BUILDER_LABEL","UrlBuilderFormFieldComponent_span_0_Template","UrlBuilderFormFieldComponent_span_1_Template","ListItemMoveData","targetOfMove","reorder","Reorder","MovedItemsNames","BaseViewComponent","injectedDragDropService","typeSortOrder","FOLDER","FORM_INSTANCE","WORKFLOW","FORM","ATTACH_W_URLS","DATACOLLECTION","DOCUMENT_PUBLISH_SETTINGS","FORM_INSTANCE_ELEMENT_FOR_HISTORY","LOG_MESSAGE","NOTIFICATION","SUBSCRIPTION","defaultSortColumn","sortableColumns","listItemsAreDraggable","editClick","itemActionClick","itemContextMenu","dragAction","filesDropped","itemMoved","selectionsSet","itemDragDataStart","itemDragDataEnd","dragDropService","itemBeingDragged","selectedItemId","setSelected","getItemTitle","getTitle","isTypeWorkflow","isTypeFormInstance","isTypeFolder","isTypeAttachment","isTypeBreadcrumb","ItemIsBeingDraggedBase","ItemDragDataStart","onDragDrop","any","targetOfDrop","passedItems","droppedItems","itemData","allowDrop","dropOnViewWhiteSpace","folderID","currentFolder","uploadDroppedFiles","dropGridOrTileObject","passedSelectionModel","passedItem","doSortListData","sortDirection","sortColumn","types","sorted","getType","toConcat","sortArrayInDirection","concat","getActionButtonTitle","isDisabled","onItemActionClick","unsetSelected","onEditClick","onItemContextMenu","generateItemActionId","onItemDragStart","ListItemDragActionData","dragEventData","ListItemDragActionEnum","DRAG_START","setItems","onItemDragEnd","DRAG_END","Files","Reload","getFileNames","selectedItemActionId","passedArray","direction","ListViewHelper","NO_SORT","isGreaterThan","getStatus","getPosition","list","filterTerm","parentTitle","listType","totalListCount","typeSortOrderConfig","itemActionButtons","CustomColumnProperty","colConfig","masterToggle","selectAllTitle","selection","hasValue","isAllSelected","row_r4","onDragOverRepositionAbove","onDropOnRepositionAbove","clearReposition","GridViewComponent_td_3_mat_icon_3_Template","setSelectedRow","selectionChange","onDropOnRepositionBelow","onDragOverRepositionBelow","getRepositionAboveClass","getRepositionBelowClass","GetColumnDisplayName","row_r6","row_r8","itemSelected","getName","btn_r12","hideActionButtonsClass","iconFor","GridViewComponent_td_9_ng_container_6_ng_container_1_mat_icon_1_Template","GridViewComponent_td_9_ng_container_6_ng_container_1_mat_icon_2_Template","iconFormatFor","GridViewComponent_td_9_ng_container_6_ng_container_1_Template","GridViewComponent_td_9_ng_container_6_ng_container_2_Template","appliesTo","GridViewComponent_td_9_a_4_Template","GridViewComponent_td_9_span_5_Template","GridViewComponent_td_9_ng_container_6_Template","renderNameAsLink","row_r14","row_r15","row_r16","getChildCount","getModifiedBy","row_r18","getModifiedDate","row_r19","row_r20","col_r21","row_r22","getValue","GridViewComponent_ng_container_31_th_1_Template","GridViewComponent_ng_container_31_td_2_Template","row_r24","onRightClick","GridItemDragged","rowClicked","getExpandRowForReorderingClass","STRUCTURE_PROPERTY_NAME","STRUCTURE_PROPERTY_MODIFIED_DATE","STRUCTURE_PROPERTY_MODIFIED_BY","STRUCTURE_PROPERTY_TEMPLATE","STRUCTURE_PROPERTY_STATUS","UserSiteRoleNamesInfo","userSiteRoleNamesRetrieved","userSiteRoleNames","structureColumnsComputed","columnsToDisplay","roleService","enableInfiniteScrolling","maxSelection","sortChange","exceededMaxSelection","SelectionModel","lastSelectedRow","userSiteRoleNamesInfo","columnDisplayNames","childCount","dataSource","MatTableDataSource","idOfRepositionAbove","idOfRepositionBelow","rowIsTargetOfReording","itemIndex","rowBeingDroppedOn","offset","doReordering","indexOfOffsetItem","offsetRow","nativeEvent","draggedRow","draggedOverRowIsTargetOfReordering","draggedAndDraggedOverAreNotTheSame","draggedAndDraggedOverAreOfTheSameType","columnsConfig","columnConfig","internalAndDisplayName","filterPredicate","initializeSavedSort","setDataSource","configuredStructureFields","HasAtLeastOneHiddenField","getUserSiteRoleNames","userRoleNames","filterGridData","clearSelection","ngDoCheck","toggle","DataSource","SavedSort","savedSort","MatSortActive","active","MatSortDirection","filterStructureColumnNames","PropertyCols","props","clear","doFilter","listItemName","saveSortState","sortState","stateToSave","matSort","sortCacheKey","passedList","serializedSort","sortKey","ListViewEnum","GRID_VIEW","numSelected","displayedRows","connect","shiftKey","indexOfLastClicked","indexOfCurrentSelection","setSelectionGroup","ctrlSelect","deselect","handleCtrlA","charCode","String","fromCharCode","which","sortData","rows","start","end","MatSort","GridViewComponent_th_2_Template","GridViewComponent_td_3_Template","GridViewComponent_th_5_Template","GridViewComponent_td_6_Template","GridViewComponent_th_8_Template","GridViewComponent_td_9_Template","GridViewComponent_th_11_Template","GridViewComponent_td_12_Template","GridViewComponent_th_14_Template","GridViewComponent_td_15_Template","GridViewComponent_th_17_Template","GridViewComponent_td_18_Template","GridViewComponent_th_20_Template","GridViewComponent_td_21_Template","GridViewComponent_th_23_Template","GridViewComponent_td_24_Template","GridViewComponent_th_26_Template","GridViewComponent_td_27_Template","GridViewComponent_th_29_Template","GridViewComponent_td_30_Template","GridViewComponent_ng_container_31_Template","GridViewComponent_tr_32_Template","GridViewComponent_tr_33_Template","IconDisplayStyle","Default","MaterialIconsOutlined","ignoredItem","iconDisplayStyle","cssClass","inlineStyles","setInlineStyles","setButtonClickHandler","buttonClickHandler","TrashDeleteEvent","originalEventParam","itemsParam","bCanDeleteParam","bCanDelete","CanDelete","PerspectiveLabel","perspectiveName_r4","ListViewComponent_ng_container_3_ng_container_1_Template","PerspectiveName","perspectiveNameChanged","ListViewComponent_ng_container_3_mat_option_3_Template","PerspectiveNames","btn_r6","emitButtonClick","ListViewComponent_button_4_span_1_Template","ListViewComponent_button_4_mat_icon_2_Template","ListViewComponent_button_4_mat_icon_3_Template","FilterTermFormGroup","btn_r8","ListViewComponent_button_7_ng_container_2_mat_icon_1_Template","ListViewComponent_button_7_ng_container_2_mat_icon_2_Template","ListViewComponent_button_7_ng_container_2_mat_icon_3_Template","ListViewComponent_button_7_ng_container_2_mat_icon_4_Template","ListViewComponent_button_7_ng_container_2_mat_icon_5_Template","IsMaterialIconWithDefaultStyle","IsMaterialIconWithCustomStyle","IsMaterialIconWithInlineStyle","IsSvgIconWithNoInlineStyles","IsSvgIconWithInlineStyles","ListViewComponent_button_7_span_1_Template","ListViewComponent_button_7_ng_container_2_Template","onItemDroppedOnTrash","ItemIsBeingDragged","btn_r11","ListViewComponent_button_9_ng_container_2_mat_icon_1_Template","ListViewComponent_button_9_ng_container_2_mat_icon_2_Template","ListViewComponent_button_9_ng_container_2_mat_icon_3_Template","ListViewComponent_button_9_span_1_Template","ListViewComponent_button_9_ng_container_2_Template","sortMenu_r12","ListViewComponent_button_11_mat_icon_1_Template","ListViewComponent_button_11_mat_icon_2_Template","viewsMenu_r13","view","onDragAction","handleSortChange","onItemMoved","onFileDropped","setSelections","FilterTerm","selectedId","GetSortDirection","_r15","configureStructureFields","_formBuilder","showTreeButton","throttleFilterChange","listViewLiaison","onTree","buttonClick","itemDeleted","perspectiveChanged","loadMore","viewChange","filterTermChange","dragged","filterTermFormGroup","listLengthWhenLoadMoreEmitted","listViewPerspective","perspectiveName","bShowTrashCan","itemDragData","trashConfig","allItemsLoaded","loadMoreCounter","viewInitialized","listViewInitializing","initializeFilterTermControl","initView","viewCacheKey","perspectives","iSelectedIndex","InitialPerspectiveIndex","listIsFiltered","parentNeedsToFilterOnServer","pageSizeCondition","PAGE_SIZE","listLengthCondition","filterTermCondition","initializeInfiniteScroll","listResetAt","setSortDirection","viewOverride","cacheKey","setView","doInfiniteScrolling","done","APP_WIDE_INFINITE_SCROLL_ENABLED","DisplaySearch","btn","Perspective","Label","perspectiveNameParam","filterTermParam","View","viewParam","SortDirection","sortDirectionParam","HasTrashCan","getMatIconCssClasses","sourceCssClass","toEmit","FilesDroppedOnStructureEvent","setToDropFolderId","setObjectType","DragDropEnum","setReload","tileViewComponent","gridViewComponent","emitOnTree","root","rootMargin","threshold","IntersectionObserver","entries","entry","isIntersecting","okToEmitLoadMore","infiniteScrollSentinel","observe","forceLoadMore","DisplayInfiniteScrollSentinel","_angular_core__WEBPACK_IMPORTED_MODULE_11__","ListViewComponent_h1_2_Template","ListViewComponent_ng_container_3_Template","ListViewComponent_button_4_Template","ListViewComponent_form_5_Template","ListViewComponent_button_7_Template","ListViewComponent_ng_container_8_Template","ListViewComponent_button_9_Template","ListViewComponent_button_10_Template","ListViewComponent_button_11_Template","ListViewComponent_app_tile_view_34_Template","ListViewComponent_app_grid_view_35_Template","navigation","SITE_LIST","STRUCTURE","TILE_VIEW","VIEW_SORT_STATE","FORM_INSTANCE_HISTORY","DEFAULT_SORT","FOLDER_DEFAULT_SORT","getInitialPageSize","getSortObjFor","sortConfig","btn_r5","item_r2","HideActionButtonsClass","TileViewComponent_div_1_div_6_ng_container_1_mat_icon_1_Template","TileViewComponent_div_1_div_6_ng_container_1_mat_icon_2_Template","TileViewComponent_div_1_div_6_ng_container_1_Template","getIcon","TileItemDragged","Selection","TileViewComponent_div_1_ng_container_8_mat_icon_1_Template","TileViewComponent_div_1_ng_container_8_mat_icon_2_Template","canBeDeleted","TileViewComponent_div_1_ng_container_9_mat_icon_1_Template","TileViewComponent_div_1_ng_container_9_mat_icon_2_Template","setSelectedItem","TileViewComponent_div_1_div_6_Template","TileViewComponent_div_1_ng_container_8_Template","TileViewComponent_div_1_ng_container_9_Template","getIconType","defaultIcon","propetyToSortBy","filteredList","copyOfOriginalList","initFilteredList","fabricIconSize","FabricIconSizes","LARGE","FilteredList","DefaultIcon","isAttachmentIcon","TileViewComponent_div_1_Template","pickerItem_r2","fullDisplay","addMember","SecondButtonFlyoverText","DisableSecondButton","PickerDisabled","SecondButtonName","MaxPickerComponent","maxPickerService","addMemberFormGroup","showLoadingIndicator","pickerItems","userGroupPickerLabel","pickerDisabled","maxMemberStyle","addButtonName","addButtonFlyoverText","addButtonAdditionalStyle","addButtonCanEnable","secondButtonName","secondButtonCanEnable","secondButtonIgnoreMemberInput","secondButtonFlyoverText","addButtonClicked","secondButtonClicked","createFormGroupAndInitFilteredUsers","initializeLoadingIndicator","AddMemberFormGroup","MaxMemberStyle","AddButtonName","AddButtonAdditionalStyle","AddButtonFlyoverText","UserGroupPickerLabel","ShowLoadingIndicator","DisplayUserName","pi","PickerItems","DisableAddButton","memberInput","bDisable","addMembership","membershipOrMemberAdded","membershipAdded","member","initializeFilteredUsers","pickerServiceSearch","isSearching","pickerLoadingTmeoutId","MaxPickerComponent_span_6_Template","MaxPickerComponent_mat_option_9_Template","MaxPickerComponent_ng_container_13_Template","addMemberAutoComplete_r5","ScriptableElementsToFind","anElementSelector","elementTypeMetadata","additionalElementInfo","elementsFound","ScriptableElement","hasLinks","optionalAdditionalElementInfo","elementHasLinks","hasButtons","elementHasButtons","hasButtonsWithMatIcons","elementHasButtonsWithMatIcons","elementHasMatListItems","hasMatIcons","elementHasMatIcons","hasInput","elementHasInput","hasInputs","elementHasInputs","hasMatCheckBox","elementHasMatCheckBox","hasMatList","elementHasMatList","hasMatSelect","elementHasMatSelect","hasInnerTextSelector","hasCustomPreprocessorFunction","preprocessingFunction","elementHasCustomPreprocessingFunction","hasCustomGetTextFunction","getTextFunction","elementHasCustomGetTextFunction","hasGetClickableElementFunction","getClickableElementFunction","elementHasGetClickableElementFunction","hasToggleCheckboxMethodName","methodName","elementHasToggleCheckboxMethodName","hasElementSubType","subtype","elementHasSubtype","withName","elementHasName","withNames","names","elementHasNames","withNameToPrettyNameMap","nameToPrettyNameMap","elementHasNameToPrettyNamesMap","withStandardNameToPrettyStandardNameMap","standardNameToPrettyStandardNameMap","elementHasStandardNameToPrettyStandardName","withElementsSubtypeMap","elementsSubtypeMap","elementHasElementSubtypesMaps","withAddedDateTimeSuffix","hasSuffix","elementHasAddedDateTimeSuffix","withOperationCompletedServiceMap","operationCompletedServiceMap","elementHasOperationCompletedServiceMap","allowsZeroElements","elementAllowsZeroElements","withMaxTimeoutsLookingForScriptableElements","maxTimeoutsLookingForScriptableElements","elementHasMaxTimeoutsLookingForScriptableElements","EnumReference","enumName","hasValues","enumHasValues","withPrettyNames","prettyNames","enumHasPrettyNames","WatchTimeoutInfo","timeoutInMilliseconds","timeoutsCompleted","ScriptableElementsData","scriptableElementsToFind","componentMethodsFound","nextId","initializationStatus","ScriptableComponentStatus","Initializing","watchTimeoutInfo","scriptableElementsInfo","componentId","optionalDrawerComponentLiaison","preprocessListViewToolbarMatIcons","driver","customTextValues","elementSubtypeNames","customTextValue","existingTextValue","preprocessListViewMatIcons","elementSubtype","ancestor","getAncestor","namePlateDiv","findElementIn","nameDiv","innerText","prettyStandardName","getClickableListViewToolbarElementFunction","parentNode","hasDrawerComponentLiaison","drawerComponentLiaison","componentHierarchyService","htmlElementTypeService","jqueryBrowserDriverService","JQueryBrowserDriverService","registerChildComponent","drawerComponentInitialized","findScriptableElements","InitializationStatus","InitializationComplete","notifyInitializationCompleted","reFindScriptableElements","removeComponent","tagName","tag","elementTypes","getAnyComponentMethods","mapOfElementTypes","elementType","metadataKey","findAnyScriptableComponentMethods","getElementsOfType","getMetadataForElementType","elementsToFind","elIndex","elementTitle","singularElementType","singular","elementInfo","HtmlElementInfo","elementSubtypeName","setDisplayTabNameForElementTypeSubtype","htmlElementInfo","displayTabName","prettyElementTypeTitle","setupSearchForElements","HtmlElementTypeNames","links_metadataKey","buttons_metadataKey","buttonsWithMatIcons_metadataKey","matListItems_metadataKey","matIcons_metadataKey","matSelect_metadataKey","input_metadataKey","inputs_metadataKey","matCheckBox_metadataKey","matList_metadataKey","getLastAdditionalElementInfoFor","customPreprocessingFunction","customGetTextForFunction","standardNameToPrettyStandardName","hasAddedDateTimeSuffix","toggleCheckboxMethodName","allowZeroElements","usesEnum","enumMetadata","EnumMetadata","ComponentMethodsService","registerOrUpdateEnum","getEnumMetadata","setupSearchForListViewElements","toolbarMatIconsNameToPrettyNameMap","elementSubtypeMap","allowZeroContentItems","toolbarScriptableElement","scriptableElement","info","throwError","scriptableElementInitialized","scriptableElementObject","elementsInitialized","elementSelector","htmlElementSelector","logMessage","initializationCompleted","InitializationFailed","getMatInputWithElement","resultMatInput","matInputs","matInputElementRefs","matInputsArray","matInputElementRefsArray","matInput","remainingElementsToFind","se","allElementsFound","handleFindElementsTimeout","handleInitializedCompleted","canKeepLooking","remainingElementsInfo","debugElements","findElementsIn","findElementsWorkCompleted","canClearIntervalFor","processAnyAdditionalElementInfoFor","listOfScriptableElements","myClassName","componentMethodsMetadata","getComponentMethodsMetadataFor","methodsMetadata","methodsElementTypeMetadata","componentMethods_metadataKey","methodsScriptableElements","typeMetadata","canClear","elementCountExpected","ElementCountExpected","Singular","Singular_or_Plural","Plural","LogToConsole","getElementTypeMetadata","md","searchCriteria","componentInitialized","listOfElementsInfo","sei","elementsInfo","testValue","numElements","setDataAttributeValue","HtmlMetadataTagNames","elementName_dataAttribute","getDataAttributeValue","numNames","nameIndex","MatInput","ElementRef","MatCheckbox","elementInfo_r4","onElementInfoClicked","onElementInfoDoubleClicked","getElementTooltip","getElementTitle","SelectedComponentInfoComponent_ng_container_3_mat_tab_2_ng_container_3_Template","displayTabName_r5","getComponentElementsForTab","elementTypeIndexChanged","SelectedComponentInfoComponent_ng_container_3_mat_tab_2_Template","ComponentDisplayTabNames","ComponentNoElementsMessage","uiTestActionRecorderService","selectedComponent","selectedComponentInfo","simpleChange","testableComponent","handleComponentSelected","ComponentSelected","SelectedComponent","SelectedElementInfo","ComponentHasElements","hasElements","componentElementTypes","ComponentElementTypes","getElementTypeTitle","capitalize","getComponentElementsOfType","mapOfElementsByType","ElementSelected","selectedElement","tabNames","tabName","mapOfElementTypesByTabName","elementData","tabElementInfo","elementsForType","elementSubtypes","onSelectedElementChanged","selectedElementTypeIndex","selectedElementName","onSelectedElementClicked","selectedElementHasProperties","hasProperties","selectedElementHasActions","hasActions","selectedElementHasInputs","onSelectedElementDoubleClicked","selectedNodeElementComponent","onSelectedElementActionClicked","editSelectedInputValue","getHtmlElementInfoFor","elementMetadataKey","callNumber","elementTypeInfo","SelectedComponentData","SelectedComponentInfoComponent_p_2_Template","SelectedComponentInfoComponent_ng_container_3_Template","SelectedComponentInfoComponent_p_4_Template","SelectedComponentInfoComponent_p_6_Template","EditValueResult","hasDateAndTimeSuffix","EditValueDialog","existingValue","editValueResult","valueFormControl","hasDateTimeSuffixFormControl","setupFormControls","ValueFormControl","HasDateTimeSuffixFormControl","OkButtonDisabled","okButtonClicked","valueControlProperties","updatedValue","SelectedElementName","SelectedElementType","SelectedElementHasProperties","CachedSelectedElementHasProperties","SelectedElementProperties","SelectedElementHasActions","CachedSelectedElementHasActions","SelectedElementActions","actions","getActions","SelectedElementHasInputs","CachedSelectedElementHasInputs","SelectedElementInputs","getInputs","SelectedElementInput","SelectedElementInputValue","getInputName","input","inputTitle","SelectedElementIsInput","isInput","useDoubleClick","doubleClick","editInputValue","SelectedNodeElementComponent_ng_container_0_Template","toggleNotifyDevs","toggleCCtoUser","UserEmail","AlertDialogComponent_div_7_mat_checkbox_3_Template","Placeholder","CopyToClipboard","CorrelationId","AlertDialogComponent_div_8_div_8_Template","disableAnimation","TechnicalInfo","SendErrorReport","SendDisabled","SendCaption","hideRequestAssistance","notifyDevs","sendCCtoUser","sendDisabled","isFeedback","emailStatus","userEmail","placeholder","sendCaption","tryingToDo","EmailStatus","HideRequestAssistance","NotifyDevs","ShowTechnicalDetails","msgBody","context","msgSubject","msgCC","msgTo","subject","to","cc","SendErrorMail","reloadPage","AlertDialogComponent_mat_checkbox_6_Template","AlertDialogComponent_div_7_Template","AlertDialogComponent_div_8_Template","AlertDialogComponent_button_12_Template","JOB_COMPLETED_MESSAGE","AsyncJobDialogBase","timeoutsSinceJobInitiated","jobCompleted","intervalTimeoutId","jobCompletedCallback","jobUpdatedCallback","timeoutTimeInMilliseconds","handleIntervalTimeout","getJob","jobKey","AsyncJob","STATUS_COMPLETE","STATUS_COMPLETE_ERROR","stdError","resetIdleTimer","CustomEvent","dispatchEvent","getAppDataForRestoration","appData","componentName","time","iMinutes","iSeconds","reInit","JobErrorText","parseCreatedSiteId","iSiteId","siteParts","parseResultObjectId","iObjectId","ImportFormInstancesMetrics","providedAsyncJobService","parseImportFormInstancesMetrics","NewSiteOptions","onOkClicked","dialogOptions","DismissButtonText","startTimer","intervalId","ConfirmButtonText","confirmButtonText","no","dismissButtonText","ConfirmationDialogComponent_mat_icon_4_Template","ConfirmationDialogComponent_span_7_Template","ConfirmationDialogComponent_button_11_Template","ContentLabel","NumContentControlRows","ContentFormControl","iTab_r4","DisplayContentDialog_ng_container_0_ng_container_4_ng_container_2_mat_tab_3_ng_template_1_Template","tabName_r5","SelectedContentIndex","tabChanged","DisplayContentDialog_ng_container_0_ng_container_4_ng_container_2_mat_tab_3_Template","TabNames","DisplayContentDialog_ng_container_0_ng_container_4_ng_container_1_Template","DisplayContentDialog_ng_container_0_ng_container_4_ng_container_2_Template","HasInitialized","TabCount","DisplayContentDialog_ng_container_0_ng_container_4_Template","copyContentToClipboard","HasNoContent","DisplayContentDialogInitData","titleParam","contentDataParam","numDisplayRowsParam","contentData","DisplayContentDataWithFormControl","contentFormControl","DisplayContentDialog","initData","bInitialized","tabCount","selectedContentIndex","TabContent","tabIndex","TabName","DataIsReadOnly","makeContentReadonly","messageSpan","removeClass","addClass","iContentInfo","controlProperties","contentDataWithFormControl","DisplayContentDialog_ng_container_0_Template","CurrentAttachmentTitle","FileUploadDialogComponent_div_5_div_3_Template","FileUploadDialogComponent_div_5_ng_template_4_Template","file_entered_r3","i_r6","setTitle","GetProgressFor","file_r8","FileUploadDialogComponent_div_7_mat_form_field_7_Template","FileUploadDialogComponent_div_7_mat_progress_bar_8_Template","deleteFile","TitleIsEditable","Progress","hshProgressObservables","hshProgressValues","iNumProgressValuesComplete","primaryButtonText","canBeClosed","showCancelButton","uploading","uploadSuccessful","titles","currentFileUploaded","ShowUploadControls","AllowMultipleFileSelections","CurrentAttachmentId","Titles","CanBeClosed","Uploading","UploadSuccessful","iProgress","progressValue","ShowCancelButton","PrimaryButtonText","addFiles","fnProgressSubscribor","progressData","callerData","handleFileUploadProgressUpdate","uploadFilesOrCloseDialog","titleNotSupplied","uploadFiles","Set","allProgressObservables","progressObservable","progress","initialProgressInfo","FileUploadProgress","forkJoin","prepareFilesList","onFileEntered","passedVal","fileBrowseHandler","uploadFilesSimulator","FileUploadDialogComponent_h1_1_Template","FileUploadDialogComponent_div_5_Template","FileUploadDialogComponent_div_7_Template","copySiteService","importSiteName","fileSet","selectedFileName","ignoreValidationErrors","jobCompletedArrowFunction","importSiteMetrics","ImportSiteName","importSiteNameParam","ImportedSiteId","ImportSiteNameIsEmpty","FileSelected","IgnoreValidationErrors","selectImportFile","onFileAdded","selectedFile","add","startSiteImport","arrFile","importSite","dialogResult","jobMetricsObject","ExportSiteMetrics","SelectOptionsDialog","ServiceClassInfo","serviceClass","serviceInstance","ServiceClassCatalogueService","serviceClasses","cachedServiceClassInfo","serviceClassCatalogue","serviceClassName","serviceClassInfo","ComponentMethodsMetadata","selectComponent","clickElement","TokenCode","FunctionExecutionStatus","ServiceAsTestableComponent","nextServiceId","serviceInfo","_id","methodMetadata","TOKEN_END_OF_INPUT","TOKEN_SYNTAX_ERROR","TOKEN_COMMA","TOKEN_SEMICOLON","TOKEN_STRING_SINGLE_QUOTES","TOKEN_LEFT_PAREN","TOKEN_RIGHT_PAREN","TOKEN_IDENTIFIER","TOKEN_NUMBER","TOKEN_TRUE","TOKEN_FALSE","TOKEN_NULL","TOKEN_FUNCTION_CALL","Token","tokenCode","tokenValue","code","Code","Tokenizer","ZERO","NINE","LITTLE_A","LITTLE_Z","BIG_A","BIG_Z","strInputParam","strInput","iInputLength","iInputIndex","strTokenValue","bTokenPutBack","getToken","ch","bEndOfInput","bCharIsWhiteSpace","getChar","isWhiteSpace","getStringToken","isDigit","getNumberToken","isAscii","getIdentifierOrKeywordTokenText","getIdentifierOrKeywordTokenFromText","syntaxError","putBackChar","chQuote","tokenBuf","bGotQuoteChar","chDigit","chLetter","bIsAscii","Tuple","opCodeParam","leftValParam","rightValParam","opCode","leftValue","rightValue","OpCode","LeftValue","RightValue","FunctionCallTuple","scriptableFunction","ParsedTestCommands","tuples","UITestDirectiveParser","tokenizer","parseTuples","script","scriptableFunctionService","parsedCommands","endOfInput","firstToken","expectAnyToken","functionCallTuple","parseFunctionCall","functionName","functionParams","getScriptableFunctionNamed","validateParams","SyntaxErrorMessage","parseTuple","inputParam","idOrStringToken","nextToken","idToken","firstParamOrRightParen","lstParams","parseAdditionalFunctionParams","firstParam","lstParamTokens","bContinueParsingParameters","expect","iTokenCode","NotStarted","Completed","Verifying","Failed","ScriptableFunctionBase","awaitingCompletionOfOperationName","awaitedOperationCompleted","numCheckExecutionCallsSinceComponentInitialized","minNumParams","maxNumParams","checkExecutionStatus","testActionService","operationCompleted","operationName","registerAsOperationCompletedCallback","operationCompletedServiceName","success","registerCallback","getRegisterOperationCompletedCallbackFor","registerOperationCompletedCallback","SelectComponentScriptableFunction","selectedComponentInitialized","callableName","execute","addHierarchyChangedHandler","executionStatus","findComponentTreeNodeByTagFromRoot","componentAdded","componentRemoved","currentParentComponent","hierarchyChanged","CallMethodScriptableFunction","methodParams","paramsIndex","callMethod","ClickButtonScriptableFunction","clickButton","ClickLinkScriptableFunction","clickLink","SetInputValueScriptableFunction","addDateTimeSuffix","setInputValue","ScriptableFunctionService","scriptableFunctions","ScriptableFunctions","naResult","ReplayTestActionInfo","scriptCommands","currentTupleIndex","lastExecutionStatus","numCheckExecutionStatusCalls","maxCheckExecutionStatusCalls","myComponentHierarchyService","serviceCatalogueService","formBuilderService","folderService","cachedTreeData","selectedTreeNode","serviceClassNames","selectedServiceInfo","replayTestActionInfo","tryToFindAndSelectComponentNode","servicesCatalogue","removeHierarchyChangedHandler","TreeNodes","HierarchyAsTreeNodes","SelectedTreeNode","componentIsVisible","ServiceSelected","serviceIsVisible","SelectedServiceInfo","ReplayDisabled","LogIsEmpty","serviceName","selectedComponentInfoComponent","sendKeysTo","parameters","fiveParameters","loadTestActions","pastedData","setLogText","replayTest","testableActions","TestActionLogText","continueScriptExecution","tuple","functionParamTokens","functionParamStrings","paramIndex","paramString","displayLogs","LogText","na","clearLogs","clearLog","objectTypeIndexChanged","selectedTab","treeDivClick","onTreeNodeDrop","nodeSelect","handleNodeClicked","flatNode","nodeExpand","onServiceClassClicked","si","serviceAsTestableComponent","dismissDialogue","tempSelectedComponentInfo","componentTreeNode","findComponentTreeNodeIn","treeNode","formatString","applyDateFormatting","Name","elementClass","_elementClass","fabricIconBaseURL","SMALL","matIconText","fabricIconName","svgIcon","appIcon","appIconItemType","FABRIC_ICON","inner","innerHTML","fileIconProperties","notifyLoaded","PINTREEOPEN","INCLUDE_FORMS_IN_TREE","ERROR","FORM_TEMPLATE","FORM_TEMPLATE_CATALOG","DRAGGED_ITEMS","TEXT_FORMAT","EventNameEnum","FormInstance_Workflow_Transition","FormInstance_Added_To_Folder","FormInstance_Manually_Triggered","SwitchingToFormPreviewMode","FileName","UploadInfo","DownloadInfo","Version","IsLatest","FORM_INSTANCE_NO_DASH","MAGIC_FORM_INSTANCE","MAGIC_FOLDER","ROLE","BREADCRUMB","KendoGridOperatorName","Equals","Contains","DETERMINATE_MODE","INDETERMINATE_MODE","QUERY_MODE","THEME_PALETTE_ACCENT","XmlFileFormatEnum","VERBOSE_FORMAT","SIMPLIFIED_MINIMALIST_FORMAT","Draggable","dragImage","_dragImage","dragImageElement","Image","src","dragEnabled","_dragEnabled","applyDragHandleClass","ng2DragDropService","zone","dragEffect","dragScope","dragHandleClass","dragClass","dragTransitClass","onDragStart","onDrag","onDragEnd","unbindDragListeners","dragStart","allowDrag","DomHelper","setDragImage","runOutsideAngular","unbindDragListener","listen","dragEvent","drag","dragEnd","mousedown","mouseDownElement","dragHandle","matches","dragElement","getDragHandleElement","querySelector","DropEvent","Droppable","dropEnabled","_dropEnabled","subscribeService","unsubscribeService","onDragEnter","onDrop","dragOverClass","dragHintClass","dropScope","_isDragActive","_isServiceActive","dragEnter","dragOver","dragLeave","drop","allowed","observableOf","dragStartSubscription","unbindDragEnterListener","unbindDragOverListener","unbindDragLeaveListener","dragEndSubscription","Subject","selectorName","proto","Element","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","s","ownerDocument","querySelectorAll","call","getElementWithValidClassList","classList","ModelEventEnum","MODEL_WILL_SAVE","MODEL_SAVED","currentlyLoadedRowCount","totalRowCount","isBeingFiltered","contextMenuDataItem","dataSpy","indexOfClickedRow","clickedRow","CurrentlyLoadedRowCount","MEDIUM","STATUS_NEW","STATUS_RUNNING","IListItemBase","property","idParam","userCanDelete","setIcon","iconParam","update","obj","getUniqueId","findAndUpdateFrom","getOriginalVersionId","getParentId","Attachment","NumLevels","hshConfig","buildOptionValuesHierarchy","flatHeaderValuePairs","iValuePairStartingIndex","rootHeaderValuePairs","previousValueText","iNextIndex","bHaveNewValue","iValuePair","flatHeaderValuePairSet","flatHeaderValuePair","iNumMatches","iAncestor","newHeaderValuePair","Header","ancestorsForNextHeader","numberOfDropDownValuesGets","_dropDownValues","createDropDownValuesFromHeaders","createDropDownTextValuesFromHeaders","createDropDownFormInstanceElementsFromHeaders","currentLevel","currentHeaderValuePairs","myData","valueLevel","iValueIndex","valuePair","header","checkboxValueChangedParam","OperationCompletedServiceInfo","reFindElementsAfterActionPerformed","cssFilter","ComponentMethodMetadata","componentClass","argumentTypeNames","returnTypeName","userFriendlyName","parameterNames","parametersTypeInfo","mapOfComponentMethodsMetadata","enumMetadataByName","saveComponentMethodMetadataFor","None","unusedElementType","Scriptable","userFriendlyMethodName","decorator","propertyKey","targetType","Reflect","getMetadata","returnType","componentMethodMetadata","ElementTypeInfo","elementTabName","recordAction","mapElementsByTabNames","st","valueText","tslib__WEBPACK_IMPORTED_MODULE_1__","ACTIVE","DocumentPublishingSettings","fileExtensions","PDF","Word","Excel","XML","outputType","setName","nameParam","typeName","hasDescriptionField","getDescription","setDescription","getChangeWorkflowStateDialogTitle","setChangeWorkflowStateDialogTitle","getTransitionConfirmationDialogMessage","setTransitionConfirmationDialogMessage","getTakeUserToSiteHomePageAfterTransitionApplied","setTakeUserToSiteHomePageAfterTransitionApplied","getPropertiesDrawerTitle","EventSubscription","addFilter","parentFolderId","workflowId","workflowStateId","workflowTransitionId","eventName","isMagicStructure","ExportSiteStepEnum","ExportingRoles","ExportingWorkflows","ExportingForms","ExportingFoldersAndFormInstances","ExportComplete","MetricsBase","exportStep","ImportDataServiceNames","ImportSiteStructureService","ImportSiteFormInstancesService","ImportFormInstanceGridsService","ImportValuesToExistingFormInstancesService","GenericImportDataFromExcelSpreadsheet","getObjectId","objectId","ImportDataFromExcelDialogAction","ImportSiteStructure","ImportFormInstanceGrids","ImportSiteFormInstances","ImportValuesToExistingFormInstances","getProgressLog","progressLog","warningLog","errorLog","jobSummaryMessage","iProp","capPropertyName","capitalizeFirstLetter","str","FormFieldUtil","getFieldName","MultipleFieldsMetadataFieldInfo","multipleFieldsMetadataField","fieldAlreadExisted","CurrentRuleCondition","sourceFieldChildField","childField","formTemplate","sourceFieldId","sourceFieldChildFieldName","sourceFieldChildFieldId","sourceFormField","comparisonOperatorId","createConditionFromRule","metadataFauxFormFields","rule","availableOperators","condition","CurrentConditionalLogicRuleInfo","findFormFieldById","symbol","operatorSymbol","comparisonValue","operandValue","myClone","comparisonOperator","CurrentRuleAction","targetFieldIds","targetFieldAction","FieldConditionalLogicActionNameEnum","NoAction","targetFieldDefaultAttributes","FieldConditionalLogicTargetFieldDefaultAttrs","targetFormFields","fetchingChildFormFields","availableChildFormFields","childFormFieldId","conditions","existingRule","existingRuleActionIndex","requiresOperandValue","conditionClone","setNoDefaultAttributesToNull","createMultipleFieldsMetadataFieldIfApplicable","multipleFieldsMetadataFieldInfo","targetField","MultipleFieldsMetadataFieldType","multipleFieldIds","expandMultipleFieldsMetadataFieldIfApplicable","formFieldIdTextValues","formFieldIds","createFromSingleActionRule","singleActionRule","singleAction","ruleAction","actionName","targetFormFieldDefaultAttributes","findFormFieldsById","targetFormField","loadAdditionalTargetFieldAttributes","editExistingRule","findFormFieldByName","targetFieldName","sourceFieldName","editExistingRuleAction","existingRuleAction","loneTargetField","FormTemplateInstancesFieldType","currentRuleAction","copyToExistingRuleAndNewRulesAsNeeded","formFieldExpression","numExistingConditionalLogicRules","newRules","conditionIndex","currentExpression","FormFieldExpression","copyConditionInfo","formFieldAction","FormFieldAction","resetToDefaults","packageRuleAndResetToDefaults","packagedFieldExprs","RuleConditionsValid","fieldExpr","copyBasicRuleInfo","ruleCondition","fieldAction","operatorInfo","op","processConditions","currentRuleActions","RuleActionsValid","expressionOrder","processActions","copyToExistingRuleAndResetToDefaults","modelActionValueToDisplayValues","fieldId","fieldIds","filterFormFieldsExceptField","displayFieldActionToModelValue","actionOrder","displayFieldAction","modelActionValue","AllCurrentRuleActions","ruleActions","setRuleActions","sortByTargetFieldAndActionPrecedence","getRuleActions","removeAllRuleActions","addRuleAction","getExistingRuleIndex","ruleIndex","replaceRuleAction","indexOfRuleToReplace","removeRuleAction","numActions","ra","doSortByTargetFieldAndActionPrecedence","convertToFormFieldExpressions","existingRulesCopy","conditionalLogicRules","convertedRules","firstCondition","conditionOperator","existingRuleCopy","r","applyTargetFieldDefaultAttributesToActions","additionalFormFieldExpressions","exprIndex","convertedRule","addAnyUsedMetadataFieldsNotYetInForm","numMetadataFields","expr","metadataFauxFormField","doSortByTargetFieldAscending","ruleAction1","ruleAction2","targetFormField1","targetFormField2","targetField1Name","targetField2Name","localeCompare","iCompare","compareFieldActions","metadataFieldDefs","allFieldsSorted","fauxMetadataFields","metadataFieldsAsFauxFormFields","fauxMetadataField","doSortFieldsByNameAscending","sortedFieldDefs","doSortFieldDefsByNameAscending","fauxFormFieldId","metadataField","fauxFormField","metadataFauxFormFieldNames","formField1","formField2","fieldName1","fieldName2","fieldDef1","fieldDef2","FormFieldActionNameEnum","FieldConditionalLogicActionPrecendencEnum","FormFieldComparisonOperatorNameEnum","FormFieldActionGuidanceEnum","Show","Hide","Require","DoNotRequire","CanEdit","ApplyFilter","Show_CanEdit","Show_CanEdit_Require","IsGreaterThan","IsGreaterThanOrEqualTo","DoesNotEqual","IsLessThan","IsLessThanOrEqualTo","InListOfValues","NotInListOfValues","StartsWith","EndsWith","IsEmpty","IsNotEmpty","ApplyAction","RemoveAction","copyPropertiesFromTo","objectToCopy","actionToCopy","fromAction","toAction","staticDataInitialized","getRuleSummaryText","ruleText","strOperandValue","bUseQuotationMarks","displayValueWithQuotationMarks","strTrimmedOperandValue","iActionCount","getRuleConditionText","addActionCount","numberOfActions","exprToCopy","fromExpr","toExpr","iAction","actionClone","getValueTypeOperatorKeyString","valueTriggersExpression","triggersExprs","fieldLogic","propertyValue","compare","addRulesForSourceFormField","sourceFormFieldName","arrExistingRules","arrNewlyDefinedRules","arrResults","iNewRule","newRule","getRulesForSourceFormField","fieldIdsToSelectedValues","requestIsForInitialLoadOfGridFormField","FormFieldConstraintBase","constraintValue","configForConstraintExpressionSummary","constraintExpressionSummary","summary","validate","objectToCopyParam","minDateValue","maxDateValue","json","object","DateUtil","DateToUTCDate","deriveExpressionSummary","AsMMDDYYYY","constraintExprSummary","dataCollectionIdParam","constraintIdParam","constraintTypeParam","constraintNameParam","FormFieldConstraintViewModel","SelectOptionsValue","FieldDefinitionAllowDropFlags","FieldDefinition","formInstElemPropName","CANCEL_ALL","FORM_TEMPLATE_INSTANCE_ACTION_BUTTONS_CONFIG","CASCADING_DROPDOWN_CONSTRAINT_NAME","DISPLAY_ROWS","FORM_TEMPLATE_PROPERTIES","GRID_COLUMN_BEHAVIOR","GRID_COLUMN_ROLES","GRID_COLUMN_VIEW_ROLES","DISABLE_GRID_GROUPING","IMAGE_MANAGEMENT_BUTTONS","NO_DEFAULT_PROPERTIES","SELECTED_DATE_RANGE_CONSTRAINT","DATE_RANGE_CONSTRAINT_NAME","GRID_COLUMN_NAME","SELECTED_NUMERIC_RANGE_CONSTRAINT","NUMERIC_RANGE_CONSTRAINT_NAME","OPEN_FORM_INSTANCES_IN_NEW_TAB","REGEX_CONSTRAINT_NAME","REGEX_CONSTRAINT_MSG","SELECT_OPTIONS_CONSTRAINT_NAME","ENABLE_SIMPLE_FORM_GRID_DISPLAY","LabelFieldType","CascadingDropDownVirtualFieldType","AttachmentFieldType","InstructionsFieldType","RawHTMLFieldType","InlineContentFieldType","DevOnlyFieldType","FootnoteFieldType","MultiCheckboxFieldType","MultiDropDownFieldType","HideFromFieldType","MarkDataReadOnlyFieldType","AddRowAboveFieldType","AddRowBelowFieldType","ContactsFieldType","CommentsFieldType","FormulaFieldType","UrlBuilderFieldType","UserRolesFieldType","WorkflowStateFieldType","FolderNameFieldType","FolderPathFieldType","FormInstanceNameFieldType","IdFieldType","FavoriteFieldType","FormFieldTypePrettyNamesEnum","FieldControlTypeHint","FormTemplateInstancesFieldDefinition","DATE_INPUT","MULTI_SELECT_INPUT","NUMERIC_INPUT","SELECT_INPUT","TEXT_INPUT","ShareMember","memberCopy","memberType","memberToCopy","Share","shareMembers","iMember","memberClone","shareToCopy","JavaScriptUtil","deepCopy","objectJson","SecondaryGridCascadingFieldTransientData","setSelectOptions","displayKendoGridRows","TransientVirtualFormFields","setTransientVirtualFormFields","setTransientVirtualFormField","removeAnyCircularDependencies","noopConstraintUpdated","formFieldConstraintLiaison","constraintUpdatedCallback","resetConstraintUpdatedCallback","defaultAcceptsConstraintUpdateFrom","acceptsConstraintUpdateFromCallback","resetAcceptsConstraintUpdateFromCallback","numFormFieldsCreatedOnClient","transientIsDeleted","gridKeyColumns","cannotBeSplitOnForm","gridColumnCanBeEditedByRoles","gridColumnCanBeViewedByRoles","gridFormLayout","selectedFormTemplateIds","openFormInstancesInNewTab","formTemplateInstanceActionButtonsConfig","enableSimpleFormGridDisplay","hideStructureComponent","hideLeftSideMenu","fieldDefMetadata","transientSelectedGridRow","formFieldNumberOnClient","HasFootnote","fieldGroup","blankValue","helpText","helpTextFormat","customValidationCriteria","isHidden","isConditionalEndElement","excelImportExportTemplateBase64Encoded","excelImportExportTemplateStartingRowIndex","excelImportExportTemplateStartingColumnIndex","base64FileReadResult","iframeSource","iconName","matchingBeginOrEndFieldName","createdBy","disableGridGrouping","share","shareCopy","childFFCopy","ffToCopy","formFieldToCopy","ffDeepCopy","objectCopy","cloneObj","iTimeSince_Jan01_1970","toISOString","sortFormFieldsAlphabetically","compareFormFieldsAlphabetically","formField1Name","formField2Name","isOriginalVersion","originalFormInstanceElementId","version","originalFormInstanceId","TypeGridRows","_bypassSitePopUpWarning","isGridData","transientUserSetValueFlag","CustomValue","bUpdatedParam","propName","loadFromDeserializedNetworkData","copyFieldValuesFrom","childClone","getValueAsStringArray","tslib__WEBPACK_IMPORTED_MODULE_2__","FormSettings","hideSaveButton","confirmSavePopup","enableBulkWorkflow","settingsClone","saveButtonCaption","settingsToCopy","LayoutCellInfo","cellIndex","layoutCell","cell","FormLayout","columnsDefault","columnWidths","MaxRowCellCountWithContent","iDefaultCellWidth","iMaxColSpanCountCount","iRow","iRowColSpanCount","iRowMaxColSpanCount","iCell","cells","iCellWidth","iCellColSpan","CellOccupiedByFullRowWidthField","transientColSpan","MaxCellColSpanWithContent","iMaxColSpan","hasContent","iColSpan","getColSpan","getPositionOfRow","moveRow","addBlankRow","insertIndex","newRow","createBlankRow","isLastRow","addRowAbove","findRowIndex","addRowBelow","deleteRow","hasBlankRows","deleteBlankRows","replacementRows","applyChanges","lastRow","priorDefaultCellCount","currentCells","iPriorDefaultCellWidth","addCellToEachRow","iNumCellsToRemove","removeCellsFromEachRow","gridCssClass","addColumn","newPos","LayoutCell","getCssClass","removeCellFromEachRow","iPriorMaxCellCount","iMaxCellCount","iNewMaxCellCount","iPriorDefaultColWidth","iRowCount","iRowTotalColSpan","newRowCells","iNewRowCellsWithContentCount","poppedCell","iNumCellsToPop","blankCell","removeColumns","poppedCells","j","columnWidth","exceptionCell","selectedCells","selectedCell","selectedCellInfo","cellInfo","numCellsSelected","getCellRowFor","resultLayoutRow","layoutRow","findCellContaining","foundCell","findCellInfoContaining","foundCellInfo","findCellInfoContainingFieldId","fieldNameUpdated","originalFieldName","updatedFieldName","layoutClone","alignment","iIndex","iColWidth","rowCopy","layoutToCopy","selectFirstCell","cellSelected","selectNextCell","cellPosition","getPositionOfCell","rowPosition","selectLastCell","rowNum","getCellOffset","cellOffset","selectedRow","findFirstCellWithContent","firstCellWithContent","LayoutRow","rowToFind","TypeName","CurrentUserCanBuildForms","currentUserCanBuildForms","notifyEventHandler","eventHandler","eventCompleted","formToCopy","enableCellSelection","alwaysShowCellSelection","formFieldsDeleted","currentUserCanEditHTML","siteWorkflows","workflowName","isDefaultForFolder","formLayout","layoutCopy","formSettings","fs","iFF","formFieldCopy","iExpr","exprCopy","attribut","getFormFieldsByIdHash","hshFormFieldsByClientId","iField","findFormField","doFindFormField","settingsCopy","findDupFieldNames","formFieldsWithDupNames","mapOfNameValues","setOfDupFieldNames","existingFieldName","formFieldNameIsNotUnique","formFieldToTest","bIsNotUnique","otherFormFields","otherFormField","nameToTest","clearTransientProperties","clearShowToHideFromTransientProperties","restoreTransientProperties","restoreShowToHideFromTransientProperties","conditionalFieldNestingLevel","matchingFieldName","transientCellOccupiedByFullRowWidthField","hasFormInstanceAutoNumberConfig","suggestAutonumberFormNames","suggestedFormNamePrefix","proposeAutoNumberName","numTemplateInstancesInCurrentFolder","folderName","prefixFormNameWithFolderName","GridFlavorBase","gridCommandButtons","rowIsDisabled","RegularGridFlavor","addAdditionalButtons","addAnyVirtualColumns","addVirtualColumnDef","transientIsHidden","strWidth","clearContent","iDefaultColWidth","bSaveColspan","ColSpan","newCell","cellToCopy","bHasContent","cellClone","rowToCopy","cellCopy","lineHeaderValuePairs","existingColDefsParam","iNextColumnDefId","hshFormFieldMNametoFormField","cachedGridColumnDefs","conditionalLogicColumnDefs","strId","iClientId","assignUniqueClientId","setNextColumnDefId","Flavor","ColumnDefsWithVirtualFormFields","getRuntimeColumnDefsWithConfiguredVirtualFormFields","configureAnyVirtualFormFields","hasVirtualFields","hasVirtualSiblingFormFieldsFor","resultFormFields","virtualFormFields","getVirtualSiblingFormFieldsFor","virtualIndex","IsFootnote","isFootnoteParam","getColumnDefAtIndex","strColName","getColumnDefByClientId","searchColDefs","iColDef","iNewColumnId","newColumnDef","setFieldOrderOnNewColumnDef","getDefaultMaxLengthWhenInGrid","fieldOrders","maxFieldOrder","iColumnClientId","iNumExistingColumns","AdditionalCellDivStyleFor","bNextColumnDefIdValidated","strExistingColNameCheck","iColIndexParam","iTestClientId","bClientIdFound","virtualSiblingFormFields","virtualFFIndex","siblingVirtualFormField","corresspondingColDef","NumericFormInstanceElementWrapper","NumericColumnTotalInfo","numericComponent","columnCellData","columnCellTotal","SortGridRowsByFormField","sortField","sortAscending","compareGridRows","gridRow1","gridRow2","cellValue1","cellValue2","compareAscendingFor","compareDescendingFor","SortGridRowsByRowId","compareResult","RowIndex","gridConfigParam","getDisplayValueParam","igetDisplayValue","arrGridRows","arrDeletedGridRows","gridRowsSubject","iNextId","hshTotalInfoByColClientId","arrKendoGridRows","collectionViewer","asObservable","disconnect","GridRows","gridRows","getGridRow","iRowIndex","GridRowCount","getRowByClientId","iRowClientId","searchRows","gr","getRowByDatabaseId","iDatabaseId","bNotifySubject","bInitializeCellData","footnoteNumber","blankRow","KENDO_DATA_GRID_ROW_KEY","addingRow","IdToDelete","iNumExistingRows","arrDeletedRows","deletingRow","iDeletedRowIndex","iSubsequentRowIndex","subsequentRow","bRemoved","allComponents","pasteRowCount","startingCol","pasteCells","gridRowVMs","doLoadGridDataFromViewModelElements","nextRow","rowFIEWrappers","rowFormFields","rowFormInstanceElements","iFIEWrapper","strCellName","formInstanceElem","formContentElement","contentElementChild","childElement","formFieldValuesUpdated","createGridRowFromGridViewModelObect","totalGridRows","isPendingEditFor_GridRowId","GridRowsAsJson","saveGridDataToViewModelElements","arrColDefs","arrAllRowsData","iDeletedRow","deletedRow","hshRowCellData","loadRowCellDataHash","sortRowsByColumn","gridRowSorter","sortRowsByRowId","numericComponentPairs","compColDef","iColClientId","compTotalInfo","dblColumnTotal","fieWrapper","cellDataWrapper","gridRowDef","previousNumericValue","getColumnTotal","totalInfo","newValue","cellWrapper","changeAmount","astrClientIds","iKeyIndex","strClientId","gridCellWrapper","totalCellWrapper","gridRowParam","arrCellBeingDeleted","ccd","arrFormInstanceElementWrappers","cellData","hshCellData","GridFormInstanceElementWrapper","fieldDisplayName","allowHtml","iClientIdParam","iRowIndexParam","iDatabaseIdParam","isPendingEditFor_DatabaseId","isInvalid","activeFormInstanceElementWrappers","bHasCalculatedField","aiCalculatedColumnIndexes","iColumnDef","iCalcColIndex","gridFlavor","hshNumericValues","fieValueName","getValuesByFieldName","RowSelectedStyle","rowSelectedStyle","RowUnselectedStyle","rowUnselectedStyle","IsPendingEditFor_DatabaseId","IsExpanded","IsInvalid","clientIdParam","databaseIdParam","isSelectedParam","isInvalidParam","getFormFieldByColumnName","gridColumnDef","getFormInstanceElementWrapperByCellName","cellName","getTotalColumnCount","ComponentAndFormField","componentParam","maxRowsOfTextToDisplayOnUnselectedGridRows","allComponentFormFieldPairs","allocateAllComponentsList","addToAllComponentsList","pair","MaxRowsOfTextToDisplayOnUnselectedGridRows","componentResult","formFieldResult","numericFFComponents","resultPairs","iPair","NotificationTemplate","getFirstPartOfNotificationText","notificationText","getAllTextParts","PermissionsPreviewAllVirtualFoldersHierarchyRequest","PermissionsPreviewBase","allRoleNames","distinctFolderIdList","hierarchyRecords","iRecord","recordAsObject","record","VirtualFolderPermissionsHierarchyRecord","tslib__WEBPACK_IMPORTED_MODULE_3__","PermissionsPreviewVirtualFolderHierarchyRequest","virtualFolderId","selectedRoleName","workflowHierarchy","iWorkflow","workflowAsObject","workflow","Workflow","PermissionPreviewNode","transientIsShown","transientHierarchyRecords","transientPermissionNameClicked","canBuild","permissionCellName","canPerform","workflowHierarchyShown","workflowHierarchyRecords","PermissionsPreview","selectedRoleNames","permissionNodes","iNode","nodeAsObject","permissionNode","buildPermissionCellNames","performPermissionCellNames","phoneExt","RoleGroupMember","USER","GROUP","isSiteLevel","memberCount","members","m","countOfAllRoleGroupMembers","countOfSiteLevelMembers","siteLevelRoleMembers","SiteLevelRoleMember","CrossSiteUserNotificationsData","siteToCopy","SETUP_TO_ACTIVE","ACTIVE_TO_SETUP","ACTIVE_TO_CLOSED","CLOSED_TO_ACTIVE","activatedDate","closedDate","archivedDate","startDate","endDate","myRole","statuses","selectedWorkflowTransition","maxPointOfContact","maxPointOfContactDspl","maxPointOfContactEmail","useSimplifiedPermissionsModel","frequency","totalDataCollectionsCount","createdFromTemplate","forms","siteHomePage","roles","workflows","rootFolder","iFolderIndex","folder","canCreateFolder","canCreateForm","isValidWorkflowTransition","transitionName","formInstances","arrFormInstances","formInstancesParam","sourceObject","childFolders","ancestorFolders","canView","canEdit","canDelete","canGrant","canTransition","canBuildFolders","canBuildFormInstances","isTransparentFolder","canDeleteFolder","canDeleteForm","canGrantPermission","canManageRoleMembers","favoriteTitle","roleMembersAreInherited","roleGroupName","magicStructureDefinitionId","magicFolderId","workflowStateTransitions","folderOrder","createdByUserName","getIsTransparentFolder","getWorkflowId","HideExportToExcel","hideExportToExcel","HideExportToExcelIsInherited","HideUpload","hideUpload","HideUploadIsInherited","HideDownload","hideDownload","HideDownloadIsInherited","HidePrintForm","hidePrintForm","HidePrintFormIsInherited","explicitType","formButtonsDisabled","transientFormInstanceIsSaving","formInstanceOrder","canEditMetadata","accessLostAfterTransition","isReference","referencedFormInstance","referencedFormInstanceId","magicFormInstanceId","siteWorkflow","iFIE","fieData","iTransition","transitionData","WorkflowTransition","showSendNotificationsButton","currentWorkflowStateOrder","currentWorkflowStateIsStartState","rowVersion","isReferencedCount","contentModifiedByUserName","contentModifiedBy","contentModifiedDate","replaceFormInstanceElementValue","valuesByFieldId","tslib__WEBPACK_IMPORTED_MODULE_9__","needToMoveObjectsToDifferentWorkflowState","stateToMoveObjectsFromState","stateToMoveObjectsToState","NumFormInstancesMoved","NumFoldersMoved","hasGeneratedName","CurrentUserCanBuildWorkflows","currentUserCanBuildWorkflows","isSystemWorkflow","isDefaultFormWorkflow","isDefaultFolderWorkflow","isFormWorkflow","isFolderWorkflow","states","iState","stateClone","transitions","transitionClone","getRoleNames","mapOfRoleNames","permissions","iPermission","permission","roleName","iTrans","roleNames","WorkflowState","tslib__WEBPACK_IMPORTED_MODULE_6__","roleGroupMember","role","memberId","roleId","StructureFieldConfig","disableForSpecifiedRoles","fieldConfigRoleChangeHandler","setFieldConfigRoleChangedHandler","DisableForSpecifiedRoles","RoleNames","roleNamesChangedFor","ConfigInconsistencyError","ConfigureStructureFields","FormName_FieldName","ModifiedOn_FieldName","ModifiedBy_FieldName","FormTemplateName_FieldName","Status_FieldName","structureFieldNamesToMyFieldNamesMap","fieldNames","fieldConfigs","Status","FieldConfigs","getRoleNamesForField","fieldConfig","hasAtLeastOneHiddenField","defaultColumnNames","filteredColumnNames","disabledFieldDefs","disabledFieldDef","rn","disabledStructureFieldName","fcn","createEmptyConfig","parseFromJson","configObject","fieldConfigObject","toJsonString","currentUserCanSeeStructure","currentUserCanSeeSimplePermissions","treeIsBuildable","currentUserCanEditSiteHomePageHtml","currentUserCanEditFormTemplateHtml","currentUserCanBuildConstraints","currentUserCanPublish","userGrantedAllClaims","WorkflowPermissionBase","roleIsSiteAdmin","canBuildForms","canBuildWorkflows","canBuildRoles","canDoAll","suggestCanEdit","suggestCanView","suggestCanGrant","suggestCanDelete","suggestCanBuildForms","suggestCanBuildWorkflows","suggestCanBuildFolders","suggestCanBuildFormInstances","suggestCanBuildRoles","transientIsExpanded","transientParentPropertiesSet","copyFieldsFrom","sourcePermissionBase","hasPermissions","notImplemented","WorkflowStatePermission","stateId","stateName","wsPermission","getPropertiesTitle","getPermissionNames","getSimplePermissionNames","getAdvancedPermissionNames","getPermissions","Permissions","PermissionCount","addPermission","permissionParam","ensurePermissions","updatePermission","bHavePermission","removePermission","iNumPermissions","replacePermissionsForRole","workflowStatePermissions","workflowStatePermission","notify","isStartState","isEndState","stateOrder","iPerm","clientIdsEqual","secondWorkflowState","WorkflowTransitionPermission","transitionId","isCurrentState","transientStartStateClientId","transientEndStateClientId","changeWorkflowStateDialogTitle","transitionConfirmationDialogMessage","takeUserToSiteHomePageAfterTransitionApplied","getPermissionFlagNames","workflowTransitionPermissions","workflowTransitionPermission","startStateId","endStateId","startStateSortOrder","endStateSortOrder","startStateName","endStateName","SafePipe","sanitizer","bypassSecurityTrustHtml","bypassSecurityTrustStyle","bypassSecurityTrustScript","bypassSecurityTrustUrl","EJ8","pure","titleService","isFormInstance","ignoredResponse","loadFormInstanceContent","getIdAndVersion","segments","lastSeg","isVersion","getIdFromUrl","siteResponseManagementService","workflowService","VERSION","changeSet","buildNumber","buildJob","buildAgent","buildTime","AppBuildInfo","buildInfoUrl","appBuildInfo","abi","apiBuildInfo","webBuildInfo","formatResponse","updateJob","put","timeoutDuration","callbackArrowFunction","exportDataTimeout","updatedAsyncJob","attachInfoWithUrls","FileUploadSubject","fileNameParam","attachmentsInDesiredOrder","optionalCallerData","formData","FormData","append","httpHeaders","HttpHeaders","HttpRequest","reportProgress","HttpEventType","UploadProgress","percentDone","loaded","fileUploadProgress","Sent","ResponseHeader","DownloadProgress","consoleMsg","attachmentEntry","arrAttachmentInfo","arrAttachmentEntry","ai","upload","appliesToAllVersions","attachmentName","customProps","updateDescription","newAttachmentName","_angular_core__WEBPACK_IMPORTED_MODULE_8__","AutocompleteService","query","flexSelectRequest","startsWithResults","containsResults","lastResultOfSearch","EMPTY","KVO","_angular_common_http__WEBPACK_IMPORTED_MODULE_5__","Qq","LOCAL_SCOPE","storageScope","sessionStorage","removeItem","buildClaims","TCreator","operationCompletedCallbacks","logDebugMessages","queryOptions","toQueryString","lStartTime","performance","now","lResponseReceivedTime","reportResponseTime","lResponseFormattedTime","reportFormatTime","getAllResponseReady","progressConfig","default","msgDuring","progressMsg","updateProgress","msgOnComplete","updateIsFavorite","hideProgressIndicator","cb","verb","ending","lEndTime","lElapsedTimeInMilliseconds","notifyAnyCallbacksOperationCompleted","gridComponents","skipNavLinkSubject","saveAnyUnsavedGridData","promises","ComponentTreeNode","_parent","_level","childNodes","addChild","childNode","level","leaf","expanded","selectable","draggable","droppable","FlatComponentTreeNode","isExpandable","ComponentHierarchyNode","childComponentNodes","LogData","logToConsole","clearErrorLog","rootComponentNode","currentParentComponentNode","cachedTreeNodes","hierarchyChangedHandlers","uiTestCenterDialog","logData","UITestingUnderway","registerAsCurrentParent","componentNode","parentTagName","logComponentRegistration","logComponentParentRegistration","printHierarchy","logInfo","removedNode","removeComponentNodeFor","notifyComponentRemoved","mapHierarchyNodeToTreeNode","HierarchyAsFlatTreeNodes","mapHiherarchyNodeToFlatTreeNode","Log","arrayToString","ErrorLog","ErrorLogText","rootTreeNode","rootNode","foundComponent","hierarchyChangedHandler","numHandlers","logError","getTagNameFor","printHierarchyNode","hierarchyLevel","parentComponentNode","currentComponentNode","removedComponentNode","n","parentTreeNode","hierarchyNode","childHierarchyNode","childTreeNode","copySite","siteCopyName","copyAndTransformSite","exportAndTransformSite","exportSite","exportStructureOnly","formatAsyncJobResponse","getDownloadExportedSiteUrl","siteDataZipFile","getDownloadExportedFormInstanceDataUrl","CurrentFolderService","nullifyCurrentFolder","isCurrentFolder","CurrentSiteService","updateRole","deleteRole","addRole","otherRoles","searchCount","updateBannerText","bannerText","getWithPagination","maxToReturn","sortObj","sc","searchcount","siteVMs","getAllForAdmin","transitionWorkflow","enableDisableBetaFeatures","enableBetaFeatures","firstStatus","secondStatus","getFormsBySite","formatFormResponse","formInstanceCount","childCountTitle","getFormsForFolder","getFormForFolder","getWorkflowsBySite","wf","formatWorkflowResponse","CountAccessibleSites","getFavorites","getRecentlyAccessed","maxObjectsToReturn","setPermissionsModelFlag","enableStructureForEndUser","dialogParam","deleteOnConfirmMultipleItems","DocumentPublishingService","getDocumentPublishingSettingsForSite","forPicker","getDocumentPublishingSettings","publish","entityType","entityId","exportId","publishMultiple","entityIds","getPublishedDocUrl","settingsId","saveDocumentPublishingSettings","exportSettings","deleteDocumentPublishingSettings","addFormsToEmailQueue","documentTypeId","mappedItems","getItems","getAsString","EmailService","formInstanceLink","mailtoProp","newLine","composeAllEmail","emailsString","CC","getFormInstanceSubscriptions","sub","getFolderSubscriptions","subscriptions","subscriptionIds","unsubscribeFromFormInstance","ExcelSiteFormDataExportRequest","selectedFormNames","ExcelFolderFormDataExportRequest","exportSiteFormDataForSelectedForms","exportRequest","exportSiteFormData","exportFolderFormDataForSelectedForms","exportFolderFormData","expectedDownloadFileName","genericImportDataFromExcelSpreadsheet","importInstructions","singleExcelFileAsArray","packageDataFile","uploadExcelFile","importFile","notificationEmail","shiftClick","arrayOfOneDataFile","dataFile","ExcelImportExportTemplate","getGridExcelTemplateBase64Representation","templateFile","getGridExcelTemplateBase64RepresentationResult","exportFormInstances","xmlFileFormat","exportFormInstance","genericExportDataAsExcelSpreadsheet","exportInstructions","exportFormDefinition","packageDataFiles","dataFiles","iFile","TargetFieldConditionalLogicInstructions","SourceFieldChangeConditionalLogicInstructions","FormInstanceLoadedConditionalLogicInstructions","SiteHomePageLoadedConditionalLogicInstructions","FormFieldActionValue","actionDisplayName","actionValue","TargetFieldDefaultAttributeValue","attributeDisplayName","attributeValue","FieldConditionalLogicService","formFieldActionInstructions","oppositeActionName","applyActionStyles","applyActionStylesToRemove","reverseActionStyles","appliesFormFieldAttribute","formFieldAttributeName","formFieldAttributeValue","allFieldOperators","appliesToNumericFields","appliesToTextFields","appliesToDateFields","availableFormFieldActions","availableFormFieldActionValues","removeCommasAndSpacesFrom","targetFieldActionsInOrderOfPrecedence","targetFieldDefaultAttributeValues","mapOfTargetFieldActionPrecedences","AllFieldOperators","AllTextFieldOperators","AllNumericFieldOperators","getFormInstanceLoadedTargetFieldInstructions","formInstanceLoadedInstructions","getSiteHomePageLoadedTargetFieldInstructions","sourceFieldChangeInstructions","getFormFieldActionInstructions","getAvailableTargetFieldDefaultAttributes","getAvailableTargetFieldDefaultAttributeValues","getAvailableFormFieldActions","getAvailableFormFieldActionValues","getAvailableFieldOperators","getFieldOperatorFromSymbol","getFieldOperatorFromId","operatorId","action1","action2","action1Precedence","action2Precedence","getFormConditionalLogicExpr","DefaultFieldDefinitionClientLogic","performSpecialFormAction","dropCell","definition","objectDroppedFlags","pushFormPreRenderFilterFor","popFormPreRenderFilter","checkAllowsNestedDrop","alowsDropFlags","fieldDraggedToTrash","isNonFlexFieldButCanParticipateInFlexFieldBehavior","hasCustomFormLayoutStylesFor","customFormLayoutStylesFor","hasCustomFormFieldLayoutStylesFor","customFormFieldLayoutStylesFor","getAvailableOperatorsFor","getSelectableValuesFor","leftOperand","rightOperand","pasteDataForInto","validateData","dataValue","value1","value2","compareValuesAscending","compareValuesDescending","allowsHtmlInDisplayValue","getPropertiesRequiredByGrid","hasDollarSignPrefix","otherFormInstanceElements","formInstanceElementToUpdate","needsTestingBeforeFirstUse_fieldDefinitionClassNameToFieldTypeName","fieldDefNameParts","lastNamePart","suffixLocation","includeInFormTemplateInstancesGrid","getDefaultKendoGridOperatorName","unpackTemplateInstancesRow","colValue","fieldCanBeUsedInSiteHomePageConditionalLogic","createSiteHomePageFormInstanceElementFor","isATypeOfGridField","AddRowAboveFieldDefinitionCustomLogic","AddRowBelowFieldDefinitionCustomLogic","CascadingDropdownFieldDefLogic","cascadingDropdownConfig","CascadingDropdownVirtualFieldDefLogic","BinaryComparisonTypesFieldDefinitionLogicBase","myFieldOperators","operatorSymbolsToMethodNames","leftFormattedOperand","formatValueForCompare","rightFormattedOperand","comparisonMethodName","equals","doesNotEqual","inListOfValues","inResult","listOfValues","notInListOfValues","CheckboxFieldDefLogic","selectOptionValues","disableClass","NumericComparisonTypesFieldDefinitionLogicBase","isGreaterThanOrEqualTo","isLessThan","isLessThanOrEqualTo","between","betweenResult","valueToCompare","NumericFieldDefinitionLogicBase","formattedValue1","formattedValue2","DecimalFieldDefLogic","floatValue","valueAsString","CurrencyFieldDefLogic","valueWithoutDollarSignAndCommas","DateFieldDefLogic","intValue1","DateToSecondsSinceJan1_1970","intValue2","TextFieldDefinitionLogicBase","staticCompareAscendingFor","staticCompareAscending","DropdownFieldDefLogic","GridCascadingDropdownFieldDefLogic","PreRenderFilterBase","allowFormInstanceElement","presentlyUnusedForm","presentlyUnusedFormField","presentlyUnusedFormInstanceElement","markFieldAsReadOnly","HideFromPreRenderFilter","unusedForm","unusedFormField","unusedFormInstanceElement","allow","configuredRoleNames","userRoleName","ShowToHideFromCustomLogicBase","allowsDropFlags","dropErrorMessage","matchingFormField","matchingFieldCell","popFilter","filterFormField","HideFromFieldDefinitionCustomLogic","IntegerFieldDefLogic","MultiDropdownFieldDefLogic","childIndex","MultiCheckboxFieldDefLogic","textValue1","buildCompareValueFor","textValue2","transientParsedSelectOptions","ParagraphFieldDefLogic","RadioButtonsFieldDefLogic","RichTextFieldDefLogic","ShortTextFieldDefLogic","ShowToPreRenderFilter","ShowToFieldDefinitionCustomLogic","EditorNameFieldDefLogic","LastEditedDateFieldDefLogic","MetadataFieldDefinitionLogicBase","FavoriteFieldDefLogic","FlexibleSelectionFieldDefLogic","fieldValue","childValue","TextMetadataFieldDefLogic","FolderNameFieldDefinitionLogic","FolderPathFieldDefinitionLogic","FormInstanceNameFieldDefinitionLogic","FormulaFieldDefLogic","fieldDefinitionServce","formatter","displayValueAsNumber","buildFieldNameHashes","otherFormInstanceElement","displayVariableName","GridFieldDefLogic","HtmlLinkFieldDefLogic","IdMetadataFieldDefLogic","MarkDataAsReadOnlyPreRenderFilter","markReadOnly","MarkDataAsReadOnlyFieldDefinitionCustomLogic","FormTemplateInstancesFieldDefLogic","UrlBuilderFieldDefLogic","transientUrlBuilderUrlTemplate","UserRolesFieldDefinitionLogic","WorkflowStateFieldDefinitionLogic","staticCachedFieldDefs","staticMapOfCachedFieldDefs","staticMapOfFieldDefinitionNamesToDisplayNames","staticMapOfCustomLogicHandlers","loadCustomLogicHandlers","fieldDefinitionsLoaded","cachedFieldDefs","mapOfCachedFieldDefs","mapOfFieldDefinitionNamesToDisplayNames","mapOfCustomLogicHandlers","responseFieldDefs","cacheFieldDefinitions","allFieldDefs","fd","iFieldDef","getFieldTypeDisplayName","fieldDefinitionName","throwExceptionOnError","throwExceptionOnFailure","responseFieldDef","SelectionFieldValueChangeInstructions","fieldSelectableValues","FlexibleSelectionFieldService","autoSelectFieldValuesSubject","autoSelectFieldValues","selectedValuesByFieldId","requestFlexibleFieldInstructionsForFormInstance","instructions","updateTargetFields","formRenderer","hasDependentFields","updateSelectedValuesToFieldIds","payload","hasDependentGridFields","cachedGridFieldOptions","validateGridRow","validationResults","validationFailureMessage","formFieldsToRemove","findFieldsThatDependOnThisField","FormRenderer","fieldsThatDependOnThisField","formLevelDependentFields","gridLevelDependentFields","acc","gridColFieldDefs","flexFields","initializeSelectedValuesMappingForGridRow","newFieldValues","constraintValues","updateAutoSelectFieldValues","flexField","targetGridField","formFieldConstraintId","ffs","jobService","getForFolderResolver","getAvailableForms","resultForms","zombieObject","formObject","getWriteableFolderIds","showProgress","getRootFolderForSite","createRoleGroup","updateRoleGroup","deleteRoleGroup","reorderChildFolders","orderObj","idOfParentFolder","rename","reorderFormInstances","moveFolder","idOfMovedFolder","idOfNewParent","moveFolders","folderIds","copyFolders","moveFormInstances","formInstanceIds","moveFormInstance","copyFormInstances","createReferences","completed50Percent","fis","completed100Percent","transitionFolder","_angular_core__WEBPACK_IMPORTED_MODULE_10__","ImportFormatExamples","tempFormEventHandler","tempTransient_suggestedFormNamePrefix_formControl","saveFormEventHandlerIfAny","saveTransient_suggestedFormNamePrefix_formControlIfAny","restoreFormEventHandlerIfAny","restoreTransient_suggestedFormNamePrefix_formControlIfAny","newForm","deleteFromUI","copyAs","copyName","getImportFormatExample","responseData","transient_suggestedFormNamePrefix_formControl","Function","FieldTypeAndName","arrFieldTypesAndNames","canAddToNewGrids","hshFieldTypeToFieldInfo","mapFormFieldTypesToClasses","initFormFieldTypesToClassNames","loadFieldTypesAndNames","getAllFieldTypesAndNameFields","ft","getFormFieldClassNamesFrom","iCompRep","iFieldType","fieldInfo","_angular_core__WEBPACK_IMPORTED_MODULE_39__","FlushCachedServiceUponFormSave","cachedService","modelObject","setUnsavedConstraintIdValuesToZero","clearCache","FormFieldConstraintsCache","selectOptionsConstraints","regularExpressionConstraints","cascadingDropdownConstraints","dateRangeConstraints","numericRangeConstraints","simpleListValueConstraints","cascadingListValueConstraints","numUnsavedSelectOptionsConstraints","numUnsavedRegularExpressionConstraints","numUnsavedCascadingDropdownConstraints","numUnsavedDateRangeConstraints","numUnsavedNumericRangeConstraints","numUnsavedSimpleListValueConstraints","numUnsavedCascadingListValueConstraints","doSetUnsavedConstraintIdValuesToZero","listOfConstraints","CachedFormFieldService","constraintsCache","cacheEnabled","enableCache","disableCache","cacheIsEnabled","setNewConstraintIdValuesToZero","getSiteNamedSelectOptions","existingConstraint","findExistingConstraint","notYetSavedId","getSiteNamedRegularExpressions","getSiteNamedCascadingDropdowns","getSiteNamedDateRanges","getSiteNamedNumericRanges","getSiteNamedSimpleListValuesConstraints","getSiteNamedSimpleListValueConstraints","getSiteNamedCascadingListValuesConstraints","getSiteNamedCascadingListValueConstraints","getCascadingDropdownConstraintConfiguration","wrapFieldDataInDoubleQuotes","fieldDelimiter","getListValueConstraintCsv","getUrlForListValueConstraintCsv","constraintsList","SiteFormFieldConstraintProperties","FormFieldService","createSelectOptionsConstraint","serverResult","updateSelectOptionsConstraint","createRegularExpressionConstraint","updateRegularExpressionConstraint","createCascadingDropdownConstraint","updateCascadingDropdownConstraint","createDateRangeConstraint","constructDateRangeConstraintFrom","updateDateRangeConstraint","createNumericRangeConstraint","constructNumericRangeConstraintFrom","updateNumericRangeConstraint","createSimpleListValuesConstraint","constructSimpleListValuesConstraintFrom","updateSimpleListValuesConstraint","createCascadingListValuesConstraint","constructCascadingListValuesConstraintFrom","updateCascadingListValuesConstraint","selectOptionsList","resultList","selectOptionsData","regexList","regexData","constraintData","constructListValuesConstraintFrom","getAllSiteNamedConstraints","configRows","csv","getNamedConstraint","constraintVM","deleteNamedConstraint","LogMessage","FormInstanceHistory","Versions","versions","LogMessages","messages","logMessages","logMsg","isSubscribedToWorkflowChanges","toggleIsLinkedFormInstance","sourceFormInstanceId","targetFormInstanceId","updateFormInstanceElementVersionComment","deleteAll","compareVersions","id1","entityOneIsVersion","id2","entityTwoIsVersion","restoreVersion","getHistory","reloadFormContents","messageWhileLoading","getPrintableHtml","responseType","updateContent","startTime","endTime","handleErrorWithConflict","transitionWorkflowState","notifySubscribers","pageIndex","pageSize","findFormFormInstances","iFormInstance","findBy","findByMechanism","findByValue","getFormInstancesUsingWorkflowState","currentWorkflowStateId","getFormInstancesUsingWorkflows","workflowIds","getFormInstancesUsingForm","FormInstanceGridRow","getMetaDataValuePropertyNames_DateFormatting","getAsPlainObject","fiGridRow","columnDefinitions","getMetaDataValue","canCopy","canCopyFormInstance","canMove","canMoveFormInstance","canDeleteFormInstance","isFirstGridRow","Key","Member","ItemCount","itemCount","HasSubgroups","hasSubgroups","Items","Aggregates","SubgroupCount","Subgroups","nonMetaDataFields","colField","fiElement","displayVal","alias","FormTemplateInstancesGridData","canPerformAtLeastOneAction","canCopyAtLeastOneForm","canMoveAtLeastOneForm","canDeleteAtLeastOneForm","canCreateSubFolderInAtLeastOneFolder","FormsGridRowOrderData","mapOfFormsGridOrdersJson","OrderFormsGridRowsData","formsGridOrder","FormTemplateInstancesService","selectedGridId","aggregatesParam","gridFieldId","resetItem","originalDataItem","reset","setFormsGridOrderValues","reorderData","configuredColumns","formInstanceRows","gridDataObject","formInstanceRow","groupedGridData","ungroupedData","ungroupedRowData","ungroupedRow","clientGroupedDataForReference","groupBy","fixCaseOfAggregates","groupedRowData","aggregates","fixCaseOfFieldNames","groupedRow","rowAggregates","keyIndex","matchingAggregate","ag","fieldAggregates","rowItems","itemKey","fixedKey","Geocode2010Address","address","Geocode2020Address","gridId","ElementTypeMetadata","elementsFlagName","elementsPropertyName","elementsInitializedCallback","recorderService","performAction","recordActionClick","hasMethods","getMethods","mapNameWithExactMatch","namesMap","mapNameWithPartialMatch","nameKey","ClickableElementTypeMetadata","operationCompletedServiceInfo","getAnyOperationCompletedServiceInfoFor","elementToClick","doubleClickButton","HtmlPropertyValue","LinksElementTypeMetadata","getTextFor","hrefValue","getAttributeValueFor","ButtonsElementTypeMetadata","getButtonTitle","ButtonsWithMatIconsElementTypeMetadata","firstChild","MatListItemsElementTypeMetadata","MatIconsElementTypeMetadata","getMatIconTitle","HtmlInputValue","_inputValue","InputElementTypeMetadataBase","getInputTitle","getValueFor","InputElementTypeMetadata","InputsElementTypeMetadata","TextSelectOptionValue","ParameterFormControlTypeEnum","parameterControlInfo_r1","EditInputParametersDialog_ng_container_4_ng_container_2_ng_container_5_Template","parameterName","selectOption_r2","EditInputParametersDialog_ng_container_4_ng_container_4_mat_option_5_Template","EditInputParametersDialog_ng_container_4_ng_container_2_Template","EditInputParametersDialog_ng_container_4_ng_container_3_Template","EditInputParametersDialog_ng_container_4_ng_container_4_Template","ParameterTypeToSetupMethodName","parameterType","setupMethodName","TextInput","NumericInput","Select","ParameterFormControlInfo","enteredValue","EditInputParametersDialogManager","openDialog","dialogHeight","EditInputParametersDialog","parameterTypesToMethodNames","parametersControlInfo","setupParameterControls","returnParameterValues","prepareResultValues","parameterTypeToSetup","additionalTypeInfo","controlInfo","setupStringControl","parameterInfo","selectOption","setupTextControlWithDateTimeSuffixCheckbox","setupNumericControl","parameterControlInfo","EditInputParametersDialog_ng_container_4_Template","ComponentMethodElementTypeMetadata","parameterValueInfo","prepareArrayOfCallParams","paramsAsStrings","paramAsString","parameterValues","expectedArraySize","MatCheckBoxElementTypeMetadata","prop","baseComponent","matCheckboxes","matCheckboxElementRefs","matCheckboxesArray","matCheckboxElementRefsArray","matCheckbox","change","MatSelectElementTypeMetadata","metadata","ExcelPasteData","importFormInstanceFiles","formInstanceDataFiles","importFormInstances","formInstanceDataZipFile","optionalFormId","excelFile","gridFormInstanceElementId","pasteDataObject","importFormDefinitions","formDefinitionFiles","targetDataCollectionId","InlineContent","InlineContentService","OLD_getUrl","CharacterToAsciiCode","numericBaseCode","alphaBaseCode","spaceCode","numbericCharacters","alphaCharacters","charToAsciiCode","char","asciiCode","containingElementSelector","elementsToFindSelector","elementToFindSelector","optionalTextElementSelector","attributeName","scriptName","dblclick","ngControl","keyCode","triggerHandler","numLevelsUp","getParent","GridParams","kendoGridState","gridFlavorModifier","dataResult","currentRowCount","gridRowViewModel","BuildGridRowViewModel","validationFailures","updateRow","gridRowDatabaseId","indexToDelete","findIndex","wrappedGridRow","getWrappedGridRow","getElementValue","uiIndexOfMovedRow","uiIndexOfTargetRow","reorderRowsInKendoGridData","columnHeaders","wrappers","method","qs","toODataString","paramObj","wrappedGridRows","untypedViewModel","typedViewModel","unpackGridRowFromViewModel","wrapGridRowAsObject","serializeModels","resultObject","MaxPickerService","addFakeUsers","pi2","pi3","navigationHistoryStack","backButtonWasClicked","NotificationRecipient","NotificationInstance","findAllForCategory","category","templates","iTemplate","oTemplate","getSiteMilestoneTemplatePreview","milestone","notification","getUserNotifications","notifications","iNotification","oNotification","generatePermissionsPreview","permissionsPreview","generateVirtualFolderHierarchyRecords","generateAllVirtualFoldersHierarchyRecords","completed","canHide","iNextListenerId","listeners","listener","progressListenerId","removeListener","l","progressInfo","iListener","timer","showFor","QueryParamsService","SHOW_APP_CHROME_PARAM","parsedQueryParams","queryParams","hideAppChrome","showChromeParamValue","getFolderRoles","getRoles","getFolderRoleGroupMembers","deleteMember","roleGroupMemberId","deleteAllRoleMembers","getSiteRoles","getRolesUsedInSite","roleWrapper","SiteETLRequest","generateSiteETLJob","runSiteETLJob","SiteIcon","addSiteIcon","iconFile","deleteSiteIcon","siteIconId","listSiteIcons","siteIcon","getSiteIcon","SiteResponseManagementMetrics","SiteSubmissionForReview","submissionId","SiteResponseManagementData","submissionsForReview","WorkflowCountData","WorkflowResponseData","WorkflowStateCountData","WorkflowStateResponseData","MagicStructureResponseData","MagicFolderResponseData","MagicFormInstanceResponseData","getWorkflowMetrics","getWorkflowStateMetrics","getMagicFolderMetrics","getMagicFormInstanceMetrics","TestableAction","TestActionLogData","testActionLog","clearTestActions","SelectComponent","SetInputValue","ClickButton","ClickLink","CallMethod","TestActionInfo","currentAction","lastActionPerformed","UITestActionRecorderService","testActionInfo","TestActionLog","testActions","beginAction","saveLogMessage","actionCompleted","selectElement","parameter","addDateTimeSuffixText","getInputValue","popLogMessage","dupMessage","VnextReleaseFeatures","VnextReleaseFeaturesService","getCurrentReleaseFeatures","saveCurrentReleaseFeatures","releaseFeatures","folderBulkWorkflowStateUpdate","selectedWorkflowStateId","cascade","formsGridBulkWorkflowStateUpdate","formGridBulkWorkflowStateUpdate","shortDaysOfWeek","shortMonthsOfYear","dayOffset","hourOffset","setDate","setMinutes","setSeconds","DateToUTCDateString","TodayToUTCDate","TodayToUTCDateString","longFormatTodayString","today","getDay","getLongDate","hour","gmtOffset","timeZone","filesField","dt","DataTransfer","arrayToDelimitedList","delimiter","delimitedListToArray","concatenatedValues","findAndAssignFrom","targetObj","tryParseJson","getNestedProperty","propertyChain","sensitivity","RouterLinkData","relativeURL","RouterLinkComponent","linkData","LinkData","VnextReleaseFeaturesDialogMode","EditReleaseFeatures","ViewReleaseFeatures","VnextReleaseFeaturesDialog","releaseFeaturesService","editFormControl","savingReleaseFeaturesFlag","newFeatures","ReleaseFeaturesRetrieved","ReleaseFeatures","NewReleaseFeaturesHtml","EditFormControl","NumNewFeaturesTextAreaRows","NumNewFeaturesTextAreaCols","SaveButtonText","SavingReleaseFeaturesFlag","saveReleaseFeatures","updatedReleaseFeatures","cancelOrCloseClicked","loginFromLandingPage","emailHtml","SelectedTabIndex","editNewComingSoonFeatures","AppBuildInfoApiBuildInfoBuildTime","AppBuildInfoApiBuildInfoChangeSet","AppBuildInfoApiBuildInfobuildNumber","AppBuildInfoWebBuildInfoBuildTime","AppBuildInfoWebBuildInfoChangeSet","AppBuildInfoWebBuildInfobuildNumber","LandingPageLinkData","requiresSystemAdminFlag","callbackMethod","hasCallbackMethod","vnextReleaseFeaturesService","AdminAboutSvc","landingPageLinkData","WelcomeClass","IsNotLastLink","onLinkWithCallbackClick","LandingPageComponent_div_9_Template","LandingPageComponent_div_12_Template","LandingPageComponent_div_13_Template","LandingPageComponent_div_14_Template","type_r3","onGroupSet","viewableByMaxGroup","onTypeChange","DocumentPublishingSettingsEditorDialog_div_3_form_3_mat_option_13_Template","DocumentPublishingSettingsEditorDialog_div_3_form_3_div_26_Template","DocumentPublishingSettingsEditorDialog_div_3_form_3_div_27_Template","outputTypes","VIEWABLE_BY_ALL","VIEWABLE_BY_SITE_ADMINS","VIEWABLE_BY_NONE","VIEWABLE_BY_GROUP","ShowGroupPicker","ShowSelectedMaxGroup","XsltLabel","DocumentPublishingSettingsEditorDialog_div_3_form_3_Template","DocumentPublishingSettingsEditorDialog","documentPublishingService","XSLT_LABELS","freeze","PASTE_XSLT","REPORT_NAME","xsltLabel","xslt","markAsDirty","settingConfigType","DocumentPublishingSettingsEditorDialog_div_2_Template","DocumentPublishingSettingsEditorDialog_div_3_Template","exportService","deleteOnConfirmDialogService","documentPublishing","doOnEdit","createOrUpdateSettings","submittedSettings","clonedSettings","itemContextMenu_r2","formInstanceHtml","print","FormInstanceHtml","onWindowAfterPrint","passedFiles","getFiles","toDropFolderId","getToDropFolderId","setToDropSiteId","toDropSiteId","getToDropSiteId","getReload","setFolderName","getFolderName","objectType","getObjectType","getSiteOrFolder","debug","production","ExecutionTimeEnvironment","WEBAPIURL","suppressUnsavedChangesWarning","matomoConfig","BANNER_COLOR","enableProdMode","__NgCli_bootstrap_1","bootstrapModule"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/app/app.component.html","./src/app/app.component.ts","./src/app/shared/resolvers/claim.resolver.ts","./src/app/shared/resolvers/data-collection.resolver.ts","./src/app/shared/services/menu.service.ts","./src/app/shared/resolvers/menu.resolver.ts","./src/app/views/admin/admin.component.ts","./src/app/views/admin/admin.component.html","./src/app/views/home/home.component.ts","./src/app/views/home/home.component.html","./src/app/views/http-error/http-error.component.html","./src/app/views/http-error/http-error.component.ts","./src/app/views/site/site.component.ts","./src/app/views/site/site.component.html","./src/app/app-routing.module.ts","./src/app/security/cas.service.ts","./src/app/shared/http-request-interceptor.ts","./src/app/shared/components/loading-spinner/loading-spinner.component.ts","./src/app/shared/components/loading-spinner/loading-spinner.component.html","./src/app/shared/components/side-nav-container/side-nav-container.component.html","./src/app/shared/components/side-nav-container/side-nav-container.component.ts","./src/app/shared/loader-intercepter.ts","./src/app/shared/models/test-configuration.model.ts","./src/app/shared/services/test-configuration.service.ts","./src/app/shared/components/progress-indicator/progress-indicator.component.html","./src/app/shared/components/progress-indicator/progress-indicator.component.ts","./src/app/shared/global-error-handler.ts","./src/app/shared/directives/drag-and-drop-files.directive.ts","./src/app/shared/components/cross-site-user-favorite-forms/cross-site-user-favorite-forms.extras.ts","./src/app/shared/models/site-content/cross-site-user-favorite-form.model.ts","./src/app/shared/services/cross-site-user-favorite-forms.service.ts","./src/app/shared/directives/cross-site-user-favorite-forms.directive.ts","./src/app/shared/components/cross-site-user-favorite-forms/cross-site-user-favorite-forms.component.html","./src/app/shared/components/cross-site-user-favorite-forms/cross-site-user-favorite-forms.component.ts","./src/app/shared/models/site-content/site-grid-data.model.ts","./src/app/shared/services/site-grid-data.service.ts","./src/app/shared/directives/site-grid-remote-binding.directive.ts","./src/app/shared/components/site-grid/extras.ts","./src/app/shared/components/site-grid/site-grid.component.html","./src/app/shared/components/site-grid/site-grid.component.ts","./src/app/shared/components/cross-site-user-notifications/cross-site-user-notifications.classes.ts","./src/app/shared/services/cross-site-user-notifications.service.ts","./src/app/shared/directives/cross-site-user-notifications.directive.ts","./src/app/shared/components/cross-site-user-notifications/cross-site-user-notifications.component.html","./src/app/shared/components/cross-site-user-notifications/cross-site-user-notifications.component.ts","./src/app/app.module.ts","./src/app/shared/external-libraries/ng-drag-drop/ng-drag-drop.module.ts","./src/app/modules/shared.module.ts","./src/app/route-guards/claim.route-guard.ts","./src/app/route-guards/home-page.route-guard.ts","./src/app/route-guards/unsaved-changes.route-guard.ts","./src/app/security/current-user.model.ts","./src/app/security/current-user.service.ts","./src/app/shared/services/user-impersonation.service.ts","./src/app/security/loginout/loginout.component.html","./src/app/security/loginout/loginout.component.ts","./src/app/shared/accessibility.helper.ts","./src/app/shared/adapters/date-adapter.ts","./src/app/shared/components/autocomplete/autocomplete.component.html","./src/app/shared/components/autocomplete/autocomplete.component.ts","./src/app/shared/components/file-uploader/file-uploader.component.ts","./src/app/shared/components/file-uploader/file-uploader.component.html","./src/app/shared/components/form-builder/field-configuration/flexible-selection-field-configuration/flexible-selection-field-configuration.component.html","./src/app/shared/components/form-builder/field-configuration/flexible-selection-field-configuration/flexible-selection-field-configuration.component.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-cascading-dropdown-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-cascading-list-values-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-constraint-liaison-base.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-constraint-liaison-manager.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-date-range-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-numeric-range-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-regular-expression-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-select-options-constraint-liaison.ts","./src/app/shared/components/form-builder/properties/form-field-properties/constraints/field-simple-list-values-constraint-liaison.ts","./src/app/shared/dialogs/delete-restore-attachment/delete-restore-attachment.dialog.html","./src/app/shared/dialogs/delete-restore-attachment/delete-restore-attachment.dialog.ts","./src/app/shared/components/form-fields/attachment-form-field/attachment-form-field.component.html","./src/app/shared/components/form-fields/attachment-form-field/attachment-form-field.component.ts","./src/app/shared/components/form-fields/drop-down-form-field-base/drop-down-form-field-base.component.html","./src/app/shared/components/form-fields/cascading-drop-down-form-field/cascading-drop-down-form-field.component.ts","./src/app/shared/components/form-fields/checkbox-form-field/checkbox-form-field.component.html","./src/app/shared/components/form-fields/checkbox-form-field/checkbox-form-field.component.ts","./src/app/shared/models/comments-data/user-type.enum.ts","./src/app/shared/models/comments-data/comment-user-or-group.ts","./src/app/shared/models/comments-data/comment-info.ts","./src/app/shared/models/comments-data/comments-form-field.model.ts","./src/app/shared/components/form-fields/comments-form-field/comments-form-field.component.html","./src/app/shared/components/form-fields/comments-form-field/comments-form-field.component.ts","./src/app/shared/dialogs/add-contact/add-contact.dialog.ts","./src/app/shared/dialogs/add-contact/add-contact.dialog.html","./src/app/shared/models/contacts/contacts-form-field.model.ts","./src/app/shared/components/form-fields/contacts-form-field/contacts-form-field.component.html","./src/app/shared/components/form-fields/contacts-form-field/contacts-form-field.component.ts","./src/app/shared/components/form-fields/currency-form-field/currency-form-field.component.html","./src/app/shared/components/form-fields/currency-form-field/currency-form-field.component.ts","./src/app/shared/components/form-fields/form-field-mode.enum.ts","./src/app/shared/components/form-fields/date-form-field/date-form-field.component.html","./src/app/shared/components/form-fields/date-form-field/date-form-field.component.ts","./src/app/shared/directives/decimal-format-directive.ts","./src/app/shared/components/form-fields/decimal-form-field/decimal-form-field.component.html","./src/app/shared/components/form-fields/decimal-form-field/decimal-form-field.component.ts","./src/app/shared/components/form-fields/drop-down-form-field-base/drop-down-form-field-base.component.ts","./src/app/shared/components/form-fields/drop-down-form-field/drop-down-form-field.component.html","./src/app/shared/components/form-fields/drop-down-form-field/drop-down-form-field.component.ts","./src/app/shared/components/form-fields/editor-name-form-field/editor-name-form-field.component.html","./src/app/shared/components/form-fields/editor-name-form-field/editor-name-form-field.component.ts","./src/app/shared/components/form-fields/flexible-selection-form-field/flexible-selection-form-field.component.html","./src/app/shared/components/form-fields/flexible-selection-form-field/flexible-selection-form-field.component.ts","./src/app/shared/models/form-builder/footnote-row.model.ts","./src/app/shared/models/grid/grid-cell-data.model.ts","./src/app/shared/components/form-fields/footnote-form-field/footnote-form-field.component.html","./src/app/shared/components/form-fields/footnote-form-field/footnote-form-field.component.ts","./src/app/shared/components/form-fields/form-field-base/form-field-base.component.ts","./src/app/shared/components/form-fields/form-field-base/form-field-base.component.html","./src/app/shared/components/form-fields/formula-form-field/field-name-hashes.ts","./src/app/shared/components/form-fields/formula-form-field/formula-evaluation-helper.ts","./src/app/shared/components/form-fields/formula-form-field/formula-evaluator.ts","./src/app/shared/components/form-fields/formula-form-field/formula-form-field.component.html","./src/app/shared/components/form-fields/formula-form-field/formula-form-field.component.ts","./src/app/shared/components/form-fields/grid-cascading-dropdown/grid-cascading-dropdown.component.ts","./src/app/shared/components/form-fields/grid-field-designer/grid-designer-editor-base.ts","./src/app/shared/models/grid/cell-context-menu-info.model.ts","./src/app/shared/dialogs/reorder-grid-columns/reorder-grid-columns.dialog.ts","./src/app/shared/dialogs/reorder-grid-columns/reorder-grid-columns.dialog.html","./src/app/shared/components/form-fields/grid-field-designer/grid-field-designer.component.html","./src/app/shared/components/form-fields/grid-field-designer/grid-field-designer.component.ts","./src/app/shared/dialogs/grid-paste-kendo/grid-paste-kendo.dialog.html","./src/app/shared/dialogs/grid-paste-kendo/grid-paste-kendo.dialog.ts","./src/app/shared/dialogs/geocode/geocode-dialog.component.html","./src/app/shared/dialogs/geocode/geocode-dialog.component.ts","./src/app/shared/components/form-fields/grid-form-field/grid-event.ts","./src/app/shared/components/form-fields/grid-field-editor/data-used-with-kendo-grid.ts","./src/app/shared/models/export-import/import-excel-data-into-grid-metrics.model.ts","./src/app/shared/dialogs/import-grid-data/import-grid-data.dialog.html","./src/app/shared/dialogs/import-grid-data/import-grid-data.dialog.ts","./src/app/shared/components/form-fields/grid-field-editor/grid-field-editor.component.html","./src/app/shared/components/form-fields/grid-field-editor/grid-field-editor.component.ts","./src/app/shared/models/grid/runtime-data.model.ts","./src/app/shared/components/form-fields/grid-form-field/grid-form-field.component.html","./src/app/shared/components/form-fields/grid-form-field/grid-form-field.component.ts","./src/app/shared/components/form-fields/html-link-field/html-link-field.component.html","./src/app/shared/components/form-fields/html-link-field/html-link-field.component.ts","./src/app/shared/components/form-fields/inline-content-form-field/inline-content-form-field.component.html","./src/app/shared/components/form-fields/inline-content-form-field/inline-content-form-field.component.ts","./src/app/shared/components/form-fields/input-form-field-base/input-form-field-base.component.ts","./src/app/shared/components/form-fields/input-form-field-base/text-input-form-field-base.component.ts","./src/app/shared/components/form-fields/instructions-form-field/instructions-form-field.component.html","./src/app/shared/components/form-fields/instructions-form-field/instructions-form-field.component.ts","./src/app/shared/components/form-fields/num-input-form-field-base/integer-input-form-field-base.component.ts","./src/app/shared/directives/integer-only.directive.ts","./src/app/shared/components/form-fields/integer-form-field/integer-form-field.component.html","./src/app/shared/components/form-fields/integer-form-field/integer-form-field.component.ts","./src/app/shared/components/form-fields/kendo-grid-base/kendo-grid-base.component.ts","./src/app/shared/components/form-fields/label-form-field/label-form-field.component.html","./src/app/shared/components/form-fields/label-form-field/label-form-field.component.ts","./src/app/shared/components/form-fields/last-edited-date-form-field/last-edited-date-form-field.component.html","./src/app/shared/components/form-fields/last-edited-date-form-field/last-edited-date-form-field.component.ts","./src/app/shared/components/form-fields/multi-checkbox-form-field/multi-checkbox-form-field.component.html","./src/app/shared/components/form-fields/multi-checkbox-form-field/multi-checkbox-form-field.component.ts","./src/app/shared/components/form-fields/multi-drop-down-form-field/multi-drop-down-form-field.component.html","./src/app/shared/components/form-fields/multi-drop-down-form-field/multi-drop-down-form-field.component.ts","./src/app/shared/components/form-fields/num-input-form-field-base/decimal-input-form-field-base.component.ts","./src/app/shared/components/form-fields/num-input-form-field-base/num-input-form-field-base.component.ts","./src/app/shared/components/form-fields/paragraph-form-field/paragraph-form-field.component.html","./src/app/shared/components/form-fields/paragraph-form-field/paragraph-form-field.component.ts","./src/app/shared/components/form-fields/radio-buttons-form-field/radio-buttons-form-field.component.html","./src/app/shared/components/form-fields/radio-buttons-form-field/radio-buttons-form-field.component.ts","./src/app/shared/components/form-fields/raw-html-form-field/raw-html-form-field.component.ts","./src/app/shared/components/form-fields/raw-html-form-field/raw-html-form-field.component.html","./src/app/shared/components/form-fields/rich-text-form-field/rich-text-form-field.component.html","./src/app/shared/components/form-fields/rich-text-form-field/rich-text-form-field.component.ts","./src/app/shared/components/form-fields/short-text-form-field/short-text-form-field.component.html","./src/app/shared/components/form-fields/short-text-form-field/short-text-form-field.component.ts","./src/app/shared/components/form-fields/show-to-hide-from/show-to-hide-from.component.html","./src/app/shared/components/form-fields/show-to-hide-from/show-to-hide-from.component.ts","./src/app/shared/components/form-fields/url-builder-form-field/url-builder-form-field.component.html","./src/app/shared/components/form-fields/url-builder-form-field/url-builder-form-field.component.ts","./src/app/shared/components/list-view/list-view-item-move-action.ts","./src/app/shared/components/list-view/base-view/base-view.component.ts","./src/app/shared/components/list-view/grid-view/extras.ts","./src/app/shared/components/list-view/grid-view/grid-view.component.html","./src/app/shared/components/list-view/grid-view/grid-view.component.ts","./src/app/shared/enums/icon-display-style.enum.ts","./src/app/shared/components/list-view/list-view-button-config.model.ts","./src/app/shared/components/list-view/list-view-drag-action.model.ts","./src/app/shared/components/list-view/list-view-trash-config.model.ts","./src/app/shared/components/list-view/list-view.component.html","./src/app/shared/components/list-view/list-view.component.ts","./src/app/shared/components/list-view/list-view.helper.ts","./src/app/shared/components/list-view/tile-view/tile-view.component.html","./src/app/shared/components/list-view/tile-view/tile-view.component.ts","./src/app/shared/components/max-picker/max-picker.component.html","./src/app/shared/components/max-picker/max-picker.component.ts","./src/app/shared/models/component-scripting/elements-to-find.model.ts","./src/app/shared/models/component-scripting/scriptable-element.model.ts","./src/app/shared/models/component-scripting/enum-reference.model.ts","./src/app/shared/components/scriptable-base/scriptable-base.component.ts","./src/app/shared/components/scriptable-base/scriptable-base.component.html","./src/app/shared/components/selected-component-info/selected-component-info.component.html","./src/app/shared/components/selected-component-info/selected-component-info.component.ts","./src/app/shared/dialogs/edit-value/edit-value.dialog.ts","./src/app/shared/dialogs/edit-value/edit-value.dialog.html","./src/app/shared/components/selected-node-element/selected-node-element.component.html","./src/app/shared/components/selected-node-element/selected-node-element.component.ts","./src/app/shared/dialogs/alert/alert-dialog.component.html","./src/app/shared/dialogs/alert/alert-dialog.component.ts","./src/app/shared/dialogs/async-job-base/async-job-base.dialog.ts","./src/app/shared/models/export-import/import-form-instances-metrics.model.ts","./src/app/shared/dialogs/async-job-base/import-async-job-base.dialog.ts","./src/app/shared/dialogs/async-job-base/monitor-excel-import-to-gride-helper.ts","./src/app/shared/dialogs/collection-detail/collection-detail.dialog.ts","./src/app/shared/dialogs/collection-detail/collection-detail.dialog.html","./src/app/shared/dialogs/confirmation/confirmation-dialog.component.html","./src/app/shared/dialogs/confirmation/confirmation-dialog.component.ts","./src/app/shared/dialogs/display-content/display-content.dialog.html","./src/app/shared/dialogs/display-content/display-content.dialog.ts","./src/app/shared/dialogs/file-upload/file-upload-dialog.component.html","./src/app/shared/dialogs/file-upload/file-upload-dialog.component.ts","./src/app/shared/dialogs/import-site/import-site.dialog.ts","./src/app/shared/dialogs/import-site/import-site.dialog.html","./src/app/shared/dialogs/select-options/select-options.dialog.ts","./src/app/shared/dialogs/select-options/select-options.dialog.html","./src/app/shared/services/service-class-catalogue.service.ts","./src/app/shared/models/parse/token-code.enum.ts","./src/app/shared/interfaces/iscriptable-function.ts","./src/app/shared/models/component-scripting/service-as-testable-component.model.ts","./src/app/shared/models/parse/token.model.ts","./src/app/shared/utility-classes/parse/tokenizer.ts","./src/app/shared/models/parse/tuple.model.ts","./src/app/shared/utility-classes/parse/ui-test-directive-parser.ts","./src/app/shared/models/scriptable-functions/scriptable-function-base.ts","./src/app/shared/models/scriptable-functions/select-component.model.ts","./src/app/shared/models/scriptable-functions/call-method.model.ts","./src/app/shared/models/scriptable-functions/click-button.model.ts","./src/app/shared/models/scriptable-functions/click-link.model.ts","./src/app/shared/models/scriptable-functions/set-input-value.model.ts","./src/app/shared/services/scriptable-function.service.ts","./src/app/shared/dialogs/ui-test-center/ui-test-center.dialog.ts","./src/app/shared/dialogs/ui-test-center/ui-test-center.dialog.html","./src/app/shared/directives/custom-date-format.directive.ts","./src/app/shared/directives/dynamic-content-host.directive.ts","./src/app/shared/directives/icon.directive.ts","./src/app/shared/directives/kendo-grid-remote-binding.directive.ts","./src/app/shared/enums/browserstorage.enum.ts","./src/app/shared/enums/component-scripting/scriptable-component-status.enum.ts","./src/app/shared/enums/confirmation-dialog.enum.ts","./src/app/shared/enums/drag-drop.enum.ts","./src/app/shared/enums/event-subscription.enum.ts","./src/app/shared/enums/form-field-constraint-type.enum.ts","./src/app/shared/enums/form-field-processing-phase.enum.ts","./src/app/shared/enums/form-field-save-config-reason.enum.ts","./src/app/shared/enums/form-mode.enum.ts","./src/app/shared/enums/grid.enums.ts","./src/app/shared/enums/icon-format.enum.ts","./src/app/shared/enums/item-type.enum.ts","./src/app/shared/enums/kendo-grid/kendo-grid-operator-name.enum.ts","./src/app/shared/enums/progress-bar-constants.enum.ts","./src/app/shared/enums/xml-file-format.enum.ts","./src/app/shared/external-libraries/ng-drag-drop/directives/draggable.directive.ts","./src/app/shared/external-libraries/ng-drag-drop/shared/drop-event.model.ts","./src/app/shared/external-libraries/ng-drag-drop/directives/droppable.directive.ts","./src/app/shared/external-libraries/ng-drag-drop/services/ng-drag-drop.service.ts","./src/app/shared/external-libraries/ng-drag-drop/shared/dom-helper.ts","./src/app/shared/interfaces/imodel-event-handler.interface.ts","./src/app/shared/kendo-grid-helper.ts","./src/app/shared/logging.ts","./src/app/shared/mappings/fabric-file-types-icon.mapping.ts","./src/app/shared/models/async-job.model.ts","./src/app/shared/models/attachment/attachment-info-with-urls.model.ts","./src/app/shared/models/attachment/attachment.model.ts","./src/app/shared/models/cascading-dropdown/cascading-dropdown-config.model.ts","./src/app/shared/models/cascading-dropdown/cascading-dropdown-data.model.ts","./src/app/shared/models/checkboxes/checkbox-data.model.ts","./src/app/shared/models/component-scripting/additional-element-info.model.ts","./src/app/shared/models/component-scripting/component-methods-metadata.model.ts","./src/app/shared/models/component-scripting/component-methods.service.ts","./src/app/shared/models/component-scripting/element-count-expected.enum.ts","./src/app/shared/models/component-scripting/html-element-info.model.ts","./src/app/shared/models/component-scripting/html-element-type-names.model.ts","./src/app/shared/models/component-scripting/scriptable-function.annotation.ts","./src/app/shared/models/component-scripting/element-type-info.model.ts","./src/app/shared/models/component-scripting/selected-component-data.model.ts","./src/app/shared/models/csv-data/header-value-pair.model.ts","./src/app/shared/models/data-collection-status.model.ts","./src/app/shared/models/document-publishing-settings.model.ts","./src/app/shared/models/event-subscription.model.ts","./src/app/shared/models/export-import/export-site-step.enum.ts","./src/app/shared/models/export-import/export-site-metrics.model.ts","./src/app/shared/models/export-import/generic-import-data-from-excel-spreadsheet.ts","./src/app/shared/models/export-import/import-metrics-base.ts","./src/app/shared/models/export-import/metrics-base.model.ts","./src/app/shared/utility-classes/form-field.util.ts","./src/app/shared/models/field-conditional-logic/conditional-logic-editor-classes.ts","./src/app/shared/models/field-conditional-logic/enums.ts","./src/app/shared/models/field-conditional-logic/form-field-action.model.ts","./src/app/shared/models/field-conditional-logic/form-field-expression.model.ts","./src/app/shared/models/flexible-selection-fields/flexible-selection-field-instructions-request.model.ts","./src/app/shared/models/form-builder/field-constraints/field-cascading-dropdown-constraint.model.ts","./src/app/shared/models/form-builder/field-constraints/field-date-range-constraint.model.ts","./src/app/shared/models/form-builder/field-constraints/field-numeric-range-constraint.model.ts","./src/app/shared/models/form-builder/field-constraints/field-regular-expression-constraint.model.ts","./src/app/shared/models/form-builder/field-constraints/field-select-options-constraint.model.ts","./src/app/shared/models/form-builder/field-constraints/form-field-constraint-base.model.ts","./src/app/shared/models/form-builder/field-constraints/form-field-list-values-constraint.model.ts","./src/app/shared/models/form-builder/field-definition.model.ts","./src/app/shared/models/form-builder/form-field-on-init-output-property.enum.ts","./src/app/shared/models/form-builder/form-field-property-enum.model.ts","./src/app/shared/models/form-builder/form-field-types.ts","./src/app/shared/models/form-builder/form-field.model.ts","./src/app/shared/models/share-member.model.ts","./src/app/shared/models/share.model.ts","./src/app/shared/utility-classes/javascript.util.ts","./src/app/shared/models/form-builder/form-instance-element-for-history.model.ts","./src/app/shared/models/form-builder/form-instance-element.model.ts","./src/app/shared/models/form-builder/form-settings.model.ts","./src/app/shared/models/form-builder/form-layout.model.ts","./src/app/shared/models/form-builder/form.model.ts","./src/app/shared/models/form-builder/grid-flavor/grid-flavor-base.ts","./src/app/shared/models/form-builder/grid-flavor/regular-grid-flavor.ts","./src/app/shared/models/form-builder/grid-flavor/attachments-grid-flavor.ts","./src/app/shared/models/form-builder/grid-flavor/contacts-grid-flavor.ts","./src/app/shared/models/form-builder/grid-flavor/grid-flavor-factory.ts","./src/app/shared/models/form-builder/grid-row.model.ts","./src/app/shared/models/form-builder/layout-cell.model.ts","./src/app/shared/models/form-builder/layout-row.model.ts","./src/app/shared/models/grid/fixed-first-column-values.model.ts","./src/app/shared/models/grid/grid-config.model.ts","./src/app/shared/models/grid/column-total-models.ts","./src/app/shared/models/grid/sort-classes.ts","./src/app/shared/models/grid/grid-data-source.model.ts","./src/app/shared/models/grid/grid-form-instance-element-wrapper.model.ts","./src/app/shared/models/grid/grid-row.model.ts","./src/app/shared/models/grid/loading-data-progress.model.ts","./src/app/shared/models/grid/component-and-form-field-model.ts","./src/app/shared/models/grid/runtime-metadata.model.ts","./src/app/shared/models/ilist-item-base.model.ts","./src/app/shared/models/notifications/notification-template.model.ts","./src/app/shared/models/permissions-preview-models/per-pre-all-virtual-folders-hierarchy-request.model.ts","./src/app/shared/models/permissions-preview-models/perPreVirtualFolderHierarchyRequest.model.ts","./src/app/shared/models/permissions-preview-models/permissions-preview-base.model.ts","./src/app/shared/models/permissions-preview-models/permission-preview-node.model.ts","./src/app/shared/models/permissions-preview-models/permissions-preview.model.ts","./src/app/shared/models/permissions-preview-models/virtualFolderPerHierarchyRecord.model.ts","./src/app/shared/models/picker-item.model.ts","./src/app/shared/models/role-group-member.model.ts","./src/app/shared/models/role.model.ts","./src/app/shared/models/site-content/cross-site-user-notifications.model.ts","./src/app/shared/models/site-content/data-collection.model.ts","./src/app/shared/models/site-content/folder.model.ts","./src/app/shared/models/site-content/form-instance.model.ts","./src/app/shared/models/site-content/workflow.model.ts","./src/app/shared/models/site-level-role-member.model.ts","./src/app/shared/models/structure/configure-structure-fields.model.ts","./src/app/shared/models/user-claims.model.ts","./src/app/shared/models/workflow-permission-base.model.ts","./src/app/shared/models/workflow-state-permission.model.ts","./src/app/shared/models/workflow-state.model.ts","./src/app/shared/models/workflow-transition-permission.model.ts","./src/app/shared/models/workflow-transition.model.ts","./src/app/shared/pipes/safe.pipe.ts","./src/app/shared/resolvers/form-instance.resolver.ts","./src/app/shared/resolvers/site-response-management.resolver.ts","./src/app/shared/resolvers/workflow.resolver.ts","./src/environments/version.ts","./src/app/shared/models/admin/app-build-info.model.ts","./src/app/shared/services/admin.service.ts","./src/app/shared/services/async-job.service.ts","./src/app/shared/services/attachment.service.ts","./src/app/shared/services/autocomplete.service.ts","./src/app/shared/services/browserstorage.service.ts","./src/app/shared/services/claim.service.ts","./src/app/shared/services/collect-api-base.service.ts","./src/app/shared/services/communication.service.ts","./src/app/shared/models/component-hierarchy/component-tree-node.model.ts","./src/app/shared/services/component-hierarchy.service.ts","./src/app/shared/services/copy-site.service.ts","./src/app/shared/services/current-folder.service.ts","./src/app/shared/services/current-site.service.ts","./src/app/shared/services/data-collection.service.ts","./src/app/shared/services/delete-on-confirm-dialog.service.ts","./src/app/shared/services/document-publishing.service.ts","./src/app/shared/services/drag-drop.service.ts","./src/app/shared/services/email.service.ts","./src/app/shared/services/event-subscription.service.ts","./src/app/shared/models/export-import/excelSiteFormDataExportRequest.ts","./src/app/shared/models/export-import/excelFolderFormDataExportRequest.ts","./src/app/shared/services/excel-export.service.ts","./src/app/shared/services/excel-import.service.ts","./src/app/shared/models/site-metadata/excel-import-export-template.model.ts","./src/app/shared/services/excel-template.service.ts","./src/app/shared/services/export-data.service.ts","./src/app/shared/services/export-metadata.service.ts","./src/app/shared/models/site-metadata/target-field-logic-instructions.ts","./src/app/shared/models/site-metadata/source-field-change-logic-instructions.model.ts","./src/app/shared/models/site-metadata/form-instance-loaded-logic-instructions.model.ts","./src/app/shared/models/site-metadata/site-home-page-loaded-logic-instructions.model.ts","./src/app/shared/services/field-conditional-logic.service.ts","./src/app/shared/models/form-builder/field-defs/default-field-def-client-logic.ts","./src/app/shared/models/form-builder/field-defs/add-row-above-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/add-row-below-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/cascading-dropdown-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/cascading-dropdown-virtual-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/binary-comparison-base-logic.ts","./src/app/shared/models/form-builder/field-defs/checkbox-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/numeric-compare-base-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/decimal-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/currency-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/date-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/text-logic-base.ts","./src/app/shared/models/form-builder/field-defs/dropdown-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/grid-cascading-dropdown-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/pre-render-filter-base.ts","./src/app/shared/models/form-builder/field-defs/hide-from-pre-render-filter.ts","./src/app/shared/models/form-builder/field-defs/show-to-hide-from-logic-base.ts","./src/app/shared/models/form-builder/field-defs/hide-from-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/integer-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/multi-dropdown-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/multi-checkbox-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/paragraph-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/radio-buttons-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/rich-text-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/short-text-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/show-to-pre-render-filter.ts","./src/app/shared/models/form-builder/field-defs/show-to-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/editor-name-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/last-edited-date-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/metadata-field-def-logic-base.ts","./src/app/shared/models/form-builder/field-defs/favorite-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/flexible-selection-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/text-metadata-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/folder-name-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/folder-path-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/form-instance-name-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/formula-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/grid-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/html-link-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/id-metadata-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/mark-data-as-read-only-pre-render-filter.ts","./src/app/shared/models/form-builder/field-defs/mark-data-as-read-only-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/template-instances-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/url-builder-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/user-roles-field-def-logic.ts","./src/app/shared/models/form-builder/field-defs/workflow-state-field-def-logic.ts","./src/app/shared/services/field-definition.service.ts","./src/app/shared/models/flexible-selection-fields/selection-field-value-change-instructions.model.ts","./src/app/shared/services/flexible-selection-field.service.ts","./src/app/shared/services/folder.service.ts","./src/app/shared/models/site-metadata/import-format-examples.model.ts","./src/app/shared/services/form-builder.service.ts","./src/app/shared/services/form-field-type-and-name.service.ts","./src/app/shared/services/form-field-with-cache.service.ts","./src/app/shared/models/form-builder/field-constraints/site-form-field-constraint-props.model.ts","./src/app/shared/services/form-field.service.ts","./src/app/shared/models/log-message.model.ts","./src/app/shared/models/form-instance-history.model.ts","./src/app/shared/services/form-instance.service.ts","./src/app/shared/models/site-content/form-instance-grid-row.model.ts","./src/app/shared/models/site-content/form-template-instances-grid-data.model.ts","./src/app/shared/models/site-content/forms-grid-row-order-data.model.ts","./src/app/shared/services/form-template-instances.service.ts","./src/app/shared/services/geocode.service.ts","./src/app/shared/models/component-scripting/element-type-metadata.model.ts","./src/app/shared/models/component-scripting/clickable-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/html-property-value.model.ts","./src/app/shared/models/component-scripting/links-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/buttons-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/matlistitems-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/maticons-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/html-input-value.model.ts","./src/app/shared/models/component-scripting/input-element-type-metadata.model.ts","./src/app/shared/models/selection-fields/select-option-value.model.ts","./src/app/shared/dialogs/edit-input-parameters/edit-input-parameters.dialog.ts","./src/app/shared/dialogs/edit-input-parameters/edit-input-parameters.dialog.html","./src/app/shared/models/component-scripting/comp-method-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/matcheckbox-element-type-metadata.model.ts","./src/app/shared/models/component-scripting/matselect-element-type-metadata.model.ts","./src/app/shared/services/html-element-type.service.ts","./src/app/shared/models/grid/excel-paste-data.model.ts","./src/app/shared/services/import-data.service.ts","./src/app/shared/services/import-metadata.service.ts","./src/app/shared/models/site-content/inline-content.model.ts","./src/app/shared/services/inline-content.service.ts","./src/app/shared/services/jquery-browser-driver.service.ts","./src/app/shared/services/keep-alive.service.ts","./src/app/shared/models/grid/grid-params.model.ts","./src/app/shared/services/kendo-grid.service.ts","./src/app/shared/services/loader.service.ts","./src/app/shared/services/max-picker.service.ts","./src/app/shared/services/navigation.service.ts","./src/app/shared/models/notifications/notification-recipient.model.ts","./src/app/shared/models/notifications/notification-instance.model.ts","./src/app/shared/services/notification.service.ts","./src/app/shared/services/permissions-preview.service.ts","./src/app/shared/services/progress-indicator.service.ts","./src/app/shared/services/query-params.service.ts","./src/app/shared/services/role.service.ts","./src/app/shared/services/settings.service.ts","./src/app/shared/models/site-etl/site-etl-request.model.ts","./src/app/shared/services/site-etl.service.ts","./src/app/shared/models/site-icons/site-icon.model.ts","./src/app/shared/services/site-icon.service.ts","./src/app/shared/models/site-response-management.model.ts","./src/app/shared/models/site-response-management/workflow-count-data.model.ts","./src/app/shared/models/site-response-management/workflow-response-data.model.ts","./src/app/shared/models/site-response-management/workflow-state-count-data.model.ts","./src/app/shared/models/site-response-management/workflow-state-response-data.model.ts","./src/app/shared/models/site-response-management/magic-structure-response-data.model.ts","./src/app/shared/models/site-response-management/magic-folder-response-data.model.ts","./src/app/shared/models/site-response-management/magic-form-instance-response-data.model.ts","./src/app/shared/services/site-response-management.service.ts","./src/app/shared/services/ui-test-action-recorder.service.ts","./src/app/shared/models/vnext-release-features.model.ts","./src/app/shared/services/vnext-release-features.service.ts","./src/app/shared/services/workflow.service.ts","./src/app/shared/utility-classes/date.util.ts","./src/app/shared/utility-classes/file-input.util.ts","./src/app/shared/utility-classes/string.util.ts","./src/app/shared/utility.helper.ts","./src/app/shared/components/wrappers/router-link/router-link.component.ts","./src/app/shared/components/wrappers/router-link/router-link.component.html","./src/app/shared/dialogs/vnext-release-features/vnext-release-features.dialog.ts","./src/app/shared/dialogs/vnext-release-features/vnext-release-features.dialog.html","./src/app/views/landing-page/landing-page.component.html","./src/app/views/landing-page/landing-page.component.ts","./src/app/shared/dialogs/document-publishing/document-publishing-settings-editor.dialog.html","./src/app/shared/dialogs/document-publishing/document-publishing-settings-editor.dialog.ts","./src/app/views/site/document-publishing/document-publishing.component.ts","./src/app/views/site/document-publishing/document-publishing.component.html","./src/app/views/site/form/printable-form.component.ts","./src/app/views/site/form/printable-form.component.html","./src/app/views/site/structure/structure.file-drop.event.ts","./src/environments/environment.prod.ts","./src/main.ts"],"sourcesContent":["\r\n\r\n \r\n
\r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n {{this.SiteName}}\r\n \r\n
\r\n {{this.SiteName}}\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
{{this.LeftText}}
\r\n
{{this.CenterText}}
\r\n
{{this.RightText}}
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n","import { Component, OnInit, HostListener, ElementRef, Renderer2, ViewChild } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { DateAdapter } from '@angular/material/core';\r\n\r\nimport { environment } from '../environments/environment';\r\nimport { CurrentUserService } from \"./security/current-user.service\";\r\nimport { Router, NavigationStart, NavigationEnd, ActivatedRoute } from '@angular/router';\r\nimport { MatIconRegistry } from \"@angular/material/icon\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { filter } from 'rxjs/operators';\r\nimport { CommunicationService } from './shared/services/communication.service';\r\nimport { LandingPageComponent } from './views/landing-page/landing-page.component';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from './shared/dialogs/confirmation/confirmation-dialog.component';\r\nimport { LogInOutComponent } from './security/loginout/loginout.component';\r\nimport { KeepAliveService } from './shared/services/keep-alive.service';\r\nimport { ConfirmationDialogEnums } from './shared/enums/confirmation-dialog.enum';\r\nimport { SettingsService } from './shared/services/settings.service';\r\nimport { Settings } from './shared/models/settings.model';\r\nimport { BrowserStorageService } from './shared/services/browserstorage.service';\r\nimport { BrowserStorageEnums } from './shared/enums/browserstorage.enum'; \r\nimport { UtilityHelper } from './shared/utility.helper';\r\nimport { FieldDefinitionService } from './shared/services/field-definition.service';\r\nimport { NavigationService } from './shared/services/navigation.service';\r\nimport { ScriptableBaseComponent } from './shared/components/scriptable-base/scriptable-base.component';\r\nimport { QueryParamsService } from './shared/services/query-params.service';\r\nimport { AttachmentService } from './shared/services/attachment.service';\r\nimport { FormFieldTypeAndNameService } from './shared/services/form-field-type-and-name.service';\r\nimport { CurrentSiteService } from './shared/services/current-site.service';\r\nimport { ItemTypeEnum } from './shared/enums/item-type.enum';\r\nimport { Subscription } from 'rxjs';\r\n\r\ndeclare var $: any;\r\n\r\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n standalone: false\n})\r\nexport class AppComponent extends ScriptableBaseComponent implements OnInit {\r\n // Properties.\r\n millsecondsSinceLastInteraction = 0;\r\n showHeader = true;\r\n @HostListener('keyup', ['$event'])\r\n @HostListener('window:mousemove', ['$event'])\r\n @HostListener('document:ResetIdleTimer', ['$event'])\r\n resetTimer(event: any) {\r\n this.millsecondsSinceLastInteraction = 0;\r\n }\r\n\r\n //VNEXT-1054: KLW - Changes for the interim homepage\r\n @ViewChild('logInOutComponentId') logInOutComponent: LogInOutComponent;\r\n\r\n private currentUrl: string = '/';\r\n public skipLink: string = null;\r\n private settings: Settings;\r\n\r\n public constructor(\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n public currentUserService: CurrentUserService,\r\n public currentSiteService: CurrentSiteService, //VNEXT-1066: KLW - Code for Banner implementation\r\n private communicationService: CommunicationService,\r\n private keepAliveService: KeepAliveService,\r\n public dialog: MatDialog,\r\n private matIconRegistry: MatIconRegistry,\r\n private domSanitizer: DomSanitizer,\r\n private settingsService: SettingsService,\r\n private localStorageService: BrowserStorageService, \r\n private fieldDefinitionService: FieldDefinitionService,\r\n private navigationService: NavigationService,\r\n private queryParamsService: QueryParamsService,\r\n private renderer: Renderer2,\r\n private dateAdapter: DateAdapter,\r\n private attachmentService: AttachmentService,\r\n private formFieldTypeAndNameService: FormFieldTypeAndNameService,\r\n elForBaseClass: ElementRef,\r\n ) {\r\n super(elForBaseClass);\r\n\r\n this.router.events.pipe(\r\n filter(e => e instanceof NavigationStart)\r\n ).subscribe((e: NavigationStart) => {\r\n let url = e.url.toLowerCase();\r\n if (url.indexOf('maxhealthcheck') > 0 || url.indexOf('printable-form') > 0) {\r\n this.showHeader = false;\r\n }\r\n\r\n //VNEXT-235: KLW - This is to capture the refresh of a page and depending on what is contained in the URL, then redirect to the URL that represents the new\r\n // workflow or form instance\r\n if (e.url.toLowerCase().indexOf((\"design-workflow/0?folderId\").toLowerCase()) > 0) {\r\n let workflowURLRefresh: string = localStorageService.get(BrowserStorageEnums.NEW_WORKFLOW_REFRESH);\r\n\r\n if (workflowURLRefresh) {\r\n this.router.navigate([workflowURLRefresh]);\r\n this.clearWorkflowURLRefresh();\r\n }\r\n }\r\n\r\n if (e.url.toLowerCase().indexOf((\"design/0?folderId\").toLowerCase()) > 0) {\r\n let formInstanceURLRefresh: string = localStorageService.get(BrowserStorageEnums.NEW_FORM_INSTANCE_REFRESH);\r\n\r\n if (formInstanceURLRefresh) {\r\n this.router.navigate([formInstanceURLRefresh]);\r\n this.clearFormInstanceURLRefresh();\r\n }\r\n }\r\n\r\n //VNEXT-235: KLW - Be sure to clear any saved URLs after every route to prevent possible bugs \r\n this.clearWorkflowURLRefresh();\r\n this.clearFormInstanceURLRefresh();\r\n\r\n localStorageService.set(BrowserStorageEnums.GOTO, e.url);\r\n });\r\n\r\n this.router.events.pipe(\r\n filter(e => e instanceof NavigationEnd)\r\n ).subscribe((e: NavigationEnd) => {\r\n this.navigationService.pushOnUrl(this.currentUrl);\r\n this.currentUrl = e.url;\r\n let nav = this.router.getCurrentNavigation();\r\n if (nav.extras.state != null && nav.extras.state.menuText != null) {\r\n localStorageService.set(BrowserStorageEnums.PREVNAVBREADCRUMBSLABEL, nav.extras.state.menuText);\r\n } else {\r\n localStorageService.set(BrowserStorageEnums.PREVNAVBREADCRUMBSLABEL, 'Go Back');\r\n }\r\n });\r\n\r\n // this.matomoInjector.init(\r\n // environment.matomoConfig.url,\r\n // environment.matomoConfig.id\r\n // );\r\n \r\n\r\n // Make additional icons available to the tag.\r\n this.loadAppMatIcons();\r\n\r\n this.settingsService.loadSettings().then(response => {\r\n this.settings = response;\r\n this.listenForTimeout();\r\n });\r\n\r\n // Initialize the grid field type and name service (which cannot get all required parameters injected, at least not without a null injected value exception).\r\n this.formFieldTypeAndNameService.initializeFieldTypesAndNames(this.renderer, this.dateAdapter, this.attachmentService, this.dialog);\r\n }\r\n\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n setTimeout(() => {\r\n // PJH - VNEXT-591 - added isForcedLogout check to prevent call to\r\n // backend when the user has been logged out\r\n if (this.applicationIsAvailableToTheUser() && !this.currentUserService.isForcedLogout) {\r\n // Retrieve field definitions so they can be cached.\r\n this.fieldDefinitionService.getAll().then(fieldDefinitions => {\r\n // Note: nothing more to do here by design.\r\n });\r\n }\r\n }, 100);\r\n }\r\n\r\n private applicationIsAvailableToTheUser() {\r\n return this.router.url !== '/unavailable';\r\n }\r\n\r\n // Getter method(s).\r\n public get ShowAppChrome(): boolean {\r\n return !this.queryParamsService.HideAppChrome;\r\n }\r\n\r\n public blockDrop(ev: DragEvent) {\r\n UtilityHelper.blockDrop(ev);\r\n }\r\n\r\n //VNEXT-1054: KLW - Changes for the interim homepage\r\n //public login() {\r\n // this.logInOutComponent.logIn();\r\n //}\r\n\r\n //VNEXT-235: KLW - Methods to set and clear the URLs for new workflow and form instances\r\n public setWorkflowURLRefresh(url: string) {\r\n this.localStorageService.set(BrowserStorageEnums.NEW_WORKFLOW_REFRESH, url);\r\n }\r\n\r\n public clearWorkflowURLRefresh() {\r\n this.localStorageService.set(BrowserStorageEnums.NEW_WORKFLOW_REFRESH, '');\r\n }\r\n\r\n public setFormInstanceURLRefresh(url: string) {\r\n this.localStorageService.set(BrowserStorageEnums.NEW_FORM_INSTANCE_REFRESH, url);\r\n }\r\n\r\n public clearFormInstanceURLRefresh() {\r\n this.localStorageService.set(BrowserStorageEnums.NEW_FORM_INSTANCE_REFRESH, '');\r\n }\r\n\r\n public appClick(): void {\r\n return;\r\n } \r\n\r\n //VNEXT-1066: KLW - Code for Banner implementation\r\n public get ShowBanner(): boolean {\r\n return this.LeftText != '' ||\r\n this.CenterText != '' ||\r\n this.RightText != '';\r\n }\r\n\r\n //VNEXT-1181: KLW - For Banner Color based on environment implementation\r\n public get BannerColor(): string {\r\n let retVal: string = '#000030';\r\n\r\n if (environment.bannerColor)\r\n retVal = environment.bannerColor;\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n public get SealImagePath(): string {\r\n return \"P:\\TFS_NEW\\DotNetCore\\Solutions\\Collect.vNext\\Collect.vNext.UI\\src\\assets\\images\\mono-seal.png\";\r\n }\r\n\r\n public get FileType(): string {\r\n return ItemTypeEnum.FILE;\r\n }\r\n\r\n public get LeftText(): string {\r\n let retVal: string = '';\r\n\r\n if (this.currentSiteService.Site)\r\n if (this.currentSiteService.Site.leftBannerText)\r\n retVal = this.currentSiteService.Site.leftBannerText;\r\n\r\n return retVal;\r\n }\r\n\r\n public get CenterText(): string {\r\n let retVal: string = '';\r\n\r\n if (this.currentSiteService.Site)\r\n if (this.currentSiteService.Site.centerBannerText)\r\n retVal = this.currentSiteService.Site.centerBannerText;\r\n\r\n return retVal;\r\n }\r\n\r\n public get RightText(): string {\r\n let retVal: string = '';\r\n\r\n if (this.currentSiteService.Site)\r\n if (this.currentSiteService.Site.rightBannerText)\r\n retVal = this.currentSiteService.Site.rightBannerText;\r\n\r\n return retVal;\r\n }\r\n\r\n public get BackgroundColor(): string {\r\n let retVal: string = '';\r\n\r\n if (this.currentSiteService.Site)\r\n if (this.currentSiteService.Site.backgroundColor)\r\n retVal = this.currentSiteService.Site.backgroundColor;\r\n\r\n return retVal;\r\n }\r\n\r\n public get TextColor(): string {\r\n let retVal: string = '';\r\n\r\n if (this.currentSiteService.Site)\r\n if (this.currentSiteService.Site.textColor)\r\n retVal = this.currentSiteService.Site.textColor;\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n // handler for the template's activate event\r\n // start listening for updates to the skipLink.\r\n // It's possible that this isn't ultimately needed but leaving it for now as a kind\r\n // of catch all. Some navigation events in the application reset focus such that hitting\r\n // TAB takes the user to the Skip Nav link, and so we need to make sure it gets set properly\r\n // but perhaps these cases should be explored to eliminate such resetting of focus...if\r\n // we got to that point, we'd only need to set the skip link on the inititial loading\r\n // of AppComponent and not need to listen for updates\r\n public doOnActiviation(component: any) {\r\n //console.log(component.route.snapshot);\r\n //var url = component.route.snapshot._routerState.url.split('#')[0];\r\n //this.skipLink = `${url}#main-content`;\r\n\r\n this.communicationService.skipLinkChanged.subscribe(newLink => {\r\n this.skipLink = newLink;\r\n });\r\n\r\n if (!(component instanceof LandingPageComponent)) {\r\n this.showFooter = false;\r\n return;\r\n }\r\n else {\r\n const landingPageComponent: LandingPageComponent = component;\r\n\r\n this.showFooter = true;\r\n\r\n this.loginEmitterSubscription = landingPageComponent.loginEmitter.subscribe(() => {\r\n this.logInOutComponent.logIn();\r\n });\r\n }\r\n }\r\n\r\n public loginEmitterSubscription: Subscription;\r\n public showFooter: boolean = false;\r\n\r\n public get ShowFooter(): boolean {\r\n return this.showFooter;\r\n }\r\n\r\n public deactivateAll() {\r\n\r\n this.showFooter = false;\r\n\r\n if (this.loginEmitterSubscription)\r\n this.loginEmitterSubscription.unsubscribe();\r\n }\r\n\r\n //VNEXT-1066: KLW - Property to get site name\r\n public get SiteName() {\r\n return environment.sitename;\r\n }\r\n\r\n // If no user activity detected after n minutes, logs the user out after giving them a warning\r\n private listenForTimeout(): void {\r\n let interval = 60 * this.settings.interval; // check every set interval time in minutes\r\n let timeoutAfter = interval * this.settings.timeoutAfter; // timeout after x minutes of inactivity \r\n let warn = interval * this.settings.warn; // warn the user after x minutes\r\n\r\n let timeout = setInterval(() => {\r\n if (this.currentUserService.user != null) {\r\n this.millsecondsSinceLastInteraction += interval;\r\n if (this.millsecondsSinceLastInteraction >= timeoutAfter) {\r\n clearInterval(timeout);\r\n this.logInOutComponent.logOut();\r\n } else if (this.millsecondsSinceLastInteraction == warn) {\r\n let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n data: new ConfirmationDialogModel(\r\n `Session Expiration Warning`,\r\n `Your session is about to expire. Do you wish to keep using the application?`,\r\n { minutes: this.settings.timeoutAfter - this.settings.warn, seconds: 0, hideNo: false, dialogType: ConfirmationDialogEnums.WARNING }\r\n )\r\n });\r\n dialogRef.disableClose = true;\r\n dialogRef.afterClosed().subscribe(yes => {\r\n if (yes) {\r\n this.millsecondsSinceLastInteraction = 0;\r\n } else {\r\n clearInterval(timeout);\r\n this.logInOutComponent.logOut();\r\n }\r\n });\r\n } else {\r\n //console.log(this.millsecondsSinceLastInteraction / 1000 + ' seconds have passed since user last moved mouse...');\r\n this.keepAliveService.pingTheBackend();\r\n }\r\n }\r\n }, interval);\r\n }\r\n\r\n private loadAppMatIcons(): void {\r\n // Load SVG icons, giving them names that allow them to be used in the tag.\r\n //\r\n // Example usage within a component's .html file:\r\n // \r\n\r\n let bellFillUrl: SafeResourceUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bell-fill.svg\");\r\n this.matIconRegistry.addSvgIcon(\"bell-fill\", bellFillUrl);\r\n\r\n let bellOutlineUrl: SafeResourceUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bell.svg\");\r\n this.matIconRegistry.addSvgIcon(\"bell-outline\", bellOutlineUrl);\r\n\r\n let notificationAddUrl: SafeResourceUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/notification-add.svg\");\r\n this.matIconRegistry.addSvgIcon(\"notification-add\", notificationAddUrl);\r\n\r\n let puzzlePieceUrl: SafeResourceUrl =\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/puzzle_piece.svg\");\r\n this.matIconRegistry.addSvgIcon(\"puzzle_piece\", puzzlePieceUrl);\r\n\r\n let trashUrl: SafeResourceUrl =\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/trash.svg\");\r\n this.matIconRegistry.addSvgIcon(\"trash\", trashUrl);\r\n\r\n this.matIconRegistry.addSvgIcon(\"plug\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/plug.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"pencil\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/pencil.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"logic\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/logic.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"predicate-logic\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/predicate-logic.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"predicate-logic-2\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/predicate-logic-2.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"footnote\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/text-footnote-svgrepo-com.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-star\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-star.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-star-filled\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-star-filled.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-star-filled-blue\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-star-filled-blue.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"unlock\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-unlock.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-grid\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-grid.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-forward\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-forward.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-tools\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-tools.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-arrows-expand\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-arrows-expand.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-flag\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-flag.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-calculator\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-calculator.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"bootstrap-recycle\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/bootstrap-recycle.svg\"));\r\n\r\n // pharv\r\n this.matIconRegistry.addSvgIcon(\"is-not-site-admin\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/file-person.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"is-site-admin\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/file-person-fill.svg\"));\r\n\r\n // pharv for VNEXT-6\r\n this.matIconRegistry.addSvgIcon(\"person-fill\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/person-fill.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"person-fill-blue\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/person-fill-blue.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"person-fill-lightgrey\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/person-fill-lightgrey.svg\"));\r\n\r\n // Vertical line.\r\n this.matIconRegistry.addSvgIcon(\"vertical-line\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/vertical-line.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"microsoft-excel\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/microsoft-excel-2019.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"magic-folder\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/magic-folder-2.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"magic-form\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/magic-form-2.svg\"));\r\n\r\n // Material SVG icons (also available in other formats).\r\n this.matIconRegistry.addSvgIcon(\"material-new-folder\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-new-folder.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-post-add\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-post-add.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-file-upload\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-file-upload.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-file-download\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-file-download.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-publish\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-publish.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-export-notes\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-export-notes.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"material-save\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-save.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-restart-alt\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-restart-alt.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-print\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-print.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-file-copy\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-file-copy.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"material-north\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-north.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-south\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-south.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-decimal-increase\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-decimal-increase.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"material-decimal-increase-24x24\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/material-decimal-increase-24x24.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"black-and-white-excel\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/black-and-white-excel.svg\"));\r\n\r\n this.matIconRegistry.addSvgIcon(\"link-chain\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/svgrepo-link-chain.svg\"));\r\n this.matIconRegistry.addSvgIcon(\"unlink-chain\",\r\n this.domSanitizer.bypassSecurityTrustResourceUrl(\"../assets/svg/svgrepo-unlink-chain.svg\"));\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\r\nimport { UserClaims } from '../models/user-claims.model';\r\nimport { ClaimService } from '../services/claim.service';\r\nimport { Logging } from '../logging';\r\n\n@Injectable()\r\nexport class ClaimResolver implements Resolve {\r\n constructor(private claimService: ClaimService, private router: Router) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\n return this.claimService.getClaims().then(claims => {\n return claims;\n });\n }\r\n}\n","import { Injectable } from '@angular/core';\nimport { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\n\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\nimport { CurrentSiteService } from '../services/current-site.service';\r\nimport { DataCollectionService } from '../services/data-collection.service';\r\n\n@Injectable()\r\nexport class DataCollectionResolver implements Resolve {\r\n constructor(\r\n private dataCollectionService: DataCollectionService,\r\n private currentSiteService: CurrentSiteService,\r\n private router: Router) { }\r\n\n // The resolve method here acts as a guard.\n // A route guard wouldn't work because route guards get fired _before_ resolvers\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\r\n let id = route.params['id'];\r\n // If the current site has already been set, just return it without going to the server\r\n if (this.currentSiteService.isCurrentSite(id)) {\r\n return new Promise((resolve, reject) => {\n return resolve(this.currentSiteService.Site)\n })\r\n } else {\n return this.dataCollectionService.get(id).then(site => {\n if (site && site.id > 0) {\r\n this.currentSiteService.Site = site;\n return this.currentSiteService.Site;\r\n } else {\n this.router.navigate(['/404'], { skipLocationChange: true });\n return null;\r\n }\n });\r\n }\n }\r\n}\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpResponse, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { Menu } from '../models/navigation/menu.model';\r\nimport { environment } from '../../../environments/environment';\r\nimport { ReturnStatement } from '@angular/compiler';\r\n\r\n//import 'rxjs/add/operator/toPromise';\r\n\r\n@Injectable()\r\nexport class MenuService {\r\n private serviceUrl = '';\r\n\r\n constructor(private http: HttpClient) {\r\n this.serviceUrl = environment.apiUrl + \"api/collection/\";\r\n }\n\r\n getAll(): Promise {\n var url = this.serviceUrl;\n\n url = 'assets/data/menus.json';\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then((response: Menu[]) => {\r\n var navs: Menu[];\r\n navs = response;\r\n return navs;\r\n })\r\n .catch(this.handleError);\r\n }\n\n get(id): Promise {\n var url = this.serviceUrl;\n\n url = 'assets/data/menus.json';\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then((response: Menu[]) => {\n var navs: Menu[];\n navs = response;\r\n var nav = navs.filter(x => x.id == id)[0];\n\n return nav;\r\n })\r\n .catch(this.handleError);\r\n }\n\r\n private handleError(error: any): Promise {\r\n return Promise.reject(error.message || error);\r\n }\n\r\n public loadAppMenu(): Promise {\r\n return this.get('app');\r\n }\r\n\r\n public loadCollectionMenu(): Promise {\r\n return this.get('collection');\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\nimport { MenuService } from '../services/menu.service';\r\nimport { Menu } from '../models/navigation/menu.model';\r\nimport { Observable } from 'rxjs';\r\n\n@Injectable()\r\nexport class MenuResolver implements Resolve {\r\n constructor(private menuService: MenuService, private router: Router) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\r\n var menu = route.data[\"menu\"];\n\n return this.menuService.get(menu).then(response => {\n return response;\n });\r\n }\r\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { Menu } from '../../shared/models/navigation/menu.model';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { UserClaims } from '../../shared/models/user-claims.model';\r\n\n@Component({\n selector: 'app-admin',\n templateUrl: './admin.component.html',\n styleUrls: ['./admin.component.scss'],\n standalone: false\n})\nexport class AdminComponent implements OnInit {\n\n @Input()\n navMenu: Menu;\n\n userClaims: UserClaims;\n\n constructor(private route: ActivatedRoute) { }\n\n ngOnInit() {\n this.route.data\r\n .subscribe((data: { navMenu: Menu, claims: UserClaims }) => {\r\n this.navMenu = data.navMenu;\n this.userClaims = data.claims;\r\n });\n }\n\n}\n","\n","import { Component, OnInit, Input, SimpleChange } from '@angular/core';\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { Menu } from '../../shared/models/navigation/menu.model';\r\nimport { UserClaims } from '../../shared/models/user-claims.model';\r\nimport { Logging } from '../../shared/logging';\r\n\r\ndeclare let $: any;\r\n\r\n@Component({\n selector: 'home',\n templateUrl: './home.component.html',\n styleUrls: ['./home.component.scss'],\n standalone: false\n})\r\n\r\nexport class HomeComponent implements OnInit {\r\n @Input()\n public navMenu: Menu;\n\n public userClaims: UserClaims;\n\r\n constructor(private route: ActivatedRoute) {\r\n }\r\n\r\n ngOnInit(): void {\n this.route.data\r\n .subscribe((data: { navMenu: Menu, claims: UserClaims }) => {\r\n this.navMenu = data.navMenu;\n this.userClaims = data.claims;\r\n });\r\n }\r\n}\n","\n","
\r\n
\r\n {{Message}}\r\n
\r\n\r\n
\r\n

\r\n 2/10/2025: OMB Collect is currently offline for scheduled maintenance.\r\n \r\n

\r\n

\r\n Thank you,
\r\n The OMB Collect Team\r\n

\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Location } from '@angular/common';\nimport { ActivatedRouteSnapshot, ActivatedRoute, Router } from '@angular/router';\r\n\n@Component({\n selector: 'app-http-error',\n templateUrl: './http-error.component.html',\n styleUrls: ['./http-error.component.scss'],\n standalone: false\n})\nexport class HttpErrorComponent implements OnInit {\n private message: string;\r\n private url: string;\n constructor(\r\n private location: Location,\r\n private route: ActivatedRoute,\r\n private router: Router\r\n ) { }\n\n ngOnInit() {\n this.url = this.router.url;\r\n if (this.url == '/404') {\n this.message = 'Not Found';\r\n }\r\n this.updateUrlStateToRoot();\n }\r\n\r\n public get Message(): string {\r\n return this.message;\r\n }\r\n\r\n public get Url(): string {\r\n return this.url;\r\n }\r\n // This updates the url without navigating to it.\r\n // Enables the user to reload and go to landing page\r\n private updateUrlStateToRoot() {\r\n this.location.replaceState('/');\r\n }\n\n}\n","import { Component, OnInit, Input, ElementRef } from '@angular/core';\r\n\r\nimport { Menu } from '../../shared/models/navigation/menu.model';\r\nimport { DataCollection } from '../../shared/models/site-content/data-collection.model';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { UserClaims } from '../../shared/models/user-claims.model';\r\nimport { ScriptableBaseComponent } from '../../shared/components/scriptable-base/scriptable-base.component';\r\nimport { AdditionalElementInfo } from '../../shared/models/component-scripting/additional-element-info.model';\r\nimport { QueryParamsService } from '../../shared/services/query-params.service';\r\n\r\n@Component({\n selector: 'app-site',\n templateUrl: './site.component.html',\n styleUrls: ['./site.component.scss'],\n standalone: false\n})\r\nexport class SiteComponent extends ScriptableBaseComponent implements OnInit {\r\n // Inputs and properties.\r\n @Input()\r\n navMenu: Menu;\r\n\r\n @Input()\r\n currentSite: DataCollection;\r\n\r\n private userClaims: UserClaims;\r\n\r\n // Constructor.\r\n public constructor(private route: ActivatedRoute, elForBaseClass: ElementRef, private queryParamsService: QueryParamsService) {\r\n super(elForBaseClass);\r\n //this.element('#siteSideNavContainer').hasMatListItems(new AdditionalElementInfo('span.ng-star-inserted'));\r\n this.element('#siteSideNavContainer').hasMatListItems(new AdditionalElementInfo({ innerTextSelector: 'span.ng-star-inserted' }));\r\n }\r\n\r\n // Life cycle method(s).\r\n public ngOnInit() {\r\n super.ngOnInit();\r\n\r\n // Subscribe to route changes.\r\n this.route.data\r\n .subscribe((data: { navMenu: Menu, claims: UserClaims }) => {\r\n this.navMenu = data.navMenu;\r\n this.userClaims = data.claims;\r\n });\r\n\r\n this.route.data\r\n .subscribe((data: { currentSite: DataCollection }) => {\r\n this.currentSite = data.currentSite;\r\n this.currentSite.foo();\r\n });\r\n }\r\n\r\n // Getter method(s).\r\n public get UserClaims(): UserClaims {\r\n return this.userClaims;\r\n }\r\n}\r\n","\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n//import { JiraComponent } from \"./jira/jira.component\";\r\nimport { ClaimGuard } from './route-guards/claim.route-guard';\r\nimport { HomePageRouteGuard } from './route-guards/home-page.route-guard';\r\nimport { UnsavedChangesGuard } from './route-guards/unsaved-changes.route-guard';\r\nimport { ClaimResolver } from './shared/resolvers/claim.resolver';\r\nimport { DataCollectionResolver } from './shared/resolvers/data-collection.resolver';\r\nimport { FormInstanceResolver } from './shared/resolvers/form-instance.resolver';\r\nimport { MenuResolver } from './shared/resolvers/menu.resolver';\r\nimport { AdminComponent } from './views/admin/admin.component';\r\nimport { HomeComponent } from \"./views/home/home.component\";\r\nimport { HttpErrorComponent } from './views/http-error/http-error.component';\r\nimport { LandingPageComponent } from './views/landing-page/landing-page.component';\r\nimport { PrintableFormComponent } from './views/site/form/printable-form.component';\r\nimport { SiteComponent } from './views/site/site.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: LandingPageComponent,\r\n },\r\n {\r\n path: 'manageUserNotifications',\r\n component: LandingPageComponent,\r\n },\r\n {\r\n path: '404',\r\n component: HttpErrorComponent\r\n },\r\n {\r\n path: 'unavailable',\r\n component: HttpErrorComponent\r\n },\r\n {\r\n path: \"home\",\r\n component: HomeComponent,\r\n resolve: { navMenu: MenuResolver, claims: ClaimResolver },\r\n data: { menu: \"app\" },\r\n loadChildren: () => import('./modules/home.module').then(\r\n module => module.HomeModule\r\n )\r\n },\r\n {\r\n path: 'admin',\r\n component: AdminComponent,\r\n resolve: { navMenu: MenuResolver, claims: ClaimResolver },\r\n data: { menu: \"admin\", requiredClaim: 'CanViewAdmin' },\r\n canActivate: [ClaimGuard],\r\n loadChildren: () => import('./modules/admin.module').then(\r\n module => module.AdminModule\r\n )\r\n },\r\n {\r\n path: 'site/:id',\r\n component: SiteComponent,\r\n resolve: { currentSite: DataCollectionResolver, navMenu: MenuResolver, claims: ClaimResolver },\r\n data: { menu: \"collection\" },\r\n loadChildren: () => import('./modules/site.module').then(\r\n module => module.SiteModule\r\n )\r\n },\r\n {\r\n // No ClaimGuard here since api will only return FormInstances the user has access to\r\n path: 'form/:id',\r\n component: PrintableFormComponent,\r\n resolve: { formInstance: FormInstanceResolver }\r\n }\r\n];\r\n\r\n@NgModule({\r\n // For onSameUrlNavigation option see https://angular.io/api/router/ExtraOptions#onSameUrlNavigation\r\n // basically it allows a route to be reloaded when it is the active route, whereas the default is to\r\n // ignore attempts to reload the active route\r\n // For scrollPositionRestoration option see https://stackoverflow.com/questions/39601026/angular-2-scroll-to-top-on-route-change (Answer titled \"Angular 6.1 and later\")\r\n imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload', scrollPositionRestoration: 'enabled' })],\r\n exports: [RouterModule],\r\n providers: [ClaimGuard, UnsavedChangesGuard, HomePageRouteGuard]\r\n})\r\nexport class AppRoutingModule { }\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpResponse, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { environment } from '../../environments/environment';\r\nimport { CurrentUserService } from '../security/current-user.service';\r\n\r\n//import 'rxjs/add/operator/toPromise';\r\n\r\n@Injectable()\r\nexport class CasService {\r\n private casUrl = '';\r\n\r\n constructor(private http: HttpClient, private currentUserService: CurrentUserService) {\r\n this.casUrl = environment.loginSiteUrl + \"frameworkapi/cas/proxyticket\";\r\n\r\n //console.log(this._user);\r\n }\r\n\r\n //public get http(): Http {\r\n // return this.injector.get(Http);\r\n //}\r\n\r\n public getProxyTicket(serviceUrl: string): Promise {\r\n var url = this.casUrl + \"?serviceUrl=\" + serviceUrl;\r\n console.log(url);\r\n return this.http.get(url)\r\n .toPromise()\r\n .then((response: Response) => {\r\n console.log(\"CAS ticket return: \" + response.body.toString());\r\n return response.body.toString();\r\n })\r\n .catch((error: Response) => {\r\n var responseData = JSON.stringify(error)\r\n //this.currentUserService.logout();\r\n return Promise.reject(error.statusText); //??\r\n });\r\n }\r\n\r\n public get(targetUrl: string): Promise {\r\n return this.http.get(targetUrl)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch((error: Response) => {\r\n //if (error.status != 401) {\r\n // return Promise.reject(\"Can't communicate with \" + url + \" (\" + error.statusText) + \")\";\r\n //}\r\n var url: string;\r\n url = targetUrl.substr(0, targetUrl.indexOf(\"?\") == 0 ? targetUrl.length : targetUrl.indexOf(\"?\"));\r\n console.log(\"url=\" + url);\r\n this.getProxyTicket(url).then(ticket => {\r\n console.log(\"ticket=\" + ticket);\r\n this.http.get(url + \"?ticket=\" + ticket)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch((error: HttpErrorResponse) => {\r\n if (error.headers.keys.length == 0 && error.status == 0) {\r\n return Promise.reject(\"Can't call \" + url + \", probably because CORS is not enabled for \" + this.currentUserService.getDomain(url));\r\n }\r\n else {\r\n return Promise.reject(\"Can't make the call to \" + this.currentUserService.getDomain(url) + \" (\" + error.statusText + \")\");\r\n }\r\n });\r\n }).catch((error: Response) => {\r\n return Promise.reject(\"Can't generate CAS proxy ticket.\" + \" (\" + error.statusText + \")\");\r\n });\r\n });\r\n }\r\n\r\n public simpleGet(targetUrl: string, ticket: string): Promise {\r\n var url: string = targetUrl;\r\n if (targetUrl.indexOf(\"?\") == -1) {\r\n url += \"?ticket=\" + ticket;\r\n }\r\n else {\r\n url += \"&ticket=\" + ticket;\r\n }\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch((error: HttpErrorResponse) => {\r\n var domain: string = this.currentUserService.getDomain(url);\r\n if (error.headers.keys.length == 0 && error.status == 0) {\r\n return Promise.reject(\"Can't call \" + url + \", probably because CORS is not enabled for \" + domain);\r\n }\r\n else {\r\n return Promise.reject(\"Can't make the call to \" + domain + \" (\" + error.statusText + \")\");\r\n }\r\n });\r\n\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport {\r\n HttpEvent, HttpInterceptor, HttpHandler, HttpRequest\r\n} from '@angular/common/http';\r\n\r\nimport { Observable } from 'rxjs';\r\n\r\n// Add credentials to every request.\r\n// Credit to https://weblog.west-wind.com/posts/2019/Apr/07/Creating-a-custom-HttpInterceptor-to-handle-withCredentials\r\n\r\n@Injectable()\r\nexport class HttpRequestInterceptor implements HttpInterceptor {\r\n\r\n intercept(req: HttpRequest, next: HttpHandler):\r\n Observable> {\r\n\r\n // console.log(\"interceptor: \" + req.url);\r\n req = req.clone({\r\n withCredentials: true\r\n });\r\n\r\n return next.handle(req);\r\n }\r\n}\r\n\r\n","//loader.interceptor.ts\nimport { Component, OnInit } from '@angular/core';\nimport { LoaderService } from '../../services/loader.service';\n\ndeclare let $: any;\n\n@Component({\n selector: 'app-loading-spinner',\n templateUrl: './loading-spinner.component.html',\n styleUrls: ['./loading-spinner.component.scss'],\n standalone: false\n})\nexport class LoadingSpinnerComponent implements OnInit {\n\n public loadingTimeoutId: any; \n private showLoadingSpinner: boolean = true;\n public pollingTimeoutId: any;\n private showPollingSpinner: boolean = false;\n\n constructor(private loaderService: LoaderService) {\r\n\r\n this.showLoadingMask();\r\n\n this.loaderService.isLoading.subscribe((v) => {\n if (v) {\n if (!this.showLoadingSpinner) {\n this.showLoadingSpinner = true;\n this.loadingTimeoutId = setTimeout(this.showLoadingMask, 600);\n } \r\n }\n else {\n this.hideLoadingMask();\n clearTimeout(this.loadingTimeoutId);\n this.showLoadingSpinner = false;\n }\n });\n\n // PH: Added this to support polling operations where we want \"manually\" start the spinner\n // animation when polling starts, and stop it when polling completes.\n // Usage:\n // Have LoaderService injected where you need it, then before starting the long-running call do...\n // this.loaderService.isPolling.next(true);\n // and then after polling completes do...\n // this.loaderService.isPolling.next(false);\n this.loaderService.isPolling.subscribe((v) => {\n if (v) {\n if (!this.showPollingSpinner) {\n this.showPollingSpinner = true;\n this.pollingTimeoutId = setTimeout(this.showPollingMask, 1000);\r\n }\r\n }\n else {\n this.hidePollingMask();\n clearTimeout(this.pollingTimeoutId);\n this.showPollingSpinner = false;\n }\n });\n }\n\n\n ngOnInit() {\n }\n\n private showLoadingMask() {\n $('#loadingMask').modal();\n }\n private hideLoadingMask() {\n $('#loadingMask').modal('hide');\n }\n\n private showPollingMask() {\n $('#pollingMask').modal();\n }\n private hidePollingMask() {\n $('#pollingMask').modal('hide');\n }\n}\n","
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","\r\n \r\n
\r\n {{ menuTitle() }} ({{uppercaseSiteWorkflowState}})\r\n \r\n arrow_left\r\n \r\n \r\n menu\r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n {{item.icon}}\r\n \r\n\r\n \r\n
{{item.text}}
\r\n \r\n\r\n \r\n {{item.icon}}\r\n \r\n\r\n \r\n
{{item.text}}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n","import { Component, OnInit, SimpleChange, Input, OnChanges, EventEmitter, Output, HostBinding } from '@angular/core';\r\nimport { Menu } from '../../models/navigation/menu.model';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n\r\nimport { MenuItem } from '../../models/navigation/menu-item.model';\r\nimport { CommunicationService } from '../../services/communication.service';\r\nimport { UserClaims } from '../../models/user-claims.model';\r\nimport { BrowserStorageService } from '../../services/browserstorage.service';\r\nimport { BrowserStorageEnums } from '../../enums/browserstorage.enum';\r\nimport { Logging } from '../../logging';\r\nimport { DataCollectionStatus } from '../../models/data-collection-status.model';\r\nimport { UtilityHelper } from '../../utility.helper';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { NavigationService } from '../../services/navigation.service';\r\nimport { CurrentSiteService } from '../../services/current-site.service';\r\nimport { QueryParamsService } from '../../services/query-params.service';\r\n\r\ndeclare let $: any;\r\n\r\n// TODO: Consider using ListKeyManager from a11y package to manage menu's accessibility\r\n@Component({\n selector: 'app-side-nav-container',\n templateUrl: './side-nav-container.component.html',\n styleUrls: ['./side-nav-container.component.scss'],\n standalone: false\n})\r\nexport class SideNavContainerComponent implements OnInit, OnChanges {\r\n\r\n public menuOption: string;\r\n public opened: boolean = true;\r\n\r\n @Input()\r\n menu: Menu;\r\n\r\n @Input()\r\n userClaims: UserClaims;\r\n\r\n @Input()\r\n title: string;\r\n\r\n @Input()\r\n status: string;\r\n\r\n private userToggled: boolean = false;\r\n\r\n // matches $sidenav-width in the scss file. See its use below for comment on why it's needed\r\n // (For reference: we may be able to pull the scss variable into the TS so wouldn't have to define it twice:\r\n // see https://mattferderer.com/use-sass-variables-in-typescript-and-javascript)\r\n private readonly SIDENAV_WIDTH: string = '250px';\r\n\r\n public constructor(\r\n public router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private communicationService: CommunicationService,\r\n private browserStorageService: BrowserStorageService,\r\n private navigationService: NavigationService,\r\n private currentSiteService: CurrentSiteService,\r\n private queryParamsService: QueryParamsService) {\r\n }\r\n\r\n public ngOnInit() {\r\n let url = this.router.url.split('#')[0]; // strip off any anchor ref from url\r\n this.communicationService.emitChangeToSkipNavLink(url);\r\n this.setOpenedState();\r\n this.setMenuExpansion(this.opened);\r\n }\r\n\r\n public ngOnChanges(changes: { [propName: string]: SimpleChange }) {\r\n if (changes['menu'] && changes['menu'].previousValue != changes['menu'].currentValue) {\r\n this.menu.navItems.forEach(x => {\r\n if (x.text == \"Go Back\") { // Look into adding a type for this\r\n x.route = this.browserStorageService.get(BrowserStorageEnums.PREV);\r\n this.browserStorageService.set(BrowserStorageEnums.PREVNAVBREADCRUMBSURL, x.route); // TODO - this gets set before BreadcrumbsComponent reads it - need to address this\r\n }\r\n });\r\n\r\n this.selectCurrentRoute();\r\n }\r\n }\r\n\r\n // Getter methods.\r\n public menuTitle(): string { \r\n //return this.title ? this.title : this.menu.title;\r\n\r\n return \"Site Menu\";\r\n }\r\n\r\n public get siteWorkflowState(): string {\r\n let workflowState: string = this.status;\r\n\r\n if ((this.currentSiteService.Site != null) && (this.currentSiteService.Site.folders != null) && (this.currentSiteService.Site.folders[0] != null) && (this.currentSiteService.Site.folders[0].currentWorkflowState != null))\r\n workflowState = this.currentSiteService.Site.folders[0].currentWorkflowState;\r\n\r\n return workflowState;\r\n }\r\n public get uppercaseSiteWorkflowState(): string {\r\n let workflowState: string = this.siteWorkflowState.toUpperCase();\r\n return workflowState;\r\n }\r\n\r\n public get ShowAppChrome(): boolean {\r\n //return !this.hideAppChrome;\r\n return !this.queryParamsService.HideAppChrome;\r\n }\r\n\r\n public selectCurrentRoute(): void {\r\n let urls = this.router.url.split('/');\r\n\r\n for (let item of this.menu.navItems) {\r\n\r\n if (this.foundItem(urls, item, item.text, false))\r\n break;\r\n\r\n //if (item.subItems) {\r\n // for (let si of item.subItems) {\r\n // if (this.foundItem(urls, si, item.text, true))\r\n // break;\r\n // }\r\n //}\r\n }\r\n }\r\n\r\n // Returns true if Site is in the Setup or Closed workflow state\r\n public showStatusInTitle(): boolean {\r\n //return this.status == DataCollectionStatus.SETUP || this.status == DataCollectionStatus.CLOSED\r\n return this.siteWorkflowState == DataCollectionStatus.SETUP || this.siteWorkflowState == DataCollectionStatus.CLOSED\r\n }\r\n\r\n public foundItem(urls: string[], item: MenuItem, opt: string, isChild: boolean): boolean {\r\n let found = false;\r\n\r\n if (urls[urls.length - 1].toString() == item.route || (isChild && this.router.url.endsWith(item.route))) {\r\n this.openMenu(opt);\r\n\r\n found = true;\r\n }\r\n\r\n return found;\r\n }\r\n\r\n public toggleMenu() {\r\n this.toggleOpenedState();\r\n this.setMenuExpansion(this.opened);\r\n }\r\n\r\n // Methods called by my HTMM code.\r\n public get IconFormatMatIcon(): string {\r\n return (IconFormatEnum.MAT_ICON);\r\n }\r\n public get IconFormatSvg(): string {\r\n return (IconFormatEnum.SVG_ICON);\r\n }\r\n\r\n public HasMatIcon(item: any): boolean {\r\n let bHasMatIcon: boolean =\r\n ((item.iconFormat == undefined) || (item.iconFormat == IconFormatEnum.MAT_ICON));\r\n\r\n return (bHasMatIcon);\r\n }\r\n public HasSvgIcon(item: any): boolean {\r\n let bHasSvgIcon: boolean =\r\n ((item.iconFormat != null) && (item.iconFormat == IconFormatEnum.SVG_ICON));\r\n\r\n return (bHasSvgIcon);\r\n }\r\n\r\n // checks storage to see if sidenav should display opened or collapsed \r\n private setOpenedState() {\r\n let savedOpenState = this.browserStorageService.get(BrowserStorageEnums.SIDE_NAV_OPEN);\r\n if (savedOpenState == null || savedOpenState == 'true') {\r\n this.opened = true;\r\n } else {\r\n this.opened = false;\r\n }\r\n }\r\n\r\n // if nav is opened, sets state to close it, if it's closed, sets state to open it\r\n private toggleOpenedState() {\r\n let savedOpenState = this.browserStorageService.get(BrowserStorageEnums.SIDE_NAV_OPEN);\r\n if (savedOpenState == null || savedOpenState == 'true') {\r\n this.opened = false;\r\n } else {\r\n this.opened = true;\r\n }\r\n this.browserStorageService.set(BrowserStorageEnums.SIDE_NAV_OPEN, '' + this.opened);\r\n }\r\n\r\n public get AppSideNavClasses(): string {\r\n let cls = 'app-sidenav noprint';\r\n if (!this.opened) {\r\n cls = `${cls} collapsed`\r\n }\r\n return cls;\r\n }\r\n\r\n public get AppSideNavContentClasses(): string {\r\n let cls = 'app-sidenav-content';\r\n if (!this.opened) {\r\n cls = `${cls} collapsed`\r\n }\r\n return cls;\r\n }\r\n\r\n public ShowHomePageMenuItem(item: any): boolean {\r\n //***If this nav link/item is a beta feature AND beta features aren't enabled don't display\r\n //JJ - VNEXT-1052 - make all beta feature display permanently so commenting out this if statement\r\n //if (item.betaFeature && !this.currentSiteService.Site?.betaFeaturesEnabled) {\r\n // return false;\r\n //}\r\n\r\n if (this.currentSiteService.Site?.SiteHomePage?.isActive) {\r\n return item?.showWhenSiteHomePageEnabledAndActive == null || item?.showWhenSiteHomePageEnabledAndActive == true;\r\n } else {\r\n return !item?.showWhenSiteHomePageEnabledAndActive;\r\n }\r\n }\r\n\r\n // sets the css classes that implement the opening/closing of the nav\r\n setMenuExpansion(opened: boolean = true) {\r\n if (opened) {\r\n // Spent a while trying to get to the bottom of this and control it in a better way but had to move on...\r\n // When expanding the left sidenav, Angular (I presume) is inserting a style attribute like this...\r\n // \r\n // BUT if I 1) reload the page with the sidenav previously collapsed and 2) then expand the menu\r\n // the style attribute does _not_ get set, and so the menu expands but the content doesn't shift over\r\n // so this is a hack to ensure it gets set. There must be a better way, like I said...\r\n let content = $('.app-sidenav-content');\r\n UtilityHelper.runWhenStackClear(() => {\r\n if (this.ShowAppChrome)\r\n content.attr(\"style\", `margin-left:${this.SIDENAV_WIDTH}`);\r\n });\r\n }\r\n }\r\n\r\n openMenu(opt: string) {\r\n this.menuOption = opt;\r\n }\r\n\r\n public navigateTo(urlSegment: string, goBack: boolean = false) {\r\n urlSegment = urlSegment ? urlSegment.split('#')[0] : '';\r\n let url = \"\";\r\n if (urlSegment.startsWith('/')) {\r\n url = urlSegment;\r\n } else {\r\n url = this.activatedRoute.snapshot.url.join('/') + '/' + urlSegment;\r\n }\r\n\r\n if (goBack) {\r\n\r\n let previousUrl = this.navigationService.popOffPreviousUrl();\r\n\r\n this.router.navigateByUrl(previousUrl).then(x => {\r\n this.communicationService.emitChangeToSkipNavLink(url);\r\n let mainContent = $('#main-content');\r\n if (mainContent) {\r\n mainContent.focus();\r\n }\r\n });\r\n } else {\r\n // nav to the route, and then set focus on the main content div rather than keep focus\r\n // on the nav menu itself (users will need to Shift+Tab their way back to nav menu)\r\n this.router.navigateByUrl(url).then(x => {\r\n this.communicationService.emitChangeToSkipNavLink(url);\r\n let mainContent = $('#main-content');\r\n if (mainContent) {\r\n mainContent.focus();\r\n }\r\n });\r\n }\r\n }\r\n\r\n public blockDrop(ev: DragEvent) {\r\n UtilityHelper.blockDrop(ev);\r\n }\r\n\r\n //checkDefault(opt: string) {\r\n // console.log(opt);\r\n // let menuItem = this.menu.navItems.filter(x => x.text == opt)[0];\r\n\r\n // if (menuItem.defaultState && menuItem.defaultState == 'closed')\r\n // this.expandMenu(false);\r\n // else if (!this.userToggled)\r\n // this.expandMenu(true);\r\n //}\r\n\r\n //childClick(opt: string) {\r\n // this.checkDefault(opt);\r\n //}\r\n}\r\n","// loader.interceptors.ts\r\nimport { Injectable } from '@angular/core';\r\nimport { HttpErrorResponse, HttpResponse, HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { LoaderService } from './services/loader.service';\r\nimport { CurrentUserService } from '../security/current-user.service';\r\nimport { LogInOutComponent } from '../security/loginout/loginout.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AlertDialogComponent, AlertDialogModel } from './dialogs/alert/alert-dialog.component';\r\nimport { ProgressIndicatorService } from './services/progress-indicator.service';\r\nimport { environment } from '../../environments/environment';\r\n\r\n// URLs for which the loading mask should not be displayed\r\n// add a part of url here, and the loading mask will not display for it\r\nconst URLS_TO_SKIP: string[] = [\r\n 'frameworkapi/maxpicker/search',\r\n 'ForKeepAlive',\r\n 'GetTreeWithPermissions',\r\n 'export/folder',\r\n 'export/forminstance',\r\n 'getImpersonatableUsers',\r\n 'attachment/histories'\r\n];\r\n\r\n@Injectable()\r\nexport class LoaderIntercepter implements HttpInterceptor {\r\n private requests: HttpRequest[] = [];\r\n\r\n constructor(\r\n private loaderService: LoaderService,\r\n private currentUserService: CurrentUserService,\r\n private progressIndicatorService: ProgressIndicatorService,\r\n private dialog: MatDialog) { }\r\n\r\n removeRequest(req: HttpRequest) {\r\n const i = this.requests.indexOf(req);\r\n if (i >= 0) {\r\n this.requests.splice(i, 1);\r\n }\r\n this.loaderService.isLoading.next(this.requests.length > 0);\r\n }\r\n\r\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n if (this.skipThisRequest(req)) {\r\n return next.handle(req);\r\n } else {\r\n this.requests.push(req);\r\n this.loaderService.isLoading.next(true);\r\n return Observable.create(observer => {\r\n const subscription = next.handle(req)\r\n .subscribe(\r\n event => {\r\n if (event instanceof HttpResponse) {\r\n this.removeRequest(req);\r\n observer.next(event);\r\n }\r\n },\r\n err => {\r\n // note: http 409 (editing conflict) is handled at a higher level,\r\n // see form-instance-service.ts\r\n if (err.status == 401) {\r\n // PJH - 6/28/2024 - adding a comment as part of reviewing logout code for VNEXT-591\r\n // I don't see the server code ever returning a 401, so not sure this will ever actually be thrown\r\n // Also a 401 error code does not pertain to a session timeout. Anyway, keeping it here for now \r\n this.showErrorDialog(err, `Session Expired`, `Your session has expired and you will now be logged out. (401)`);\r\n setTimeout(() => {\r\n this.currentUserService.setForcedLogout(true);\r\n this.currentUserService.setIdleLogout(false);\r\n this.currentUserService.logout(false);\r\n }, 2000);\r\n } else if (err.status == 403) {\r\n let title = 'Unauthorized';\r\n let message = `You don't have the necessary permissions to perform that operation.`;\r\n if (err.error.Description.indexOf('You appear to have been granted some permissions') > -1) {\r\n title = 'Insufficient Permissions'\r\n message = err.error.Description.substring(0, err.error.Description.indexOf('Correlation ID'));\r\n }\r\n this.showErrorDialog(err, title, message);\r\n } else if (err.status == 500) {\r\n this.showErrorDialog(err, `Server Error`, `Something went wrong. If the error persists please report it to MAX Support.`);\r\n } else if (err.status == 422) {\r\n // pharvey - 6/14/2023 - added for VNEXT-505 but can serve to handle any detailed\r\n // error message you wish to give to the user from exceptions handled and thrown\r\n // in the server\r\n this.showErrorDialog(err, 'Error', err.error.Message);\r\n } else if (err.status == 503) {\r\n // This was added for VNEXT-1116 which enables the application to be made\r\n // unavailable for users who are not in the COLLECT-VNEXT-REGRESSIONTESTERS\r\n // MAX group\r\n document.location = \"/unavailable\";\r\n }\r\n this.removeRequest(req);\r\n if (this.progressIndicatorService != null) {\r\n this.progressIndicatorService.hideProgress();\r\n }\r\n observer.error(err);\r\n },\r\n () => {\r\n this.removeRequest(req);\r\n observer.complete();\r\n });\r\n // remove request from queue when cancelled\r\n return () => {\r\n this.removeRequest(req);\r\n subscription.unsubscribe();\r\n };\r\n });\r\n }\r\n }\r\n\r\n private skipThisRequest(req: HttpRequest): boolean {\r\n var matched = false;\r\n for (let url of URLS_TO_SKIP) {\r\n matched = req.url.match(url) != null;\r\n if (matched) break;\r\n }\r\n return matched;\r\n }\r\n\r\n private showErrorDialog(error, title: string, message: string): void {\r\n let technicalInfo: string = null;\r\n let correlationId: string = null;\r\n if ((error != null) && (error.error != null)) {\r\n // Do we have a correlation Id?\r\n if ((error.error.Description != null) && (error.error.Description.trim() != ''))\r\n correlationId = error.error.Description.split(\"Correlation ID = \")[1];\r\n else if (error.error.correlationId != null)\r\n correlationId = error.error.correlationId;\r\n\r\n // Do we have a more detailed title and/or message?\r\n if (error.error.title != null)\r\n title = error.error.title;\r\n if (error.error.detail != null)\r\n message = error.error.detail;\r\n if (error.url != null)\r\n technicalInfo = 'Requested ' + error.url;\r\n }\r\n\r\n this.dialog.open(AlertDialogComponent, {\r\n disableClose: true,\r\n maxWidth: \"600px\",\r\n data: new AlertDialogModel(title, message, technicalInfo, correlationId)\r\n });\r\n }\r\n}\r\n","import { IViewModel } from '../interfaces/view-model.interface';\n\nexport class TestConfiguration implements IViewModel {\n public id: number = 0; // Note: this value is not used.\n\n public jsonConfig: string;\r\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { TestConfiguration } from '../models/test-configuration.model';\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TestConfigurationService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'testConfiguration', TestConfiguration)\r\n }\n}\n","
\n
\n
{{this.StatusText}}
\n\n
\n \n \n
\n
\n\n \n \n
\n {{this.SiteName}}\n
\n
\n
\n","import { ChangeDetectorRef, Component, OnDestroy, OnInit, Renderer2 } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { ProgressBarMode } from '@angular/material/progress-bar';\n\nimport {\n ProgressStatusUpdateEnum,\n ProgressUpdateInfo,\n IProgressStatusUpdateListener,\n ProgressIndicatorService\n} from '../../services/progress-indicator.service';\nimport { ProgressBarConstants } from '../../enums/progress-bar-constants.enum';\nimport { CurrentSiteService } from '../../services/current-site.service';\n\n@Component({\n selector: 'app-progress-indicator',\n templateUrl: './progress-indicator.component.html',\n styleUrls: ['./progress-indicator.component.scss'],\n standalone: false\n})\nexport class ProgressIndicatorComponent implements OnInit, OnDestroy, IProgressStatusUpdateListener {\n // Properties.\n private mode: ProgressBarMode = ProgressBarConstants.BUFFER_MODE;\n private color: ThemePalette = ProgressBarConstants.THEME_PALETTE_WARN; \n private progressUpdateInfo: ProgressUpdateInfo = null;\n private statusText: string = null;\n\n public progressListenerId: number; // Reuqired by IProgressStatusUpdateListener\n\n // Constructor.\n constructor(private progressIndicatorService: ProgressIndicatorService, \n renderer: Renderer2, \n private changeDetector: ChangeDetectorRef,\n private currentSiteService: CurrentSiteService //VNEXT-1066: KLW - Properties of the Banner\n )\n {\n // Example of removing/adding a CSS class using Renderer2:\n //\n // this.renderer.removeClass(this.messageSpan.nativeElement, 'message-span-invisible-font');\n // this.renderer.addClass(this.messageSpan.nativeElement, 'message-span-visible-font');\n\n return;\n }\n\n // Life cycle methods.\n public ngOnInit(): void {\n // Register for progress events.\n this.progressIndicatorService.registerListener(this);\n\n return;\n }\n\n public ngOnDestroy(): void {\n // Remove myself as a progress listener.\n return;\n }\n\n // Implement the IProgressStatusUpdateListener method.\n public progressUpdated(statusMessage: ProgressStatusUpdateEnum,\n statusTextParam: string,\n statusUpdate: ProgressUpdateInfo): void {\n if (statusTextParam) {\n this.statusText = statusTextParam;\n }\n\n switch (statusMessage) {\n case ProgressStatusUpdateEnum.PROGRESS_UPDATED:\n this.progressUpdateInfo = statusUpdate;\n break;\n\n case ProgressStatusUpdateEnum.PROGRESS_COMPLETED:\n this.statusText = null;\n this.progressUpdateInfo = null;\n break;\n\n default:\n break;\n }\n this.changeDetector.detectChanges(); // prevents \"Expression has changed after it was checked\" error (https://angular.io/errors/NG0100)\n return;\n }\n\n // Accessor methods.\n public get ProgressUpdateInfo(): ProgressUpdateInfo {\n return (this.progressUpdateInfo);\n }\n\n public get StatusText(): string {\n return (this.statusText);\n }\n\n public get Mode(): ProgressBarMode {\n return (this.mode);\n }\n\n public get Value(): number {\n return (this.progressUpdateInfo ? this.progressUpdateInfo.statusValue : 0);\n }\n \n public get BufferValue(): number {\n return (this.progressUpdateInfo ? this.progressUpdateInfo.bufferValue : 0);\n }\n\n public get Color(): ThemePalette {\n return (this.color);\n }\n\n //VNEXT-1066: KLW - Properties of the Banner\n public get SiteName(): string{\n let retVal: string = '';\n\n if (this.currentSiteService.Site)\n retVal = this.currentSiteService.Site.name;\n\n return retVal;\n }\n}\n","import { ErrorHandler, Injectable, Injector } from '@angular/core';\r\nimport { Logging } from './logging'\r\nimport { Router } from '@angular/router'\r\n\r\n@Injectable()\r\nexport class GlobalErrorHandler implements ErrorHandler {\r\n constructor(private injector: Injector) { }\r\n\r\n handleError(error) {\r\n const router = this.injector.get(Router);\r\n\r\n if (error.message && error.message.includes(\"JWT present or has expired\")) {\r\n Logging.log('attempting to relogin');\r\n router.navigate(['/login']);\r\n }\r\n\r\n // 03-23-2020 new code: handle chunk caching errors by reloading the app URL.\r\n const chunkFailedMessage = /Loading chunk [\\d]+ failed/;\r\n\r\n if (chunkFailedMessage.test(error.message)) {\r\n window.location.reload();\r\n\r\n return;\r\n }\r\n // End 03-23-2020 new code.\r\n\r\n Logging.log(\"Global Error Handler -- handling the following error: \" + error.message || error.toString());\n if (error.stack) {\n Logging.log(\"Stack trace: \" + error.stack);\r\n }\r\n\r\n // IMPORTANT: Rethrow the error otherwise it gets swallowed\r\n throw error;\r\n }\r\n\r\n}\r\n","import {\r\n Directive,\r\n Output,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener\r\n} from '@angular/core';\r\n\r\n@Directive({\n selector: '[appDragDrop]',\n standalone: false\n})\r\nexport class DragDropFilesDirective {\r\n @HostBinding('class.fileover') fileOver: boolean;\r\n @Output() fileDropped = new EventEmitter();\r\n @Output() fileEntered = new EventEmitter();\r\n\r\n\r\n // Dragover listener\r\n @HostListener('dragover', ['$event']) onDragOver(evt) {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.fileOver = true;\r\n this.fileEntered.emit(true);\r\n }\r\n\r\n // Dragleave listener\r\n @HostListener('dragleave', ['$event']) public onDragLeave(evt) {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.fileOver = false;\r\n this.fileEntered.emit(false);\r\n }\r\n\r\n // Drop listener\r\n @HostListener('drop', ['$event']) public ondrop(evt) {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.fileOver = false;\r\n let files = evt.dataTransfer.files;\r\n if (files.length > 0) {\r\n this.fileDropped.emit(files);\r\n this.fileEntered.emit(false);\r\n }\r\n }\r\n}\r\n","import { SortDescriptor, State, CompositeFilterDescriptor, FilterDescriptor } from \"@progress/kendo-data-query\";\r\nexport class CrossSiteUserFavoriteFormsStateInfo {\r\n public editedRowIndex: number;\r\n\r\n public gridState: State = {\r\n sort: [],\r\n skip: 0,\r\n take: 500,\r\n filter: {\r\n filters: [],\r\n logic: 'and'\r\n }\r\n };\r\n}\r\n\r\nexport class CrossSiteUserFavoriteFormsColumnDef {\r\n public fieldName: string;\r\n public title: string;\r\n public width: string;\r\n}\r\n","export class CrossSiteUserFavoriteFormsData {\r\n public formId: number;\r\n public formName: string;\r\n public siteId: number;\r\n public siteName: string;\r\n public folderId: number;\r\n public modifiedDate: Date;\r\n public modifiedBy: string;\r\n public workflowState: string;\r\n public isFavorite: boolean;\r\n}\r\nexport class CrossSiteUserFavoriteFormsResults {\r\n public results: CrossSiteUserFavoriteFormsData[] = [];\r\n\r\n public resultsAsPlainObjects: object[] = []; // results translated into plain JS objects needed by Kendo Grid by service code\r\n\r\n public total: number = 5000;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { State } from \"@progress/kendo-data-query\";\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map, tap } from \"rxjs/operators\";\r\nimport { environment } from \"../../../environments/environment\";\r\nimport { CustomDateFormatDirective } from \"../directives/custom-date-format.directive\";\r\nimport { CrossSiteUserFavoriteFormsResults } from '../models/site-content/cross-site-user-favorite-form.model';\r\nimport { ProgressIndicatorService } from \"./progress-indicator.service\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CrossSiteUserFavoriteFormsService extends BehaviorSubject {\r\n private url = environment.apiUrl;\r\n private endpoint: string = 'api/formInstance';\r\n private data: object[] = [];\r\n private loading = false;\r\n private gridData: CrossSiteUserFavoriteFormsResults;\r\n\r\n public constructor(private http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(new CrossSiteUserFavoriteFormsResults());\r\n }\r\n\r\n\r\n public read(gridState: State): void {\r\n this.fetch(gridState, 'getCrossSiteUserFavorites')\r\n .pipe(\r\n tap((data) => {\r\n this.gridData = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n private fetch(gridState: State, action: string): Observable {\r\n\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${action}`;\r\n return >this.http.post(url, gridState)\r\n .pipe(\r\n map((dataFromServer) => {\r\n dataFromServer.resultsAsPlainObjects = [];\r\n for (let dc of dataFromServer.results) {\r\n var plainObj = {\r\n formId: dc.formId,\r\n formName: dc.formName,\r\n siteId: dc.siteId,\r\n folderId: dc.folderId,\r\n siteName: dc.siteName,\r\n modifiedDate: CustomDateFormatDirective.applyDateFormattingUsing(\"yyyy-MM-dd HH:mm:ss\", dc.modifiedDate.toString()),\r\n modifiedBy: dc.modifiedBy,\r\n //modifiedByUserName: dc.modifiedByUserName,\r\n workflowState: dc.workflowState,\r\n isFavorite: true\r\n };\r\n dataFromServer.resultsAsPlainObjects.push(plainObj);\r\n }\r\n return dataFromServer;\r\n })\r\n );\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Directive, OnInit, OnDestroy } from '@angular/core';\r\nimport { DataBindingDirective, GridComponent } from '@progress/kendo-angular-grid';\r\nimport { Subscription } from 'rxjs';\r\nimport { CrossSiteUserFavoriteFormsService } from '../services/cross-site-user-favorite-forms.service';\r\n\n@Directive({\n selector: '[appCrossSiteUserFavoriteFormsRemoteBinding]',\n exportAs: 'remoteBindingDirectiveRef',\n standalone: false\n})\nexport class CrossSiteUserFavoriteFormsRemoteBindingDirective extends DataBindingDirective implements OnInit, OnDestroy {\n\r\n private serviceSubscription: Subscription;\r\n private showAllForAdmin: boolean;\r\n\n constructor(private http: HttpClient, grid: GridComponent, private service: CrossSiteUserFavoriteFormsService) {\r\n super(grid);\r\n }\r\n\r\n public ngOnInit() {\r\n this.serviceSubscription = this.service.subscribe((data) => {\r\n // this code called whenever the service has new data to present, triggered by calls to the rebind() callback function\r\n // (which DataBindingDirective takes care of calling when grid state changes)...\r\n this.grid.loading = false;\r\n this.grid.data = data.resultsAsPlainObjects;\r\n this.notifyDataChange();\r\n });\r\n\r\n super.ngOnInit();\r\n this.rebind();\r\n }\r\n\r\n\r\n\r\n // A callback which the DataBindingDirective super class takes care of calling automatically when the grid's state changes\r\n public rebind(): void {\r\n this.grid.loading = true;\r\n this.service.read(this.state);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.serviceSubscription) {\r\n this.serviceSubscription.unsubscribe();\r\n }\r\n\r\n super.ngOnDestroy();\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n
\r\n \r\n {{favIcon(dataItem)}}\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n","import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';\r\nimport { KendoGridHelper } from '../../kendo-grid-helper';\r\nimport { MultipleSortSettings } from '@progress/kendo-angular-grid';\r\nimport { SortDescriptor, State, CompositeFilterDescriptor, FilterDescriptor } from \"@progress/kendo-data-query\";\nimport { CrossSiteUserFavoriteFormsColumnDef, CrossSiteUserFavoriteFormsStateInfo } from './cross-site-user-favorite-forms.extras';\r\nimport { Router } from '@angular/router';\r\nimport { CrossSiteUserFavoriteFormsData } from '../../models/site-content/cross-site-user-favorite-form.model';\r\nimport { CrossSiteUserFavoriteFormsRemoteBindingDirective } from '../../directives/cross-site-user-favorite-forms.directive';\r\nimport { FormInstanceService } from '../../services/form-instance.service';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\n@Component({\n selector: 'app-cross-site-user-favorite-forms',\n templateUrl: './cross-site-user-favorite-forms.component.html',\n styleUrls: ['./cross-site-user-favorite-forms.component.scss'],\n encapsulation: ViewEncapsulation.None //enable CSS overrides\n ,\n standalone: false\n})\nexport class CrossSiteUserFavoriteFormsComponent implements OnInit {\r\n @ViewChild(CrossSiteUserFavoriteFormsRemoteBindingDirective) public remoteBindingDirectiveRef: CrossSiteUserFavoriteFormsRemoteBindingDirective;\r\n private helper = new KendoGridHelper();\r\n private kendoGridData: CrossSiteUserFavoriteFormsStateInfo = new CrossSiteUserFavoriteFormsStateInfo();\n\n constructor(private router: Router, private dialog: MatDialog, private formInstanceService: FormInstanceService) { }\n\n public ngOnInit(): void {\n }\r\n \r\n\r\n public columnDefs: CrossSiteUserFavoriteFormsColumnDef[] = [\r\n { fieldName: 'formName', title: 'Name', width: '200' },\r\n { fieldName: 'siteName', title: 'Site', width: '75' },\r\n { fieldName: 'modifiedDate', title: 'Modified Date', width: '75' },\r\n { fieldName: 'modifiedBy', title: 'Modified By', width: '75' },\r\n { fieldName: 'workflowState', title: 'Status', width: '75' }\r\n ];\r\n\r\n public openForm(dataItem: CrossSiteUserFavoriteFormsData): void {\r\n window.open(`/site/${dataItem.siteId}/structure/folder/${dataItem.folderId}/form/${dataItem.formId}`, '_blank').focus();\r\n //this.router.navigateByUrl(`/site/${dataItem.siteId}/structure/folder/${dataItem.folderId}/form/${dataItem.formId}`);\r\n }\r\n\r\n public toggleFave(dataItem: CrossSiteUserFavoriteFormsData): void {\r\n // If the user is unfaving, give them a warning that it will be removed from the Grid\r\n if (dataItem.isFavorite) {\n let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n width: \"400px\",\r\n data: new ConfirmationDialogModel(\n `Unfave`,\n `Are you sure you want to unfave the Form \"${dataItem.formName}\"?

If you proceed it will continue to display in this grid for now, but will no longer be displayed upon reload.`\r\n )\r\n });\n dialogRef.afterClosed().subscribe(yes => {\n if (yes) {\r\n this.doToggleFavorite(dataItem);\r\n }\r\n });\r\n } else {\r\n this.doToggleFavorite(dataItem);\r\n }\r\n }\r\n\r\n private doToggleFavorite(dataItem: CrossSiteUserFavoriteFormsData) {\r\n dataItem.isFavorite = !dataItem.isFavorite;\r\n this.formInstanceService.toggleIsFavorite(dataItem.formId).then(fi => { });\r\n }\r\n\r\n public favIcon(dataItem: any): string {\r\n if (dataItem.isFavorite) {\r\n return \"star\";\r\n } else {\r\n return \"star_outline\";\r\n }\r\n }\r\n\r\n public get SortSettings(): any {\r\n let settings: MultipleSortSettings = {\r\n //mode: \"multiple\",\r\n initialDirection: \"asc\",\r\n allowUnsort: true,\r\n showIndexes: true,\r\n };\r\n return settings;\r\n }\r\n\r\n // Getters / Setters\r\n public get ColumnDefs() {\r\n return this.columnDefs;\r\n }\r\n\r\n public get Helper(): KendoGridHelper {\r\n return this.helper;\r\n }\r\n // Getters for virtual scrolling\r\n public get PageSize(): number {\r\n return this.kendoGridData.gridState.take;\r\n }\r\n\r\n public get Skip(): number {\r\n return this.kendoGridData.gridState.skip;\r\n }\r\n public get Sort(): SortDescriptor[] {\r\n return this.kendoGridData.gridState.sort;\r\n }\n\n}\n","import { DataCollection } from \"./data-collection.model\";\r\n\r\n\r\nexport class SiteGridData{\r\n public results: DataCollection[];\r\n\r\n public resultsAsPlainObjects: object[] = []; // results translated into plain JS objects needed by Kendo Grid by service code\r\n\r\n public total: number = 5000;\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { State } from \"@progress/kendo-data-query\";\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map, tap } from \"rxjs/operators\";\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { environment } from '../../../environments/environment';\r\nimport { SiteGridData } from '../models/site-content/site-grid-data.model';\r\nimport { CustomDateFormatDirective } from '../directives/custom-date-format.directive';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SiteGridDataService extends BehaviorSubject {\r\n\r\n private url = environment.apiUrl;\r\n private endpoint: string = 'api/dataCollection';\r\n private data: object[] = [];\r\n private loading = false;\r\n private gridData: SiteGridData;\r\n\r\n public constructor(private http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(new SiteGridData());\r\n }\r\n\r\n public read(gridState: State): void {\r\n this.fetch(gridState, 'getAllForUser')\r\n .pipe(\r\n tap((data) => {\r\n this.gridData = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n \r\n public getAllForSystemAdmin(gridState: State) {\r\n this.fetch(gridState, 'getAllForSystemAdmin')\r\n .pipe(\r\n tap((data) => {\r\n this.gridData = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n private fetch(gridState: State, action: string): Observable {\r\n\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${action}`;\r\n\r\n return >this.http.post(url, gridState)\r\n .pipe(\r\n map((dataFromServer) => {\r\n dataFromServer.resultsAsPlainObjects = [];\r\n for (let dc of dataFromServer.results) {\r\n var plainObj = {\r\n id: dc.id,\r\n name: dc.name,\r\n modifiedDate: CustomDateFormatDirective.applyDateFormattingUsing(\"yyyy-MM-dd HH:mm:ss\", dc.modifiedDate.toString()),\r\n modifiedBy: dc.modifiedBy,\r\n modifiedByUserName: dc.modifiedByUserName,\r\n lastAccessedDate: CustomDateFormatDirective.applyDateFormattingUsing(\"yyyy-MM-dd HH:mm:ss\", dc.lastAccessedByCurrentUser?.toString()),\r\n description: dc.description,\r\n purpose: dc.purpose,\r\n currentWorkflowState: dc.currentStatus,\r\n isFavorite: dc.isFavorite,\r\n siteIsAdministerable: dc.siteIsAdministerable\r\n };\r\n dataFromServer.resultsAsPlainObjects.push(plainObj);\r\n }\r\n return dataFromServer;\r\n })\r\n );\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Directive, OnInit, OnDestroy } from '@angular/core';\r\nimport { DataBindingDirective, GridComponent } from '@progress/kendo-angular-grid';\r\nimport { Subscription } from 'rxjs';\r\nimport { SiteGridDataService } from '../services/site-grid-data.service';\r\n\n@Directive({\n selector: '[appSiteGridRemoteBinding]',\n exportAs: 'remoteBindingDirectiveRef',\n standalone: false\n})\nexport class SiteGridRemoteBindingDirective extends DataBindingDirective implements OnInit, OnDestroy {\n\r\n private serviceSubscription: Subscription;\r\n private showAllForAdmin: boolean;\r\n\n constructor(private http: HttpClient, grid: GridComponent, private siteGridDataService: SiteGridDataService) {\r\n super(grid);\r\n }\r\n\r\n public ngOnInit() {\r\n this.serviceSubscription = this.siteGridDataService.subscribe((data) => {\r\n // this code called whenever the service has new data to present, triggered by calls to the rebind() callback function\r\n // (which DataBindingDirective takes care of calling when grid state changes)\r\n this.grid.loading = false;\r\n this.grid.data = data.resultsAsPlainObjects;\r\n this.notifyDataChange();\r\n });\r\n\r\n super.ngOnInit();\r\n this.rebind();\r\n }\r\n\r\n public get ShowAllForAdmin(): boolean {\r\n return this.showAllForAdmin;\r\n }\r\n public set ShowAllForAdmin(value: boolean) {\r\n this.showAllForAdmin = value;\r\n }\r\n\r\n // A callback which the DataBindingDirective super class takes care of calling automatically when the grid's state changes\r\n public rebind(): void {\r\n this.grid.loading = true;\r\n if (this.showAllForAdmin) {\r\n this.siteGridDataService.getAllForSystemAdmin(this.state);\r\n } else {\r\n this.siteGridDataService.read(this.state);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.serviceSubscription) {\r\n this.serviceSubscription.unsubscribe();\r\n }\r\n\r\n super.ngOnDestroy();\r\n }\n\n}\n","import { SortDescriptor, State, CompositeFilterDescriptor, FilterDescriptor } from \"@progress/kendo-data-query\";\r\n\r\nexport class SiteGridStateInfo {\r\n public editedRowIndex: number;\r\n\r\n public gridState: State = {\r\n sort: [],\r\n skip: 0,\r\n take: 500,\r\n filter: {\r\n filters: [],\r\n logic: 'and'\r\n }\r\n };\r\n}\r\n\r\nexport class SiteListColumnDef {\r\n public fieldName: string;\r\n public title: string;\r\n public width: string;\r\n}\r\n"," \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n {{favIcon(dataItem)}}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {{showAllForAdminIcon(dataItem)}}\r\n \r\n \r\n\r\n\r\n \r\n \r\n
\r\n \r\n delete\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n","import { Clipboard } from '@angular/cdk/clipboard';\r\nimport { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { Router } from '@angular/router';\r\nimport { MultipleSortSettings } from '@progress/kendo-angular-grid';\r\nimport { ContextMenuComponent } from \"@progress/kendo-angular-menu\";\r\nimport { SortDescriptor } from \"@progress/kendo-data-query\";\r\nimport { CurrentUserService } from '../../../security/current-user.service';\r\nimport { DataCollectionService } from '../../../shared/services/data-collection.service';\r\nimport { CollectionDetailDialog } from '../../dialogs/collection-detail/collection-detail.dialog';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { ImportSiteDialog } from '../../dialogs/import-site/import-site.dialog';\r\nimport { SiteGridRemoteBindingDirective } from '../../directives/site-grid-remote-binding.directive';\r\nimport { KendoGridHelper } from '../../kendo-grid-helper';\r\nimport { IMenuItem } from '../../models/form-template-instances/menu-item.models';\r\nimport { DataCollection } from '../../models/site-content/data-collection.model';\r\nimport { ProgressConfig } from '../../services/progress-indicator.service';\r\nimport { SiteGridStateInfo, SiteListColumnDef } from './extras';\r\n\r\nconst Open_MenuItem: string = \"Open\";\r\nconst CopyLink_MenuItem: string = \"Copy Link\";\r\n\r\n@Component({\n selector: 'app-site-grid',\n templateUrl: './site-grid.component.html',\n styleUrls: ['./site-grid.component.scss'],\n encapsulation: ViewEncapsulation.None, //enable CSS overrides\n standalone: false\n})\r\nexport class SiteGridComponent implements OnInit {\r\n // Get a reference to the remote binding directive that handles all the changes to Grid state (Relates to {\r\n if (yes) {\r\n this.dataCollectionService.delete(dataItem.id).then(x => {\r\n this.remoteBindingDirectiveRef.rebind();\r\n });\r\n }\r\n });\r\n }\r\n\r\n public toggleFavorite(dataItem: any): void {\r\n dataItem.isFavorite = !dataItem.isFavorite;\r\n this.dataCollectionService.toggleIsFavorite(dataItem.id).then(fi => { });\r\n }\r\n\r\n public toggleSiteAdmin(dataItem: any): void {\r\n dataItem.siteIsAdministerable = !dataItem.siteIsAdministerable;\r\n if (dataItem.siteIsAdministerable) {\r\n this.dataCollectionService.addAsSiteAdmin(dataItem.id).then(fi => { });\r\n } else {\r\n this.dataCollectionService.removeAsSiteAdmin(dataItem.id).then(fi => { });\r\n }\r\n }\r\n\r\n public favIcon(dataItem: any): string {\r\n if (dataItem.isFavorite) {\r\n return \"star\";\r\n } else {\r\n return \"star_outline\";\r\n }\r\n }\r\n\r\n public showAllForAdminIcon(dataItem: any): string {\r\n if (dataItem.siteIsAdministerable) {\r\n return \"person\";\r\n } else {\r\n return \"person_outline\";\r\n }\r\n }\r\n\r\n public toggleShowAllForAdmin() {\r\n this.showAllForAdmin = !this.showAllForAdmin;\r\n\r\n this.remoteBindingDirectiveRef.ShowAllForAdmin = this.showAllForAdmin;\r\n this.remoteBindingDirectiveRef.rebind();\r\n }\r\n\r\n public handleNewSite(): void {\r\n const dialogRef = this.dialog.open(CollectionDetailDialog, {\r\n width: '60%',\r\n data: {}\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n let collection = new DataCollection();\r\n\r\n collection.name = result.name;\r\n\r\n this.dataCollectionService.create(\r\n collection,\r\n new ProgressConfig(`Creating new Site \"${collection.name}\"`, `Done creating Site \"${collection.name}\"`))\r\n .then(response => {\r\n this.router.navigate(['/site/' + response.id]);\r\n });\r\n }\r\n });\r\n }\r\n\r\n public handleSiteImport(): void {\r\n // Process an export site dialogue.\r\n\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '500px';\r\n\r\n const dialogRef = this.dialog.open(ImportSiteDialog, dialogConfig);\r\n\r\n dialogRef.afterClosed().subscribe(importedSiteId => {\r\n // Note: the site import is performed by the dialogue.\r\n // If the site Id is returned, load the copied site.\r\n if (importedSiteId != null) {\r\n this.dataCollectionService.get(importedSiteId)\r\n .then(response => {\r\n this.router.navigate(['/site/' + response.id]);\r\n });\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n public onCellClick(e: any): void {\r\n // Call the original code associated with a cell click.\r\n this.helper.setIndexOfClickedRow(e);\r\n //this.rowIndexClicked = e.rowIndex;\r\n\r\n // If this event is of type 'contextmenu', handle that.\r\n if (e.type === \"contextmenu\") {\r\n const originalEvent = e.originalEvent;\r\n originalEvent.preventDefault();\r\n\r\n this.helper.ContextMenuDataItem = e.dataItem;\r\n\r\n // Show the context menu.\r\n this.gridContextMenu.show({\r\n left: originalEvent.pageX,\r\n top: originalEvent.pageY,\r\n });\r\n }\r\n }\r\n\r\n public onContextMenuSelect(eventData: any): void {\r\n if ((this.helper.ContextMenuDataItem != null) && (eventData['item'] != null) && (eventData['item']['text'] != null)) {\r\n let menuItemText: string = eventData['item']['text'];\r\n switch (menuItemText) {\r\n case Open_MenuItem:\r\n this.openSite(eventData, this.helper.ContextMenuDataItem);\r\n break;\r\n case CopyLink_MenuItem:\r\n let url: string = `${location.origin}/site/${this.helper.ContextMenuDataItem?.id}`;\r\n this.clipboard.copy(url);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n\r\n public get ShowAllForAdminButton(): boolean {\r\n return this.currentUserService.user.isSystemAdmin;\r\n }\r\n public get ShowDeleteButtons(): boolean {\r\n return this.currentUserService.user.isSystemAdmin;\r\n }\r\n\r\n public get CommandColumnWidth(): number {\r\n return this.ShowDeleteButtons ? 82 : 55;\r\n }\r\n\r\n public get MenuItems(): IMenuItem[] {\r\n return this.menuItems;\r\n }\r\n\r\n // Getters / Setters\r\n public get Helper(): KendoGridHelper {\r\n return this.helper;\r\n }\r\n\r\n public get ShowAllForAdmin(): boolean {\r\n return this.showAllForAdmin;\r\n }\r\n\r\n public get ShowAllForAdminButtonText(): string {\r\n return this.showAllForAdmin ? \"Show only Sites you have access to\" : \"Show All for Admin\";\r\n }\r\n\r\n public get ColumnDefs() {\r\n return this.columnDefs.filter(x => { return x.fieldName != 'isFavorite' });\r\n }\r\n\r\n public get FavoriteColumnDef() {\r\n var faveCol = this.columnDefs.find(x => { return x.fieldName == 'isFavorite' });\r\n return faveCol;\r\n }\r\n\r\n // Getters for virtual scrolling\r\n public get PageSize(): number {\r\n return this.kendoGridData.gridState.take;\r\n }\r\n\r\n public get Skip(): number {\r\n return this.kendoGridData.gridState.skip;\r\n }\r\n public get Sort(): SortDescriptor[] {\r\n return this.kendoGridData.gridState.sort;\r\n }\r\n\r\n}\r\n","import { SortDescriptor, State, CompositeFilterDescriptor, FilterDescriptor } from \"@progress/kendo-data-query\";\r\nexport class CrossSiteUserNotificationsStateInfo {\r\n public editedRowIndex: number;\r\n\r\n public gridState: State = {\r\n sort: [],\r\n skip: 0,\r\n take: 500,\r\n filter: {\r\n filters: [],\r\n logic: 'and'\r\n }\r\n };\r\n}\r\n\r\nexport class CrossSiteUserNotificationsColumnDef {\r\n public fieldName: string;\r\n public title: string;\r\n public width: string;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { State } from \"@progress/kendo-data-query\";\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map, tap } from \"rxjs/operators\";\r\n\r\nimport { environment } from \"../../../environments/environment\";\r\nimport { CustomDateFormatDirective } from \"../directives/custom-date-format.directive\";\r\nimport { CrossSiteUserNotificationsResults } from '../models/site-content/cross-site-user-notifications.model';\r\nimport { ProgressIndicatorService } from \"./progress-indicator.service\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CrossSiteUserNotificationsService extends BehaviorSubject {\r\n private url = environment.apiUrl;\r\n private endpoint: string = 'api/formInstance';\r\n private data: object[] = [];\r\n private loading = false;\r\n private gridData: CrossSiteUserNotificationsResults;\r\n\r\n public constructor(private http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(new CrossSiteUserNotificationsResults());\r\n }\r\n\r\n public read(gridState: State): void {\r\n this.fetch(gridState, 'getCrossSiteUserNotifications')\r\n .pipe(\r\n tap((data) => {\r\n this.gridData = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n private fetch(gridState: State, action: string): Observable {\r\n\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${action}`;\r\n return >this.http.post(url, gridState)\r\n .pipe(\r\n map((dataFromServer) => {\r\n dataFromServer.resultsAsPlainObjects = [];\r\n for (let dc of dataFromServer.results) {\r\n var plainObj = {\r\n formId: dc.formId,\r\n formName: dc.formName,\r\n siteId: dc.siteId,\r\n folderId: dc.folderId,\r\n siteName: dc.siteName,\r\n modifiedDate: CustomDateFormatDirective.applyDateFormattingUsing(\"yyyy-MM-dd HH:mm:ss\", dc.modifiedDate.toString()),\r\n modifiedBy: dc.modifiedBy,\r\n //modifiedByUserName: dc.modifiedByUserName,\r\n workflowState: dc.workflowState,\r\n\r\n isSuscribedToWorkflowChanges: true // Because it is returned in the list from the server.\r\n };\r\n dataFromServer.resultsAsPlainObjects.push(plainObj);\r\n }\r\n return dataFromServer;\r\n })\r\n );\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Directive, OnInit, OnDestroy } from '@angular/core';\r\nimport { DataBindingDirective, GridComponent } from '@progress/kendo-angular-grid';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { CrossSiteUserNotificationsService } from '../services/cross-site-user-notifications.service';\r\n\n@Directive({\n selector: '[appCrossSiteUserNotificationsRemoteBinding]',\n exportAs: 'remoteBindingDirectiveRef',\n standalone: false\n})\nexport class CrossSiteUserNotificationsRemoteBindingDirective extends DataBindingDirective implements OnInit, OnDestroy {\n // Properties.\r\n private serviceSubscription: Subscription;\r\n private showAllForAdmin: boolean;\r\n\r\n // Constructor.\n public constructor(private http: HttpClient, grid: GridComponent, private service: CrossSiteUserNotificationsService) {\r\n super(grid);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit() {\r\n this.serviceSubscription = this.service.subscribe((data) => {\r\n // this code called whenever the service has new data to present, triggered by calls to the rebind() callback function\r\n // (which DataBindingDirective takes care of calling when grid state changes)...\r\n this.grid.loading = false;\r\n this.grid.data = data.resultsAsPlainObjects;\r\n this.notifyDataChange();\r\n });\r\n\r\n super.ngOnInit();\r\n this.rebind();\r\n }\r\n\r\n // A callback which the DataBindingDirective super class takes care of calling automatically when the grid's state changes\r\n public rebind(): void {\r\n this.grid.loading = true;\r\n this.service.read(this.state);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.serviceSubscription) {\r\n this.serviceSubscription.unsubscribe();\r\n }\r\n\r\n super.ngOnDestroy();\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n
\r\n \r\n {{SubscribedIcon(dataItem)}}\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n","import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';\r\nimport { KendoGridHelper } from '../../kendo-grid-helper';\r\nimport { MultipleSortSettings } from '@progress/kendo-angular-grid';\r\nimport { SortDescriptor, State, CompositeFilterDescriptor, FilterDescriptor } from \"@progress/kendo-data-query\";\r\nimport { CrossSiteUserNotificationsColumnDef, CrossSiteUserNotificationsStateInfo } from './cross-site-user-notifications.classes';\r\nimport { Router } from '@angular/router';\r\n//import { CrossSiteUserFavoriteFormsData } from '../../models/site-content/cross-site-user-favorite-form.model';\r\nimport { CrossSiteUserNotificationsData } from '../../models/site-content/cross-site-user-notifications.model';\r\nimport { CrossSiteUserNotificationsRemoteBindingDirective } from '../../directives/cross-site-user-notifications.directive';\r\nimport { FormInstanceService } from '../../services/form-instance.service';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'app-cross-site-user-notifications',\r\n //imports: [],\r\n templateUrl: './cross-site-user-notifications.component.html',\r\n styleUrl: './cross-site-user-notifications.component.scss',\r\n standalone: false\r\n})\r\nexport class CrossSiteUserNotificationsComponent {\r\n // Properties.\r\n @ViewChild(CrossSiteUserNotificationsRemoteBindingDirective) public remoteBindingDirectiveRef: CrossSiteUserNotificationsRemoteBindingDirective;\r\n private helper = new KendoGridHelper();\r\n private kendoGridData: CrossSiteUserNotificationsStateInfo = new CrossSiteUserNotificationsStateInfo();\r\n\r\n // Configuration data.\r\n public columnDefs: CrossSiteUserNotificationsColumnDef[] = [\r\n { fieldName: 'formName', title: 'Name', width: '200' },\r\n { fieldName: 'siteName', title: 'Site', width: '75' },\r\n { fieldName: 'modifiedDate', title: 'Modified Date', width: '75' },\r\n { fieldName: 'modifiedBy', title: 'Modified By', width: '75' },\r\n { fieldName: 'workflowState', title: 'Status', width: '75' }\r\n ];\r\n\r\n // Constructor.\r\n public constructor(private router: Router, private dialog: MatDialog, private formInstanceService: FormInstanceService) { }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n }\r\n\r\n // Define property-related methods used by my HTML code.\r\n public SubscribedIcon(dataItem: CrossSiteUserNotificationsData): string {\r\n if (dataItem.isSuscribedToWorkflowChanges) {\r\n return \"notifications_active\";\r\n } else {\r\n return \"notifications\";\r\n }\r\n }\r\n\r\n public get SortSettings(): any {\r\n let settings: MultipleSortSettings = {\r\n //mode: \"multiple\",\r\n initialDirection: \"asc\",\r\n allowUnsort: true,\r\n showIndexes: true,\r\n };\r\n return settings;\r\n }\r\n\r\n // Getters / Setters\r\n public get ColumnDefs() {\r\n return this.columnDefs;\r\n }\r\n\r\n public get Helper(): KendoGridHelper {\r\n return this.helper;\r\n }\r\n // Getters for virtual scrolling\r\n public get PageSize(): number {\r\n return this.kendoGridData.gridState.take;\r\n }\r\n\r\n public get Skip(): number {\r\n return this.kendoGridData.gridState.skip;\r\n }\r\n public get Sort(): SortDescriptor[] {\r\n return this.kendoGridData.gridState.sort;\r\n }\r\n\r\n // Methods for handling control events.\r\n public openForm(dataItem: CrossSiteUserNotificationsData): void {\r\n window.open(`/site/${dataItem.siteId}/structure/folder/${dataItem.folderId}/form/${dataItem.formId}`, '_blank').focus();\r\n //this.router.navigateByUrl(`/site/${dataItem.siteId}/structure/folder/${dataItem.folderId}/form/${dataItem.formId}`);\r\n }\r\n\r\n public toggleSubscribed(dataItem: CrossSiteUserNotificationsData): void {\r\n // If the user is unsubscribing, give them a warning that it will be removed from the Grid\r\n /*\r\n if (dataItem.isFavorite) {\r\n let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n width: \"400px\",\r\n data: new ConfirmationDialogModel(\r\n `Unfave`,\r\n `Are you sure you want to unfave the Form \"${dataItem.formName}\"?

If you proceed it will continue to display in this grid for now, but will no longer be displayed upon reload.`\r\n )\r\n });\r\n dialogRef.afterClosed().subscribe(yes => {\r\n if (yes) {\r\n this.doToggleSubscribed(dataItem);\r\n }\r\n });\r\n } else {\r\n this.doToggleSubscribed(dataItem);\r\n }\r\n */\r\n this.doToggleSubscribed(dataItem);\r\n }\r\n\r\n // Helper methods.\r\n private doToggleSubscribed(dataItem: CrossSiteUserNotificationsData) {\r\n //dataItem.isSuscribedToWorkflowChanges = !dataItem.isSuscribedToWorkflowChanges;\r\n let newIsSubscribedValue: boolean = !dataItem.isSuscribedToWorkflowChanges;\r\n this.formInstanceService.toggleIsSubscribedToWorkflowChanges(dataItem.formId, newIsSubscribedValue).then(fi => {\r\n // Now that the server has responded, we can update the form's icon.\r\n dataItem.isSuscribedToWorkflowChanges = newIsSubscribedValue;\r\n });\r\n }\r\n}\r\n","import { ErrorHandler, Injector, NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { AppRoutingModule } from './app-routing.module';\r\n\r\n// Material Design Modules\r\nimport { MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\n\r\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\n//import { MatPaginatorModule } from '@angular/material/paginator';\r\n\r\nimport {\r\n DateAdapter,\r\n MAT_DATE_FORMATS,\r\n MatNativeDateModule,\r\n} from '@angular/material/core';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\n//import { MatMomentDateModule } from '@angular/material-moment-adapter';\r\n//import { MatStepperModule } from '@angular/material/stepper';\r\n//import { DemoMaterialModule } from './material-module';\r\n//import { TreeFlatOverviewExample } from './app/tree-flat-overview-example';\r\n//import { MatTreeModule } from '@angular/material/tree';\r\nimport { ContextMenuModule } from 'primeng/contextmenu';\r\nimport { TreeModule } from 'primeng/tree';\r\n\r\nimport { CurrentUserService } from './security/current-user.service';\r\nimport { CommunicationService } from './shared/services/communication.service';\r\nimport { NavigationService } from './shared/services/navigation.service';\r\n//import { ClipboardService } from './shared/services/clipboard.service';\r\nimport { CasService } from \"./security/cas.service\";\r\nimport { HttpRequestInterceptor } from './shared/http-request-interceptor';\r\n\r\nimport { BrowserCheckComponent } from \"./security/browser-check/browser-check.component\";\r\nimport { LogInOutComponent } from \"./security/loginout/loginout.component\";\r\nimport { PageNotFoundComponent } from './shared/components/page-not-found.component';\r\n\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { AppComponent } from './app.component';\r\nimport { SharedModule } from './modules/shared.module';\r\nimport { LoadingSpinnerComponent } from './shared/components/loading-spinner/loading-spinner.component';\r\nimport { SideNavContainerComponent } from './shared/components/side-nav-container/side-nav-container.component';\r\nimport { AlertDialogComponent } from './shared/dialogs/alert/alert-dialog.component';\r\nimport { DeleteRestoreAttachmentDialog } from './shared/dialogs/delete-restore-attachment/delete-restore-attachment.dialog';\r\nimport { CollectionDetailDialog } from './shared/dialogs/collection-detail/collection-detail.dialog';\r\nimport { ConfirmationDialogComponent } from './shared/dialogs/confirmation/confirmation-dialog.component';\r\nimport { GridPasteKendoDialog } from './shared/dialogs/grid-paste-kendo/grid-paste-kendo.dialog';\r\nimport { GridPasteDialog } from './shared/dialogs/grid-paste/grid-paste.dialog';\r\nimport { NewFolderDialog } from './shared/dialogs/new-folder/new-folder.dialog';\r\nimport { RoleMembershipDialog } from './shared/dialogs/role-membership/role-membership.dialog';\r\nimport { LoaderIntercepter } from './shared/loader-intercepter';\r\nimport { DataCollectionResolver } from './shared/resolvers/data-collection.resolver';\r\nimport { FormInstanceResolver } from './shared/resolvers/form-instance.resolver';\r\nimport { MenuResolver } from './shared/resolvers/menu.resolver';\r\nimport { SiteResponseManagementResolver } from './shared/resolvers/site-response-management.resolver';\r\nimport { AdminService } from './shared/services/admin.service';\r\nimport { DataCollectionService } from './shared/services/data-collection.service';\r\nimport { FolderService } from './shared/services/folder.service';\r\nimport { FormInstanceService } from './shared/services/form-instance.service';\r\nimport { LoaderService } from './shared/services/loader.service';\r\nimport { MenuService } from './shared/services/menu.service';\r\nimport { SiteResponseManagementService } from './shared/services/site-response-management.service';\r\nimport { AdminComponent } from './views/admin/admin.component';\r\nimport { ErrorComponent } from './views/error/error.component';\r\nimport { HomeComponent } from './views/home/home.component';\r\nimport { HttpErrorComponent } from './views/http-error/http-error.component';\r\nimport { LandingPageComponent } from './views/landing-page/landing-page.component';\r\nimport { SiteComponent } from './views/site/site.component';\r\nimport { ContextMenuComponent } from \"@progress/kendo-angular-menu\";\r\n//import { FormulaFormFieldComponent } from './shared/components/form-fields/formula-form-field/formula-form-field.component';\r\nimport { NewFormInstanceDialog } from './shared/dialogs/new-form-instance/new-form-instance.dialog';\r\nimport { TestConfigurationService } from './shared/services/test-configuration.service';\r\n//import { WorkflowsComponent } from './views/site/workflows/workflows.component';\r\nimport { WorkflowResolver } from './shared/resolvers/workflow.resolver';\r\nimport { KeepAliveService } from './shared/services/keep-alive.service';\r\nimport { WorkflowService } from './shared/services/workflow.service';\r\n//import { FolderTreeResolver } from './shared/resolvers/folder-tree.resolver';\r\nimport { ClaimGuard } from './route-guards/claim.route-guard';\r\nimport { ProgressIndicatorComponent } from './shared/components/progress-indicator/progress-indicator.component';\r\nimport { RoleDetailsDialog } from './shared/dialogs/role-details/role-details.dialog';\r\nimport { GlobalErrorHandler } from './shared/global-error-handler';\r\nimport { ClaimResolver } from './shared/resolvers/claim.resolver';\r\nimport { AsyncJobService } from './shared/services/async-job.service';\r\nimport { AttachmentService } from './shared/services/attachment.service';\r\nimport { BrowserStorageService } from './shared/services/browserstorage.service';\r\nimport { ClaimService } from './shared/services/claim.service';\r\nimport { ProgressIndicatorService } from './shared/services/progress-indicator.service';\r\nimport { SettingsService } from './shared/services/settings.service';\r\n//import { FileUploaderComponent } from './shared/components/file-uploader/file-uploader.component';\r\nimport { FileUploadDialogComponent } from './shared/dialogs/file-upload/file-upload-dialog.component';\r\nimport { SelectOptionsDialog } from './shared/dialogs/select-options/select-options.dialog';\r\n//import { PermissionsDialog } from './shared/dialogs/permissions/permissions.dialog'; \r\nimport { UnsavedChangesGuard } from './route-guards/unsaved-changes.route-guard';\r\nimport { CopySiteDialog } from './shared/dialogs/copy-site/copy-site.dialog';\r\nimport { ExportSiteDialog } from './shared/dialogs/export-site/export-site.dialog';\r\nimport { ImportSiteDialog } from './shared/dialogs/import-site/import-site.dialog';\r\nimport { DragDropFilesDirective } from './shared/directives/drag-and-drop-files.directive';\r\nimport { CopySiteService } from './shared/services/copy-site.service';\r\nimport { DeleteOnConfirmDialogService } from './shared/services/delete-on-confirm-dialog.service';\r\nimport { ExcelExportService } from './shared/services/excel-export.service';\r\nimport { ExcelImportService } from './shared/services/excel-import.service';\r\nimport { ExportDataService } from './shared/services/export-data.service';\r\nimport { ExportMetadataService } from './shared/services/export-metadata.service';\r\nimport { FormBuilderService } from './shared/services/form-builder.service';\r\nimport { ImportDataService } from './shared/services/import-data.service';\r\nimport { ImportMetadataService } from './shared/services/import-metadata.service';\r\nimport { PermissionsPreviewService } from './shared/services/permissions-preview.service';\r\n\r\nimport { CUSTOM_DATE_FORMATS, CustomDatePickerAdapter } from './shared/adapters/date-adapter';\r\nimport { CopySiteAndTransformComponent } from './shared/components/copy-site-and-transform/copy-site-and-transform.component';\r\nimport { NotificationCenterComponent } from './shared/components/notification-center/notification-center.component';\r\nimport { ConfigureRolePermissionsDialog } from './shared/dialogs/configure-role-permissions/configure-role-permissions.dialog';\r\nimport { CopyFormInstanceDialog } from './shared/dialogs/copy-form-instance/copy-form-instance.dialog';\r\nimport { CopyFormDialog } from './shared/dialogs/copy-form/copy-form.dialog';\r\nimport { MoveListItemDialog } from './shared/dialogs/move-list-item/move-list-item.dialog';\r\nimport { SubscribeToWorkflowTransitionDialog } from './shared/dialogs/subscribe/subscribe-to-workflow-transition/subscribe-to-workflow-transition.dialog';\r\nimport { VnextReleaseFeaturesDialog } from './shared/dialogs/vnext-release-features/vnext-release-features.dialog';\r\nimport { WorkflowTransitionsComponent } from './shared/dialogs/workflow-transitions/workflow-transitions.component';\r\nimport { DragDropService } from './shared/services/drag-drop.service';\r\nimport { EventSubscriptionService } from './shared/services/event-subscription.service';\r\n//import { FieldDefinitionService } from './shared/services/field-definition.service';\r\nimport { FormFieldTypeAndNameService } from './shared/services/form-field-type-and-name.service';\r\nimport { GeocodeService } from './shared/services/geocode.service';\r\nimport { NotificationService } from './shared/services/notification.service';\r\nimport { AttributionsComponent } from './views/attributions/attributions.component';\r\nimport { DocumentPublishingComponent } from './views/site/document-publishing/document-publishing.component';\r\n//import { ScriptableBaseComponent } from './shared/components/scriptable-base/scriptable-base.component';\r\nimport { SelectedComponentInfoComponent } from './shared/components/selected-component-info/selected-component-info.component';\r\nimport { SelectedNodeElementComponent } from './shared/components/selected-node-element/selected-node-element.component';\r\nimport { RouterLinkComponent } from './shared/components/wrappers/router-link/router-link.component';\r\nimport { EditValueDialog } from './shared/dialogs/edit-value/edit-value.dialog';\r\nimport { ComponentHierarchyService } from './shared/services/component-hierarchy.service';\r\nimport { HtmlElementTypeService } from './shared/services/html-element-type.service';\r\n//import { ComponentHierarchyComponent } from './shared/components/component-hierarchy/component-hierarchy.component';\r\nimport { BulkWorkflowDialog } from './shared/dialogs/bulk-workflow/bulk-workflow.dialog';\r\nimport { UITestCenterDialog } from './shared/dialogs/ui-test-center/ui-test-center.dialog';\r\n//import { SelectedServiceInfoComponent } from './shared/components/selected-service-info/selected-service-info.component';\r\n//import { SelectedServiceMethodComponent } from './shared/components/selected-service-method/selected-service-method.component';\r\nimport { GridModule } from '@progress/kendo-angular-grid';\r\nimport { CrossSiteUserFavoriteFormsComponent } from './shared/components/cross-site-user-favorite-forms/cross-site-user-favorite-forms.component';\r\nimport { SiteGridComponent } from './shared/components/site-grid/site-grid.component';\r\nimport { EditInputParametersDialog } from './shared/dialogs/edit-input-parameters/edit-input-parameters.dialog';\r\nimport { CrossSiteUserFavoriteFormsRemoteBindingDirective } from './shared/directives/cross-site-user-favorite-forms.directive';\r\nimport { SiteGridRemoteBindingDirective } from './shared/directives/site-grid-remote-binding.directive';\r\nimport { ExcelTemplateService } from './shared/services/excel-template.service';\r\nimport { RoleService } from './shared/services/role.service';\r\nimport { SiteETLService } from './shared/services/site-etl.service';\r\nimport { SiteIconService } from './shared/services/site-icon.service';\r\n//import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { GridPresetFiltersDialog } from './shared/dialogs/grid-preset-filters/grid-preset-filters-dialog.component';\r\nimport { CrossSiteUserNotificationsComponent } from './shared/components/cross-site-user-notifications/cross-site-user-notifications.component';\r\nimport { CrossSiteUserNotificationsRemoteBindingDirective } from './shared/directives/cross-site-user-notifications.directive';\r\nimport { ConstraintFromMdsDialog } from './shared/dialogs/constraint-from-mds-dialog/constraint-from-mds-dialog.component';\r\n\r\n//import { GridModule } from '@progress/kendo-angular-grid';\r\n\r\nexport let AppInjector: Injector;\r\n\r\n@NgModule({\r\n imports: [\r\n GridModule,\r\n SharedModule,\r\n BrowserModule,\r\n BrowserAnimationsModule,\r\n MatTooltipModule,\r\n AppRoutingModule,\r\n HttpClientModule,\r\n ContextMenuComponent,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatProgressBarModule,\r\n //MatPaginatorModule, \r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n TreeModule,\r\n ContextMenuModule,\r\n //GridModule,\r\n //MatStepperModule\r\n //MatMomentDateModule\r\n //DemoMaterialModule\r\n //MatTreeModule \r\n ],\r\n //entryComponents: [TreeFlatOverviewExample],\r\n declarations: [\r\n // System Components\r\n AppComponent,\r\n LogInOutComponent,\r\n BrowserCheckComponent,\r\n PageNotFoundComponent,\r\n //TreeFlatOverviewExample,\r\n // Views\r\n HomeComponent,\r\n ErrorComponent,\r\n AdminComponent,\r\n SiteComponent,\r\n // Shared\r\n SideNavContainerComponent,\r\n LandingPageComponent,\r\n CollectionDetailDialog,\r\n NewFolderDialog,\r\n LoadingSpinnerComponent,\r\n ConfirmationDialogComponent,\r\n AlertDialogComponent,\r\n GridPasteDialog,\r\n GridPasteKendoDialog,\r\n GridPresetFiltersDialog,\r\n ConstraintFromMdsDialog,\r\n HttpErrorComponent,\r\n RoleMembershipDialog,\r\n NewFormInstanceDialog,\r\n RoleDetailsDialog,\r\n ProgressIndicatorComponent,\r\n FileUploadDialogComponent,\r\n SelectOptionsDialog,\r\n CopySiteDialog,\r\n ExportSiteDialog,\r\n ImportSiteDialog,\r\n DragDropFilesDirective,\r\n ConfigureRolePermissionsDialog,\r\n CopyFormDialog,\r\n CopyFormInstanceDialog,\r\n CopySiteAndTransformComponent,\r\n AttributionsComponent,\r\n DocumentPublishingComponent,\r\n MoveListItemDialog,\r\n WorkflowTransitionsComponent,\r\n //TEAMS-192: KLW - Reference to Workflow Transitions component\r\n VnextReleaseFeaturesDialog,\r\n //NotificationCenterComponent,\r\n SubscribeToWorkflowTransitionDialog,\r\n RouterLinkComponent,\r\n EditValueDialog,\r\n SelectedNodeElementComponent,\r\n SelectedComponentInfoComponent,\r\n //ComponentHierarchyComponent,\r\n UITestCenterDialog,\r\n BulkWorkflowDialog,\r\n EditInputParametersDialog,\r\n SiteGridComponent,\r\n SiteGridRemoteBindingDirective,\r\n CrossSiteUserFavoriteFormsComponent,\r\n CrossSiteUserFavoriteFormsRemoteBindingDirective,\r\n DeleteRestoreAttachmentDialog,\r\n CrossSiteUserNotificationsComponent,\r\n CrossSiteUserNotificationsRemoteBindingDirective,\r\n ],\r\n providers: [\r\n //FieldDefinitionService, //Kevin - causing ?undefined? error\r\n { provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: { width: '500px', autoFocus: true, hasBackdrop: true } },\r\n // see https://weblog.west-wind.com/posts/2019/Apr/07/Creating-a-custom-HttpInterceptor-to-handle-withCredentials\r\n { provide: HTTP_INTERCEPTORS, useClass: HttpRequestInterceptor, multi: true },\r\n LoaderService,\r\n //FieldDefinitionService,\r\n KeepAliveService,\r\n AsyncJobService,\r\n { provide: HTTP_INTERCEPTORS, useClass: LoaderIntercepter, multi: true },\r\n CurrentUserService,\r\n CasService,\r\n AdminService,\r\n MenuService,\r\n ClaimService,\r\n CommunicationService,\r\n NavigationService,\r\n DataCollectionService,\r\n FolderService,\r\n DataCollectionResolver,\r\n MenuResolver,\r\n ClaimResolver,\r\n ClaimGuard, //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, extra commas in the module definitions are no longer tolerated\r\n UnsavedChangesGuard,\r\n FormInstanceResolver,\r\n FormInstanceService,\r\n SiteResponseManagementService,\r\n SiteResponseManagementResolver,\r\n TestConfigurationService,\r\n WorkflowService,\r\n WorkflowResolver,\r\n //FolderTreeResolver,\r\n SettingsService,\r\n BrowserStorageService,\r\n ProgressIndicatorService,\r\n AttachmentService,\r\n DeleteOnConfirmDialogService,\r\n CopySiteService,\r\n PermissionsPreviewService,\r\n DragDropService,\r\n ImportMetadataService,\r\n ExportMetadataService,\r\n ImportDataService,\r\n ExportDataService,\r\n ExcelExportService,\r\n // ExcelImportService,\r\n // FormBuilderService, // Note: defining FormBuilderService here to make sure it is implemented as a singleton.\r\n // FieldDefinitionService, //Kevin - causing ?undefined? error\r\n GeocodeService,\r\n FormFieldTypeAndNameService,\r\n NotificationService,\r\n EventSubscriptionService,\r\n ComponentHierarchyService,\r\n HtmlElementTypeService,\r\n ExcelTemplateService,\r\n SiteIconService,\r\n SiteETLService,\r\n RoleService,\r\n ExcelImportService,\r\n FormBuilderService,\r\n { provide: ErrorHandler, useClass: GlobalErrorHandler },\r\n { provide: DateAdapter, useClass: CustomDatePickerAdapter },\r\n { provide: MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS }\r\n ],\r\n //bootstrap: [TreeFlatOverviewExample]\r\n bootstrap: [AppComponent]\r\n})\r\n//export let AppInjector: Injector;\r\nexport class AppModule {\r\n constructor(private injector: Injector) {\r\n AppInjector = this.injector;\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { Draggable } from './directives/draggable.directive';\r\nimport { Droppable } from './directives/droppable.directive';\r\nimport { NgDragDropService } from './services/ng-drag-drop.service';\r\n\r\n\r\n@NgModule({\r\n imports: [],\r\n declarations: [\r\n Draggable,\r\n Droppable\r\n ],\r\n exports: [\r\n Draggable,\r\n Droppable\r\n ]\r\n})\r\nexport class NgDragDropModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: NgDragDropModule,\r\n providers: [NgDragDropService]\r\n };\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common'; // contains ngIf and the like\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\n// TODO -- Tried putting this in its own module but it didn't work...don't know why\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatNativeDateModule } from '@angular/material/core';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\n//import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n//import { MatPaginatorModule } from '@angular/material/paginator';\r\n\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { DndModule } from 'ngx-drag-drop';\r\n\r\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet'; //TEAMS-192: KLW - Reference to Material Bottom Sheet\r\nimport { BaseViewComponent } from '../shared/components/list-view/base-view/base-view.component';\r\nimport { GridViewComponent } from '../shared/components/list-view/grid-view/grid-view.component';\r\nimport { ListViewComponent } from '../shared/components/list-view/list-view.component';\r\nimport { TileViewComponent } from '../shared/components/list-view/tile-view/tile-view.component';\r\nimport { SiteDetailsComponent } from '../shared/components/site-details/site-details.component';\r\nimport { SiteEditorComponent } from '../shared/components/site-editor/site-editor.component';\r\nimport { ToggleFavoriteComponent } from '../shared/components/toggle-favorite/toggle-favorite.component';\r\nimport { IconDirective } from '../shared/directives/icon.directive'; //TEAMS-424: KLW - Add reference to IconDirective \r\nimport { NgDragDropService } from '../shared/external-libraries/ng-drag-drop/services/ng-drag-drop.service';\r\nimport { Draggable } from '../shared/external-libraries/ng-drag-drop/directives/draggable.directive';\r\nimport { Droppable } from '../shared/external-libraries/ng-drag-drop/directives/droppable.directive';\r\nimport { NgDragDropModule } from '../shared/external-libraries/ng-drag-drop/ng-drag-drop.module';\r\nimport { FieldDefinitionService } from '../shared/services/field-definition.service';\r\n //import { DragDropFilesDirective } from '../shared/directives/drag-and-drop-files.directive';\r\n//import { SafePipe } from '../shared/pipes/safe.pipe'; //TEAMS-424: KLW - Add reference to SafePipe\r\n\r\n@NgModule({\r\n imports: [CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n\r\n MatMenuModule,\r\n MatCardModule,\r\n MatSidenavModule,\r\n MatIconModule,\r\n MatListModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n MatExpansionModule,\r\n //BrowserAnimationsModule,\r\n //MatTooltipModule,\r\n //MatProgressBarModule,\r\n //MatPaginatorModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatButtonModule,\r\n MatSelectModule,\r\n MatDialogModule,\r\n MatRadioModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatButtonToggleModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule, //VNEXT-101: KLW - Adding module for the material progress bar\r\n MatTableModule,\r\n MatSortModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatTabsModule,\r\n MatAutocompleteModule,\r\n\r\n DragDropModule, \r\n DndModule,\r\n //DragDropFilesDirective\r\n //SafePipe\r\n\r\n // Draggable,\r\n // Droppable,\r\n NgDragDropModule.forRoot()\r\n ],\r\n exports: [\r\n // Exported modules.\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatMenuModule,\r\n MatCardModule,\r\n MatSidenavModule,\r\n MatIconModule,\r\n MatListModule,\r\n MatToolbarModule,\r\n MatExpansionModule,\r\n //BrowserAnimationsModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatButtonModule,\r\n MatSelectModule,\r\n MatDialogModule,\r\n MatRadioModule,\r\n MatCheckboxModule,\r\n MatSlideToggleModule,\r\n MatButtonToggleModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule, //VNEXT-101: KLW - Adding module for material progress bar \r\n MatTableModule,\r\n MatSortModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatTabsModule,\r\n MatAutocompleteModule,\r\n \r\n DragDropModule, \r\n DndModule,\r\n\r\n // Draggable,\r\n // Droppable,\r\n\r\n NgDragDropModule,\r\n\r\n // Exported component classes.\r\n ListViewComponent,\r\n BaseViewComponent,\r\n TileViewComponent,\r\n GridViewComponent,\r\n SiteDetailsComponent,\r\n SiteEditorComponent,\r\n ToggleFavoriteComponent,\r\n IconDirective, //TEAMS-424: KLW - Add reference to IconDirective\r\n //DragDropFilesDirective\r\n MatBottomSheetModule //TEAMS-192: KLW - Reference to Material Bottom Sheet\r\n ],\r\n declarations: [\r\n \r\n ListViewComponent,\r\n BaseViewComponent,\r\n TileViewComponent,\r\n GridViewComponent,\r\n SiteDetailsComponent,\r\n SiteEditorComponent, \r\n ToggleFavoriteComponent,\r\n IconDirective, //TEAMS-424: KLW - Add reference to IconDirective\r\n //DragDropFilesDirective\r\n ],\r\n providers: [ \r\n //FieldDefinitionService, //Kevin - causing ?undefined? error\r\n FieldDefinitionService,\r\n ]\r\n})\r\nexport class SharedModule { }\r\n","import { Injectable } from \"@angular/core\";\r\nimport { CanActivate, Router, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot, RouterState } from '@angular/router';\r\nimport { Logging } from '../shared/logging';\r\nimport { DataCollection } from '../shared/models/site-content/data-collection.model';\r\nimport { ClaimService } from '../shared/services/claim.service';\r\nimport { CurrentFolderService } from \"../shared/services/current-folder.service\";\r\nimport { CurrentSiteService } from '../shared/services/current-site.service';\r\nimport { DataCollectionService } from '../shared/services/data-collection.service';\r\n\n@Injectable()\nexport class ClaimGuard implements CanActivate {\n\r\n SPECIAL_CASES = {\r\n SITE_SUMMARY: 'CanViewSiteSummary',\r\n SITE_PERMISSIONS: 'CanViewSitePermissions'\r\n }\r\n\r\n constructor(\r\n private router: Router,\r\n private claimService: ClaimService,\r\n private currentSiteService: CurrentSiteService,\r\n private currentFolderService: CurrentFolderService,\r\n private dataCollectionService: DataCollectionService) { }\n\r\n doClaimServiceCall(requiredClaim: string, site: DataCollection, route: ActivatedRouteSnapshot) {\r\n return this.claimService.has(requiredClaim, site).then(hasClaim => {\n //console.log(\"MESSAGE FROM ClaimGuard: \" + requiredClaim + \"?...\" + hasClaim);\r\n if (hasClaim) {\n return true;\r\n } else {\r\n // See https://kirjai.com/dynamic-guard-redirects-angular/\r\n let siteId = route.parent.url[1]?.path;\r\n if (siteId && route.data.redirectToWhenCannotActivate) {\r\n this.router.navigate(['site', siteId, route.data.redirectToWhenCannotActivate]);\r\n }\r\n return false;\r\n }\n });\r\n }\r\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\n\n // Originally I wanted ClaimGuard to validate against claims obtained in the parent route's ClaimResolver\n // However, due to the issue reported here https://github.com/angular/angular/issues/24187 a resolver\n // on a parent route won't run until the child route's guard returns true...\n // So the guard gets claims directly from ClaimService rather than parent route's resolver\n\n let requiredClaim = route.data.requiredClaim;\r\n let site = route.parent.data.currentSite;\n\r\n // When first navigating to the default site route (Site Summary) site will be null because the Resolver\r\n // on a parent route doesn't run until a child route resolves. So in this case need to\r\n // use the DataCollectionService to get the site, so we can test the user's claims against it.\r\n // After the first nav within site routes, site is available from the parent route.\r\n // To prevent a double fetch of the Site from the server, CurrentSiteService is used which the\r\n // parent route's Resolver can use to get the Site set here.\r\n if ((requiredClaim == this.SPECIAL_CASES.SITE_SUMMARY || requiredClaim == this.SPECIAL_CASES.SITE_PERMISSIONS) && site == null) {\r\n let siteIdFromParentRoute = parseInt(route.parent.url[1].path);\r\n if (this.currentSiteService.isCurrentSite(siteIdFromParentRoute)) {\r\n return this.doClaimServiceCall(requiredClaim, this.currentSiteService.Site, route);\r\n } else {\r\n return this.dataCollectionService.get(siteIdFromParentRoute).then(site => {\r\n this.currentSiteService.Site = site;\r\n this.currentFolderService.Folder = site.getRootFolder();\r\n return this.doClaimServiceCall(requiredClaim, site, route);\r\n });\r\n }\r\n } else {\r\n return this.doClaimServiceCall(requiredClaim, site, route);\r\n }\r\n }\r\n}\n","import { Injectable } from \"@angular/core\";\r\nimport { CanActivate, Router, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot, RouterState } from '@angular/router';\r\nimport { CurrentUserService } from '../security/current-user.service';\r\n\n@Injectable()\nexport class HomePageRouteGuard implements CanActivate {\r\n\r\n\r\n constructor(\r\n private router: Router,\r\n private currentUserService: CurrentUserService) { }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\r\n let siteId = parseInt(route.parent.url[1]?.path);\r\n\r\n return this.currentUserService.initialRouteToActiviateForUser(siteId).then(route => {\r\n if (route == 'summary') {\r\n this.router.navigate(['site', siteId, 'summary']);\r\n } else if (route == \"home-page\") {\r\n this.router.navigate(['site', siteId, 'home-page']);\r\n } else if (route == 'structure') {\r\n this.router.navigate(['site', siteId, 'structure']);\r\n }\r\n \r\n // returning false allows the manually performed navigation above to take effect, and effectively cancels the navigation initiated via the routing mechanism\r\n return false;\r\n });\r\n\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CanActivate, CanDeactivate } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\n\r\nexport interface HasUnsavedChanges {\r\n hasUnsavedChanges: () => boolean; // | Observable;\r\n}\r\n\r\n@Injectable()\r\nexport class UnsavedChangesGuard implements CanDeactivate {\r\n\r\n // Note: the following method is part of the mechanism that causes the browser to display a dialogue when the user tries to navigate and there are unsaved changes.\r\n // See https://stackoverflow.com/questions/35922071/warn-user-of-unsaved-changes-before-leaving-page\r\n public canDeactivate(component: HasUnsavedChanges): Observable | boolean {\r\n return component.hasUnsavedChanges() ?\r\n confirm(\"It appears you have made changes. Click Cancel to stay on this page, or click OK to navigate away and lose any changes.\") :\r\n true;\r\n }\r\n\r\n}\r\n","export class CurrentUser {\r\n groups: string[];\r\n samlAuthenticationStatementAuthMethod: string;\r\n userClassification: string;\r\n bureauName: string;\r\n maxAuthenticationGroups: string;\r\n phone: string;\r\n userStatus: string;\r\n authMethodAtPartnerIdp: string;\r\n bureauCode: string;\r\n partnerEntityId: string;\r\n eAuthLOA: string;\r\n middleName: string;\r\n orgTag: string;\r\n maxId: string;\r\n groupList: string;\r\n emailAddress: string;\r\n agencyCode: string;\r\n agencyName: string;\r\n lastName: string;\r\n firstName: string;\r\n // computed values\r\n displayName: string;\r\n authenticationGroups: string[];\n accessibleSites: boolean;\n\n get isSystemAdmin(): boolean {\n return this.groups.indexOf('COLLECT-VNEXT-SYSTEM-ADMINS') > -1;\n }\n\r\n get isSiteCreator(): boolean {\n return this.groups.indexOf('COLLECT-VNEXT-SITE-CREATORS') > -1;\n }\n\r\n get isProdSiteCreator(): boolean {\n return this.groups.indexOf('COLLECT-VNEXT-PROD-SITE-CREATORS(NONFED)') > -1;\n }\n\n get hasAccessibleSites(): boolean {\n return this.accessibleSites;\n }\r\n}\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpResponse, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { environment } from '../../environments/environment';\r\nimport { CurrentUser } from '../security/current-user.model';\r\n// import * as parseUri from 'parse-uri';\r\nimport parseUri from 'parse-uri'; //Kevin\r\nimport { Logging } from '../shared/logging';\r\nimport { BrowserStorageService } from '../shared/services/browserstorage.service';\r\nimport { BrowserStorageEnums } from '../shared/enums/browserstorage.enum';\r\n\r\n//import 'rxjs/add/operator/toPromise';\r\n\r\n@Injectable()\r\nexport class CurrentUserService {\r\n public loginPromise: Promise;\r\n\r\n private serviceUrl = '';\r\n private setCookieUrl = '';\r\n private checkCookieUrl = '';\r\n private noOpUrl = '';\r\n // pharvey - 9/1/2023 - added for site home page to determine if user should see\r\n // Site overview, strucuture or home-page screens\r\n private initialRouteToActiviateUrl = '';\r\n private cookieName = 'CookieSettingsCheck';\r\n private initialLoad: boolean = true;\r\n\r\n private _user: CurrentUser;\r\n private _browserOk: boolean = false;\r\n\r\n constructor(private http: HttpClient,\r\n private localStorageService: BrowserStorageService) {\r\n this.serviceUrl = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + \"frameworkapi/userinfo/maxattributes\";\r\n this.setCookieUrl = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + \"frameworkapi/health/setcookie\";\r\n this.checkCookieUrl = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + \"frameworkapi/health/checkcookie\";\r\n this.noOpUrl = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + \"frameworkapi/health/noop\";\r\n this.initialRouteToActiviateUrl = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + \"api/datacollection/initialRouteToActiviate\";\r\n }\r\n\r\n public getDomain(url): string {\r\n var u = parseUri(url);\r\n return u.host;\r\n }\r\n\r\n public get user(): CurrentUser {\r\n return this._user;\r\n }\r\n\r\n public get userIsLoggedIn(): boolean {\r\n return this._user != null;\r\n }\r\n\r\n public get browserOk(): boolean {\r\n return this._browserOk;\r\n }\r\n\r\n public get domain(): string {\r\n return this.getDomain(environment.loginSiteUrl);\r\n }\r\n\r\n public get siteUrl(): string {\r\n return environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\");\r\n }\r\n\r\n private getIdleLogout(): boolean {\r\n var retVal: boolean = false;\r\n\r\n if (this.localStorageService.get(BrowserStorageEnums.IDLELOGOUT, BrowserStorageService.SESSION_SCOPE))\r\n retVal = this.localStorageService.get(BrowserStorageEnums.IDLELOGOUT, BrowserStorageService.SESSION_SCOPE).toLowerCase() == 'true';\r\n\r\n return retVal\r\n }\r\n\r\n public get isIdleLogout(): boolean {\r\n return this.getIdleLogout();\r\n }\r\n\r\n public setIdleLogout(val) {\r\n this.localStorageService.set(BrowserStorageEnums.IDLELOGOUT, val, BrowserStorageService.SESSION_SCOPE);\r\n }\r\n\r\n // Called with a value of true in the following circumstances...\r\n // 1) The user clicks the \"LOG OUT\" menu option\r\n // 2) The user gets logged out do to a session timeout\r\n // 3) The users gets prompted with the \"Session Expiration Warning\" alert, and chooses \"No\" to continuing\r\n // The method sets a value in session storage and thus it will expire when the user closes their browser\r\n public setForcedLogout(val: boolean) {\r\n this.localStorageService.set(BrowserStorageEnums.FORCEDLOGOUT, val.toString(), BrowserStorageService.SESSION_SCOPE);\r\n }\r\n \r\n // For the duration of the browser session isForcedLogout will return the last set value of true or false\r\n // On new browser session, it will ALWAYS return false, and this plays into the automatic login that occurs\r\n // when a user opens a browser and navigates to the application\r\n public get isForcedLogout(): boolean {\r\n var retVal: boolean = false;\r\n\r\n if (this.localStorageService.get(BrowserStorageEnums.FORCEDLOGOUT, BrowserStorageService.SESSION_SCOPE))\r\n retVal = this.localStorageService.get(BrowserStorageEnums.FORCEDLOGOUT, BrowserStorageService.SESSION_SCOPE) == true.toString();\r\n\r\n return retVal\r\n }\r\n\r\n public browserCheck(): Promise {\r\n return this.http.get(this.noOpUrl, { withCredentials: false })\r\n .toPromise()\r\n .then(() => {\r\n return this.http.get(this.setCookieUrl, { withCredentials: true })\r\n .toPromise()\r\n .then(response => {\r\n return this.http.get(this.checkCookieUrl, { withCredentials: true })\r\n .toPromise().then(response => {\r\n this._browserOk = true;\r\n return true;\r\n })\r\n })\r\n .catch((error: Response) => {\r\n this._browserOk = false;\r\n this._user = null;\r\n return Promise.reject(\"Domain \" + this.getDomain(this.setCookieUrl) + \" probably doesn't allow CORS from domain \" + this.domain);\r\n });\r\n })\r\n .catch(error => {\r\n this._browserOk = false;\r\n this._user = null;\r\n return Promise.reject(\"Can't reach site \" + environment.loginSiteUrl + \" (\" + error + \")\");\r\n });\r\n }\r\n\r\n public preFlight(): Promise {\r\n return this.http.options(this.serviceUrl)\r\n .toPromise()\r\n .then(response => { return response; })\r\n .catch(this.handleError);\r\n }\r\n\r\n public login(): Promise {\r\n this.loginPromise = this.http.get(this.serviceUrl)\r\n .toPromise()\r\n .then((response: CurrentUser) => {\r\n var user: CurrentUser;\r\n user = Object.assign(new CurrentUser(), response);\r\n user.displayName = user.firstName + ' ' + (user.middleName == '' ? ' ' : user.middleName + '. ') + user.lastName + user.orgTag;\r\n user.authenticationGroups = user.maxAuthenticationGroups.split(\",\");\r\n this.setIdleLogout(false);\r\n this._user = user;\r\n return user;\r\n })\r\n .catch(error => {\r\n //console.log(\"==== login error: \" + error);\r\n return this.handleError(error);\r\n });\r\n\r\n return this.loginPromise;\r\n }\r\n\r\n // For a given site, returns true if the current user should see the Site's\r\n // Homepage by default\r\n public initialRouteToActiviateForUser(id: number){\r\n return this.http.get(`${this.initialRouteToActiviateUrl}/${id}`).toPromise().then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n public logout(idleLogout?: boolean) {\r\n this._user = null;\r\n // Added for VNEXT-591 - store the user's last url so we can send\r\n // them back there when they log back in.\r\n localStorage.setItem('urlBeforeLogout', window.location.href);\r\n this.setIdleLogout(idleLogout);\r\n }\r\n\r\n private handleError(error: any): Promise {\r\n return Promise.reject(error.message || error);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Task } from '../models/task.model';\n\nimport { plainToClass } from \"class-transformer\";\r\nimport { ImpersonatableUser } from '../models/impersonatable-user.model';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UserImpersonationService {\n\n private url: string;\n\r\n constructor(private http: HttpClient) { }\n\n public impersonate(userId: string): Promise {\n var url = `${environment.apiUrl}/api/impersonation/start/${userId}`;\n return this.http.get(url).toPromise();\r\n }\n\n public stopImpersonating(): Promise {\n var url = `${environment.apiUrl}/api/impersonation/stop`;\n return this.http.get(url).toPromise();\r\n }\n\n public checkIfImpersonating(): void {\n var url = `${environment.apiUrl}/api/impersonation/check`;\n this.http.get(url).toPromise().then(x => {\n console.log(`Message from api: ${x}`);\n });\r\n }\n\n public getImpersonatableUsers(): Promise {\n var url = `${environment.apiUrl}/api/impersonation/getImpersonatableUsers`;\n return this.http.get(url).toPromise();\r\n }\n}\n","
\r\n\r\n \r\n \r\n \r\n
\r\n
Hello, {{ currentUserService.user.displayName }}
\r\n \r\n
\r\n \r\n\r\n feedback\r\n person\r\n\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Router } from \"@angular/router\";\r\nimport { environment } from '../../../environments/environment';\r\nimport { AlertDialogComponent, AlertDialogModel } from '../../shared/dialogs/alert/alert-dialog.component';\r\nimport { UITestCenterDialogManager } from '../../shared/dialogs/ui-test-center/ui-test-center.dialog';\r\nimport { ImpersonatableUser } from '../../shared/models/impersonatable-user.model';\r\nimport { QueryParamsService } from '../../shared/services/query-params.service';\r\nimport { UserImpersonationService } from '../../shared/services/user-impersonation.service';\r\nimport { CurrentUserService } from \"../current-user.service\";\r\n\r\n@Component({\n selector: 'loginout',\n templateUrl: './loginout.component.html',\n styleUrls: ['./loginout.component.scss'],\n standalone: false\n})\r\nexport class LogInOutComponent implements OnInit {\r\n public constructor(\r\n public currentUserService: CurrentUserService,\r\n public impersonationService: UserImpersonationService,\r\n private queryParamsService: QueryParamsService,\r\n private router: Router,\r\n public dialog: MatDialog) {\r\n }\r\n\r\n private myUrl = '';\r\n private myLocation: Location;\r\n public impersonatableUsers: ImpersonatableUser[];\r\n public isLoggedIn: boolean = false;\r\n\r\n public ngOnInit(): void {\r\n this.myUrl = window.location.href;\r\n this.myLocation = window.location;\r\n\r\n if (!this.currentUserService.browserOk) {\r\n this.currentUserService.browserCheck().then(response => { });\r\n }\r\n if (!this.currentUserService.isForcedLogout) {\r\n this.loginButtonHidden = true;\r\n this.currentUserService.login().then(response => {\r\n this.isLoggedIn = true;\r\n this.impersonationService.getImpersonatableUsers().then(x => {\r\n this.impersonatableUsers = x;\r\n });\r\n }).catch(err => {\r\n if (!this.currentUserService.isIdleLogout) {\r\n this.logIn(true);\r\n }\r\n });\r\n }\r\n else {\r\n // PJH - 7/1/2024 - commented out as part of work on VNEXT-591\r\n //this.currentUserService.setForcedLogout(false);\r\n }\r\n }\r\n\r\n public logIn(login: boolean = true) {\r\n //console.log('LoginOut.logIn() INSTANCE VERSION! UrlBeforeLogout=' + localStorage.getItem('UrlBeforeLogout'));\r\n this.currentUserService.setForcedLogout(false);\r\n let startingUrl = this.setStartingUrl();\r\n this.currentUserService.setIdleLogout(false);\r\n this.currentUserService.setForcedLogout(false);\r\n let url = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + environment.loginPage + \"?ReturnUrl=\" + encodeURIComponent(startingUrl);\r\n window.open(url, '_self');\r\n }\r\n \r\n public logOut(): void {\r\n this.isLoggedIn = false;\r\n this.currentUserService.setForcedLogout(true);\r\n this.currentUserService.setIdleLogout(false);\r\n this.currentUserService.logout(false);\r\n var url = environment.loginSiteUrl + (environment.loginSiteUrl.endsWith(\"/\") ? \"\" : \"/\") + environment.logoutPage + \"?ReturnUrl=\" + encodeURIComponent(this.myLocation.origin);\r\n\r\n window.open(url, '_self');\r\n }\r\n\r\n public userinfo() {\r\n this.router.navigate(['/admin/userinfo']);\r\n }\r\n\r\n public about() {\r\n this.router.navigate(['/admin/about']);\r\n }\r\n\r\n public whatsnew() {\r\n this.router.navigate(['/admin/newfeatures']);\r\n }\r\n\r\n public sendFeedback() {\r\n let technicalInfo = null;\r\n let correlationId = null;\r\n let message = 'Enter your feedback or report an issue for review by the OMB Collect development team.';\r\n let title = 'Send Feedback or Report an Issue'\r\n this.dialog.open(AlertDialogComponent, {\r\n disableClose: true,\r\n maxWidth: \"600px\",\r\n data: new AlertDialogModel(title, message, technicalInfo, correlationId)\r\n });\r\n }\r\n\r\n // Getter method(s).\r\n public get ShowAppChrome(): boolean {\r\n return !this.queryParamsService.HideAppChrome;\r\n }\r\n\r\n // The static variable has to be there to be set in the static method below\r\n // when the user logs out, and in landing-page-component.ts when the user times\r\n // out. But the instance property is there so it can be used in the html.\r\n\r\n public static hideLoginButton: boolean = false;\r\n\r\n public get loginButtonHidden() {\r\n return LogInOutComponent.hideLoginButton;\r\n }\r\n\r\n public set loginButtonHidden(value: boolean) {\r\n LogInOutComponent.hideLoginButton = value;\r\n }\r\n\r\n public impersonate(userId: string) {\r\n if (userId == null) {\r\n alert(`There was a problem. UserId is {userId}`);\r\n return;\r\n }\r\n this.impersonationService.impersonate(userId).then(x => {\r\n location.reload();\r\n });\r\n }\r\n\r\n public stopImpersonating() {\r\n this.impersonationService.stopImpersonating().then(x => {\r\n location.reload();\r\n });\r\n }\r\n\r\n public doingImpersonation() {\r\n // Bit of a hacky implementation but ok for mow\r\n // Relies on the fact that during impersonation, firstName is of the \r\n // format \" impersonating \"\r\n return this.currentUserService.user.firstName.indexOf('impersonating') > -1;\r\n }\r\n\r\n //VNEXT-1066: KLW - Property to get site name\r\n public get SiteName() {\r\n return environment.sitename;\r\n }\r\n\r\n public get UserIsSystemAdmin(): boolean {\r\n return this.currentUserService.user.isSystemAdmin;\r\n }\r\n\r\n public openUITestCenter(): void {\r\n let manager: UITestCenterDialogManager = new UITestCenterDialogManager();\r\n\r\n const dialogRef = manager.openDialogUsing(this.dialog);\r\n }\r\n \r\n // Helpers...\r\n private setStartingUrl() {\r\n let url = new URL(this.myUrl);\r\n let lastUrl = localStorage.getItem('urlBeforeLogout');\r\n if (url.pathname != '/' || !lastUrl) {\r\n return this.myUrl;\r\n } else {\r\n return lastUrl;\r\n }\r\n }\r\n}\r\n","\n/*\n * Utility class that provides static methods to facilitate keyboard access to all UI features\n * of the application. \n */\n\ndeclare var $: any;\n\nexport class AccessibilityHelper {\n\n static readonly MOUSE_EVENT: string = 'mouse';\n static readonly KEYBOARD_EVENT: string = 'keyboard';\n\n // Use when a third-party library does not have a title attribute or something\n // Usage\n // AccessibilityHelper.addAttribute('.ui-tree-filter', 'title', 'Filter Tree Input Field');\n public static addAttribute(element: string, attribute: string, value: string) {\n var retries = 0;\n var int = setInterval(() => {\n if ($(element).length > 0) {\n $(element).attr(attribute, value);\n clearInterval(int);\n } \n retries++;\n if (retries > 100) clearInterval(int);\n }, 5);\n } \n\n // It can take a few ms before element can be focused hence the retry logic \n public static setFocus(element: string, wait: any = false) {\n var retries = 0;\n var int = setInterval(() => {\n if (!$(element).is(':focus')) {\n $(element).focus();\n } else {\n clearInterval(int);\n }\n retries++;\n if (retries > 100) clearInterval(int);\n }, 5);\n return;\n\n // old but keeping around in case\n var timeout = wait === true ? 250 : ((typeof wait === 'number') ? wait : 0);\n setTimeout(() => {\n if ($(element)) {\n console.log($(element).focus());\n }\n }, timeout);\n return;\n }\n\n // Focus on the main content div, unless this is the first navigation event in which\n // case focus should remain the default of the top of the page\n public static focusOnMainContent(): void {\n var mainContent = $('#main-content');\n //console.log({\n // \"UtilitityHelper.focusOnMain\": mainContent,\n // \"this.isNotFirstNavigationEvent()\": this.isNotFirstNavigationEvent(),\n // \"this.originalEventIsKeyboardEvent()\": this.originalEventIsKeyboardEvent(),\n // \"history.state.originalEvent\": history.state.originalEvent\n //});\n\n if (mainContent &&\n this.isNotFirstNavigationEvent() &&\n this.originalEventIsKeyboardEvent()) {\n mainContent.focus();\n }\n }\n\n // The setting of history.state.originalEventType is not automatic, but has to be done\n // on the router when navigating from ComponentA to ComponentB\n // Example usage in ComponentA:\n // ...\n // this.router.navigateByUrl(theUrl, { state: { originalEvent: event.type } });\n // ...\n // where event is the actual event (MouseEvent or KeyboardEvent)\n // See https://netbasal.com/set-state-object-when-navigating-in-angular-7-2-b87c5b977bb\n //\n // TODO: Reimplement to expect an actual MouseEVent or KeyboardEvent object and\n // dig into its attributes -- because when a \r\n \r\n \r\n \r\n
\r\n \r\n\r\n
\r\n \r\n Select a constraint\r\n \r\n \r\n \r\n {{con.name}}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Select constraint column\r\n \r\n \r\n \r\n {{col.name}}\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n Maximum Selections\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Select Source Field\r\n \r\n None\r\n \r\n {{src.displayName}}\r\n {{src.name}}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Default Value\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n Autocomplete
\r\n \r\n Yes\r\n No\r\n \r\n
\r\n \r\n
\r\n

Preview

\r\n
\r\n \r\n
\r\n \r\n  \r\n \r\n
\r\n\r\n","import { Component, Inject, Input, Output, EventEmitter, OnInit } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef } from \"@angular/material/dialog\";\r\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { FlexibleSelectionFormFieldComponent } from '../../../../../shared/components/form-fields/flexible-selection-form-field/flexible-selection-form-field.component';\r\nimport { FormFieldService } from '../../../../../shared/services/form-field.service';\r\nimport { FormFieldCascadingDropdownConstraint } from '../../../../../shared/models/form-builder/field-constraints/field-cascading-dropdown-constraint.model';\r\nimport { CurrentSiteService } from '../../../../../shared/services/current-site.service';\r\nimport { ListConstraintColumn } from '../../../../models/flexible-selection-fields/list-constraint-column.model';\r\nimport { FlexibleSelectionFieldService } from '../../../../services/flexible-selection-field.service';\r\nimport { FormFieldListValuesConstraint } from '../../../../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\nimport { FormField } from '../../../../models/form-builder/form-field.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../../enums/form-field-constraint-type.enum';\r\nimport { ListConstraintValue } from '../../../../models/flexible-selection-fields/list-constraint-value.model';\r\nimport { AllFieldInfo } from '../../../../models/field-conditional-logic/conditional-logic-editor-classes';\r\nimport { FieldDefinitionService } from '../../../../services/field-definition.service';\r\nimport { IFieldDefinitionLogic } from '../../../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinition } from '../../../../models/form-builder/field-definition.model';\r\nimport { Form } from '../../../../models/form-builder/form.model';\r\nimport { FormFieldPropertyEnum } from '../../../../models/form-builder/form-field-property-enum.model';\r\nimport { StringUtil } from '../../../../utility-classes/string.util';\r\n\r\nexport class FormFieldListConstraintColumn {\r\n public formFieldId: number;\r\n public formFieldName: string;\r\n public constraintId: number;\r\n public constraintName: string;\r\n public listConstraintColumnId: number;\r\n public listConstraintColumnName: string;\r\n\r\n public constructor(formFieldId: number, columnId: number) {\r\n this.formFieldId = formFieldId;\r\n this.listConstraintColumnId = columnId;\r\n }\r\n}\r\n\r\n/*\r\n Note: this component is used as a dialog and is opened from\r\n - form-builder.component.ts\r\n - gird-field-designer.component.ts\r\n*/\n@Component({\n selector: 'app-flexible-selection-field-configuration',\n templateUrl: './flexible-selection-field-configuration.component.html',\n styleUrls: ['./flexible-selection-field-configuration.component.scss'],\n standalone: false\n})\nexport class FlexibleSelectionFieldConfigurationComponent implements OnInit {\n\r\n @Output() save: EventEmitter = new EventEmitter();\r\n\r\n ngFormGroup: UntypedFormGroup;\r\n\r\n Constraints: FormFieldListValuesConstraint[];\r\n loadingConstraints: boolean = false;\r\n Columns: ListConstraintColumn[];\r\n loadingColumns: boolean = false;\r\n AvailableDefaultValues: ListConstraintValue[];\r\n SelectedConstraintId: number;\r\n SelectedColumnId: number;\r\n formField: FormField;\r\n formFields: FormField[];\r\n fieldColumnPairs: FormFieldListConstraintColumn[];\r\n\r\n private selectedConstraintIsSimpleList: boolean = true;\n private allFieldInfo: AllFieldInfo;\r\n private selectedMetadataField: FormField;\r\n private formTemplateId: number;\r\n private fieldNameErrorMsg: string;\r\n private form: Form = new Form(); // Used to check for form field name unique values.\r\n private fieldInsideGridCol: boolean = false;\r\n private availableSourceFields: FormField[];\r\n\n constructor(private formFieldService: FormFieldService,\r\n private flexibleSelectionFieldService: FlexibleSelectionFieldService,\r\n private currentSiteService: CurrentSiteService,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private fb: UntypedFormBuilder,\r\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data) {\r\n }\n\n ngOnInit(): void {\r\n this.ngFormGroup = this.fb.group({\r\n displayName: [this.data.displayName],\n name: [this.data.name],\r\n toolTip: [this.data.toolTip],\r\n placeholderText: [this.data.placeholderText],\r\n instructionsText: [this.data.instructionsText],\r\n hasFootnote: [this.data.hasFootnote],\r\n autoCompleteEnabled: [this.data.autoCompleteEnabled],\r\n minimumSelections: this.data.minimumSelections,\r\n maximumSelections: this.data.maximumSelections ? this.data.maximumSelections : 1,\r\n selectedConstraintName: '',\r\n selectedConstraintColumnName: '',\r\n ListConstraintColumnId: [this.data.ListConstraintColumnId],\r\n dependsOnParentFormFieldId: [this.data.dependsOnParentFormFieldId],\r\n dependsOnParentFormFieldName: [this.data.dependsOnParentFormFieldName],\r\n formFields: [this.data.formFields],\r\n fieldColumnPairs: [this.data.fieldColumnPairs],\r\n required: this.data.required == null ? false: [this.data.required],\r\n id: [this.data.id],\r\n defaultValue: this.data.defaultValue == null ? \"\" : [this.data.defaultValue]\r\n });\r\n this.formTemplateId = this.data.formTemplateId;\r\n this.formField = this.data.formField;\r\n this.formFields = this.data.formFields;\r\n this.form.formFields = this.formFields;\r\n\r\n //**Set flag which indicates if the flex field is inside of a grid\r\n if (this.formField != null && this.formField.gridColClientId > 0)\r\n this.fieldInsideGridCol = true;\r\n\r\n this.loadingConstraints = true;\r\n this.formFieldService.getSiteNamedListValueConstraints(this.currentSiteService.Site.id).then(constraints => {\r\n if (constraints) {\r\n this.Constraints = constraints;\r\n let selectedConstraint = this.Constraints.find(c => c.constraintName == this.data.listValuesConstraintName);\r\n if (selectedConstraint) {\r\n this.selectedConstraintIsSimpleList = selectedConstraint.constraintType == FormFieldConstraintTypeEnum.SimpleListValues;\r\n }\r\n else if (this.data.listValuesConstraintName) {\r\n console.log('Constraint not found with value \"' + this.data.listValuesConstraintName + '\"');\r\n }\r\n }\r\n else {\r\n console.log('No List Value Constraints returned for site ID ' + this.currentSiteService.Site.id);\r\n }\r\n this.loadingConstraints = false;\r\n });\r\n\r\n this.fieldColumnPairs = [];\r\n if (this.data.fieldColumnPairs) {\r\n for (let index: number = 0; index < this.data.fieldColumnPairs.length; index++) {\r\n let newCol = new FormFieldListConstraintColumn(this.formField.id, this.data.fieldColumnPairs[index].listConstraintColumnId);\r\n newCol.constraintName = this.data.fieldColumnPairs[index].constraintName;\r\n newCol.listConstraintColumnName = this.data.fieldColumnPairs[index].columnName;\r\n newCol.listConstraintColumnId = this.data.fieldColumnPairs[index].listConstraintColumnId;\r\n this.fieldColumnPairs.push(newCol);\r\n }\r\n }\r\n\r\n this.fieldDefinitionService.getMetadataFields().then(metadataFields => {\r\n this.allFieldInfo = new AllFieldInfo(this.formFields, metadataFields);\r\n\r\n // Filter out fields which are not allowed to be sources of flex field behavir\r\n // Also filter out the field currently being configured\r\n this.availableSourceFields = this.allFieldInfo.AllFieldsSortedByNameAscending.filter(formField => {\r\n let fieldDefClientLogic: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldClientLogicHandler(formField.fieldDefinitionClassName);\r\n // To add new kind of field to serve as source to a flex field, see https://community-dc.max.gov/x/E4u6mQ\r\n return fieldDefClientLogic.canParticipateInFlexFieldBehavior &&\r\n this.formField.id != formField.id;\r\n \r\n });\r\n });\r\n }\r\n\r\n public get AvailableSourceFields() {\r\n return this.availableSourceFields;\r\n }\r\n\r\n public get NgFormGroup(): UntypedFormGroup {\r\n return (this.ngFormGroup);\r\n }\r\n\r\n public get LoadingConstraints(): boolean {\r\n return this.loadingConstraints;\r\n }\r\n public get LoadingColumns(): boolean {\r\n return this.loadingColumns;\r\n }\r\n\r\n public get FieldColumnPairs(): FormFieldListConstraintColumn[] {\r\n return this.fieldColumnPairs;\r\n }\r\n\r\n public get FieldNameErrorMsg(): string {\r\n return this.fieldNameErrorMsg;\r\n }\r\n public get FieldInsideGridCol(): boolean {\r\n return this.fieldInsideGridCol;\r\n }\r\n\r\n public cancelClicked() {\r\n return;\r\n }\r\n\r\n public onSelectConstraint(selected) {\r\n let selectedConstraint = this.Constraints.find(c => c.constraintName == selected.value);\r\n if (selectedConstraint) {\r\n this.SelectedConstraintId = selectedConstraint.id;\r\n this.SelectedColumnId = 0;\r\n this.loadingColumns = true;\r\n this.flexibleSelectionFieldService.GetColumns(this.SelectedConstraintId).then(res => {\r\n this.loadingColumns = false;\r\n this.Columns = res;\r\n if (selectedConstraint.constraintType == FormFieldConstraintTypeEnum.SimpleListValues) {\r\n this.ngFormGroup.controls.selectedConstraintName.disable();\r\n this.ngFormGroup.controls.selectedConstraintColumnName.disable();\r\n this.selectedConstraintIsSimpleList = true;\r\n\r\n let simpleListCol = this.Columns.filter(c => c.formFieldListValuesConstraintId == selectedConstraint.id)[0];\r\n if (simpleListCol) {\r\n this.fieldColumnPairs = [];\r\n let fcp = new FormFieldListConstraintColumn(this.formField.id, simpleListCol.id);\r\n fcp.formFieldName = this.formField.name;\r\n fcp.constraintId = this.SelectedConstraintId;\r\n fcp.constraintName = selectedConstraint.constraintName;\r\n fcp.listConstraintColumnId = simpleListCol.id;\r\n fcp.listConstraintColumnName = simpleListCol.name;\r\n this.fieldColumnPairs.push(fcp);\r\n }\r\n }\r\n else {\r\n this.ngFormGroup.controls.selectedConstraintName.enable();\r\n this.selectedConstraintIsSimpleList = false;\r\n }\r\n });\r\n }\r\n else {\r\n console.log('Unable to identify constraint selected as ' + selected.value);\r\n }\r\n }\r\n\r\n public onSelectColumn(selected) {\r\n let col = this.Columns.find(c => c.name == selected.value);\r\n if (col) {\r\n this.SelectedColumnId = col.id;\r\n this.addFCpair();\r\n this.ngFormGroup.controls['selectedConstraintName'].setValue(null);\r\n this.ngFormGroup.controls['selectedConstraintColumnName'].setValue(null);\r\n }\r\n else {\r\n console.log('Column not found for selected value ' + selected.value);\r\n }\r\n }\r\n\r\n public onSelectSourceField(selected): void {\r\n let selectedSourceField = this.availableSourceFields.find(x => x.name == selected.value);\r\n if (!selectedSourceField) return;\r\n\r\n let fieldDef: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(selectedSourceField.fieldDefinitionClassName);\r\n\r\n if (fieldDef.isMetadataField && selectedSourceField.id <= 0) {\r\n if (this.formTemplateId <= 0) {\r\n alert(\"In order to set a metadata field, you first need to save the new form.\");\r\n this.ngFormGroup.controls['dependsOnParentFormFieldName'].setValue(null);\r\n return;\r\n }\r\n let metadataFormField: FormField = new FormField();\r\n metadataFormField.formTemplateId = this.formTemplateId;\r\n metadataFormField.isMetadataField = true;\r\n metadataFormField.name = selectedSourceField.fieldDefinitionClassName;\r\n metadataFormField.displayName = selectedSourceField.displayName;\r\n metadataFormField.fieldDefinitionClassName = selectedSourceField.fieldDefinitionClassName;\r\n this.formFieldService.getOrCreateMetaDataField(metadataFormField).then(x => {\r\n this.selectedMetadataField = x;\r\n selectedSourceField.id = x.id; // set the Id of the metadata field \r\n });\r\n //metadataFormField.required = selectedSourceField.required;\r\n }\r\n }\r\n\r\n public deleteFCpair(FCpair: FormFieldListConstraintColumn) {\r\n this.fieldColumnPairs = this.fieldColumnPairs.filter(fcp => !(fcp.listConstraintColumnId == FCpair.listConstraintColumnId && fcp.constraintId == FCpair.constraintId));\r\n }\r\n\r\n public addFCpair() {\r\n if (this.fieldColumnPairs.find(fcp => fcp.constraintId == this.SelectedConstraintId && fcp.listConstraintColumnId == this.SelectedColumnId)) return; //duplicate\r\n let fcp = new FormFieldListConstraintColumn(this.formField.id, this.SelectedColumnId);\r\n fcp.formFieldName = this.formField.name;\r\n fcp.constraintId = this.SelectedConstraintId;\r\n fcp.constraintName = this.ngFormGroup.value.selectedConstraintName;\r\n fcp.listConstraintColumnId = this.SelectedColumnId;\r\n fcp.listConstraintColumnName = this.ngFormGroup.value.selectedConstraintColumnName;\r\n this.fieldColumnPairs.push(fcp);\r\n }\r\n\r\n public onSave() {\r\n let formVals = this.ngFormGroup.value;\r\n let sourceField = this.availableSourceFields.find(f => f.name == formVals.dependsOnParentFormFieldName);\r\n let returnValues = {\r\n constraintIsSimpleList: this.selectedConstraintIsSimpleList,\r\n selectConstraintId: this.SelectedConstraintId,\r\n listConstraintColumnId: this.SelectedColumnId,\r\n dependsOnParentFormFieldId: sourceField?.id,\r\n dependsOnParentFormFieldName: sourceField?.displayName,\r\n dependsOnParentFormFieldDefinitionClassName: sourceField?.fieldDefinitionClassName,\r\n displayName: formVals.displayName,\r\n name: formVals.name,\r\n toolTip: formVals.toolTip,\r\n placeholderText: formVals.placeholderText,\r\n instructionsText: formVals.instructionsText,\r\n hasFootnote: formVals.hasFootnote,\r\n autoCompleteEnabled: formVals.autoCompleteEnabled,\r\n fieldColumnPairs: this.fieldColumnPairs,\r\n selectedMetadataField: this.selectedMetadataField,\r\n minimumSelections: formVals.minimumSelections,\r\n maximumSelections: formVals.maximumSelections,\r\n required: formVals.required,\r\n id: formVals.id,\r\n defaultValue: formVals.defaultValue\r\n }\r\n\r\n this.dialogRef.close(returnValues);\r\n }\r\n\r\n public handleModelChange(propertyName: string): void {\r\n let formVals = this.ngFormGroup.value;\r\n let internalName = formVals.name;\r\n //debugger;\r\n\r\n if (propertyName === FormFieldPropertyEnum.NAME) {\r\n this.fieldNameErrorMsg = null;\r\n if (StringUtil.isEmptyString(internalName)) {\r\n this.fieldNameErrorMsg = \"A field's 'Name' cannot be blank\";\r\n } else if (this.formField.name != internalName && this.form.nameForFormFieldNotUnique(this.formField, internalName)) {\r\n this.fieldNameErrorMsg = \"The field's 'Name' value is not unique\";\r\n } else if (internalName.includes(' ')) {\r\n this.fieldNameErrorMsg = 'A field internal name cannot contain spaces';\r\n } else if (internalName != internalName.toLowerCase()) {\r\n this.fieldNameErrorMsg = 'A field internal name cannot contain capital letters';\r\n } else if (this.fieldInsideGridCol) {\r\n //***Perform additional validation if field is inside of a grid field\r\n if (!isNaN(Number(internalName.charAt(0)))) {\r\n this.fieldNameErrorMsg = 'A grid column internal name cannot start with a digit';\r\n } else if (!(new RegExp('^[a-zA-Z0-9$_]*$').test(internalName))) {\r\n this.fieldNameErrorMsg = 'A grid column internal name can contain only letters, numbers, $ and _ symbols';\r\n }\r\n }\r\n }\r\n //***Leaving these comments for now since the autocomplete logic will be implemenented in the future*/\r\n //else if (propertyName == FormFieldPropertyEnum.AUTOCOMPLETE) {\r\n // if (this.field.autocomplete) {\r\n // this.field.autocomplete_StartsWith = true;\r\n // this.field.autocomplete_Contains = true;\r\n // }\r\n //}\r\n\r\n //***This logic was used when editing properties via the drawer. Don't think its needed anymore\r\n // Note: notify my parent that a property has changed.\r\n //let hshEventData = {\r\n // propertyName: propertyName,\r\n // formField: this.formField,\r\n // cancelEdit: propertyName == FormFieldPropertyEnum.CANCEL_ALL\r\n //}\r\n //this.propertyChanged.emit(hshEventData);\r\n\r\n return;\r\n }\r\n\r\n //public validateRequiredConfigValues(formValues: any): boolean {\r\n // let result: boolean = true;\r\n\r\n // if (this.fieldNameErrorMsg != null)\r\n // result = false;\r\n // else if (StringUtil.isEmptyString(formValues.name))\r\n // result = false;\r\n\r\n // return result;\r\n //}\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { FormFieldCascadingDropdownConstraint, FormFieldCascadingDropdownConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-cascading-dropdown-constraint.model';\r\nimport { CachedFormFieldService, FlushCachedServiceUponFormSave } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\n//import { ISiteFormFieldConstraints } from './isite-form-field-constraints.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { CascadingDropDownFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldCascadingDropdownConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.CascadingDropdown;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.CascadingDropdown;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'selectOptionsFile'; // This is the name of the property for loading a file that contains a cascading-dropdown field's configuration.\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.cascadingDropdownConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.cascadingDropdownConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n return formField.cascadingDropdownConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.cascadingDropdownConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n return formField.cascadingDropdownConstraintValue;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n formField.cascadingDropdownConstraintValue = value;\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value:string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n return formField.jsonConfig;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n formField.jsonConfig = value;\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n return new FormFieldCascadingDropdownConstraintWithMetrics(dataCollectionId);\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n let newConstraint = new FormFieldCascadingDropdownConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n let packagedConstraint = new FormFieldCascadingDropdownConstraint(dataCollectionId, formField.cascadingDropdownConstraintId, formField.cascadingDropdownConstraintName, formField.cascadingDropdownConstraintValue);\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldCascadingDropdownConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateCascadingDropdownConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createCascadingDropdownConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateCascadingDropdownConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateCascadingDropdownConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedCascadingDropdowns';\r\n }\r\n\r\n // Get the field definition class name(s) associated with this type of constraint.\r\n public get usedByFormFieldClasses(): string[] {\r\n return [CascadingDropDownFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.cascadingDropdownConstraintId = constraint.id;\r\n formField.cascadingDropdownConstraintName = constraint.name;\r\n formField.constraintJson = constraint.constraintExpression;\r\n formField.jsonConfig = constraint.constraintExpression;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n let constraint: FormFieldCascadingDropdownConstraintWithMetrics = new FormFieldCascadingDropdownConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.jsonConfig);\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { DropDownFieldType, RadioButtonsFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\nimport { FormFieldListValuesConstraint, FormFieldListValuesConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\n\r\nexport class FormFieldCascadingListValueConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.CascadingListValues;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.CascadingListValues;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n //return 'jsonConfig'; // Yes, I am reusing the existing 'selectOptions' FormField property.\r\n return 'selectOptionsFile'; // This is the name of the property for loading a file that contains a cascading-dropdown field's configuration.\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.listValuesConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.listValuesConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n //return formField.listValuesConstraintName;\r\n return formField.cascadingDropdownConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.listValuesConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n return formField.cascadingListValuesConstraintValue;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n formField.cascadingListValuesConstraintValue = value;\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n return formField.csvOptionsData.rawCsv;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n formField.jsonConfig = value;\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n //let newConstraint: FormFieldListValuesConstraintWithMetrics = new FormFieldListValuesConstraintWithMetrics(dataCollectionId);\r\n let newConstraint: FormFieldListValuesConstraintWithMetrics = FormFieldListValuesConstraintWithMetrics.createCascadingListValuesConstraintFrom(dataCollectionId);\r\n //newConstraint.constraintType = FormFieldConstraintTypeEnum.CascadingListValues;\r\n return newConstraint;\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n //let newConstraint = new FormFieldListValuesConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n let newConstraint = FormFieldListValuesConstraintWithMetrics.createCascadingListValuesConstraintFrom(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n //let packagedConstraint = new FormFieldListValuesConstraint(dataCollectionId, formField.selectOptionsConstraintId, formField.selectOptionsConstraintName, formField.selectOptionsConstraintValue);\r\n let packagedConstraint = FormFieldListValuesConstraint.createCascadingListValuesConstraintFrom(dataCollectionId, formField.selectOptionsConstraintId, formField.selectOptionsConstraintName, formField.selectOptionsConstraintValue);\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldListValuesConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateCascadingListValuesConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createCascadingListValuesConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateCascadingListValuesConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateCascadingListValuesConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedCascadingListValueConstraints';\r\n }\r\n\r\n public get usedByFormFieldClasses(): string[] {\r\n return [DropDownFieldType, RadioButtonsFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.listValuesConstraintId = constraint.id;\r\n formField.cascadingDropdownConstraintName = constraint.name;\r\n formField.cascadingListValuesConstraintValue = constraint.constraintExpression;\r\n formField.selectOptions = constraint.constraintExpression;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n //let constraint: FormFieldListValuesConstraintWithMetrics = new FormFieldListValuesConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.jsonConfig);\r\n let constraint: FormFieldListValuesConstraintWithMetrics = FormFieldListValuesConstraintWithMetrics.createCascadingListValuesConstraintFrom(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.jsonConfig);\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { ElementRef } from '@angular/core';\r\n\r\nimport { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { ISiteFormFieldConstraints } from './isite-form-field-constraints.interface';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\n\r\nexport abstract class FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Abstract methods.\r\n public abstract managesConstraintsOfType(): string;\r\n public abstract constraintTypeForEndUser(): string; // A user-friendly constraint type name.\r\n\r\n public abstract getPrimaryPropertyName(): string;\r\n\r\n public abstract getConstraintId(formField: FormField): number;\r\n public abstract setConstraintId(formField: FormField, value: number): void;\r\n\r\n public abstract getConstraintName(formField: FormField): string;\r\n public abstract setConstraintName(formField: FormField, value: string): void;\r\n\r\n public abstract getConstraintValue(formField: FormField): string;\r\n public abstract setConstraintValue(formField: FormField, value: string): void;\r\n\r\n public abstract getConstraintFailureMessage(formField: FormField): string;\r\n public abstract setConstraintFailureMessage(formField: FormField, value: string): void;\r\n\r\n public abstract getConstraintFormFieldPropertyValue(formField: FormField): string;\r\n public abstract copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void;\r\n\r\n public abstract createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics;\r\n public abstract createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics;\r\n\r\n // Package constraint values as a constraint.\r\n public abstract packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint;\r\n public abstract updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraint: IFormFieldConstraint): void;\r\n\r\n // Methods for getting method names.\r\n public abstract get createNamedConstraintMethodName(): string;\r\n public abstract get updateNamedConstraintMethodName(): string;\r\n public abstract get updateOrCreateNamedConstraintMethodName(): string;\r\n public abstract get siteNamedConstraintsMethodName(): string;\r\n\r\n // Get the field definition class name(s) associated with this type of constraint.\r\n public abstract get usedByFormFieldClasses(): string[];\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public abstract applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField);\r\n\r\n public abstract createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics;\r\n\r\n // Non-abstract methods.\r\n public proposeConstraintNameIfApplicable(formField: FormField, proposedName: string, siteConstraints: ISiteFormFieldConstraints, inputField: ElementRef, setInputFieldFocusNow: boolean): void {\r\n let constraintId = this.getConstraintId(formField);\r\n let constraintName = this.getConstraintName(formField);\r\n\r\n if ((constraintId <= 0) && (!siteConstraints.ConstraintNameProposed)) {\r\n //if ((constraintId < 0) && (!siteConstraints.ConstraintNameProposed)) {\r\n if ((constraintName == null) || (constraintName.trim() == '')) {\r\n this.setConstraintName(formField, proposedName);\r\n if (setInputFieldFocusNow) {\r\n setTimeout(() => {\r\n inputField.nativeElement.focus();\r\n inputField.nativeElement.select();\r\n }, 0);\r\n }\r\n\r\n siteConstraints.enableEditing();\r\n siteConstraints.ConstraintNameProposed = true;\r\n }\r\n }\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public updateFormFieldWithLatestConstraintValues(siteNamedConstraints: IFormFieldConstraint[], formField: FormField): boolean {\r\n let updatedApplied: boolean = false;\r\n let constraintId: number = this.getConstraintId(formField);\r\n\r\n if ((constraintId != null) && (constraintId != 0)) {\r\n let siteConstraint: IFormFieldConstraint = siteNamedConstraints.find(c => c.id == constraintId);\r\n if (siteConstraint != null) {\r\n if (this.getConstraintName(formField) != siteConstraint.name) {\r\n this.setConstraintName(formField, siteConstraint.name);\r\n updatedApplied = true;\r\n } \r\n if (this.getConstraintValue(formField) != siteConstraint.constraintExpression) {\r\n this.setConstraintValue(formField, siteConstraint.constraintExpression);\r\n updatedApplied = true;\r\n } \r\n }\r\n }\r\n\r\n return updatedApplied;\r\n }\r\n\r\n public updateOtherFieldConstraintValues(dataCollectionId: number, formField: FormField, otherField: FormField): void {\r\n if (this.getConstraintId(otherField) == this.getConstraintId(formField)) {\r\n this.setConstraintName(otherField, this.getConstraintName(formField));\r\n this.setConstraintValue(otherField, this.getConstraintValue(formField));\r\n this.setConstraintFailureMessage(otherField, this.getConstraintFailureMessage(formField));\r\n\r\n // Also update the field's constraint value(s).\r\n this.copyConstraintValueToCorrespondFormFieldProperty(otherField, this.getConstraintValue(formField))\r\n }\r\n\r\n // Also call the other field's constraint updated method.\r\n let updatedConstraint = this.packageConstraint(dataCollectionId, formField);\r\n otherField.constraintUpdated(updatedConstraint, this);\r\n }\r\n\r\n public updateOtherFieldIfUsingSameConstraint(formFieldConstraint: IFormFieldConstraint, otherField: FormField): void {\r\n if (formFieldConstraint.id == this.getConstraintId(otherField)) {\r\n if (formFieldConstraint.name != this.getConstraintName(otherField))\r\n this.setConstraintName(otherField, formFieldConstraint.name);\r\n if (formFieldConstraint.constraintExpression != this.getConstraintValue(otherField))\r\n this.setConstraintValue(otherField, formFieldConstraint.constraintExpression);\r\n\r\n // Also update the field's constraint value(s).\r\n if (formFieldConstraint.constraintExpression != this.getConstraintFormFieldPropertyValue(otherField))\r\n this.copyConstraintValueToCorrespondFormFieldProperty(otherField, formFieldConstraint.constraintExpression);\r\n }\r\n }\r\n}\r\n","import { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { FormFieldSelectOptionsConstraintLiaison } from './field-select-options-constraint-liaison';\r\nimport { FormFieldRegularExpressionConstraintLiaison } from './field-regular-expression-constraint-liaison';\r\nimport { FormFieldCascadingDropdownConstraintLiaison } from './field-cascading-dropdown-constraint-liaison';\r\nimport { FormFieldNumericRangeConstraintLiaison } from './field-numeric-range-constraint-liaison';\r\nimport { FormFieldDateRangeConstraintLiaison } from './field-date-range-constraint-liaison';\r\nimport { FormFieldSimpleListValueConstraintLiaison } from './field-simple-list-values-constraint-liaison';\r\nimport { FormFieldCascadingListValueConstraintLiaison } from './field-cascading-list-values-constraint-liaison';\r\n\r\n// Note: this class serves as a convenience, providing/applying logic for\r\n// the five different types of form field constraints in a single class.\r\n//\r\n// Note: presently this class only provides static methods.\r\nexport class FormFieldConstraintLiaisonManager {\r\n // Properties.\r\n //private numLiaisons: number = 0;\r\n //private numLiaisonsProcessed: number = 0;\r\n //private numConstraintUpdatesApplied = 0;\r\n\r\n // Inaccessible constructor.\r\n private constructor() { }\r\n\r\n // Static methods.\r\n // The following method updates a form field to the\r\n // latest values for any constraints it might have.\r\n public static updateFormFieldWithLatestConstraintValues(cachedFormFieldService: CachedFormFieldService, siteId: number, formField: FormField): Promise {\r\n let result = new Promise((resolve, reject) => {\r\n let constraintLiaisons: IFormFieldConstraintLiaison[] = FormFieldConstraintLiaisonManager.getConstraintLiaisons();\r\n //let numLiaisons: number = constraintLiaisons.length;\r\n let numLiaisonsProcessed: number = 0;\r\n let numConstraintUpdatesApplied = 0; // It looks like this will either stay as zero or be set to one (in the if branch below).\r\n\r\n for (let index: number = 0; index < constraintLiaisons.length; index++) {\r\n let constraintLiaison: IFormFieldConstraintLiaison = constraintLiaisons[index];\r\n let constraintId: number = constraintLiaison.getConstraintId(formField);\r\n\r\n if ((constraintId != null) && (constraintId != 0)) {\r\n let getSiteConstraintMethodName: string = constraintLiaison.siteNamedConstraintsMethodName;\r\n\r\n // Each constraint type has its own service method name for retrieve constraints of its type for a given site.\r\n cachedFormFieldService[getSiteConstraintMethodName](siteId).then(siteConstraints => {\r\n if (constraintLiaison.updateFormFieldWithLatestConstraintValues(siteConstraints, formField))\r\n numConstraintUpdatesApplied++;\r\n numLiaisonsProcessed++;\r\n\r\n if (numLiaisonsProcessed == constraintLiaisons.length)\r\n resolve(numConstraintUpdatesApplied);\r\n });\r\n } else {\r\n numLiaisonsProcessed++;\r\n\r\n if (numLiaisonsProcessed == constraintLiaisons.length)\r\n resolve(numConstraintUpdatesApplied);\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n public static synchronousUpdateFormFieldWithLatestConstraintValues(cachedFormFieldService: CachedFormFieldService, siteId: number, formField: FormField): number {\r\n let constraintLiaisons: IFormFieldConstraintLiaison[] = FormFieldConstraintLiaisonManager.getConstraintLiaisons();\r\n //let numLiaisons: number = constraintLiaisons.length;\r\n //let numLiaisonsProcessed: number = 0;\r\n let numConstraintUpdatesApplied = 0;\r\n\r\n for (let index: number = 0; index < constraintLiaisons.length; index++) {\r\n let constraintLiaison: IFormFieldConstraintLiaison = constraintLiaisons[index];\r\n let constraintId: number = constraintLiaison.getConstraintId(formField);\r\n\r\n if ((constraintId != null) && (constraintId != 0)) {\r\n let getSiteConstraintMethodName: string = constraintLiaison.siteNamedConstraintsMethodName;\r\n\r\n cachedFormFieldService[getSiteConstraintMethodName](siteId).then(siteConstraints => {\r\n if (constraintLiaison.updateFormFieldWithLatestConstraintValues(siteConstraints, formField))\r\n numConstraintUpdatesApplied++;\r\n //numLiaisonsProcessed++;\r\n\r\n //if (numLiaisonsProcessed == numLiaisons)\r\n // resolve(numConstraintUpdatesApplied);\r\n });\r\n } else {\r\n //numLiaisonsProcessed++;\r\n\r\n //if (numLiaisonsProcessed == numLiaisons)\r\n // resolve(numConstraintUpdatesApplied);\r\n }\r\n }\r\n\r\n return numConstraintUpdatesApplied;\r\n }\r\n\r\n // Helper methods.\r\n private static getConstraintLiaisons(): IFormFieldConstraintLiaison[] {\r\n let constraintLiaisons: IFormFieldConstraintLiaison[] = [];\r\n\r\n constraintLiaisons.push(new FormFieldSelectOptionsConstraintLiaison());\r\n constraintLiaisons.push(new FormFieldRegularExpressionConstraintLiaison());\r\n constraintLiaisons.push(new FormFieldCascadingDropdownConstraintLiaison());\r\n constraintLiaisons.push(new FormFieldNumericRangeConstraintLiaison());\r\n constraintLiaisons.push(new FormFieldDateRangeConstraintLiaison());\r\n\r\n // New constraints based on value lists:\r\n constraintLiaisons.push(new FormFieldSimpleListValueConstraintLiaison());\r\n constraintLiaisons.push(new FormFieldCascadingListValueConstraintLiaison());\r\n\r\n return constraintLiaisons;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { FormFieldDateRangeConstraint, FormFieldDateRangeConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-date-range-constraint.model';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { DateRangeDataForJsonSerialization } from '../../../../../models/form-builder/field-constraints/field-date-range-constraint.model';\r\n//import { ISiteFormFieldConstraints } from './isite-form-field-constraints.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { DateFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldDateRangeConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.DateRange;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.DateRange;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'minDate';\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.dateRangeConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.dateRangeConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n return formField.dateRangeConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.dateRangeConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n //return formField.dateRangeConstraintValue;\r\n let serializationObject = new DateRangeDataForJsonSerialization(formField.dateRangeConstraintMinDate, formField.dateRangeConstraintMaxDate);\r\n let json: string = serializationObject.toJson();\r\n return json;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n if ((value == null) || (value.trim() == '')) {\r\n formField.minDate = null;\r\n formField.maxDate = null;\r\n formField.dateRangeConstraintMinDate = null;\r\n formField.dateRangeConstraintMaxDate = null;\r\n } else {\r\n let serializationObject = DateRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n formField.dateRangeConstraintMinDate = serializationObject.minDate;\r\n formField.dateRangeConstraintMaxDate = serializationObject.maxDate;\r\n }\r\n }\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n let serializationObject = new DateRangeDataForJsonSerialization(formField.minDate, formField.maxDate);\r\n let value = serializationObject.toJson();\r\n return value;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n let serializationObject = DateRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n formField.minDate = serializationObject.minDate;\r\n formField.maxDate = serializationObject.maxDate;\r\n }\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n return new FormFieldDateRangeConstraintWithMetrics(dataCollectionId);\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n let newConstraint = new FormFieldDateRangeConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n let serializationObject = new DateRangeDataForJsonSerialization(formField.minDate, formField.maxDate);\r\n let constraintExpr: string = serializationObject.toJson();\r\n //let packagedConstraint = new FormFieldDateRangeConstraint(dataCollectionId, formField.dateRangeConstraintId, formField.dateRangeConstraintName, constraintExpr); \r\n let packagedConstraint = FormFieldDateRangeConstraint.constructConstraint(dataCollectionId, formField.dateRangeConstraintId, formField.dateRangeConstraintName, constraintExpr); \r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldDateRangeConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateDateRangeConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createDateRangeConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateDateRangeConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateDateRangeConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedDateRanges';\r\n }\r\n\r\n public get usedByFormFieldClasses(): string[] {\r\n return [DateFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.dateRangeConstraintId = constraint.id;\r\n formField.dateRangeConstraintName = constraint.name;\r\n let dateRangeConstraint = constraint;\r\n formField.dateRangeConstraintMinDate = dateRangeConstraint.minDate;\r\n formField.dateRangeConstraintMaxDate = dateRangeConstraint.maxDate;\r\n formField.minDate = dateRangeConstraint.minDate;\r\n formField.maxDate = dateRangeConstraint.maxDate;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n let constraint: FormFieldDateRangeConstraintWithMetrics = new FormFieldDateRangeConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, null);\r\n constraint.minDate = constraintProperties.minDate;\r\n constraint.maxDate = constraintProperties.maxDate;\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { FormFieldNumericRangeConstraint, FormFieldNumericRangeConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-numeric-range-constraint.model';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { NumericRangeDataForJsonSerialization } from '../../../../../models/form-builder/field-constraints/field-numeric-range-constraint.model';\r\n//import { ISiteFormFieldConstraints } from './isite-form-field-constraints.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { IntegerFieldType, CurrencyFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldNumericRangeConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.NumericRange;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.NumericRange;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'minValue';\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.numericRangeConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.numericRangeConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n return formField.numericRangeConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.numericRangeConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n let serializationObject = new NumericRangeDataForJsonSerialization(formField.numericRangeConstraintMinValue, formField.numericRangeConstraintMaxValue);\r\n let json: string = serializationObject.toJson();\r\n return json;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n if ((value == null) || (value.trim() == '')) {\r\n formField.minValue = null;\r\n formField.maxValue = null;\r\n formField.numericRangeConstraintMinValue = null;\r\n formField.numericRangeConstraintMaxValue = null;\r\n } else {\r\n let serializationObject = NumericRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n formField.numericRangeConstraintMinValue = serializationObject.minValue;\r\n formField.numericRangeConstraintMaxValue = serializationObject.maxValue;\r\n }\r\n }\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n let serializationObject = new NumericRangeDataForJsonSerialization(formField.minValue, formField.maxValue);\r\n let value = serializationObject.toJson();\r\n return value;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n let serializationObject = NumericRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n formField.minValue = serializationObject.minValue;\r\n formField.maxValue = serializationObject.maxValue;\r\n }\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n return new FormFieldNumericRangeConstraintWithMetrics(dataCollectionId);\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n let newConstraint = new FormFieldNumericRangeConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n let serializationObject = new NumericRangeDataForJsonSerialization(formField.minValue, formField.maxValue);\r\n let constraintExpr: string = serializationObject.toJson();\r\n //let packagedConstraint = new FormFieldNumericRangeConstraint(dataCollectionId, formField.numericRangeConstraintId, formField.numericRangeConstraintName, constraintExpr); //formField.numericRangeConstraintValue);\r\n let packagedConstraint = FormFieldNumericRangeConstraint.constructConstraint(dataCollectionId, formField.numericRangeConstraintId, formField.numericRangeConstraintName, constraintExpr); //formField.numericRangeConstraintValue);\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldNumericRangeConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateNumericRangeConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createNumericRangeConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateNumericRangeConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateNumericRangeConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedNumericRanges';\r\n }\r\n\r\n // Get the field definition class name(s) associated with this type of constraint.\r\n public get usedByFormFieldClasses(): string[] {\r\n return [IntegerFieldType, CurrencyFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.numericRangeConstraintId = constraint.id;\r\n formField.numericRangeConstraintName = constraint.name;\r\n let numericRangeConstraint = constraint;\r\n formField.numericRangeConstraintMinValue = numericRangeConstraint.minValue;\r\n formField.numericRangeConstraintMaxValue = numericRangeConstraint.maxValue;\r\n formField.minValue = numericRangeConstraint.minValue;\r\n formField.maxValue = numericRangeConstraint.maxValue;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n let constraint: FormFieldNumericRangeConstraintWithMetrics = new FormFieldNumericRangeConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, null);\r\n constraint.minValue = constraintProperties.minValue;\r\n constraint.maxValue = constraintProperties.maxValue;\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { FormFieldRegularExpressionConstraint, FormFieldRegularExpressionConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-regular-expression-constraint.model';\r\n//import { ISiteFormFieldConstraints } from './isite-form-field-constraints.interface';\r\nimport { CachedFormFieldService, FlushCachedServiceUponFormSave } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { ShortTextFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldRegularExpressionConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Properties.\r\n //private formField: FormField = null;\r\n\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.RegularExpression;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.RegularExpression;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'regex';\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.regularExpressionConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.regularExpressionConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n return formField.regularExpressionConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.regularExpressionConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n return formField.regularExpressionConstraintValue;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n formField.regularExpressionConstraintValue = value;\r\n }\r\n\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return formField.regularExpressionConstraintMessage;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n formField.regularExpressionConstraintMessage = value;\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n return formField.regex;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n formField.regex = value;\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n return new FormFieldRegularExpressionConstraintWithMetrics(dataCollectionId);\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n let newConstraint = new FormFieldRegularExpressionConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n let packagedConstraint = new FormFieldRegularExpressionConstraint(\r\n dataCollectionId,\r\n formField.regularExpressionConstraintId,\r\n formField.regularExpressionConstraintName,\r\n formField.regularExpressionConstraintValue,\r\n formField.regularExpressionConstraintMessage\r\n );\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldRegularExpressionConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateRegularExpressionConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createRegularExpressionConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateRegularExpressionConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateRegularExpressionConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedRegularExpressions';\r\n }\r\n\r\n public get usedByFormFieldClasses(): string[] {\r\n return [ShortTextFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.regularExpressionConstraintId = constraint.id;\r\n formField.regularExpressionConstraintName = constraint.name;\r\n formField.regularExpressionConstraintValue = constraint.constraintExpression;\r\n formField.regularExpressionConstraintMessage = constraint.constraintFailureMessage;\r\n formField.regex = constraint.constraintExpression;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n let constraint: FormFieldRegularExpressionConstraintWithMetrics =\r\n new FormFieldRegularExpressionConstraintWithMetrics(\r\n dataCollectionId,\r\n constraintProperties.constraintId,\r\n constraintProperties.constraintName,\r\n constraintProperties.regularExpressionValue,\r\n constraintProperties.regularExpressionMessage);\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\nimport { FormFieldSelectOptionsConstraint, FormFieldSelectOptionsConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-select-options-constraint.model';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { DropDownFieldType, RadioButtonsFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldSelectOptionsConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.SelectOptions;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.SelectOptions;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'selectOptions';\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.selectOptionsConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.selectOptionsConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n return formField.selectOptionsConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.selectOptionsConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n return formField.selectOptionsConstraintValue;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n formField.selectOptionsConstraintValue = value;\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n return formField.selectOptions;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n formField.selectOptions = value;\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n return new FormFieldSelectOptionsConstraintWithMetrics(dataCollectionId);\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n let newConstraint = new FormFieldSelectOptionsConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n let packagedConstraint = new FormFieldSelectOptionsConstraint(dataCollectionId, formField.selectOptionsConstraintId, formField.selectOptionsConstraintName, formField.selectOptionsConstraintValue);\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldSelectOptionsConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateSelectOptionsConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createSelectOptionsConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateSelectOptionsConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateSelectOptionsConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedSelectOptions';\r\n }\r\n\r\n public get usedByFormFieldClasses(): string[] {\r\n return [DropDownFieldType, RadioButtonsFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.selectOptionsConstraintId = constraint.id;\r\n formField.selectOptionsConstraintName = constraint.name;\r\n formField.selectOptionsConstraintValue = constraint.constraintExpression;\r\n formField.selectOptions = constraint.constraintExpression; \r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n let constraint: FormFieldSelectOptionsConstraintWithMetrics = new FormFieldSelectOptionsConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.selectOptionsValue);\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","import { FormField } from '../../../../../models/form-builder/form-field.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../../../interfaces/iform-field-constraint.interface';\r\n//import { FormFieldSimpleListValuesConstraint, FormFieldSimpleListValuesConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/field-simple-list-values-constraint.model';\r\nimport { FormFieldListValuesConstraint, FormFieldListValuesConstraintWithMetrics } from '../../../../../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\nimport { CachedFormFieldService } from '../../../../../services/form-field-with-cache.service';\r\nimport { IFormFieldConstraintLiaison } from './ifield-constraint-liason.interface';\r\nimport { FieldConstraintLiaisonBase } from './field-constraint-liaison-base';\r\nimport { SiteFormFieldConstraintProperties } from '../../../../../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { DropDownFieldType, RadioButtonsFieldType } from '../../../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintTypeEnum, FormFieldConstraintTypeForUsersEnum } from '../../../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldSimpleListValueConstraintLiaison extends FieldConstraintLiaisonBase implements IFormFieldConstraintLiaison {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IFormFieldConstraintLiaison.\r\n // Getter/setter-like methods.\r\n public constraintTypeForEndUser(): string { // A user-friendly constraint type name.\r\n return FormFieldConstraintTypeForUsersEnum.SimpleListValues;\r\n }\r\n\r\n public managesConstraintsOfType(): string {\r\n return FormFieldConstraintTypeEnum.SimpleListValues;\r\n }\r\n\r\n public getPrimaryPropertyName(): string {\r\n return 'selectOptions'; // Yes, I am reusing the existing 'selectOptions' FormField property.\r\n }\r\n\r\n public getConstraintId(formField: FormField): number {\r\n return formField.listValuesConstraintId;\r\n }\r\n public setConstraintId(formField: FormField, value: number): void {\r\n formField.listValuesConstraintId = value;\r\n }\r\n\r\n public getConstraintName(formField: FormField): string {\r\n //return formField.listValuesConstraintName;\r\n return formField.selectOptionsConstraintName;\r\n }\r\n public setConstraintName(formField: FormField, value: string): void {\r\n formField.listValuesConstraintName = value;\r\n }\r\n\r\n public getConstraintValue(formField: FormField): string {\r\n return formField.simpleListValuesConstraintValue;\r\n }\r\n public setConstraintValue(formField: FormField, value: string): void {\r\n formField.simpleListValuesConstraintValue = value;\r\n }\r\n\r\n // not relevant for this field type\r\n public getConstraintFailureMessage(formField: FormField): string {\r\n return null;\r\n }\r\n public setConstraintFailureMessage(formField: FormField, value: string): void {\r\n // noop\r\n }\r\n\r\n public getConstraintFormFieldPropertyValue(formField: FormField): string {\r\n return formField.selectOptions;\r\n }\r\n\r\n public copyConstraintValueToCorrespondFormFieldProperty(formField: FormField, value: string): void {\r\n formField.selectOptions = value;\r\n }\r\n\r\n // Create a new, empty constraint.\r\n public createNewConstraint(dataCollectionId: number): IFormFieldConstraintWithMetrics {\r\n //return new FormFieldListValuesConstraintWithMetrics(dataCollectionId);\r\n let constraint = FormFieldListValuesConstraintWithMetrics.createSimpleListValuesConstraintFrom(dataCollectionId);\r\n return constraint;\r\n }\r\n\r\n public createNewConstraintFrom(constraintParam: IFormFieldConstraint): IFormFieldConstraintWithMetrics {\r\n let constraint = constraintParam;\r\n //let newConstraint = new FormFieldListValuesConstraintWithMetrics(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n let newConstraint = FormFieldListValuesConstraintWithMetrics.createSimpleListValuesConstraintFrom(constraint.dataCollectionId, constraint.id, constraint.name, constraint.constraintExpression);\r\n return newConstraint;\r\n }\r\n\r\n // Package constraint values as a constraint.\r\n public packageConstraint(dataCollectionId: number, formField: FormField): IFormFieldConstraint {\r\n //let packagedConstraint = new FormFieldListValuesConstraint(dataCollectionId, formField.selectOptionsConstraintId, formField.selectOptionsConstraintName, formField.selectOptionsConstraintValue);\r\n let packagedConstraint = FormFieldListValuesConstraint.createSimpleListValuesConstraintFrom(dataCollectionId, formField.selectOptionsConstraintId, formField.selectOptionsConstraintName, formField.selectOptionsConstraintValue);\r\n\r\n return packagedConstraint;\r\n }\r\n public updateOrCreateConstraint(cachedFormFieldService: CachedFormFieldService, updatedConstraintParam: IFormFieldConstraint): void {\r\n let updatedConstraint: FormFieldListValuesConstraint = updatedConstraintParam;\r\n cachedFormFieldService.updateOrCreateSimpleListValuesConstraint(updatedConstraint);\r\n }\r\n\r\n // Methods related to applying form field constraint\r\n // updates to a form field that uses the same constraint.\r\n public get createNamedConstraintMethodName(): string {\r\n return 'createSimpleListValuesConstraint';\r\n }\r\n public get updateNamedConstraintMethodName(): string {\r\n return 'updateSimpleListValuesConstraint';\r\n }\r\n public get updateOrCreateNamedConstraintMethodName(): string {\r\n return 'updateOrCreateSimpleListValuesConstraint';\r\n }\r\n public get siteNamedConstraintsMethodName(): string {\r\n return 'getSiteNamedSimpleListValueConstraints';\r\n }\r\n\r\n public get usedByFormFieldClasses(): string[] {\r\n return [DropDownFieldType, RadioButtonsFieldType];\r\n }\r\n\r\n public applyConstraintPropertiesToFormField(constraint: IFormFieldConstraint, formField: FormField) {\r\n formField.listValuesConstraintId = constraint.id;\r\n // PHarvey - 6/3/2024 - for VNEXT-1293 - changed formField.listValuesConstraintName to formField.selectOptionsConstraintName\r\n // The problem was that when editing the properties of a Simple List Values constraint, the name was empty\r\n // This was because listValuesConstraintName was being set here, but the HTML Template is using [(ngModel)]=\"field.selectOptionsConstraintName\" hence this change\r\n formField.selectOptionsConstraintName = constraint.name;\r\n formField.simpleListValuesConstraintValue = constraint.constraintExpression;\r\n formField.selectOptions = constraint.constraintExpression;\r\n }\r\n\r\n // A method to create a constraint from the results of an all site named constraints query.\r\n public createFromConstraintProperties(dataCollectionId: number, constraintProperties: SiteFormFieldConstraintProperties): IFormFieldConstraintWithMetrics {\r\n //let constraint: FormFieldListValuesConstraintWithMetrics = new FormFieldListValuesConstraintWithMetrics(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.selectOptionsValue);\r\n let constraint: FormFieldListValuesConstraintWithMetrics = FormFieldListValuesConstraintWithMetrics.createSimpleListValuesConstraintFrom(dataCollectionId, constraintProperties.constraintId, constraintProperties.constraintName, constraintProperties.selectOptionsValue);\r\n constraint.useCount = constraintProperties.useCount;\r\n return constraint;\r\n }\r\n}\r\n","
\n

\n {{Title}}\n

\n\n
\n Are you sure you wish to proceed?\n Delete all Versions of this Attachment\n
\n\n
\n Are you sure you wish to proceed?\n Renable all versions of this Attachment\n
\n\n
\n \n \n
\n
\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { AttachmentService } from '../../services/attachment.service';\r\n\n@Component({\n selector: 'app-delete-restore-attachment',\n templateUrl: './delete-restore-attachment.dialog.html',\n styleUrls: ['./delete-restore-attachment.dialog.scss'],\r\n standalone: false\n})\nexport class DeleteRestoreAttachmentDialog implements OnInit {\n private attachmentId: number;\r\n private action: string;\r\n private title: string;\r\n public actOnAllAttachments: boolean;\r\n\n constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) data, private attachmentService: AttachmentService) {\r\n this.attachmentId = data.attachmentId;\r\n this.action = data.deleteOrRestore;\r\n this.title = `${data.deleteOrRestore} Attachment`;\r\n }\n\n public ngOnInit(): void {\n }\r\n\r\n public get Title(): string {\r\n return this.title;\r\n }\r\n\r\n public get IsDeleteAction(): boolean {\r\n return this.action == 'Delete';\r\n }\r\n\r\n public get IsRestoreAction(): boolean {\r\n return this.action == 'Restore';\r\n }\r\n\r\n public onCancel(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n public onConfirm(): void {\r\n if (this.IsDeleteAction) {\r\n this.attachmentService.disableAttachment(this.attachmentId, this.actOnAllAttachments).then(x => {\r\n this.dialogRef.close();\r\n });\r\n } else if (this.IsRestoreAction) {\r\n this.attachmentService.restoreAttachment(this.attachmentId, this.actOnAllAttachments).then(x => {\r\n this.dialogRef.close();\r\n });\r\n }\r\n }\n\n}\n","\r\n\r\n\r\n\r\n
Note: Any columns you add here will display to the left of standard Attachment columns (Title, File Name etc.)
\r\n
\r\n\r\n
\r\n
{{this.DisplayName}} *
\r\n \r\n\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n\r\n
{{this.DisplayName}}
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component, ComponentFactoryResolver, ElementRef, EventEmitter, Input, OnInit, Output, Renderer2, Type as AngularCoreType,\r\n ViewChild\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatMenuTrigger } from '@angular/material/menu';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { AccessibilityHelper } from '../../../accessibility.helper';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { IFileUploadProgressValueHash } from '../../../dialogs/file-upload/file-upload-dialog.component';\r\nimport { ConfirmationDialogEnums } from '../../../enums/confirmation-dialog.enum';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\nimport { IconFormatEnum } from '../../../enums/icon-format.enum';\r\nimport { ItemTypeEnum } from '../../../enums/item-type.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FabricFileTypeIconMapping, IFileTypeIconMap } from '../../../mappings/fabric-file-types-icon.mapping';\r\nimport { AttachmentInfoWithUrls } from '../../../models/attachment/attachment-info-with-urls.model';\r\nimport { AttachmentInfo } from '../../../models/attachment/attachment-status-and-history.model';\r\nimport { AttachmentProperties } from '../../../models/attachment/attachment.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { ComponentAndFormField } from '../../../models/grid/component-and-form-field-model';\r\nimport { GridConfig } from '../../../models/grid/grid-config.model';\r\nimport { RuntimeMetadata } from '../../../models/grid/runtime-metadata.model';\r\nimport { AttachmentService, FileUploadProgress } from '../../../services/attachment.service';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { CachedFormFieldService } from '../../../services/form-field-with-cache.service';\r\nimport { FileUploaderComponent } from '../../file-uploader/file-uploader.component';\r\nimport { FormFieldConstraintLiaisonManager } from '../../form-builder/properties/form-field-properties/constraints/field-constraint-liaison-manager';\r\nimport { ButtonConfig, IButtonConfig } from '../../list-view/list-view-button-config.model';\r\nimport { TrashConfig, TrashDeleteEvent } from '../../list-view/list-view-trash-config.model';\r\nimport { ListViewComponent } from '../../list-view/list-view.component';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { GridFormFieldComponent } from '../grid-form-field/grid-form-field.component';\r\nimport { GridFieldDesignerComponent } from '../grid-field-designer/grid-field-designer.component';\r\nimport { GridFieldEditorComponent } from '../grid-field-editor/grid-field-editor.component';\r\nimport { AttachmentStandardColumnNames, GridEventTypeEnum, GridFlavorEnum, GridFlavorModifiersEnum } from '../../../enums/grid.enums';\r\nimport { GridEvent } from '../grid-form-field/grid-event';\r\nimport { DeleteRestoreAttachmentDialog } from '../../../dialogs/delete-restore-attachment/delete-restore-attachment.dialog';\r\n\r\n@Component({\n selector: 'app-attachment-form-field',\n templateUrl: './attachment-form-field.component.html',\n styleUrls: ['./attachment-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: AttachmentFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\n/* \r\n---------------------------------------------------------------------------------------------------------\r\n SEE https://community-dc.max.gov/x/qgY0mQ FOR AN OVERVIEW OF HOW ATTACHMENTS HAVE BEEN IMPLEMENTED\r\n---------------------------------------------------------------------------------------------------------\r\n*/\r\nexport class AttachmentFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n\r\n @Output() onInit = new EventEmitter();\r\n @Output() onEdit = new EventEmitter();\r\n @Output() requestFormInstanceIds = new EventEmitter();\r\n\r\n @Input() selectedId: number;\r\n\r\n @ViewChild(MatMenuTrigger) contextMenu: MatMenuTrigger;\r\n @ViewChild(ListViewComponent) attachmentListComponent: ListViewComponent;\r\n @ViewChild(FileUploaderComponent) fileUploaderComponent: FileUploaderComponent;\r\n\r\n\r\n attachmentItems: AttachmentInfoWithUrls[] = null;\r\n private wrappedGridFormFieldComponent: GridFormFieldComponent;\r\n\r\n // Constructor.\r\n public constructor(private resolver: ComponentFactoryResolver,\r\n private hostElement: ElementRef,\r\n private renderer: Renderer2,\r\n private attachmentService: AttachmentService,\r\n private dialog: MatDialog,\r\n private cachedFormFieldConstraintsService: CachedFormFieldService,\r\n private currentSiteService: CurrentSiteService,\r\n private currentUserService: CurrentUserService,\r\n private dateAdapter: DateAdapter,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private formFieldTypeAndNameService: FormFieldTypeAndNameService\r\n ) {\r\n super();\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n // START ----------------------------- NEW ngOnInit() STUFF FOR ATTACHMENTS GRID ---------------------------\r\n this.wrappedGridFormFieldComponent = new GridFormFieldComponent(\r\n this.resolver,\r\n this.hostElement,\r\n this.renderer,\r\n this.attachmentService,\r\n this.dialog,\r\n this.cachedFormFieldConstraintsService,\r\n this.currentSiteService,\r\n this.currentUserService,\r\n this.dateAdapter,\r\n this.fieldDefinitionService,\r\n this.formFieldTypeAndNameService);\r\n\r\n // Set Inputs \r\n this.wrappedGridFormFieldComponent.formField = this.formField;\r\n this.wrappedGridFormFieldComponent.flavor = this.AttachmentsGridFlavor;\r\n this.wrappedGridFormFieldComponent.flavorModifier = GridFlavorModifiersEnum.ShowLatestOnly;\r\n this.wrappedGridFormFieldComponent.mode = this.mode;\r\n\r\n this.wrappedGridFormFieldComponent.ngOnInit();\r\n\r\n this.wrappedGridFormFieldComponent.onEdit.subscribe(data => {\r\n this.onEdit.emit(data);\r\n });\r\n // END ------------------------------ NEW ngOnInit() STUFF FOR ATTACHMENTS GRID -------------------------------\r\n\r\n // Emit my onInit() output.\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n // Emit a request to get additional Id values.\r\n {\r\n let hshGetIdsInfo = {\r\n 'formInstanceElement': this.FormInstanceElement\r\n };\r\n this.requestFormInstanceIds.emit(hshGetIdsInfo);\r\n\r\n // Save Id values.\r\n this.dataCollectionId = hshGetIdsInfo['dataCollectionId'];\r\n this.folderId = hshGetIdsInfo['folderId'];\r\n this.formInstanceId = hshGetIdsInfo['formInstanceId'];\r\n } // block\r\n\r\n return;\r\n }\r\n\r\n // START =============================================== PROPERTIES AND METHODS FOR NEW ATTACHMENTS =============================================\r\n @ViewChild(GridFieldEditorComponent, { read: GridFieldEditorComponent }) gridFieldEditorComponent: GridFieldEditorComponent;\r\n private gridConfig: GridConfig = null;\r\n private runtimeMetadata: RuntimeMetadata = new RuntimeMetadata();\r\n\r\n public get WrappedGridFormFieldComponent(): GridFormFieldComponent {\r\n return this.wrappedGridFormFieldComponent;\r\n }\r\n\r\n // Access wrappedGridFormFieldComponent's GridConfig and RuntimeMetadata\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n // Cache form fields during the save configuration operation.\r\n // TODO: should I cache the rows here in Attachments Component instead? OR is it best to delegate to Wrapped Grid\r\n this.wrappedGridFormFieldComponent.GridConfig.CachedGridColumnDefs = this.wrappedGridFormFieldComponent.GridConfig.ColumnDefs;\r\n\r\n // Call form fields' saveConfiguration() method.\r\n let allComponentsAndFormFields: ComponentAndFormField[] = this.wrappedGridFormFieldComponent.RuntimeMetadata.AllComponents;\r\n for (let iComponent: number = 0; iComponent < allComponentsAndFormFields.length; iComponent++) {\r\n let component: FormFieldBaseComponent = allComponentsAndFormFields[iComponent].Component;\r\n\r\n component.saveConfiguration(form, reasonForSave);\r\n }\r\n\r\n // Save my column definitions as JSON text.\r\n let currentSite = this.currentSiteService.Site;\r\n this.FormField.childFormFields = [];\r\n\r\n for (let iCol: number = 0; iCol < this.wrappedGridFormFieldComponent.GridConfig.ColumnCount; iCol++) {\r\n let gridColDef: FormField = this.wrappedGridFormFieldComponent.GridConfig.getColumnDef(iCol);\r\n\r\n let childFormField: FormField = new FormField();\r\n\r\n childFormField.assignFrom(gridColDef);\r\n if (childFormField.id < 0)\r\n childFormField.id = 0;\r\n FormFieldConstraintLiaisonManager.synchronousUpdateFormFieldWithLatestConstraintValues(this.cachedFormFieldConstraintsService, currentSite.id, childFormField);\r\n\r\n this.FormField.childFormFields.push(childFormField);\r\n }\r\n\r\n return;\r\n }\r\n\r\n public handleEditorGridValidation(event: any) {\r\n //console.log('AttachmentCOmp.handleEditorGridValidation($event)...');\r\n }\r\n\r\n public handleConditionalLogicColumnDefsFilter(event: any) {\r\n //console.log('AttachmentCOmp.handleConditionalLogicColumnDefsFilter($event)...');\r\n }\r\n\r\n public handleGridEvent(event: GridEvent) {\r\n let attachmentId = event.data.__gridRow.databaseId;\r\n if (event.type == GridEventTypeEnum.Download) {\r\n let url = this.attachmentService.viewFile(attachmentId);\r\n window.open(url, '_blank').focus();\r\n } else if (event.type == GridEventTypeEnum.Upload) {\r\n this.openUploadDialog(this.FormInstanceElement.id, attachmentId, event.data[AttachmentStandardColumnNames.Title]);\r\n } else if (event.type == GridEventTypeEnum.Delete) {\r\n this.openDeleteRestoreDialog(attachmentId, 'Delete');\r\n } else if (event.type == GridEventTypeEnum.Restore) {\r\n this.openDeleteRestoreDialog(attachmentId, 'Restore');\r\n }\r\n }\r\n\r\n public get AttachmentsGridFlavor(): GridFlavorEnum {\r\n return GridFlavorEnum.AttachmentsGrid;\r\n }\r\n\r\n public get ToggleShowAllButtonText(): string {\r\n return this.wrappedGridFormFieldComponent.flavorModifier == GridFlavorModifiersEnum.ShowAll ?\r\n 'Show Latest Only' :\r\n 'Show All';\r\n }\r\n\r\n public openUploadDialog(formInstanceElementId: number, attachmentId: number = 0, attachmentTitle: string = null): void {\r\n this.fileUploaderComponent.openUploadDialog(formInstanceElementId, attachmentId, attachmentTitle);\r\n }\r\n\r\n public openDeleteRestoreDialog(attachmentId: any, action: string) {\r\n let dialogRef = this.dialog.open(DeleteRestoreAttachmentDialog, {\r\n data: { attachmentId: attachmentId, deleteOrRestore: action }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n this.gridFieldEditorComponent.rebind();\r\n });\r\n }\r\n\r\n public toggleShowAll() {\r\n var modifier = this.wrappedGridFormFieldComponent.flavorModifier == GridFlavorModifiersEnum.ShowLatestOnly ?\r\n GridFlavorModifiersEnum.ShowAll :\r\n GridFlavorModifiersEnum.ShowLatestOnly;\r\n this.wrappedGridFormFieldComponent.flavorModifier = modifier;\r\n this.wrappedGridFormFieldComponent.GridConfig.FlavorModifier = modifier;\r\n this.gridFieldEditorComponent.rebind();\r\n }\r\n\r\n // Called from Form Builder when properties drawer is closed\r\n public resetFormField(formField: FormField): void {\r\n this.wrappedGridFormFieldComponent.resetFormField(formField);\r\n }\r\n\r\n // END ============================================================== METHODS FOR NEW ATTACHMENTS ====================================================\r\n\r\n // Keep track of Id values needed for file uploads.\r\n private dataCollectionId: number = -1;\r\n private folderId: number = -1;\r\n private formInstanceId: number = -1;\r\n\r\n //TEAMS-424: KLW - Variable to determine if the upload button should be disabled\r\n private disableUploadButton = true;\r\n //TEAMS-424: KLW - Flag to determine if checkboxes should be displayed for the list views\r\n hasCheckboxes: boolean = true;\r\n hideActionButtons: boolean = true;\r\n\r\n buttonConfig: any;\r\n title = 'Attachments';\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.DISPLAY_KENDO_GRID_ROWS,\r\n FormFieldPropertyEnum.GRID_KEY_COLUMNS,\r\n FormFieldPropertyEnum.HIDE_GRID_FILTERING\r\n ];\r\n\r\n private readonly LIBRARY_ADD: string = 'library_add';\r\n private readonly STANDARD: string = 'standard';\r\n private readonly NONE: string = 'none';\r\n private readonly EDITABLE: string = 'Editable';\r\n private readonly CHECKED_OUT: string = 'Checked Out';\r\n private readonly MORE_VERT: string = 'more_vert';\r\n private readonly INFO: string = 'info';\r\n\r\n private contextMenuPosition = { x: '0px', y: '0px' };\r\n\r\n private _fileTypeIconMap: IFileTypeIconMap[] = null;\r\n\r\n private selectedItemDescription: string;\r\n private selectedItemDisplayOrder: number;\r\n\r\n private get FileTypeIconMap(): IFileTypeIconMap[] {\r\n if (this._fileTypeIconMap == null) {\r\n this._fileTypeIconMap = new FabricFileTypeIconMapping().FileTypeIconMap;\r\n }\r\n\r\n return this._fileTypeIconMap;\r\n }\r\n\r\n public get DataCollectionId(): number {\r\n return (this.dataCollectionId);\r\n }\r\n\r\n public get FolderId(): number {\r\n return (this.folderId);\r\n }\r\n\r\n public get FormInstanceId(): number {\r\n return (this.formInstanceId);\r\n }\r\n\r\n public get FormFieldId(): number {\r\n return (this.FormField.id);\r\n }\r\n\r\n public get ContextMenuPositionX(): string {\r\n return (this.contextMenuPosition.x);\r\n }\r\n public get ContextMenuPositionY(): string {\r\n return (this.contextMenuPosition.y);\r\n }\r\n\r\n public get GetMiniViewerURL(): string {\r\n if (this._selectedAttachment.miniViewUrl)\r\n return this._selectedAttachment.miniViewUrl;\r\n }\r\n\r\n public get ShowEditInBrowser(): boolean {\r\n\r\n let retVal: boolean = true;\r\n\r\n if (this.contextMenu) {\r\n if (this.contextMenu.menuOpen) {\r\n retVal = this.contextMenu.menuData.item.status.canCheckOut;\r\n }\r\n }\r\n\r\n if (this._selectedAttachments)\r\n if (this._selectedAttachments.length > 1)\r\n retVal = false;\r\n\r\n return retVal;\r\n }\r\n\r\n public get OnlyShowDelete() {\r\n let retVal: boolean = true;\r\n\r\n if (this._selectedAttachments)\r\n if (this._selectedAttachments.length > 1)\r\n retVal = false;\r\n\r\n\r\n return retVal;\r\n }\r\n\r\n private _selectedAttachments: AttachmentInfoWithUrls[] = null;\r\n private _enableAttachments = true;\r\n\r\n\r\n private _selectedAttachment: AttachmentInfoWithUrls = null;\r\n public get FileExtension() {\r\n return this._selectedAttachment.name.split('.').pop();\r\n }\r\n\r\n private _attachmentHistory: AttachmentInfo[] = null;\r\n public get AttachmentInfo(): AttachmentInfo[] {\r\n return this._attachmentHistory;\r\n }\r\n\r\n private _editInputAppearance: boolean = false;\r\n public get EditInputAppearance() {\r\n if (this._editInputAppearance)\r\n return this.STANDARD;\r\n else\r\n return this.NONE;\r\n }\r\n\r\n private _editEnabled: boolean = false;\r\n public get EditEnabled() {\r\n return this._editEnabled;\r\n }\r\n\r\n public selectedItemFileName = '';\r\n public get EditFileName() {\r\n if (!this._editEnabled)\r\n return this.selectedItemFileName;\r\n else\r\n return this.selectedItemFileName.split('.')[0];\r\n }\r\n\r\n public get SelectedItemDescription(): string {\r\n return this.selectedItemDescription;\r\n }\r\n\r\n public set SelectedItemDescription(value: string) {\r\n this.selectedItemDescription = value;\r\n }\r\n\r\n public get ModifiedDate() {\r\n if (this.AttachmentInfo)\r\n return this.AttachmentInfo[this.AttachmentInfo.length - 1].createdDate\r\n }\r\n\r\n public get SelectedAttachment(): AttachmentInfoWithUrls {\r\n return (this._selectedAttachment);\r\n }\r\n\r\n public get Attachments(): AttachmentInfoWithUrls[] {\r\n return (this.FormInstanceElement ? this.FormInstanceElement.attachmentDetails : null);\r\n }\r\n\r\n public get AttachmentItems(): AttachmentInfoWithUrls[] {\r\n if (this.attachmentItems == null && this.Attachments != null) {\r\n this.attachmentItems = [];\r\n\r\n this.FormInstanceElement.attachmentDetails.forEach(x => {\r\n this.attachmentItems.push(this.createAttachmentInfoWithUrlsForList(x));\r\n });\r\n }\r\n\r\n return this.attachmentItems;\r\n }\r\n\r\n public get AttachmentCount(): number {\r\n if (this.AttachmentItems) {\r\n return this.AttachmentItems.length;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n private createAttachmentInfoWithUrlsForList(item: AttachmentInfoWithUrls) {\r\n let toAdd = new AttachmentInfoWithUrls();\r\n\r\n toAdd.name = item.fileName;\r\n toAdd.createdByName = item.createdByName;\r\n toAdd.createdDate = item.createdDate;\r\n\r\n toAdd.setId(item.id);\r\n if (item.status.canCheckOut)\r\n toAdd.currentStatus = this.EDITABLE;\r\n else\r\n toAdd.currentStatus = this.CHECKED_OUT;\r\n\r\n toAdd.comment = item.comment;\r\n toAdd.createdByEmail = item.createdByEmail;\r\n toAdd.size = item.size;\r\n toAdd.versionLabel = item.versionLabel;\r\n\r\n toAdd.editInBrowserUrl = item.editInBrowserUrl;\r\n //VNEXT-707: KLW - Add option for Edit in App for SharePoint attachments\r\n toAdd.editInAppUrl = item.editInAppUrl;\r\n toAdd.viewInBrowserUrl = item.viewInBrowserUrl;\r\n toAdd.miniViewUrl = item.miniViewUrl;\r\n toAdd.downloadUrl = item.downloadUrl;\r\n\r\n toAdd.description = item.description;\r\n toAdd.displayOrder = item.displayOrder;\r\n\r\n toAdd.status = item.status;\r\n\r\n return toAdd;\r\n }\r\n\r\n private saveAttachmentProperties(newName: string, newDescription: string, displayOrder: number) {\r\n if (this._selectedAttachment.name != newName) {\r\n this.attachmentService.renameAttachment(this.DataCollectionId, this.FolderId, this.FormInstanceId, this.FormFieldId, this._selectedAttachment.name, newName).then(x => {\r\n this._selectedAttachment.name = newName;\r\n this.deselectAttachment();\r\n });\r\n }\r\n if (this._selectedAttachment.description != newDescription) {\r\n let properties = new AttachmentProperties(newDescription, displayOrder);\r\n this.attachmentService.setCustomProperties(this.DataCollectionId, this.FolderId, this.FormInstanceId, this.FormFieldId, this._selectedAttachment.name, properties).then(x => {\r\n this._selectedAttachment.description = newDescription;\r\n this.deselectAttachment();\r\n });\r\n }\r\n }\r\n\r\n private buildButtonConfig(): void {\r\n\r\n // Construct the button configs array.\r\n let itemActions: IButtonConfig[] =\r\n [\r\n new ButtonConfig('View Details', this.INFO, this.INFO),\r\n new ButtonConfig('Sub Menu', this.MORE_VERT, this.MORE_VERT)\r\n ];\r\n\r\n this.buttonConfig = {\r\n right: [\r\n // 11/5/2024 ~ Removing the add button. Old attachments should be displayed for reference but not added to\r\n // new ButtonConfig('Add Attachment', this.LIBRARY_ADD, this.LIBRARY_ADD, IconFormatEnum.MAT_ICON, this.disableUploadButton) //TEAMS-424: KLW - Use new constructor to pass in if upload button should be disabled\r\n ],\r\n item_actions: itemActions,\r\n trash: new TrashConfig(true)\r\n };\r\n }\r\n\r\n\r\n private deleteOnConfirm(entity: string[], callback: Function) {\r\n\r\n let title = 'Delete Attachment';\r\n let desc = 'Are you sure you want to delete the attachment';\r\n\r\n if (entity.length > 1) {\r\n title += 's';\r\n desc += 's:\\n';\r\n\r\n entity.forEach(x => {\r\n desc += x + '\\n';\r\n });\r\n }\r\n else {\r\n desc += ' ' + entity[0] + '?\\n';\r\n }\r\n\r\n desc += '\\nThe operation cannot be undone!';\r\n\r\n let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n data: new ConfirmationDialogModel(title, desc, { hideNo: false, dialogType: ConfirmationDialogEnums.WARNING }),\r\n panelClass: 'dialog-confirm'\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(yes => {\r\n if (yes) callback();\r\n });\r\n }\r\n\r\n private getAssociatedFabricIconProperties(extension: string): IFileTypeIconMap {\r\n let retVal: IFileTypeIconMap = null;\r\n\r\n if (extension) {\r\n let findKey = this.FileTypeIconMap.find(x => x.value.extensions.find(y => y == extension));\r\n\r\n if (findKey) {\r\n retVal = findKey;\r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n private getFileExtension(fileName: string): string {\r\n let retVal = '';\r\n\r\n if (fileName)\r\n retVal = fileName.split('.').pop();\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n public canPreview(fileName: string): boolean {\r\n let retVal: boolean = false;\r\n\r\n let fileType = this.getAssociatedFabricIconProperties(this.getFileExtension(fileName));\r\n\r\n if (fileType)\r\n if (fileType.value.canpreview)\r\n retVal = true;\r\n\r\n return retVal;\r\n }\r\n\r\n public EditButtonClicked() {\r\n this._editEnabled = !this._editEnabled;\r\n this._editInputAppearance = !this._editInputAppearance;\r\n }\r\n\r\n public EditFocusOut(event: any, field: string) {\r\n if (field == 'name') {\r\n this.selectedItemFileName = event.target.value + '.' + this.FileExtension;\r\n } else if (field == 'desc') {\r\n this.selectedItemDescription = event.target.value;\r\n }\r\n this.EditButtonClicked();\r\n }\r\n\r\n public deselectAttachment() {\r\n this._selectedAttachment = null;\r\n this._attachmentHistory = null;\r\n this._editInputAppearance = false;\r\n this._editEnabled = false;\r\n this.selectedItemFileName = '';\r\n this.selectedItemDescription = '';\r\n this.selectedItemDisplayOrder = 0;\r\n }\r\n\r\n public getSelectedId(): number {\r\n if (this._selectedAttachment != null)\r\n return this._selectedAttachment.getId();\r\n else\r\n return null;\r\n }\r\n\r\n // Handle save and cancel clicks.\r\n public saveClicked(): void {\r\n this.saveAttachmentProperties(this.selectedItemFileName, this.selectedItemDescription, this.selectedItemDisplayOrder);\r\n }\r\n\r\n public cancelClicked(): void {\r\n this.deselectAttachment();\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties =\r\n {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public doOnItemMoved(moveData: any): void {\r\n if (moveData.NothingMoved) {\r\n return null;\r\n }\r\n\r\n let movedItems = moveData.MovedItems;\r\n let targetItem = moveData.TargetOfMove;\r\n let reorderedItems = this.reorderItems(movedItems[0], targetItem);\r\n this.attachmentItems = reorderedItems;\r\n\r\n this.attachmentService.reorderAttachments(reorderedItems).then(x => { });\r\n }\r\n\r\n private reorderItems(movedItem: AttachmentInfoWithUrls, targetItem: AttachmentInfoWithUrls): AttachmentInfoWithUrls[] {\r\n let idOfMovedItem = movedItem.getId();\r\n let idOfTargetItem = targetItem.getId();\r\n\r\n let oldIndex = -1, newIndex = -1;\r\n let allItems = this.AttachmentItems;\r\n let otherItems = allItems.filter((item) => { return item.getId() != idOfMovedItem; });\r\n\r\n // find old and new index\r\n for (let i = 0; i < allItems.length; i++) {\r\n let item = allItems[i];\r\n let id = item.getId();\r\n if (id == idOfMovedItem) {\r\n oldIndex = i;\r\n } else if (id == idOfTargetItem) {\r\n newIndex = i;\r\n }\r\n }\r\n\r\n // create reordered array\r\n // see https://medium.com/kevin-salters-blog/reordering-a-javascript-array-based-on-a-drag-and-drop-interface-e3ca39ca25c\r\n let reordered = [\r\n ...otherItems.slice(0, newIndex),\r\n movedItem,\r\n ...otherItems.slice(newIndex)\r\n ];\r\n\r\n let results: AttachmentInfoWithUrls[] = [];\r\n for (let i = 0; i < reordered.length; i++) {\r\n let item = reordered[i];\r\n item.displayOrder = i + 1;\r\n results.push(item);\r\n }\r\n\r\n return results;\r\n }\r\n\r\n public doOnItemAction(eventData: any): void {\r\n let action = eventData.button.value;\r\n console.log('doOnItemAction');\r\n console.log(eventData.item);\r\n\r\n if (action == this.INFO) {\r\n this.displayAttachmentDetails(eventData.item);\r\n this.AttachmentHistory();\r\n }\r\n else if (action == this.MORE_VERT) {\r\n this.doOnItemContextMenu(eventData);\r\n }\r\n\r\n return;\r\n }\r\n\r\n public doOnItemContextMenu(event: any): void {\r\n // Set the context menu position.\r\n this.contextMenuPosition.x = event.originalEvent.clientX + 'px';\r\n this.contextMenuPosition.y = event.originalEvent.clientY + 'px';\r\n\r\n //TEAMS-424: KLW - Adding logic to pass selected items to the parent component\r\n if (event.selectedItems)\r\n if (event.selectedItems.length > 0)\r\n this._selectedAttachments = event.selectedItems;\r\n\r\n // Set menu data.\r\n this.contextMenu.menuData = { 'item': event.item };\r\n this.contextMenu.openMenu();\r\n\r\n return;\r\n }\r\n\r\n public displayAttachmentDetails(attachment: AttachmentInfoWithUrls) {\r\n this._selectedAttachment = attachment;\r\n this.selectedItemFileName = attachment.name.replace('%20', ' ');\r\n this.selectedItemDescription = attachment.description;\r\n this.selectedItemDisplayOrder = attachment.displayOrder;\r\n\r\n AccessibilityHelper.setFocus('#details-drawer-keyboard-focus-div');\r\n }\r\n\r\n public get ActivityListIcon(): string {\r\n return ItemTypeEnum.ATTACHMENT_ACTIVITY;\r\n }\r\n\r\n public AttachmentHistory() {\r\n\r\n if (this._attachmentHistory == null) {\r\n\r\n this.attachmentService.getAttachmentHistories(this.DataCollectionId, this.FolderId, this.FormInstanceId, this.FormFieldId).then(x => {\r\n try {\r\n this._attachmentHistory = x.find(h => h.history.some(i => i.fileName === this.SelectedAttachment.name)).history;\r\n } catch (e) {\r\n //log error\r\n }\r\n });\r\n }\r\n }\r\n\r\n public formatBytes(bytes, decimals = 0.0) {\r\n if (bytes === 0) {\r\n return '0 Bytes';\r\n }\r\n const k = 1024;\r\n const dm = decimals <= 0 ? 0 : decimals || 2;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n }\r\n\r\n // Implement protected methods defined in my base class.\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n //TEAMS-424: KLW - Set if the upload button should be disabled, which is true except for a form instance of attachments.\r\n //Also put in a check to see if attachments should be used or not\r\n this.attachmentService.getCanUseAttachments().then(x => {\r\n this._enableAttachments = x;\r\n\r\n if (this.Mode === 'instance' && this._enableAttachments) {\r\n this.disableUploadButton = false;\r\n }\r\n else {\r\n this.disableUploadButton = true;\r\n }\r\n\r\n this.buildButtonConfig();\r\n });\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if (this.IsInPreviewOrInstanceMode) {\r\n // Ask my data source to deserialize any JSON grid data (might not be any).\r\n if (this.FormInstanceElement.childGridRows) {\r\n this.wrappedGridFormFieldComponent.createConfigFromChildGridRows(this.FormInstanceElement.childGridRows);\r\n }\r\n if (this.gridFieldEditorComponent != null) {\r\n this.gridFieldEditorComponent.parentReceivedFormInstanceElement(this.FormInstanceElement);\r\n }\r\n } // if \r\n\r\n return;\r\n }\r\n\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n // NOTE: NEED TO REVISIT THIS.\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (AttachmentFormFieldComponent);\r\n }\r\n\r\n // Handle control events.\r\n public handleFilesUploaded(eventData: IFileUploadProgressValueHash): void {\r\n if (eventData) {\r\n this.gridFieldEditorComponent.rebind();\r\n }\r\n }\r\n\r\n //VNEXT-707: KLW - Add option for Edit in App for SharePoint attachments\r\n public openEditInAppUrl(): void {\r\n let editInAppUrl = this.contextMenu.menuData.item.editInAppUrl;\r\n\r\n if (editInAppUrl)\r\n window.open(editInAppUrl, '_blank').focus();\r\n }\r\n\r\n public openEditInBrowserUrl(): void {\r\n let editInBrowserUrl = this.contextMenu.menuData.item.editInBrowserUrl;\r\n\r\n if (editInBrowserUrl)\r\n window.open(editInBrowserUrl, '_blank').focus();\r\n }\r\n\r\n public openViewInBrowserUrl(): void {\r\n let viewInBrowserUrl = this.contextMenu.menuData.item.viewInBrowserUrl;\r\n\r\n if (viewInBrowserUrl)\r\n window.open(viewInBrowserUrl, '_blank').focus();\r\n }\r\n\r\n public openDownloadUrl(event: any = null): void {\r\n let item;\r\n if (event) {\r\n item = event.item;\r\n } else {\r\n item = this.contextMenu.menuData.item;\r\n }\r\n let downloadUrl = item.downloadUrl;\r\n\r\n if (downloadUrl)\r\n window.open(downloadUrl, '_blank').focus();\r\n }\r\n\r\n\r\n public matMenuDeleteAttachment(): void {\r\n let items = [this.contextMenu.menuData.item.name];\r\n\r\n if (this._selectedAttachments)\r\n if (this._selectedAttachments.length > 1)\r\n items = this._selectedAttachments.map(x => x.name);\r\n\r\n this.deleteAttachment(items);\r\n }\r\n\r\n public deleteAttachment(fileName: string[]): void {\r\n if (fileName) {\r\n this.deleteOnConfirm(fileName, () => {\r\n fileName.forEach(file => {\r\n this.attachmentService.deleteAttachment(this.DataCollectionId, this.FolderId, this.FormInstanceId, this.FormFieldId, file).then(x => {\r\n this.FormInstanceElement.attachmentDetails = this.FormInstanceElement.attachmentDetails.filter(item => item.fileName !== file);\r\n this.attachmentItems = this.attachmentItems.filter(item => item.name !== file);\r\n\r\n this.updateTableSource(this.attachmentItems);\r\n });\r\n }\r\n );\r\n });\r\n }\r\n }\r\n\r\n public doOnItemDelete(eventData: TrashDeleteEvent): void {\r\n //TEAMS-424: KLW - Change the delete logic to handle a selection instead of just one item\r\n let fileNames = [];\r\n\r\n if (eventData.items.length > 0) {\r\n fileNames = eventData.items.map(x => x.name);\r\n }\r\n\r\n this.deleteAttachment(fileNames);\r\n\r\n return;\r\n }\r\n\r\n // DEPRECATED\r\n public doOnButtonClick(eventData: any): void {\r\n if (eventData.button == this.LIBRARY_ADD) {\r\n this.fileUploaderComponent.openUploadDialog(this.FormInstanceElement.id);\r\n }\r\n }\r\n\r\n public updateTableSource(source: AttachmentInfoWithUrls[]) {\r\n this.attachmentListComponent.updateTableSource(this.AttachmentItems);\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","\r\n\r\n\r\n\r\n
\r\n
\r\n {{this.DisplayName}}\r\n *\r\n
\r\n \r\n\r\n \r\n
\r\n

Use properties to load options from a CSV file

\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n {{dropDownHeader}}\r\n\r\n \r\n \r\n -- Select {{dropDownHeader}}--\r\n \r\n\r\n \r\n {{this.getSelectedValue(hshOption.ValueText, hshOption.Index, i)}}\r\n \r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n {{this.Error}}\r\n
\r\n\r\n
\r\n","import {\r\n Component, OnDestroy, OnInit,\r\n Renderer2, Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../../../models/cascading-dropdown/cascading-dropdown-data.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { CascadingDropDownFormFieldBaseComponent } from '../drop-down-form-field-base/drop-down-form-field-base.component';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-cascading-drop-down-form-field',\n templateUrl: '../drop-down-form-field-base/drop-down-form-field-base.component.html',\n styleUrls: [\n '../drop-down-form-field-base/drop-down-form-field-base.component.scss',\n '../form-fields.scss'\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CascadingDropDownFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\n\r\nexport class CascadingDropDownFormFieldComponent extends CascadingDropDownFormFieldBaseComponent implements OnInit, OnDestroy {\r\n // Instance data.\r\n // Note: all instance data is now in base class CascadingDropDownFormFieldBaseComponent.\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2,\r\n private injectedCurrentUserServiceForBaseClass: CurrentUserService)\r\n {\r\n super(injectedCurrentUserServiceForBaseClass);\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n super.ngOnDestroy();\r\n }\r\n\r\n // Accessor methods.\r\n // Note: this methods have been moved into my base class.\r\n\r\n // Implement protected methods defined in my base class.\r\n // Handle getting this field's form instance element.\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n let displayValue: string = '';\r\n\r\n if ((!formInstanceElementParam.UserUpdatedData) || (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n } else if ((formFieldParam.jsonConfig != null) && (formFieldParam.jsonConfig.trim() != '') && (formInstanceElementParam.textValue != null) && (formInstanceElementParam.textValue.trim() != '')) {\r\n let config: CascadingDropDownFormFieldConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formFieldParam.jsonConfig);\r\n\r\n displayValue = CascadingDropDownFormFieldData.getDisplayValue(config, formInstanceElementParam.textValue);\r\n }\r\n\r\n return displayValue;\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n if ((formField.jsonConfig != null) && (formField.jsonConfig.trim() != '')) {\r\n elementWrapper.formInstanceElement.TextValue = value;\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n let config: CascadingDropDownFormFieldConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n elementWrapper.standinDisplayValue = CascadingDropDownFormFieldData.getDisplayValue(config, elementWrapper.formInstanceElement.TextValue);\r\n }\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (CascadingDropDownFormFieldComponent);\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n
\r\n
\r\n \r\n \r\n
{{this.DisplayName}}
\r\n \r\n
\r\n\r\n \r\n {{this.DisplayName}}\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n \r\n \r\n
{{this.DisplayName}}
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n","import {\r\n Component, ElementRef, EventEmitter, OnInit, Output, Renderer2, Type as AngularCoreType, ViewChild\r\n} from '@angular/core';\r\nimport { FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { MatCheckbox } from '@angular/material/checkbox';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { ControlType } from '../form-field-base/form-field-base.component';\r\nimport { InputFormFieldBaseComponent } from '../input-form-field-base/input-form-field-base.component';\r\n\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-checkbox-form-field',\n templateUrl: './checkbox-form-field.component.html',\n styleUrls: ['./checkbox-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CheckboxFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class CheckboxFormFieldComponent extends InputFormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n @ViewChild('matCheckbox') matCheckboxElement: ElementRef;\r\n\r\n private bSaveInProgress: boolean = false;\r\n\r\n // Constructor.\r\n constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('checkbox');\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldProperties,\r\n\r\n saveDataRequired: true // 02-23-2021: added this property, needed to make sure a\r\n // checkbox default value does not get applied\r\n // after a form instance save.\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n // Accessor methods.\r\n public get DefaultCheckboxValue(): boolean {\r\n let bChecked: boolean = false;\r\n\r\n if (this.FormField) {\r\n if ((this.FormField.defaultValue !== undefined) && (this.FormField.defaultValue !== null)) {\r\n if (this.FormField.defaultValue.toLowerCase() === 'true') {\r\n bChecked = true;\r\n }\r\n }\r\n }\r\n\r\n return (bChecked);\r\n }\r\n\r\n public set DefaultCheckboxValue(bValue: boolean) {\r\n // Note: this method is a NOOP on purpose.\r\n\r\n return;\r\n }\r\n\r\n // Implement saveData()\r\n public saveData(formInstance: any): void {\r\n this.bSaveInProgress = true;\r\n\r\n // Force the caller to 'remember' my data by setting\r\n // a value for my form field Id in the provided hash.\r\n //\r\n // The following line causes the caller also to call\r\n // saveCompleted(), the following method.\r\n //hshComponentDatatoSave[this.formField.id] = this.formField;\r\n\r\n return;\r\n }\r\n\r\n //public saveCompleted(hshSavedComponentData: any): void {\r\n public saveCompleted(formInstance: any): void {\r\n // The fact that we are receiving this call\r\n // means that a save was in progress.\r\n this.bSaveInProgress = true;\r\n // Setting a zero milliseconds timeout will\r\n // allow the following method,\r\n // formInstanceElementReceived(), to be\r\n // executed before the code to reset the\r\n // 'bSaveInProgress' property is reset to\r\n // false.\r\n setTimeout(() => {\r\n this.bSaveInProgress = false;\r\n }, 0);\r\n\r\n return;\r\n }\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n if ((this.FormInstanceElement.UserUpdatedData != true) &&\r\n (!this.bSaveInProgress)) {\r\n // 02-22-2021 note: this if statement is evaluating to true for a\r\n // checkbox form field that has a default value of\r\n // true even after the user enters and saves a value\r\n // of false. After the save completes, this method\r\n // executes, and reset the user-entered false value to true.\r\n //\r\n // Note: this comment will be removed when the above bug is fixed. \r\n this.setDefaultBooleanValue();\r\n }\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.setupBooleanFormControl();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n\r\n // protected writeValueTriggered(): void {\r\n // if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // // If I have no value assigned but\r\n // // have a default value, apply it now.\r\n // if ((this.FormInstanceElement.UserUpdatedData != true) &&\r\n // (!this.bSaveInProgress)) {\r\n // // 02-22-2021 note: this if statement is evaluating to true for a\r\n // // checkbox form field that has a default value of\r\n // // true even after the user enters and saves a value\r\n // // of false. After the save completes, this method\r\n // // executes, and reset the user-entered false value to true.\r\n // //\r\n // // Note: this comment will be removed when the above bug is fixed. \r\n // this.setDefaultBooleanValue();\r\n // }\r\n\r\n // // Setup my Reactive Forms data structure.\r\n // this.setupBooleanFormControl();\r\n // }\r\n // }\r\n\r\n // return;\r\n // }\r\n\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n this.SetupFormControlFromWriteValue();\r\n\r\n /*\r\n // For this field type, treat a value change as a blue event.\r\n let localFormControl: FormControl = this.FormControl;\r\n if (localFormControl != null) {\r\n localFormControl.valueChanges.subscribe(updatedValue => {\r\n super.handleOnBlur();\r\n });\r\n }\r\n */\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Override notifyValueChanged.\r\n protected notifyValueChanged(): void {\r\n super.notifyValueChanged();\r\n\r\n super.handleOnBlur();\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.booleanValue)) {\r\n // Set a default value.\r\n this.setDefaultBooleanValue();\r\n\r\n formInstanceElementParam.BooleanValue = this.FormInstanceElement.booleanValue;\r\n }\r\n\r\n return (formInstanceElementParam.booleanValue ? 'check_box' : 'check_box_outline_blank');\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n elementWrapper.formInstanceElement.booleanValue = false;\r\n elementWrapper.standinDisplayValue = 'check_box_outline_blank';\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeBoolean;\r\n if (value.toLowerCase() == \"true\") {\r\n elementWrapper.formInstanceElement.booleanValue = true;\r\n elementWrapper.standinDisplayValue = 'check_box';\r\n }\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (CheckboxFormFieldComponent);\r\n }\r\n\r\n // Override some base class methods.\r\n public handleOnBlur(): void {\r\n super.handleOnBlur();\r\n }\r\n\r\n public handleOnFocus(eventData: FocusEvent): void {\r\n super.handleOnFocus(eventData);\r\n }\r\n\r\n // Implement doSetFocus().\r\n protected doSetFocus(): void {\r\n setTimeout(() => {\r\n this.doDoSetFocus();\r\n }, 1000);\r\n\r\n // 01-04-2021 note: the following code is not yet working.\r\n /*\r\n let inputSelector: string = `#${this.matInputId}`;\r\n let matInput: any = this.renderer.selectRootElement(inputSelector);\r\n matInput.focus();\r\n */\r\n\r\n return;\r\n }\r\n\r\n private doDoSetFocus(): void {\r\n let matCheckbox: MatCheckbox = this.matCheckboxElement;\r\n matCheckbox.focus();\r\n\r\n return;\r\n }\r\n}\r\n","\r\nexport enum UserTypeEnum {\r\n User = 'User',\r\n Group = 'Group',\r\n Role = 'Role'\r\n}\r\n","import { IUserOrGroupInfo } from './iuser-or-group-info.interface';\r\nimport { UserTypeEnum } from './user-type.enum';\r\n\r\nexport class CommentUserOrGroupInfo implements IUserOrGroupInfo {\r\n // Static data.\r\n private static nextClientId: number = 1;\r\n\r\n public clientId: number;\r\n\r\n //public isUser: boolean;\r\n public userType: UserTypeEnum;\r\n public userOrGroupId: string;\r\n public displayText: string;\r\n\r\n public constructor(userType: UserTypeEnum, userOrGroupId: string, displayText: string) {\r\n this.clientId = CommentUserOrGroupInfo.nextClientId++;\r\n\r\n //this.isUser = isUser;\r\n this.userType = userType;\r\n this.userOrGroupId = userOrGroupId;\r\n this.displayText = displayText;\r\n }\r\n}\r\n","import { Type, plainToClass } from \"class-transformer\";\r\n\r\nimport { ICommentInfo } from './icomment-info.interface';\r\nimport { CommentUserOrGroupInfo } from './comment-user-or-group';\r\nimport { UserTypeEnum } from './user-type.enum';\r\nimport { IUserOrGroupInfo } from './iuser-or-group-info.interface';\r\n\r\nexport class CommentInfo implements ICommentInfo {\r\n // Static data.\r\n private static nextClientId: number = 1;\r\n\r\n // Properties.\r\n public clientId: number;\r\n\r\n public comment: string;\r\n\r\n public commenter: string;\r\n\r\n public commentTimestamp: Date;\r\n\r\n public isSelected: boolean = false;\r\n public get SelectedText(): string {\r\n return (this.isSelected ? 'Selected' : 'Select');\r\n }\r\n\r\n public isExpanded: boolean;\r\n\r\n public get ViewableByText(): string {\r\n let text = 'Anyone';\r\n\r\n if ((this.viewableByUsersAndGroups != null) && (this.viewableByUsersAndGroups.length > 0)) {\r\n let numViewableBy: number = this.viewableByUsersAndGroups.length;\r\n let numUsers: number = this.viewableByUsersAndGroups.filter(vb => vb.userType == UserTypeEnum.User).length;\r\n\r\n if (numUsers == 0)\r\n text = (this.viewableByUsersAndGroups.length == 1 ? '1 group' : `${numViewableBy} groups`);\r\n else if (numUsers == numViewableBy)\r\n text = (this.viewableByUsersAndGroups.length == 1 ? '1 user' : `${numViewableBy} users`);\r\n else\r\n text = `${numViewableBy} users/groups`;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n @Type(() => CommentUserOrGroupInfo)\r\n public viewableByUsersAndGroups: CommentUserOrGroupInfo[] = [];\r\n\r\n public isFirstViewableBy(viewableBy: IUserOrGroupInfo): boolean {\r\n return ((this.viewableByUsersAndGroups != null) && (this.viewableByUsersAndGroups.length >= 1) && (this.viewableByUsersAndGroups[0].clientId == viewableBy.clientId));\r\n }\r\n public isLastViewableBy(viewableBy: IUserOrGroupInfo): boolean {\r\n let isLast = false;\r\n if ((this.viewableByUsersAndGroups != null) && (this.viewableByUsersAndGroups.length > 0)) {\r\n let lastIndex = this.viewableByUsersAndGroups.length - 1;\r\n isLast = (this.viewableByUsersAndGroups[lastIndex].clientId == viewableBy.clientId);\r\n }\r\n return isLast;\r\n }\r\n\r\n public editingEnabled: boolean = false;\r\n\r\n // Constructor.\r\n public constructor(comment: string, commenter: string, commentTimestamp: Date) {\r\n this.clientId = CommentInfo.nextClientId++;\r\n\r\n this.comment = comment;\r\n this.commenter = commenter;\r\n this.commentTimestamp = commentTimestamp;\r\n }\r\n\r\n public toggleSelected(): void {\r\n this.isSelected = !this.isSelected;\r\n }\r\n}\r\n","import { Type, plainToClass } from \"class-transformer\";\r\n\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { PickerItem } from '../picker-item.model';\r\nimport { UserTypeEnum } from './user-type.enum';\r\nimport { IUserOrGroupInfo } from './iuser-or-group-info.interface';\r\nimport { ICommentInfo } from './icomment-info.interface';\r\nimport { CommentUserOrGroupInfo } from './comment-user-or-group';\r\nimport { CommentInfo } from './comment-info';\r\n\r\n// Define comments data types.\r\n\r\n// Define a contacts data structure.\r\nexport class CommentsFormFieldData {\r\n // Property.\r\n private nextClientId: number = 1;\r\n @Type(() => CommentInfo)\r\n //private comments: ICommentInfo[] = [];\r\n private comments: CommentInfo[] = [];\r\n\r\n // Constructor.\r\n public constructor() { }\r\n\r\n // Getter/setter methods.\r\n public get Comments(): ICommentInfo[] {\r\n return this.comments;\r\n }\r\n public get CommentCount(): number {\r\n return (this.comments != null ? this.comments.length : 0);\r\n }\r\n\r\n public get SelectedComment(): ICommentInfo {\r\n let comment = this.comments.find(c => c.isSelected);\r\n return comment;\r\n }\r\n\r\n // Method(s).\r\n public addNewComment(commenter: string, commentTimestamp: Date): ICommentInfo {\r\n this.deselectAllComments();\r\n\r\n let comment: CommentInfo = new CommentInfo('', commenter, commentTimestamp);\r\n comment.clientId = this.nextClientId++;\r\n comment.isSelected = true;\r\n comment.editingEnabled = true;\r\n this.comments.push(comment);\r\n\r\n return comment;\r\n }\r\n\r\n public addComment(comment: CommentInfo): void {\r\n comment.clientId = this.nextClientId++;\r\n this.comments.push(comment);\r\n }\r\n\r\n public popComments(popCount: number): CommentInfo[] {\r\n let poppedComments: CommentInfo[] = [];\r\n\r\n let numPopped: number = 0;\r\n while ((numPopped < popCount) && (this.comments.length > 0)) {\r\n let poppedComment: CommentInfo = this.comments.pop();\r\n poppedComments.push(poppedComment);\r\n numPopped++;\r\n }\r\n\r\n return poppedComments;\r\n }\r\n\r\n public selectComment(comment: CommentInfo): void {\r\n let selectedComment = this.SelectedComment;\r\n if (selectedComment != null)\r\n selectedComment.isSelected = false;\r\n\r\n comment.isSelected = true;\r\n }\r\n\r\n public deleteComment(commentToDelete: ICommentInfo): ICommentInfo {\r\n this.comments = this.comments.filter(c => c.clientId != commentToDelete.clientId);\r\n return commentToDelete;\r\n }\r\n public deleteCommentById(clientId: number): ICommentInfo {\r\n let deletedComment = this.comments.find(c => c.clientId == clientId);\r\n this.comments = this.comments.filter(c => c.clientId != clientId);\r\n return deletedComment;\r\n }\r\n\r\n public deselectAllComments(): void {\r\n for (let index: number = 0; index < this.comments.length; index++) {\r\n let comment: ICommentInfo = this.comments[index];\r\n comment.isSelected = false;\r\n }\r\n }\r\n\r\n public addViewableByToSelectedComment(userOrGroupData: PickerItem): void {\r\n let selectedComment = this.SelectedComment;\r\n\r\n if (selectedComment != null) {\r\n let userType: UserTypeEnum = (userOrGroupData.isUser ? UserTypeEnum.User : UserTypeEnum.Group);\r\n let viewableBy: CommentUserOrGroupInfo = new CommentUserOrGroupInfo(userType, userOrGroupData.key, userOrGroupData.displayName);\r\n selectedComment.viewableByUsersAndGroups.push(viewableBy);\r\n }\r\n }\r\n\r\n public addViewableByToComment(userOrGroupData: PickerItem, comment: ICommentInfo): void {\r\n let userType: UserTypeEnum = (userOrGroupData.isUser ? UserTypeEnum.User : UserTypeEnum.Group);\r\n let viewableBy: CommentUserOrGroupInfo = new CommentUserOrGroupInfo(userType, userOrGroupData.key, userOrGroupData.displayName);\r\n comment.viewableByUsersAndGroups.push(viewableBy);\r\n }\r\n\r\n public deleteViewableBy(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n if (comment.viewableByUsersAndGroups != null) {\r\n comment.viewableByUsersAndGroups = comment.viewableByUsersAndGroups.filter(vb => vb.clientId != viewableBy.clientId);\r\n }\r\n }\r\n public moveViewableByUp(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n this.moveViewableBy(comment, viewableBy, -1);\r\n }\r\n public moveViewableByDown(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n this.moveViewableBy(comment, viewableBy, 1);\r\n }\r\n\r\n public isViewableByUser(comment: ICommentInfo, userMaxId: string): boolean {\r\n let containsUser: boolean = false;\r\n\r\n //let userObject: CommentUserOrGroupInfo = comment.viewableByUsersAndGroups.find(u => u.isUser && (u.userOrGroupId == userMaxId));\r\n let userObject: CommentUserOrGroupInfo = comment.viewableByUsersAndGroups.find(u => (u.userType == UserTypeEnum.User) && (u.userOrGroupId == userMaxId));\r\n containsUser = (userObject != null);\r\n\r\n return containsUser;\r\n }\r\n\r\n // Static method.\r\n public static deserializeData(formInstanceElement: FormInstanceElement): CommentsFormFieldData {\r\n let data: CommentsFormFieldData = null;\r\n\r\n if (formInstanceElement.textValue && (formInstanceElement.textValue.trim() != '')) {\r\n let hshData: any = JSON.parse(formInstanceElement.textValue);\r\n data = plainToClass(CommentsFormFieldData, hshData);\r\n } else\r\n data = new CommentsFormFieldData();\r\n\r\n return data;\r\n }\r\n\r\n // Helper methodes.\r\n private moveViewableBy(comment: ICommentInfo, viewableBy: IUserOrGroupInfo, indexChange: number): void {\r\n if (comment.viewableByUsersAndGroups != null) {\r\n let currentIndex = comment.viewableByUsersAndGroups.indexOf(viewableBy);\r\n let removedViewableBy = comment.viewableByUsersAndGroups.splice(currentIndex, 1);\r\n comment.viewableByUsersAndGroups.splice(currentIndex + indexChange, 0, removedViewableBy[0]);\r\n }\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n {{this.DisplayName}}\r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
#\r\n {{i + 1}}\r\n \r\n Comment\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Commenter\r\n \r\n {{element.commenter}}
\r\n {{element.commentTimestamp | date:'medium'}}\r\n
\r\n Viewable By\r\n \r\n {{element.ViewableByText}}\r\n \r\n Action\r\n \r\n
\r\n {{element.SelectedText}}\r\n\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n Currently, anyone who can view this Form can see this comment. To limit who can see it, select it by checking \"Select\" and then use the picker below to add user(s)/group(s).\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{this.ViewableUserOrGroup(viewableBy)}}{{this.ViewableUserOrGroupType(viewableBy)}}\r\n arrow_upward\r\n \r\n arrow_downward\r\n \r\n delete\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n\r\n
\r\n
\r\n","import {\r\n Component, EventEmitter, OnInit, Output, Type as AngularCoreType, ViewChild\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatTable } from '@angular/material/table';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { AlertDialogComponent, AlertDialogModel } from '../../../../shared/dialogs/alert/alert-dialog.component';\r\nimport { CommentInfo } from '../../../models/comments-data/comment-info';\r\nimport { CommentsFormFieldData } from '../../../models/comments-data/comments-form-field.model';\r\nimport { ICommentInfo } from '../../../models/comments-data/icomment-info.interface';\r\nimport { IUserOrGroupInfo } from '../../../models/comments-data/iuser-or-group-info.interface';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { PickerItem } from '../../../models/picker-item.model';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\n\r\n\r\n@Component({\n selector: 'app-comments-form-field',\n templateUrl: './comments-form-field.component.html',\n styleUrls: ['./comments-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CommentsFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class CommentsFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private numDisplayRows: number = 1;\r\n private commentsData: CommentsFormFieldData = new CommentsFormFieldData();\r\n\r\n @ViewChild(MatTable) table: MatTable;\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS,\r\n FormFieldPropertyEnum.SHOW_COMMENTS_PROPERTIES\r\n ];\r\n\r\n private displayedColumns: string[] = [];\r\n\r\n //VNEXT-614: KLW - Adding property getter to determine if control should be disabled\r\n public get Disabled() {\r\n return this.readOnly;\r\n }\r\n\r\n private readonly numDisplayRowsValues: string[] = [null, '1', '2', '3', '4', '5'];\r\n\r\n // Constructor.\r\n public constructor(public dialog: MatDialog, private currentUserService: CurrentUserService) {\r\n super();\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n this.propertyUpdated(this.FormField, FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS);\r\n\r\n if (this.Mode === 'design') {\r\n this.createExampleComments();\r\n } else if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // Note: existing comments, if any, will be loaded in method formInstanceElementReceived().\r\n }\r\n\r\n // Derived columns to display.\r\n this.deriveDisplayedColumns();\r\n\r\n // Emit 'onInit' to my parent component.\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n\r\n\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n return; // Can see @ViewChild() values when this method is called.\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public columnIsSticky(colName: string): boolean {\r\n // Note: this does not need to be a hard code value, but it is.\r\n return true;\r\n }\r\n public get HeaderRowIsSticky(): boolean {\r\n return true;\r\n }\r\n\r\n public get NumDisplayRows(): number {\r\n return this.numDisplayRows;\r\n }\r\n\r\n public getCommentTableCssClasses(isDiv: boolean): string {\r\n let cssClasses: string = (isDiv ? 'mat-table-div comments-mat-table-div-max-height' : 'comments-mat-table comments-mat-table-max-height');\r\n\r\n if (this.FormField.displayRows != null) {\r\n switch (this.FormField.displayRows) {\r\n case '2':\r\n case '3':\r\n case '4':\r\n case '5':\r\n cssClasses =\r\n (isDiv ?\r\n `mat-table-div comments-mat-table-div-${this.FormField.displayRows}-rows` :\r\n `comments-mat-table comments-mat-table-${this.FormField.displayRows}-rows`);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return cssClasses;\r\n }\r\n\r\n public get CommentsListing(): ICommentInfo[] {\r\n return this.commentsData.Comments;\r\n }\r\n\r\n public get DisplayedColumns(): string[] {\r\n return this.displayedColumns;\r\n }\r\n\r\n public get CommentSelectionDisabled(): boolean {\r\n return this.mode == 'design';\r\n }\r\n\r\n public get AddViewableByUserOrGroupLabel(): string {\r\n return 'Add User or Group To View Comment';\r\n }\r\n public get AddViewableByUserOrGroupButtonTitle(): string {\r\n return 'Add User or Group';\r\n }\r\n public get AddViewableByButtonAdditionalStyle(): string {\r\n return '';\r\n }\r\n public get AddViewableByButtonFlyoverText(): string {\r\n return 'Add a person who can view this comment';\r\n }\r\n public get AddViewableByButtonCanEnable(): boolean {\r\n return (this.commentsData.SelectedComment != null);\r\n }\r\n public ViewableByCanMoveUp(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): boolean {\r\n return (!comment.isFirstViewableBy(viewableBy));\r\n }\r\n public ViewableByCanMoveDown(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): boolean {\r\n return (!comment.isLastViewableBy(viewableBy));\r\n }\r\n public MoveViewableByUpTooltip(viewableBy: IUserOrGroupInfo): string {\r\n let action = viewableBy.userType.toLowerCase();\r\n return `Move this ${action} up`;\r\n }\r\n public MoveViewableByDownTooltip(viewableBy: IUserOrGroupInfo): string {\r\n let action = viewableBy.userType.toLowerCase();\r\n return `Move this ${action} down`;\r\n }\r\n public DeleteViewableByTooltip(viewableBy: IUserOrGroupInfo): string {\r\n let action = viewableBy.userType.toLowerCase();\r\n return `Delete this ${action}`;\r\n }\r\n public get PickerInputDisabled(): boolean {\r\n return (this.mode === 'design');\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n\r\n return (position);\r\n }\r\n\r\n public get EnableCommentEditing(): boolean {\r\n // Note: check with Shaun to see if this needs to be configurable.\r\n return true;\r\n }\r\n public getEditCommentTooltip(element: ICommentInfo): string {\r\n return (element.editingEnabled ? 'End editing this comment' : 'Edit this comment');\r\n }\r\n public get EditCommentButtonDisabled(): boolean {\r\n return (this.Mode === 'design');\r\n }\r\n\r\n public getShowViewableByRowsTooltip(comment: ICommentInfo): string {\r\n let action = (comment.isExpanded ? 'Hide' : 'Show');\r\n let tooltip = `${action} users, groups who have permission to see this comment`;\r\n return tooltip;\r\n }\r\n\r\n public get TrashCanTooltip(): string {\r\n return 'Delete this comment';\r\n }\r\n public get TrashCanButtonDisabled(): boolean {\r\n return (this.mode === 'design');\r\n }\r\n\r\n public get AddNewCommentButtonDisabled(): boolean {\r\n return (this.mode == 'design');\r\n }\r\n\r\n public get TextAreaRowCount(): number {\r\n // Note: we might want to make this configurable.\r\n return 2;\r\n }\r\n\r\n public get AddNewCommentIconTitle(): string {\r\n return 'Add a new comment';\r\n }\r\n public get AddNewCommentIconTooltip(): string {\r\n return 'Click this button to add a new comment to this table';\r\n }\r\n\r\n public HasViewableByUsersAndGroups(comment: ICommentInfo): boolean {\r\n return ((comment.viewableByUsersAndGroups != null) && (comment.viewableByUsersAndGroups.length > 0));\r\n }\r\n public ViewableByUsersAndGroups(comment: ICommentInfo): IUserOrGroupInfo[] {\r\n return comment.viewableByUsersAndGroups;\r\n }\r\n public ViewableUserOrGroupType(userOrGroup: IUserOrGroupInfo): string {\r\n return userOrGroup.userType;\r\n }\r\n public ViewableUserOrGroup(userOrGroup: IUserOrGroupInfo): string {\r\n return userOrGroup.displayText;\r\n }\r\n public CommentViewableByClass(comment: ICommentInfo): string {\r\n return (comment.isExpanded ? 'expanded-viewable-by-div' : 'hidden-viewable-by-div');\r\n }\r\n public CommentViewableByStyle(comment: ICommentInfo): string {\r\n let viewableByHeight = 40;\r\n let style = '';\r\n if (comment.isExpanded && (comment.viewableByUsersAndGroups != null)) {\r\n let height = comment.viewableByUsersAndGroups.length * viewableByHeight;\r\n style = `height: ${height}px; max-height: ${height}px;`;\r\n }\r\n return style;\r\n }\r\n public get CommentViewableByTableStyle(): string {\r\n return \"margin-left: 200px;\";\r\n }\r\n public get CommentViewableByTableRowStyle(): string {\r\n return \"height: 40px; width: 300px;\";\r\n }\r\n // End methods called by my HTML code.\r\n\r\n // Handle control events.\r\n public addViewableByButtonClicked(userOrGroupData: PickerItem): void {\r\n let selectedComments = this.commentsData.Comments.filter(x => { return x.isSelected });\r\n\r\n if (selectedComments.length > 0) {\r\n for (let comment of selectedComments) {\r\n this.commentsData.addViewableByToComment(userOrGroupData, comment);\r\n }\r\n userOrGroupData['clearMemberInput'] = true;\r\n } else {\r\n let message = 'Please select a comment using one of the checkboxes to add a user or group.';\r\n let alertDlgModel = new AlertDialogModel('Cannot Add User or Group', message);\r\n this.dialog.open(AlertDialogComponent, {\r\n maxWidth: \"600px\",\r\n data: alertDlgModel\r\n });\r\n }\r\n\r\n //VNEXT-665: KLW - Set flag to clear Max Picker\r\n userOrGroupData['clearMemberInput'] = true;\r\n }\r\n public deleteViewableBy(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n this.commentsData.deleteViewableBy(comment, viewableBy);\r\n }\r\n public moveViewableByUp(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n this.commentsData.moveViewableByUp(comment, viewableBy);\r\n }\r\n public moveViewableByDown(comment: ICommentInfo, viewableBy: IUserOrGroupInfo): void {\r\n this.commentsData.moveViewableByDown(comment, viewableBy);\r\n }\r\n\r\n public deleteComment(comment: ICommentInfo): void {\r\n this.commentsData.deleteComment(comment);\r\n\r\n this.table.renderRows();\r\n }\r\n\r\n public editComment(element: ICommentInfo): void {\r\n element.editingEnabled = (!element.editingEnabled);\r\n }\r\n\r\n public showViewableByRowsFor(comment: ICommentInfo): void {\r\n comment.isExpanded = !comment.isExpanded;\r\n }\r\n\r\n public handleModelChange(element: ICommentInfo, fieldName: string): void {\r\n // Note: this method is only used during testing/troubleshooting.\r\n }\r\n // End methods that handle control events.\r\n\r\n // Override base class methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayRowsValues: this.numDisplayRowsValues,\r\n\r\n propertyUpdateRequired: true,\r\n saveDataRequired: true\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return (CommentsFormFieldComponent);\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return false;\r\n }\r\n\r\n protected formInstanceElementReceived(): void {\r\n if (this.FormInstanceElement && this.FormInstanceElement.textValue) {\r\n this.commentsData = CommentsFormFieldData.deserializeData(this.FormInstanceElement);\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if (this.FormInstanceElement && this.FormInstanceElement.textValue) {\r\n this.commentsData = CommentsFormFieldData.deserializeData(this.FormInstanceElement);\r\n }\r\n\r\n return;\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if (propertyName == FormFieldPropertyEnum.SHOW_COMMENTS_PROPERTIES) {\r\n this.deriveDisplayedColumns();\r\n } else if (propertyName == FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS) {\r\n let numRows: number = parseInt(this.FormField.displayRows);\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (!Number.isNaN(numRows)) {\r\n this.numDisplayRows = numRows;\r\n\r\n if ((this.Mode === 'design') && (numRows != this.commentsData.Comments.length)) {\r\n this.createExampleComments();\r\n if (this.table != null)\r\n this.table.renderRows();\r\n }\r\n }\r\n }\r\n }\r\n\r\n public saveData(ignoredComponentDataToSave: any): void {\r\n this.packageDataAndUpdateFlags();\r\n }\r\n\r\n // Handle control events.\r\n public addNewComment(): void {\r\n let comment = this.commentsData.addNewComment(this.currentUserService.user.displayName, new Date());\r\n\r\n this.table.renderRows();\r\n }\r\n\r\n // Implement helper methods.\r\n private createExampleComments(): number {\r\n let numCommentsCreated: number = 0;\r\n let exampleComment: CommentInfo = null;\r\n\r\n if (this.commentsData.CommentCount == 0) {\r\n exampleComment = new CommentInfo('Example comment', this.currentUserService.user.displayName, new Date());\r\n this.commentsData.addComment(exampleComment);\r\n numCommentsCreated++;\r\n }\r\n\r\n if (this.FormField.displayRows != null) {\r\n if (this.numDisplayRows > this.commentsData.CommentCount) {\r\n // We need more example comments.\r\n for (let rowIndex: number = this.commentsData.CommentCount; rowIndex < this.numDisplayRows; rowIndex++) {\r\n exampleComment = new CommentInfo(`Example comment ${rowIndex + 1}`, this.currentUserService.user.displayName, new Date());\r\n this.commentsData.addComment(exampleComment);\r\n numCommentsCreated++;\r\n }\r\n } else if (this.numDisplayRows < this.commentsData.CommentCount) {\r\n // We need fewer example comments.\r\n this.commentsData.popComments(this.commentsData.CommentCount - this.numDisplayRows);\r\n }\r\n }\r\n\r\n return numCommentsCreated;\r\n }\r\n\r\n private packageDataAndUpdateFlags(): void {\r\n for (let comment of this.commentsData.Comments) {\r\n // don't save this setting\r\n comment.isExpanded = false;\r\n comment.isSelected = false;\r\n }\r\n this.FormInstanceElement.textValue = JSON.stringify(this.commentsData);\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n }\r\n\r\n private deriveDisplayedColumns(): void {\r\n this.displayedColumns = [];\r\n this.displayedColumns.push('commentNumber');\r\n this.displayedColumns.push('comment');\r\n this.displayedColumns.push('commenter');\r\n this.displayedColumns.push('viewableBy');\r\n this.displayedColumns.push('action');\r\n }\r\n}\r\n","import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Component, Inject } from '@angular/core';\r\nimport { PickerItem } from '../../models/picker-item.model';\r\n\r\nexport class AddContactData {\r\n public selectedUser: PickerItem;\r\n public isPrimaryConact: boolean;\r\n\r\n public constructor(selectedUser: PickerItem, isPrimaryConact: boolean = false) {\r\n this.selectedUser = selectedUser;\r\n this.isPrimaryConact = isPrimaryConact;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'app-add-contact',\r\n templateUrl: './add-contact.dialog.html',\r\n styleUrl: './add-contact.dialog.scss',\r\n standalone: false\r\n})\r\nexport class AddContactDialog {\r\n private selectedUser: PickerItem;\r\n\r\n public isPrimaryContact: boolean = false;\r\n\r\n public constructor(\r\n @Inject(MAT_DIALOG_DATA) data,\r\n public dialogRef: MatDialogRef) {\r\n\r\n }\r\n\r\n public onUserSet(user: PickerItem) {\r\n console.log(user);\r\n this.selectedUser = user;\r\n }\r\n\r\n public closeDialog(save: boolean) {\r\n if (save) {\r\n this.dialogRef.close(new AddContactData(this.selectedUser, this.isPrimaryContact));\r\n } else {\r\n this.dialogRef.close();\r\n }\r\n }\r\n\r\n // getters\r\n public get ContactName(): string {\r\n return this.selectedUser?.displayName;\r\n }\r\n public get Phone(): string {\r\n return this.selectedUser?.phone\r\n }\r\n public get Email(): string {\r\n return this.selectedUser?.secondaryDisplayName;\r\n }\r\n public get Agency(): string {\r\n return this.selectedUser?.agencyShortName;\r\n }\r\n public get SelectedUser(): PickerItem {\r\n return this.selectedUser;\r\n }\r\n\r\n}\r\n","

\r\n Add Contact\r\n

\r\n\r\n
\r\n \r\n
\r\n \r\n Name\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n Email\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Phone\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Agency\r\n \r\n \r\n
\r\n\r\n
\r\n Is this user the primary contact?\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n","import { plainToClass } from \"class-transformer\";\r\n\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { PickerItem } from \"../picker-item.model\";\r\n\r\n// Define a contacts data type.\r\nexport interface IContactInfo {\r\n userId: string;\r\n fullName: string;\r\n email: string;\r\n phone: string;\r\n agencyShortName: string;\r\n isPrimaryContact: boolean;\r\n}\r\n\r\nexport class ContactInfo implements IContactInfo {\r\n public static readonly FIELD_INTERNAL_NAME_CONTACT_NAME: string = \"contactnamedonotedit\";\r\n public static readonly FIELD_INTERNAL_NAME_CONTACT_EMAIL: string = \"contactemaildonotedit\";\r\n public static readonly FIELD_INTERNAL_NAME_CONTACT_PHONE: string = \"contactphonedonotedit\";\r\n public static readonly FIELD_INTERNAL_NAME_CONTACT_AGENCY: string = \"contactagencydonotedit\";\r\n public static readonly FIELD_INTERNAL_NAME_IS_PRIMARY_CONTACT: string = \"contactisprimarydonotedit\";\r\n\r\n // Properties.\r\n public userId: string;\r\n public fullName: string;\r\n public email: string;\r\n public phone: string;\r\n public agencyShortName: string;\r\n public isPrimaryContact: boolean;\r\n\r\n public constructor(pickerItem: PickerItem, isPrimaryContact: boolean = false) {\r\n this.fullName = pickerItem.displayName;\r\n this.email = pickerItem.secondaryDisplayName;\r\n this.phone = pickerItem.phone;\r\n this.agencyShortName = pickerItem.agencyShortName;\r\n this.isPrimaryContact = isPrimaryContact;\r\n }\r\n}\r\n\r\n// Define a contacts data structure.\r\nexport class ContactsFormFieldData {\r\n // Property.\r\n public contacts: IContactInfo[] = [];\r\n\r\n // Constructor.\r\n public constructor() { }\r\n\r\n // Method(s).\r\n public containsUser(userMaxId: string): boolean {\r\n let containsUser: boolean = false;\r\n\r\n if (this.contacts && (this.contacts.length > 0)) {\r\n let contact: IContactInfo = this.contacts.find(c => c.userId == userMaxId);\r\n containsUser = (contact != null);\r\n }\r\n\r\n return containsUser;\r\n }\r\n\r\n // Static method.\r\n public static deserializeData(formInstanceElement: FormInstanceElement): ContactsFormFieldData {\r\n let data: ContactsFormFieldData = null;\r\n\r\n if (formInstanceElement.textValue && (formInstanceElement.textValue.trim() != '')) {\r\n let hshData: any = JSON.parse(formInstanceElement.textValue);\r\n data = plainToClass(ContactsFormFieldData, hshData);\r\n } else\r\n data = new ContactsFormFieldData();\r\n\r\n return data;\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n
{{this.DisplayName}} *
\r\n \r\n \r\n
\r\n\r\n
\r\n\r\n
{{this.DisplayName}}
\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n
\r\n","import {\r\n AfterViewInit, Component, EventEmitter, OnInit, Output, Type as AngularCoreType, ViewChild, SimpleChanges,\r\n ComponentFactoryResolver,\r\n ElementRef,\r\n Renderer2\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { MatTable } from '@angular/material/table';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { AlertDialogModel } from '../../../../shared/dialogs/alert/alert-dialog.component';\r\nimport { AddContactData, AddContactDialog } from '../../../../shared/dialogs/add-contact/add-contact.dialog';\r\nimport { ContactInfo, ContactsFormFieldData, IContactInfo } from '../../../models/contacts/contacts-form-field.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { PickerItem } from '../../../models/picker-item.model';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { ItemTypeEnum } from '../../../enums/item-type.enum';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { EmailService } from '../../../services/email.service';\r\nimport { SafeUrl } from '@angular/platform-browser';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { ConfirmationDialogEnums } from '../../../enums/confirmation-dialog.enum';\r\nimport { GridFormFieldComponent } from '../grid-form-field/grid-form-field.component';\r\nimport { GridEventTypeEnum, GridFlavorEnum } from '../../../enums/grid.enums';\r\nimport { CachedFormFieldService } from '../../../services/form-field-with-cache.service';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { GridFieldEditorComponent } from '../grid-field-editor/grid-field-editor.component';\r\nimport { GridEvent } from '../grid-form-field/grid-event';\r\nimport { GridFieldDesignerComponent } from '../grid-field-designer/grid-field-designer.component';\r\nimport { CheckboxFieldType, ShortTextFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { FormFieldConstraintLiaisonManager } from '../../form-builder/properties/form-field-properties/constraints/field-constraint-liaison-manager';\r\nimport { ComponentAndFormField } from '../../../models/grid/component-and-form-field-model';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\nimport { GridDataResult } from '@progress/kendo-angular-grid';\r\n\r\n\r\n// A KEY THING TO KNOW about this component is that it displays and creates PLAIN OLD GridRows in the GridRow table\r\n// For an overview of how the Contacts flavor of Grid works: https://community-dc.max.gov/x/bgRGmg\r\n@Component({\n selector: 'app-contacts-form-field',\n templateUrl: './contacts-form-field.component.html',\n styleUrls: ['./contacts-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: ContactsFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class ContactsFormFieldComponent extends FormFieldBaseComponent implements OnInit, AfterViewInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n @Output() onEdit = new EventEmitter();\r\n\r\n private numDisplayRows: number = 1;\r\n private contactsData: ContactsFormFieldData = new ContactsFormFieldData();\r\n private selfAddedFlag: boolean = false;\r\n\r\n @ViewChild(MatTable) table: MatTable;\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS,\r\n FormFieldPropertyEnum.SHOW_CONTACTS_PROPERTIES\r\n ];\r\n\r\n private displayedColumns: string[] = [];\r\n\r\n //VNEXT-614: KLW - Adding property getter to determine if control should be disabled\r\n public get Disabled() {\r\n return this.readOnly;\r\n }\r\n\r\n private readonly numDisplayRowsValues: string[] = ['1', '2', '3', '4', '5'];\r\n\r\n // This is the component that the contacts component uses to render itself as a Kendo Grid\r\n private wrappedGridFormFieldComponent: GridFormFieldComponent;\r\n\r\n // Constructor.\r\n public constructor(private resolver: ComponentFactoryResolver,\r\n private hostElement: ElementRef,\r\n private renderer: Renderer2,\r\n private cachedFormFieldConstraintsService: CachedFormFieldService,\r\n private currentSiteService: CurrentSiteService,\r\n private currentUserService: CurrentUserService,\r\n private dateAdapter: DateAdapter,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private formFieldTypeAndNameService: FormFieldTypeAndNameService,\r\n private emailService: EmailService, //VNEXT-811: KLW - Needed for emailing contacts\r\n private dialog: MatDialog) { // Not yet using: rendererParam: Renderer2\r\n super();\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n\r\n\r\n // START ----------------------------- NEW ngOnInit() STUFF FOR CONTACTS GRID ---------------------------\r\n this.wrappedGridFormFieldComponent = new GridFormFieldComponent(\r\n this.resolver,\r\n this.hostElement,\r\n this.renderer,\r\n null,\r\n this.dialog,\r\n this.cachedFormFieldConstraintsService,\r\n this.currentSiteService,\r\n this.currentUserService,\r\n this.dateAdapter,\r\n this.fieldDefinitionService,\r\n this.formFieldTypeAndNameService);\r\n\r\n // Set Inputs \r\n this.wrappedGridFormFieldComponent.formField = this.formField;\r\n this.wrappedGridFormFieldComponent.flavor = this.ContactsGridFlavor;\r\n this.wrappedGridFormFieldComponent.mode = this.mode;\r\n\r\n this.wrappedGridFormFieldComponent.ngOnInit();\r\n\r\n this.wrappedGridFormFieldComponent.onEdit.subscribe(data => {\r\n this.onEdit.emit(data);\r\n });\r\n // END ------------------------------ NEW ngOnInit() STUFF FOR CONTACTS GRID -------------------------------\r\n\r\n\r\n\r\n this.propertyUpdated(this.FormField, FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS);\r\n\r\n if (this.Mode === 'design') {\r\n if ((this.FormField.contactFieldNames == null) || (this.FormField.contactFieldNames.trim() == ''))\r\n this.FormField.contactFieldNames = 'name|email|phone';\r\n\r\n this.createExampleContacts();\r\n } else if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // Note: existing contacts, if any, will be loaded in method formInstanceElementReceived().\r\n }\r\n\r\n // Derived columns to display.\r\n this.deriveDisplayedColumns();\r\n\r\n // Emit 'onInit' to my parent component.\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n }\r\n\r\n // =================================== NEW STUFF FOR VNEXT-1100 ~ UPDATED CONTACTS GRID =====================================\r\n\r\n @ViewChild(GridFieldDesignerComponent, { read: GridFieldDesignerComponent }) gridFieldDesignerComponent: GridFieldDesignerComponent;\r\n @ViewChild(GridFieldEditorComponent, { read: GridFieldEditorComponent }) gridFieldEditorComponent: GridFieldEditorComponent;\r\n private contactsInWrappedKendoGrid: GridDataResult = null;\r\n\r\n public get WrappedGridFormFieldComponent(): GridFormFieldComponent {\r\n return this.wrappedGridFormFieldComponent;\r\n }\r\n\r\n // Add a new contact with dialog\r\n public openNewContactDialog() {\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.width = '70%';\r\n dialogConfig.height = '63%';\r\n dialogConfig.data = {};\r\n\r\n let dialogRef = this.dialog.open(AddContactDialog, dialogConfig);\r\n\r\n dialogRef.afterClosed().subscribe((data: AddContactData) => {\r\n this.addContactAsGridRow(data);\r\n });\r\n }\r\n\r\n public addMeButtonClicked(): void {\r\n const u = this.currentUserService.user;\r\n let pickerItem = new PickerItem({\r\n key: u.maxId,\n displayName: u.displayName,\n secondaryDisplayName: u.emailAddress,\n isUser: true,\n isActive: true,\r\n phone: u.phone,\r\n agencyShortName: u.agencyName\r\n });\r\n let contact = new AddContactData(pickerItem);\r\n this.addContactAsGridRow(contact);\r\n }\r\n\r\n // NOTE: What gets created in the backend when a new contact is created is a plain old GridRow\r\n private addContactAsGridRow(data: AddContactData) {\r\n let contact = new ContactInfo(data.selectedUser, data.isPrimaryConact);\r\n\r\n this.gridFieldEditorComponent.KendoGridService.addContactAsGridRow(this.FormInstanceElement.id, this.formInstance.id, this.formField.id, contact).then(x => {\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n this.gridFieldEditorComponent.rebind();\r\n });\r\n }\r\n\r\n public handleGridEvent(event: GridEvent) {\r\n let attachmentId = event.data.__gridRow.databaseId;\r\n console.log('handleGridEvent');\r\n console.log(event);\r\n }\r\n\r\n // The way this flavor of Grid works is that when you create a new Contacts field you get a regular grid but it gets auto-populated with\r\n // five standard contact specific columns. Additional columns can be added if desired.\r\n public handleGridFieldFieldDesignerInit() {\r\n // Add the standard contacts fields if the Field is new\r\n if (this.wrappedGridFormFieldComponent.formField.id == 0) {\r\n this.wrappedGridFormFieldComponent.GridConfig.addGridColumn(ShortTextFieldType, ContactInfo.FIELD_INTERNAL_NAME_CONTACT_NAME, 'Name');\r\n this.wrappedGridFormFieldComponent.GridConfig.addGridColumn(ShortTextFieldType, ContactInfo.FIELD_INTERNAL_NAME_CONTACT_EMAIL, 'Email');\r\n this.wrappedGridFormFieldComponent.GridConfig.addGridColumn(ShortTextFieldType, ContactInfo.FIELD_INTERNAL_NAME_CONTACT_PHONE, 'Phone');\r\n this.wrappedGridFormFieldComponent.GridConfig.addGridColumn(ShortTextFieldType, ContactInfo.FIELD_INTERNAL_NAME_CONTACT_AGENCY, 'Agency');\r\n this.wrappedGridFormFieldComponent.GridConfig.addGridColumn(CheckboxFieldType, ContactInfo.FIELD_INTERNAL_NAME_IS_PRIMARY_CONTACT, 'Is Primary Contact');\r\n }\r\n }\r\n\r\n public handleEditorGridValidation(event: any) {\r\n //console.log('AttachmentCOmp.handleEditorGridValidation($event)...');\r\n }\r\n\r\n public handleConditionalLogicColumnDefsFilter(event: any) {\r\n //console.log('AttachmentCOmp.handleConditionalLogicColumnDefsFilter($event)...');\r\n }\r\n public handleEditFieldProperty(event: any) {\r\n console.log('handleEditFieldProperty');\r\n console.log(event);\r\n }\r\n\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n // Cache form fields during the save configuration operation.\r\n // TODO: should I cache the rows here in Attachments Component instead? OR is it best to delegate to Wrapped Grid\r\n this.wrappedGridFormFieldComponent.GridConfig.CachedGridColumnDefs = this.wrappedGridFormFieldComponent.GridConfig.ColumnDefs;\r\n\r\n // Call form fields' saveConfiguration() method.\r\n let allComponentsAndFormFields: ComponentAndFormField[] = this.wrappedGridFormFieldComponent.RuntimeMetadata.AllComponents;\r\n for (let iComponent: number = 0; iComponent < allComponentsAndFormFields.length; iComponent++) {\r\n let component: FormFieldBaseComponent = allComponentsAndFormFields[iComponent].Component;\r\n\r\n component.saveConfiguration(form, reasonForSave);\r\n }\r\n\r\n // Save my column definitions as JSON text.\r\n let currentSite = this.currentSiteService.Site;\r\n this.FormField.childFormFields = [];\r\n\r\n for (let iCol: number = 0; iCol < this.wrappedGridFormFieldComponent.GridConfig.ColumnCount; iCol++) {\r\n let gridColDef: FormField = this.wrappedGridFormFieldComponent.GridConfig.getColumnDef(iCol);\r\n\r\n let childFormField: FormField = new FormField();\r\n\r\n childFormField.assignFrom(gridColDef);\r\n if (childFormField.id < 0)\r\n childFormField.id = 0;\r\n FormFieldConstraintLiaisonManager.synchronousUpdateFormFieldWithLatestConstraintValues(this.cachedFormFieldConstraintsService, currentSite.id, childFormField);\r\n\r\n this.FormField.childFormFields.push(childFormField);\r\n }\r\n\r\n return;\r\n }\r\n\r\n //VNEXT-951: KLW - Changes to email a contact list\r\n public getEmailAllUrl(): string {\r\n var retVal: string = '';\r\n if (this.contactsInWrappedKendoGrid == null && this.gridFieldEditorComponent?.Data != null) {\r\n this.contactsInWrappedKendoGrid = this.gridFieldEditorComponent.Data;\r\n }\r\n\r\n var emails = this.contactsInWrappedKendoGrid.data.map(x => { return x[ContactInfo.FIELD_INTERNAL_NAME_CONTACT_EMAIL] });\r\n if (emails.length == 0) {\r\n alert(\"No contacts have been added to the grid yet\");\r\n return null;\r\n } else {\r\n retVal = this.emailService.composeAllEmailUrl(emails, this.formInstanceName, window.location.href);\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n // Called from Form Builder when properties drawer is closed\r\n public resetFormField(formField: FormField): void {\r\n this.wrappedGridFormFieldComponent.resetFormField(formField);\r\n }\r\n\r\n // ================================ END NEW STUFF FOR VNEXT-1100 ~ UPDATED CONTACTS GRID ====================================\r\n\r\n public ngAfterViewInit(): void {\r\n return; // Can see @ViewChild() values when this method is called.\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public columnIsSticky(colName: string): boolean {\r\n // Note: this does not need to be a hard code value, but it is.\r\n return true;\r\n }\r\n\r\n public get ContactsGridFlavor(): GridFlavorEnum {\r\n return GridFlavorEnum.ContactsGrid;\r\n }\r\n\r\n public get HeaderRowIsSticky(): boolean {\r\n return true;\r\n }\r\n\r\n public get NumDisplayRows(): number {\r\n return this.numDisplayRows;\r\n }\r\n\r\n public getContactTableCssClasses(isDiv: boolean): string {\r\n //VNEXT-951: KLW - Set default number of contact rows to 5\r\n let cssClasses: string =\r\n (isDiv ?\r\n 'mat-table-div contacts-mat-table-div-5-row' :\r\n 'mat-elevation-z4 contacts-mat-table contacts-mat-table-5-row');\r\n\r\n if (this.FormField.displayRows != null) {\r\n switch (this.FormField.displayRows) {\r\n case '2':\r\n case '3':\r\n case '4':\r\n case '5':\r\n cssClasses =\r\n (isDiv ?\r\n `mat-table-div contacts-mat-table-div-${this.FormField.displayRows}-rows` :\r\n `mat-elevation-z4 contacts-mat-table contacts-mat-table-${this.FormField.displayRows}-rows`);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return cssClasses;\r\n }\r\n\r\n public get ContactsListing(): IContactInfo[] {\r\n return this.contactsData.contacts;\r\n }\r\n\r\n public get DisplayedColumns(): string[] {\r\n return this.displayedColumns;\r\n }\r\n public getColumnStyle(columnName: string): string {\r\n let style: string = 'font-weight: 900;';\r\n\r\n if (columnName == 'action')\r\n style += 'width: 15%;';\r\n else {\r\n let numDataCols: number = this.displayedColumns.length - 1;\r\n if (numDataCols == 1)\r\n style += 'width: 85%;';\r\n else if (numDataCols == 2) {\r\n if (this.displayedColumns.includes('name')) {\r\n if (columnName == 'name')\r\n style += 'width: 55%;';\r\n else\r\n style += 'width: 30%;';\r\n } else\r\n style += 'width: 42.5%;';\r\n } else if (numDataCols == 3) {\r\n if (columnName == 'name')\r\n style += 'width: 45%;';\r\n else\r\n style += 'width: 20%;';\r\n }\r\n }\r\n\r\n return style;\r\n }\r\n\r\n public get AddContactLabel(): string {\r\n return 'Add Contact';\r\n }\r\n public get AddContactButtonTitle(): string {\r\n return 'Add Contact';\r\n }\r\n public get AddContactButtonAdditionalStyle(): string {\r\n return '';\r\n }\r\n public get AddContactButtonFlyoverText(): string {\r\n return 'Add a person to the contacts listing';\r\n }\r\n public get AddMeButtonTitle(): string {\r\n return 'Add Me';\r\n }\r\n public get AddMeButtonCanEnable(): boolean {\r\n return ((this.Mode != 'design') && (!this.selfAddedFlag));\r\n }\r\n public get AddMeButtonFlyoverText(): string {\r\n return 'Add yourself to the contacts listing'\r\n }\r\n\r\n public get PickerInputDisabled(): boolean {\r\n return (this.mode === 'design');\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n\r\n return (position);\r\n }\r\n\r\n public get EnableContactEditing(): boolean {\r\n // Note: check with Shaun to see if this needs to be configurable.\r\n return true;\r\n }\r\n public getEditContactTooltip(element: IContactInfo): string {\r\n return null; // (element.editingEnabled ? 'End editing this contact' : 'Edit this contact');\r\n }\r\n public get EditContactButtonDisabled(): boolean {\r\n return (this.Mode === 'design');\r\n }\r\n\r\n public get TrashCanTooltip(): string {\r\n return 'Delete this contact';\r\n }\r\n public get TrashCanButtonDisabled(): boolean {\r\n return (this.mode === 'design');\r\n }\r\n\r\n //VNEXT-811: KLW - Needed for emailing contacts\r\n public get EnableEmailEditing(): boolean {\r\n // Note: check with Shaun to see if this needs to be configurable.\r\n return true;\r\n }\r\n public get EmailToolTip(): string {\r\n return 'Email this contact';\r\n }\r\n public get EmailButtonDisabled(): boolean {\r\n return (this.Mode === 'design');\r\n }\r\n //VNEXT-951: KLW - Changes to email a contact list\r\n public get EmailAllButtonDisabled(): boolean {\r\n var retVal: boolean = false;\r\n\r\n if ((this.Mode === 'design')) {\r\n retVal = true;\r\n }\r\n\r\n if (this.ContactsListing) {\r\n if (this.ContactsListing.length <= 0) {\r\n retVal = true;\r\n }\r\n }\r\n else {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n public get EmailAllToolTip(): string {\r\n return 'Email all contacts in the list';\r\n }\r\n\r\n public get ActivityListIcon(): string {\r\n return ItemTypeEnum.ICON;\r\n }\r\n\r\n //VNEXT-811: KLW - Changes to email a contact\r\n public showEmailDialog() {\r\n let url = this.getEmailAllUrl();\r\n if (!url) {\r\n return;\r\n }\r\n\r\n this.FormInstanceElement.BypassSitePopUpWarning = true;\r\n\r\n let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n data: new ConfirmationDialogModel(`Email Created`, `An email has been created using your email client and it should display shortly`, { showOk: true, hideNo: true, dialogType: ConfirmationDialogEnums.EMAIL })\r\n });\r\n\r\n dialogRef.afterOpened().subscribe(() => {\r\n this.FormInstanceElement.BypassSitePopUpWarning = false;\r\n });\r\n dialogRef.afterClosed().subscribe(() => {\r\n this.FormInstanceElement.BypassSitePopUpWarning = false;\r\n });\r\n\r\n window.open(url, '_blank');\r\n }\r\n\r\n public getEmail(email: string, contactName: string): SafeUrl {\r\n return this.emailService.composeInvEmail(email, contactName, this.formInstanceName, window.location.href);\r\n }\r\n\r\n // End methods called by my HTML code.\r\n\r\n // Override base class methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayRowsValues: this.numDisplayRowsValues,\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return (ContactsFormFieldComponent);\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return false;\r\n }\r\n\r\n // Override some FormFieldComponentBase methods.\r\n protected formInstanceElementReceived(): void {\r\n if (this.FormInstanceElement && this.FormInstanceElement.textValue) {\r\n this.contactsData = ContactsFormFieldData.deserializeData(this.FormInstanceElement);\r\n }\r\n this.checkSelfAdded();\r\n\r\n return;\r\n }\r\n\r\n protected writeValueTriggered(): void {\r\n if (this.IsInPreviewOrInstanceMode) {\r\n if (this.FormInstanceElement && this.FormInstanceElement.textValue) {\r\n this.contactsData = ContactsFormFieldData.deserializeData(this.FormInstanceElement);\r\n }\r\n if (this.gridFieldEditorComponent != null) {\r\n this.gridFieldEditorComponent.parentReceivedFormInstanceElement(this.FormInstanceElement);\r\n }\r\n this.checkSelfAdded();\r\n }\r\n\r\n return;\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if (propertyName == FormFieldPropertyEnum.SHOW_CONTACTS_PROPERTIES) {\r\n this.deriveDisplayedColumns();\r\n } else if (propertyName == FormFieldPropertyEnum.NUMBER_OF_DISPLAY_ROWS) {\r\n let numRows: number = parseInt(this.FormField.displayRows);\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (!Number.isNaN(numRows)) {\r\n this.numDisplayRows = numRows;\r\n\r\n if ((this.Mode === 'design') && (numRows != this.contactsData.contacts.length))\r\n this.createExampleContacts();\r\n }\r\n }\r\n }\r\n\r\n // Handle controle events.\r\n public addContactButtonClicked(eventData: PickerItem): void {\r\n // COMMENTED OUT FOR VNEXT-1100\r\n //if (this.contactsData.contacts == null)\r\n // this.contactsData.contacts = [];\r\n\r\n //let contactAlreadyExists: boolean = this.contactsData.containsUser(eventData.key);\r\n //if (contactAlreadyExists) {\r\n // let errorData: AlertDialogModel = new AlertDialogModel(\"Duplicate Contact\", `\"${eventData.displayName}\" cannot be added as the contact is already in the list.`);\r\n // this.displayError.emit(errorData);\r\n //} else {\r\n // let contact: IContactInfo = new ContactInfo(eventData.key, eventData.displayName, eventData.secondaryDisplayName, eventData.phone, eventData.agencyShortName);\r\n // this.contactsData.contacts.push(contact);\r\n // this.table.renderRows();\r\n\r\n // this.packageDataAndUpdateFlags();\r\n //}\r\n\r\n ////VNEXT-665: KLW - Set flag to clear Max Picker\r\n //eventData['clearMemberInput'] = true;\r\n }\r\n\r\n public deleteContact(element: IContactInfo): void {\r\n this.contactsData.contacts = this.contactsData.contacts.filter(c => c.userId != element.userId);\r\n this.table.renderRows();\r\n\r\n this.packageDataAndUpdateFlags();\r\n }\r\n\r\n public editContact(element: IContactInfo): void {\r\n //element.editingEnabled = (!element.editingEnabled);\r\n }\r\n\r\n public handleModelChange(element: IContactInfo, fieldName: string): void {\r\n // Note: this method is only used during testing/troubleshooting.\r\n this.packageDataAndUpdateFlags();\r\n }\r\n // End methods that handle control events.\r\n\r\n // Implement helper methods.\r\n private createExampleContacts(): void {\r\n // COMMENTED OUT FOR VNEXT-1100\r\n //this.contactsData.contacts = [];\r\n //let exampleContact: IContactInfo = new ContactInfo('NA', 'Jane Doe', 'janedoe@max.gov', '123-456-7890');\r\n //this.contactsData.contacts.push(exampleContact);\r\n\r\n //if (this.FormField.displayRows != null) {\r\n // let numRows: number = parseInt(this.FormField.displayRows);\r\n // //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n // //Number.IsNan()\r\n // if ((!Number.isNaN(numRows)) && (numRows > 1)) {\r\n // for (let rowIndex: number = 1; rowIndex < numRows; rowIndex++) {\r\n // let phoneNumberChar: string = `${rowIndex + 1}`;\r\n // exampleContact = new ContactInfo(`NA_${rowIndex + 1}`, `Contact ${rowIndex + 1}`, `contact${rowIndex + 1}@max.gov`, `${phoneNumberChar.repeat(3)}-${phoneNumberChar.repeat(3)}-${phoneNumberChar.repeat(4)}`);\r\n // this.contactsData.contacts.push(exampleContact);\r\n // }\r\n // }\r\n //}\r\n }\r\n\r\n private checkSelfAdded(): void {\r\n this.selfAddedFlag = this.contactsData.containsUser(this.currentUserService.user.maxId);\r\n }\r\n\r\n private packageDataAndUpdateFlags(): void {\r\n this.FormInstanceElement.textValue = JSON.stringify(this.contactsData);\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n this.selfAddedFlag = this.contactsData.containsUser(this.currentUserService.user.maxId);\r\n }\r\n\r\n private deriveDisplayedColumns(): void {\r\n this.displayedColumns = ((this.FormField.contactFieldNames != null) && (this.FormField.contactFieldNames.trim() != '') ? this.FormField.contactFieldNames.split('|') : []);\r\n this.displayedColumns.push('action');\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n $\r\n\r\n \r\n
\r\n \r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {{this.DisplayName}}\r\n *\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n *\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n {{this.DisplayName}}\r\n *\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n *\r\n \r\n\r\n \r\n $\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n preview: ${{this.NumberFormatPreview}}\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { DecimalPipe } from '@angular/common';\r\nimport { Component, OnInit, Renderer2, Type as AngularCoreType } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DecimalInputFormFieldBaseComponent } from '../num-input-form-field-base/decimal-input-form-field-base.component';\r\n\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-currency-form-field',\n templateUrl: './currency-form-field.component.html',\n styleUrls: [\n './currency-form-field.component.scss',\n '../form-fields.scss',\n '../num-input-form-field-base/num-input-form-field-base.component.scss'\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CurrencyFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class CurrencyFormFieldComponent extends DecimalInputFormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n\r\n // Constructor.\r\n private readonly decimalPipe: DecimalPipe = new DecimalPipe('en-US');\r\n private formattedPreviewValue: string = '';\r\n public hasFocus: boolean = false;\r\n\r\n public constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('currency');\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (CurrencyFormFieldComponent);\r\n }\r\n\r\n public onChange() {\r\n this.formattedPreviewValue = this.FormatCurrency(this.FormControl.value);\r\n }\r\n\r\n public get NumberFormatPreview(): string {\r\n return this.formattedPreviewValue;\r\n }\r\n\r\n // Override a protected method.\r\n protected writeValueTriggered(): void {\r\n super.writeValueTriggered();\r\n\r\n //VNEXT-706: KLW - Conditional to check if the formcontrol exists, otherwise it will throw an error in the form template when a Currency form field is dragged and dropped upon it\r\n if (this.controlData.formControl) {\r\n if (this.FormInstanceElement.decimalValue != null) {\r\n this.FormInstanceElement.transientOriginalDecimalValue = this.FormInstanceElement.decimalValue;\r\n this.controlData.formControl.setValue(this.FormatCurrency(this.FormInstanceElement.decimalValue));\r\n }\r\n }\r\n }\r\n\r\n public handleOnFocus(eventData: FocusEvent): void {\r\n this.hasFocus = true;\r\n if (this.FormInstanceElement.decimalValue) {\r\n let v = this.FormInstanceElement.decimalValue.toString();\r\n this.controlData.formControl.setValue(v.replace(/[^\\d.-]/g, ''));\r\n }\r\n }\r\n\r\n public handleOnBlur() {\r\n this.hasFocus = false;\r\n }\r\n private FormatCurrency(inputVal): string {\r\n if (inputVal) {\r\n let val = parseFloat(inputVal.toString().replace(/,/g, ''));\r\n if (isNaN(val)) return \"\";\r\n return this.decimalPipe.transform(val, '1.2-2');\r\n }\r\n }\r\n}\r\n","// Export an enum of form field modes (to it can be used in .ts component files).\nexport enum FormFieldMode {\n DESIGN = 'design',\n PREVIEW = 'preview',\n INSTANCE = 'instance'\r\n}\n","\r\n\r\n\r\n\r\n
\r\n
\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n {{this.FormattedDateValue}}\r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n Component, EventEmitter, OnInit, Output, Renderer2, Type as AngularCoreType, ViewChild\r\n} from '@angular/core';\r\nimport { AbstractControl, UntypedFormControl, NG_VALUE_ACCESSOR, ValidationErrors, ValidatorFn } from '@angular/forms';\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { CustomDateFormatDirective } from '../../../directives/custom-date-format.directive';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { ControlType } from '../form-field-base/form-field-base.component';\r\n// 05/18/2021 note: leaving in the following, commented out references to the 'Moment'\r\n// date formatting library which is apparently rather popular. I am\r\n// thinking that we might elect to start using it at some point.\r\n//import { MAT_MOMENT_DATE_FORMATS, MomentDateAdapter } from '@angular/material-moment-adapter';\r\n//import * as _moment from 'moment';\r\n//import { default as _rollupMoment } from 'moment';\r\n//const moment = _rollupMoment || _moment;\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { InputFormFieldBaseComponent } from '../input-form-field-base/input-form-field-base.component';\r\n\r\nconst JANUARY_1_1900_STRING = 'Mon Jan 01 1900 00:00:00 GMT-0500 (Eastern Standard Time)';\r\nconst DECEMBER_31_2300_STRING = 'Mon Dec 31 2300 00:00:00 GMT-0500 (Eastern Standard Time)';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-date-form-field',\n templateUrl: './date-form-field.component.html',\n styleUrls: ['./date-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: DateFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class DateFormFieldComponent extends InputFormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private minDate: Date = null;\r\n private maxDate: Date = null;\r\n\r\n private strDatePipeFormat: string = null;\r\n\r\n private readonly formFieldProperties: string[] =\r\n [FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.MIN_DATE,\r\n FormFieldPropertyEnum.MAX_DATE,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n 'Short Date',\r\n 'Medium Date',\r\n 'Long Date',\r\n 'Full Date'\r\n ];\r\n\r\n private formattedDateValue: string = '';\r\n @ViewChild(CustomDateFormatDirective, { read: CustomDateFormatDirective }) customDateFormatDirective: CustomDateFormatDirective;\r\n editorSubject: any;\r\n\r\n // Constructor.\r\n // Note: Renderer2 is not yet being used. \r\n constructor(rendererParam: Renderer2,\r\n private dateAdapter: DateAdapter) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('date');\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayFormatValues: this.displayFormats\r\n };\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 80;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshEventProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshEventProperties);\r\n\r\n // If we are in 'preview' or'instance' mode,\r\n // create a date pipe and select a date format.\r\n // Note: a date pipe is now accessed via private method\r\n // getDatePipe(), which creates it if necessary.\r\n\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n this.strDatePipeFormat = DateFormFieldComponent.displayFormatToDatePipeFormat(this.FormField);\r\n }\r\n\r\n return;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.setFormattedValueIfValueExists();\r\n\r\n return;\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n return;\r\n }\r\n\r\n // HTML accessor methods.\r\n public get DatePipeFormat(): string {\r\n return (this.strDatePipeFormat);\r\n }\r\n\r\n public get MinDate(): Date {\r\n return (this.minDate);\r\n }\r\n\r\n public get MaxDate(): Date {\r\n return (this.maxDate);\r\n }\r\n\r\n public get FormattedDateValue(): string {\r\n return (this.formattedDateValue);\r\n }\r\n\r\n public set FormattedDateValue(val: string) {\r\n this.formattedDateValue = val;\r\n }\r\n\r\n // Override writeValue().\r\n public writeValue(value: any) {\r\n super.writeValue(value);\r\n }\r\n\r\n public handleOnModelChange(): void {\r\n if (this.customDateFormatDirective) {\r\n this.customDateFormatDirective.writeValue(this.FormInstanceElement['unformattedDateValue']);\r\n this.FormInstanceElement['unformattedDateValue'] = null;\r\n }\r\n\r\n super.handleOnModelChange();\r\n\r\n return;\r\n }\r\n\r\n // Implement formInstanceElementReceived(), when a FormInstanceElement value gets set.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === FormFieldMode.PREVIEW) || (this.Mode === FormFieldMode.INSTANCE)) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n let bGroupAlreadyExists: boolean = (this.FormGroup !== null);\r\n\r\n this.setupTextFormGroup('date_control', false);\r\n\r\n let localFormControl: UntypedFormControl = this.FormGroup.get('date_control');\r\n\r\n // Note: as we are putting an instance of a JavaScript Date object\r\n // in this.FormInstanceElement.textValue, we must convert it to a\r\n // string in order to invoke string methods on it.\r\n if (!this.FormInstanceElement?.textValue) {\r\n // Determine a value for the date.\r\n if (this.FormField.defaultValue) {\r\n let hshDateInfo: any = FormField.DateToUtcDate(this.FormField.defaultValue);\r\n let strUTCDate: string = hshDateInfo['utcDate'];\r\n let dateValue: Date = hshDateInfo['dateValue'];\r\n localFormControl.setValue(strUTCDate);\r\n }\r\n\r\n let strMinDate: string = this.FormField.minDate;\r\n let strMaxDate: string = this.FormField.maxDate;\r\n\r\n if (!strMinDate) {\r\n strMinDate = JANUARY_1_1900_STRING;\r\n }\r\n\r\n if (!strMaxDate) {\r\n strMaxDate = DECEMBER_31_2300_STRING;\r\n }\r\n\r\n this.minDate = new Date(strMinDate);\r\n this.maxDate = new Date(strMaxDate);\r\n }\r\n\r\n this.setFormattedValueIfValueExists();\r\n\r\n // If we just created the form group, subscribe to value changes.\r\n if (!bGroupAlreadyExists) {\r\n // Subscribe to value changes.\r\n localFormControl.valueChanges\r\n .subscribe(val => {\r\n // Save the value.\r\n this.FormInstanceElement.TextValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n this.FormInstanceElement['unformattedDateValue'] = val;\r\n\r\n // Notify any listeners of the value change.\r\n this.notifyValueChanged();\r\n });\r\n\r\n // pharv - 11/3/2021 - set the FormControl as part of getting validaion to work on date field\r\n this.FormControl = localFormControl;\r\n }\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n //This needs to be async for the code to wait until the FormGroup is created in FormFieldBase\r\n protected async writeValueTriggered(): Promise {\r\n if ((this.Mode === FormFieldMode.PREVIEW) || (this.Mode === FormFieldMode.INSTANCE)) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n let bGroupAlreadyExists: boolean = (this.FormGroup !== null);\r\n\r\n this.setupTextFormGroup('date_control', false);\r\n\r\n // await this.SetupFormGroupFromWriteValue('date_control', [], false);\r\n\r\n let localFormControl: UntypedFormControl = this.FormGroup.get('date_control');\r\n\r\n // Note: as we are putting an instance of a JavaScript Date object\r\n // in this.FormInstanceElement.textValue, we must convert it to a\r\n // string in order to invoke string methods on it.\r\n if (!this.FormInstanceElement?.textValue) {\r\n // Determine a value for the date.\r\n if (this.FormField.defaultValue) {\r\n let hshDateInfo: any = FormField.DateToUtcDate(this.FormField.defaultValue);\r\n let strUTCDate: string = hshDateInfo['utcDate'];\r\n let dateValue: Date = hshDateInfo['dateValue'];\r\n localFormControl.setValue(strUTCDate);\r\n }\r\n\r\n let strMinDate: string = this.FormField.minDate;\r\n let strMaxDate: string = this.FormField.maxDate;\r\n\r\n if (!strMinDate) {\r\n strMinDate = JANUARY_1_1900_STRING;\r\n }\r\n\r\n if (!strMaxDate) {\r\n strMaxDate = DECEMBER_31_2300_STRING;\r\n }\r\n\r\n this.minDate = new Date(strMinDate);\r\n this.maxDate = new Date(strMaxDate);\r\n }\r\n\r\n this.setFormattedValueIfValueExists();\r\n\r\n // If we just created the form group, subscribe to value changes.\r\n if (!bGroupAlreadyExists) {\r\n // Subscribe to value changes.\r\n localFormControl.valueChanges\r\n .subscribe(val => {\r\n // Save the value.\r\n this.FormInstanceElement.TextValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n this.FormInstanceElement['unformattedDateValue'] = val;\r\n\r\n // Notify any listeners of the value change.\r\n this.notifyValueChanged();\r\n });\r\n\r\n // pharv - 11/3/2021 - set the FormControl as part of getting validaion to work on date field\r\n this.FormControl = localFormControl;\r\n }\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n if (formInstanceElementParam.textValue == 'Invalid Date') return 'Invalid Date';\r\n\r\n let d = new Date(formInstanceElementParam.textValue);\r\n if (!(d instanceof Date && !isNaN(d.valueOf()))) {\r\n if (formInstanceElementParam.textValue.trim().length == 0) {\r\n return '';\r\n }\r\n else {\r\n return 'Unrecognized Date ' + formInstanceElementParam.textValue;\r\n }\r\n }\r\n\r\n // Note: we have to use the display format for the provided form field definition.\r\n let strDatePipeFormat: string = DateFormFieldComponent.displayFormatToDatePipeFormat(formFieldParam);\r\n\r\n let strValue: string =\r\n (formInstanceElementParam.textValue ?\r\n CustomDateFormatDirective.applyDateFormattingUsing(strDatePipeFormat, formInstanceElementParam.textValue) :\r\n '');\r\n\r\n return (strValue);\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n elementWrapper.formInstanceElement.TextValue = new Date(value).toUTCString();\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n elementWrapper.standinDisplayValue = elementWrapper.formInstanceElement.textValue;\r\n }\r\n\r\n // Handle updates made outside the control.\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n if ((this.controlData != null) && (this.controlData.formControl != null))\r\n this.controlData.formControl.setValue(formInstanceElement.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (DateFormFieldComponent);\r\n }\r\n\r\n // Implement doSetFocus().\r\n protected doSetFocus(): void {\r\n\r\n // 01-04-2021 note: the following code is not yet working.\r\n let inputSelector: string = `#${this.matInputId}`;\r\n let matInput: any = this.renderer.selectRootElement(inputSelector, true);\r\n matInput.focus();\r\n\r\n return;\r\n }\r\n\r\n private doDoSetFocus(): void {\r\n let inputSelector: string = `#${this.matInputId}`;\r\n let matInput: any = this.renderer.selectRootElement(inputSelector, true);\r\n matInput.focus();\r\n return;\r\n }\r\n\r\n // Handle control events.\r\n public formattedDateSpanClicked(picker: any): void {\r\n // Open the date picker when the user\r\n // clicks on the formatted date span.\r\n picker.open();\r\n\r\n return;\r\n }\r\n\r\n // Define private helper methods.\r\n private dateNumToDateString(iDate: number): string {\r\n // Expect a date number that is in YYYYMMDD format.\r\n let strDate: string = null;\r\n\r\n try {\r\n // Get date part values.\r\n let iYear = Math.round(iDate / 10000);\r\n let iMonth = Math.round(iDate % 10000 / 100);\r\n let iDay = iDate % 100;\r\n\r\n // Build a date string from the parts.\r\n strDate = iYear.toString() + '-';\r\n strDate += (iMonth >= 10 ? iMonth.toString() : '0' + iMonth.toString()) + '-';\r\n strDate += (iMonth >= 10 ? iDay.toString() : '0' + iDay.toString());\r\n } catch (strError) {\r\n // Since something has gone wrong, return\r\n // a string representing the current date.\r\n let date = new Date();\r\n\r\n strDate = date.getFullYear().toString() + '-';\r\n strDate += (date.getMonth() >= 10 ? date.getMonth().toString() : '0' + date.getMonth().toString()) + '-';\r\n strDate += (date.getDate() >= 10 ? date.getDate().toString() : '0' + date.getDate().toString());\r\n }\r\n\r\n // Convert the date to local time.\r\n let dateToConvert: Date = new Date(strDate);\r\n this.convertDateToLocalTime(dateToConvert);\r\n\r\n strDate = dateToConvert.toString();\r\n\r\n return (strDate);\r\n }\r\n\r\n private convertDateToLocalTime(dateToConvert: Date): void {\r\n // Convert the date to local time.\r\n let local_date: Date = new Date();\r\n let iTimeOffsetInMinutes: number = local_date.getTimezoneOffset();\r\n\r\n dateToConvert.setHours(dateToConvert.getHours() + (iTimeOffsetInMinutes / 60));\r\n\r\n return;\r\n }\r\n\r\n public static displayFormatToDatePipeFormat(formField: FormField): string {\r\n let strDatePipeFormat: string = 'shortDate';\r\n\r\n switch (formField.displayFormat) {\r\n case 'Short Date':\r\n strDatePipeFormat = 'shortDate';\r\n break;\r\n\r\n case 'Medium Date':\r\n strDatePipeFormat = 'mediumDate';\r\n break;\r\n\r\n case 'Long Date':\r\n strDatePipeFormat = 'longDate';\r\n break;\r\n\r\n case 'Full Date':\r\n strDatePipeFormat = 'fullDate';\r\n break;\r\n\r\n default:\r\n strDatePipeFormat = 'shortDate';\r\n break;\r\n }\r\n\r\n return (strDatePipeFormat);\r\n }\r\n\r\n private setFormattedValueIfValueExists(): void {\r\n if (this.FormGroup) {\r\n let localFormControl: UntypedFormControl = this.FormGroup.get('date_control');\r\n\r\n if ((localFormControl.value != null) &&\r\n (localFormControl.value.toString() != null) &&\r\n (localFormControl.value.toString().trim() != '') &&\r\n (this.customDateFormatDirective != null)) {\r\n this.customDateFormatDirective.writeValue(localFormControl.value);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Override\r\n protected validatorFn(validationPropertyName: string, formFieldParam: FormField): ValidatorFn {\r\n if (validationPropertyName == 'maxDate') {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n let enteredDate = control.value;\r\n let maxDate = new Date(formFieldParam.maxDate)\r\n if (enteredDate && enteredDate > maxDate) {\r\n return { maxDate: true };\r\n } else {\r\n return null;\r\n }\r\n }\r\n } else if (validationPropertyName == 'minDate') {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n let enteredDateWithoutTime = new Date(new Date(control.value).toLocaleDateString());\r\n let minDateWithoutTime = new Date(new Date(formFieldParam.minDate).toLocaleDateString());\r\n if (enteredDateWithoutTime && enteredDateWithoutTime < minDateWithoutTime) {\r\n return { minDate: true };\r\n } else {\r\n return null;\r\n }\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n\r\n\r\n}\r\n","import {\r\n Directive,\r\n Input, \r\n HostListener,\r\n ElementRef\r\n} from '@angular/core';\r\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\r\nimport { DecimalPipe } from '@angular/common';\r\n\r\n// Define, export a directive used to format a date 'matInput' control.\r\n//\r\n// Note: much of the code in the following directive was taken from the following article:\r\n// https://medium.com/angular-in-depth/angular-material-matinput-control-with-thousands-separation-ebcbb7b027f4.\r\n@Directive({\n selector: '[matInputDecimalFormat]',\n providers: [\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: DecimalFormatDirective }\n ],\n standalone: false\n})\r\nexport class DecimalFormatDirective {\r\n // Properties.\r\n @Input() digitsAfterDecimal: number;\r\n @Input() showTrailingZeroes: boolean;\r\n\r\n private _value: string | null;\r\n private fnOnChange = (_ignored: any) => { }; // Initial, NOOP function.\r\n\r\n // Constructor.\r\n public constructor(private elementRef: ElementRef) {\r\n }\r\n public get value(): string | null {\r\n return this._value;\r\n }\r\n\r\n @Input('value')\r\n public set value(value: string | null) {\r\n this._value = value;\r\n this.formatValue(value);\r\n }\r\n\r\n @HostListener('input', ['$event.target.value'])\r\n onInput(value) {\r\n this._value = value.replace(/[^-^\\d.]/g, '');\r\n this._onChange(this._value); // here to notify Angular Validators\r\n }\r\n\r\n @HostListener('blur')\r\n _onBlur() {\r\n if (this.elementRef && this.elementRef.nativeElement && this.elementRef.nativeElement.value) {\r\n this.formatValue(this.elementRef.nativeElement.value);\r\n }\r\n return;\r\n }\r\n\r\n @HostListener('focus')\r\n onFocus() {\r\n this.unFormatValue(); // remove commas for editing purpose\r\n return;\r\n }\r\n\r\n writeValue(value: any) {\r\n this._value = value;\r\n this.formatValue(this._value);\r\n }\r\n\r\n _onChange(value: any): void {\r\n }\r\n\r\n registerOnChange(fn: (value: any) => void) {\r\n this._onChange = fn;\r\n }\r\n\r\n // Private helper methods.\r\n private formatValue(value: string | null): void {\r\n if (value !== null) {\r\n this._value = this.applyDecimalFormatting(value);\r\n this.elementRef.nativeElement.value = this._value;\r\n } else {\r\n this.elementRef.nativeElement.value = '';\r\n }\r\n\r\n return;\r\n }\r\n\r\n public applyDecimalFormatting(value: string | null): string {\r\n if (!value) return '';\r\n value = value.toString().replace(/(?!^)-[^0-9.]/g, '');\r\n if (value == '.') value = '0';\r\n if (value == '-') value = '0';\r\n if (value.split('.').length > 2) return '';\r\n let decimalPipe: DecimalPipe = new DecimalPipe('en-US');\r\n let minDigits = 0;\r\n let maxDigits = 3;\r\n if (this.digitsAfterDecimal) maxDigits = this.digitsAfterDecimal;\r\n if (this.showTrailingZeroes) {\r\n minDigits = maxDigits;\r\n }\r\n let fmt = '1.' + minDigits + '-' + maxDigits;\r\n return decimalPipe.transform(value, fmt);\r\n }\r\n\r\n private unFormatValue() {\r\n const value = this.elementRef.nativeElement.value;\r\n this._value = value.replace(/[^\\d.-]/g, '');\r\n if (value) {\r\n this.elementRef.nativeElement.value = this._value;\r\n } else {\r\n this.elementRef.nativeElement.value = '';\r\n }\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {{this.DisplayName}}\r\n *\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n *\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n {{this.DisplayName}}\r\n *\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n *\r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n preview: {{this.NumberFormatPreview}}\r\n \r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, Renderer2, Output, EventEmitter, Type as AngularCoreType, ViewChild } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { DecimalInputFormFieldBaseComponent } from '../num-input-form-field-base/decimal-input-form-field-base.component';\r\nimport { DecimalFormatDirective } from '../../../directives/decimal-format-directive';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\n\r\n@Component({\n selector: 'app-decimal-form-field',\n templateUrl: './decimal-form-field.component.html',\n styleUrls: [\n './decimal-form-field.component.scss',\n '../form-fields.scss',\n '../num-input-form-field-base/num-input-form-field-base.component.scss',\n '../currency-form-field/currency-form-field.component.scss'\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: DecimalFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class DecimalFormFieldComponent extends DecimalInputFormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n private userChangedFieldValue: boolean = false;\r\n private formattedPreviewValue: string = '';\r\n public hasFocus: boolean = false;\r\n\r\n @ViewChild(DecimalFormatDirective, { read: DecimalFormatDirective }) decimalFormatDirective: DecimalFormatDirective;\r\n\r\n public constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n this.matInputId = this.generateUniqueId('decimal');\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n }\r\n\r\n // Form field methods.\r\n public getProperties(): any {\r\n let properties: any = super.getProperties();\r\n\r\n let propertyNames: FormFieldPropertyEnum[] = properties['properties'];\r\n propertyNames.push(FormFieldPropertyEnum.NUM_DIGITS_AFTER_DECIMAL_POINT);\r\n propertyNames.push(FormFieldPropertyEnum.SHOW_TRAILING_ZEROES_AFTER_DECIMAL_POINT);\r\n\r\n return properties;\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (DecimalFormFieldComponent);\r\n }\r\n\r\n public onChange() {\r\n this.formattedPreviewValue = this.decimalFormatDirective.applyDecimalFormatting(this.FormControl.value);\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public get DecimalStepIncrementExpr(): number {\r\n let increment: number = 1;\r\n for (let index: number = 0; index < this.FormField.numDigitsAfterDecimalPoint; index++)\r\n increment /= 10;\r\n return increment;\r\n }\r\n\r\n public get DigitsToShow(): number {\r\n return (this.FormField.numDigitsAfterDecimalPoint);\r\n }\r\n\r\n public get ShowTrailing(): boolean {\r\n return (this.FormField.showTrailingZeroesAfterDecimalPoint);\r\n }\r\n\r\n public get NumberFormatPreview(): string {\r\n return this.formattedPreviewValue;\r\n }\r\n\r\n // Define a method called before a form instance save.\r\n public CheckFieldForValidation(): void {\r\n super.CheckFieldForValidation();\r\n }\r\n\r\n public saveData(formInstance: any): void {\r\n if (!this.userChangedFieldValue) {\r\n if ((this.FormInstanceElement.transientOriginalDecimalValue != null) && (this.FormInstanceElement.transientOriginalDecimalValue != this.FormInstanceElement.decimalValue))\r\n this.FormInstanceElement.decimalValue = this.FormInstanceElement.transientOriginalDecimalValue;\r\n }\r\n this.userChangedFieldValue = false;\r\n }\r\n\r\n // Override a protected method.\r\n protected writeValueTriggered(): void {\r\n super.writeValueTriggered();\r\n\r\n if (this.controlData.formControl) {\r\n if (this.FormInstanceElement.decimalValue != null) {\r\n if (this.decimalFormatDirective) {\r\n this.decimalFormatDirective.writeValue(this.FormInstanceElement.decimalValue);\r\n this.controlData.formControl.setValue(this.decimalFormatDirective.value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n this.writeValueTriggered();\r\n }\r\n\r\n public handleOnModelChange(): void {\r\n if (this.decimalFormatDirective) {\r\n this.decimalFormatDirective.writeValue(this.FormInstanceElement['unformattedDecimalValue']);\r\n this.FormInstanceElement['unformattedDecimalValue'] = null;\r\n }\r\n super.handleOnModelChange();\r\n\r\n return;\r\n }\r\n\r\n public handleOnFocus(eventData: FocusEvent): void {\r\n this.hasFocus = true;\r\n this.formattedPreviewValue = this.decimalFormatDirective.applyDecimalFormatting(this.FormControl.value);\r\n }\r\n\r\n public handleOnBlur() {\r\n this.hasFocus = false;\r\n this.notifyControlTouched();\r\n }\r\n}\r\n","import { Component, OnInit, Output, EventEmitter, ViewChild, SimpleChanges } from '@angular/core';\r\n//import { Type } from 'class-transformer';\r\n\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { HeaderValuePair } from '../../../models/csv-data/header-value-pair.model';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormField, DisplayFormatEnum } from '../../../models/form-builder/form-field.model';\r\nimport { CascadingDropDownFormFieldData, CachedDropDownValuesForHeader } from '../../../models/cascading-dropdown/cascading-dropdown-data.model';\r\nimport { CsvOptionsFileData } from '../../../models/csv-data/csv-options-file-data.model';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { FormModeEnum } from '../../../enums/form-mode.enum';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\nimport { Form } from '../../../models/form-builder/form.model';\r\n\r\nclass ValuesFromPriorDropDownConfig {\r\n public textValues: string[];\r\n\r\n public constructor(numHeaders: number) {\r\n this.textValues = [];\r\n for (let index: number = 0; index < numHeaders; index++)\r\n this.textValues.push('');\r\n }\r\n}\r\n\r\n// Define a class used for storing header/value pairs.\r\n//import { HeaderValuePair } from '../../../models/csv-data/header-value-pair.model';\r\n// Define a class used as the result of the loadCsvOptionsFile() method.\r\n//import { CsvOptionsFileData } from '../../../models/csv-data/csv-options-file-data.model';\r\n\r\n\r\n// Note: this class presently serves as a base class for the following components:\r\n//\r\n// DropDownFormFieldComponent\r\n// CascadingDropDownFormFieldComponent\r\n//\r\n// This file contains the definition of data structure class HeaderValuePair\r\n// and provides a method for parsing CSV files.\r\n\r\n// Note: even though this component has a @Component decorator, it will never be\r\n// instantiated as its own component.\r\n@Component({\n selector: 'app-drop-down-form-field-base',\n templateUrl: './empty.html',\n styleUrls: ['./drop-down-form-field-base.component.scss', '../form-fields.scss'],\n standalone: false\n})\r\nexport abstract class CascadingDropDownFormFieldBaseComponent extends FormFieldBaseComponent {\r\n // Properties.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] = null; // Now assigned in the constructor.\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n DisplayFormatEnum.VERTICAL,\r\n DisplayFormatEnum.HORIZONTAL\r\n ];\r\n\r\n // Notes: this class provides the vast majority of the logic for concrete component classes\r\n // CascadingDropDownFormFieldComponent and GridCascadingDropDownFormFieldComponent.\r\n //\r\n // Presently the HTML code for both of the concrete classes resides in file\r\n // cascading-drop-down-form-field.component.html, but that code will probably be\r\n // moved to the .html file in this directory.\r\n //\r\n // As the logic in the cascading dropdown components can be detailed, I am working\r\n // to restrict access to the three instance variables immediately following (myConfig,\r\n // dropDownData, lastHeaderSelectedIndex) as follows:\r\n //\r\n // 1. Private -- make the following three properties private so access to them\r\n // only occurs in this file;\r\n // 2. Protected -- provide access methods for the two derived, concrete classes;\r\n // 3. Public -- define methods, implemented in this and the grid cascading\r\n // component class, for access to these proeprties by .html code.\r\n private myConfig: CascadingDropDownFormFieldConfig = null;\r\n private dropDownData: CascadingDropDownFormFieldData = null;\r\n //private lastHeaderSelectedIndex: number = -1;\r\n protected jsonConfig: string = null; // Added 10-31-2022 to in not sending this configuration string to the server unnecessarily.\r\n\r\n protected strError: string = null;\r\n //protected savingToServer: boolean = false;\r\n private valuesFromPriorDropDownConfig: ValuesFromPriorDropDownConfig = null;\r\n\r\n //private formFieldClone: FormField = null;\r\n\r\n @ViewChild('file') file;\r\n\r\n // Constructor.\r\n public constructor(private currentUserService: CurrentUserService) {\r\n super();\r\n\r\n this.formFieldProperties = [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.SELECT_OPTIONS_FILE,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n if ((this.currentUserService.user != null) && this.currentUserService.user.isSystemAdmin)\r\n this.formFieldProperties.push(FormFieldPropertyEnum.SHOW_CASCADING_DROPDOWN_INDICES_IN_PREVIEW_MODE);\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods (called by my derived classes).\r\n public ngOnInit(): void {\r\n this.saveJsonConfig(this.FormField.jsonConfig);\r\n // If we have an existing grid configuration, use it.\r\n this.parseConfig();\r\n\r\n // Let my parent know what properties I support.\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges) {\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.myConfig)\r\n delete this.myConfig;\r\n\r\n return;\r\n }\r\n\r\n // Implement an abstract method.\r\n public getProperties(): any {\r\n let formFieldProperties = (this.hasDisplayFormatProperty ? this.formFieldProperties : this.formFieldProperties.filter(p => p != FormFieldPropertyEnum.DISPLAY_FORMAT));\r\n let hshProperties =\r\n {\r\n component: this,\r\n formField: this.FormField,\r\n properties: formFieldProperties, //this.formFieldProperties,\r\n displayFormatValues: this.displayFormats,\r\n\r\n propertyUpdateRequired: true,\r\n displayPropertiesEdit: this.displayPropertiesEditIcon,\r\n\r\n saveConfigurationRequired: true, // Added 10-26-2022\r\n saveDataRequired: true // Note: this is used only for diagnostic purposes.\r\n };\r\n\r\n // Make sure my configuration has been parsed.\r\n if (this.myConfig == null)\r\n this.parseConfig();\r\n\r\n // Calculate a required height based on any drop-down headers.\r\n let minHeight: number = this.minHeightRequired;\r\n\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = minHeight;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n let dropdownHeaders = this.DropDownHeaders;\r\n if (dropdownHeaders) {\r\n hshProperties[FormFieldOnInitPropertyEnum.ROWS_OF_TEXT_TO_DISPLAY_IN_UNSELECTED_GRID_ROW] = dropdownHeaders.length;\r\n }\r\n\r\n return (hshProperties);\r\n }\r\n protected get hasDisplayFormatProperty(): boolean {\r\n return true;\r\n }\r\n\r\n protected get displayPropertiesEditIcon(): boolean {\r\n return true;\r\n }\r\n\r\n protected get minHeightRequired(): number {\r\n let minHeight: number = 100; // px\r\n let dropdownHeaders = this.DropDownHeaders;\r\n if ((dropdownHeaders != null) && (dropdownHeaders.length > 0)) {\r\n minHeight =\r\n 50 // Header\r\n + (dropdownHeaders.length * 60) // Space for all drop-down fields.\r\n + ((dropdownHeaders.length - 1) * 25); // Space for filler between drop-down fields.\r\n }\r\n\r\n return minHeight;\r\n }\r\n\r\n // Accessor methods.\r\n public get ReadyToRender(): boolean {\r\n //return ((this.Config != null) && (this.Data != null));\r\n return this.HasConfig && this.HasData;\r\n }\r\n\r\n public get DisplayConfigTip(): boolean {\r\n let displayTip = (this.DropDownHeaders && this.DropDownHeaders?.length == 0 && this.FormField.primaryFieldName == null);\r\n return displayTip;\r\n }\r\n /*\r\n public get DisplaySavingTip(): boolean {\r\n return this.savingToServer;\r\n }\r\n */\r\n\r\n public get AdditionalMatFormFieldStyles(): string {\r\n return '';\r\n }\r\n\r\n public get IsHorizontal(): boolean {\r\n return (this.FormField.displayFormat === 'Horizontal');\r\n }\r\n public IsHorizontalAndNotFirstSelection(index: number): boolean {\r\n return ((this.FormField.displayFormat === 'Horizontal') && (index > 0));\r\n }\r\n\r\n public get DropDownHeaders(): string[] {\r\n return (this.Config ? this.Config.dropDownHeaders : []);\r\n }\r\n public get DropDownValues(): number[] {\r\n return (this.Data != null ? this.Data.dropDownValues : []);\r\n }\r\n\r\n public get HeaderIndexOffset(): number {\r\n return 0; // The grid cascading dropdown form field will override this value.\r\n }\r\n public DropDownOptionsForHeader(iHeader: number, useCaching: boolean = true): HeaderValuePair[] {\r\n let options: HeaderValuePair[] = [];\r\n\r\n // Do we have cached values?\r\n //\r\n // Note: caching is temporarily disabled pending the testing of logic to clear cached values for subsequent headers when the prior header value changes.\r\n //\r\n // Question: Why do we want to cache dropdown values?\r\n // Answer: this method gets called rather frequently from the template by Angular, making it difficult to troubleshoot a call for a particular header.\r\n // By caching a header's values once they have been computed once, many fewer calls process beyond the following two lines, making troubleshooting\r\n // such a call much easier.\r\n if (false && useCaching && (this.Data.cachedHeaders[iHeader].headerValuePairs != null))\r\n return this.Data.cachedHeaders[iHeader].headerValuePairs;\r\n\r\n // Do we have a previously selected text value that is not consistent/available with the current configuration?\r\n /*\r\n let previouslySelectedHeaderValuePair: HeaderValuePair = null;\r\n if (this.valuesFromPriorDropDownConfig != null) {\r\n previouslySelectedHeaderValuePair = new HeaderValuePair(-1, this.myConfig.dropDownHeaders[iHeader], this.valuesFromPriorDropDownConfig.textValues[iHeader]);\r\n options.push(previouslySelectedHeaderValuePair);\r\n }\r\n */\r\n\r\n // Handle the first select field in a unique way.\r\n if ((iHeader === 0) && (this.Config.dropDownOptionsAsHierarchy != null) && (this.Config.dropDownOptionsAsHierarchy.length > 0)) {\r\n // Do we have a previously selected text value that is not consistent/available with the current configuration?\r\n let previouslySelectedHeaderValuePair: HeaderValuePair = null;\r\n if ((this.valuesFromPriorDropDownConfig != null) && (this.valuesFromPriorDropDownConfig.textValues != null) &&\r\n (this.valuesFromPriorDropDownConfig.textValues[iHeader] != null) && (this.valuesFromPriorDropDownConfig.textValues[iHeader].trim() != '')) {\r\n previouslySelectedHeaderValuePair = new HeaderValuePair(-1, this.Config.dropDownHeaders[iHeader], this.valuesFromPriorDropDownConfig.textValues[iHeader]);\r\n options.push(previouslySelectedHeaderValuePair);\r\n }\r\n\r\n for (let iOption: number = 0; iOption < this.Config.dropDownOptionsAsHierarchy.length; iOption++) {\r\n let headerValuePair: HeaderValuePair = this.Config.dropDownOptionsAsHierarchy[iOption];\r\n\r\n options.push(headerValuePair);\r\n }\r\n } else if ((this.Config.dropDownOptionsAsHierarchy != null) && (iHeader < this.Config.dropDownHeaders.length)) {\r\n if ((this.Data != null) && (this.Data.dropDownValues != null) && (iHeader - 1 < this.Data.dropDownValues.length)) {\r\n // If the selection for the prior header is zero, meaning no value has yet\r\n // been selected, then there will be no values to select for this header.\r\n if (this.Data.dropDownValues[iHeader - 1] !== 0) {\r\n // Get any previous selected values for all headers after the first/zeroeth header.\r\n let previouslySelectedHeaderValuePairs: HeaderValuePair[] = [];\r\n for (let index: number = 0; index < this.Config.dropDownHeaders.length; index++) {\r\n //if ((this.valuesFromPriorDropDownConfig != null) && (this.valuesFromPriorDropDownConfig.textValues != null) && (index > 0) && (this.valuesFromPriorDropDownConfig.textValues[index] != null) && (this.valuesFromPriorDropDownConfig.textValues[index].trim() != ''))\r\n if ((this.valuesFromPriorDropDownConfig != null) && (this.valuesFromPriorDropDownConfig.textValues != null) && (this.valuesFromPriorDropDownConfig.textValues[index] != null) && (this.valuesFromPriorDropDownConfig.textValues[index].trim() != ''))\r\n previouslySelectedHeaderValuePairs[index] = new HeaderValuePair(-1, this.Config.dropDownHeaders[index], this.valuesFromPriorDropDownConfig.textValues[index]);\r\n else\r\n previouslySelectedHeaderValuePairs[index] = null;\r\n }\r\n\r\n // Get the value for the prior header.\r\n //options = CascadingDropDownFormFieldBaseComponent.findOptionsValuesForHeader(iHeader, this.Config.dropDownOptionsAsHierarchy, this.Data.dropDownValues);\r\n options = CascadingDropDownFormFieldBaseComponent.findOptionsValuesForHeader(iHeader, this.Config.dropDownOptionsAsHierarchy, this.Data.dropDownValues, 0, previouslySelectedHeaderValuePairs);\r\n } // if\r\n } // if\r\n } // else if\r\n\r\n // Cache options.\r\n if ((this.Data.cachedHeaders != null) && (this.Data.cachedHeaders.length > iHeader)) {\r\n if (iHeader > 0)\r\n this.Data.cachedHeaders[iHeader].previousHeaderSelectedIndex = this.Data.dropDownValues[iHeader - 1];\r\n this.Data.cachedHeaders[iHeader].headerValuePairs = options;\r\n }\r\n\r\n // Return options.\r\n return (options);\r\n }\r\n\r\n private static getPreviouslySelectedHeaderValuePair(dropDownHeaders: string[], valuesFromPriorDropDownConfig: ValuesFromPriorDropDownConfig, iHeader: number): HeaderValuePair {\r\n let previouslySelectedHeaderValuePair: HeaderValuePair = null;\r\n if ((valuesFromPriorDropDownConfig != null) && (valuesFromPriorDropDownConfig.textValues.length > iHeader) &&\r\n (valuesFromPriorDropDownConfig.textValues[iHeader] != null) && (valuesFromPriorDropDownConfig.textValues[iHeader].trim() != '')) {\r\n previouslySelectedHeaderValuePair = new HeaderValuePair(-1, dropDownHeaders[iHeader], valuesFromPriorDropDownConfig.textValues[iHeader]);\r\n }\r\n\r\n return previouslySelectedHeaderValuePair;\r\n }\r\n\r\n public HeaderSelectionDisabled(headerIndex: number, headerValuePair: HeaderValuePair): boolean {\r\n let disabled: boolean = this.mode == 'design';\r\n\r\n if (!disabled) {\r\n if (headerIndex > this.LastHeaderSelectedIndex + 1)\r\n disabled = true;\r\n }\r\n\r\n return disabled;\r\n }\r\n\r\n public get UsesMainFieldLabel(): boolean {\r\n //return this.mode == 'design';\r\n return true; // Note: this is the default behavior. It can be overriden by derived classes.\r\n }\r\n\r\n public get Error(): string {\r\n return (this.strError);\r\n }\r\n\r\n public get IsPrimaryCascadingField(): boolean {\r\n return true;\r\n }\r\n public get IsSecondaryCascadingField(): boolean {\r\n return false;\r\n }\r\n\r\n public get HasConfig(): boolean {\r\n return true;\r\n }\r\n public get Config(): CascadingDropDownFormFieldConfig {\r\n return this.myConfig;\r\n }\r\n public get HasData(): boolean {\r\n return true;\r\n }\r\n public get Data(): CascadingDropDownFormFieldData {\r\n //return this.myData;\r\n return this.dropDownData;\r\n }\r\n public get LastHeaderSelectedIndex(): number {\r\n //return this.lastHeaderSelectedIndex;\r\n return (this.Data != null ? this.Data.lastHeaderSelectedIndex : -1);\r\n }\r\n public set LastHeaderSelectedIndex(value: number) {\r\n //this.lastHeaderSelectedIndex = value;\r\n if (this.HasData)\r\n this.Data.lastHeaderSelectedIndex = value;\r\n }\r\n // End methods called by HTML code.\r\n\r\n // Protected access methods.\r\n protected get ProtectedAccessConfig(): CascadingDropDownFormFieldConfig {\r\n return this.myConfig;\r\n }\r\n protected get ProtectedAccessDropDownData(): CascadingDropDownFormFieldData {\r\n return this.dropDownData;\r\n }\r\n protected get ProtectedAccessLastHeaderSelectedIndex(): number {\r\n //return this.lastHeaderSelectedIndex;\r\n return (this.Data != null ? this.Data.lastHeaderSelectedIndex : -1);\r\n }\r\n protected set ProtectedAccessLastHeaderSelectedIndex(value: number) {\r\n //this.lastHeaderSelectedIndex = value;\r\n if (this.HasData)\r\n this.Data.lastHeaderSelectedIndex = value;\r\n }\r\n\r\n // Handle configuration events.\r\n public getSelectedValue(value: string, optionIndex: number, headerIndex: number): string {\r\n // Note: this method can be difficult to debug, so, at least for the time being,\r\n // this method will log a warning if it encounters a problematic condition.\r\n let result: string = null;\r\n let warning: string = null;\r\n\r\n if ((this.Data != null) &&\r\n (this.Data.dropDownValues != null) && (headerIndex < this.Data.dropDownValues.length) &&\r\n (this.Data.dropDownSavedValues != null) && (headerIndex < this.Data.dropDownSavedValues.length)) {\r\n let selectedOptionIndex = this.Data.dropDownValues[headerIndex];\r\n let savedValue = this.Data.dropDownSavedValues[headerIndex];\r\n\r\n let needToShowIndicesInValues: boolean = ((this.FormField.transientShowCascadingDropdownIndicesInPreviewMode == true) && (this.mode == 'preview'));\r\n if (selectedOptionIndex == optionIndex) {\r\n //return savedValue || value;\r\n if (savedValue != null) {\r\n // We have a saved value, so use it.\r\n result = savedValue;\r\n } else if (needToShowIndicesInValues) {\r\n result = `${optionIndex}: ${value}`;\r\n } else {\r\n result = value;\r\n }\r\n } else {\r\n if (needToShowIndicesInValues) {\r\n result = `${optionIndex}: ${value}`;\r\n } else {\r\n result = value;\r\n }\r\n }\r\n } else if (this.Data == null)\r\n warning = 'getSelectedValue(): this.myData is null.';\r\n else if (this.Data.dropDownValues == null)\r\n warning = 'getSelectedValue(): this.myData.dropDownValues is null.';\r\n else if (headerIndex >= this.Data.dropDownValues.length)\r\n warning = 'getSelectedValue(): headerIndex >= this.myData.dropDownValues.length.';\r\n else if (this.Data.dropDownSavedValues == null)\r\n warning = 'getSelectedValue(): this.myData.dropDownSavedValues is null.';\r\n else if (headerIndex >= this.Data.dropDownSavedValues.length)\r\n warning = 'getSelectedValue(): headerIndex >= this.myData.dropDownSavedValues.length.';\r\n\r\n // Is there a warning?\r\n if (warning != null) {\r\n return value; // Perform the default/expected behavior.\r\n }\r\n\r\n return result;\r\n }\r\n\r\n // Handle the propertyUpdated() callback\r\n // that was requested in the onOnit() data:\r\n //\r\n // propertyUpdateRequired: true\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if ((propertyName == FormFieldPropertyEnum.SELECT_OPTIONS_FILE) ||\r\n (propertyName == FormFieldPropertyEnum.SELECTED_CASCADING_DROPDOWN_CONSTRAINT)) {\r\n // Copy values.\r\n if (formField.jsonConfig != this.FormField.jsonConfig)\r\n this.FormField.jsonConfig = formField.jsonConfig;\r\n if (formField.csvOptionsData != this.FormField.csvOptionsData)\r\n this.FormField.csvOptionsData = formField.csvOptionsData;\r\n\r\n if (this.FormField.csvOptionsData != null) {\r\n this.processCsvOptionsFile(this.FormField.csvOptionsData);\r\n this.csvOptionsFileProcessed();\r\n } else if ((this.FormField.jsonConfig != null) && (this.FormField.jsonConfig.trim() != '')) {\r\n this.saveJsonConfig(this.FormField.jsonConfig);\r\n //this.myConfig = CascadingDropDownFormFieldConfig.parseConfig(this.FormField);\r\n this.myConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(this.jsonConfig);\r\n this.dropDownData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.Config);\r\n }\r\n else {\r\n // Need to reset the field's state to have no cascading dropdown config.\r\n this.myConfig = null;\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected csvOptionsFileProcessed(): void {\r\n // Note: a derived class can override this method to do something meaningful to that class.\r\n\r\n // Now that the CSV data has been processed, it can be set to null.\r\n //this.formField.csvOptionsData = null;\r\n this.saveJsonConfig(this.FormField.jsonConfig);\r\n }\r\n\r\n protected formInstanceElementReceived(): void {\r\n if (this.Mode === 'preview') {\r\n } else if (this.Mode === 'instance') {\r\n if (this.FormInstanceElement.textValue && (this.FormInstanceElement.textValue.trim() !== '')) {\r\n this.unpackFormInstanceElement();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if (this.Mode === 'preview') {\r\n } else if (this.Mode === 'instance') {\r\n if (this.FormInstanceElement.textValue && (this.FormInstanceElement.textValue.trim() !== '')) {\r\n this.unpackFormInstanceElement();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n if ((this.mode == FormModeEnum.DESIGN) && (this.jsonConfig != null)) {\r\n this.FormField.cascadingDropdownConstraintValue = this.jsonConfig;\r\n if (reasonForSave == FormFieldConfigurationSaveReason.SavingFormToServer) {\r\n this.preparingToSaveConfigToServer(
form);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n public saveConfigurationCompleted(form: any): void {\r\n //this.formFieldClone = null;\r\n }\r\n protected preparingToSaveConfigToServer(form: Form): void {\r\n this.FormField.jsonConfig = null;\r\n\r\n if ((form != null) && (form.formFields != null)) {\r\n // Replace my form field in the form being saved with a clone.\r\n //this.formFieldClone = this.formField.clone();\r\n }\r\n }\r\n\r\n public saveData(formInstance: any): void {\r\n // Note: this method is only used for diagnostic purposes.\r\n // Clear any cached dropdown values.\r\n if (this.HasConfig && this.HasData) {\r\n //for (let index: number = 0; index < this.Config.dropDownHeaders.length; index++)\r\n // this.Data.cachedHeaders[index] = new CachedDropDownValuesForHeader(index);\r\n this.Data.emptyCache(this.Config);\r\n if (this.Data.cachedHeaders != null)\r\n this.Data.cachedHeaders = undefined;\r\n\r\n if (this.Data.formInstanceElements != null)\r\n this.Data.formInstanceElements = null;\r\n\r\n this.saveChangedDataToFormInstanceElement();\r\n }\r\n }\r\n public saveCompleted(formInstance: any): void {\r\n // Note: this method is only used for diagnostic purposes.\r\n return;\r\n }\r\n\r\n // Note: breaking out method unpackFormInstanceElement() from method formInstanceElementReceived()\r\n // so that a derived class, e.g. the grid cascading dropdown class, can override this method.\r\n protected unpackFormInstanceElement(): void {\r\n // VNEXT-409 IMPLEMENTATION NODE: if the value coming from the server is not in the list of available values:\r\n //\r\n // 1. Add an additional selectable value, with an index value of -1, to each\r\n // header's list of selectable values;\r\n // 2. Set all of the selected index values to -1;\r\n //\r\n // 3. Add value selected logic, in another method or methods, to handle\r\n // the selection of the -1 value differently:\r\n //\r\n // If the first headers -1 value is selected, set all other header\r\n // selected index values to -1.\r\n this.dropDownData = CascadingDropDownFormFieldData.deserializeDropDownData(this.FormInstanceElement.textValue, this.Config);\r\n\r\n if ((this.dropDownData.dropDownTextValues != null) && (this.dropDownData.dropDownTextValues.length > 0) &&\r\n (this.dropDownData.dropDownTextValues[0] != null) && (this.dropDownData.dropDownTextValues[0].trim() != '')) {\r\n //let index: number = 0;\r\n let textValue: string = this.dropDownData.dropDownTextValues[0];\r\n //let dropDownOptionsForHeader: HeaderValuePair[] = this.DropDownOptionsForHeader(index, false);\r\n let dropDownOptionsForHeader: HeaderValuePair[] = this.Config.dropDownOptionsAsHierarchy;\r\n let dropDownOption: HeaderValuePair = dropDownOptionsForHeader.find(o => o.ValueText == textValue);\r\n\r\n if (dropDownOption == null) {\r\n this.valuesFromPriorDropDownConfig = new ValuesFromPriorDropDownConfig(this.myConfig.dropDownHeaders.length);\r\n for (let index: number = 0; index < this.myConfig.dropDownHeaders.length; index++) {\r\n textValue = this.dropDownData.dropDownTextValues[index];\r\n if ((textValue != null) && (textValue.trim() != '')) {\r\n this.valuesFromPriorDropDownConfig.textValues[index] = textValue;\r\n //this.dropDownData.dropDownValues[index] = -1; // This is the index for previously selected values for an old configuration.\r\n this.dropDownData.setDropDownValue(index, -1);\r\n } else\r\n break;\r\n }\r\n }\r\n }\r\n /*\r\n else {\r\n // Use the original, index-based values.\r\n for (let index: number = 0; index < this.dropDownData.dropDownValues.length - 1; index++) {\r\n let dropDownValue: number = this.dropDownData.dropDownValues[index];\r\n\r\n if (dropDownValue > 0) {\r\n if (index > this.lastHeaderSelectedIndex)\r\n this.lastHeaderSelectedIndex = index;\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n */\r\n // Set property 'lastHeaderSelectedIndex';\r\n for (let index: number = 0; index < this.dropDownData.dropDownValues.length - 1; index++) {\r\n let dropDownValue: number = this.dropDownData.dropDownValues[index];\r\n\r\n if (dropDownValue > 0) {\r\n //if (index > this.lastHeaderSelectedIndex)\r\n if (index > this.LastHeaderSelectedIndex)\r\n //this.lastHeaderSelectedIndex = index;\r\n this.LastHeaderSelectedIndex = index;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Clear any cached dropdown values.\r\n this.dropDownData.emptyCache(this.Config);\r\n }\r\n\r\n public handlingEditPropertiesClickEvent(): void {\r\n if (this.myConfig != null) {\r\n if ((this.FormField.jsonConfig == null) || (this.FormField.jsonConfig.trim() == ''))\r\n this.FormField.jsonConfig = JSON.stringify(this.myConfig);\r\n }\r\n }\r\n\r\n // Define methods for managing controls.\r\n public dropDownValueChanged(iHeaderParam: number): void {\r\n // 11-07-2022 new code: save the corresponding text value.\r\n let dropDownValuesForHeader: HeaderValuePair[] = this.DropDownOptionsForHeader(iHeaderParam);\r\n let localDropDownData: CascadingDropDownFormFieldData = this.Data;\r\n\r\n if ((localDropDownData.dropDownValues != null) && (iHeaderParam < localDropDownData.dropDownValues.length) &&\r\n (localDropDownData.dropDownValues[iHeaderParam] > 0) && (localDropDownData.dropDownValues[iHeaderParam] <= dropDownValuesForHeader.length)) {\r\n let selectedOneBasedIndexValue: number = localDropDownData.dropDownValues[iHeaderParam];\r\n let selectedHeaderValuePair: HeaderValuePair = dropDownValuesForHeader[selectedOneBasedIndexValue - 1];\r\n localDropDownData.dropDownTextValues[iHeaderParam] = selectedHeaderValuePair.ValueText;\r\n } else {\r\n localDropDownData.dropDownTextValues[iHeaderParam] = '';\r\n }\r\n\r\n // Clear the cache for headers after the current header.\r\n this.Data.clearCacheValuesPastHeader(iHeaderParam);\r\n\r\n // Zero out the selections for any subsequent headers.\r\n // Note: the following, commented out logic is not yet working ... need to investigate, fix.\r\n let lastHeaderSelected: number = iHeaderParam;\r\n for (let iHeader: number = iHeaderParam + 1; iHeader < this.Data.dropDownValues.length; iHeader++) {\r\n let headerOptions = this.DropDownOptionsForHeader(iHeader, false);\r\n\r\n if (headerOptions.length == 1) {\r\n this.Data.dropDownValues[iHeader] = headerOptions[0].Index;\r\n this.Data.dropDownTextValues[iHeader] = headerOptions[0].ValueText;\r\n this.headerValueChanged(iHeader, headerOptions[0].Index);\r\n lastHeaderSelected = iHeader;\r\n }\r\n else {\r\n //this.Data.dropDownValues[iHeader] = 0;\r\n this.Data.setDropDownValue(iHeader, 0);\r\n this.Data.dropDownTextValues[iHeader] = '';\r\n this.headerValueChanged(iHeader, 0);\r\n }\r\n }\r\n this.LastHeaderSelectedIndex = lastHeaderSelected;\r\n this.Data.lastHeaderSelectedIndex = lastHeaderSelected;\r\n\r\n // Update my form instance element's 'TextValue' attribute with\r\n // JSON data that corresponds to the current selections.\r\n this.saveChangedDataToFormInstanceElement();\r\n\r\n // Clear some cached values.\r\n for (let index: number = iHeaderParam + 1; index < this.Data.cachedHeaders.length; index++)\r\n this.Data.cachedHeaders[index] = new CachedDropDownValuesForHeader(index);\r\n\r\n return;\r\n }\r\n protected headerValueChanged(iHeader: number, selectedValue: number): void {\r\n // Note: this method can be overriden by derived classes.\r\n }\r\n protected saveChangedDataToFormInstanceElement(): void {\r\n // Update my form instance element's 'TextValue' attribute with\r\n // JSON data that corresponds to the current selections.\r\n this.FormInstanceElement.TextValue = JSON.stringify(this.Data);\r\n }\r\n\r\n public handleOnModelChange(): void {\r\n // this sets all \"saved\" values to null\r\n this.Data.dropDownSavedValues = CascadingDropDownFormFieldData.createDropDownSavedValuesFromHeaders(this.Data.dropDownHeaders);\r\n super.handleOnModelChange();\r\n }\r\n\r\n // Define/implement protected methods.\r\n protected parseConfig(): void {\r\n if ((this.jsonConfig != null) && (this.jsonConfig.trim() != '')) {\r\n this.myConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(this.jsonConfig);\r\n\r\n /*\r\n if (this.mode == FormModeEnum.INSTANCE) {\r\n // Set the config values to null as we do not need them anymore.\r\n this.formField.jsonConfig = null;\r\n this.formField.cascadingDropdownConstraintValue = null;\r\n }\r\n */\r\n\r\n if (this.FormInstanceElement.textValue && (this.FormInstanceElement.textValue.trim() !== '')) {\r\n this.unpackFormInstanceElement();\r\n } else {\r\n this.dropDownData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.myConfig);\r\n }\r\n }\r\n }\r\n //protected static doParseConfig(formField: FormField): CascadingDropDownFormFieldConfig {\r\n protected doParseConfig(formField: FormField): CascadingDropDownFormFieldConfig {\r\n let config: CascadingDropDownFormFieldConfig = null;\r\n\r\n if ((formField != null) && (formField.jsonConfig != null) && (formField.jsonConfig.trim() !== '')) {\r\n //this.saveJsonConfig(this.formField.jsonConfig);\r\n this.saveJsonConfig(formField.jsonConfig);\r\n //config = CascadingDropDownFormFieldConfig.parseConfig(formField);\r\n config = CascadingDropDownFormFieldConfig.parseJsonConfig(this.jsonConfig);\r\n }\r\n\r\n return config;\r\n }\r\n\r\n //protected static findOptionsValuesForHeader(iHeader: number, ancestorHeaderValuePairs: HeaderValuePair[], ancestorDropDownValues: number[], iCurrentAncestor: number = 0): HeaderValuePair[] {\r\n protected static findOptionsValuesForHeader(iHeader: number, ancestorHeaderValuePairs: HeaderValuePair[], ancestorDropDownValues: number[], iCurrentAncestor: number, previouslySelectedHeaderValuePairs: HeaderValuePair[]): HeaderValuePair[] {\r\n // Initialize the result array.\r\n let resultHeaderValuePairs: HeaderValuePair[] = [];\r\n\r\n // Find the ancestor for the current header/level.\r\n let iAncestorDropDownValue = ancestorDropDownValues[iCurrentAncestor];\r\n //let ancestorPreviouslySelectedHeaderValuePair: HeaderValuePair = CascadingDropDownFormFieldBaseComponent.getPreviouslySelectedValueForHeader(iCurrentAncestor, previouslySelectedHeaderValuePairs, ancestorDropDownValues[iCurrentAncestor]);\r\n let ancestorPreviouslySelectedHeaderValuePair: HeaderValuePair = CascadingDropDownFormFieldBaseComponent.getPreviouslySelectedValueForHeader(iHeader - 1, previouslySelectedHeaderValuePairs, ancestorDropDownValues[iCurrentAncestor]);\r\n /*\r\n if ((previouslySelectedHeaderValuePairs != null) && (ancestorDropDownValues[iCurrentAncestor] == -1) && (previouslySelectedHeaderValuePairs.length > iCurrentAncestor) && (previouslySelectedHeaderValuePairs[iCurrentAncestor] != null))\r\n ancestorPreviouslySelectedHeaderValuePair = previouslySelectedHeaderValuePairs[iCurrentAncestor];\r\n */\r\n //let previouslySelectedHeaderValuePair: HeaderValuePair = CascadingDropDownFormFieldBaseComponent.getPreviouslySelectedValueForHeader(iCurrentAncestor + 1, previouslySelectedHeaderValuePairs, ancestorDropDownValues[iCurrentAncestor]);\r\n let previouslySelectedHeaderValuePair: HeaderValuePair = CascadingDropDownFormFieldBaseComponent.getPreviouslySelectedValueForHeader(iHeader, previouslySelectedHeaderValuePairs, ancestorDropDownValues[iCurrentAncestor]);\r\n /*\r\n if ((previouslySelectedHeaderValuePairs != null) && (ancestorDropDownValues[iCurrentAncestor] == -1) && (previouslySelectedHeaderValuePairs.length > iCurrentAncestor + 1) && (previouslySelectedHeaderValuePairs[iCurrentAncestor + 1] != null))\r\n previouslySelectedHeaderValuePair = previouslySelectedHeaderValuePairs[iCurrentAncestor + 1];\r\n */\r\n\r\n /*\r\n for (let iAncestor: number = 0; iAncestor < ancestorHeaderValuePairs.length; iAncestor++) {\r\n let ancestorHeaderValuePair: HeaderValuePair = ancestorHeaderValuePairs[iAncestor];\r\n\r\n if (ancestorHeaderValuePair.Index === iAncestorDropDownValue) {\r\n let iNextAncestor: number = iCurrentAncestor + 1;\r\n\r\n if (iNextAncestor < iHeader) {\r\n resultHeaderValuePairs = CascadingDropDownFormFieldBaseComponent.findOptionsValuesForHeader(iHeader, ancestorHeaderValuePair.ChildValuePairs, ancestorDropDownValues, iCurrentAncestor + 1);\r\n } else {\r\n resultHeaderValuePairs = ancestorHeaderValuePair.ChildValuePairs;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n */\r\n if ((ancestorPreviouslySelectedHeaderValuePair != null) && (previouslySelectedHeaderValuePair != null)) {\r\n resultHeaderValuePairs = [previouslySelectedHeaderValuePair];\r\n } else {\r\n let ancestorHeaderValuePair: HeaderValuePair = ancestorHeaderValuePairs.find(hvp => hvp.Index == iAncestorDropDownValue);\r\n\r\n if (ancestorHeaderValuePair != null) {\r\n let iNextAncestor: number = iCurrentAncestor + 1;\r\n if (iNextAncestor < iHeader)\r\n //resultHeaderValuePairs = CascadingDropDownFormFieldBaseComponent.findOptionsValuesForHeader(iHeader, ancestorHeaderValuePair.ChildValuePairs, ancestorDropDownValues, iCurrentAncestor + 1);\r\n resultHeaderValuePairs = CascadingDropDownFormFieldBaseComponent.findOptionsValuesForHeader(iHeader, ancestorHeaderValuePair.ChildValuePairs, ancestorDropDownValues, iCurrentAncestor + 1, previouslySelectedHeaderValuePairs);\r\n else\r\n resultHeaderValuePairs = ancestorHeaderValuePair.ChildValuePairs;\r\n }\r\n }\r\n\r\n return resultHeaderValuePairs;\r\n }\r\n\r\n private static getPreviouslySelectedValueForHeader(headerIndex: number, previouslySelectedHeaderValuePairs: HeaderValuePair[], currentAncestorSelectedIndex: number): HeaderValuePair {\r\n let previouslySelectedHeaderValuePair: HeaderValuePair = null;\r\n if ((previouslySelectedHeaderValuePairs != null) && (currentAncestorSelectedIndex == -1) && (previouslySelectedHeaderValuePairs.length > headerIndex) && (previouslySelectedHeaderValuePairs[headerIndex] != null))\r\n previouslySelectedHeaderValuePair = previouslySelectedHeaderValuePairs[headerIndex];\r\n return previouslySelectedHeaderValuePair;\r\n }\r\n\r\n protected createEmptyDataFromConfig(): void {\r\n this.dropDownData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.myConfig);\r\n }\r\n\r\n // Private methods.\r\n private processCsvOptionsFile(csvOptions: CsvOptionsFileData): void {\r\n this.myConfig = CascadingDropDownFormFieldConfig.createConfigFromCsvOptionsData(csvOptions);\r\n this.dropDownData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.myConfig);\r\n\r\n // Update my configurations.\r\n this.FormField.jsonConfig = JSON.stringify(this.myConfig);\r\n\r\n return;\r\n }\r\n\r\n protected saveJsonConfig(jsonConfig: string): void {\r\n if ((jsonConfig != null) && (jsonConfig.trim() != ''))\r\n this.jsonConfig = jsonConfig;\r\n\r\n // For now, set the JSON config string sto null only in 'instance' mode.\r\n if (this.FormField != null) {\r\n this.FormField.csvOptionsData = null;\r\n this.jsonConfigSaved();\r\n }\r\n }\r\n\r\n protected jsonConfigSaved(): void {\r\n if (this.mode == FormModeEnum.INSTANCE) {\r\n this.FormField.jsonConfig = null;\r\n this.FormField.cascadingDropdownConstraintValue = null;\r\n }\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n
\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n \r\n {{this.DefaultDropdownValueText}}\r\n \r\n \r\n {{hshOption.OptionText}}\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n \r\n {{strSelectOption}}\r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n \r\n This control has no select options defined\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType,\r\n ViewChild\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR, FormControl, FormGroup } from '@angular/forms';\r\n\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\nimport { IAutoCompleteItemData } from '../../../interfaces/iautocomplete-item-data.interface';\r\nimport { string } from 'mathjs';\r\nimport { AutocompleteComponent } from '../../autocomplete/autocomplete.component';\r\n\r\nclass ConfiguredOption {\r\n public OptionId: number;\r\n public OptionText: string;\r\n}\r\n\r\n@Component({\n selector: 'app-drop-down-form-field',\n templateUrl: './drop-down-form-field.component.html',\n styleUrls: ['./drop-down-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: DropDownFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class DropDownFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n @Output() onPropertyUpdated = new EventEmitter();\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n @ViewChild('singledropdownauto') autoCompleteObject: AutocompleteComponent;\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.SELECT_OPTIONS,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n //public DefaultDropdownValue: string = 'DEFAULT_VALUE';\r\n public DefaultDropdownValue: number = -1;\r\n private strDefaultText: string = 'No Options Configured';\r\n //VNEXT-561: KLW - Needed for form group\r\n private formGroupName: string = 'dropdown_form';\r\n\r\n private arrConfiguredOptions: ConfiguredOption[] =\r\n [\r\n { OptionId: 0, OptionText: '' },\r\n { OptionId: 1, OptionText: '' }\r\n ];\r\n private iNextConfiguredOptionIndex = 1;\r\n\r\n // Constructor.\r\n constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n public selectChange = (event: any) => {\r\n if (event.length > 0)\r\n this.FormControl.setValue(event[0]);\r\n else\r\n this.FormControl.setValue(null);\r\n };\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties =\r\n {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldProperties,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n // Notify my parent of my properties.\r\n let hshProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshProperties);\r\n\r\n if (this.Mode === 'design') {\r\n // In case we have selected options, try\r\n // to make sense of our configuration.\r\n this.propertyUpdated(this.formField, 'selectOptions');\r\n }\r\n\r\n return;\r\n }\r\n\r\n // HTML accessor methods.\r\n // 02-24-2020 note: disabled the following code that used to show the default\r\n // drop-down value in design mode as it started generating an\r\n // \"value updated before it could be displayed\".\r\n //\r\n // This functionality could be restored by hooking into the\r\n // properties drawer value changes, but it's not worth the\r\n // time/expense.\r\n /*\r\n get DefaultDropdownValue(): string {\r\n //let strDefaultValue: string = 'DEFAULT_VALUE';\r\n\r\n return (this.strDefaultValue);\r\n }\r\n\r\n set DefaultDropdownValue(strIgnoredValue: string) {\r\n return;\r\n }\r\n */\r\n\r\n public get DefaultDropdownValueText(): string {\r\n return (this.strDefaultText);\r\n }\r\n\r\n public get ConfiguredOptions(): ConfiguredOption[] {\r\n return (this.arrConfiguredOptions);\r\n }\r\n\r\n // Handle the propertyUpdated() callback\r\n // that was requested in the onOnit() data:\r\n //\r\n // propertyUpdateRequired: true\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n let astrSelectOptions: string[] = this.SelectOptions;\r\n let strNewOptionText: string = '';\r\n\r\n if ((propertyName === 'selectOptions') ||\r\n (propertyName === 'defaultValue') ||\r\n (propertyName === 'all')) {\r\n if ((astrSelectOptions !== undefined) &&\r\n (astrSelectOptions !== null) &&\r\n (astrSelectOptions.length > 0)) {\r\n if (this.FormField &&\r\n (this.FormField.defaultValue !== undefined) &&\r\n (this.FormField.defaultValue !== null) &&\r\n (this.FormField.defaultValue.trim() !== '')) {\r\n let bDefaultIsValid: boolean = false;\r\n\r\n for (let iSelectOption: number = 0; iSelectOption < astrSelectOptions.length; iSelectOption++) {\r\n let strSelectOption: string = astrSelectOptions[iSelectOption];\r\n\r\n if (strSelectOption === this.FormField.defaultValue) {\r\n bDefaultIsValid = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (bDefaultIsValid) {\r\n strNewOptionText = this.FormField.defaultValue;\r\n } else {\r\n strNewOptionText = `Default value '${this.FormField.defaultValue}' is invalid`;\r\n }\r\n } else {\r\n strNewOptionText = astrSelectOptions[0];\r\n }\r\n this.setDisplayedConfiguredOptionValue(strNewOptionText);\r\n } else {\r\n this.setDisplayedConfiguredOptionValue('');\r\n this.setDisplayedConfiguredOptionValue(''); // Yes, twice called.\r\n this.DefaultDropdownValue = -1;\r\n }\r\n }\r\n\r\n if ((propertyName == 'selectOptions') ||\r\n (propertyName == 'selectOptionsConstraintName')) {\r\n this.onPropertyUpdated.emit(this.formField);\r\n }\r\n\r\n return;\r\n }\r\n\r\n private setDisplayedConfiguredOptionValue(value: string): void {\r\n this.iNextConfiguredOptionIndex = (this.iNextConfiguredOptionIndex == 1 ? 0 : 1);\r\n this.arrConfiguredOptions[this.iNextConfiguredOptionIndex].OptionText = value; //strNewOptionText;\r\n this.DefaultDropdownValue = this.iNextConfiguredOptionIndex;\r\n }\r\n\r\n /*\r\n get DefaulDropdownValueText(): string {\r\n // Set a timer to recalculate this value.\r\n setTimeout(() => {\r\n this.recalculateDefaultDropdownValueText();\r\n }, 0);\r\n\r\n // Return the value immediately.\r\n return (this.strDefaultText);\r\n }\r\n */\r\n\r\n /*\r\n private recalculateDefaultDropdownValueText(): void {\r\n //let strDefaultText: string = 'No Select Options Configured';\r\n\r\n let astrSelectOptions: string[] = this.SelectOptions;\r\n\r\n if ((astrSelectOptions !== undefined) && (astrSelectOptions !== null) && (astrSelectOptions.length > 0)) {\r\n if (this.FormField &&\r\n (this.FormField.defaultValue !== undefined) &&\r\n (this.FormField.defaultValue !== null) &&\r\n (this.FormField.defaultValue.trim() !== '')) {\r\n let bDefaultIsValid: boolean = false;\r\n\r\n for (let iSelectOption: number = 0; iSelectOption < astrSelectOptions.length; iSelectOption++) {\r\n let strSelectOption: string = astrSelectOptions[iSelectOption];\r\n\r\n if (strSelectOption === this.FormField.defaultValue) {\r\n bDefaultIsValid = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (bDefaultIsValid) {\r\n this.strDefaultText = this.FormField.defaultValue;\r\n } else {\r\n this.strDefaultText = `Default value '${this.FormField.defaultValue}' is invalid`;\r\n }\r\n } else {\r\n this.strDefaultText = astrSelectOptions[0];\r\n }\r\n }\r\n\r\n //return (strDefaultText);\r\n return;\r\n }\r\n */\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n if (this.FormInstanceElement.UserUpdatedData != true) {\r\n this.setDefaultTextSelectValue();\r\n }\r\n\r\n // Use a base class method to\r\n // set up a textual form group.\r\n this.setupTextFormGroup('dropdown_form');\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormGroupFromWriteValue(this.formGroupName);\r\n\r\n if (this.autoCompleteObject != null) {\r\n var toPass: IAutoCompleteItemData[] = [this.FormControl.value];\r\n\r\n this.autoCompleteObject.setIsRequired(this.FormField.required);\r\n this.autoCompleteObject.setData(toPass, true);\r\n this.autoCompleteObject.setFIE_ID(this.formField.id);\r\n this.autoCompleteObject.setHasStartsWith(this.formField.autocomplete_StartsWith);\r\n this.autoCompleteObject.setHasContains(this.formField.autocomplete_Contains);\r\n this.autoCompleteObject.setShowChipList(false);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Override notifyValueChanged in order to allow field conditional logic to trigger on a value change.\r\n protected notifyValueChanged(): void {\r\n super.notifyValueChanged();\r\n\r\n super.handleOnBlur();\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n TextInputFormFieldBaseComponent.pasteValue(value, elementWrapper);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (DropDownFormFieldComponent);\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n {{this.DisplayName}}\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewContainerRef, Renderer2, Type as AngularCoreType, ViewChild, ElementRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { FormBuilder, FormGroup, FormControl, Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\nimport { ControlType, ValidationInfo, ValidationMessageInfo, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { CurrentUser } from '../../../../security/current-user.model';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { EditorNameFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { StringUtil } from '../../../utility-classes/string.util';\r\nimport { EditorNameFieldDefLogic } from '../../../models/form-builder/field-defs/editor-name-field-def-logic';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\r\n selector: 'app-editor-name-form-field',\r\n templateUrl: './editor-name-form-field.component.html',\r\n styleUrls: ['./editor-name-form-field.component.scss', '../form-fields.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: EditorNameFormFieldComponent,\r\n multi: true\r\n }\r\n ],\r\n standalone: false\r\n})\r\nexport class EditorNameFormFieldComponent extends TextInputFormFieldBaseComponent implements OnInit, AfterViewInit {\r\n // Properties\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n @ViewChild('gridOnlyTextArea') gridOnlyTextAreaElement: ElementRef;\r\n private currentUser: CurrentUser;\r\n /**\r\n * User configurable properties that appear in the drawer for this field\r\n */\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.MAX_LENGTH\r\n ];\r\n\r\n private readonly validationOptions: ValidationInfo[] =\r\n [\r\n {\r\n DISPLAY_NAME: 'None',\r\n IS_CUSTOM_REGULAR_EXPRESSION: false,\r\n REGULAR_EXPRESSION: null,\r\n ERROR_MESSAGE: null\r\n }\r\n ];\r\n\r\n public constructor(private rendererParam: Renderer2, private currentUserService: CurrentUserService) {\r\n super(rendererParam);\r\n this.matInputId = this.generateUniqueId('editorName');\r\n \r\n //***Get current user*/\r\n if (this.currentUserService.user != null)\r\n this.currentUser = currentUserService.user;\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n\r\n // Set a default constraint value.\r\n if (this.FormField) {\r\n if (!this.FormField.constraintName) {\r\n this.FormField.constraintName = \"None\";\r\n }\r\n }\r\n\r\n let hshOnInitProperties = this.getProperties();\r\n this.onInit.emit(hshOnInitProperties);\r\n\r\n return;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // Note: this is where a @ViewChild() definition should be resolved.\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let validationNames: string[] = [];\r\n for (let iValidation: number = 0; iValidation < this.validationOptions.length; iValidation++) {\r\n let validationInfo: ValidationInfo = this.validationOptions[iValidation];\r\n\r\n validationNames.push(validationInfo.DISPLAY_NAME);\r\n }\r\n\r\n let hshOnInitProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n constraintNames: validationNames,\r\n customRegexConstraintName: 'Custom Regular Expression'\r\n };\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 190;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshOnInitProperties;\r\n }\r\n\r\n // Override the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (EditorNameFormFieldComponent);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n //**Display the editor's name*/\r\n public get CurrentEditor(): string {;\r\n let editor: string = \"\";\r\n \r\n if (this.fieldIsInGrid) {\r\n //***Always display the current user when grid row is in edit mode*/\r\n editor = this.currentUser ? this.currentUser.displayName : \"Unknown\";\r\n\r\n //if (!StringUtil.isEmptyString(this.FormInstanceElement.textValue))\r\n // editor = this.FormInstanceElement.textValue;\r\n //else\r\n // editor = this.currentUser ? this.currentUser.displayName : \"Unknown\";\r\n }\r\n else {\r\n //***Currently always displays the current user when field is outside of a grid.\r\n //***If usecase is created in the future where this field should display the editor \r\n //***for a grid even though this field isn't inside of this grid, logic can go here\r\n editor = this.currentUser ? this.currentUser.displayName : \"Unknown\";\r\n }\r\n\r\n return editor;\r\n }\r\n\r\n public get ReadOnly(): boolean {\r\n /***This field should always be Readonly*/\r\n let bResult: boolean = true;\r\n\r\n return bResult;\r\n }\r\n\r\n protected setDefaultTextValue(): void {\r\n //***No Default Value will be used outside of the current user*/\r\n }\r\n\r\n // Override methods defined in my base class.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // Use a base class method to\r\n // set up a decimal form group.\r\n this.setupTextFormControl();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //This will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n }\r\n }\r\n\r\n //***When grid row enters edit mode, display the current user's name*/\r\n let fieldType: string = EditorNameFieldType;\r\n if ((this.FormField.fieldDefinitionClassName == fieldType) && (this.FormControl != null)) // SWH 02-19-2025 note: added this second check as this.FormControl was null, causing an exception.\r\n this.FormControl.setValue(this.CurrentEditor);\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[]): void {\r\n // First call super.\r\n super.buildValidatorFunctionsAndMessages(arrValidatorsParam, arrValidationMessagesParam);\r\n\r\n // If I have a selected validation format, apply it here.\r\n // Note: temporarily using display format as an optional validation format.\r\n if (this.FormField.constraintName && (this.FormField.constraintName.trim() !== '')) {\r\n let arrValidationOption: ValidationInfo[] = this.validationOptions.filter(vi => vi.DISPLAY_NAME === this.FormField.constraintName);\r\n\r\n if (arrValidationOption && (arrValidationOption.length === 1)) {\r\n let validationOption: ValidationInfo = arrValidationOption[0];\r\n\r\n // Don't apply both a named validation and a regular expression.\r\n // A this.FormField.regex expression would have been applied in\r\n // the above call to the base class's method.\r\n if (!this.FormField.regex) {\r\n arrValidatorsParam.push(Validators.pattern(validationOption.REGULAR_EXPRESSION));\r\n\r\n arrValidationMessagesParam.push({ type: 'pattern', message: `${this.DisplayName} ${validationOption.ERROR_MESSAGE}` });\r\n }\r\n }\r\n }\r\n\r\n // Done.\r\n return;\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n
\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n {{this.DefaultDropdownValueText}}\r\n\r\n \r\n {{hshOption.OptionText}}\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
The maximum number of selections that can be made: {{this.MaxSelections}}
\r\n
\r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n\r\n 1 ? DropdownPlaceHolderText : ''}}\"\r\n [disabled]=\"this.ReadOnly\"\r\n (blur)=\"this.handleValidationOnBlur()\"\r\n (selectionChange)=\"handleSingleSelectChange($event)\">\r\n\r\n \r\n {{strSelectOption}}\r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n {{this.SelectedChips.length}} of {{this.SelectOptions.length}} selected\r\n \r\n\r\n \r\n \r\n\r\n \r\n {{strSelectOption}}\r\n \r\n \r\n\r\n \r\n \r\n {{ selected }}\r\n cancel\r\n \r\n\r\n \r\n Remove All\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, OnDestroy, Type as AngularCoreType, EventEmitter, Output, ViewChild } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR, UntypedFormControl, FormGroup, Validators, Validator, FormControl } from '@angular/forms';\nimport { IAutoCompleteItemData } from '../../../interfaces/iautocomplete-item-data.interface';\nimport { FieldIdToSelectedValues } from '../../../models/flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\nimport { ListConstraintColumn } from '../../../models/flexible-selection-fields/list-constraint-column.model';\r\nimport { FormFieldListValuesConstraint } from '../../../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { FlexibleSelectionFieldService, FieldIdToSingleOption } from '../../../services/flexible-selection-field.service';\r\nimport { FormFieldService } from '../../../services/form-field.service';\r\nimport { AutocompleteComponent } from '../../autocomplete/autocomplete.component';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\n\r\nclass ConfiguredOption {\r\n public OptionId: number;\r\n public OptionText: string;\r\n}\r\n\r\n// To add new kind of field to serve as source to a flex field, see https://community-dc.max.gov/x/E4u6mQ\r\n\r\n// TO AVOID CONFUSION...\r\n// - references to \"auto SELECT\" in this component are refering to automatically selecting an option in a flex field if there is only one option \r\n// - references to \"auto COMPLETE\" are refering to presenting the user with a list of options as they type\r\n\n@Component({\n selector: 'app-flexible-selection-form-field',\n templateUrl: './flexible-selection-form-field.component.html',\n styleUrls: ['./flexible-selection-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: FlexibleSelectionFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\nexport class FlexibleSelectionFormFieldComponent extends FormFieldBaseComponent implements OnInit, OnDestroy {\r\n\r\n @Output() onInit = new EventEmitter();\r\n @Output() onPropertyUpdated = new EventEmitter();\r\n // Added for bug fix ticket - VNEXT-1590\r\n @Output() mimickedNgModelChange = new EventEmitter();\r\n @ViewChild('multiSelect') multiSelect;\r\n public DefaultDropdownValue: number = -1;\r\n private defaultText: string = 'No Options Configured';\r\n private singleSelectFormGroupName: string = 'flexible_single_selection_form';\r\n private multiSelectFormGroupName: string = 'MultiSelect_Control';\r\n private gridRowsImpactedBySelectionChange: boolean = false;\r\n private dropdownPlaceHolderText: string;\r\n private selectionsOpen: boolean = false;\r\n\r\n private configuredOptions: ConfiguredOption[] =\r\n [\r\n { OptionId: 0, OptionText: '' },\r\n { OptionId: 1, OptionText: '' }\r\n ];\r\n\r\n @ViewChild('autocompletecomponenent') autoCompleteObject: AutocompleteComponent;\r\n\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.SELECT_OPTIONS,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n private dropDownOptionsFormControl: UntypedFormControl = null;\r\n\r\n private multiSelectFormControl: FormControl = null;\r\n private _autoCompleteItemDataOptions: string[] = [];\r\n private derivedDropDownOptions: string[] = [];\r\n\n constructor(\r\n private flexibleSelectionFieldService: FlexibleSelectionFieldService,\r\n private formFieldService: FormFieldService,\r\n private currentSiteService: CurrentSiteService) {\r\n super();\r\n }\n\r\n // PJH - 2/27/2025 - For VNEXT-1644\r\n // Before adding this lifecycle method, the formGroup of a FlexFieldComponent was somehow cached such that when closing one FormInstance and\r\n // opening another the previous FormInstance's formGroup was present and populated with value(s)\r\n //\r\n // This led to some very bizarre behavior when a flex field was depending on a FolderName Meta Data field - it ended up passing\r\n // a payload to the server which included the id of the _previous_ form instance rather than the current one\r\n //\r\n // Making sure the formGroup gets destroyed (here) and recreated (when a new instance of the component is created) seems to have fixed this\r\n public ngOnDestroy(): void {\r\n this.controlData.formGroup = null;\r\n }\r\n\n public ngOnInit(): void {\r\n let hshProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshProperties);\r\n\r\n if (this.Mode === 'design') {\r\n // In case we have selected options, try\r\n // to make sense of our configuration.\r\n this.propertyUpdated(this.formField, 'selectOptions');\r\n }\r\n\r\n this.FormField.fieldHasConfiguration = true;\r\n this.rebuildDropDownOptionsData();\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeMultiText;\r\n\r\n // pharvey - 4/2/2024 - added for VNEXT-1231\r\n this.flexibleSelectionFieldService.AutoSelectFieldValuesSubject.subscribe(singleOptionsByFieldId => {\r\n this.handleUpdateOfFieldsWithOnlyOneOption(singleOptionsByFieldId);\r\n });\r\n\r\n this.dropdownPlaceHolderText = this.FormField.placeholderText;\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties =\r\n {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldProperties,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (FlexibleSelectionFormFieldComponent);\r\n }\r\n\r\n // A hash of the value(s) of all fields apart from fields in grids which are\r\n // contained in this.gridRowsImpactedBySelectionChange\r\n public get SelectedValuesByFieldId(): FieldIdToSelectedValues {\r\n return this.flexibleSelectionFieldService.SelectedValuesByFieldId;\r\n }\r\n\r\n public handleSingleSelectChange(event: any): void {\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n this.addChildFormInstanceElement(event);\r\n this.handleSelectionFieldValueChanged();\r\n }\r\n\r\n public handleMultiSelectChange(eventData: any): void {\r\n /*\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n for (let val of eventData.value) {\r\n this.addChildFormInstanceElement({ value: val });\r\n }\r\n\r\n let hashWithFormFieldAndFormInstanceElement = {\r\n formField: this.FormField,\r\n formInstanceElement: this.FormInstanceElement\r\n };\r\n\r\n // Added for VNEXT-1590 which reported a bug in which childFormInstanceValues\r\n // were not longer getting sent to the server for multi-select flex fields in\r\n // Grids. My guess is it's something to do with the upgrade to Angular 19 but long\r\n // and short of it is that FormFieldWrapper was not emitting mimickedNgModelChange\r\n // for multi selects, but it was for single selects. So here the event is emitted\r\n this.mimickedNgModelChange.emit(hashWithFormFieldAndFormInstanceElement);\r\n\r\n this.handleSelectionFieldValueChanged();\r\n */\r\n this.multiselectApplyUpdatedValues(eventData.value); // VNEXT-1623: fix a problem with deleting a multi-select chip per Joshua's insight.\r\n }\r\n\r\n // VNEXT-1623: fix a problem with deleting a multi-select chip per Joshua's insight.\r\n private multiselectApplyUpdatedValues(updatedValues: string[]): void {\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n for (let val of updatedValues) {\r\n this.addChildFormInstanceElement({ value: val });\r\n }\r\n\r\n let hashWithFormFieldAndFormInstanceElement = {\r\n formField: this.FormField,\r\n formInstanceElement: this.FormInstanceElement\r\n };\r\n\r\n // Added for VNEXT-1590 which reported a bug in which childFormInstanceValues\r\n // were not longer getting sent to the server for multi-select flex fields in\r\n // Grids. My guess is it's something to do with the upgrade to Angular 19 but long\r\n // and short of it is that FormFieldWrapper was not emitting mimickedNgModelChange\r\n // for multi selects, but it was for single selects. So here the event is emitted\r\n this.mimickedNgModelChange.emit(hashWithFormFieldAndFormInstanceElement);\r\n\r\n this.handleSelectionFieldValueChanged();\r\n }\r\n\r\n // Event handlers\r\n\r\n // 1) Creates one Child FormInstanceElement for each values in selectedValues\r\n // 2) Updates SelectedValuesByFieldId\r\n // 3) Triggers regular flex field selection change handling\r\n public handleAutoCompleteSelectionChange(selectedValues: string[]) {\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n for (let value of selectedValues) {\r\n let childEl = new FormInstanceElement();\r\n childEl.valueType = \"text\";\r\n childEl.textValue = value;\r\n childEl.parentFormInstanceElementId = this.FormInstanceElement.id;\r\n this.FormInstanceElement.childFormInstanceElements.push(childEl);\r\n\r\n // 02-27-2025 note: updated the following block of code to handle either single or multi-select flex fields.\r\n let controls = this.controlData.formGroup?.controls;\r\n if (value && controls) {\r\n let formGroupName = this.FormField.maxSelections > 1 ? this.multiSelectFormGroupName : this.singleSelectFormGroupName;\r\n let control: FormControl = controls[formGroupName];\r\n if (control == null)\r\n throw (`FlexibleSelectionFormFieldComponent.handleAutoCompleteSelectionChange(): could not find a form control with form group name '${formGroupName}'`);\r\n control.setValue(value);\r\n }\r\n }\r\n\r\n this.flexibleSelectionFieldService.SelectedValuesByFieldId[this.FormField.id] = selectedValues;\r\n\r\n this.handleSelectionFieldValueChanged();\r\n }\r\n\r\n private addChildFormInstanceElement(event: any) {\r\n let childElementForSingleValue = new FormInstanceElement();\r\n childElementForSingleValue.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n childElementForSingleValue.textValue = event.value;\r\n this.FormInstanceElement.childFormInstanceElements.push(childElementForSingleValue);\r\n this.FormInstanceElement.textValue = null;\r\n }\r\n\r\n public handleSelectionFieldValueChanged(): void {\r\n\r\n // use object assign to create a new instance based on the existing properties (so as not change the original object)\r\n let el = Object.assign(new FormInstanceElement(), this.getFormInstanceElement());\r\n el.childFormInstanceElements = el.childFormInstanceElements.filter(x => { return !x.isDeleted });\r\n if (this.FormInstanceElement != null) // 05-08-2024 note: this if block is necessary to make field conditional logic work properly.\r\n this.FormInstanceElement.childFormInstanceElements = el.childFormInstanceElements;\r\n el.formFieldId = this.formField.id;\r\n if (this.formInstance) {\r\n el.formInstanceId = this.FormInstance.id;\r\n\r\n let parentEl = this.formInstance.formInstanceElements.find(x => x.formFieldId == this.formField.dependsOnParentFormFieldId);\r\n\r\n // For further consideration: it may not be a sufficient to send only the parent's field's value\r\n // can this be done by simply sending this.FormInstance as was done in InlineContentFormFieldComponent.handleOpenContentButtonClick()?\r\n // and let the server climb \"up\" the chain of fields?\r\n // See comment on FlexibleSelectionFieldService.selectionFieldValueChanged() for why the parent value is needed\r\n // TODO: it should be possible to get rid of parentValues as we're using a different mechanism now\r\n let parentValues: FormInstanceElement[] = parentEl ? parentEl.childFormInstanceElements : null;\r\n this.flexibleSelectionFieldService.selectionFieldValueChanged(this.formField, this.formInstance, el, parentValues, this.GridRowId, this.GridColumnDefs).then(gridRowsImpacted => {\r\n this.gridRowsImpactedBySelectionChange = gridRowsImpacted;\r\n });\r\n\r\n }\r\n\r\n // 04-19-2024 note: need to notify the form renderer of a value change.\r\n super.handleOnBlur(); // Notifies the form renderer of a value change.\r\n }\n\r\n // Accessors\r\n public get IsSingleSelect(): boolean {\r\n return !this.FormField.maxSelections || this.FormField.maxSelections <= 1\r\n }\r\n /**\r\n * Indicates if the flex field can make multiple selections\r\n */\r\n public get IsMultiSelect(): boolean {\r\n return this.FormField.maxSelections > 1;\r\n }\r\n /**\r\n * Returns number of items that can be selected based on the form fields's property setting\r\n */\r\n public get MaxSelections(): number {\r\n return this.FormField.maxSelections;\r\n }\r\n public get IsAutoComplete() {\r\n return this.FormField.autocomplete;\r\n }\r\n\r\n public get GridRowsImpactedBySelectionChange(): boolean {\r\n return this.gridRowsImpactedBySelectionChange;\r\n }\r\n\r\n public get DefaultDropdownValueText(): string {\r\n return this.defaultText;\r\n }\r\n public get DropdownPlaceHolderText(): string {\r\n return this.dropdownPlaceHolderText;\r\n }\r\n public get ConfiguredOptions(): ConfiguredOption[] {\r\n return (this.configuredOptions);\r\n }\r\n\r\n public get SelectOptions(): string[] {\r\n return this.formField.selectOptions?.split(\"|\");\r\n }\r\n /***\r\n * Indicates if the maximum number of selections has been made.\r\n */\r\n public get MaxSelectionsReached(): boolean {\r\n return this.SelectedChips.length == this.FormField.maxSelections;\r\n }\r\n\r\n public get ShowRemoveAll(): boolean {\r\n return false;\r\n }\r\n\r\n public get DropDownOptions(): string[] {\r\n return (this.derivedDropDownOptions);\r\n }\r\n\r\n public get DropDownOptionsFormControl(): UntypedFormControl {\r\n return (this.dropDownOptionsFormControl);\r\n }\r\n\r\n public get SelectedChips() {\r\n return this.dropDownOptionsFormControl.value.filter(x => { return this.SelectOptions.indexOf(x) > -1 });\r\n }\r\n\r\n public get MultiSelectFormControl(): FormControl {\r\n return (this.multiSelectFormControl);\r\n }\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n if (this.FormInstanceElement.UserUpdatedData != true) {\r\n this.setDefaultTextSelectValue();\r\n }\r\n\r\n // Use a base class method to\r\n // set up a textual form group.\r\n this.setupTextFormGroup('flexible_selection_form');\r\n }\r\n }\r\n }\r\n\r\n public onRemove(option: string) {\r\n const options = this.multiSelectFormControl.value as string[];\r\n //this.removeFirst(options, option);\r\n FlexibleSelectionFormFieldComponent.removeFirst(options, option);\r\n this.multiSelectFormControl.setValue(options); // To trigger change detection\r\n\r\n this.multiselectApplyUpdatedValues(options); // VNEXT-1623: fix a problem with deleting a multi-select chip per Joshua's insight.\r\n }\r\n\r\n public removeAllChips() {\r\n this.multiSelectFormControl.setValue([]);\r\n }\r\n\r\n private static removeFirst(array: T[], toRemove: T): void {\r\n const index = array.indexOf(toRemove);\r\n if (index !== -1) {\r\n array.splice(index, 1);\r\n }\r\n }\r\n\r\n public openSelections() {\r\n this.multiSelect.open();\r\n this.selectionsOpen = true;\r\n }\r\n\r\n public get SelectionsOpen() {\r\n return this.selectionsOpen;\r\n }\r\n\r\n public multiSelectBlur() {\r\n this.handleValidationOnBlur();\r\n }\r\n\r\n public multiSelectClosed() {\r\n this.selectionsOpen = false;\r\n }\r\n\r\n public multiSelectOpened() {\r\n this.selectionsOpen = true;\r\n }\r\n\r\n public closeSelections() {\r\n this.multiSelect.close();\r\n this.selectionsOpen = false;\r\n }\r\n\r\n // Just yanked this out of dropdown component without really understanding it\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n if (this.IsSingleSelect) {\r\n this.SetupFormGroupFromWriteValue(this.singleSelectFormGroupName);\r\n this.FormInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeMultiText;\r\n\r\n // In addition to subscribing to this.flexibleSelectionFieldService.AutoSelectFieldValuesSubject in ngOnInit()\r\n // so as to listen for changes, we also need to \"get\" info auto select fields (those that only have one option)\r\n // This is needed for flex fields in GridRows which get initialized lazily and therefore don't get\r\n // the opportunity to subscribe in time to get useful updates\r\n this.handleUpdateOfFieldsWithOnlyOneOption(this.flexibleSelectionFieldService.AutoSelectFieldValues);\r\n\r\n // Added for VNEXT-1534\r\n if (this.autoCompleteObject != null) {\r\n var toPass: IAutoCompleteItemData[] = this.FormControl.value ? [this.FormControl.value] : [];\r\n\r\n this.autoCompleteObject.setIsRequired(this.FormField.required);\r\n this.autoCompleteObject.setData(toPass, true);\r\n this.autoCompleteObject.setFIE_ID(this.formField.id);\r\n this.autoCompleteObject.setHasStartsWith(this.formField.autocomplete_StartsWith);\r\n this.autoCompleteObject.setHasContains(this.formField.autocomplete_Contains);\r\n this.autoCompleteObject.setShowChipList(false);\r\n }\r\n\r\n } else if (this.IsMultiSelect) {\r\n // Added these from MultiDropDownFormFieldComponent.writeValueTriggered() - Rebuild my select options data.\r\n this.rebuildDropDownOptionsData();\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.setupMultiSelectFormControl();\r\n\r\n //console.log(this.autoCompleteObject);\r\n //console.log(this.SelectOptions);\r\n\r\n // NOTE: As of 12/11/2024 Auto Complete behavior DOES NOT WORK YET FOR Multi Selects\r\n if (this.autoCompleteObject != null && this.SelectOptions != null) {\r\n //console.log('this.IsMultiSelect')\r\n\r\n var toPass: IAutoCompleteItemData[] = [];\r\n\r\n this.SelectOptions.forEach(option => {\r\n\r\n if (this._autoCompleteItemDataOptions.includes(option)) {\r\n toPass.push({ item: option, selected: true } as IAutoCompleteItemData);\r\n }\r\n });\r\n\r\n this.autoCompleteObject.setIsRequired(this.FormField.required);\r\n this.autoCompleteObject.setData(toPass);\r\n this.autoCompleteObject.setFIE_ID(this.formField.id);\r\n this.autoCompleteObject.setHasStartsWith(this.formField.autocomplete_StartsWith);\r\n this.autoCompleteObject.setHasContains(this.formField.autocomplete_Contains);\r\n }\r\n }\r\n\r\n // PJH - 9/9/2024 - for VNEXT-1412 - set default values after initialization of\r\n // form controls\r\n this.handleSettingOfDefaultFields();\r\n }\r\n }\r\n }\r\n\r\n // Override notifyValueChanged in order to allow field conditional logic to trigger on a value change.\r\n protected notifyValueChanged(): void {\r\n // Make sure my form instance element is updated.\r\n /*\r\n if (this.IsSingleSelect) {\r\n this.handleSingleSelectChange({ value: this.FormInstanceElement.textValue });\r\n }\r\n */\r\n this.FormInstanceElement.childFormInstanceElements = [];\n this.addChildFormInstanceElement({ value: this.FormInstanceElement.textValue });\r\n\r\n // Now call super.\r\n super.notifyValueChanged();\r\n\r\n // Note: moving the code to super.handleOnBlur() into method handleSelectionFieldValueChanged(),\r\n // above, so that when this field notifies the form render of a value change, the field's\r\n // child form instance element value(s) have already been updated.\r\n //super.handleOnBlur();\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n // 07-31-2024 note: added this method so it can be called by the field conditional\r\n // logic to indicate that a component's form field has been updated.\r\n\r\n // Make sure the form control's disabled state agrees with the form field's 'isReadOnly' attribute.\r\n //\r\n // Plan to move some of the logic in the following if block into reusable FormFieldBaseComponent methods.\r\n if (this.FormControl != null) {\r\n this.FormControl.setValidators(this.FormField.required ? null : [Validators.required]);\r\n this.FormControl.updateValueAndValidity();\r\n\r\n // Set the read-only property.\r\n if (this.FormField.readOnly)\r\n this.FormControl.disable();\r\n else\r\n this.FormControl.enable();\r\n }\r\n }\r\n\r\n\r\n\r\n // Takes a dictionary of field values by field Id for those\r\n // fields which only have one option. If a value is found for this field then does the following:\r\n // 1) sets the value of the flex field's underlying data so the one\r\n // option becomes automatically selected\r\n // 2) calls handleSingleSelectChange() to mimic the behavior of a user\r\n // having the selected the value themselves\r\n private handleUpdateOfFieldsWithOnlyOneOption(singleOptionsByFieldId: FieldIdToSingleOption) {\r\n if (singleOptionsByFieldId) {\r\n let value = singleOptionsByFieldId[this.formField.id];\r\n let controls = this.controlData.formGroup?.controls;\r\n if (value && controls) {\r\n this.FormField.selectOptions = ` |${this.FormField.selectOptions}`; // provide a blank option in case options get \"stuck\"\r\n if (controls[this.singleSelectFormGroupName] && controls[this.singleSelectFormGroupName].value != value) {\r\n controls[this.singleSelectFormGroupName].setValue(value);\r\n this.handleSingleSelectChange({ value: value });\r\n }\r\n }\r\n }\r\n }\r\n\r\n private handleSettingOfDefaultFields() {\r\n let defaultValue = this.formField.defaultValue;\r\n if (!defaultValue) return;\r\n\r\n let controls = this.controlData.formGroup?.controls;\r\n let singleSelectControl = controls[this.singleSelectFormGroupName];\r\n let multiSelectionControl = controls[this.multiSelectFormGroupName];\r\n\r\n if (singleSelectControl && !singleSelectControl.value) {\r\n singleSelectControl.setValue(defaultValue);\r\n this.handleSingleSelectChange({ value: defaultValue });\r\n } else if (multiSelectionControl && multiSelectionControl.value.length == 0) {\r\n let defaultValues = defaultValue.split('|');\r\n multiSelectionControl.setValue(defaultValues);\r\n this.handleMultiSelectChange(defaultValues);\r\n }\r\n\r\n this.FormInstanceElement.UserUpdatedData = false;\r\n }\r\n\r\n private setupMultiSelectFormControl(): void {\r\n // Parse/package existing data, if any.\r\n var astrExistingValues: string[] = [];\r\n\r\n if (this.FormInstanceElement) {\r\n if (this.FormInstanceElement.childFormInstanceElements &&\r\n (this.FormInstanceElement.childFormInstanceElements.length > 0)) {\r\n for (let iChild: number = 0; iChild < this.FormInstanceElement.childFormInstanceElements.length; iChild++) {\r\n let childFormInstanceElement: FormInstanceElement =\r\n this.FormInstanceElement.childFormInstanceElements[iChild];\r\n\r\n astrExistingValues.push(childFormInstanceElement.textValue);\r\n this._autoCompleteItemDataOptions.push(childFormInstanceElement.textValue);\r\n }\r\n }\r\n }\r\n\r\n // Setup/configure my form control.\r\n let hshControlProperties = {\r\n value: astrExistingValues,\r\n disabled: this.ReadOnly //false\r\n }\r\n\r\n this.setupMultiSelectFormGroup(this.multiSelectFormGroupName, hshControlProperties);\r\n this.dropDownOptionsFormControl = this.controlData.formGroup.get(this.multiSelectFormGroupName);\r\n this.multiSelectFormControl = this.controlData.formGroup.get(this.multiSelectFormGroupName);\r\n this.formControlCreated.emit(this.multiSelectFormControl);\r\n\r\n //if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // this.multiSelectFormControl.valueChanges\r\n // .subscribe(astrValues => {\r\n // this.processSelectedValuesFromMutiSelect(astrValues);\r\n // });\r\n //}\r\n }\r\n\r\n\r\n\r\n private processSelectedValuesFromMutiSelect(passedValues: string[]) {\r\n if (!this.FormInstanceElement.childFormInstanceElements) {\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n }\r\n\r\n // See if any existing child elements\r\n // need to be marked as deleted.\r\n for (let iChildElement: number = 0; iChildElement < this.FormInstanceElement.childFormInstanceElements.length; iChildElement++) {\r\n let childFormInstanceElement: FormInstanceElement = this.FormInstanceElement.childFormInstanceElements[iChildElement];\r\n\r\n let arrFoundValue: string[] = passedValues.filter(v => v == childFormInstanceElement.textValue);\r\n let bValueFound: boolean = (arrFoundValue && (arrFoundValue.length == 1));\r\n\r\n if (!bValueFound) {\r\n childFormInstanceElement.isDeleted = true;\r\n }\r\n }\r\n\r\n // For any child element marked as deleted\r\n // that does not have an Id, just remove it.\r\n this.FormInstanceElement.childFormInstanceElements = this.FormInstanceElement.childFormInstanceElements.filter(fie => (fie.id > 0) || (!fie.isDeleted));\r\n\r\n // Update or add each value in the control.\r\n\r\n if (passedValues && (passedValues.length > 0)) {\r\n for (let iValue: number = 0; iValue < passedValues.length; iValue++) {\r\n let strValue: string = passedValues[iValue];\r\n\r\n // See if this value already exists as a child form instance element.\r\n let arrExistingChildFormInstanceElement: FormInstanceElement[] =\r\n this.FormInstanceElement.childFormInstanceElements.filter(fie => fie.textValue == strValue);\r\n\r\n if (arrExistingChildFormInstanceElement && (arrExistingChildFormInstanceElement.length == 1)) {\r\n let existingChildFormInstanceElement: FormInstanceElement = arrExistingChildFormInstanceElement[0];\r\n\r\n existingChildFormInstanceElement.isDeleted = false;\r\n } else {\r\n let childFormInstanceElement = new FormInstanceElement();\r\n childFormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeText;\r\n childFormInstanceElement.TextValue = strValue;\r\n\r\n this.FormInstanceElement.childFormInstanceElements.push(childFormInstanceElement);\r\n } // if-else\r\n } // for\r\n } // if\r\n\r\n // Did a user enter this value?\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n this.handleSelectionFieldValueChanged();\r\n }\r\n\r\n //***Populate the dropdown */\r\n private rebuildDropDownOptionsData(): void {\r\n this.derivedDropDownOptions = [];\r\n\r\n let placeHolderText = this.formField.placeholderText;\r\n\r\n // Evaulate select options.\r\n let arrDropDownOptions: string[] = this.SelectOptions;\r\n\r\n //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n if (!this.formField.autocomplete) {\r\n if (arrDropDownOptions && arrDropDownOptions.length > 0) {\r\n for (let iOption: number = 0; iOption < arrDropDownOptions.length; iOption++) {\r\n let dropDownOption: string = arrDropDownOptions[iOption];\r\n\r\n // If the last value is\r\n // a blank, do not add it.\r\n let bIsLastValue: boolean = (iOption === arrDropDownOptions.length - 1);\r\n\r\n if (bIsLastValue &&\r\n ((!dropDownOption) || (dropDownOption.trim() === ''))) {\r\n continue;\r\n }\r\n\r\n this.derivedDropDownOptions.push(dropDownOption);\r\n }\r\n } else {\r\n // Add a placeholder select option.\r\n this.derivedDropDownOptions.push('Set up options using properties');\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n /**\r\n * Determines if unselected items in Multi-Select Flex Field should be disabled.\r\n */\r\n public canDisableOption(optionValue: string): boolean {\r\n //***Disable option if MaxSelectionsReached=true & option hasn't been selected\r\n let disableCurrentOption: boolean = this.MaxSelectionsReached && this.SelectedChips.indexOf(optionValue) < 0;\r\n\r\n return disableCurrentOption;\r\n }\r\n}\r\n","export class FootnoteRowModel {\r\n public underLyingGridRowId: number;\r\n public identifier: string;\r\n public text: string;\r\n public isDeleted: boolean;\r\n}\r\n","import { IFormContentElement } from '../form-builder/grid-row.model';\r\n\r\n// Define a class used for serializing grid cell data.\r\nexport class GridCellDataForSerialization implements IFormContentElement {\r\n public id: number;\r\n\r\n public valueType: string;\r\n\r\n public intValue: number;\r\n public doubleValue: number;\r\n public decimalValue: number;\r\n public customValue: string;\r\n public textValue: string;\r\n public booleanValue: boolean;\r\n\r\n public childFormInstanceElements: GridCellDataForSerialization[];\r\n};\r\n","\r\n
\r\n
{{this.FootnotesTitle}}
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n

The footnote form field '{{this.Mode}}' mode is not yet implemented.

\r\n
\r\n\r\n\r\n
\r\n \r\n \r\n \r\n
{{this.FootnotesTitle}}
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { ControlType, ValidationInfo, ValidationMessageInfo, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { GridRowViewModel } from '../../../models/form-builder/grid-row.model';\r\nimport { FootnoteRowModel } from '../../../models/form-builder/footnote-row.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridCellDataForSerialization } from '../../../models/grid/grid-cell-data.model';\r\nimport {\r\n IntegerFieldType,\r\n RichTextFieldType,\r\n ShortTextFieldType\r\n} from '../../../models/form-builder/form-field-types';\r\nimport { Validators, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { Keys } from '@progress/kendo-angular-common';\r\nimport { CellClickEvent, CellCloseEvent, EditEvent, CommandColumnComponent } from '@progress/kendo-angular-grid';\r\n\r\n// Define an internally used class.\r\nclass ChildFormFieldAttribute {\r\n public fieldDefinitionClassName: string;\r\n\r\n public name: string;\r\n public displayName: string;\r\n\r\n public valueType: string;\r\n}\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngModel)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-footnote-form-field',\n templateUrl: './footnote-form-field.component.html',\n styleUrls: ['./footnote-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: FootnoteFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class FootnoteFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldNames: string[] =\r\n [\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.FORM_INSTANCE_SERVICE_REQUIRED, //TEAMS-424: KLW - Needed for the Form Renderer\r\n ];\r\n\r\n // (Some of these properties get confusing - it's not always easy to see how they are distguished from the base class's prperties like this.FormInstanceElement)\r\n // PJH - it's not clear how this is used or what role it plays\r\n private gridFormField: FormField = null;\r\n // PJH - gets initialized in ngOnit with empty childGridRows array, which will hold the foonotes. This array is then populated in\r\n // writeValueTriggered() on form load. This property is the [(ngModel)] for the HTML template's - so at the end\r\n // of the day, it is this that needs to get populated with grid rows\r\n // This FormInstanceElement is distinct from FormFieldBase's FormInstanceElement property and on save, values have to get copied to the base class\r\n private gridFormInstanceElement: FormInstanceElement = null;\r\n // PJH - I see this getting set in the GridFormInstanceElement setter, but I don't see it being used for anything\r\n private updatedGridFormInstanceElement: FormInstanceElement = null;\r\n // PJH - this is used (at least) to set information on the FormInstanceElement which contains the data for this footnote field\r\n private gridComponent: FormFieldBaseComponent = null;\r\n // The store of data to which the KendoGrid instanceis bound\r\n private footnotesForKendoGrid: FootnoteRowModel[];\r\n\r\n private editOfRowInProgress: boolean = false;\r\n\r\n private readonly gridChildFormFieldsAttributes: ChildFormFieldAttribute[] =\r\n [\r\n {\r\n fieldDefinitionClassName: ShortTextFieldType,\r\n name: 'c0',\r\n displayName: 'Id',\r\n valueType: 'text'\r\n },\r\n {\r\n fieldDefinitionClassName: ShortTextFieldType,\r\n name: 'c1',\r\n displayName: 'Text',\r\n valueType: 'text'\r\n }\r\n ];\r\n\r\n // Constructor.\r\n public constructor(private formBuilder: UntypedFormBuilder) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshOnInitProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldNames,\r\n\r\n saveConfigurationRequired: true,\r\n saveDataRequired: true,\r\n\r\n isFootnote: true\r\n };\r\n\r\n return (hshOnInitProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n if ((this.mode === 'design') ||\r\n (this.mode === 'preview') ||\r\n (this.mode === 'instance')) {\r\n // Build my form field definition.\r\n this.gridFormField = new FormField();\r\n this.gridFormField.isFootnote = true; // Added 05-13-2022.\r\n this.gridFormField.childFormFields = [];\r\n\r\n for (let iChildFF: number = 0; iChildFF < this.gridChildFormFieldsAttributes.length; iChildFF++) {\r\n let childFFAttrs: ChildFormFieldAttribute = this.gridChildFormFieldsAttributes[iChildFF];\r\n\r\n let childFormField: FormField = new FormField();\r\n childFormField.fieldDefinitionClassName = childFFAttrs.fieldDefinitionClassName;\r\n childFormField.name = childFFAttrs.name;\r\n childFormField.displayName = childFFAttrs.displayName;\r\n this.gridFormField.childFormFields.push(childFormField);\r\n }\r\n\r\n // If they have not been added, add my child form fields to my form field.\r\n let myFormField: FormField = this.FormField;\r\n\r\n if ((!myFormField.childFormFields) || (myFormField.childFormFields.length == 0)) {\r\n myFormField.childFormFields = this.gridFormField.childFormFields;\r\n }\r\n this.gridFormInstanceElement = new FormInstanceElement();\r\n this.gridFormInstanceElement.childGridRows = []; \r\n }\r\n\r\n // Let my container know my properties.\r\n let hshOnInitProperties = this.getProperties();\r\n this.onInit.emit(hshOnInitProperties);\r\n\r\n return;\r\n }\r\n\r\n /* Kendo Grid Event Handlers */\r\n public handleEditRow(args: any) {\r\n if (this.ignoreEditEvent(args)) return;\r\n\r\n let fg = this.createFormGroupForFootnoteRowModel(args.dataItem);\r\n args.sender.editRow(args.rowIndex, fg);\r\n }\r\n\r\n public handleAddOrUpdate(event) {\r\n if (event.isNew) {\r\n if (!this.footnotesForKendoGrid) this.footnotesForKendoGrid = [];\r\n this.footnotesForKendoGrid.push(event.dataItem);\r\n this.handleCancel(event);\r\n } else {\r\n let savedItem = this.footnotesForKendoGrid.find(x => { return x.identifier == event.dataItem.identifier}); // Better to do this by position/order\r\n console.log(savedItem);\r\n savedItem.identifier = event.formGroup.value.identifier;\r\n savedItem.text = event.formGroup.value.text;\r\n console.log(savedItem);\r\n this.handleCancel(event);\r\n }\r\n }\r\n\r\n public handleRemove(event) {\r\n let footnote = this.footnotesForKendoGrid.filter(x => { return !x.isDeleted })[event.rowIndex];\r\n footnote.isDeleted = true;\r\n }\r\n\r\n public addRowToUI(args) {\r\n let newFootnote = new FootnoteRowModel();\r\n // set a default identifier\r\n newFootnote.identifier = args.sender.data.data.length + 1;\r\n args.sender.addRow(this.createFormGroupForFootnoteRowModel(newFootnote));\r\n }\r\n\r\n public handleCancel(event) {\r\n event.sender.closeRow(event.rowIndex);\r\n }\r\n\r\n // Override the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (FootnoteFormFieldComponent);\r\n }\r\n\r\n // Define accessor methods.\r\n public get FootnoteData() {\r\n if (this.footnotesForKendoGrid)\r\n return this.footnotesForKendoGrid.filter(x => { return !x.isDeleted });\r\n }\r\n\r\n public get HasDesignConfiguration(): boolean {\r\n let bHasConfig: boolean =\r\n (this.Mode === 'design') &&\r\n (this.gridFormField && this.gridFormField.childFormFields) &&\r\n (this.gridFormField.childFormFields.length > 0);\r\n\r\n return (bHasConfig);\r\n }\r\n\r\n public get HasPreviewInstanceConfiguration(): boolean {\r\n let bHasConfig: boolean =\r\n ((this.Mode == 'preview') || (this.Mode == 'instance')) &&\r\n (this.gridFormField && this.gridFormField.childFormFields) &&\r\n (this.gridFormField.childFormFields.length > 0);\r\n\r\n return (bHasConfig);\r\n }\r\n\r\n public get FootnotesTitle(): string {\r\n let count = this.FootnoteData ? this.FootnoteData.length : 0;\r\n return `Footnotes for ${this.DisplayName} (${count})`;\r\n }\r\n \r\n protected formInstanceElementReceived(): void {\r\n throw \"Footnote.formInstanceElementReceived() NOT IMPLEMENTED\";\r\n }\r\n\r\n // This is called on form load, \r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n this.populateFootnotesForKendoGrid();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // This gets called from FormRenderer via FormFieldWrapper when a Form Instance is saved\r\n public saveData(hshComponentDataToSave: any): void {\r\n if (!(this.footnotesForKendoGrid?.length > 0)) return;\r\n\r\n this.FormInstanceElement.childFootnoteRows = [];\r\n this.FormInstanceElement.totalFootnoteRows = this.footnotesForKendoGrid.length;\r\n\r\n // For each Kendo Footnote, convert it into a GridRowViewModel which FormRenderer and the backend knows how to deal with \r\n for (let footnote of this.footnotesForKendoGrid) {\r\n let gridRowVM = new GridRowViewModel();\r\n gridRowVM.id = footnote.underLyingGridRowId;\r\n gridRowVM.isDeleted = footnote.isDeleted;\r\n gridRowVM.cellDataHash = {};\r\n\r\n let identifierGridCell = new GridCellDataForSerialization();\r\n identifierGridCell.valueType = 'text';\r\n identifierGridCell.textValue = footnote.identifier;\r\n gridRowVM.cellDataHash['c0'] = identifierGridCell;\r\n\r\n let textGridCell = new GridCellDataForSerialization();\r\n textGridCell.valueType = 'text';\r\n textGridCell.textValue = footnote.text;\r\n gridRowVM.cellDataHash['c1'] = textGridCell;\r\n \r\n this.FormInstanceElement.childFootnoteRows.push(gridRowVM);\r\n }\r\n }\r\n \r\n private createFormGroupForColumn(columnIndex: number, dataItem: FootnoteRowModel): UntypedFormGroup {\r\n if (columnIndex == 0) {\r\n return this.formBuilder.group({\r\n identifier: dataItem.identifier\r\n });\r\n } else if (columnIndex == 1) {\r\n return this.formBuilder.group({\r\n text: dataItem.text\r\n });\r\n }\r\n }\r\n\r\n private createFormGroupForFootnoteRowModel(dataItem: FootnoteRowModel): UntypedFormGroup {\r\n return this.formBuilder.group({\r\n identifier: dataItem.identifier,\r\n text: dataItem.text\r\n });\r\n }\r\n\r\n // On form load, converts FormInstanceElement.childFootnoteRows into FootnoteRowModel's which Kendo Grid works with\r\n private populateFootnotesForKendoGrid() {\r\n if (this.FormInstanceElement.childFootnoteRows) {\r\n let newGridFIE: FormInstanceElement = new FormInstanceElement();\r\n newGridFIE.id = this.gridFormInstanceElement.id;\r\n newGridFIE.formFieldId = this.gridFormInstanceElement.formFieldId;\r\n newGridFIE.childGridRows = this.FormInstanceElement.childFootnoteRows;\r\n newGridFIE.totalChildGridRows = this.FormInstanceElement.totalFootnoteRows;\r\n\r\n this.gridFormInstanceElement = newGridFIE;\r\n\r\n // New for Kendo\r\n if (this.footnotesForKendoGrid == null) {\r\n this.footnotesForKendoGrid = [];\r\n }\r\n\r\n // Convert the incoming childFootnoteRows which are GridRowViewModels into FootnoteRowModel which the Kendo grid deals with\r\n for (let footnote of this.FormInstanceElement.childFootnoteRows) {\r\n let footnoteRow = new FootnoteRowModel();\r\n footnoteRow.underLyingGridRowId = footnote.id;\r\n footnoteRow.identifier = footnote.cellDataHash['c0'].textValue;\r\n footnoteRow.text = footnote.cellDataHash['c1'].textValue;\r\n this.footnotesForKendoGrid.push(footnoteRow);\r\n }\r\n }\r\n }\r\n\r\n // Sometimes, when you click on an icon in the command column, it triggers events you don't want to handle \r\n private ignoreEditEvent(args: any) {\r\n return args.column instanceof CommandColumnComponent || args.rowIndex < 0;\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n AfterViewInit,\r\n OnDestroy,\r\n Input,\r\n ComponentFactoryResolver,\r\n ViewContainerRef,\r\n Type as AngularCoreType,\r\n ComponentRef,\r\n SimpleChanges,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n AsyncValidatorFn,\r\n UntypedFormGroup,\r\n UntypedFormControl,\r\n Validators,\r\n ValidatorFn,\r\n AbstractControl,\r\n FormGroup\r\n //ValidationErrors\r\n} from '@angular/forms'; // Used for Reactive Forms\r\n\r\n\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model'; //TEAMS-424\r\n\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { Logging } from '../../../logging';\r\nimport { FormModeEnum } from '../../../enums/form-mode.enum';\r\nimport { IFieldNameToFormField, IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\n//import { decode } from 'punycode';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormInstance } from '../../../models/site-content/form-instance.model';\r\nimport { CascadingDropDownFieldType, CheckboxFieldType, CurrencyFieldType, DecimalFieldType, DropDownFieldType, EditorNameFieldType, LastEditedDateFieldType, FlexibleSelectionFieldType, GridCascadingDropDownFieldType, HTMLLinkFieldType, IntegerFieldType, ParagraphFieldType, RadioButtonsFieldType, RichTextFieldType, ShortTextFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { KendoGridBaseComponent } from '../kendo-grid-base/kendo-grid-base.component';\r\n\r\n// Define data structures, enums used with Reactive Forms.\r\n// Define a data structure that can be used for validation with Reactive Forms.\r\nexport class ValidationInfo {\r\n DISPLAY_NAME: string = null;\r\n IS_CUSTOM_REGULAR_EXPRESSION: boolean = false;\r\n REGULAR_EXPRESSION: RegExp = null; // pharvey - 1/31/2024 - changed type from string to RegExp - it was unreliable as string and Validators.pattern expects a RegEx\r\n ERROR_MESSAGE: string = null;\r\n}\r\n\r\nexport enum ControlType {\r\n TEMPLATE = 'Template',\r\n REACTIVE_FORMS = 'Reactive Forms'\r\n};\r\n\r\nexport class ValidationMessageInfo {\r\n type: string = null;\r\n message: string = null;\r\n}\r\n// End data structures, enums used with Reactive Forms.\r\n\r\n// Define a field name to component hash/map type.\r\nexport interface IFieldNameToComponent {\r\n [fieldName: string]: FormFieldBaseComponent;\r\n}\r\n\r\n// Define a field name to form field hash/map type.\r\n/*\r\nexport interface IFieldNameToFormField {\r\n [fieldName: string]: FormField;\r\n}\r\n*/\r\n// Define an interface for providing display hints.\r\nexport interface IFormFieldDisplayHint {\r\n [hintName: string]: any;\r\n}\r\n// End display hint interface definition.\r\n\r\n// ControlValueAccessor IMPORTANT\r\n// allows FormField classes to implement support ngmodel on formfieldwrapper\r\n// listen for model changes\r\n// hand in hand\r\n\r\nclass OnFocusData {\r\n public registeringComponent: IFormFieldComponent = null;\r\n public fnOnFocus = (registeringComponent: IFormFieldComponent, componentWithFocus: IFormFieldComponent, focusEvent: FocusEvent) => { };\r\n}\r\n\r\n// Define internally used classes.\r\nclass FormFieldBaseCallbackFunctions {\r\n public fnPropagateChanges = (_ignored: any) => { }; // Initial, NOOP function.\r\n public fnOnTouched = () => { }; // Initial, NOOP function.\r\n //public fnOnFocus = (formFieldComponent: FormFieldBaseComponent, event: FocusEvent): void => { }; // Initial, NOOP function.\r\n //public fnOnFocus = (_ignored1: any, _ignored2: any) => { }; // Initial, NOOP function.\r\n public onFocus: OnFocusData = new OnFocusData();\r\n}\r\n\r\nclass FormFieldBaseControlData {\r\n public formControl: UntypedFormControl = null; // This is used for form field components that use a single Reactive Form FormControl instance (most).\r\n public formGroup: UntypedFormGroup = null; // This will/would be used for form field components that use multiple Reactive Form FormControl instances (few if any).\r\n public arrValidationMessages: ValidationMessageInfo[] = [];\r\n public controlType: string = ControlType.REACTIVE_FORMS;\r\n public ngOnInitExecuted: boolean = false;\r\n}\r\n// class FormFieldBaseFlags {\r\n// public bSelectOptionsParsed: boolean = false;\r\n// public bViewInitialized: boolean = false;\r\n// public bSetFocusPending: boolean = false;\r\n// }\r\n\r\nclass FormFieldBaseFlags {\r\n public bSelectOptionsParsed: boolean = false;\r\n public bViewInitialized: boolean = false;\r\n public bSetFocusPending: boolean = false;\r\n\r\n public writeValueForFormInstanceElementCalled: boolean = false;\r\n public formInstanceElementReceivedCalled: boolean = false;\r\n}\r\n\r\n@Component({\n selector: 'app-form-field-base',\n templateUrl: './form-field-base.component.html',\n styleUrls: ['./form-field-base.component.scss'],\n standalone: false\n})\r\n// Why is FormFieldBaseComponent extending KendoGridBaseComponent?\r\n// This means that every FormFieldComponant \"is a\" KendoGridBaseComponent which doesn't sound right\r\n// Would it be better to use composition to enable different uses of KendoGrid to share functionality rather than inheritance? Like, there could be a KendoGridHelper class or something\r\nexport abstract class FormFieldBaseComponent extends KendoGridBaseComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, IFormFieldComponent {\r\n // Inputs shared by all form fields.\r\n\r\n // New for VNEXT-772 (Dynamic Row Sizing in Grid Form Field)\r\n @Input() fieldIsInGrid: boolean;\r\n // New for VNEXT-1135 (flexible selection fields)\r\n @Input() gridRowId: number;\r\n @Input() gridColumnDefs: FormField[];\r\n\r\n @Input() formField: FormField = null;\r\n //@Input() mode: string = null;\r\n @Input() mode: string = FormModeEnum.DESIGN; // Merely a default.\r\n @Input() readOnly: boolean = false;\r\n @Input() displayHints: IFormFieldDisplayHint = {};\r\n @Input() revealValidationErrors: boolean = false;\r\n @Input() formInstance: FormInstance; // added 1/31/2023 for VNEXT-562\r\n @Input() useGridSpecificStyling: boolean = false;\r\n\r\n //VNEXT-811: KLW - Needed for emailing contacts\r\n @Input() formInstanceName: string = '';\r\n @Input() canEditProperties: boolean = false; // VNEXT-1619: within the new HTML-edit-only mode, many field properties cannot be edited.\r\n\r\n @Output() invalid = new EventEmitter();\r\n @Output() touched = new EventEmitter();\r\n @Output() displayError = new EventEmitter();\r\n @Output() formFieldValidated = new EventEmitter();\r\n //TEAMS-838: KLW - When the form control of a form field has been created, emit that its form control is ready to be used\r\n @Output() formControlCreated = new EventEmitter();\r\n\r\n //VNEXT-610: KLW - Name for the custom validator for white space\r\n public wsValidatorName = 'whitespace';\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n public rmacValidatorName = 'requireMatchAutoComplete';\r\n\r\n // Define the component's form instance element,\r\n // the structure that contains its value. \r\n private formInstanceElement: FormInstanceElement = new FormInstanceElement();\r\n\r\n // Define a propagate changes property, initially a NOOP function\r\n // that Angular can replace with a different function to allow it\r\n // to propagate changes using its forms API, e.g. [(ngMode)] bindings.\r\n /*\r\n private fnPropagateChanges = (_ignored: any) => { }; // Initial, NOOP function.\r\n private fnOnTouched = () => { }; // Initial, NOOP function.\r\n private fnOnFocus = (event: FocusEvent) => { }; // Initial, NOOP function.\r\n */\r\n private callbackFunctions: FormFieldBaseCallbackFunctions = new FormFieldBaseCallbackFunctions();\r\n\r\n // Define properties used with Reactive Forms.\r\n /*\r\n private formControl: FormControl = null; // This is used for form field components that use a single Reactive Form FormControl instance (most).\r\n private formGroup: FormGroup = null; // This will/would be used for form field components that use multiple Reactive Form FormControl instances (few if any).\r\n private arrValidationMessages: ValidationMessageInfo[] = [];\r\n private controlType: string = ControlType.REACTIVE_FORMS;\r\n */\r\n protected controlData: FormFieldBaseControlData = new FormFieldBaseControlData();\r\n //protected formValidationFailed: boolean = false; // 01-20-2023: added this property during troubleshooting.\r\n // End properties used with Reactive Forms.\r\n\r\n // Define properties used for selection list\r\n // components like drop-down lists, radio button groups.\r\n /*\r\n private bSelectOptionsParsed: boolean = false;\r\n //private arrSelectOptions: string[] = null; // 05-06-2022 note: it appears that this property is not being used.\r\n // End properties used for selection list components.\r\n\r\n // Define properties related to view creation, focus.\r\n private bViewInitialized: boolean = false;\r\n private bSetFocusPending: boolean = false;\r\n */\r\n private flags: FormFieldBaseFlags = new FormFieldBaseFlags();\r\n // End properties related to view creation, focus.\r\n\r\n // Define a private component Id, useful in debugging.\r\n private static iNextComponentId: number = 1;\r\n private iComponentId: number;\r\n\r\n private textValueOnInitialSetup: string;\r\n\r\n protected fieldHasValidationError: boolean = false;\r\n\r\n // constructor.\r\n public constructor() {\r\n super();\r\n this.iComponentId = FormFieldBaseComponent.iNextComponentId++;\r\n\r\n return;\r\n }\r\n\r\n // Define abstract methods.\r\n public getFormField(): FormField {\r\n return (this.FormField);\r\n }\r\n public getFormInstanceElement(): FormInstanceElement {\r\n return (this.formInstanceElement);\r\n }\r\n\r\n public abstract getProperties(): any;\r\n protected getStandardPropertyNames(): string[] {\r\n let standardPropertyNames: string[] = [FormFieldPropertyEnum.NAME];\r\n\r\n return (standardPropertyNames);\r\n }\r\n\r\n public abstract getFormFieldClass(): AngularCoreType;\r\n\r\n protected setRedBorderManually(): void {\r\n // currently noop, but this could emit an event if needed\r\n return;\r\n }\r\n\r\n // Note: the following two methods related to field conditional logic.\r\n public formFieldUpdated(): void {\r\n // 03-14-2024 note: added this method so it can be calld by the field conditional\r\n // logic to indicate that a component's form field has been updated.\r\n\r\n // This default implementation is a NOOP by design.\r\n // Update: trying to use the following code to support grid column form fields as conditional logic targets.\r\n this.writeValueTriggered();\r\n }\r\n public isCompoundObjectComponent(): boolean {\r\n // Note: this method is also used in apply conditional logic.\r\n return false;\r\n }\r\n public applyFilter(filterValue: string, filterOperator: string, childFieldName: string): void {\r\n // This default implementation is a NOOP by design.\r\n }\r\n public resetConditionalLogicSettings(): void {\r\n // Note: this method is a NOOP by default.\r\n }\r\n public applyChildFieldAttributes(childFieldName: string, showChildField: boolean, childFieldIsReadOnly: boolean, childFieldIsRequired: boolean): void {\r\n // Note: this method is a NOOP by default.\r\n }\r\n\r\n // When revealValidationErrors is set to true it forces display of errors even if the field is\r\n // not dirty or touched. It's set to true when saving a form that contains validation errors and causes\r\n // all validation messages to be revealed next to their respective fields\r\n // If this is false \r\n public getValidationErrors(revealValidationErrors: boolean = false): string[] {\r\n let formField = this;\r\n\r\n if (formField?.FormControl == null) {\r\n return [];\r\n }\r\n\r\n let errorMessages: string[] = [];\r\n let errorFound = false;\r\n for (let validationMessage of formField.ValidationMessages) {\r\n var errors = formField.controlData.formControl.errors;\r\n\r\n if (errors) {\r\n Object.keys(errors).forEach(error => {\r\n if (error == validationMessage.type) {\r\n errorMessages.push(validationMessage.message);\r\n errorFound = true;\r\n }\r\n\r\n });\r\n }\r\n }\r\n this.fieldHasValidationError = errorFound;\r\n\r\n //if (formField.formControl?.dirty || formField.formControl?.touched || revealValidationErrors) {\r\n if (formField.controlData.formControl?.dirty || formField.controlData.formControl?.touched || revealValidationErrors) {\r\n return errorMessages;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n // NOTE: this method is essentially a NOOP by design.\r\n return (\"\");\r\n }\r\n\r\n // Define additional methods that all\r\n // form field components implement.\r\n public hasNumericData(): boolean {\r\n return (false); // A default that applies to most form field classes.\r\n }\r\n public getNumericValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): number {\r\n return (0); // A default that applies to most form field classes.\r\n }\r\n /*\r\n public dependsOnFormField(formFieldComponent: IFormFieldComponent): boolean {\r\n return (false); // A default that applies to most form field classes.\r\n }\r\n */\r\n public hasCalculatedValue(): boolean {\r\n return (false); // A default that applies to most form field classes.\r\n }\r\n\r\n // 04-05-2022 note: added the following method with default behavior.\r\n //\r\n // Please see notes in method setupTextControl() in\r\n // this file/class.\r\n public get substantivelyChangedLogicApplies(): boolean {\r\n return false;\r\n }\r\n\r\n public get FieldIsInGrid(): boolean {\r\n return this.fieldIsInGrid;\r\n }\r\n\r\n public get GridRowId(): number {\r\n return this.gridRowId;\r\n }\r\n\r\n public get GridColumnDefs(): FormField[] {\r\n return this.gridColumnDefs;\r\n }\r\n\r\n public get FieldHasValidationError() {\r\n return this.fieldHasValidationError;\r\n }\r\n\r\n public CheckFieldForValidation() {\r\n if (this.FormControl) {\r\n this.FormControl.markAsTouched();\r\n this.FormControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n public get HasInstructions(): boolean {\r\n return !!this.FormField.instructionsText?.length;\r\n }\r\n\r\n public setFocus(): void {\r\n if (!this.flags.bViewInitialized) {\r\n this.flags.bSetFocusPending = true;\r\n } else {\r\n this.doSetFocus();\r\n }\r\n\r\n return;\r\n }\r\n protected doSetFocus(): void { // NOTE: WILL MAKE THIS METHOD ABSTRACT.\r\n return;\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n // Note: this simplistic, default implementation does not adequately address the \r\n // needs of all form field classes as it is the responsibility of form field\r\n // component classes to implement this either via a base class or directly.\r\n elementWrapper.formInstanceElement.TextValue = value;\r\n elementWrapper.standinDisplayValue = value;\r\n if (!elementWrapper.formInstanceElement.valueType) {\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n }\r\n }\r\n\r\n protected generateUniqueId(rootText: string): string {\r\n let randomNumber: number = Math.floor(Math.random() * 100000);\r\n\r\n let uniqueId: string = `${rootText}-${randomNumber}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n protected viewHasInitialized(): void {\r\n //if (this.bSetFocusPending) {\r\n if (this.flags.bSetFocusPending) {\r\n // Note: found that setting the focus immediately was not working,\r\n // so adding a tiny delay before calling setFocus().\r\n //this.doSetFocus();\r\n setTimeout(() => {\r\n this.doSetFocus();\r\n }, 0);\r\n\r\n //this.bSetFocusPending = false;\r\n this.flags.bSetFocusPending = false;\r\n }\r\n\r\n //this.bViewInitialized = true;\r\n this.flags.bViewInitialized = true;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n this.controlData.ngOnInitExecuted = true;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // Call the viewHasInitialized() method. \r\n this.viewHasInitialized();\r\n\r\n return;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n // TO DO: free resources.\r\n\r\n return;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges) {\r\n }\r\n\r\n //TEAMS-424: KLW - Add default properties to all Form Fields\r\n public get DefaultProperties(): string[] {\r\n return [FormFieldPropertyEnum.HAS_FOOTNOTE];\r\n }\r\n\r\n // Define accessor methods.\r\n /*\r\n public get FormModeDesign(): string {\r\n return (FormModeEnum.DESIGN);\r\n }\r\n public get FormModePreview(): string {\r\n return (FormModeEnum.PREVIEW);\r\n }\r\n public get FormModeInstance(): string {\r\n return (FormModeEnum.INSTANCE);\r\n }\r\n */\r\n public get IsInDesignMode(): boolean {\r\n return (this.mode === FormModeEnum.DESIGN);\r\n }\r\n public get IsInPreviewMode(): boolean {\r\n return (this.mode === FormModeEnum.PREVIEW);\r\n }\r\n public get IsInInstanceMode(): boolean {\r\n return (this.mode === FormModeEnum.INSTANCE);\r\n }\r\n public get IsInPreviewOrInstanceMode(): boolean {\r\n return (\r\n (this.mode === FormModeEnum.PREVIEW) ||\r\n (this.mode === FormModeEnum.INSTANCE)\r\n );\r\n }\r\n\r\n public get ControlType(): string {\r\n //return (this.controlType);\r\n return this.controlData.controlType;\r\n }\r\n\r\n public get FormControl(): UntypedFormControl {\r\n //return (this.formControl);\r\n return this.controlData.formControl;\r\n }\r\n // pharv - 11/3/2021 - added in support of date form field validation\r\n public set FormControl(formControl: UntypedFormControl) {\r\n //this.formControl = formControl\r\n this.controlData.formControl = formControl\r\n }\r\n\r\n public get FormGroup(): FormGroup {\r\n return this.controlData.formGroup;\r\n }\r\n\r\n public get ValidationMessages(): ValidationMessageInfo[] {\r\n //return (this.arrValidationMessages);\r\n return this.controlData.arrValidationMessages;\r\n }\r\n\r\n // Note: the following getter method is a default that\r\n // can be overridden, e.g.by LabelFormFieldComponent.\r\n public get CanBeReadOnly(): boolean {\r\n return true;\r\n }\r\n // End methods used with Reactive Forms.\r\n\r\n // HTML accessor methods.\r\n public get FormField(): FormField {\r\n return (this.formField);\r\n }\r\n public set FormField(value: FormField) {\r\n this.formField = value;\r\n }\r\n\r\n public get FieldDefinitionClassName(): string {\r\n if (this.FormField != null)\r\n return (this.FormField.fieldDefinitionClassName);\r\n else\r\n return '';\r\n }\r\n\r\n public get InternalName(): string {\r\n return this.FormField.name;\r\n }\r\n public get DisplayName(): string {\r\n return (this.FormField.displayName ? this.FormField.displayName : this.FormField.name);//'Display Name');\r\n }\r\n\r\n public get ReadOnly(): boolean {\r\n let bResult: boolean = false;\r\n\r\n //return (this.readOnly || this.formField.readOnly);\r\n if (this.readOnly === true) {\r\n bResult = true;\r\n } else if (this.FormField?.readOnly === true) {\r\n bResult = true;\r\n }\r\n\r\n return (bResult);\r\n }\r\n public get UseGridSpecificStyling(): boolean {\r\n return this.useGridSpecificStyling;\r\n }\r\n\r\n public get PlaceholderText(): string {\r\n return (this.FormField.placeholderText ? this.FormField.placeholderText : '');\r\n }\r\n\r\n public get HasTooltipText(): boolean {\r\n let bHasTooltip: boolean =\r\n (this.FormField && this.FormField.toolTip && (this.FormField.toolTip.trim() != ''));\r\n\r\n return (bHasTooltip);\r\n }\r\n\r\n public get TooltipText(): string {\r\n return (this.FormField.toolTip ? this.FormField.toolTip : '');\r\n }\r\n\r\n public get DefaultValue(): string {\r\n return (this.FormField.defaultValue ? this.FormField.defaultValue : '');\r\n }\r\n\r\n public get ComponentHasInitialized(): boolean {\r\n return this.controlData.ngOnInitExecuted;\r\n }\r\n public get Mode(): string {\r\n return (this.mode);\r\n }\r\n\r\n public get CanEditProperties(): boolean {\r\n return this.canEditProperties;\r\n }\r\n\r\n public get FormInstanceElement(): FormInstanceElement {\r\n return (this.formInstanceElement);\r\n }\r\n\r\n public get FormInstance(): FormInstance {\r\n return this.formInstance;\r\n }\r\n\r\n public set FormInstanceElement(formInstanceElementParam: FormInstanceElement) {\r\n // Note: this method is a NOOP by design.\r\n\r\n return;\r\n }\r\n\r\n public get DispayHints(): IFormFieldDisplayHint {\r\n return (this.displayHints);\r\n }\r\n\r\n public get ShowLabel(): boolean {\r\n let bShowLabel: boolean = true;\r\n\r\n if (this.displayHints) {\r\n if (this.displayHints[\"showLabel\"] === false) {\r\n bShowLabel = false;\r\n }\r\n }\r\n\r\n return (bShowLabel);\r\n }\r\n\r\n /*\r\n static ParseSelectOptions(formField: FormField): string[] {\r\n let arrSelectOptions: string[] = [];\r\n\r\n if ((formField.selectOptions !== undefined) &&\r\n (formField.selectOptions !== null) &&\r\n (formField.selectOptions.trim() !== '')) {\r\n arrSelectOptions = formField.selectOptions.split('|');\r\n }\r\n\r\n return (arrSelectOptions);\r\n }\r\n */\r\n\r\n get SelectOptions(): string[] {\r\n let arrSelectOptions: string[] = [];\r\n\r\n //if (!this.bSelectOptionsParsed) {\r\n if (!this.flags.bSelectOptionsParsed) {\r\n /*\r\n if ((this.formField.selectOptions !== undefined) &&\r\n (this.formField.selectOptions !== null) &&\r\n (this.formField.selectOptions.trim() !== '')) {\r\n arrSelectOptions = this.formField.selectOptions.split('|');\r\n }\r\n */\r\n if (this.FormField) {\r\n arrSelectOptions = FormField.ParseSelectOptions(this.FormField);\r\n }\r\n }\r\n\r\n return (arrSelectOptions);\r\n }\r\n\r\n // Define helper methods available to derived classes.\r\n protected raiseException(errorMessage: string): void {\r\n // Note: this method merely provides a single entry to report\r\n // exceptions, a convenience when troubleshooting.\r\n throw (errorMessage);\r\n }\r\n\r\n // Control event handlers.\r\n public handleOnModelChange(): void {\r\n // Tell any listeners that my value has changed.\r\n this.formInstanceElement.UserUpdatedData = true;\r\n this.notifyValueChanged();\r\n }\r\n\r\n public handleOnBlur(): void {\r\n this.notifyControlTouched();\r\n }\r\n\r\n public handleValidationOnBlur(): void {\r\n this.emitValidation(this.FormControl.status);\r\n }\r\n\r\n //VNEXT-982: KLW - Fix validation on blur\r\n public blurValidation() {\r\n this.handleValidationOnBlur();\r\n }\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n public get DropDownOptionsTitle(): string {\r\n let title: string = this.formField.name;\r\n\r\n if (this.formField.displayName && (this.formField.displayName.trim() !== '')) {\r\n title = this.formField.displayName.trim();\r\n }\r\n\r\n return (title);\r\n }\r\n\r\n public get IsDesign() {\r\n return this.Mode === 'design';\r\n }\r\n\r\n public get AutocompleteEnabled() {\r\n return this.formField.autocomplete;\r\n }\r\n\r\n\r\n public handleOnFocus(eventData: FocusEvent): void {\r\n this.notifyControlReceivedFocus(eventData);\r\n }\r\n\r\n // Define methods that can be called by a parent\r\n // component, e.g.a form builder or a form renderer.\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n // NOTE: this implementation is a NOOP by design but \r\n // can be overridden to do work by a derived class.\r\n return;\r\n }\r\n public saveConfigurationCompleted(form: any): void {\r\n // NOTE: this implementation is a NOOP by design but\r\n // can be overridden to do work by a derived class.\r\n return;\r\n }\r\n\r\n // Note: is the following method still needed?\r\n public saveData(formInstance: any): void {\r\n // NOTE: this implementation is a NOOP by design but\r\n // can be overridden to do work by a derived class.\r\n //if (this.formControl && this.formInstanceElement) {\r\n if (this.controlData.formControl && this.formInstanceElement) {\r\n // 02-22-2021 SWH note: I do not believe that the code in the following\r\n // switch statement is needed as the various setupXxxFormControl()\r\n // methods have code to do this already as the user enters data.\r\n\r\n // 11-30-2022 note: the following bad code should no longer be necessary\r\n //\r\n // Need to test before removing it.\r\n switch (this.formInstanceElement.valueType) {\r\n case FormInstanceElementValueTypeEnum.TypeText:\r\n this.formInstanceElement.TextValue = this.controlData.formControl.value;//this.formControl.value;\r\n break;\r\n\r\n case FormInstanceElementValueTypeEnum.TypeInteger:\r\n this.formInstanceElement.IntValue = this.controlData.formControl.value;//this.formControl.value;\r\n break;\r\n\r\n case FormInstanceElementValueTypeEnum.TypeDecimal:\r\n this.formInstanceElement.DecimalValue = this.controlData.formControl.value;//this.formControl.value;\r\n break;\r\n\r\n case FormInstanceElementValueTypeEnum.TypeDouble:\r\n this.formInstanceElement.DoubleValue = this.controlData.formControl.value;//this.formControl.value;\r\n break;\r\n\r\n case FormInstanceElementValueTypeEnum.TypeBoolean:\r\n this.formInstanceElement.BooleanValue = this.controlData.formControl.value;//this.formControl.value;\r\n break;\r\n\r\n case FormInstanceElementValueTypeEnum.TypeMultiBoolean:\r\n case FormInstanceElementValueTypeEnum.TypeMultiText:\r\n break;\r\n\r\n default:\r\n Logging.log(\"FormFieldBaseComponent.saveData(): cannot determine my form instance element value type.\");\r\n break;\r\n } // switch\r\n } // if\r\n\r\n return;\r\n }\r\n\r\n public saveDataTo(formInstanceElementParam: FormInstanceElement): void {\r\n // NOTE: THIS METHOD IS A NOOP BY DESIGN.\r\n }\r\n\r\n //public saveCompleted(hshSavedComponentData: any): void {\r\n public saveCompleted(formInstance: any): void {\r\n // Note: this method is a NOOP by design.\r\n //\r\n // Derived classes can override this\r\n // method to implement post-save logic.\r\n\r\n return;\r\n }\r\n\r\n // Define a method that a derived class can override\r\n // to do something when a property update occurs.\r\n //\r\n // Note: the component needs to set the\r\n // 'propertyUpdateRequired' attribute when it\r\n // emits the 'onInit' output.\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n // NOTE: this implementation is a NOOP by design but \r\n // can be overridden to do work by a derived class.\r\n return;\r\n }\r\n\r\n // Define a method that allows a form field component\r\n // to learn the names of other form fields.\r\n //formFieldNamesRequired: true,\r\n public receiveFormFieldNames(formFieldNames: string[],\r\n //hshColNameToComponent: IFieldNameToComponent): void {\r\n hshColNameToFormField: IFieldNameToFormField): void {\r\n // NOTE: this implementation is a NOOP by design but \r\n // can be overridden to do work by a derived class.\r\n return;\r\n }\r\n\r\n // Define a method that allows a form field component\r\n // to be notified of form field value changes.\r\n //\r\n // formFieldValueUpdatesRequired: true\r\n //\r\n // Note: the following method should return true if\r\n // the value changed affected the receiver's value.\r\n public requiresFieldValueUpdate(): boolean { // Is this method still being used? If not, we can remove it.\r\n return false; // A default.\r\n }\r\n public formFieldValueUpdated(iColIndex: number, formField: FormField, formInstanceElement: FormInstanceElement, gridRow: IGridRow): boolean {\r\n // NOTE: this implementation is a NOOP by design but \r\n // can be overridden to do work by a derived class.\r\n return;\r\n }\r\n\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n // Note: this method is NOOP by design.\r\n }\r\n\r\n /*\r\n public displayDeleteIconInGrid(): boolean {\r\n return true; // A default.\r\n }\r\n */\r\n\r\n // Define a method used by the grid form field to create cell editing controls.\r\n public static staticCreateFormFieldDynamically(componentFactoryResolver: ComponentFactoryResolver,\r\n fieldDefinitionService: FieldDefinitionService,\r\n viewContainerRef: ViewContainerRef,\r\n formField: FormField,\r\n formFieldClass: AngularCoreType,\r\n mode: string,\r\n formInstanceElement: FormInstanceElement,\r\n bReadOnly: boolean,\r\n parentComponentPrefix: string = null,\r\n useGridSpecificStyling: boolean = false): ComponentRef {\r\n // Get the class's factory and create an instance.\r\n //\r\n // Note: apparently ComponentFactoryResolver has been deprecated as of Angular 13:\r\n //\r\n // https://stackoverflow.com/questions/70946038/replace-deprecated-angular-componentfactoryresolver-componentfactory\r\n //\r\n // The above article contains some information on what has replaced ComponentFactoryResolver.\r\n const componentFactory = componentFactoryResolver.resolveComponentFactory(formFieldClass);\r\n let componentRef: ComponentRef = viewContainerRef.createComponent(componentFactory);\r\n\r\n const formFieldInstance: FormFieldBaseComponent = componentRef.instance;\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(formField.fieldDefinitionClassName);\r\n //let parentComponentPrefix: string = Math.random().toString();\r\n fieldDefinition.customLogicHandler.setFieldSpecificValuesForDynamicallyCreatedField(formFieldInstance, formField, parentComponentPrefix);\r\n\r\n formFieldInstance.FormField = formField;\r\n formFieldInstance.mode = mode;\r\n formFieldInstance.readOnly = bReadOnly;\r\n formFieldInstance.useGridSpecificStyling = useGridSpecificStyling;\r\n\r\n formFieldInstance.writeValue(formInstanceElement);\r\n\r\n return (componentRef);\r\n }\r\n public createFormFieldDynamically(componentFactoryResolver: ComponentFactoryResolver,\r\n fieldDefinitionService: FieldDefinitionService,\r\n viewContainerRef: ViewContainerRef,\r\n formField: FormField,\r\n mode: string,\r\n formInstanceElement: FormInstanceElement,\r\n bReadOnly: boolean,\r\n parentComponentPrefix: string = null,\r\n useGridSpecificStyling: boolean = false): ComponentRef {\r\n\r\n // Get my derived class's class.\r\n let formFieldClass: AngularCoreType = this.getFormFieldClass();\r\n\r\n /*\r\n\r\n // Get the class's factory and create an instance.\r\n //\r\n // Note: apparently ComponentFactoryResolver has been deprecated as of Angular 13:\r\n //\r\n // https://stackoverflow.com/questions/70946038/replace-deprecated-angular-componentfactoryresolver-componentfactory\r\n //\r\n // The above article contains some information on what has replaced ComponentFactoryResolver.\r\n const componentFactory = componentFactoryResolver.resolveComponentFactory(formFieldClass);\r\n let componentRef: ComponentRef = viewContainerRef.createComponent(componentFactory);\r\n\r\n const formFieldInstance: FormFieldBaseComponent = componentRef.instance;\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(formField.fieldDefinitionClassName);\r\n //let parentComponentPrefix: string = Math.random().toString();\r\n fieldDefinition.customLogicHandler.setFieldSpecificValuesForDynamicallyCreatedField(formFieldInstance, formField, parentComponentPrefix);\r\n\r\n formFieldInstance.formField = formField;\r\n formFieldInstance.mode = mode;\r\n formFieldInstance.readOnly = bReadOnly;\r\n\r\n formFieldInstance.writeValue(formInstanceElement);\r\n\r\n return (componentRef);\r\n */\r\n let componentRef = FormFieldBaseComponent.staticCreateFormFieldDynamically(componentFactoryResolver, fieldDefinitionService, viewContainerRef, formField, formFieldClass, mode, formInstanceElement, bReadOnly, parentComponentPrefix, useGridSpecificStyling);\r\n return componentRef;\r\n }\r\n\r\n // Define a method used to get a derived class's class.\r\n /*\r\n public getFormFieldClass(): AngularCoreType {\r\n throw (\"FormFieldBaseComponent: method getFormFieldClass() is not implemented.\");\r\n\r\n return (null);\r\n }\r\n */\r\n //public abstract getFormFieldClass(): AngularCoreType;\r\n\r\n // Define methods used with Reactive Forms.\r\n protected createFormControl(initialValue: any): UntypedFormControl {\r\n //this.formControl = null;\r\n this.controlData.formControl = null;\r\n let arrValidators: ValidatorFn[] = [];\r\n let arrAsyncValidators: AsyncValidatorFn[] = [];\r\n\r\n // Build an array of validators, if any.\r\n //this.buildValidatorFunctionsAndMessages(arrValidators, this.arrValidationMessages, arrAsyncValidators);\r\n this.buildValidatorFunctionsAndMessages(arrValidators, this.controlData.arrValidationMessages, arrAsyncValidators);\r\n\r\n // 02-25-2020 change: pass a hash to the FormControl constructor rather than just a value.\r\n //\r\n // This change was made in accordance with the following warning message:\r\n //\r\n // It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\r\n // when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\r\n // you. We recommend using this approach to avoid 'changed after checked' errors.\r\n //\r\n // Example:\r\n // form = new FormGroup({\r\n // first: new FormControl({ value: 'Nancy', disabled: true }, Validators.required),\r\n // last: new FormControl('Drew', Validators.required)\r\n // });\r\n let hshControlProperties = {\r\n value: initialValue,\r\n disabled: this.ReadOnly\r\n };\r\n\r\n // Create the form control.\r\n //this.formControl = new FormControl(hshControlProperties, Validators.compose(arrValidators), Validators.composeAsync(arrAsyncValidators));\r\n this.controlData.formControl = new UntypedFormControl(hshControlProperties, Validators.compose(arrValidators), Validators.composeAsync(arrAsyncValidators));\r\n\r\n this.handleStatusChangesFor(this.controlData.formControl);\r\n this.controlData.formControl.updateValueAndValidity();\r\n\r\n //return (this.formControl);\r\n return this.controlData.formControl;\r\n }\r\n\r\n\r\n\r\n // IS THIS METHOD STILL CALLED?\r\n protected setupTextFormControl(absolutelyNeededDefault: string = null): void {\r\n if (this.FormControl === null) {\r\n //VNEXT-561: KLW - This is never called properly since the first call from FormInstanceElementReceived will always have this.FormInstanceElement.textValue as an empty value. The second\r\n //call will then populate the value for the form control.\r\n //Create my form control.\r\n //VNEXT-561: KLW - Account for this form field being in a Grid\r\n let strInitialValue: string = absolutelyNeededDefault;\r\n if ((this.FormInstanceElement.textValue !== undefined) &&\r\n (this.FormInstanceElement.textValue !== null)) {\r\n strInitialValue = this.FormInstanceElement.textValue;\r\n }\r\n\r\n //VNEXT-561: KLW - This is to account for the Rich Text field validation, which needs an initial value when the form control is first created. \r\n this.createFormControl(strInitialValue);\r\n\r\n this.handleStatusChangesFor(this.FormControl);\r\n this.FormControl.updateValueAndValidity();\r\n\r\n // Subscribe to value changes.\r\n this.FormControl.valueChanges\r\n .subscribe(val => {\r\n this.FormInstanceElement.TextValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n // pharv 4/16/2024 - discovered that this is no longer being reached for Rich Text Fields\r\n // pharv 1/3/2022 - introduced valueHasSubstantivelyChanged() check because in some cases the rich text editor just changes whitespace/line breaks but makes no\r\n // substantive changes to the actual content. Without this check, user would get \"unsaved changes\" warning upon navigating away from FormInstance\r\n // even if they had made no changes\r\n if ((!this.substantivelyChangedLogicApplies) ||\r\n this.valueHasSubstantivelyChanged(val, this.textValueOnInitialSetup)) {\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n this.userEnteredValue();\r\n }\r\n this.notifyValueChanged();\r\n }\r\n });\r\n } else { // if (this.FormGroup === null)\r\n // Update my form control's value.\r\n if ((this.FormInstanceElement.textValue !== undefined) &&\r\n (this.FormInstanceElement.textValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.textValue);\r\n this.textValueOnInitialSetup = this.FormInstanceElement.textValue;\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n }\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeText;\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected setupIntegerFormControl(): void {\r\n if (this.FormControl === null) {\r\n // Create my form group.\r\n let iInitialValue: number = 0;\r\n //if ((this.FormInstanceElement.intValue !== undefined) &&\r\n // (this.FormInstanceElement.intValue !== null)) {\r\n // iInitialValue = this.FormInstanceElement.intValue;\r\n //}\r\n\r\n //VNEXT-561: KLW - Remove default value\r\n this.createFormControl(iInitialValue);\r\n\r\n this.handleStatusChangesFor(this.FormControl);\r\n this.FormControl.updateValueAndValidity();\r\n\r\n // Subscribe to value changes.\r\n this.FormControl.valueChanges\r\n .subscribe(val => {\r\n this.FormInstanceElement.IntValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n this.notifyValueChanged();\r\n });\r\n } else { // if (this.FormGroup === null)\r\n // Update my form control's value.\r\n if ((this.FormInstanceElement.intValue !== undefined) &&\r\n (this.FormInstanceElement.intValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.intValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n else {\r\n this.FormControl.setValue(null);\r\n }\r\n }\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeInteger;\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected setupDecimalFormControl(): void {\r\n if (this.FormControl === null) {\r\n // Create my form group.\r\n let decInitialValue: number = 0.00;\r\n if ((this.FormInstanceElement.decimalValue !== undefined) &&\r\n (this.FormInstanceElement.decimalValue !== null)) {\r\n decInitialValue = this.FormInstanceElement.decimalValue;\r\n }\r\n\r\n //VNEXT-561: KLW - Remove default value\r\n this.createFormControl(decInitialValue);\r\n\r\n this.handleStatusChangesFor(this.FormControl);\r\n this.FormControl.updateValueAndValidity();\r\n\r\n // Subscribe to value changes.\r\n this.FormControl.valueChanges\r\n .subscribe(val => {\r\n this.FormInstanceElement.DecimalValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n this.notifyValueChanged();\r\n });\r\n } else { // if (this.FormGroup === null)\r\n // Update my form control's value.\r\n if ((this.FormInstanceElement.decimalValue !== undefined) &&\r\n (this.FormInstanceElement.decimalValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.decimalValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n }\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeDecimal;\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected setupBooleanFormControl(): void {\r\n if (this.FormControl === null) {\r\n // Create my form group.\r\n let bInitialValue: boolean = false;\r\n if ((this.FormInstanceElement.booleanValue !== undefined) &&\r\n (this.FormInstanceElement.booleanValue !== null)) {\r\n bInitialValue = this.FormInstanceElement.booleanValue;\r\n }\r\n\r\n this.createFormControl(bInitialValue);\r\n\r\n this.handleStatusChangesFor(this.FormControl);\r\n this.FormControl.updateValueAndValidity();\r\n\r\n // Subscribe to value changes.\r\n this.FormControl.valueChanges\r\n .subscribe(val => {\r\n this.FormInstanceElement.BooleanValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n this.notifyValueChanged();\r\n });\r\n } else { // if (this.FormGroup === null)\r\n // Update my form control's value.\r\n if ((this.FormInstanceElement.booleanValue !== undefined) &&\r\n (this.FormInstanceElement.booleanValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.booleanValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n }\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeBoolean;\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected createFormGroup(strControlName: string, initialValue: any): UntypedFormGroup {\r\n //if (this.formGroup === null) {\r\n if (this.controlData.formGroup === null) {\r\n let formControl: UntypedFormControl = null;\r\n let arrValidators: ValidatorFn[] = [];\r\n\r\n // Build an array of validators, if any.\r\n this.buildValidatorFunctionsAndMessages(arrValidators, this.controlData.arrValidationMessages);//this.arrValidationMessages);\r\n\r\n // Create the form control.\r\n if (arrValidators.length > 0) {\r\n formControl = new UntypedFormControl(initialValue, Validators.compose(arrValidators));\r\n } else {\r\n formControl = new UntypedFormControl(initialValue);\r\n }\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.controlData.formControl = formControl;\r\n\r\n // Create the form group.\r\n //this.formGroup = new FormGroup({});\r\n this.controlData.formGroup = new UntypedFormGroup({});\r\n //this.formGroup.addControl(strControlName, formControl);\r\n this.controlData.formGroup.addControl(strControlName, formControl);\r\n }\r\n\r\n //return (this.formGroup);\r\n return this.controlData.formGroup;\r\n }\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n protected setupMultiSelectFormGroup(strControlName: string, arrayValues: any, bSubscribeToValueChanges: boolean = true): void {\r\n\r\n let formControl: UntypedFormControl = null;\r\n let arrValidators: ValidatorFn[] = [];\r\n\r\n // Build an array of validators, if any.\r\n this.buildValidatorFunctionsAndMessages(arrValidators, this.controlData.arrValidationMessages);//this.arrValidationMessages);\r\n\r\n // Create the form control.\r\n if (arrValidators.length > 0) {\r\n formControl = new UntypedFormControl(arrayValues, Validators.compose(arrValidators));\r\n } else {\r\n formControl = new UntypedFormControl(arrayValues);\r\n }\r\n\r\n //VNEXT-982: KLW - Fix validation on blur\r\n this.handleStatusChangesFor(formControl);\r\n // Create the form group. \r\n this.controlData.formGroup = new UntypedFormGroup({});\r\n this.controlData.formGroup.addControl(strControlName, formControl);\r\n\r\n this.controlData.formControl = formControl;\r\n\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeMultiText;\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected handleStatusChangesFor(localFormControl: UntypedFormControl): void {\r\n localFormControl.statusChanges.subscribe(statusChangeName => {\r\n if ((statusChangeName == FormFieldPropertyEnum.INVALID) || (statusChangeName == FormFieldPropertyEnum.VALID)) {\r\n if (this.mode != FormModeEnum.DESIGN) {\r\n this.emitValidation(statusChangeName);\r\n }\r\n }\r\n });\r\n }\r\n\r\n //Kevin - this is needed for validation of a blank value\r\n //Kevin this is being triggered for RichTextField when it first loads, need to stop that\r\n private emitValidation(status: string) {\r\n this.controlData.formControl.markAsTouched();\r\n this.formFieldValidated.emit(status);\r\n }\r\n\r\n protected setupTextFormGroup(strControlName: string, bSubscribeToValueChanges: boolean = true): void {\r\n //if (this.formGroup === null) {\r\n if (this.controlData.formGroup === null) {\r\n // Create my form group.\r\n let strInitialValue: string = '';\r\n if ((this.FormInstanceElement.textValue !== undefined) &&\r\n (this.FormInstanceElement.textValue !== null)) {\r\n strInitialValue = this.FormInstanceElement.textValue;\r\n }\r\n\r\n this.createFormGroup(strControlName, strInitialValue);\r\n\r\n let localFormControl: UntypedFormControl = this.controlData.formGroup.get(strControlName);//this.formGroup.get(strControlName);\r\n\r\n this.handleStatusChangesFor(localFormControl);\r\n\r\n if (bSubscribeToValueChanges) {\r\n // Subscribe to value changes.\r\n localFormControl.valueChanges\r\n .subscribe(val => {\r\n this.FormInstanceElement.TextValue = val;\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.handleStatusChangesFor(this.FormControl);\r\n\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n this.notifyValueChanged();\r\n });\r\n }\r\n } else {\r\n // Update my control's value.\r\n let localFormControl: UntypedFormControl = this.controlData.formGroup.get(strControlName);//this.formGroup.get(strControlName);\r\n\r\n if ((this.FormInstanceElement.textValue !== undefined) &&\r\n (this.FormInstanceElement.textValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n localFormControl.setValue(this.FormInstanceElement.textValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n }\r\n\r\n // Set my form instance element's value type.\r\n if (this.FormInstanceElement) {\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeText;\r\n }\r\n\r\n return;\r\n }\r\n\r\n\r\n protected setDefaultTextValue(): void {\r\n if ((this.FormInstanceElement.textValue === undefined) ||\r\n (this.FormInstanceElement.textValue === null)) {\r\n let bValueSet: boolean = false;\r\n\r\n if ((this.FormField.defaultValue !== undefined) &&\r\n (this.FormField.defaultValue !== null)) {\r\n this.FormInstanceElement.TextValue = this.FormField.defaultValue;\r\n\r\n bValueSet = true;\r\n }\r\n\r\n if (!bValueSet) {\r\n if (this.FormField.required) {\r\n this.FormInstanceElement.TextValue = '';\r\n } else {\r\n this.FormInstanceElement.TextValue = null;\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public static staticSetDefaultTextSelectValue(formField: FormField, formInstanceElement: FormInstanceElement, selectOptions: string[]): void {\r\n if ((formInstanceElement.textValue === undefined) ||\r\n (formInstanceElement.textValue === null) ||\r\n (formInstanceElement.textValue.trim() === '')) {\r\n let bValueSet: boolean = false;\r\n let arrSelectOptions: string[] = selectOptions;\r\n\r\n if (formField && formField.defaultValue) {\r\n // Make sure the default value is a valid selection.\r\n let bValidOption: boolean = false;\r\n //arrSelectOptions = this.SelectOptions;\r\n\r\n for (let iOption: number = 0; iOption < arrSelectOptions.length; iOption++) {\r\n let strOption: string = arrSelectOptions[iOption];\r\n\r\n if (strOption === formField.defaultValue) {\r\n bValidOption = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (bValidOption) {\r\n formInstanceElement.TextValue = formField.defaultValue;\r\n\r\n bValueSet = true;\r\n }\r\n } // if\r\n\r\n //if ((!bValueSet) && this.FormField.required && (arrSelectOptions.length > 0)) {\r\n if (!bValueSet) {\r\n if (formField && formField.required && (arrSelectOptions.length > 0)) {\r\n formInstanceElement.TextValue = arrSelectOptions[0];\r\n } else {\r\n formInstanceElement.TextValue = null;\r\n }\r\n } // if\r\n\r\n ////VNEXT-561: KLW - Remove default value\r\n //if (!bValueSet) {\r\n // this.FormInstanceElement.TextValue = null;\r\n //} // if\r\n\r\n } // if\r\n\r\n return;\r\n }\r\n protected setDefaultTextSelectValue(): void {\r\n /*\r\n if ((this.FormInstanceElement.textValue === undefined) ||\r\n (this.FormInstanceElement.textValue === null) ||\r\n (this.FormInstanceElement.textValue.trim() === '')) {\r\n let bValueSet: boolean = false;\r\n let arrSelectOptions: string[] = this.SelectOptions;\r\n\r\n if (this.formField && this.formField.defaultValue) {\r\n // Make sure the default value is a valid selection.\r\n let bValidOption: boolean = false;\r\n //arrSelectOptions = this.SelectOptions;\r\n\r\n for (let iOption: number = 0; iOption < arrSelectOptions.length; iOption++) {\r\n let strOption: string = arrSelectOptions[iOption];\r\n\r\n if (strOption === this.FormField.defaultValue) {\r\n bValidOption = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (bValidOption) {\r\n this.FormInstanceElement.TextValue = this.FormField.defaultValue;\r\n\r\n bValueSet = true;\r\n }\r\n } // if\r\n\r\n //if ((!bValueSet) && this.FormField.required && (arrSelectOptions.length > 0)) {\r\n if (!bValueSet) {\r\n if (this.formField && this.formField.required && (arrSelectOptions.length > 0)) {\r\n this.FormInstanceElement.TextValue = arrSelectOptions[0];\r\n } else {\r\n this.FormInstanceElement.TextValue = null;\r\n }\r\n } // if\r\n\r\n ////VNEXT-561: KLW - Remove default value\r\n //if (!bValueSet) {\r\n // this.FormInstanceElement.TextValue = null;\r\n //} // if\r\n\r\n } // if\r\n\r\n return;\r\n */\r\n // Note: all of the code in this method has been moved into the static method, just above, called here:\r\n FormFieldBaseComponent.staticSetDefaultTextSelectValue(this.FormField, this.formInstanceElement, this.SelectOptions);\r\n }\r\n\r\n public static staticSetDefaultBooleanValue(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n if ((formInstanceElement.booleanValue === undefined) ||\r\n (formInstanceElement.booleanValue === null) ||\r\n (formInstanceElement.booleanValue === false)) {\r\n if (formField) {\r\n if ((formField.defaultValue !== undefined) &&\r\n (formField.defaultValue !== null)) {\r\n if (formField.defaultValue.toLowerCase() === 'true') {\r\n formInstanceElement.BooleanValue = true;\r\n } else {\r\n formInstanceElement.BooleanValue = false;\r\n }\r\n }\r\n } else {\r\n formInstanceElement.BooleanValue = false;\r\n }\r\n }\r\n }\r\n protected setDefaultBooleanValue(): void {\r\n /*\r\n if ((this.FormInstanceElement.booleanValue === undefined) ||\r\n (this.FormInstanceElement.booleanValue === null) ||\r\n (this.FormInstanceElement.booleanValue === false)) {\r\n if (this.formField) {\r\n if ((this.FormField.defaultValue !== undefined) &&\r\n (this.FormField.defaultValue !== null)) {\r\n if (this.FormField.defaultValue.toLowerCase() === 'true') {\r\n this.FormInstanceElement.BooleanValue = true;\r\n } else {\r\n this.FormInstanceElement.BooleanValue = false;\r\n }\r\n }\r\n } else {\r\n this.FormInstanceElement.BooleanValue = false;\r\n }\r\n }\r\n\r\n return;\r\n */\r\n // Note: all of the code in this method has been moved into the static method, just above, called here:\r\n FormFieldBaseComponent.staticSetDefaultBooleanValue(this.FormField, this.formInstanceElement);\r\n }\r\n\r\n protected setDefaultDecimalValue(): void {\r\n FormFieldBaseComponent.setDefaultDecimalValueFor(this.FormField, this.FormInstanceElement);\r\n\r\n return;\r\n }\r\n\r\n public static setDefaultDecimalValueFor(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement): void {\r\n // Check for a default value.\r\n let decDefaultValue: number = 0; //parseFloat(this.FormField.defaultValue);\r\n let bHasDefaultValue: boolean =\r\n ((formFieldParam.defaultValue !== undefined) &&\r\n (formFieldParam.defaultValue !== null) &&\r\n (formFieldParam.defaultValue.trim() !== ''));\r\n if (bHasDefaultValue) {\r\n decDefaultValue = parseFloat(formFieldParam.defaultValue);\r\n }\r\n\r\n // Do we need to set a value?\r\n if ((formInstanceElementParam.decimalValue === undefined) ||\r\n (formInstanceElementParam.decimalValue === null) ||\r\n (\r\n bHasDefaultValue &&\r\n (formInstanceElementParam.decimalValue === 0) &&\r\n (formInstanceElementParam.decimalValue !== decDefaultValue)\r\n )\r\n ) {\r\n let bValueSet: boolean = false;\r\n\r\n if (bHasDefaultValue) {\r\n if (!isNaN(decDefaultValue)) {\r\n formInstanceElementParam.DecimalValue = decDefaultValue;\r\n\r\n bValueSet = true;\r\n }\r\n }\r\n\r\n if (!bValueSet) {\r\n if (formFieldParam.required) {\r\n formInstanceElementParam.DecimalValue = 0.0;\r\n } else {\r\n formInstanceElementParam.DecimalValue = null;\r\n }\r\n }\r\n\r\n ////VNEXT-561: KLW - Remove default value\r\n //if (!bValueSet) {\r\n // formInstanceElementParam.DecimalValue = null;\r\n //}\r\n\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected setDefaultIntegerValue(): void {\r\n FormFieldBaseComponent.setDefaultIntegerValueFor(this.FormField, this.FormInstanceElement);\r\n\r\n return;\r\n }\r\n\r\n public static setDefaultIntegerValueFor(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement): void {\r\n // Check for a default value.\r\n\r\n let iDefaultValue: number = 0;\r\n let bHasDefaultValue: boolean =\r\n ((formFieldParam.defaultValue !== undefined) &&\r\n (formFieldParam.defaultValue !== null) &&\r\n (formFieldParam.defaultValue.trim() !== ''));\r\n if (bHasDefaultValue) {\r\n iDefaultValue = parseInt(formFieldParam.defaultValue);\r\n }\r\n\r\n // Do we need to set a value?\r\n if ((formInstanceElementParam.intValue === undefined) ||\r\n (formInstanceElementParam.intValue === null) ||\r\n (bHasDefaultValue && (formInstanceElementParam.intValue !== iDefaultValue))) {\r\n let bValueSet: boolean = false;\r\n\r\n if (bHasDefaultValue) {\r\n if (!isNaN(iDefaultValue)) {\r\n formInstanceElementParam.IntValue = iDefaultValue;\r\n\r\n bValueSet = true;\r\n }\r\n }\r\n\r\n if (!bValueSet) {\r\n formInstanceElementParam.IntValue = null;\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Define a method called when a user enters a value.\r\n protected userEnteredValue(): void {\r\n // currently noop, but this could emit an event if needed\r\n return;\r\n }\r\n\r\n protected formGroupCreatedCompleted() {\r\n }\r\n\r\n protected formControlCreatedCompleted() {\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n public writeValue(value: any) {\r\n // NOTE: THIS METHOD IS NOT YET PROPERLY IMPLEMENTED.\r\n // WE WILL NEED TO SET THE MODEL VALUE IN PREVIEW AND INSTANCE MODES.\r\n if ((value !== undefined) && (value !== null) && (value instanceof FormInstanceElement)) {\r\n\r\n this.formInstanceElement = value;\r\n\r\n if (!this.flags.writeValueForFormInstanceElementCalled) {\r\n this.flags.writeValueForFormInstanceElementCalled = true;\r\n\r\n setTimeout(() => {\r\n if (!this.flags.formInstanceElementReceivedCalled) {\r\n this.writeValueTriggered();\r\n this.flags.formInstanceElementReceivedCalled = true;\r\n }\r\n }, 0);\r\n } else {\r\n this.writeValueTriggered();\r\n this.flags.formInstanceElementReceivedCalled = true;\r\n }\r\n }\r\n }\r\n\r\n // public SetupFormGroupFromWriteValue(groupName: string, passedFormControls: string[] = [], subscribeToEvents: boolean = true) {\r\n\r\n // if (this.controlData.formGroup === null) {\r\n // this.setupFormGroupBase(this.formInstanceElement, groupName, passedFormControls).then(() => {\r\n // console.log(\"Form Field Base: Form Group of name \" + groupName + \" created\");\r\n // this.formGroupCreatedCompleted();\r\n // });\r\n // }\r\n // //This is to account for loading the value for the form field in the grid\r\n // else {\r\n // this.setFormFieldValueInGrid();\r\n // }\r\n // }\r\n\r\n // public SetupFormControlFromWriteValue() {\r\n // if (this.FormControl == null) {\r\n // this.setupFormControlBase(this.formInstanceElement).then(() => {\r\n // //console.log(\"Form Field Base: Form Control of type \" + this.FieldDefinitionClassName + \" created\");\r\n // this.formControlCreatedCompleted();\r\n // this.formControlCreated.emit(this.FormControl);\r\n // });\r\n // }\r\n // //This is to account for loading the value for the form field in the grid\r\n // else {\r\n // this.setFormFieldValueInGrid();\r\n // }\r\n\r\n // if (this.FormControl?.valid == false) {\r\n // this.invalid.emit();\r\n // }\r\n // }\r\n\r\n\r\n // private setupFormGroupBase(passedFormInstanceElement, strControlName: string, passedFormControlNames: string[], subscribeToEvents: boolean = true): Promise {\r\n // return new Promise((resolve) => {\r\n // this.controlData.formGroup = new FormGroup({});\r\n\r\n // if (passedFormControlNames.length > 0) {\r\n // /*\r\n // passedFormControlNames.forEach(control => {\r\n // let toAdd = new FormControl();\r\n // this.controlData.formGroup.addControl(strControlName, toAdd);\r\n // });\r\n // */\r\n // for (let index: number = 0; index < passedFormControlNames.length; index++) {\r\n // let secondaryControlName: string = passedFormControlNames[index];\r\n // let toAdd = new FormControl();\r\n // this.controlData.formGroup.addControl(secondaryControlName, toAdd);\r\n // }\r\n // }\r\n\r\n // this.createFormControlBase(passedFormInstanceElement).then((fc) => {\r\n\r\n // if (subscribeToEvents)\r\n // this.formControlSubscriptions(fc);\r\n\r\n // //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n // this.controlData.formControl = fc;\r\n // this.controlData.formGroup.addControl(strControlName, fc);\r\n // this.formGroupCreatedCompleted();\r\n // //VNEXT-906: KLW - This is required for form fields using form group to have validation on the Kendo Grid\r\n // this.formControlCreated.emit(this.FormControl);\r\n\r\n // //VNEXT-561: KLW - Needs to go here for timing\r\n // resolve(this.controlData.formGroup);\r\n // });\r\n // });\r\n // }\r\n\r\n\r\n // private setupFormControlBase(passedFormInstanceElement): Promise {\r\n // return new Promise((resolve) => {\r\n // this.createFormControlBase(passedFormInstanceElement).then((fc) => {\r\n // this.formControlSubscriptions(fc);\r\n // });\r\n\r\n // resolve();\r\n // });\r\n\r\n // }\r\n\r\n\r\n // protected createFormControlBase(passedFormInstanceElement: any): Promise {\r\n // return new Promise((resolve) => {\r\n // this.controlData.formControl = null;\r\n // var initialValue: any = null;\r\n // var arrValidators: ValidatorFn[] = [];\r\n // var arrAsyncValidators: AsyncValidatorFn[] = [];\r\n\r\n // // Build an array of validators, if any.\r\n // //this.buildValidatorFunctionsAndMessages(arrValidators, this.arrValidationMessages, arrAsyncValidators);\r\n // this.buildValidatorFunctionsAndMessages(arrValidators, this.controlData.arrValidationMessages, arrAsyncValidators);\r\n\r\n // initialValue = this.returnSavedValue(passedFormInstanceElement);\r\n\r\n // //Set default value if null\r\n // if (initialValue == null)\r\n // initialValue = this.GetDefaultValue(this.FormField);\r\n\r\n // // 02-25-2020 change: pass a hash to the FormControl constructor rather than just a value.\r\n // //\r\n // // This change was made in accordance with the following warning message:\r\n // //\r\n // // It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\r\n // // when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\r\n // // you. We recommend using this approach to avoid 'changed after checked' errors.\r\n // //\r\n // // Example:\r\n // // form = new FormGroup({\r\n // // first: new FormControl({ value: 'Nancy', disabled: true }, Validators.required),\r\n // // last: new FormControl('Drew', Validators.required)\r\n // // });\r\n // let hshControlProperties = {\r\n // value: initialValue,\r\n // disabled: this.ReadOnly\r\n // };\r\n\r\n // // Create the form control. \r\n // this.FormControl = new FormControl(hshControlProperties, Validators.compose(arrValidators), Validators.composeAsync(arrAsyncValidators));\r\n\r\n // //Don't enable this, it will cause the validation to happen when the form first loads\r\n // //this.FormControl.updateValueAndValidity();\r\n\r\n // this.setValueType();\r\n\r\n // resolve(this.FormControl);\r\n // });\r\n\r\n // }\r\n\r\n\r\n\r\n public SetupFormGroupFromWriteValue(groupName: string, passedFormControls: string[] = [], subscribeToEvents: boolean = true) {\r\n\r\n if (this.controlData.formGroup === null) {\r\n this.setupFormGroupBase(this.formInstanceElement, groupName, passedFormControls);\r\n //console.log(\"Form Field Base: Form Group of name \" + groupName + \" created\");\r\n this.formGroupCreatedCompleted();\r\n }\r\n //This is to account for loading the value for the form field in the grid\r\n else {\r\n this.setFormFieldValueInGrid();\r\n }\r\n }\r\n\r\n public SetupFormControlFromWriteValue() {\r\n if (this.FormControl == null) {\r\n this.setupFormControlBase(this.formInstanceElement)\r\n //console.log(\"Form Field Base: Form Control of type \" + this.FieldDefinitionClassName + \" created\");\r\n this.formControlCreatedCompleted();\r\n this.formControlCreated.emit(this.FormControl);\r\n }\r\n //This is to account for loading the value for the form field in the grid\r\n else {\r\n this.setFormFieldValueInGrid();\r\n }\r\n\r\n if (this.FormControl?.valid == false) {\r\n this.invalid.emit();\r\n }\r\n }\r\n\r\n\r\n private setupFormGroupBase(passedFormInstanceElement, strControlName: string, passedFormControlNames: string[], subscribeToEvents: boolean = true) {\r\n\r\n this.controlData.formGroup = new UntypedFormGroup({});\r\n\r\n if (passedFormControlNames.length > 0) {\r\n /*\r\n passedFormControlNames.forEach(control => {\r\n let toAdd = new FormControl();\r\n this.controlData.formGroup.addControl(strControlName, toAdd);\r\n });\r\n */\r\n for (let index: number = 0; index < passedFormControlNames.length; index++) {\r\n let secondaryControlName: string = passedFormControlNames[index];\r\n let toAdd = new UntypedFormControl();\r\n this.controlData.formGroup.addControl(secondaryControlName, toAdd);\r\n }\r\n }\r\n\r\n var fc = this.createFormControlBase(passedFormInstanceElement)\r\n\r\n if (subscribeToEvents)\r\n this.formControlSubscriptions(fc);\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.controlData.formControl = fc;\r\n this.controlData.formGroup.addControl(strControlName, fc);\r\n this.formGroupCreatedCompleted();\r\n //VNEXT-906: KLW - This is required for form fields using form group to have validation on the Kendo Grid\r\n this.formControlCreated.emit(this.FormControl);\r\n\r\n\r\n\r\n\r\n }\r\n\r\n\r\n private setupFormControlBase(passedFormInstanceElement) {\r\n\r\n var fc = this.createFormControlBase(passedFormInstanceElement)\r\n this.formControlSubscriptions(fc);\r\n\r\n }\r\n\r\n\r\n protected createFormControlBase(passedFormInstanceElement: any) {\r\n\r\n this.controlData.formControl = null;\r\n var initialValue: any = null;\r\n var arrValidators: ValidatorFn[] = [];\r\n var arrAsyncValidators: AsyncValidatorFn[] = [];\r\n\r\n // Build an array of validators, if any.\r\n //this.buildValidatorFunctionsAndMessages(arrValidators, this.arrValidationMessages, arrAsyncValidators);\r\n this.buildValidatorFunctionsAndMessages(arrValidators, this.controlData.arrValidationMessages, arrAsyncValidators);\r\n\r\n initialValue = this.returnSavedValue(passedFormInstanceElement);\r\n\r\n //Set default value if null\r\n if (initialValue == null)\r\n initialValue = this.GetDefaultValue(this.FormField, passedFormInstanceElement);\r\n\r\n // 02-25-2020 change: pass a hash to the FormControl constructor rather than just a value.\r\n //\r\n // This change was made in accordance with the following warning message:\r\n //\r\n // It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\r\n // when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\r\n // you. We recommend using this approach to avoid 'changed after checked' errors.\r\n //\r\n // Example:\r\n // form = new FormGroup({\r\n // first: new FormControl({ value: 'Nancy', disabled: true }, Validators.required),\r\n // last: new FormControl('Drew', Validators.required)\r\n // });\r\n let hshControlProperties = {\r\n value: initialValue,\r\n disabled: this.ReadOnly\r\n };\r\n\r\n // Create the form control.\r\n this.FormControl = new UntypedFormControl(hshControlProperties, Validators.compose(arrValidators), Validators.composeAsync(arrAsyncValidators));\r\n\r\n //Don't enable this, it will cause the validation to happen when the form first loads\r\n //this.FormControl.updateValueAndValidity();\r\n\r\n this.setValueType();\r\n\r\n return this.FormControl;\r\n\r\n }\r\n\r\n\r\n\r\n private setFormFieldValueInGrid() {\r\n switch (this.FieldDefinitionClassName) {\r\n case IntegerFieldType:\r\n if ((this.FormInstanceElement.intValue !== undefined) &&\r\n (this.FormInstanceElement.intValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.intValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n break;\r\n\r\n case CurrencyFieldType:\r\n case DecimalFieldType:\r\n if ((this.FormInstanceElement.decimalValue !== undefined) &&\r\n (this.FormInstanceElement.decimalValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.decimalValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n break;\r\n\r\n case RichTextFieldType:\r\n case ShortTextFieldType:\r\n case RadioButtonsFieldType:\r\n case DropDownFieldType:\r\n case ParagraphFieldType:\r\n case CascadingDropDownFieldType:\r\n case GridCascadingDropDownFieldType:\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the new HTML Link field\r\n case EditorNameFieldType:\r\n case LastEditedDateFieldType:\r\n if ((this.FormInstanceElement.textValue !== undefined) &&\r\n (this.FormInstanceElement.textValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.textValue);\r\n this.textValueOnInitialSetup = this.FormInstanceElement.textValue;\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n break;\r\n\r\n case CheckboxFieldType:\r\n if ((this.FormInstanceElement.booleanValue !== undefined) &&\r\n (this.FormInstanceElement.booleanValue !== null)) {\r\n this.FormInstanceElement.transientInSetupFlag = true;\r\n\r\n this.FormControl.setValue(this.FormInstanceElement.booleanValue);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n break;\r\n }\r\n\r\n if (this.FormField != null) {\r\n if (this.FormField.readOnly)\r\n this.FormControl.disable();\r\n else\r\n this.FormControl.enable();\r\n\r\n this.FormControl.clearValidators();\r\n if (this.FormField.required)\r\n this.FormControl.addValidators(Validators.required);\r\n }\r\n }\r\n\r\n // private formControlSubscriptions(passedFC: FormControl) {\r\n // passedFC.valueChanges\r\n // .subscribe(val => {\r\n // switch (this.FieldDefinitionClassName) {\r\n\r\n // case CheckboxFieldType:\r\n // this.formInstanceElement.BooleanValue = val;\r\n // break;\r\n\r\n // case IntegerFieldType:\r\n // this.FormInstanceElement.IntValue = val;\r\n // break;\r\n\r\n // case CurrencyFieldType:\r\n // case DecimalFieldType:\r\n // this.FormInstanceElement.DecimalValue = val;\r\n // break;\r\n\r\n // case RichTextFieldType:\r\n // case ShortTextFieldType:\r\n // case RadioButtonsFieldType:\r\n // case DropDownFieldType:\r\n // case ParagraphFieldType:\r\n // this.formInstanceElement.TextValue = val;\r\n // break;\r\n // }\r\n\r\n // if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // this.FormInstanceElement.UserUpdatedData = true;\r\n // }\r\n\r\n // this.notifyValueChanged();\r\n // this.setRedBorderManually();\r\n\r\n // });\r\n\r\n\r\n // //Needed for validation\r\n // this.handleStatusChangesFor(passedFC);\r\n\r\n // this.FormInstanceElement.transientInSetupFlag = false;\r\n // }\r\n\r\n private formControlSubscriptions(passedFC: UntypedFormControl) {\r\n this.textValueOnInitialSetup = this.FormInstanceElement.textValue;\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n passedFC.valueChanges\r\n .subscribe(val => {\r\n switch (this.FieldDefinitionClassName) {\r\n\r\n case CheckboxFieldType:\r\n this.formInstanceElement.BooleanValue = val;\r\n break;\r\n\r\n case IntegerFieldType:\r\n this.FormInstanceElement.IntValue = val;\r\n break;\r\n\r\n case CurrencyFieldType:\r\n case DecimalFieldType:\r\n this.FormInstanceElement.DecimalValue = val;\r\n break;\r\n\r\n case RichTextFieldType:\r\n case ShortTextFieldType:\r\n case RadioButtonsFieldType:\r\n case ParagraphFieldType:\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the new HTML Link field\r\n case FlexibleSelectionFieldType:\r\n case EditorNameFieldType:\r\n case LastEditedDateFieldType:\r\n //case CascadingDropDownFieldType:\r\n //case GridCascadingDropDownFieldType:\r\n if (typeof val === 'string') {\r\n this.formInstanceElement.TextValue = val;\r\n }\r\n break;\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n case DropDownFieldType:\r\n if (val != '') {\r\n if (this.SelectOptions) {\r\n if (this.SelectOptions.length > 0) {\r\n if (this.SelectOptions.includes(val)) {\r\n this.formInstanceElement.TextValue = val;\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n\r\n }\r\n\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n if (!this.substantivelyChangedLogicApplies) {\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n } else if (this.valueHasSubstantivelyChanged(val, this.textValueOnInitialSetup)) {\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n }\r\n }\r\n }\r\n\r\n this.notifyValueChanged();\r\n this.setRedBorderManually();\r\n\r\n });\r\n\r\n //Needed for validation\r\n this.handleStatusChangesFor(passedFC);\r\n\r\n this.FormInstanceElement.transientInSetupFlag = false;\r\n }\r\n }\r\n\r\n\r\n\r\n private returnSavedValue(passedFormInstanceElement: FormInstanceElement): any {\r\n\r\n switch (this.FieldDefinitionClassName) {\r\n\r\n case IntegerFieldType:\r\n return passedFormInstanceElement.intValue;\r\n\r\n case CurrencyFieldType:\r\n case DecimalFieldType:\r\n return passedFormInstanceElement.decimalValue;\r\n\r\n case RichTextFieldType:\r\n case ShortTextFieldType:\r\n case RadioButtonsFieldType:\r\n case DropDownFieldType:\r\n case ParagraphFieldType:\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the new HTML Link field\r\n return passedFormInstanceElement.textValue;\r\n\r\n case CheckboxFieldType:\r\n return passedFormInstanceElement.booleanValue;\r\n\r\n // I think this method is only used when dealing with none multi-text fields, but Flexible Selection fields\r\n // are a new kind of thing. Even when only storing a single value they store it in a childFormInstanceElement\r\n case FlexibleSelectionFieldType:\r\n if (passedFormInstanceElement.childFormInstanceElements?.length == 1) {\r\n return passedFormInstanceElement.childFormInstanceElements[0]?.textValue\r\n } else {\r\n // keeping this for now, just in case but this can probably removed\r\n return passedFormInstanceElement.textValue;\r\n }\r\n }\r\n }\r\n\r\n private setValueType() {\r\n switch (this.FieldDefinitionClassName) {\r\n\r\n case IntegerFieldType:\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeInteger;\r\n break;\r\n\r\n case CurrencyFieldType:\r\n case DecimalFieldType:\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeDecimal;\r\n break;\r\n\r\n case RichTextFieldType:\r\n case ShortTextFieldType:\r\n case RadioButtonsFieldType:\r\n case DropDownFieldType:\r\n case ParagraphFieldType:\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the new HTML Link field\r\n case EditorNameFieldType:\r\n case LastEditedDateFieldType:\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeText;\r\n break;\r\n\r\n case CheckboxFieldType:\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeBoolean;\r\n break;\r\n }\r\n }\r\n\r\n protected GetDefaultValue(formFieldParam: FormField, passedFormInstanceElement: FormInstanceElement): any {\r\n // Check for a default value.\r\n let iDefaultValue: any;\r\n let bHasDefaultValue: boolean =\r\n ((formFieldParam.defaultValue !== undefined) &&\r\n (formFieldParam.defaultValue !== null) &&\r\n (formFieldParam.defaultValue.trim() !== ''));\r\n if (bHasDefaultValue) {\r\n switch (this.FieldDefinitionClassName) {\r\n case IntegerFieldType:\r\n iDefaultValue = parseInt(formFieldParam.defaultValue);\r\n passedFormInstanceElement.intValue = iDefaultValue;\r\n break;\r\n\r\n case CurrencyFieldType:\r\n case DecimalFieldType:\r\n iDefaultValue = parseFloat(formFieldParam.defaultValue);\r\n passedFormInstanceElement.decimalValue = iDefaultValue;\r\n break;\r\n\r\n case CheckboxFieldType:\r\n if (this.FormField.defaultValue.toLowerCase() === 'true') {\r\n iDefaultValue = true;\r\n } else {\r\n iDefaultValue = false;\r\n }\r\n passedFormInstanceElement.booleanValue = iDefaultValue;\r\n break;\r\n\r\n case RichTextFieldType:\r\n case ShortTextFieldType:\r\n case RadioButtonsFieldType:\r\n case DropDownFieldType:\r\n case ParagraphFieldType:\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the new HTML Link field\r\n iDefaultValue = formFieldParam.defaultValue;\r\n passedFormInstanceElement.textValue = iDefaultValue;\r\n break;\r\n }\r\n }\r\n else {\r\n iDefaultValue = null;\r\n }\r\n\r\n return iDefaultValue;\r\n }\r\n\r\n protected formInstanceElementReceived(): void {\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n\r\n //If code is being hit here then it's a form field in a grid\r\n return;\r\n }\r\n\r\n public registerOnChange(fn: any): void {\r\n //this.fnPropagateChanges = fn;\r\n this.callbackFunctions.fnPropagateChanges = fn;\r\n\r\n return;\r\n }\r\n\r\n public registerOnTouched(fn: any): void {\r\n //this.fnOnTouched = fn;\r\n this.callbackFunctions.fnOnTouched = fn;\r\n\r\n return;\r\n }\r\n\r\n public registerOnFocus(registeringComponent: IFormFieldComponent, fn: any): void {\r\n //public registerOnFocus(fn: (formFieldComponent: FormFieldBaseComponent, event: FocusEvent) => void): void {\r\n //this.fnOnFocus = fn;\r\n //this.callbackFunctions.fnOnFocus = fn;\r\n let onFocusData: OnFocusData = new OnFocusData();\r\n onFocusData.registeringComponent = registeringComponent;\r\n onFocusData.fnOnFocus = fn;\r\n this.callbackFunctions.onFocus = onFocusData;\r\n\r\n return;\r\n }\r\n\r\n public handlingEditPropertiesClickEvent(): void {\r\n // Note: this default implementation is a NOOP by design.\r\n }\r\n\r\n public resetFormField(formField: FormField): void {\r\n // This default method implementation simply resets my form field.\r\n //\r\n // Note: a component like the grid component can override this method.\r\n //this.FormField = formField; // This line was throwing the following JavaScript error (which makes no sense):\r\n // something about 'FormField' only having a getter even though it has a setter.\r\n this.formField.assignFrom(formField); //use assignFrom() in case formField is of type Object\r\n }\r\n\r\n public get canHaveInstructions(): boolean {\r\n return true;\r\n }\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return true;\r\n }\r\n\r\n public formInstanceElementLoaded(formIntsanceElement: FormInstanceElement): void {\r\n // Note: this method does nothing by design.\r\n }\r\n\r\n public configureAnySecondaryComponents(): void {\r\n // Note: this method does nothing by design.\r\n }\r\n\r\n protected static staticToggleFormControlDisabledBasedOnReadOnlyAttribute(formControl: UntypedFormControl, formField: FormField): void {\r\n if (formControl != null) {\r\n // Make sure the form control's disabled state agrees with the form field's 'isReadOnly' attribute.\r\n let formControlDisabled: boolean = formControl.disabled;\r\n if (formField.readOnly)\r\n formControl.disable();\r\n else\r\n formControl.enable();\r\n }\r\n }\r\n protected toggleFormControlDisabledBasedOnReadOnlyAttribute(): void {\r\n FormFieldBaseComponent.staticToggleFormControlDisabledBasedOnReadOnlyAttribute(this.FormControl, this.formField);\r\n }\r\n\r\n /*\r\n protected static formControlIsRequired(formControl: FormControl): boolean {\r\n let isRequired: boolean = false;\r\n\r\n const validator = formControl.validator({} as AbstractControl);\r\n isRequired = (validator != null) && validator.required;\r\n\r\n return isRequired;\r\n }\r\n */\r\n\r\n // Define helper methods, called by derived classes,\r\n // to help implement the ControlValueAccessor interface.\r\n protected notifyValueChanged(): void {\r\n //this.fnPropagateChanges(this.formInstanceElement);\r\n this.callbackFunctions.fnPropagateChanges(this.formInstanceElement);\r\n //this.fnOnTouched();\r\n this.callbackFunctions.fnOnTouched();\r\n }\r\n\r\n protected notifyControlTouched(): void {\r\n this.touched.emit(this); // pharv - 4/14 - added for VNEXT-195 to support validation\r\n //this.fnOnTouched();\r\n this.callbackFunctions.fnOnTouched();\r\n\r\n if (this.mode != FormModeEnum.DESIGN) {\r\n this.FormControl.markAsTouched();\r\n this.formFieldValidated.emit(this.FormControl.status);\r\n }\r\n }\r\n\r\n protected notifyControlReceivedFocus(eventData: FocusEvent): void {\r\n this.callbackFunctions.onFocus.fnOnFocus(this.callbackFunctions.onFocus.registeringComponent, this, eventData);\r\n }\r\n\r\n // Define/implement private helper methods.\r\n\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[],\r\n arrAsyncValidatorsParam?: AsyncValidatorFn[]): void {\r\n let formFieldParam: FormField = this.FormField; // This temporarily allows us to continue using this method as originally coded/tested. \r\n\r\n // Delete any contents in the array.\r\n while (arrValidatorsParam.length > 0) {\r\n arrValidatorsParam.pop();\r\n }\r\n\r\n while (arrValidationMessagesParam.length > 0) {\r\n arrValidationMessagesParam.pop();\r\n }\r\n\r\n // Build an array of validators, if any.\r\n if (formFieldParam) {\r\n let fnValidator: ValidatorFn = null;\r\n let strMessage: string = null;\r\n let fieldName = formFieldParam.displayName || formFieldParam.name;\r\n\r\n //debugger;\r\n if (formFieldParam.required) {\r\n arrValidatorsParam.push(Validators.required);\r\n arrValidationMessagesParam.push({ type: 'required', message: `${fieldName} is required` });\r\n\r\n //VNEXT-610: KLW - Add the custom validation for no whitespace\r\n arrValidatorsParam.push(this.noWhitespaceValidator.bind(this));\r\n arrValidationMessagesParam.push({ type: this.wsValidatorName, message: `${fieldName} cannot accept whitespace as the only value` });\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n arrValidatorsParam.push(this.requireMatchAutoComplete.bind(this));\r\n arrValidationMessagesParam.push({ type: this.rmacValidatorName, message: `${fieldName} requires a value selected from the available options` });\r\n }\r\n\r\n if ((formFieldParam.maxLength !== null) && (formFieldParam.maxLength !== 0)) {\r\n let asyncFnc = this.asyncValidatorFn('maxLength', formFieldParam);\r\n if (asyncFnc != null) {\r\n arrAsyncValidatorsParam.push(asyncFnc);\r\n } else {\r\n arrValidatorsParam.push(Validators.maxLength(formFieldParam.maxLength));\r\n }\r\n\r\n strMessage = `${fieldName} cannot have more than ${formFieldParam.maxLength} characters`;\r\n arrValidationMessagesParam.push({ type: 'maxlength', message: strMessage });\r\n }\r\n\r\n // pharv - 11/3/2021 - added to get date field validation working\r\n if (formFieldParam.minDate) {\r\n let asyncFnc = this.asyncValidatorFn('minDate', formFieldParam);\r\n if (asyncFnc != null) {\r\n arrAsyncValidatorsParam.push(asyncFnc);\r\n } else {\r\n arrValidatorsParam.push(this.validatorFn('minDate', formFieldParam));\r\n }\r\n\r\n strMessage = `${fieldName} cannot be before ${this.formatDate(formFieldParam.minDate)}`;\r\n arrValidationMessagesParam.push({ type: 'minDate', message: strMessage });\r\n }\r\n\r\n // pharv - 11/3/2021 - added to get date field validation working\r\n if (formFieldParam.maxDate) {\r\n let asyncFnc = this.asyncValidatorFn('maxDate', formFieldParam);\r\n if (asyncFnc != null) {\r\n arrAsyncValidatorsParam.push(asyncFnc);\r\n } else {\r\n arrValidatorsParam.push(this.validatorFn('maxDate', formFieldParam));\r\n }\r\n\r\n strMessage = `${fieldName} cannot be after ${this.formatDate(formFieldParam.maxDate)}`;\r\n arrValidationMessagesParam.push({ type: 'maxDate', message: strMessage });\r\n }\r\n\r\n\r\n if ((formFieldParam.minValue !== undefined) && (formFieldParam.minValue !== null)) {\r\n fnValidator = Validators.min(formFieldParam.minValue);\r\n arrValidatorsParam.push(fnValidator);\r\n\r\n strMessage = `${fieldName} must be greater than or equal to ${formFieldParam.minValue}`;\r\n arrValidationMessagesParam.push({ type: 'min', message: strMessage });\r\n }\r\n\r\n if ((formFieldParam.maxValue !== undefined) && (formFieldParam.maxValue !== null)) {\r\n fnValidator = Validators.max(formFieldParam.maxValue);\r\n arrValidatorsParam.push(fnValidator);\r\n\r\n strMessage = `${fieldName} must be less than or equal to ${formFieldParam.maxValue}`;\r\n arrValidationMessagesParam.push({ type: 'max', message: strMessage });\r\n }\r\n\r\n if (formFieldParam.regex) {\r\n arrValidatorsParam.push(Validators.pattern(formFieldParam.regex));\r\n let msg = formFieldParam.regularExpressionConstraintMessage || `must match format '${formFieldParam.regex}'`;\r\n arrValidationMessagesParam.push({ type: 'pattern', message: `${fieldName}: ${msg}` });\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //VNEXT-610: KLW - This is a custom validator that will not accept whitespace\r\n private noWhitespaceValidator(control: UntypedFormControl) {\r\n var retVal: boolean = false;\r\n\r\n if (control.value) {\r\n if (control.value != '') {\r\n if (control.value.toString().trim().length == 0) {\r\n retVal = true;\r\n }\r\n }\r\n }\r\n\r\n return retVal ? { [this.wsValidatorName]: true } : null;\r\n }\r\n\r\n //VNEXT-538: KLW - Implementing Autocomplete\r\n private requireMatchAutoComplete(control: UntypedFormControl) {\r\n var retVal: boolean = false;\r\n let controlVal = '';\r\n\r\n if (control?.value?.constructor === Array && control?.value?.length > 0) {\r\n controlVal = control.value[0].toString(); //VNEXT-1354\r\n }\r\n else {\r\n controlVal = control.value == null ? '' : control.value.toString();\r\n }\r\n\r\n if (controlVal != '') {\r\n if (this.SelectOptions) {\r\n if (this.SelectOptions.length > 0) {\r\n if (!this.SelectOptions.includes(controlVal)) {\r\n retVal = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return retVal ? { [this.rmacValidatorName]: true } : null;\r\n }\r\n\r\n // NOOP by design\r\n // override in sub-class if it needs async validation of any property\r\n // (see RichTextFieldComponent for example)\r\n protected asyncValidatorFn(validationPropertyName: string, formFieldParam: FormField): AsyncValidatorFn {\r\n return null;\r\n }\r\n\r\n protected validatorFn(validationPropertyName: string, formFieldParam: FormField): ValidatorFn {\r\n return null;\r\n }\r\n\r\n private formatDate(dateString: string): string {\r\n let date = new Date(dateString);\r\n return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`;\r\n }\r\n\r\n // Tests to see if value has substantively/significantly changed by stripping all but alpha-numeric characters from the strings\r\n // This is needed because in some cases the wysiwyg text control adds spaces, line breaks and even s when it loads\r\n // This can end up looking as though the user has made changes when they have not, and leads to an\r\n // \"unsaved changes\" warning if they try to navigate away after simply viewing a FormInstance\r\n protected valueHasSubstantivelyChanged(valCurrent: string, valPrevious: string): boolean {\r\n if (!valPrevious) return false;\r\n\r\n let re = /
||
||<\\/span>|[^a-zA-Z0-9\"'.,\\/#!$%\\^&\\*;:{}=\\-_`~()]|&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/ig;\r\n let alphaNumericValCurrent = valCurrent?.replace(re, \"\"); // strip of all but alpha numeric values and punctuation\r\n let alphaNumericValPrevious = valPrevious?.replace(re, \"\");\r\n let changed = alphaNumericValCurrent !== alphaNumericValPrevious;\r\n return changed;\r\n }\r\n\r\n // Methods for logging errors or warnings.\r\n protected logWarning(message: string, componentClassName: string = this.getFormFieldClass().name): void {\r\n let warning = `${componentClassName}: ${message}`;\r\n console.log(warning);\r\n }\r\n}\r\n\r\n\r\n\r\n","

form-field-base works!

\n","import { IFieldNameToFormField } from '../../../interfaces/iform-field-component';\r\nexport class FieldNameHashes {\r\n public hshColNameToFormField: IFieldNameToFormField = null;\r\n public hshDisplayVariableNameToFormField: IFieldNameToFormField = null;\r\n public hshFieldIdToFieldName = {};\r\n}\r\n","import { FormField } from \"../../../models/form-builder/form-field.model\";\r\nimport { FieldNameHashes } from \"./field-name-hashes\";\r\nimport { GridRowDef } from \"../../../models/grid/grid-row.model\";\r\nimport { IGridRow } from \"../../../interfaces/grid-row.interface\";\r\nimport { IFieldNameToFormField } from \"../../../interfaces/iform-field-component\";\r\n\r\nexport class FormulaEvaluationHelper {\r\n CalculationError: string;\r\n FormField: FormField;\r\n FieldNameHashes: FieldNameHashes = new FieldNameHashes();\r\n\r\n private gridRow: GridRowDef;\r\n\r\n public get RoundTo(): number {\r\n let roundTo = 100;\r\n if (this.FormField.roundToNumDigitsAfterDecimalPoint) {\r\n roundTo = Math.pow(10, this.FormField.roundToNumDigitsAfterDecimalPoint);\r\n }\r\n return roundTo;\r\n }\r\n\r\n constructor() {\r\n }\r\n\r\n public init(formField: FormField, gridRow: IGridRow, gridRowColumnDefs: FormField[]): FormulaEvaluationHelper {\r\n this.FormField = formField;\r\n this.gridRow = (gridRow as GridRowDef);\r\n let variableNameToField: IFieldNameToFormField = {};\r\n let nameToField: IFieldNameToFormField = {};\r\n let fieldIdToFieldName = {};\r\n\r\n let col = 0;\r\n for (let field of gridRowColumnDefs) {\r\n col++;\r\n variableNameToField[`col${col}`] = field;\r\n nameToField[field.name] = field;\r\n fieldIdToFieldName[field.gridColClientId] = field.name;\r\n }\r\n\r\n this.FieldNameHashes.hshDisplayVariableNameToFormField = variableNameToField;\r\n this.FieldNameHashes.hshColNameToFormField = nameToField;\r\n this.FieldNameHashes.hshFieldIdToFieldName = fieldIdToFieldName;\r\n \r\n return this;\r\n }\r\n\r\n public set(formField: FormField, fieldNameHashes: FieldNameHashes) {\r\n this.FormField = formField;\r\n this.FieldNameHashes = fieldNameHashes;\r\n\r\n return this;\r\n }\r\n}\r\n","import { FormulaEvaluationHelper } from './formula-evaluation-helper';\r\nimport { INumericValuesHashByFieldName, IValuesByFieldName } from '../../../interfaces/grid-row.interface';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport * as math from 'mathjs';\r\n\r\nexport class FormulaEvaluator {\r\n // PJH - 10/15/2024 - Added for VNEXT-1419 (url builder field)\r\n public static evaluateUrl(formulaEvaluationHelper: FormulaEvaluationHelper, formulaParam: string, hshFieldValues: IValuesByFieldName): string {\r\n let formula: string = ((formulaParam != null) && (formulaParam.trim() != '') ? formulaParam.toLowerCase() : '');\r\n let result = FormulaEvaluator.replaceTokens(formula, hshFieldValues);\r\n return result;\r\n }\r\n\r\n // pharvey - 8/3/2023 - simplified it by removing first param and having all hash lookups\r\n // performed against the hashes in IFormulaEvaluationHelper.FieldNameHashes\r\n public static evaluateFormula(formulaEvaluationHelper: FormulaEvaluationHelper, formulaParam: string, hshValues: INumericValuesHashByFieldName = null): any {\r\n const parser: any = math.parser();\r\n\r\n let formula: string = ((formulaParam != null) && (formulaParam.trim() != '') ? formulaParam.toLowerCase() : '');\r\n\r\n // Build a scope object.\r\n FormulaEvaluator.buildComputationScope(formulaEvaluationHelper, parser.scope, hshValues);\r\n\r\n // Try to evalulate the expression.\r\n let result: number = 0;\r\n //let strError: string = null;\r\n\r\n try {\r\n result = parser.evaluate(formula);\r\n\r\n if ((result != null) && (!Number.isNaN(result))) {\r\n result = Math.round(result * formulaEvaluationHelper.RoundTo) / formulaEvaluationHelper.RoundTo;\r\n formulaEvaluationHelper.CalculationError = null;\r\n } else\r\n formulaEvaluationHelper.CalculationError = 'Calcuation error';\r\n } catch (error) {\r\n //strError = error.toString();\r\n formulaEvaluationHelper.CalculationError = error.toString();\r\n }\r\n\r\n // Construct and return a result.\r\n let hshResult = {\r\n result: result,\r\n error: formulaEvaluationHelper.CalculationError\r\n };\r\n\r\n return (hshResult);\r\n }\r\n\r\n // pharvey - 8/3/2023 - simplified it by removing first param and having all hash lookups\r\n // performed against the hashes in IFormulaEvaluationHelper.FieldNameHashes\r\n private static buildComputationScope(formulaEvaluationHelper: FormulaEvaluationHelper, parserScope: Map, hshValues: any = null): void {\r\n let colNameToFormFieldsHash = formulaEvaluationHelper.FieldNameHashes.hshColNameToFormField;\r\n for (let fieldName in colNameToFormFieldsHash) {\r\n let formField: FormField = colNameToFormFieldsHash[fieldName];\r\n\r\n if (formField.gridColClientId !== formulaEvaluationHelper.FormField.gridColClientId) {\r\n if (hshValues && hshValues[fieldName]) {\r\n parserScope.set(fieldName, hshValues[fieldName]);\r\n } else {\r\n parserScope.set(fieldName, 0);\r\n } // if-else\r\n } // if\r\n } // for\r\n\r\n // Add scope members for display variable names.\r\n for (let gridVariableName in formulaEvaluationHelper.FieldNameHashes.hshDisplayVariableNameToFormField) {\r\n let formField: FormField = formulaEvaluationHelper.FieldNameHashes.hshDisplayVariableNameToFormField[gridVariableName];\r\n\r\n if (formField.gridColClientId !== formulaEvaluationHelper.FormField.gridColClientId) {\r\n let fieldName: string =\r\n formulaEvaluationHelper.FieldNameHashes.hshFieldIdToFieldName[formField.gridColClientId];\r\n\r\n if (hshValues && hshValues[fieldName]) {\r\n parserScope.set(gridVariableName, hshValues[fieldName]);\r\n } else {\r\n parserScope.set(gridVariableName, 0);\r\n } // if-else\r\n } // if\r\n }\r\n\r\n //return (hshScope);\r\n }\r\n\r\n // Thank you, Google AI Overview\r\n private static replaceTokens(template, values): string {\r\n return template.replace(/\\{(\\w+)\\}/g, (match, token) => {\r\n if (values.hasOwnProperty(token)) {\r\n let value = values[token];\r\n if (!value) value = 'PARAM-IS-NOT-SET';\r\n return value;\r\n } else {\r\n return match;\r\n }\r\n });\r\n }\r\n}\r\n","\r\n
\r\n \r\n {{this.DisplayName}}\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n {{this.FormattedCalculatedValue}}\r\n \r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType,\r\n Input\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport {\r\n ControlValueAccessor,\r\n AsyncValidatorFn,\r\n FormGroup,\r\n UntypedFormControl,\r\n Validators,\r\n ValidatorFn,\r\n //ValidationErrors\r\n} from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { FormulaEvaluator } from './formula-evaluator';\r\nimport { FieldNameHashes } from './field-name-hashes'\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { IFieldNameToFormField } from '../../../interfaces/iform-field-component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { INumericValuesHashByFieldName, IGridRow } from '../../../interfaces/grid-row.interface';\r\n\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { ValidationMessageInfo } from '../form-field-base/form-field-base.component';\r\nimport { FormulaEvaluationHelper } from './formula-evaluation-helper';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-formula-form-field',\n templateUrl: './formula-form-field.component.html',\n styleUrls: ['./formula-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: FormulaFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class FormulaFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Instance data.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly previewModeValue: number = 0; // Used only in 'design' mode.\r\n // changed the next property to an Input so that an initial value can bet set\r\n @Input() calculatedValue: number = 0; // used in 'preview' and 'instance' modes.\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.FORMULA,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.ROUND_TO_NUM_DIGITS_AFTER_DECIMAL_POINT,\r\n FormFieldPropertyEnum.ROUND_TO_WHOLE_NUMBER,\r\n FormFieldPropertyEnum.SHOW_DIGITS_WITH_COMMA_SEPARATORS,\r\n FormFieldPropertyEnum.SHOW_DOLLAR_SIGN_PREFIX,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n 'Currency',\r\n 'Integer'\r\n ];\r\n\r\n private fieldNameHashes: FieldNameHashes = new FieldNameHashes();\r\n private readonly formulaCalculationErrorValidatorName = 'formulaCalculationError';\r\n private calculationError: string = null;\r\n\r\n // 01-27-2021: replaced the following variable with new property\r\n // 'transientHashOfOtherFieldValues' in model class\r\n // FormInstanceElement.\r\n //private hshFieldValues: any = {};\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2, private fieldDefinitionService: FieldDefinitionService) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshEventProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayFormatValues: this.displayFormats,\r\n\r\n // 04-07-2020 Note: the following two properties are new and\r\n // not yet implemented in the form builder\r\n // class.\r\n //\r\n // formFieldNamesRequired: indicates that this class needs\r\n // to know the names of other form\r\n // fields.\r\n // formFieldValueUpdatesRequired: indicates that this class\r\n // needs to be notified of\r\n // form field value changes.\r\n formFieldNamesRequired: true,\r\n formFieldValueUpdatesRequired: true,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshEventProperties);\r\n }\r\n\r\n public ngOnInit(): void {\r\n let hshEventProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshEventProperties);\r\n\r\n this.calculatedValue = this.FormInstanceElement.doubleValue;\r\n }\r\n\r\n // Accessor methods\r\n\r\n public get PreviewModeValue(): number {\r\n return (this.previewModeValue);\r\n }\r\n\r\n public get CalculatedValue(): number {\r\n return this.calculatedValue;\r\n }\r\n public get FormattedCalculatedValue(): string {\r\n // Apply any optional formatting properties.\r\n let value: number = this.formField.roundResultToWholeNumber == true ? Math.round(this.calculatedValue) : this.calculatedValue;\r\n let formattedValue: string = this.formField.showDigitsWithCommandSeparators ? value.toLocaleString() : `${value}`;\r\n if (this.formField.showDollarSignPrefix == true)\r\n formattedValue = `$ ${formattedValue}`;\r\n\r\n return formattedValue;\r\n }\r\n\r\n public get FieldNameHashes(): FieldNameHashes {\r\n return this.fieldNameHashes;\r\n }\r\n public set FieldNameHashes(value: FieldNameHashes) {\r\n this.fieldNameHashes = value;\r\n }\r\n public get CalculationError(): string {\r\n return this.calculationError;\r\n }\r\n public set CalculationError(value: string) {\r\n this.calculationError = value;\r\n }\r\n\r\n // Override methods defined in my base class.\r\n public receiveFormFieldNames(formFieldNamesParam: string[], hshColNameToFormFieldParam: IFieldNameToFormField): void {\r\n // Save the form field names.\r\n this.FieldNameHashes.hshColNameToFormField = hshColNameToFormFieldParam;\r\n\r\n this.FieldNameHashes.hshDisplayVariableNameToFormField = {};\r\n\r\n for (let fieldName in this.FieldNameHashes.hshColNameToFormField) {\r\n let gridFormField: FormField = this.FieldNameHashes.hshColNameToFormField[fieldName];\r\n\r\n this.FieldNameHashes.hshFieldIdToFieldName[gridFormField.gridColClientId] = fieldName;\r\n\r\n if (gridFormField.displayName) {\r\n let gridFieldVariableName: string = FormulaFormFieldComponent.displayNameToVariableName(gridFormField);\r\n\r\n this.FieldNameHashes.hshDisplayVariableNameToFormField[gridFieldVariableName] = gridFormField;\r\n }\r\n }\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if (propertyName === FormFieldPropertyEnum.FORMULA) {\r\n // Try to parse this formula.\r\n this.FormField.transientFormulaError = null;\r\n\r\n // pharv -- 8/4/2023 -- VNEXT-778 - while fixing the reported bug I factored evaluateFormula() out of this class and into the new FormulaEvaluator class\r\n // which is now called from this class and from other places in the codebase \r\n let helper = new FormulaEvaluationHelper().set(this.FormField, this.fieldNameHashes);\r\n let hshResult = FormulaEvaluator.evaluateFormula(helper, this.FormField.formula, null);\r\n\r\n if (hshResult) {\r\n if (hshResult['error']) {\r\n this.FormField.transientFormulaError = hshResult['error'];\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (this.FormField.defaultValue && (!Number.isNaN(parseFloat(this.FormField.defaultValue)))) {\r\n this.calculatedValue = parseFloat(this.FormField.defaultValue);\r\n } else {\r\n this.calculatedValue = 0;\r\n }\r\n } else {\r\n this.FormInstanceElement.DoubleValue = hshResult['result'];\r\n this.calculatedValue = hshResult['result']; //1\r\n this.FormField.transientFormulaError = null;\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public requiresFieldValueUpdate(): boolean {\r\n return true;\r\n }\r\n public formFieldValueUpdated(iColIndex: number, formFieldParam: FormField, formInstanceElement: FormInstanceElement, gridRow: IGridRow): boolean {\r\n // Determine the field's value.\r\n let numValue: number = 0.0;\r\n\r\n let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(formFieldParam.fieldDefinitionClassName);\r\n\r\n if (fieldDefinition.isNumeric) {\r\n if (formInstanceElement != null) {\r\n numValue = formInstanceElement.toNumber(formFieldParam, fieldDefinition.formInstanceElementPropertyName);\r\n }\r\n }\r\n\r\n // Save the value in the values hash.\r\n let hshDebugFieldValues: any = {};\r\n hshDebugFieldValues[`col${iColIndex + 1}`] = numValue;\r\n\r\n hshDebugFieldValues[`col${formFieldParam.id}`] = numValue;\r\n\r\n if (formFieldParam.displayName) {\r\n let displayVariableName: string = FormulaFormFieldComponent.displayNameToVariableName(formFieldParam);\r\n hshDebugFieldValues[displayVariableName] = numValue;\r\n }\r\n\r\n let hshFieldValues: INumericValuesHashByFieldName = gridRow.getNumericValuesHashByFieldName(this.fieldDefinitionService);\r\n\r\n let helper = new FormulaEvaluationHelper().set(this.FormField, this.fieldNameHashes);\r\n let hshResult = FormulaEvaluator.evaluateFormula(helper, this.FormField.formula, hshFieldValues);\r\n\r\n if (hshResult) {\r\n if (!hshResult['error']) {\r\n this.FormInstanceElement.DoubleValue = hshResult['result'];\r\n\r\n // 05-11-2023 note: setting the value synchronously can trigger\r\n // the ExpressionChangedAfterItHasBeenCheckedError\r\n // error, so it is safer to do it in the background.\r\n //this.calculatedValue = hshResult['result'];\r\n setTimeout(() => {\r\n this.calculatedValue = hshResult['result'];\r\n }, 0);\r\n }\r\n }\r\n\r\n // For now, always return true.\r\n return true;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n this.getNumericValue(formFieldParam, formInstanceElementParam, gridRow, processingPhase);\r\n\r\n return (formInstanceElementParam.doubleValue ? new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(formInstanceElementParam.doubleValue) : '');\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return FormulaFormFieldComponent;\r\n }\r\n\r\n // Override writeValueTriggered().\r\n protected writeValueTriggered(): void {\r\n super.writeValueTriggered();\r\n }\r\n\r\n // Override a base class method for building validators.\r\n //protected buildValidatorFunctionsAndMessages(arrValidatorsParam: ValidatorFn[], arrValidationMessagesParam: ValidationMessageInfo[], arrAsyncValidatorsParam?: AsyncValidatorFn[]): void {\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[],\r\n arrAsyncValidatorsParam?: AsyncValidatorFn[]): void {\r\n // First call super.\r\n super.buildValidatorFunctionsAndMessages(arrValidatorsParam, arrValidationMessagesParam, arrAsyncValidatorsParam);\r\n\r\n // Add my validator.\r\n { // Using a block to make it look like the code in the base class's method.\r\n let fieldName = this.FormField.displayName || this.FormField.name;\r\n\r\n arrValidatorsParam.push(Validators.required);\r\n arrValidationMessagesParam.push({ type: this.formulaCalculationErrorValidatorName, message: `${fieldName} calculation error` });\r\n\r\n //VNEXT-610: KLW - Add the custom validation for no whitespace\r\n arrValidatorsParam.push(this.formulaCalculationErrorValidator);\r\n arrValidationMessagesParam.push({ type: this.formulaCalculationErrorValidatorName, message: `${fieldName} has a calculation error` });\r\n }\r\n }\r\n\r\n // Implement private helper methods.\r\n private formulaCalculationErrorValidator(control: UntypedFormControl) {\r\n let retVal: boolean = false;\r\n\r\n if (control.value) {\r\n if (this.CalculationError != null) {\r\n retVal = true;\r\n }\r\n }\r\n\r\n return retVal ? { 'formulaCalculationError': true } : null;\r\n }\r\n\r\n private static displayNameToVariableName(formFieldParam: FormField): string {\r\n let variableName: string = formFieldParam.displayName.toLowerCase().replace(/ /g, '_');\r\n\r\n return variableName;\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return true;\r\n }\r\n public getNumericValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): number {\r\n if ((processingPhase === FormFieldProcessingPhaseEnum.EDITING_DATA) || (processingPhase === FormFieldProcessingPhaseEnum.LOADING_DATA) || (processingPhase === FormFieldProcessingPhaseEnum.CREATING_DATA)) {\r\n let hshFieldValues: INumericValuesHashByFieldName = gridRow.getNumericValuesHashByFieldName(this.fieldDefinitionService);\r\n\r\n if ((hshFieldValues != null) && (this.FieldNameHashes.hshColNameToFormField != null) && (formFieldParam.formula != null) && (formFieldParam.formula.trim() !== '')) {\r\n\r\n let helper = new FormulaEvaluationHelper().set(this.FormField, this.fieldNameHashes);\r\n let hshResult = FormulaEvaluator.evaluateFormula(helper, formFieldParam.formula, hshFieldValues);\r\n\r\n if (hshResult != null) {\r\n if (!hshResult['error']) {\r\n formInstanceElementParam.DoubleValue = hshResult['result'];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return formInstanceElementParam.doubleValue;\r\n }\r\n\r\n public hasCalculatedValue(): boolean {\r\n return (true);\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n OnDestroy,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n//import { Type, classToPlain, plainToClass } from \"class-transformer\";\r\n\r\nimport { CascadingDropDownFormFieldBaseComponent } from '../drop-down-form-field-base/drop-down-form-field-base.component';\r\nimport { HeaderValuePair } from '../../../models/csv-data/header-value-pair.model';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../../../models/cascading-dropdown/cascading-dropdown-data.model';\r\nimport { FormField, SecondaryGridCascadingFieldTransientData } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { StringUtil } from '../../../utility-classes/string.util';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { FormModeEnum } from '../../../enums/form-mode.enum';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\n\r\n// Define a class used by the component defined below.\r\nclass GridCascadingDummyAndTransientData {\r\n public dummyDropDownValues: number[] = [0];\r\n public dummyDropDownOptions: HeaderValuePair[] = [];\r\n\r\n //public formInstanceElements: FormInstanceElement[] = [];\r\n}\r\n\r\n@Component({\n selector: 'app-grid-cascading-dropdown-form-field',\n //templateUrl: './grid-cascading-dropdown.component.html',\n //templateUrl: '../cascading-drop-down-form-field/cascading-drop-down-form-field.component.html',\n templateUrl: '../drop-down-form-field-base/drop-down-form-field-base.component.html',\n styleUrls: [\n //'../cascading-drop-down-form-field/cascading-drop-down-form-field.component.scss',\n '../drop-down-form-field-base/drop-down-form-field-base.component.scss',\n '../form-fields.scss'\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: GridCascadingDropDownFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class GridCascadingDropDownFormFieldComponent extends CascadingDropDownFormFieldBaseComponent implements OnInit, OnDestroy {\r\n // Properties.\r\n //private dummyDropDownValues: number[] = [0];\r\n //private dummyDropDownOptions: string[] = ['TBD'];\r\n //private dummyDropDownOptions: HeaderValuePair[] = [];\r\n private transientData: GridCascadingDummyAndTransientData = new GridCascadingDummyAndTransientData();\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2,\r\n private injectedCurrentUserServiceForBaseClass: CurrentUserService) {\r\n super(injectedCurrentUserServiceForBaseClass);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n if (this.IsPrimaryCascadingField) {\r\n if ((this.FormField.cascadingDropdownConstraintValue != null) && (this.FormField.jsonConfig == null))\r\n this.FormField.jsonConfig = this.FormField.cascadingDropdownConstraintValue;\r\n\r\n this.saveJsonConfig(this.FormField.jsonConfig);\r\n this.parseConfig();\r\n } else {\r\n ; // this.myConfig = this.formField.transientCascadingDropdownConfig;\r\n //this.myConfig = this.Config;\r\n }\r\n\r\n if (this.mode != 'design') {\r\n //if (this.formField.fieldSecondaryOrder == null) {\r\n if (GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.FormField)) {\r\n // This is the first grid cascading dropdown form field in the series.\r\n //this.myData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.myConfig);\r\n //this.dropDownData = CascadingDropDownFormFieldData.createEmptyDataFromConfig(this.myConfig);\r\n this.createEmptyDataFromConfig();\r\n this.unpackFormInstanceElement();\r\n\r\n if (this.FormField.transientVirtualFormFields != null) {\r\n /*\r\n for (let index: number = 0; index < this.FormField.transientVirtualFormFields.length; index++) {\r\n let virtualFormField: FormField = this.FormField.transientVirtualFormFields[index];\r\n //virtualFormField.transientCascadingDropdownData = this.myData;\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n //virtualFormField.transientPrimaryGridCascadingDropDownComponent = this;\r\n //virtualFormField.transientCascadingDropdownConfig = this.Config;\r\n //virtualFormField.transientCascadingDropdownData = this.ProtectedAccessDropDownData; //this.dropDownData;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = this;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = this.Config;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData = this.ProtectedAccessDropDownData; //this.dropDownData;\r\n }\r\n */\r\n this.setupSecondaryFieldTransientData();\r\n } else {\r\n //console.log('Investigate');\r\n // Note: this branch can execute when the user saves a form instance.\r\n }\r\n } else {\r\n // This is a subsequent form field in the grid cascading dropdown form field series.\r\n //this.myData = this.formField.transientCascadingDropdownData;\r\n //this.myData = this.Data; // this.formField.transientCascadingDropdownData;\r\n this.unpackFormInstanceElement();\r\n }\r\n\r\n this.saveMyFormInstanceElementInDropDownData();\r\n }\r\n\r\n let dummyDropDownOption: HeaderValuePair = new HeaderValuePair();\r\n //this.dummyDropDownOptions.push(dummyDropDownOption);\r\n this.transientData.dummyDropDownOptions.push(dummyDropDownOption);\r\n\r\n //super.ngOnInit();\r\n // Let my parent know what properties I support.\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n }\r\n\r\n // IMPORTANT METHOD: this method needs to be called when the primary grid cascading form field is setting up.\r\n // Presently this method is called in two places:\r\n //\r\n // ngOnInit() and\r\n // unpackFormInstanceElement().\r\n //\r\n // Basically, this method allows the primary of N grid cascading form fields to make its\r\n // data visible to the sibling/secondary/virtual grid cascading form fields.\r\n //\r\n // Without doing this, the secondary grid cascading form fields could end up looking at\r\n // old/obsolete data.\r\n //\r\n // The data setup here is, importantly, accessed by secondary grid cascading dropdown\r\n // form fields in the \"get Config\" and \"get Data()\" methods. When data is retrieved\r\n // from the server, either on a form instance load or after a form instance save, failing\r\n // to perform the setup executed in the following method will cause the secondary grid\r\n // cascading form fields to see obsolete data in the \"get Data()\" method.\r\n //\r\n // I (SWH) will work on trying to figure out a simpler way for this to work, but in the\r\n // meantime I am adding this comment to convey the importance of the fields this method\r\n // configures.\r\n private setupSecondaryFieldTransientData(): void {\r\n /*\r\n for (let index: number = 0; index < this.FormField.transientVirtualFormFields.length; index++) {\r\n let virtualFormField: FormField = this.FormField.transientVirtualFormFields[index];\r\n \r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n //virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = this;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = this.Config;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData = this.ProtectedAccessDropDownData; //this.dropDownData;\r\n }\r\n */\r\n this.FormField.setupSecondaryFieldTransientData(this, this.Config, this.ProtectedAccessDropDownData);\r\n }\r\n\r\n protected get hasDisplayFormatProperty(): boolean {\r\n return false;\r\n }\r\n\r\n public configureAnySecondaryComponents(): void {\r\n if ((this.mode != 'design') && GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.FormField)) {\r\n /*\r\n if (this.FormField.transientVirtualFormFields != null) {\r\n for (let index: number = 0; index < this.FormField.transientVirtualFormFields.length; index++) {\r\n let virtualFormField: FormField = this.FormField.transientVirtualFormFields[index];\r\n //virtualFormField.transientCascadingDropdownData = this.myData;\r\n //virtualFormField.transientCascadingDropdownData = this.dropDownData;\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n //virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n //virtualFormField.transientPrimaryGridCascadingDropDownComponent = this;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = this;\r\n }\r\n }\r\n */\r\n this.FormField.configureAnySecondaryComponents(this);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n super.ngOnDestroy();\r\n }\r\n\r\n // Define methods called from secondary grid cascading dropdown form field\r\n // component to the primary grid cascading dropdown form field of the group.\r\n public get UsesMainFieldLabel(): boolean {\r\n return false;\r\n }\r\n public get IsPrimaryCascadingField(): boolean {\r\n return GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.FormField);\r\n }\r\n public get IsSecondaryCascadingField(): boolean {\r\n return GridCascadingDropDownFormFieldComponent.isSecondaryCascadingField(this.FormField);\r\n }\r\n public get HasConfig(): boolean {\r\n let hasConfig: boolean = false;\r\n\r\n if (this.IsPrimaryCascadingField)\r\n //hasConfig = this.myConfig != null;\r\n hasConfig = this.ProtectedAccessConfig != null;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null))\r\n //hasConfig = this.formField.transientPrimaryGridCascadingDropDownComponent.myConfig != null;\r\n //hasConfig = this.formField.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessConfig != null;\r\n hasConfig = this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessConfig != null;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientCascadingDropdownConfig != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig != null))\r\n hasConfig = true;\r\n\r\n return hasConfig;\r\n }\r\n public get Config(): CascadingDropDownFormFieldConfig {\r\n //return this.myConfig;\r\n let result: CascadingDropDownFormFieldConfig = null;\r\n\r\n if (this.IsPrimaryCascadingField)\r\n //result = this.myConfig;\r\n result = this.ProtectedAccessConfig;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null))\r\n //result = this.formField.transientPrimaryGridCascadingDropDownComponent.Config;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.Config;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientCascadingDropdownConfig != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig != null))\r\n //result = this.formField.transientCascadingDropdownConfig;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig;\r\n else {\r\n throw `GridCascadingDropDownFormFieldComponent.Config(): cannot get a value`;\r\n }\r\n\r\n return result;\r\n }\r\n public get HasData(): boolean {\r\n let hasData: boolean = false;\r\n\r\n if (this.IsPrimaryCascadingField)\r\n //hasData = this.dropDownData != null;\r\n hasData = this.ProtectedAccessDropDownData != null;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null))\r\n //hasData = this.formField.transientPrimaryGridCascadingDropDownComponent.dropDownData != null;\r\n //hasData = this.formField.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessDropDownData != null;\r\n hasData = this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessDropDownData != null;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientCascadingDropdownData != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData != null))\r\n //hasData = this.formField.transientCascadingDropdownData != null;\r\n hasData = this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData != null;\r\n\r\n return hasData;\r\n }\r\n public get Data(): CascadingDropDownFormFieldData {\r\n //return this.myData;\r\n let result: CascadingDropDownFormFieldData = null;\r\n\r\n if (this.IsPrimaryCascadingField) {\r\n //result = this.myData;\r\n //result = this.dropDownData;\r\n result = this.ProtectedAccessDropDownData;\r\n //} else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n } else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData! == null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n //result = this.formField.transientPrimaryGridCascadingDropDownComponent.Data;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.Data;\r\n //} else if (this.IsSecondaryCascadingField && (this.formField.transientCascadingDropdownData != null)) {\r\n } else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData != null)) {\r\n //result = this.formField.transientCascadingDropdownData;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData;\r\n } else {\r\n throw `GridCascadingDropDownFormFieldComponent.Data(): cannot get a value`;\r\n }\r\n\r\n return result;\r\n }\r\n public get LastHeaderSelectedIndex(): number {\r\n //return this.lastHeaderSelectedIndex;\r\n let result: number = -1;\r\n\r\n if (this.IsPrimaryCascadingField) {\r\n //result = this.lastHeaderSelectedIndex;\r\n result = this.ProtectedAccessLastHeaderSelectedIndex;\r\n //} else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n } else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n //result = this.formField.transientPrimaryGridCascadingDropDownComponent.LastHeaderSelectedIndex;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.LastHeaderSelectedIndex;\r\n //} else if (this.IsSecondaryCascadingField && (this.formField.transientCascadingDropdownData != null)) {\r\n } else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData != null)) {\r\n //result = this.formField.transientCascadingDropdownData.lastHeaderSelectedIndex;\r\n result = this.FormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData.lastHeaderSelectedIndex;\r\n } else {\r\n throw `GridCascadingDropDownFormFieldComponent.LastHeaderSelectedIndex(): cannot get a value`;\r\n }\r\n\r\n return result;\r\n }\r\n public set LastHeaderSelectedIndex(value: number) {\r\n if (this.IsPrimaryCascadingField)\r\n //this.lastHeaderSelectedIndex = value;\r\n this.ProtectedAccessLastHeaderSelectedIndex = value;\r\n //else if (this.IsSecondaryCascadingField && (this.formField.transientPrimaryGridCascadingDropDownComponent != null))\r\n else if (this.IsSecondaryCascadingField && (this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null))\r\n //this.formField.transientPrimaryGridCascadingDropDownComponent.LastHeaderSelectedIndex = value;\r\n this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.LastHeaderSelectedIndex = value;\r\n else {\r\n throw `GridCascadingDropDownFormFieldComponent.LastHeaderSelectedIndex(): cannot set a value`;\r\n }\r\n }\r\n // End methods called by HTML code.\r\n\r\n public registerVirtualFormFieldFormInstanceElement(virtualFormField: FormField, formInstanceElement: FormInstanceElement): void {\r\n if (this.HasData && (virtualFormField.fieldSecondaryOrder != null) &&\r\n (this.Data.formInstanceElements != null) &&\r\n //(this.transientData.formInstanceElements != null) &&\r\n (virtualFormField.fieldSecondaryOrder < this.Data.formInstanceElements.length)) {\r\n //(virtualFormField.fieldSecondaryOrder < this.transientData.formInstanceElements.length)) {\r\n this.Data.formInstanceElements.splice(virtualFormField.fieldSecondaryOrder, 1, formInstanceElement);\r\n //this.transientData.formInstanceElements.splice(virtualFormField.fieldSecondaryOrder, 1, formInstanceElement);\r\n } else {\r\n let errorMsg = `registerVirtualFormFieldFormInstanceElement(): cannot register a form instance element for virtual form field '${virtualFormField.name}'!`;\r\n throw errorMsg;\r\n //console.log(errorMsg);\r\n }\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (GridCascadingDropDownFormFieldComponent);\r\n }\r\n\r\n // Override my required minimum height and other base class methods.\r\n protected parseConfig(): void {\r\n super.parseConfig();\r\n\r\n if (this.IsPrimaryCascadingField && (this.Config != null)) {\r\n /*\r\n this.transientData.formInstanceElements = [];\r\n for (let index: number = 0; index < this.Config.dropDownHeaders.length; index++) {\r\n let blankDummyFormInstanceElement = new FormInstanceElement();\r\n this.transientData.formInstanceElements.push(blankDummyFormInstanceElement);\r\n }\r\n */\r\n }\r\n }\r\n protected get displayPropertiesEditIcon(): boolean {\r\n return GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.FormField);\r\n }\r\n\r\n protected get minHeightRequired(): number {\r\n return 70;\r\n }\r\n\r\n public get AdditionalMatFormFieldStyles(): string {\r\n return 'margin-top: 0px;';\r\n }\r\n\r\n // Override some methods called by my HTML code.\r\n public get DropDownHeaders(): string[] {\r\n let dropdownHeaders: string[] = [];\r\n\r\n //if (true) {\r\n //if ((this.myConfig != null) &&\r\n if ((this.ProtectedAccessConfig != null) &&\r\n //(this.formField.primaryFieldName == null)) {\r\n GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.FormField)) {\r\n //let configHeaders: string[] = this.myConfig.dropDownHeaders;\r\n let configHeaders: string[] = this.Config.dropDownHeaders;\r\n\r\n if ((configHeaders != null) && (configHeaders.length > 0))\r\n dropdownHeaders.push(configHeaders[0]);\r\n //} else if ((this.formField.transientCascadingDropdownConfig != null) &&\r\n } else if (this.HasConfig &&\r\n (this.FormField.primaryFieldName != null) &&\r\n (this.FormField.fieldSecondaryOrder != null)) {\r\n //GridCascadingDropDownFormFieldComponent.isSecondaryCascadingField(this.formField)) {\r\n //let configHeaders: string[] = this.formField.transientCascadingDropdownConfig.dropDownHeaders;\r\n let configHeaders: string[] = this.Config.dropDownHeaders;\r\n\r\n if ((configHeaders != null) &&\r\n //(this.formField.fieldSecondaryOrder != null) &&\r\n //(this.formField.fieldSecondaryOrder < configHeaders.length)) {\r\n GridCascadingDropDownFormFieldComponent.isSecondaryCascadingField(this.FormField)) {\r\n dropdownHeaders.push(configHeaders[this.FormField.fieldSecondaryOrder]);\r\n }\r\n }\r\n /*\r\n } else {\r\n dropdownHeaders = super.DropDownHeaders;\r\n // More logic to do here.\r\n }\r\n */\r\n\r\n return dropdownHeaders;\r\n }\r\n\r\n public get HeaderIndexOffset(): number {\r\n let headerIndexOffset: number = 0;\r\n\r\n if ((this.mode != 'design') && (this.FormField.fieldSecondaryOrder != null))\r\n headerIndexOffset = this.FormField.fieldSecondaryOrder;\r\n\r\n return headerIndexOffset;\r\n }\r\n public DropDownOptionsForHeader(iHeader: number): HeaderValuePair[] {\r\n //let headerValuePairs = (this.mode == 'design' ? this.dummyDropDownOptions : super.DropDownOptionsForHeader(iHeader));\r\n let headerValuePairs = (this.mode == 'design' ? this.transientData.dummyDropDownOptions : super.DropDownOptionsForHeader(iHeader));\r\n return headerValuePairs;\r\n }\r\n private privateDropDownOptionsForHeader(iHeader: number): HeaderValuePair[] {\r\n //let headerValuePairs = (this.mode == 'design' ? this.dummyDropDownOptions : super.DropDownOptionsForHeader(iHeader));\r\n let headerValuePairs = (this.mode == 'design' ? this.transientData.dummyDropDownOptions : super.DropDownOptionsForHeader(iHeader));\r\n return headerValuePairs;\r\n }\r\n public get DropDownValues(): number[] {\r\n //let dropDownValues = (this.mode == 'design' ? this.dummyDropDownValues : super.DropDownValues);\r\n //let dropDownValues = this.dummyDropDownValues;\r\n let dropDownValues = this.transientData.dummyDropDownValues;\r\n if (this.mode != 'design') {\r\n //let myHeaderIndex = (this.formField.fieldSecondaryOrder == null ? 0 : this.formField.fieldSecondaryOrder);\r\n //dropDownValues = super.DropDownValues.slice(0, myHeaderIndex);\r\n dropDownValues = super.DropDownValues;\r\n }\r\n return dropDownValues;\r\n }\r\n\r\n // Override other base class methods.\r\n protected formInstanceElementReceived(): void {\r\n super.formInstanceElementReceived();\r\n\r\n this.FormInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n\r\n if (this.mode != 'design') {\r\n // Save my form instance element in 'myData'.\r\n this.saveMyFormInstanceElementInDropDownData();\r\n }\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n super.formInstanceElementReceived();\r\n\r\n this.FormInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n\r\n if (this.mode != 'design') {\r\n // Save my form instance element in 'myData'.\r\n this.saveMyFormInstanceElementInDropDownData();\r\n }\r\n }\r\n\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n if (this.IsPrimaryCascadingField) {\r\n super.saveConfiguration(form, reasonForSave);\r\n }\r\n\r\n }\r\n public saveConfigurationCompleted(form: any): void {\r\n }\r\n\r\n public saveData(formInstance: any): void {\r\n super.saveData(formInstance);\r\n\r\n if (this.IsPrimaryCascadingField) {\r\n // We need to set property 'transientVirtualFormFields' to null prior to a save\r\n // as it would cause a JSON serialization exception. Since this form field type\r\n // is only used in grids, and grid form fields components are deleted/destroyed\r\n // as a part of a grid save operation, there is no need to restore the value for\r\n // this property.\r\n if (this.HasData)\r\n this.Data.formInstanceElements = null;\r\n if (this.FormField.transientVirtualFormFields != null)\r\n this.FormField.transientVirtualFormFields = null;\r\n //} else if (this.formField.transientPrimaryGridCascadingDropDownComponent != null) {\r\n } else if ((this.FormField.secondaryGridCascadingFieldTransientData != null) && (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n // This property needs to be set to null for the same reason as in the prior block.\r\n //this.formField.transientPrimaryGridCascadingDropDownComponent = null;\r\n this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = null;\r\n }\r\n\r\n super.saveData(formInstance);\r\n\r\n return;\r\n }\r\n public saveCompleted(formInstance: any): void {\r\n super.saveCompleted(formInstance);\r\n }\r\n\r\n protected unpackFormInstanceElement(): void {\r\n let hasConfig: boolean =\r\n (this.IsPrimaryCascadingField && (this.ProtectedAccessConfig != null)) ||\r\n //((this.formField.transientPrimaryGridCascadingDropDownComponent != null) && (this.formField.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessConfig != null));\r\n ((this.FormField.secondaryGridCascadingFieldTransientData != null) &&\r\n (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null) &&\r\n (this.FormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent.ProtectedAccessConfig != null));\r\n\r\n if (hasConfig) {\r\n if (this.IsPrimaryCascadingField) {\r\n this.createEmptyDataFromConfig();\r\n this.setupSecondaryFieldTransientData();\r\n }\r\n this.saveMyFormInstanceElementInDropDownData();\r\n\r\n if ((this.FormInstanceElement != null) && (this.FormInstanceElement.textValue != null) && (this.FormInstanceElement.textValue.trim() != '')) {\r\n let myHeaderIndex: number = (this.IsPrimaryCascadingField ? 0 : this.FormField.fieldSecondaryOrder);\r\n //this.Data.dropDownValues[myHeaderIndex] = 0; // Start with this and try to find a non-zero value.\r\n this.Data.setDropDownValue(myHeaderIndex, 0);\r\n let options: HeaderValuePair[] = this.privateDropDownOptionsForHeader(myHeaderIndex);\r\n if (options != null) {\r\n let option = options.find(hvp => hvp.ValueText == this.FormInstanceElement.textValue);\r\n if (option != null) {\r\n //this.Data.dropDownValues[myHeaderIndex] = option.Index;\r\n this.Data.setDropDownValue(myHeaderIndex, option.Index);\r\n this.Data.setDropDownTextValue(myHeaderIndex, this.FormInstanceElement.textValue);\r\n\r\n if (this.LastHeaderSelectedIndex < myHeaderIndex)\r\n this.LastHeaderSelectedIndex = myHeaderIndex;\r\n }\r\n }\r\n } // if\r\n }\r\n }\r\n\r\n // Define methods still to be implemented.\r\n public getSelectedValue(value: string, optionIndex: number, headerIndex: number): string {\r\n // Note: this method might require enhancements ... will test to determine.\r\n return value;\r\n }\r\n\r\n /*\r\n public displayDeleteIconInGrid(): boolean {\r\n return this.IsPrimaryCascadingField;\r\n }\r\n */\r\n\r\n public dropDownValueChanged(iHeaderParam: number): void {\r\n let debugIndex: number = 0;\r\n super.dropDownValueChanged(iHeaderParam);\r\n if (this.mode != 'design') {\r\n debugIndex = iHeaderParam;\r\n }\r\n }\r\n protected headerValueChanged(iHeader: number, selectedValue: number): void {\r\n // Note: this method can be overriden by derived classes.\r\n if ((this.Data != null) && (this.Data.formInstanceElements != null) && (iHeader < this.Data.formInstanceElements.length)) {\r\n //if ((this.Data != null) && (this.transientData.formInstanceElements != null) && (iHeader < this.transientData.formInstanceElements.length)) {\r\n let formInstanceElement = this.Data.formInstanceElements[iHeader];\r\n //let formInstanceElement = this.transientData.formInstanceElements[iHeader];\r\n this.saveHeaderValue(iHeader, formInstanceElement);\r\n }\r\n }\r\n protected saveChangedDataToFormInstanceElement(): void {\r\n super.saveChangedDataToFormInstanceElement();\r\n\r\n this.saveHeaderValue(this.HeaderIndexOffset, this.FormInstanceElement);\r\n\r\n // As this is the last method called when a dropdown value is changed,\r\n // let us print out all of the cascading dropdown values here (while\r\n // we are in development mode).\r\n //this.printDropDownValueData();\r\n }\r\n private saveHeaderValue(myHeaderIndex: number, formInstanceElement: FormInstanceElement): void {\r\n if (this.Data != null) {\r\n if (myHeaderIndex < this.Data.dropDownValues.length) {\r\n let myOneBasedIndexValue = this.Data.dropDownValues[myHeaderIndex];\r\n let dropDownValuesForMyHeader: HeaderValuePair[] = this.DropDownOptionsForHeader(myHeaderIndex);\r\n let myDropDownValue: HeaderValuePair = dropDownValuesForMyHeader.find(ddv => ddv.Index == myOneBasedIndexValue);\r\n if (myDropDownValue != null) {\r\n formInstanceElement.textValue = myDropDownValue.ValueText;\r\n } else {\r\n formInstanceElement.textValue = null;\r\n }\r\n }\r\n }\r\n }\r\n /*\r\n private printDropDownValueData(): void {\r\n if ((this.Data != null) && (this.transientData.formInstanceElements != null)) {\r\n for (let index: number = 0; index < this.transientData.formInstanceElements.length; index++) {\r\n let formInstanceElement: FormInstanceElement = this.transientData.formInstanceElements[index];\r\n }\r\n }\r\n }\r\n */\r\n\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n return (formInstanceElementParam ? formInstanceElementParam.textValue : null);\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n // 10-19-2022 notes: presently paste data validation is not being performed in this method or the\r\n // method with the same signature in the form version of the cascading dropdown\r\n // form field.\r\n //\r\n // As this method is being called on a \"stand in\" component instance, one that\r\n // is not instantiated as a visible form field, we cannot use instance data\r\n // such as that used in getter method this.HeaderIndexOffset. Additionally,\r\n // we will need to pass in a FormField parameter to this method in order to\r\n // allow this implementation of the method to know what cascading dropdown\r\n // form field to use for paste value validation.\r\n //\r\n // We should consider making it clear when a method cannot assume that its\r\n // instance data can be used.\r\n //let headerValuePairs: HeaderValuePair[] = this.DropDownOptionsForHeader(this.HeaderIndexOffset);\r\n\r\n if ((elementWrapper != null) && (elementWrapper.formInstanceElement != null)) {\r\n elementWrapper.formInstanceElement.textValue = value;\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n elementWrapper.standinDisplayValue = value;\r\n }\r\n }\r\n\r\n // Override base class methods.\r\n protected csvOptionsFileProcessed(): void {\r\n if ((this.ProtectedAccessConfig != null) && (this.ProtectedAccessConfig.dropDownHeaders != null) && (this.ProtectedAccessConfig.dropDownHeaders.length > 0)) {\r\n if (StringUtil.isEmptyString(this.FormField.displayName) || (this.FormField.displayName == this.FormField.name)) {\r\n this.FormField.displayName = this.ProtectedAccessConfig.dropDownHeaders[0];\r\n }\r\n }\r\n\r\n // Also call super.\r\n super.csvOptionsFileProcessed();\r\n }\r\n\r\n // Private helper methods.\r\n private saveMyFormInstanceElementInDropDownData(): void {\r\n if ((this.FormField != null) &&\r\n //(this.formField.transientPrimaryGridCascadingDropDownComponent != null) &&\r\n (this.HasData) && (this.Data != null) && (this.Data.formInstanceElements != null) &&\r\n //(this.Data != null) && (this.transientData.formInstanceElements != null) &&\r\n (this.HeaderIndexOffset < this.Data.formInstanceElements.length)) {\r\n //(this.HeaderIndexOffset < this.transientData.formInstanceElements.length)) {\r\n // Save my field name in the form instance element (development code only).\r\n this.FormInstanceElement.transientGridCascadingDropDownName = this.FormField.name;\r\n\r\n this.Data.formInstanceElements.splice(this.HeaderIndexOffset, 1, this.FormInstanceElement);\r\n //this.transientData.formInstanceElements.splice(this.HeaderIndexOffset, 1, this.FormInstanceElement);\r\n }\r\n }\r\n\r\n /*\r\n private saveAllFormInstanceElementsInDropDownData(): void {\r\n if (GridCascadingDropDownFormFieldComponent.isPrimaryCascadingField(this.formField) &&\r\n (this.Data != null) && (this.Data.formInstanceElements != null)) {\r\n this.saveMyFormInstanceElementInDropDownData();\r\n }\r\n }\r\n */\r\n\r\n private static isPrimaryCascadingField(formField: FormField): boolean {\r\n return (formField.primaryFieldName == null);\r\n }\r\n private static isSecondaryCascadingField(formField: FormField): boolean {\r\n return ((formField.primaryFieldName != null) && (formField.fieldSecondaryOrder != null));\r\n }\r\n\r\n protected jsonConfigSaved(): void {\r\n if (this.mode == FormModeEnum.INSTANCE) {\r\n //this.formField.jsonConfig = null; // Cannot set this to null for a grid cascading dropdown form field.\r\n this.FormField.cascadingDropdownConstraintValue = null;\r\n }\r\n }\r\n protected preparingToSaveToServer(): void {\r\n if (this.IsPrimaryCascadingField) {\r\n if (this.FormField.cascadingDropdownConstraintValue != null)\r\n this.FormField.jsonConfig = null;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, ComponentFactoryResolver } from '@angular/core';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\n\r\nimport { GridAllModesDataSource } from '../../../models/grid/grid-data-source.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { GridFormFieldComponent } from '../grid-form-field/grid-form-field.component';\r\nimport { FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { FieldTypeAndName, IFieldTypeToFieldInfo, } from '../../../services/form-field-type-and-name.service';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { IFormFieldDisplayHint } from '../form-field-base/form-field-base.component';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { IFieldNameToFormField, IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { ComponentAndFormField } from '../../../models/grid/component-and-form-field-model';\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { KendoGridBaseComponent } from '../kendo-grid-base/kendo-grid-base.component';\r\nimport { AttachmentStandardColumnNames } from '../../../enums/grid.enums';\r\n\r\n// Define constants used below.\r\nexport const GRID_ROW_ID_KEY: string = 'gridRowId';\r\n\r\n// This is the base class for both GridFieldDesigner and GridFieldEditor\r\n\r\n@Component({\n selector: 'app-DO-NOT-USE-grid-designer-editor-base',\n templateUrl: './grid-designer-editor-base.html',\n styleUrls: ['../grid-form-field/grid-form-field.component.scss'],\n standalone: false\n})\r\nexport class GridDesignerEditorBase extends KendoGridBaseComponent {\r\n // Input(s).\r\n @Input() gridFormFieldComponent: GridFormFieldComponent;\r\n @Input() isFootnotesGrid: boolean = false;\r\n\r\n // Constructor.\r\n protected constructor(protected formFieldTypeAndNameService: FormFieldTypeAndNameService,\r\n protected fieldDefinitionService: FieldDefinitionService,\r\n protected resolver: ComponentFactoryResolver) {\r\n super();\r\n }\r\n\r\n // Begin called by HTML code.\r\n public get AllModesDataSource(): GridAllModesDataSource {\r\n return this.gridFormFieldComponent.AllModesDataSource;\r\n }\r\n\r\n // PJH - 11/6/2024 - added the filtering \r\n public get GridColumnDefs(): FormField[] {\r\n return this.gridFormFieldComponent.GridColumnDefs.filter(x => !x.doNotDisplayInGrid);\r\n }\r\n public set GridColumnDefs(colDefs: FormField[]) {\r\n this.gridFormFieldComponent.GridColumnDefs = colDefs;\r\n }\r\n public get ExpandableGridColumnDefs(): FormField[] {\r\n // Note: this method is not yet properly implemented.\r\n return this.gridFormFieldComponent.GridColumnDefs;\r\n }\r\n public GridColumnNames(bIncludeAddColumn: boolean = false): string[] {\r\n let astrColumnNames: string[] = this.gridFormFieldComponent.GridConfig.GridColumnNames;\r\n astrColumnNames = this.GridColumnDefs.map(ff => ff.name);\r\n\r\n if (bIncludeAddColumn) {\r\n astrColumnNames.push(\"Add Grid Column\");\r\n }\r\n\r\n return (astrColumnNames);\r\n }\r\n\r\n public get FieldTypesAndNames(): FieldTypeAndName[] {\r\n let fieldTypesAndNameFields = this.formFieldTypeAndNameService.getAllGridFieldTypesAndNameFields();\r\n return fieldTypesAndNameFields;\r\n }\r\n\r\n public get FormFieldDisplayHints(): IFormFieldDisplayHint {\r\n return this.gridFormFieldComponent.FormFieldDisplayHints;\r\n }\r\n\r\n public get ReadOnly(): boolean {\r\n return this.gridFormFieldComponent.ReadOnly;\r\n }\r\n\r\n public get ShowNumericTotalsFooter(): boolean {\r\n return (this.gridFormFieldComponent.FormField ? this.gridFormFieldComponent.FormField.showFooter === true : false);\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n return position;\r\n }\r\n\r\n public getKendoGridColumnWidth(columnDef: FormField): number {\r\n return 300;\r\n }\r\n\r\n public getColumnTooltip(iColIndex: number, hshColumnDef: FormField): string {\r\n let columnTooltip: string = ''; // A default value.\r\n\r\n if (hshColumnDef.toolTip && (hshColumnDef.toolTip.trim() !== '')) {\r\n columnTooltip = hshColumnDef.toolTip;\r\n }\r\n\r\n return columnTooltip;\r\n }\r\n public get Mode(): string {\r\n return this.gridFormFieldComponent.Mode;\r\n }\r\n // End called by HTML code.\r\n\r\n // Handle ngModel logic.\r\n public handleNgModelChangeLogic(gridRow: GridRowDef, formField: FormField, wrapper: GridFormInstanceElementWrapper, processingPhase: FormFieldProcessingPhaseEnum = FormFieldProcessingPhaseEnum.EDITING_DATA): void {\r\n let formInstanceElement: FormInstanceElement = wrapper.formInstanceElement;\r\n\r\n // Update the wrapper's 'stand-in' value.\r\n let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(formField.fieldDefinitionClassName);\r\n let fieldLogicHandler: IFieldDefinitionLogic = fieldTypeAndName != null ? this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType).customLogicHandler : null;\r\n\r\n if ((fieldTypeAndName != null) && (fieldLogicHandler != null)) {\r\n //let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType);\r\n //let fieldLogicHandler: IFieldDefinitionLogic = fieldDefinition.customLogicHandler;\r\n wrapper.standinDisplayValue = fieldLogicHandler.getDisplayValue(formField, wrapper.formInstanceElement, gridRow, processingPhase);\r\n }\r\n\r\n // If any fields are listening for value changes, let them know about this update.\r\n let iColIndex: number = this.gridFormFieldComponent.GridConfig.ColumnIndex(formField);\r\n let affectedComponents: IFormFieldComponent[] = null;\r\n\r\n if (iColIndex >= 0) {\r\n affectedComponents = this.notifyComponentsOfValueChanges(iColIndex, formField, formInstanceElement, gridRow);\r\n }\r\n\r\n // If we have a numeric totals footer.\r\n if (this.ShowNumericTotalsFooter && (fieldTypeAndName != null) && fieldLogicHandler.hasNumericData) {\r\n let numericValue: number = fieldTypeAndName.componentRepresentative.getNumericValue(formField, formInstanceElement, gridRow, FormFieldProcessingPhaseEnum.CALCULATING_COLUMN_TOTAL)\r\n\r\n this.gridFormFieldComponent.AllModesDataSource.cellValueChanged(gridRow, formField, fieldLogicHandler, numericValue);\r\n\r\n // Were other components affected by this change?\r\n // Note: \"other components\" would most likely be a formula form field.\r\n if ((affectedComponents != null) && (affectedComponents.length > 0)) {\r\n for (let iComp: number = 0; iComp < affectedComponents.length; iComp++) {\r\n let comp: IFormFieldComponent = affectedComponents[iComp];\r\n let compFormField: FormField = comp.getFormField();\r\n let compFormInstanceElement: FormInstanceElement = comp.getFormInstanceElement();\r\n\r\n let affectedComponentNumericValue: number = comp.getNumericValue(compFormField, compFormInstanceElement, gridRow, FormFieldProcessingPhaseEnum.CALCULATING_COLUMN_TOTAL);\r\n this.gridFormFieldComponent.AllModesDataSource.cellValueChanged(gridRow, compFormField, fieldLogicHandler, affectedComponentNumericValue);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public gridColumnInit(hshEventData: any, hshUnusedColumnDef: FormField): void {\r\n // Note: will want to redo the implementation of the method called on the next line\r\n // to stop using component 'representatives', switching to using FieldDefintion\r\n // and field definition custom logic classes instead.\r\n //\r\n // Once that is done, the code can also be moved into this method and out of\r\n // class GridFormFieldComponent.\r\n //this.gridFormFieldComponent.gridColumnInit(hshEventData, hshUnusedColumnDef);\r\n // Note: the following port of method gridColumnInit() is not yet being used.\r\n let component: FormFieldBaseComponent = hshEventData['component'];\r\n\r\n if (component != null) {\r\n // Increment the grid form field count.\r\n this.gridFormFieldComponent.RuntimeData.iNumRowFormFieldsInitialized++;\r\n\r\n // Save this component. Replace any prior component that used this form field.\r\n let componentFormField: FormField = component.FormField;\r\n\r\n this.gridFormFieldComponent.RuntimeMetadata.addOrReplaceAllComponents(component, componentFormField);\r\n }\r\n\r\n // Also pass this event on to my parent.\r\n // Since this component is responsible for passing on\r\n // notifications to child / column components, replace\r\n // the component in the event with this component.\r\n\r\n // Have all row form field components been created?\r\n if (this.gridFormFieldComponent.RuntimeData.iNumRowFormFieldsInitialized == this.gridFormFieldComponent.GridConfig.ColumnCount) {\r\n // Need to notify any calculated form fields of the other field values.\r\n let colDefs: FormField[] = this.gridFormFieldComponent.GridConfig.ColumnDefs;\r\n\r\n this.gridFormFieldComponent.RuntimeData.iNumRowFormFieldsInitialized = 0; // This instance variable is irrelevant until another row is selected.\r\n } // if\r\n }\r\n\r\n // Define protected methods.\r\n protected raiseException(errorMessage: string): void {\r\n // Note: this method merely provides a single entry to report\r\n // exceptions, a convenience when troubleshooting.\r\n throw errorMessage;\r\n }\r\n\r\n // Helper methods.\r\n private notifyComponentsOfValueChanges(iColIndex: number, formField: FormField, formInstanceElement: FormInstanceElement, gridRow: IGridRow): IFormFieldComponent[] {\r\n let result: IFormFieldComponent[] = [];\r\n\r\n if (formInstanceElement.transientValuesHash && formInstanceElement.transientValuesHash[GRID_ROW_ID_KEY]) {\r\n let iGridRowId: number = formInstanceElement.transientValuesHash[GRID_ROW_ID_KEY];\r\n\r\n // Note: since the optimization that only one row of controls can be active at a give time,\r\n // we know that any dynamic/user-entered value change will affect the any active calculated\r\n // form field. Hence, we do not need to compare row id values anymore.\r\n if (iGridRowId != 0) {\r\n for (let iComponent: number = 0;\r\n iComponent < this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount;\r\n iComponent++) {\r\n let componentAndFormField: ComponentAndFormField = this.gridFormFieldComponent.RuntimeMetadata.AllComponents[iComponent];\r\n let component: FormFieldBaseComponent = componentAndFormField.Component;\r\n\r\n if (component.requiresFieldValueUpdate()) {\r\n this.notifyComponentOfFieldNames(component);\r\n\r\n let bComponentAffected: boolean = component.formFieldValueUpdated(iColIndex, formField, formInstanceElement, gridRow);\r\n if (bComponentAffected) {\r\n result.push(component);\r\n }\r\n }\r\n } // for\r\n } // if\r\n } // if\r\n\r\n return result;\r\n }\r\n\r\n private notifyComponentOfFieldNames(component: FormFieldBaseComponent): void {\r\n // Assemble a hash of all component names.\r\n let astrFieldNames: string[] = [];\r\n let hshColNameToFormField: IFieldNameToFormField = {};\r\n\r\n for (let iComponent: number = 0; iComponent < this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount; iComponent++) {\r\n let component: FormFieldBaseComponent = this.gridFormFieldComponent.RuntimeMetadata.getAllComponentsFormFieldComponent(iComponent);\r\n\r\n let columnFormField: FormField = this.gridFormFieldComponent.RuntimeMetadata.getAllComponentsFormField(iComponent);\r\n component.FormField = columnFormField;\r\n\r\n let iCol: number = this.gridFormFieldComponent.GridConfig.getColumnIndex(columnFormField) + 1;\r\n\r\n let colName: string = `col${iCol}`;\r\n astrFieldNames.push(colName);\r\n\r\n hshColNameToFormField[colName] = columnFormField;\r\n }\r\n\r\n component.receiveFormFieldNames(astrFieldNames, hshColNameToFormField);\r\n }\r\n}\r\n","import { FormField } from '../form-builder/form-field.model';\r\nimport { FormFieldBaseComponent } from '../../components/form-fields/form-field-base/form-field-base.component';\r\n\r\n// Define a class used to keep track of context menu data.\r\nexport class GridCellContextMenuInfo {\r\n public mouseEvent: MouseEvent;\r\n\r\n public columnDef: FormField = null;\r\n public component: FormFieldBaseComponent = null;\r\n\r\n public contextMenuXPos: string = null;\r\n public contextMenuYPos: string = null;\r\n}\r\n\r\n","import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Component, OnInit, Inject } from '@angular/core';\r\nimport { FormField } from '../../../shared/models/form-builder/form-field.model';\n\n@Component({\n selector: 'app-reorder-grid-columns',\n templateUrl: './reorder-grid-columns.dialog.html',\n styleUrls: ['./reorder-grid-columns.dialog.scss'],\n standalone: false\n})\nexport class ReorderGridColumnsDialog implements OnInit {\r\n\r\n private columnDefs: FormField[] = [];\n\n constructor(\r\n @Inject(MAT_DIALOG_DATA) data,\r\n public dialogRef: MatDialogRef) {\r\n\r\n for (let col of data.columns) {\r\n let field = new FormField();\r\n field.name = col.displayName || col.name;\r\n field.id = col.id;\r\n this.columnDefs.push(field);\r\n }\r\n }\n\n ngOnInit(): void {\n }\r\n\r\n public get ColumnDefs() {\r\n return this.columnDefs;\r\n }\r\n\r\n public handleRowReorder(event: any) {\r\n\r\n let dataItem = event.dropTargetRow.dataItem;\r\n let originalIndexOfMovedRow = event.draggedRows[0].rowIndex;\r\n let originalIndexOfTargetRow = event.dropTargetRow.rowIndex;\r\n\r\n let dropPosition = event.dropPosition;\r\n let newIndex = dropPosition == 'before' ? originalIndexOfTargetRow : (originalIndexOfTargetRow + 1);\r\n\r\n let movedRow = this.columnDefs.splice(originalIndexOfMovedRow, 1)[0]; // first remove the moved Row but keep a reference to it so it can be reinserted\r\n let before = this.columnDefs.slice(0, newIndex); // grab everything before its new location in the array\r\n let after = this.columnDefs.slice(newIndex); // grab everything after its new location in the array\r\n\r\n this.columnDefs = [\r\n ...before,\r\n movedRow,\r\n ...after\r\n ];\r\n }\n\r\n public closeDialog(save: boolean = false) {\r\n if (save) {\r\n // TODO: make sure to check if there is data out there using this -- need to prevent re-ordering if so\r\n this.dialogRef.close(this.columnDefs);\r\n } else {\r\n this.dialogRef.close();\r\n }\r\n }\n}\n","

\r\n Configure Form Grid\r\n

\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n\r\n \r\n\r\n","\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{this.getColumnTypeIconName(hshColumnDef)}}\r\n \r\n \r\n \r\n\r\n {{hshFieldTypeAndName.IconName}}\r\n \r\n\r\n {{hshFieldTypeAndName.fieldName}}\r\n \r\n \r\n\r\n
\r\n

{{hshColumnDef.displayName}}

\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n {{this.getNumericTotalPreviewValue(iColIndex,hshColumnDef)}}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n
\r\n add\r\n
\r\n
\r\n
Reorder Columns
\r\n
\r\n\r\n \r\n \r\n\r\n
\r\n\r\n \r\n
\r\n

Drag a field here ...

\r\n
\r\n
\r\n\r\n \r\n \r\n Totals\r\n \r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n","import { Component, ComponentFactoryResolver, EventEmitter, OnInit, Output } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { FormFieldTypeEnum, ShortTextFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { GridCellContextMenuInfo } from '../../../models/grid/cell-context-menu-info.model';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormTemplateInstancesService } from '../../../services/form-template-instances.service'\r\nimport { FlexibleSelectionFieldService } from '../../../services/flexible-selection-field.service';\r\nimport { FieldTypeAndName, FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { FlexibleSelectionFieldConfigurationComponent, FormFieldListConstraintColumn } from '../../form-builder/field-configuration/flexible-selection-field-configuration/flexible-selection-field-configuration.component';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { GridDesignerEditorBase } from './grid-designer-editor-base';\r\nimport { AlertDialogComponent, AlertDialogModel } from '../../../dialogs/alert/alert-dialog.component';\r\nimport { ReorderGridColumnsDialog } from '../../../dialogs/reorder-grid-columns/reorder-grid-columns.dialog';\r\n\r\n\r\n@Component({\n selector: 'app-grid-field-designer',\n templateUrl: './grid-field-designer.component.html',\n styleUrls: ['../grid-form-field/grid-form-field.component.scss', './grid-field-designer.component.scss'],\n standalone: false\n})\r\nexport class GridFieldDesignerComponent extends GridDesignerEditorBase implements OnInit {\r\n // Inputs.\r\n //@Input() gridFormFieldComponent: GridFormFieldComponent;\r\n\r\n // NOTE: THIS CLASS WILL BE IMPLEMENTED USING THE EXISTING CODE FROM CLASS GridFormFieldComponent,\r\n // EXTRACTING THE LOGIC TO DESIGN A GRID FORM FIELD WITHIN THE FORM BUILDER'S DESIGN MODE.\r\n\r\n @Output() initialized = new EventEmitter(); \r\n\r\n public constructor(formFieldTypeAndNameService: FormFieldTypeAndNameService,\r\n private dialog: MatDialog,\r\n fieldDefinitionService: FieldDefinitionService,\r\n private currentSiteService: CurrentSiteService,\r\n private flexibleSelectionFieldService: FlexibleSelectionFieldService,\r\n private formTemplateInstancesService: FormTemplateInstancesService,\r\n //private formFieldService: FormFieldService,\r\n resolver: ComponentFactoryResolver) {\r\n super(formFieldTypeAndNameService, fieldDefinitionService, resolver);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n // TO DO: MOVE 'design' mode-related ngOnInit() code from grid-form-field.component.ts. to this method.on\r\n this.initialized.emit();\r\n\r\n }\r\n\r\n // Begin called by my HTML code.\r\n // End called by my HTML code.\r\n\r\n // Begin methods for handling control events.\r\n public gridColumnContextMenuClick(mouseEvent: MouseEvent, hshColumnDef: FormField): void {\r\n\r\n // Stop propagation and default behavior.\r\n mouseEvent.stopPropagation();\r\n mouseEvent.preventDefault();\r\n\r\n // Create a context menu information object.\r\n {\r\n // Assemble context menu data.\r\n let gridCellContextMenuInfo = new GridCellContextMenuInfo();\r\n\r\n gridCellContextMenuInfo.mouseEvent = mouseEvent;\r\n\r\n gridCellContextMenuInfo.columnDef = hshColumnDef;\r\n\r\n for (let iComponent: number = 0; iComponent < this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount; iComponent++) {\r\n let component: FormFieldBaseComponent = this.gridFormFieldComponent.RuntimeMetadata.getAllComponentsFormFieldComponent(iComponent);\r\n let componentColDef: FormField = component.FormField;\r\n\r\n if (hshColumnDef.gridColClientId == componentColDef.gridColClientId) {\r\n gridCellContextMenuInfo.component = component;\r\n\r\n break;\r\n }\r\n }\r\n\r\n gridCellContextMenuInfo.contextMenuXPos = gridCellContextMenuInfo.mouseEvent.clientX + 'px';\r\n gridCellContextMenuInfo.contextMenuYPos = gridCellContextMenuInfo.mouseEvent.clientY + 'px';\r\n\r\n // Associate the data with the context menu and trigger the menu.\r\n this.gridFormFieldComponent.gridCellContextMenu.menuData = gridCellContextMenuInfo;\r\n\r\n this.gridFormFieldComponent.gridCellContextMenu.openMenu();\r\n } // block\r\n\r\n return;\r\n }\r\n\r\n // PJH - 6/26/2024 - added for VNEXT-1312 - column reordering\r\n public reorderColumnsClicked() {\r\n let dialogRef = this.dialog.open(ReorderGridColumnsDialog, {\r\n maxWidth: \"100%\",\r\n data: {\r\n columns: this.GridColumnDefs\r\n }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(cols => {\r\n if (cols) {\r\n let reOrderedColumnDefs = [];\r\n for (let i = 0; i < cols.length; i++) {\r\n let colDef = this.GridColumnDefs.find(x => { return x.id == cols[i].id });\r\n colDef.fieldOrder = i;\r\n reOrderedColumnDefs.push(colDef);\r\n }\r\n\r\n this.GridColumnDefs = reOrderedColumnDefs;\r\n\r\n this.gridFormFieldComponent.handleColumnOrderUpdate();\r\n }\r\n });\r\n\r\n }\r\n\r\n public handleFieldDefinitionChange(): void {\r\n this.gridFormFieldComponent.designChange.emit();\r\n }\r\n\r\n public getColumnTypeIconName(hshColumnDef: FormField): string {\r\n let strIconName: string = null;\r\n\r\n let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(hshColumnDef.fieldDefinitionClassName);\r\n if (!fieldTypeAndName) {\r\n let errorMsg: string = `GridFormFieldComponent.getColumnTypeIconName(): cannot find a field definition ` +\r\n `for field class '${hshColumnDef.fieldDefinitionClassName}'.`;\r\n this.raiseException(errorMsg);\r\n }\r\n strIconName = fieldTypeAndName.IconName;\r\n\r\n return strIconName;\r\n }\r\n public getColumnTypeIconType(hshColumnDef: FormField): string {\r\n let strIconType: string = null;\r\n\r\n let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(hshColumnDef.fieldDefinitionClassName);\r\n if (!fieldTypeAndName) {\r\n let errorMsg: string = `GridFormFieldComponent.getColumnTypeIconName(): cannot find a field definition ` +\r\n `for field class '${hshColumnDef.fieldDefinitionClassName}'.`;\r\n this.raiseException(errorMsg);\r\n }\r\n strIconType = fieldTypeAndName.iconType;\r\n\r\n return strIconType;\r\n }\r\n\r\n public getFieldTypeTitle(hshColumnDef: FormField): string {\r\n return this.formFieldTypeAndNameService.getFieldNameFromFieldType(hshColumnDef.fieldDefinitionClassName);\r\n }\r\n\r\n public gridColumnEdit(hshEventData: any, columnDef: FormField): void {\r\n //this.gridFormFieldComponent.gridColumnEdit(hshEventData, columnDef);\r\n // Since this component is responsible for passing on\r\n // notifications to child / column components, replace\r\n // the component in the event with this component.\r\n this.gridFormFieldComponent.RuntimeData.componentBeingEdited = hshEventData['component'];\r\n hshEventData['componentBeingEdited'] = hshEventData['component'];\r\n hshEventData['onEditSaveCallback'] = this.gridFormFieldComponent.onEditSave;\r\n hshEventData['properties'].push('gridColumnBehavior');\r\n hshEventData['properties'].push('gridColumnRoles');\r\n hshEventData['properties'].push('gridColumnViewRoles');\r\n\r\n // Pass this column's edit event to the parent form field wrapper.\r\n this.gridFormFieldComponent.onEdit.emit(hshEventData);\r\n }\r\n\r\n public onCellDoubleClick(columnDef: FormField): void {\r\n let formTemplateId = columnDef.formTemplateId;\r\n if (formTemplateId == null) {\r\n formTemplateId = parseInt(window.location.pathname.split('/').pop());\r\n }\r\n\r\n\r\n\r\n if (formTemplateId == 0) {\r\n let message = 'Please save the form template before configuring flexible selection fields in a grid.';\r\n let title = 'Please Save'\r\n this.dialog.open(AlertDialogComponent, {\r\n disableClose: true,\r\n maxWidth: \"600px\",\r\n data: new AlertDialogModel(title, message)\r\n });\r\n return;\r\n }\r\n\r\n this.formTemplateInstancesService.getFields(formTemplateId, this.gridFormFieldComponent.formField.id).then(formFields => {\r\n let sourceFormFields: FormField[] = this.GridColumnDefs;\r\n for (let index: number = 0; index < formFields.length; index++) {\r\n let ff = formFields[index];\r\n if (ff.fieldDefinitionClassName != FormFieldTypeEnum.GridFieldType && sourceFormFields.filter(sff => sff.id == ff.id).length == 0) {\r\n sourceFormFields.push(ff);\r\n }\r\n }\r\n\r\n let ff = columnDef;\r\n if (ff && ff.fieldHasConfiguration) {\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.disableClose = true;\r\n dialogConfig.data = {\r\n autoCompleteEnabled: ff.autocomplete,\r\n formTemplateId: formTemplateId,\r\n maximumSelections: ff.maxSelections,\r\n name: ff.name,\r\n id: ff.id,\r\n displayName: ff.displayName,\r\n toolTip: ff.toolTip,\r\n placeholderText: ff.placeholderText,\r\n instructionsText: ff.instructionsText,\r\n hasFootnote: ff.hasFootnote,\r\n formFields: sourceFormFields,\r\n formField: ff,\r\n listValuesConstraintId: ff.listValuesConstraintId,\r\n listValuesConstraintName: ff.listValuesConstraintName,\r\n listConstraintColumnName: ff.listConstraintColumnName,\r\n dependsOnParentFormFieldId: ff.dependsOnParentFormFieldId,\r\n dependsOnParentFormFieldName: ff.dependsOnParentFormFieldName,\r\n ListConstraintColumnId: ff.ListConstraintColumnId,\r\n CascadingDropdownConstraintId: ff.cascadingDropdownConstraintId,\r\n fieldColumnPairs: ff.formFieldListConstraintColumns,\r\n required: ff.required,\r\n defaultValue: ff.defaultValue != null ? ff.defaultValue : \"\"\r\n };\r\n const dialogRef = this.dialog.open(FlexibleSelectionFieldConfigurationComponent, dialogConfig);\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result != null) {\r\n if (result.constraintIsSimpleList) {\r\n ff.cascadingDropdownConstraintId = 0;\r\n ff.listValuesConstraintId = result.selectConstraintId;\r\n }\r\n else {\r\n ff.cascadingDropdownConstraintId = result.selectConstraintId ?? 0;\r\n ff.listValuesConstraintId = 0;\r\n }\r\n\r\n ff.dependsOnParentFormFieldId = result.dependsOnParentFormFieldId;\r\n if (result.dependsOnParentFormFieldId) {\r\n this.flexibleSelectionFieldService.SetDependsOnParentFormFieldId(ff.id, result.dependsOnParentFormFieldId);\r\n }\r\n\r\n if (result.displayName) {\r\n ff.displayName = result.displayName;\r\n }\r\n if (result.name) {\r\n ff.name = result.name;\r\n }\r\n\r\n ff.listValuesConstraintId = result.listValuesConstraintId;\r\n ff.toolTip = result.toolTip;\r\n ff.placeholderText = result.placeholderText;\r\n ff.instructionsText = result.instructionsText;\r\n ff.hasFootnote = result.hasFootnote;\r\n ff.autocomplete = result.autoCompleteEnabled;\r\n\r\n ff.maxSelections = result.maximumSelections;\r\n ff.defaultValue = result.defaultValue;\r\n ff.required = result.required;\r\n\r\n ff.formFieldListConstraintColumns = [];\r\n for (let index: number = 0; index < result.fieldColumnPairs.length; index++) {\r\n let columnId = result.fieldColumnPairs[index].listConstraintColumnId;\r\n if (ff.formFieldListConstraintColumns.filter(col => col.formFieldId == ff.id && col.listConstraintColumnId == columnId).length == 0) {\r\n let newCol = new FormFieldListConstraintColumn(ff.id, columnId);\r\n newCol.listConstraintColumnName = result.fieldColumnPairs[index].listConstraintColumnName;\r\n ff.formFieldListConstraintColumns.push(newCol);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n public handleOnPropertyUpdated(formField: FormField): void {\r\n let columnDef: FormField = this.gridFormFieldComponent.GridConfig.ColumnDefs.find(ff => ff.name == formField.name);\r\n if (columnDef != null)\r\n GridFieldDesignerComponent.copyFormFieldUpdatesFromTo(formField, columnDef);\r\n }\r\n\r\n public displayDeleteIconForColumn(columnDef: FormField): boolean {\r\n let display: boolean = true;\r\n\r\n let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n if ((fieldDefinition != null) && (fieldDefinition.customLogicHandler != null))\r\n display = fieldDefinition.customLogicHandler.displayDeleteIconInGridFor(columnDef);\r\n\r\n return display;\r\n }\r\n\r\n public removeGridColumnClicked(hshColumnDef: FormField): void {\r\n this.gridFormFieldComponent.GridConfig.removeGridColumn(hshColumnDef.gridColClientId);\r\n this.gridFormFieldComponent.designChange.emit();\r\n this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n }\r\n\r\n public addGridColumnClicked(fieldDefinitionClassNameParam: string = ShortTextFieldType): void {\r\n this.gridFormFieldComponent.GridConfig.addGridColumn(fieldDefinitionClassNameParam);\r\n\r\n // In any fields are listening for field names, update them now.\r\n this.gridFormFieldComponent.designChange.emit();\r\n\r\n this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n }\r\n\r\n public onFieldDropped(eventData: any): void {\r\n // Emit an event so FormBuilder can flag itself as dirty\r\n let fieldDefinition: FieldDefinition = eventData['dragData'];\r\n this.addGridColumnClicked(fieldDefinition.className);\r\n }\r\n\r\n public getNumericTotalPreviewValue(iColIndex: number, colDef: FormField): string {\r\n // Note: this method either returns a zero/'0', for numeric form\r\n // fields, or a blank, for non - numeric form fields.\r\n let previewTotalValue: string = '';\r\n\r\n if (this.gridFormFieldComponent.RuntimeMetadata && (this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount > 0)) {\r\n if ((iColIndex >= 0) && (iColIndex < this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount)) {\r\n let component: IFormFieldComponent = this.gridFormFieldComponent.RuntimeMetadata.getAllComponentsFormFieldComponent(iColIndex);\r\n\r\n if (component.hasNumericData()) {\r\n previewTotalValue = '0';\r\n }\r\n }\r\n }\r\n\r\n return (previewTotalValue);\r\n }\r\n // End methods for handling control events.\r\n\r\n // Helper methods.\r\n private static copyFormFieldUpdatesFromTo(formField: FormField, columnDef: FormField): void {\r\n // Copy constraint-related fields for the time being.\r\n columnDef.selectOptions = formField.selectOptions;\r\n columnDef.selectOptionsConstraintName = formField.selectOptionsConstraintName;\r\n columnDef.selectOptionsConstraintValue = formField.selectOptionsConstraintValue;\r\n\r\n columnDef.regularExpressionConstraintName = formField.regularExpressionConstraintName;\r\n columnDef.regularExpressionConstraintValue = formField.regularExpressionConstraintValue;\r\n\r\n columnDef.cascadingDropdownConstraintName = formField.cascadingDropdownConstraintName;\r\n columnDef.cascadingDropdownConstraintValue = formField.cascadingDropdownConstraintValue;\r\n\r\n columnDef.numericRangeConstraintMinValue = formField.numericRangeConstraintMinValue;\r\n columnDef.numericRangeConstraintMaxValue = formField.numericRangeConstraintMaxValue;\r\n columnDef.numericRangeConstraintName = formField.numericRangeConstraintName;\r\n\r\n columnDef.dateRangeConstraintMinDate = formField.dateRangeConstraintMinDate;\r\n columnDef.dateRangeConstraintMaxDate = formField.dateRangeConstraintMaxDate;\r\n columnDef.dateRangeConstraintName = formField.dateRangeConstraintName;\r\n }\r\n\r\n}\r\n","

\r\n Paste from Excel into Kendo Grid\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n {{ this.parseInfo }}\r\n {{ this.parseError }}\r\n \r\n\r\n \r\n Replace data in grid   \r\n Append to end of grid\r\n \r\n
 Warning: pasting more than ten records at a time may fail
\r\n \r\n \r\n\r\n \r\n \r\n
\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\n@Component({\n selector: 'app-grid-paste-kendo',\n templateUrl: './grid-paste-kendo.dialog.html',\n styleUrls: ['./grid-paste-kendo.dialog.scss'],\n standalone: false\n})\nexport class GridPasteKendoDialog implements OnInit {\r\n\r\n public pasteData: string;\r\n public parseInfo: string = ' ';\r\n public parseError: string = ' ';\r\n public disableCopyButton: boolean = true;\r\n public showLengthWarning: boolean = false;\r\n\r\n public constructor(@Inject(MAT_DIALOG_DATA) public griddata: { colCount: number, rowCount: number, gridHasData: boolean, pasteMode: string, pasteData: string }) { }\n\n ngOnInit() { }\r\n\r\n clickCancel() {\r\n this.griddata.pasteData = '';\r\n }\r\n\r\n handleNgOnChange() {\r\n this.disableCopyButton = false;\r\n let pasteDataLines: string[];\r\n let pasteColCount: number;\r\n\r\n this.showLengthWarning = false;\r\n pasteDataLines = this.pasteData.split(/\\r\\n|\\r|\\n/);\r\n if (pasteDataLines.length > 10) this.showLengthWarning = true;\r\n pasteColCount = pasteDataLines[0].split('\\t').length;\r\n\r\n this.parseInfo = pasteColCount + (pasteColCount > 1 ? ' columns' : ' column') + ' in pasted data, ' + this.griddata.colCount + (this.griddata.colCount > 1 ? ' columns' : ' column') + ' in grid';\r\n\r\n if (pasteColCount < this.griddata.colCount) {\r\n this.parseError = 'Grid has more columns than pasted data.';\r\n this.disableCopyButton = true;\r\n }\r\n else if (pasteColCount > this.griddata.colCount) {\r\n this.parseError = 'Pasted data has more columns than grid.';\r\n this.disableCopyButton = true;\r\n }\r\n else {\r\n this.parseInfo = '';\r\n this.parseError = '';\r\n this.disableCopyButton = false;\r\n }\r\n\r\n this.griddata.pasteData = this.pasteData;\r\n }\r\n}\r\n","\r\n
\r\n

\r\n {{Title}}\r\n

\r\n\r\n
\r\n

Use this function to validate street addresses and look up census tract values.

\r\n
\r\n\r\n
\r\n\r\n Geocode Grid Columns\r\n
\r\n\r\n
Address
\r\n
check
\r\n
cancel
\r\n\r\n
City
\r\n
check
\r\n
cancel
\r\n\r\n
State
\r\n
check
\r\n
cancel
\r\n\r\n
ZIP
\r\n
check
\r\n
cancel
\r\n\r\n
Longitude
\r\n
check
\r\n
cancel
\r\n\r\n
Latitude
\r\n
check
\r\n
cancel
\r\n\r\n
Censustract2010
\r\n
check
\r\n
cancel
\r\n\r\n
Censustract2020
\r\n
check
\r\n
cancel
\r\n\r\n
Validation
\r\n
check
\r\n
cancel
\r\n\r\n
Matchtype
\r\n
check
\r\n
cancel
\r\n\r\n
Validatedaddress
\r\n
check
\r\n
cancel
\r\n\r\n
Geoid
\r\n
check
\r\n
cancel
\r\n\r\n
Place
\r\n
check
\r\n
cancel
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n  \r\n \r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nexport class GeocodeDialogModel {\r\n //input\r\n public title: string;\r\n\r\n //output\r\n public somename: string;\r\n public enteredName: string;\r\n public lookupType: string;\r\n public gridCols;\r\n public streetColId: number;\r\n public cityColId: number;\r\n public stateColId: number;\r\n public zipColId: number;\r\n public latitudeColId: number;\r\n public longitudeColId: number;\r\n constructor(title: string, gridCols) {\r\n this.title = title;\r\n this.gridCols = gridCols;\r\n }\r\n}\n\r\n@Component({\n selector: 'app-geocode-dialog',\n templateUrl: './geocode-dialog.component.html',\n styleUrls: ['./geocode-dialog.component.scss'],\n standalone: false\n})\r\n\nexport class GeocodeDialog implements OnInit {\n constructor(public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public data: GeocodeDialogModel) {\r\n }\n\n ngOnInit() { }\r\n\r\n public get Title(): string {\r\n return this.data.title;\r\n }\r\n\r\n public get GridCols(): string[] {\r\n return this.data.gridCols;\r\n }\r\n\r\n public get LookupType(): string {\r\n return this.data.lookupType;\r\n }\r\n public set LookupType(lookupTypeValue: string) {\r\n this.data.lookupType = lookupTypeValue;\r\n }\r\n\r\n public get StreetColId() {\r\n return this.data.streetColId;\r\n }\r\n public set StreetColId(streetColId) {\r\n this.data.streetColId = streetColId;\r\n }\r\n public get CityColId() {\r\n return this.data.cityColId;\r\n }\r\n public set CityColId(cityColId) {\r\n this.data.cityColId = cityColId;\r\n }\n public get StateColId() {\r\n return this.data.stateColId;\r\n }\r\n public set StateColId(stateColId) {\r\n this.data.stateColId = stateColId;\r\n }\n public get ZipColId() {\r\n return this.data.zipColId;\r\n }\r\n public set ZipColId(zipColId) {\r\n this.data.zipColId = zipColId;\r\n }\n public get LatitudeColId() {\r\n return this.data.latitudeColId;\r\n }\r\n public set LatitudeColId(latitudeColId) {\r\n this.data.latitudeColId = latitudeColId;\r\n }\n\r\n public get LongitudeColId() {\r\n return this.data.longitudeColId;\r\n }\r\n public set LongitudeColId(longitudeColId) {\r\n this.data.longitudeColId = longitudeColId;\r\n }\r\n\r\n public get ShowConfiguration() {\r\n return true;\r\n }\r\n\r\n public GridHasColumn(colName: string) {\r\n return (this.data.gridCols.filter(gc => gc.name.toLowerCase() == colName.toLowerCase()).length > 0);\r\n }\r\n\r\n onStart(): void {\r\n let returnValues = {\r\n lookupType: this.data.lookupType,\r\n streetColumnId: this.data.streetColId,\r\n cityColumnId: this.data.cityColId,\r\n stateColumnId: this.data.stateColId,\r\n zipColumnId: this.data.zipColId,\r\n }\r\n\n this.dialogRef.close(returnValues);\r\n }\n\n onDismiss(): void {\n this.dialogRef.close(false);\r\n }\r\n}\n","export class GridEvent {\r\n public data: any;\r\n public type: string;\r\n\r\n constructor(data: any, type: string) {\r\n this.data = data;\r\n this.type = type;\r\n }\r\n}\r\n","import { Observable } from \"rxjs\";\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridDataResult } from \"@progress/kendo-angular-grid\";\r\nimport { State } from \"@progress/kendo-data-query\";\r\n\r\n// This class was created in initial integration with Kendo Grid\r\nexport class DataUsedWithKendoGrid {\r\n public editedRowIndex: number;\r\n private _selectedGridRow: GridRowDef = null;\r\n private elementsInInitialState: FormInstanceElement[];\r\n private currentDataItem: any;\r\n\r\n public view: Observable;\r\n public gridState: State = {\r\n sort: [],\r\n skip: 0,\r\n take: 50,\r\n };\r\n\r\n public get CurrentDataItem(): any {\r\n return this.currentDataItem;\r\n }\r\n\r\n public set CurrentDataItem(value: any) {\r\n this.currentDataItem = value;\r\n }\r\n\r\n public get selectedGridRow(): GridRowDef {\r\n return this._selectedGridRow;\r\n }\r\n\r\n public set selectedGridRow(value: GridRowDef) {\r\n for (let wrapper of value.FormInstanceElementWrappers) {\r\n // TOTAL HACK FOR NOW. I CANNOT FIGURE OUT WHY THIS IS NOT GETTING SET FOR FLEX FIELDS!!!!!!!!!!!!!!!!!!!!!\r\n if (!wrapper.formInstanceElement.valueType) {\r\n wrapper.formInstanceElement.valueType = 'text';\r\n }\r\n }\r\n this._selectedGridRow = value;\r\n \r\n }\r\n\r\n // Used to reset on cancelation of an edit\r\n public backupForCancel(): void {\r\n // clone the FormInstanceElements without referencing them\r\n this.elementsInInitialState = JSON.parse(JSON.stringify(this.selectedGridRow.FormInstanceElementWrappers.map(x => { return x.formInstanceElement; }))) as FormInstanceElement[];\r\n }\r\n\r\n public get ElementsInInitialState(): FormInstanceElement[] {\r\n return this.elementsInInitialState;\r\n };\r\n}\r\n","import { ImportMetricsBase } from './import-metrics-base';\r\nimport { IJobSummaryText } from './i-job-summary-text';\r\n\r\nexport class ImportExcelDataIntoGridMetrics extends ImportMetricsBase {\r\n // Properties.\r\n public numRowsImported: number;\r\n public numRowsFailedValidation: number;\r\n\r\n private static readonly propertyNames: string[] =\r\n [\r\n // Properties from MetricsBase.\r\n 'progressLog',\r\n 'warningLog',\r\n 'errorLog',\r\n\r\n 'jobSummaryMessage',\r\n\r\n 'exceptionLoggedAndJobTerminated',\r\n\r\n // My properties.\r\n 'numRowsImported',\r\n 'numRowsFailedValidation'\r\n ];\r\n\r\n // Constructor.\r\n public constructor(jsonData: Object) {\r\n super(ImportExcelDataIntoGridMetrics.propertyNames, jsonData);\r\n }\r\n}\r\n","

\r\n Import Excel Data into Grid\r\n

\r\n\r\n
\r\n
\r\n
\r\n File: \r\n {{this.SelectedFileName}}\r\n
\r\n
\r\n\r\n
\r\n Execution Time:\r\n {{this.JobTimeElapsed}}\r\n
\r\n\r\n
\r\n Execution Status:\r\n {{this.ImportStatus}}\r\n
\r\n\r\n
\r\n {{this.DetailedSaveResultMessage}}\r\n
\r\n\r\n
\r\n

{{this.ExecutionSummaryText}}

\r\n
\r\n\r\n
\r\n \r\n Overwrite ALL existing records.\r\n \r\n
\r\n (Uncheck to append your data to the existing data)\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Clipboard } from '@angular/cdk/clipboard';\r\n\r\nimport { AsyncJobService } from '../../services/async-job.service';\r\nimport { ImportDataService } from '../../services/import-data.service';\r\nimport { CurrentSiteService } from '../../services/current-site.service';\r\nimport { ImportAsyncJobDialogBase } from '../async-job-base/import-async-job-base.dialog';\r\nimport { AsyncJob } from '../../models/async-job.model';\r\nimport { IJobSummaryText } from '../../models/export-import/i-job-summary-text';\r\nimport { ImportExcelDataIntoGridMetrics } from '../../models/export-import/import-excel-data-into-grid-metrics.model';\r\nimport { JOB_COMPLETED_MESSAGE } from '../async-job-base/async-job-base.dialog';\r\n\r\nexport class ImportGridDataDialogInitInfo {\r\n public constructor(public formInstanceElementId: number, public file: File, public fileName: string, public asyncJob: AsyncJob, public truncateExistingGridRows: boolean = true)\r\n {\r\n }\r\n}\r\n\n@Component({\n selector: 'app-import-grid-data',\n templateUrl: './import-grid-data.dialog.html',\n styleUrls: [\n '../async-job-base/async-job-base.dialog.scss',\n './import-grid-data.dialog.scss'\n ],\n standalone: false\n})\nexport class ImportGridDataDialog extends ImportAsyncJobDialogBase implements OnInit {\r\n // Properties.\r\n private importMetrics: ImportExcelDataIntoGridMetrics = null;\r\n private showSaveImportedDataMessage: boolean = false;\r\n\n // Constructor.\n public constructor(public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public initInfo: ImportGridDataDialogInitInfo,\r\n private clipboard: Clipboard,\r\n public dialog: MatDialog,\r\n protected importDataService: ImportDataService,\r\n private injectedAsyncJobService: AsyncJobService)\r\n {\r\n super(injectedAsyncJobService);\r\n\r\n dialogRef.disableClose = true; // Disable closing the dialogue when the user clicks on the page.\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n // If the async job was started outside of this dialogue, monitor it.\r\n if (this.initInfo.asyncJob != null)\r\n this.startMonitoringJob(this.initInfo.asyncJob, this.jobCompletedOrUpdatedArrowFunction);\n }\n\r\n // Implement a base class's abstract method.\r\n public get ComponentClassName(): string {\r\n return 'ImportGridDatDialog';\r\n }\r\n\r\n // Define methods caled by my HTML code.\r\n public get SelectedFileName(): string {\r\n let charCount: number = this.initInfo.fileName != null ? this.initInfo.fileName.length : 0;\r\n return charCount <= 45 ? this.initInfo.fileName : this.initInfo.fileName.substring(0, 45) + ' ...';\r\n }\r\n\r\n public get ShowStartImportButton(): boolean {\r\n return this.initInfo.asyncJob == null;\r\n }\r\n public get DisableStartImportButton(): boolean {\r\n return this.initInfo.asyncJob != null;\r\n }\n\r\n public get DismissButtonTitle(): string {\r\n return 'OK';\r\n }\r\n\r\n public get ImportStatus(): string {\r\n //let importStatus: string = super.ImportStatus;\r\n\r\n let status: string = null;\r\n\r\n if ((!this.jobInProgress) && (this.asyncJobInfo == null)) {\r\n // We haven't started a copy job.\r\n status = 'Not started';\r\n } else if (this.jobInProgress) {\r\n // A copy job is in progress.\r\n status = 'Import in progress';\r\n } else if ((!this.jobErrorOccurred) && (this.importMetrics.numRowsFailedValidation == 0)) {\r\n // A copy completed without error.\r\n status = 'Import completed successfully';\r\n } else if (this.jobErrorOccurred) {\r\n // A copy error occurred.\r\n status = 'An import error occurred';\r\n } else {\r\n status = this.importMetrics.numRowsFailedValidation == 1 ? 'A data validation error occurred' : 'Data validation errors occurred.';\r\n }\r\n\r\n return status;\r\n }\r\n public get DetailedSaveResultMessage(): string {\r\n let message: string = '';\r\n\r\n if (this.JobCompleted) {\r\n if ((!this.JobErrorOccurred) && (this.importMetrics.numRowsFailedValidation == 0))\r\n message = 'Please click the OK button to review your data in the grid, then make sure to click the Save button at the bottom of the screen to ensure your data is saved appropriately.';\r\n else\r\n message = `Some data failed validation, causing no rows to import. Please resolve the validation error${this.importMetrics.numRowsFailedValidation > 1 ? 's' : ''} and re-import.`;\r\n } else\r\n message = 'A status message will display here after the import completes.';\r\n\r\n return message;\r\n }\r\n\r\n public get ExecutionSummaryText(): string {\r\n let summaryText: string = this.deriveExecutionSummaryText(this.importMetrics);\r\n\r\n return (summaryText);\r\n }\r\n\r\n // Override base class methods.\r\n public AllowMultipleFiles(): boolean {\r\n return (false);\r\n }\r\n\r\n //showSaveImportedDataMessage\r\n /*\r\n public get ShowSaveImportedDataMessage(): boolean {\r\n if (!this.showSaveImportedDataMessage)\r\n this.showSaveImportedDataMessage = (this.ImportStatus == JOB_COMPLETED_MESSAGE) && (this.importMetrics.numRowsFailedValidation == 0);\r\n\r\n return this.showSaveImportedDataMessage;\r\n }\r\n */\r\n\r\n public get TruncateExistingGridRows(): boolean {\r\n return this.initInfo.truncateExistingGridRows;\r\n }\r\n public set TruncateExistingGridRows(value: boolean) {\r\n this.initInfo.truncateExistingGridRows = value;\r\n }\r\n\r\n // Handle control events.\r\n public truncateExistingGridRowsChanged(): void {\r\n // Note: this method can be handy for debugging; otherwise, it is a NOOP by design.\r\n }\r\n\r\n public startExcelGridImport(): void {\r\n this.importDataService.importExcelFileIntoGrid(this.initInfo.file, this.initInfo.formInstanceElementId, this.initInfo.truncateExistingGridRows).then(asyncJob => {\r\n this.initInfo.asyncJob = asyncJob;\r\n\r\n this.startMonitoringJob(this.initInfo.asyncJob, this.jobCompletedOrUpdatedArrowFunction);\r\n });\r\n }\r\n\r\n public dismissClicked(): void {\r\n this.dialogRef.close(this.initInfo);\r\n }\r\n public cancelClicked(): void {\r\n this.dialogRef.close(null);\r\n }\r\n\r\n public copyJobErrorTextToClipboard(): void {\r\n if (this.jobErrorText != null) {\r\n this.clipboard.copy(this.jobErrorText);\r\n }\r\n }\r\n\r\n // Protected methods.\r\n protected deriveExecutionSummaryText(metrics: IJobSummaryText): string {\r\n let summaryText: string = '';\r\n\r\n if (this.jobErrorOccurred && (this.jobErrorText != null) && (this.jobErrorText.trim() != '')) {\r\n summaryText = this.jobErrorText;\r\n\r\n if (metrics != null) {\r\n if ((metrics.getErrorLog() != null) && (metrics.getErrorLog().trim() != '')) {\r\n summaryText += \"\\r\\n\";\r\n summaryText += metrics.getErrorLog();\r\n } else if ((metrics.getWarningLog() != null) && (metrics.getWarningLog().trim() != '')) {\r\n summaryText += \"\\r\\n\";\r\n summaryText += metrics.getWarningLog();\r\n }\r\n }\r\n } else if (metrics != null) {\r\n summaryText = metrics.getJobSummaryText();\r\n }\r\n\r\n return (summaryText);\r\n }\r\n\r\n protected jobCompletedOrUpdatedArrowFunction = (asyncJob: AsyncJob): void => {\r\n if ((this.jobCompletedMessageText != null) && (this.jobCompletedMessageText.trim() != '')) {\r\n this.importMetrics = ImportGridDataDialog.parseMetrics(this.jobCompletedMessageText);\r\n } else if ((asyncJob.stdOut != null) && (asyncJob.stdOut.trim() != '')) {\r\n this.importMetrics = ImportGridDataDialog.parseMetrics(asyncJob.stdOut);\r\n }\r\n }\r\n\r\n private static parseMetrics(jobMetricsJson: string): ImportExcelDataIntoGridMetrics {\r\n let jobCompletedMessageJson: Object = JSON.parse(jobMetricsJson);\r\n let importMetrics: ImportExcelDataIntoGridMetrics = new ImportExcelDataIntoGridMetrics(jobCompletedMessageJson);\r\n\r\n return (importMetrics);\r\n }\r\n\r\n}\n","\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n {{Helper.ShowingXofN}}\r\n \r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {{column.title}}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n {{getCellDisplayValueForKendo(dataItem, columnDef, iColIndex)}}\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {{ this.getNumericFooterTotalValueFor(iColIndex, columnDef) | number}}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {{ this.getNumericFooterTotalValueFor(iColIndex, columnDef) | number }}\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n {{columnDef.displayName}}: {{ getCellDisplayValueForKendo(dataItem, columnDef, iColIndex) }}\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
Saving...
\r\n
\r\n
\r\n","// code commented out with \"// Commented out for VNEXT-1429 (remove old grid)\" note above it\r\n// can be deleted once we're sure this is all working ok\r\n\r\nimport { animate, state, style, transition, trigger } from '@angular/animations';\r\nimport { Component, ComponentFactoryResolver, ElementRef, EventEmitter, Input, NgZone, OnInit, Output, QueryList, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';\r\nimport { UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { GridPasteKendoDialog } from '../../../../shared/dialogs/grid-paste-kendo/grid-paste-kendo.dialog';\r\nimport { DynamicComponentHostDirective } from '../../../directives/dynamic-content-host.directive';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { GridFilter } from '../../../models/grid/grid-filter.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { LoadingDataProgressInfo } from '../../../models/grid/loading-data-progress.model';\r\nimport { ProgressBarConstants } from '../../../enums/progress-bar-constants.enum';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { environment } from '../../../../../environments/environment';\r\nimport { GeocodeDialog, GeocodeDialogModel } from '../../../dialogs/geocode/geocode-dialog.component'\r\nimport { GridConfig } from '../../../models/grid/grid-config.model';\r\nimport { AttachmentStandardColumnNames, GridFlavorEnum } from '../../../enums/grid.enums';\r\nimport { GridEvent } from '../grid-form-field/grid-event';\r\nimport { CommunicationService } from '../../../services/communication.service';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { GeocodeService } from '../../../services/geocode.service';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { GRID_ROW_ID_KEY, GridDesignerEditorBase } from '../grid-field-designer/grid-designer-editor-base';\r\nimport { GridFlavorFactory } from '../../../models/form-builder/grid-flavor/grid-flavor-factory';\r\n\r\n// BEGIN KENDO GRID IMPORTS.\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {\r\n AddEvent,\r\n CancelEvent,\r\n CellClickEvent,\r\n CommandColumnComponent,\r\n DetailCollapseEvent,\r\n DetailExpandEvent,\r\n GridComponent,\r\n GridDataResult,\r\n MultipleSortSettings,\r\n RemoveEvent,\r\n RowReorderEvent,\r\n SaveEvent\r\n} from \"@progress/kendo-angular-grid\";\r\nimport { State } from \"@progress/kendo-data-query\";\r\nimport { AsyncJob } from '../../../models/async-job.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { AsyncJobService } from '../../../services/async-job.service';\r\nimport { ExportDataService } from '../../../services/export-data.service';\r\nimport { KendoGridService } from '../../../services/kendo-grid.service';\r\nimport { DataUsedWithKendoGrid } from './data-used-with-kendo-grid';\r\n// END KENDO GRID IMPORTS. \r\nimport { MonitorExcelImportToGridHelper } from '../../../dialogs/async-job-base/monitor-excel-import-to-gride-helper';\r\nimport { ImportGridDataDialog, ImportGridDataDialogInitInfo } from '../../../dialogs/import-grid-data/import-grid-data.dialog';\r\nimport { IKendoGridDataSpy, KendoGridHelper } from '../../../kendo-grid-helper';\r\nimport { FormInstance } from '../../../models/site-content/form-instance.model';\r\nimport { FieldConditionalLogicService } from '../../../services/field-conditional-logic.service';\r\nimport { TargetFieldConditionalLogicInstructions } from '../../../models/site-metadata/target-field-logic-instructions';\r\nimport { GridRowViewModel, IFormContentElement } from '../../../models/form-builder/grid-row.model';\r\nimport { IFormFieldNameToFormInstanceElementWrapper } from '../../../models/grid/grid-interfaces';\r\nimport { ComponentAndFormField } from '../../../models/grid/component-and-form-field-model';\r\nimport { KendoGridRemoteBindingDirective } from '../../../directives/kendo-grid-remote-binding.directive';\r\nimport { FlexibleSelectionFieldService } from '../../../services/flexible-selection-field.service';\r\nimport { ImportDataService } from '../../../services/import-data.service';\r\nimport { FileInputUtil } from '../../../utility-classes/file-input.util';\r\nimport { take } from 'rxjs/operators';\r\nimport { IGridFlavor } from '../../../interfaces/igrid-flavor.interface';\r\nimport { FieldIdToSelectedValues } from '../../../models/flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\nconst DEFAULT_UNSELECTED_ROW_HEIGHT: number = 48;\r\n\r\n// Export an output data type.\r\nexport class ConditionalLogicColumnDefsFilterData {\r\n public constructor(public gridComponent: GridComponent, public filteredColumnDefs: FormField[], public childFieldColumnDef: FormField, public showChildField: boolean) {\r\n }\r\n}\r\n\r\n// Implement a class to handle column totals.\r\ninterface IMapOfTotalsByCellName {\r\n [cellName: string]: number;\r\n}\r\nclass GridColumnTotalsHelper implements IKendoGridDataSpy {\r\n // Properties.\r\n private dataRows: any[] = null;\r\n private numericColumnDefs: FormField[] = [];\r\n private cellTotals: IMapOfTotalsByCellName = {};\r\n\r\n // Constructor.\r\n public constructor(private fieldDefinitionService: FieldDefinitionService, private columnDefs: FormField[]) {\r\n if (columnDefs != null) {\r\n for (let index: number = 0; index < columnDefs.length; index++) {\r\n let columnDef: FormField = columnDefs[index];\r\n let fieldDef: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n if (fieldDef.isNumeric)\r\n this.numericColumnDefs.push(columnDef);\r\n }\r\n }\r\n }\r\n\r\n // IKendoGridDataSpy method.\r\n public dataLoaded(loadedData: any[]): void {\r\n this.dataRows = loadedData;\r\n this.cellTotals = GridColumnTotalsHelper.calculateAllColumnTotals(this.fieldDefinitionService, this.numericColumnDefs, loadedData);\r\n }\r\n\r\n public cellValueChanged(rowIndex: number, columnDef: FormField, value: FormInstanceElement): void {\r\n if ((rowIndex < this.dataRows.length) && (rowIndex >= 0)) {\r\n let fieldDef: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n let numericValue: any = value[fieldDef.formInstanceElementPropertyName];\r\n let rowValues: IMapOfTotalsByCellName = this.dataRows[rowIndex];\r\n if (rowValues != null)\r\n rowValues[columnDef.name] = numericValue;\r\n\r\n let total: number = GridColumnTotalsHelper.calculateColumnTotal(columnDef, fieldDef, this.dataRows);\r\n this.cellTotals[columnDef.name] = total;\r\n }\r\n }\r\n\r\n public getFooterValue(columnDef: FormField): string {\r\n let cellTotal: string = this.cellTotals[columnDef.name] != null ? this.cellTotals[columnDef.name].toString() : '';\r\n return cellTotal;\r\n }\r\n\r\n // Helper methods.\r\n private static calculateAllColumnTotals(fieldDefinitionService: FieldDefinitionService, numericColumnDefs: FormField[], rowData: any[]): IMapOfTotalsByCellName {\r\n let cellTotals: IMapOfTotalsByCellName = {};\r\n\r\n for (let index: number = 0; index < numericColumnDefs.length; index++) {\r\n let columnDef: FormField = numericColumnDefs[index];\r\n let fieldDef: FieldDefinition = fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n let total: number = GridColumnTotalsHelper.calculateColumnTotal(columnDef, fieldDef, rowData);\r\n cellTotals[columnDef.name] = total;\r\n }\r\n\r\n return cellTotals;\r\n }\r\n private static calculateColumnTotal(columnDef: FormField, fieldDef: FieldDefinition, rowData: any[]): number {\r\n let total: number = 0;\r\n\r\n for (let index: number = 0; index < rowData.length; index++) {\r\n let row: any = rowData[index];\r\n let cellValue: any = row[columnDef.name];\r\n if (cellValue != null) {\r\n let value: number = fieldDef.customLogicHandler.getNumericValueFrom(cellValue.toString()); //parseFloat(cellValue.toString());\r\n if (!isNaN(value))\r\n total += value;\r\n }\r\n }\r\n\r\n return total;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'app-grid-field-editor',\r\n templateUrl: './grid-field-editor.component.html',\r\n styleUrls: ['../grid-form-field/grid-form-field.component.scss', './grid-field-editor.component.scss'],\r\n encapsulation: ViewEncapsulation.None, //enable CSS overrides\r\n animations: [\r\n trigger('detailExpand', [\r\n state('collapsed', style({ height: '0px', minHeight: '0' })),\r\n state('expanded', style({ height: '*' })),\r\n transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),\r\n ]),\r\n ],\r\n standalone: false\r\n})\r\nexport class GridFieldEditorComponent extends GridDesignerEditorBase implements OnInit {\r\n @Input() flavor: GridFlavorEnum = GridFlavorEnum.RegularGrid;\r\n @Input() formInstance: FormInstance;\r\n\r\n // Properties.\r\n // This references all of the templates in a row which look like this in the HTML:\r\n // \r\n @ViewChildren(DynamicComponentHostDirective, { read: DynamicComponentHostDirective }) dynamicComponentHosts: QueryList;\r\n\r\n // Get a reference to the remote binding directive that handles all the changes to Grid state (Relates to ;\r\n\r\n // Properties.\r\n // Define instance data used with a MatPaginator.\r\n @ViewChild('matPaginatorMatFooter', { read: MatPaginator }) matPaginator;\r\n\r\n //VNEXT-894: KLW - Needed for grid validation\r\n @Output() editorGridValidation = new EventEmitter();\r\n @Output() gridEvent = new EventEmitter();\r\n\r\n private newRowIsBeingAdded: boolean = false;\r\n\r\n @Output() conditionalLogicColumnDefsFilter = new EventEmitter();\r\n\r\n //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n private rowHeight: number = 23.14; // 23.14;\r\n private toolbarHeadersFilters = 107; // height of grid with no rows\r\n\r\n private detailRowHeight: number = 0;\r\n private rowDetailPanel: ElementRef;\r\n private saving: boolean;\r\n private extraHeightWhenEditingRow: number = 0;\r\n @ViewChild('rowDetailPanel') set content(content: ElementRef) {\r\n if (content) this.rowDetailPanel = content;\r\n }\r\n @ViewChild('selectExcelFile') selectExcelFile; // Used to load an Excel file to import its data.\r\n\r\n public dataUsedWithKendoGrid: DataUsedWithKendoGrid = new DataUsedWithKendoGrid();\r\n private helper = new KendoGridHelper();\r\n public formInstanceElementId: number; // the Id of the FormInstanceElement which contains the grid data\r\n private formInstanceId: number;\r\n private formFieldId: number;\r\n private showGridFilter: boolean = true;\r\n\r\n private kendoGridInstance: GridComponent;\r\n @ViewChild('kendoGridComponent') public kendoGridComponent!: GridComponent;\r\n\r\n //TEAMS-838: KLW - Create a form group to be used in validation \r\n public formGroup: UntypedFormGroup;\r\n public validationCount = 0;\r\n\r\n //VNEXT-1540: KLW - Flag for resizable attribute of the Kendo grid\r\n public resizable: boolean = false;\r\n\r\n private loadingDataProgress: LoadingDataProgressInfo = new LoadingDataProgressInfo();\r\n private kendoGridService: KendoGridService;\r\n private gridValidity: string;\r\n private rowEditInProgress: boolean;\r\n\r\n private filterPresets: GridFilter[] = [];\r\n public gridFlavorImpl: IGridFlavor;\r\n public presetFilterSelected: string;\r\n\r\n // Constructor.\r\n public constructor(private currentSiteService: CurrentSiteService,\r\n private flexibleSelectionFieldService: FlexibleSelectionFieldService,\r\n formFieldTypeAndNameService: FormFieldTypeAndNameService,\r\n resolver: ComponentFactoryResolver,\r\n fieldDefinitionService: FieldDefinitionService,\r\n private dialog: MatDialog,\r\n private currentUserService: CurrentUserService,\r\n private exportDataService: ExportDataService,\r\n private geocodeService: GeocodeService,\r\n private asyncJobService: AsyncJobService,\r\n private importDataService: ImportDataService,\r\n private communicationService: CommunicationService,\r\n private fieldConditionalLogicService: FieldConditionalLogicService,\r\n private httpClient: HttpClient,\r\n private ngZone: NgZone) {\r\n super(formFieldTypeAndNameService, fieldDefinitionService, resolver);\r\n }\r\n\r\n // BEGIN ============================================= ADDED FOR ATTACHMENTS ====================================================\r\n public rebind(): void {\r\n this.kendoGridRemoteBindingRef.rebind();\r\n }\r\n\r\n public get Data(): GridDataResult {\r\n return this.kendoGridRemoteBindingRef?.Data;\r\n }\r\n\r\n public get ScrollMode() {\r\n return this.gridFlavorImpl.scrollMode();\r\n }\r\n\r\n // TODO: make dataItem typesafe\r\n public isAttachmentsGridFlavorAndRowIsEnabled(dataItem: any) {\r\n let retValue: boolean = false;\r\n if (this.IsAttachmentsGridFlavor) {\r\n let isEnabled = dataItem?.__gridRow?.hshFormInstanceElementsByName[AttachmentStandardColumnNames.IsDisabled]?.standinDisplayValue == \"0\";\r\n retValue = isEnabled;\r\n }\r\n return retValue;\r\n }\r\n // TODO: make dataItem typesafe\r\n public isAttachmentsGridFlavorAndRowIsDisabled(dataItem: any) {\r\n let retValue: boolean = false;\r\n if (this.IsAttachmentsGridFlavor) {\r\n let isDisabled = dataItem?.__gridRow?.hshFormInstanceElementsByName[AttachmentStandardColumnNames.IsDisabled]?.standinDisplayValue == \"1\";\r\n retValue = isDisabled;\r\n }\r\n return retValue;\r\n }\r\n public userCanRestore(): boolean {\r\n return this.formInstance?.canAdmin;\r\n }\r\n // Simply emit a GridEvent for the parent to handle\r\n public emitGridEvent(event: any, type: string) {\r\n this.gridEvent.emit(new GridEvent(event, type));\r\n }\r\n public get IsRegularGridFlavor(): boolean {\r\n return this.flavor == GridFlavorEnum.RegularGrid;\r\n }\r\n public get IsAttachmentsGridFlavor(): boolean {\r\n return this.flavor == GridFlavorEnum.AttachmentsGrid;\r\n }\r\n public get CommandColumnWidth(): number {\r\n return this.gridFlavorImpl.gridCommandColumnWidth();\r\n //if (this.IsAttachmentsGridFlavor) return 150;\r\n //else return 75;\r\n }\r\n public get ShowAddRowButton(): boolean {\r\n return this.IsRegularGridFlavor;\r\n }\r\n public get ShowPasteButton(): boolean {\r\n return this.IsRegularGridFlavor;\r\n }\r\n public get ShowUpdloadFromExcelButton(): boolean {\r\n return this.IsRegularGridFlavor;\r\n }\r\n\r\n // END \r\n\r\n private createFormGroup() {\r\n this.formGroup = new UntypedFormGroup({});\r\n this.validationCount = 0;\r\n }\r\n\r\n public get validationFormGroup(): boolean {\r\n var retVal: boolean = false;\r\n if (this.formGroup) {\r\n retVal = !this.formGroup.valid;\r\n }\r\n return retVal;\r\n }\r\n\r\n public get FormInstance(): FormInstance {\r\n return this.formInstance;\r\n }\r\n\r\n // pharvey - 5/29/2024 - VNEXT-1294 - this is triggered from FormRenderer and CommunicationService when a user clicks the main Save button on a Form\r\n public saveAnyUnsavedRows(loc: string): Promise {\r\n if (this.rowEditInProgress) {\r\n let sender = this.kendoGridInstance;\r\n\r\n let selectedGridRow = this.dataUsedWithKendoGrid.selectedGridRow;\r\n let rowIndex = this.dataUsedWithKendoGrid.editedRowIndex;\r\n let isNew = this.dataUsedWithKendoGrid.CurrentDataItem == null;\r\n let dataItem = this.dataUsedWithKendoGrid.CurrentDataItem;\r\n let cols = sender.columns['_results'];\r\n\r\n this.newRowIsBeingAdded = false;\r\n this.rowEditInProgress = false;\r\n\r\n this.saving = true;\r\n return this.kendoGridService.addOrUpdateRow(\r\n this.formInstanceElementId,\r\n this.formInstanceId,\r\n this.formFieldId,\r\n selectedGridRow,\r\n this.formInstance.getSelectedValuesByFieldId(),\r\n rowIndex,\r\n cols,\r\n dataItem,\r\n isNew,\r\n this.gridFormFieldComponent.GridConfig,\r\n this.GridFormFieldComponent,\r\n sender.data['total']\r\n ).then(x => {\r\n this.extraHeightWhenEditingRow = 0;\r\n this.closeAnyExistingRowEditor(sender, rowIndex);\r\n this.saving = false;\r\n return x;\r\n });\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n resolve(null);\r\n });\r\n }\r\n }\r\n\r\n public handleWrapperFormControlCreated(control: any) {\r\n // pharvey - if a control has a status of \"DISABLED\" it means it's readonly, so skip it to avoid spurious validation errors\r\n if (this.formGroup && control.status != FormFieldPropertyEnum.DISABLED) {\r\n this.formGroup.addControl(\"KendoValidation\" + this.validationCount.toString(), control);\r\n this.validationCount++;\r\n }\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n this.gridFlavorImpl = GridFlavorFactory.getImplementation(this.flavor);\r\n\r\n this.communicationService.registerGrid(this);\r\n\r\n // LOOK INTO GETTING THIS INJECT AT THE COMPONENT LEVEL (look at providers) SO WE DON\"T HAVE TO MANUALLY INSTANTIATE IT HERE\r\n this.kendoGridService = new KendoGridService(this.httpClient, this.fieldDefinitionService, this.flexibleSelectionFieldService);\r\n // TO DO: MOVE 'preview'/'instance' mode-related ngOnInit() code from grid-form-field.component.ts. to this method.\r\n\r\n // 05-02-2024 note: added the following code to handle grid column totals, if so configured.\r\n if (this.ShowNumericTotalsFooter) {\r\n let totalsHelper: GridColumnTotalsHelper = new GridColumnTotalsHelper(this.fieldDefinitionService, this.gridFormFieldComponent.GridColumnDefs);\r\n this.helper.DataSpy = totalsHelper;\r\n }\r\n\r\n this.adjustToolbarHeadersFiltersHeight();\r\n\r\n //apply preset filters\r\n let gridField = this.formInstance.form.formFields.find(g => g.id == this.gridFormFieldComponent.FormField.id);\r\n if (gridField) {\r\n let filterPresetsJson: GridFilter[] = JSON.parse(gridField.formTemplateInstancesGridJsonConfig);\r\n if (filterPresetsJson) {\r\n let filters = filterPresetsJson[\"presetGridFilters\"];\r\n if (filters && filters[0].filterName) {\r\n this.filterPresets = filters;\r\n }\r\n }\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.hideGridBodyIfSoConfigured();\r\n }\r\n\r\n // Note: the folloing method, presently not in use, can be enabled by adding the followline to the grid component's HTML definition:\r\n //\r\n // (dataStateChange)=\"onDataStateChange(kendoGridComponent,$event)\"\r\n /*\r\n public onDataStateChange(kendoGridComponent: GridComponent, eventData: any): void {\r\n // TO DO: remove this method.\r\n return;\r\n }\r\n */\r\n\r\n public gridColumnInit(hshEventData: any, hshUnusedColumnDef: FormField): void {\r\n super.gridColumnInit(hshEventData, hshUnusedColumnDef);\r\n\r\n let component: FormFieldBaseComponent = hshEventData['component'];\r\n\r\n if (component != null) {\r\n // Begin 11-14-2024 new code (to work around not using [(ngMode)] anymore):\r\n let componentFormField = component.FormField;\r\n let componentFormInstanceElement = component.FormInstanceElement;\r\n let cellFormInstanceElementWrapper = this.DataUsedWithKendoGrid.selectedGridRow.getFormInstanceElementWrapper(componentFormField);\r\n if ((componentFormInstanceElement != null) && (cellFormInstanceElementWrapper != null) && (cellFormInstanceElementWrapper.formInstanceElement != null)) {\r\n componentFormInstanceElement.copyWithAnyChildElements(cellFormInstanceElementWrapper.formInstanceElement);\r\n component.formFieldUpdated(); // This will result in a call to the underlying component's writeValueTriggered() method.\r\n }\r\n // End 11-14-2024 new code.\r\n }\r\n\r\n }\r\n\r\n // Override applicable base class/FormFieldComponent methods.\r\n public isCompoundObjectComponent(): boolean {\r\n // Note: this method is also used in apply conditional logic.\r\n return true;\r\n }\r\n public resetConditionalLogicSettings(): void {\r\n // Note: reset cached column settings.\r\n //this.gridFormFieldComponent.GridConfig.CachedGridColumnDefs = null;\r\n this.gridFormFieldComponent.GridConfig.ConditionalLogicColumnDefs = null;\r\n }\r\n public applyChildFieldAttributes(childFieldName: string, showChildField: boolean, childFieldIsReadOnly: boolean, childFieldIsRequired: boolean): void {\r\n let gridConfig: GridConfig = this.gridFormFieldComponent.GridConfig;\r\n let columnDefs: FormField[] = gridConfig.ColumnDefs;\r\n\r\n let childFieldColumnDef: FormField = columnDefs.find(cd => cd.name == childFieldName);\r\n if (childFieldColumnDef != null) {\r\n childFieldColumnDef.readOnly = childFieldIsReadOnly;\r\n childFieldColumnDef.required = childFieldIsRequired;\r\n\r\n let columnDefsToFilter: FormField[] = gridConfig.CachedGridColumnDefs != null ? gridConfig.CachedGridColumnDefs : columnDefs;\r\n // Note: if the target column is not already included in columnDefsToFilter, we need to add it.\r\n let filteredColumnDefs: FormField[] = null; \r\n if (showChildField && (columnDefsToFilter.find(cd => cd.name == childFieldColumnDef.name) == null)) {\r\n columnDefsToFilter.push(childFieldColumnDef);\r\n filteredColumnDefs = columnDefsToFilter;\r\n } else if ((!showChildField) && (columnDefsToFilter.find(cd => cd.name == childFieldColumnDef.name) != null)) {\r\n filteredColumnDefs = columnDefsToFilter.filter(cd => cd.name != childFieldColumnDef.name);\r\n } else {\r\n filteredColumnDefs = columnDefsToFilter;\r\n }\r\n\r\n let outputData = new ConditionalLogicColumnDefsFilterData(this.kendoGridComponent, filteredColumnDefs, childFieldColumnDef, showChildField);\r\n //this.conditionalLogicColumnDefsFilter.emit(filteredColumnDefs);\r\n this.conditionalLogicColumnDefsFilter.emit(outputData);\r\n\r\n if ((this.gridFormFieldComponent != null) && (this.gridFormFieldComponent.RuntimeMetadata != null) && (this.gridFormFieldComponent.RuntimeMetadata.AllComponents != null)) {\r\n for (let index: number = 0; index < this.gridFormFieldComponent.RuntimeMetadata.AllComponents.length; index++) {\r\n let componentInfo: ComponentAndFormField = this.gridFormFieldComponent.RuntimeMetadata.AllComponents[index];\r\n if (childFieldColumnDef.id == componentInfo.FormField.id) {\r\n componentInfo.Component.formFieldUpdated();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private applyFieldConditionalLogicInstructions(targetFieldInstructions: TargetFieldConditionalLogicInstructions[]): void {\r\n // Clear any cached/saved column definitions.\r\n this.gridFormFieldComponent.GridConfig.CachedGridColumnDefs = null;\r\n\r\n // Apply any instructions.\r\n if (targetFieldInstructions != null) {\r\n let instructionsForFormRenderer: TargetFieldConditionalLogicInstructions[] = [];\r\n\r\n for (let index: number = 0; index < targetFieldInstructions.length; index++) {\r\n let targetFieldInstruction: TargetFieldConditionalLogicInstructions = targetFieldInstructions[index];\r\n\r\n if (targetFieldInstruction.targetFieldId == this.gridFormFieldComponent.FormField.id) {\r\n this.applyChildFieldAttributes(targetFieldInstruction.childFieldName, targetFieldInstruction.showTargetField, !targetFieldInstruction.makeTargetFieldEditable, targetFieldInstruction.makeTargetFieldRequired);\r\n } else {\r\n instructionsForFormRenderer.push(targetFieldInstruction);\r\n }\r\n }\r\n\r\n if (instructionsForFormRenderer.length > 0) {\r\n // Note: these are instructions that the form renderer, my parent, has to apply, so let my\r\n // parent know that there are conditional logic instructions that need to be applied.\r\n this.gridFormFieldComponent.conditionalLogicInstructions.emit(instructionsForFormRenderer);\r\n }\r\n }\r\n }\r\n\r\n // Define accessor methods called by my HTML code.\r\n public get Helper(): KendoGridHelper {\r\n return this.helper;\r\n }\r\n\r\n public get IsLoading() {\r\n return this.kendoGridService.Loading;\r\n }\r\n\r\n public get HideRowDelete(): boolean {\r\n return this.gridFormFieldComponent.FormField.disableGridRowDeleteForNonAdmins && (!this.currentSiteService.Site.siteIsAdministerable);\r\n }\r\n\r\n public get IsReadOnlyGrid() {\r\n return (this.ReadOnly);\r\n }\r\n\r\n public get ModifyRowDisabled() {\r\n if (this.ReadOnly) return true;\r\n return this.HasFixedRowHeadings;\r\n }\r\n\r\n public get HasFixedRowHeadings() {\r\n return this.gridFormFieldComponent.FormField.fixedFirstColumnJson != null;\r\n }\r\n\r\n public get HideFormFieldBody(): boolean {\r\n return this.gridFormFieldComponent.FormField.hideFormFieldBody;\r\n }\r\n\r\n public parentReceivedFormInstanceElement(formInstanceElement: FormInstanceElement): void {\r\n this.formInstanceElementId = formInstanceElement.id;\r\n this.formFieldId = formInstanceElement.formFieldId;\r\n this.formInstanceId = formInstanceElement.formInstanceId;\r\n }\r\n\r\n public getNumericFooterTotalValueFor(colIndex: number, columnDef: FormField): string {\r\n let totalsHelper: GridColumnTotalsHelper = this.helper.DataSpy;\r\n return totalsHelper != null ? totalsHelper.getFooterValue(columnDef) : '';\r\n }\r\n\r\n public get FilterPresets(): GridFilter[] {\r\n return this.filterPresets;\r\n }\r\n\r\n public selectPresetFilter(e): void {\r\n this.helper.handleClearFilters();\r\n if (e?.filters) {\r\n e.filters.forEach(f => {\r\n this.helper.Filters.filters.push({\r\n field: f.columnName, // 'c1',\r\n operator: f.filterOperatorAbbreviation, //'eq',\r\n value: f.filterMatchValue // 'Agency A'\r\n })\r\n })\r\n this.helper.Filters.logic = \"and\";\r\n }\r\n }\r\n\r\n public filterChange(): void {\r\n this.presetFilterSelected = \"\";\r\n }\r\n\r\n public ShowGeocodeGrid(): boolean {\r\n return this.gridFlavorImpl.showGeocodeGrid(environment.apiUrl.toLowerCase(), this.FormFieldId);\r\n }\r\n\r\n public geoCodeGrid(): void {\r\n let gridCols = [];\r\n this.GridColumnDefs.forEach(gcd => {\r\n gridCols.push({ id: gcd.id, name: gcd.name });\r\n })\r\n\r\n let dialogRef = this.dialog.open(GeocodeDialog, {\r\n width: \"500px\",\r\n data: new GeocodeDialogModel(\r\n `Geocode Grid Data`,\r\n gridCols\r\n )\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(retVal => {\r\n if (retVal) {\r\n this.geocodeService.GeocodeGrid(this.formInstanceId, this.formInstanceElementId).then(resp => {\r\n this.flagDirty();\r\n this.kendoGridService.read(this.gridFormFieldComponent.GridConfig, this.fieldDefinitionService, this.gridFormFieldComponent, this.formInstanceElementId, this.dataUsedWithKendoGrid.gridState);\r\n });\r\n }\r\n });\r\n }\r\n\r\n public showPasteAreaKendo(): void {\r\n // Show dialog for pasted Excel data.\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '600px';\r\n\r\n let gridHasData: boolean = false;\r\n\r\n dialogConfig.data = { colCount: this.gridFormFieldComponent.GridConfig.ColumnCount, rowCount: this.Helper.TotalRowCount, gridHasData: this.Helper.TotalRowCount > 0, pasteMode: 'replace', pasteData: '' };\r\n const dialogRef = this.dialog.open(GridPasteKendoDialog, dialogConfig);\r\n dialogRef.disableClose = true;\r\n dialogRef.beforeClosed().subscribe(() => dialogRef.close(dialogConfig.data));\r\n dialogRef.afterClosed().subscribe(replaceGridData => {\r\n if ((replaceGridData != null) && (replaceGridData.pasteData != null) && (replaceGridData.pasteData.trim() != '')) {\r\n let replaceGridDataFlag: boolean = replaceGridData.pasteMode == 'replace';\r\n this.importDataService.importExcelPasteDataIntoGrid(replaceGridData.pasteData, this.formInstanceElementId, replaceGridDataFlag).then(asyncJob => {\r\n let jobMonitor: MonitorExcelImportToGridHelper = new MonitorExcelImportToGridHelper(this.asyncJobService);\r\n jobMonitor.startMonitoringJob(asyncJob, this.jobCompletedOrUpdatedArrowFunction);\r\n\r\n let dialogInitInfo = new ImportGridDataDialogInitInfo(this.formInstanceElementId, null, null, asyncJob, replaceGridDataFlag);\r\n\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '500px';\r\n dialogConfig.height = '590px';\r\n dialogConfig.data = dialogInitInfo;\r\n\r\n const dialogRef = this.dialog.open(ImportGridDataDialog, dialogConfig);\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n // If the result is non-null, reload the grid's data.\r\n if (result != null) {\r\n this.flagDirty(); // Indicate that there is new data that has not yet been saved.\r\n this.kendoGridService.readPending(\r\n this.gridFormFieldComponent.GridConfig,\r\n this.fieldDefinitionService,\r\n this.gridFormFieldComponent,\r\n this.formInstanceElementId,\r\n this.dataUsedWithKendoGrid.gridState\r\n );\r\n }\r\n });\r\n\r\n });\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n public importGridDataClicked(): void {\r\n this.selectExcelFile.nativeElement.click();\r\n }\r\n public exportGridDataClicked() {\r\n this.exportDataService.exportGridDataAsExcelSpreadsheet(this.FormInstanceElementId).then(asyncJob => {\r\n this.asyncJobService.monitorJobUntilCompletion(asyncJob, 250, this.openExportedDataExcelSpreadsheet);\r\n });\r\n }\r\n\r\n private openExportedDataExcelSpreadsheet = (asyncJob: AsyncJob, successFlag: boolean) => {\r\n let downloadFileName: string = `grid_${this.FormInstanceElementId}_data.xlsx`;\r\n let downloadFileURL: string = this.exportDataService.getResultFileDownloadUrl(asyncJob, downloadFileName);\r\n\r\n window.open(downloadFileURL, '_blank');\r\n }\r\n\r\n public onExcelFileChanged(eventData: any): void {\r\n if (this.selectExcelFile.nativeElement.files?.length > 0) {\r\n let file: File = this.selectExcelFile.nativeElement.files[0];\r\n let filename: string = file.name;\r\n\r\n let asyncJob: AsyncJob = null; // As we are no longer initiating the job outside of the dialogue.\r\n\r\n let dialogInitInfo = new ImportGridDataDialogInitInfo(this.formInstanceElementId, file, filename, asyncJob);\r\n\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '500px';\r\n dialogConfig.height = '590px';\r\n dialogConfig.data = dialogInitInfo;\r\n\r\n const dialogRef = this.dialog.open(ImportGridDataDialog, dialogConfig);\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n // Always clear the file control. If the grid was updated, indicated by a non-null result, refresh the grid.\r\n FileInputUtil.clearFileSelection(this.selectExcelFile);\r\n if (result != null) {\r\n this.flagDirty(); // Indicate that there is new data that has not yet been saved.\r\n this.kendoGridService.readPending(\r\n this.gridFormFieldComponent.GridConfig,\r\n this.fieldDefinitionService,\r\n this.gridFormFieldComponent,\r\n this.formInstanceElementId,\r\n this.dataUsedWithKendoGrid.gridState\r\n );\r\n }\r\n });\r\n }\r\n }\r\n\r\n public SortSettings: MultipleSortSettings = {\r\n mode: \"multiple\",\r\n initialDirection: \"desc\",\r\n allowUnsort: true,\r\n showIndexes: true,\r\n };\r\n\r\n public get GridIsFilterable(): boolean {\r\n return !this.gridFormFieldComponent.FormField.hideGridFiltering;\r\n }\r\n public FilterType(columnDef: FormField): string {\r\n let handler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName).customLogicHandler;\r\n let filterType = handler.filterType();\r\n return filterType;\r\n }\r\n\r\n public turnOnGridFilter() {\r\n this.showGridFilter = true;\r\n }\r\n\r\n public turnOffGridFilter() {\r\n this.Helper.handleClearFilters();\r\n this.presetFilterSelected = '';\r\n this.showGridFilter = false;\r\n }\r\n\r\n public ColumnIsFilterable(columnDef: FormField): boolean {\r\n // This is temporary conditional logic.\r\n // The isFilterable() method of Multi value fieldDefs now returns \"true\" in order for them to enabled on the home page grids, but they are still not enabled on\r\n // regular grids yet\r\n\r\n if (!this.showGridFilter) return false;\r\n\r\n if (columnDef.fieldDefinitionClassName.indexOf('MultiDropDownFieldDefinition') > -1 || columnDef.fieldDefinitionClassName.indexOf('MultiCheckBoxFieldDefinition') > -1) {\r\n return false;\r\n }\r\n let handler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName).customLogicHandler;\r\n return handler.isFilterable();\r\n }\r\n\r\n public get ShowGridFilter(): boolean {\r\n return this.showGridFilter;\r\n }\r\n\r\n public IsSortable(columnDef: FormField): boolean {\r\n if (columnDef.fieldDefinitionClassName.indexOf('MultiDropDownFieldDefinition') > -1 || columnDef.fieldDefinitionClassName.indexOf('MultiCheckBoxFieldDefinition') > -1) {\r\n return false;\r\n }\r\n let handler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName).customLogicHandler;\r\n return handler.isFilterable();\r\n }\r\n\r\n public GetColumnWidth(columnDef: FormField): number {\r\n return columnDef.gridColumnWidth > 0 ? columnDef.gridColumnWidth : 180;\r\n }\r\n\r\n // Determines if the \"+\" sign should be shown to allow the row to be expanded and show fields that are configured to display in the detail area\r\n public GridHasDetail(): boolean {\r\n let res = this.GridColumnDefs.filter(x => { return ['ShowInExpandedDetailOnly', 'ShowInRowDataAndDetail'].indexOf(x.gridColumnBehavior) > -1 });\r\n return res.length > 0;\r\n }\r\n\r\n public ShowColumnInRow(columnDef: FormField): boolean {\r\n return !columnDef.gridColumnBehavior || (['ShowInRowDataOnly', 'ShowInRowDataAndDetail'].indexOf(columnDef.gridColumnBehavior) > -1);\r\n }\r\n\r\n public ShowColumnInDetail(columnDef: FormField): boolean {\r\n return ['ShowInExpandedDetailOnly', 'ShowInRowDataAndDetail'].indexOf(columnDef.gridColumnBehavior) > -1;\r\n }\r\n\r\n public ShowColumnAs(columnDef: FormField): string {\r\n let logicHandler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName).customLogicHandler;\r\n return logicHandler.whenInGridShowAs();\r\n }\r\n\r\n //VNEXT-894: KLW - Needed to show the contents of the HTML link form field as a URL\r\n public ShowColumnAsURLLink(columnDef: FormField): boolean {\r\n var retVal = false;\r\n\r\n let handler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName).customLogicHandler;\r\n\r\n if (handler) {\r\n if (handler.isURLLink()) {\r\n retVal = true\r\n }\r\n }\r\n return retVal;\r\n }\r\n\r\n //Kevin\r\n public test(colId: number): FormInstanceElement {\r\n return this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[colId].formInstanceElement\r\n }\r\n\r\n // TODO: It should be ok to remove this -- it's no longer being used since the KendoGridRemoteBinding directive now manages state updates\r\n public onStateChange(state: State): void {\r\n this.dataUsedWithKendoGrid.gridState = state;\r\n }\r\n\r\n // Handles clicking the \"Add Row\" button\r\n public addRowToUI({ sender }: AddEvent): void {\r\n this.kendoGridInstance = sender;\r\n this.flexibleSelectionFieldService.getFlexibleSelectFieldInstructionsForGridRow(this.formInstanceId, null /*rowData*/, this.GridColumnDefs, this.formInstance);\r\n\r\n this.extraHeightWhenEditingRow = 100; // TODO - set it by calculating the actual row height\r\n this.closeAnyExistingRowEditor(sender);\r\n this.rowEditInProgress = true;\r\n\r\n // in order for the new row to display correctly, need to construct a GridRowDef and set it as this.DataUsedWithKendoGrid.selectedGridRow\r\n // (This enables the two-way databinding to work in the template ... [(ngModel)]=\"this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement\")\r\n let gridRow = new GridRowDef(this.gridFormFieldComponent.GridConfig, 0, 0, 0, 0, this.GridFormFieldComponent);\r\n this.DataUsedWithKendoGrid.selectedGridRow = gridRow;\r\n\r\n // GridComponent.addRow() expects a FormGroup so create one (maybe the Kendo GridComponent can provide this?)\r\n let formFields = {}\r\n for (let colDef of this.GridColumnDefs) {\r\n formFields[colDef.displayName] = new UntypedFormControl();\r\n }\r\n let fg = new UntypedFormGroup(formFields)\r\n\r\n this.flagDirty();\r\n\r\n sender.addRow(fg);\r\n }\r\n\r\n /**\r\n * Used to call a service method which will remove a row from a grid.\r\n */\r\n public handleRemove(event: RemoveEvent): void {\r\n this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n this.kendoGridService.removeRow(event.dataItem['__gridRow'].databaseId, this.flavor).then(x => { });\r\n }\r\n\r\n // Certain field types when clicked shouldn't place the row they're in into edit mode (for example url builder button fields)\r\n private doNotEnterEditMode(columnIndex) {\r\n let colDef = this.GridColumnDefs[columnIndex];\r\n if (colDef) {\r\n let fieldLogic = this.fieldDefinitionService.getFieldClientLogicHandler(colDef.fieldDefinitionClassName);\r\n return (fieldLogic?.doNotTriggerGridRowEditFor());\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public handleEditCellClick(event: CellClickEvent) {\r\n if (this.doNotEnterEditMode(event.columnIndex - 1)) return;\r\n // effectively disables editing\r\n if (!this.rowUsesButton('edit', event.dataItem)) return;\r\n\r\n let isHTMLColumn: FormField;\r\n let handler: IFieldDefinitionLogic;\r\n this.DataUsedWithKendoGrid.CurrentDataItem = event.dataItem;\r\n\r\n //VNEXT-894: KLW - Handle if the data is null and if not account if the form field is a URL\r\n if (event.columnIndex > 0) {\r\n if (event.dataItem.__gridRow) {\r\n if (event.dataItem.__gridRow.gridConfig) {\r\n isHTMLColumn = event.dataItem.__gridRow.gridConfig.columnDefs[event.columnIndex - 1];\r\n\r\n if (isHTMLColumn) {\r\n handler = this.fieldDefinitionService.getFieldDefinition(isHTMLColumn.fieldDefinitionClassName).customLogicHandler;\r\n\r\n if (handler.isURLLink())\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (event.column instanceof CommandColumnComponent || event.rowIndex < 0) {\r\n // let handlers for specific command events (like edit, remove, update etc) handle these events\r\n return;\r\n } else {\r\n this.handleEdit({ sender: event.sender, rowIndex: event.rowIndex, columnIndex: event.columnIndex, dataItem: event.dataItem, isEdited: event.isEdited });\r\n }\r\n }\r\n\r\n // Handles when user starts editing a row\r\n public handleEdit({ sender, rowIndex, columnIndex, dataItem, isEdited }): void {\r\n //VNEXT-1540: KLW - Code to set resizable to true when editing\r\n this.resizable = true;\r\n\r\n this.kendoGridInstance = sender;\r\n\r\n let databaseId = dataItem.__gridRow.databaseId; // changed for VNEXT-1371 - used to be \"dataItem.__gridRow.isPendingEditFor_DatabaseId;\"\r\n\r\n this.extraHeightWhenEditingRow = 100;\r\n if (this.rowEditInProgress) {\r\n let editedRowIndex = this.dataUsedWithKendoGrid.editedRowIndex;\r\n // Kendo Grid fires its cellClick event when elements inside a Grid are clicked. That means clicking, for example, a dropdown or radio button fires the event\r\n // The next line handles that. May need to look to consume the click event in our own form field components (radio, dropdown etc.)\r\n if (editedRowIndex == rowIndex) return;\r\n\r\n if (this.gridIsDirty()) {\r\n // save the row that was being edited...\r\n let dataItemToSave = sender.data.data[editedRowIndex]; // sender.data is an object one of whose properties is data, the array of DataItems\r\n let cols = sender.columns['_results'];\r\n this.saving = true;\r\n this.kendoGridService.addOrUpdateRow(this.formInstanceElementId, this.formInstanceId, this.formFieldId, this.dataUsedWithKendoGrid.selectedGridRow, this.formInstance.getSelectedValuesByFieldId(), editedRowIndex, cols, dataItemToSave, false, this.gridFormFieldComponent.GridConfig, this.GridFormFieldComponent).then(x => {\r\n this.closeAnyExistingRowEditor(sender, editedRowIndex);\r\n this.saving = false;\r\n if (rowIndex != editedRowIndex) {\r\n this.setupRowForEditing(dataItem, rowIndex, databaseId, sender);\r\n }\r\n });\r\n } else {\r\n // close the row\r\n this.closeAnyExistingRowEditor(sender, editedRowIndex);\r\n this.setupRowForEditing(dataItem, rowIndex, databaseId, sender);\r\n }\r\n } else {\r\n this.setupRowForEditing(dataItem, rowIndex, databaseId, sender);\r\n }\r\n\r\n //VNEXT-1540: KLW - Code to set resizable to true when editing\r\n this.fitColumns();\r\n }\r\n\r\n //VNEXT-894: KLW - These methods are needed for validation on a new Kendo grid row\r\n public addValidationAndFlagForNewKendoRow() {\r\n this.createFormGroup();\r\n this.newRowIsBeingAdded = true;\r\n }\r\n\r\n public removeNewKendoRowFlag() {\r\n this.createFormGroup();\r\n this.newRowIsBeingAdded = false;\r\n }\r\n\r\n public rowUsesButton(button: string, dataItem: any): boolean {\r\n return this.gridFlavorImpl.usesButton(button, dataItem);\r\n }\r\n\r\n public get NewRowDisabled(): boolean {\r\n let disabled = false;\r\n if (this.newRowIsBeingAdded) {\r\n disabled = true;\r\n } else {\r\n disabled = !this.gridFlavorImpl.canAddNewRow();\r\n }\r\n return disabled;\r\n }\r\n\r\n // Very rudimentary initial, quick stab at adjustment of the value of this.toolbarHeadersFilters to account for\r\n // wrapping grid column headers. Really, this should also take into account 1) the number of columns and\r\n // 2) the width of the component\r\n private adjustToolbarHeadersFiltersHeight() {\r\n let gridHeaderText = this.GridColumnDefs.map(x => x.displayName);\r\n let longestHeader = gridHeaderText.reduce(function (a, b) { return a.length > b.length ? a : b; }, '');\r\n if (longestHeader.length > 25) {\r\n this.toolbarHeadersFilters += longestHeader.length;\r\n }\r\n }\r\n\r\n private setupRowForEditing(dataItem: any, rowIndex: number, databaseId: number, sender: any) {\r\n\r\n this.flexibleSelectionFieldService.getFlexibleSelectFieldInstructionsForGridRow(this.formInstanceId, dataItem, this.GridColumnDefs, this.formInstance);\r\n\r\n this.rowEditInProgress = true;\r\n this.dataUsedWithKendoGrid.editedRowIndex = rowIndex;\r\n\r\n //VNEXT-863, VNEXT-864 : KLW - There was an issue where CRUD operations on rows during virtualization were throwing errors. This was because\r\n //we were trying to get rows by their index in the Grid which works for the inital Grid data loaded, but when virtualization kicks in that data\r\n //is replaced by the 50 rows that show in the Grid. For example a row at index 500 will not be found in a Grid data set that has only 50 items if\r\n //we search by row index. The solution to this is to use the isPendingEditFor_DatabaseId value for each row where we can find it in whatever\r\n //Grid data set that has been loaded. If not we do a null check.\r\n let gridData = sender.data.data;\r\n let row = null;\r\n if (databaseId == 0) {\r\n row = gridData[rowIndex];\r\n } else {\r\n row = gridData.find(x => x.__gridRow.databaseId === databaseId);\r\n }\r\n\r\n if (row) {\r\n let gridRow: GridRowDef = row.__gridRow;\r\n\r\n gridRow.IsSelected = true;\r\n this.dataUsedWithKendoGrid.editedRowIndex = rowIndex;\r\n this.dataUsedWithKendoGrid.selectedGridRow = gridRow;\r\n this.dataUsedWithKendoGrid.selectedGridRow.GridFlavor = this.flavor;\r\n this.dataUsedWithKendoGrid.backupForCancel();\r\n\r\n this.createFormGroup();\r\n\r\n sender.editRow(rowIndex, null);\r\n }\r\n }\r\n\r\n // Handles when user clicks \"Add\" or \"Update\" button on a row\r\n public handleAddOrUpdate({ sender, dataItem, rowIndex, formGroup, isNew }: SaveEvent): void {\r\n\r\n const valuesToFieldIds = this.formInstance.getSelectedValuesByFieldId();\r\n\r\n //VNEXT-1540: KLW - Code to set resizable to false\r\n this.resizable = false;\r\n let selectedGridRow = this.dataUsedWithKendoGrid.selectedGridRow;\r\n\r\n this.newRowIsBeingAdded = false;\r\n let cols = sender.columns['_results'];\r\n this.saving = true;\r\n this.kendoGridService.addOrUpdateRow(\r\n this.formInstanceElementId,\r\n this.formInstanceId,\r\n this.formFieldId,\r\n selectedGridRow,\r\n valuesToFieldIds,\r\n rowIndex,\r\n cols,\r\n dataItem,\r\n isNew,\r\n this.gridFormFieldComponent.GridConfig,\r\n this.GridFormFieldComponent,\r\n sender.data['total'] // added for VNEXT-1371 in order to set RowIndex for a new row\r\n ).then(x => {\r\n this.extraHeightWhenEditingRow = 0;\r\n this.closeAnyExistingRowEditor(sender, rowIndex);\r\n this.saving = false;\r\n });\r\n }\r\n\r\n public handleRowReorder(event: RowReorderEvent) {\r\n\r\n let message = this.gridFlavorImpl.cannotMoveRowMessage(event.draggedRows[0]);\r\n if (message) {\r\n alert(message);\r\n return;\r\n }\r\n\r\n let originalIndexOfMovedRow = event.draggedRows[0].rowIndex;\r\n let movedRowId = event.draggedRows[0].dataItem.__gridRow.databaseId;\r\n let originalIndexOfTargetRow = event.dropTargetRow.rowIndex;\r\n let targetRowId = event.dropTargetRow.dataItem.__gridRow.databaseId;\r\n let position = event.dropPosition;\r\n this.flagDirty();\r\n this.kendoGridService.repositionRow(\r\n this.flavor,\r\n this.formInstanceElementId,\r\n originalIndexOfMovedRow,\r\n movedRowId,\r\n originalIndexOfTargetRow,\r\n targetRowId,\r\n position\r\n );\r\n }\r\n\r\n public handleCancel({ sender, rowIndex }: CancelEvent): void {\r\n //VNEXT-1540: KLW - Code to set resizable to false\r\n this.resizable = false;\r\n\r\n this.extraHeightWhenEditingRow = 0;\r\n this.flagClean();\r\n this.closeAnyExistingRowEditor(sender, rowIndex);\r\n }\r\n\r\n private setFormInstanceElementValue(wrapper: GridFormInstanceElementWrapper, backup: FormInstanceElement) {\r\n wrapper.formInstanceElement.textValue = backup.textValue;\r\n wrapper.formInstanceElement.intValue = backup.intValue;\r\n wrapper.formInstanceElement.decimalValue = backup.decimalValue;\r\n wrapper.formInstanceElement.doubleValue = backup.doubleValue;\r\n wrapper.formInstanceElement.booleanValue = backup.booleanValue;\r\n }\r\n\r\n // Sets that value of this.detailRowHeight which is used in calculating the grid height\r\n public handleDetailExpand(event: DetailExpandEvent) {\r\n // Timeout needed to allow time for the detail panel to be rendered and available\r\n setTimeout(() => {\r\n this.detailRowHeight += this.rowDetailPanel?.nativeElement.offsetHeight;\r\n }, 50);\r\n }\r\n\r\n public handleDetailCollapse(event: DetailCollapseEvent) {\r\n this.detailRowHeight = 0;\r\n }\r\n\r\n // Called from within which allows the value to be set as innerHTML for HTML escaping\r\n public getCellDisplayValueForKendo(dataItem: any, columnDef: any, iColIndex: number): string {\r\n let value = dataItem[columnDef.name];\r\n return value;\r\n }\r\n\r\n // Really, this component shouldn't know about field-specific stuff - think about this factoring this out\r\n public allParamsSuppliedForUrlBuilder(dataItem: any, columnDef: any, iColIndex: number): boolean {\r\n let value = dataItem[columnDef.name];\r\n return value.indexOf('PARAM-IS-NOT-SET') == -1;\r\n }\r\n\r\n public openUrl(url: string) {\r\n window.open(url, '_blank').focus();\r\n }\r\n\r\n public handleTouched(formFieldComponent: FormFieldBaseComponent): void {\r\n let sourceFieldId: number = formFieldComponent.FormField.id;\r\n let sourceFormInstanceElement: FormInstanceElement = formFieldComponent.FormInstanceElement;\r\n\r\n if (this.formInstance != null) {\r\n // Let's make a copy of this form instance that we can manipulate freely (without causing side effects).\r\n let formInstanceCopy: FormInstance = new FormInstance();\r\n formInstanceCopy.id = this.formInstance.id;\r\n formInstanceCopy.form = this.formInstance.form;\r\n formInstanceCopy.formInstanceElements = [];\r\n if (this.formInstance.formInstanceElements != null) {\r\n for (let index: number = 0; index < this.formInstance.formInstanceElements.length; index++) {\r\n let formInstanceElement: FormInstanceElement = this.formInstance.formInstanceElements[index];\r\n let fieClone = formInstanceElement.clone();\r\n\r\n if (fieClone.formFieldId == this.gridFormFieldComponent.FormField.id) {\r\n fieClone.childGridRows = [];\r\n let gridRow: GridRowViewModel = new GridRowViewModel();\r\n gridRow.formFieldId = this.gridFormFieldComponent.FormField.id;\r\n gridRow.cellDataHash = {};\r\n let cellKeys = Object.keys(this.dataUsedWithKendoGrid.selectedGridRow.HshFormInstanceElementsByName);\r\n for (let cellKeyIndex: number = 0; cellKeyIndex < cellKeys.length; cellKeyIndex++) {\r\n let cellKey: string = cellKeys[cellKeyIndex];\r\n let cellValue: GridFormInstanceElementWrapper = this.dataUsedWithKendoGrid.selectedGridRow.HshFormInstanceElementsByName[cellKey];\r\n if (cellValue != null) {\r\n let cellValueCopy: IFormContentElement = {\r\n id: cellValue.formInstanceElement.id,\r\n\r\n valueType: cellValue.formInstanceElement.valueType,\r\n\r\n textValue: cellValue.formInstanceElement.textValue,\r\n intValue: cellValue.formInstanceElement.intValue,\r\n decimalValue: cellValue.formInstanceElement.decimalValue,\r\n booleanValue: cellValue.formInstanceElement.booleanValue,\r\n doubleValue: cellValue.formInstanceElement.doubleValue,\r\n customValue: cellValue.formInstanceElement.customValue,\r\n\r\n childFormInstanceElements: []\r\n };\r\n if (cellKey == formFieldComponent.FormField.name) {\r\n cellValueCopy.textValue = sourceFormInstanceElement.textValue;\r\n cellValueCopy.intValue = sourceFormInstanceElement.intValue;\r\n cellValueCopy.decimalValue = sourceFormInstanceElement.decimalValue;\r\n cellValueCopy.booleanValue = sourceFormInstanceElement.booleanValue;\r\n }\r\n gridRow.cellDataHash[cellKey] = cellValueCopy;\r\n }\r\n }\r\n fieClone.childGridRows.push(gridRow);\r\n }\r\n\r\n formInstanceCopy.formInstanceElements.push(fieClone);\r\n }\r\n }\r\n\r\n // Find my form instance element.\r\n let myFormField: FormField = this.gridFormFieldComponent.FormField;\r\n //this.fieldConditionalLogicService.sourceFieldValueChanged(formInstanceCopy, sourceFieldId).then(response => {\r\n this.fieldConditionalLogicService.sourceFieldValueChanged(formInstanceCopy, myFormField.id).then(response => {\r\n if ((response != null) && (response.targetFieldInstructions != null)) {\r\n this.applyFieldConditionalLogicInstructions(response.targetFieldInstructions);\r\n } // if\r\n });\r\n }\r\n }\r\n\r\n //VNEXT-894: KLW - This is to manually open a URL in a new tab, otherwise using href will append the current environment url to the url being opened\r\n public openLink(url: string) {\r\n if (url != \"\")\r\n window.open(url, '_blank').focus();\r\n\r\n return false;\r\n }\r\n\r\n public getCellDisplayValue(dataItem: any, columnDef: any, iColIndex: number): string {\r\n let value: string = '';\r\n if (dataItem?.__gridRow) {\r\n dataItem = dataItem.__gridRow;\r\n if ((dataItem.FormInstanceElementWrappers != null) && (iColIndex < dataItem.FormInstanceElementWrappers.length))\r\n value = dataItem.FormInstanceElementWrappers[iColIndex].standinDisplayValue;\r\n } else {\r\n value = dataItem[columnDef.name];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n // Not currently in use\r\n public RenderAsHtml(field: FormField) {\r\n let fieldDefClientLogic: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldClientLogicHandler(field.fieldDefinitionClassName);\r\n return field.fieldDefinitionClassName.indexOf('Rich') > -1;\r\n }\r\n\r\n public ButtonLabel(columnDef: FormField): string {\r\n let label = columnDef.transientUrlBuilderButtonLabel?.trim();\r\n if (label) {\r\n return label;\r\n } else {\r\n return 'Open';\r\n }\r\n }\r\n\r\n public get KendoGridService(): KendoGridService {\r\n return this.kendoGridService;\r\n }\r\n\r\n public get DataUsedWithKendoGrid(): DataUsedWithKendoGrid {\r\n return this.dataUsedWithKendoGrid;\r\n }\r\n /*\r\n public get FormFieldWrapperNgModel(): FormInstanceElement {\r\n let formInstanceElement: FormInstanceElement = null;\r\n\r\n // this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement\r\n let selectedGridRow: GridRow = this.DataUsedWithKendoGrid.selectedGridRow;\r\n if (selectedGridRow) {\r\n if ((selectedGridRow.FormInstanceElementWrapper != null) && (selectedGridRow.FormInstanceElementWrapper.length > )\r\n }\r\n\r\n return formInstanceElement;\r\n }\r\n */\r\n\r\n private tryToReproduceOriginalNgModelError(): void {\r\n let formInstanceElement: FormInstanceElement = null;\r\n\r\n // this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement\r\n let columnDefs = this.GridColumnDefs;\r\n let selectedGridRow: GridRowDef = this.DataUsedWithKendoGrid.selectedGridRow;\r\n if (selectedGridRow) {\r\n if (selectedGridRow.FormInstanceElementWrappers != null) {\r\n if (selectedGridRow.FormInstanceElementWrappers.length != columnDefs.length)\r\n console.log('Reproduced the ngModel error');\r\n } else {\r\n console.log('Reproduced the ngModel error');\r\n }\r\n }\r\n }\r\n private dummyFormInstanceElement = new FormInstanceElement();\r\n public get DummyNgModel(): FormInstanceElement {\r\n this.tryToReproduceOriginalNgModelError();\r\n\r\n //let dummyFormInstanceElement = new FormInstanceElement();\r\n return this.dummyFormInstanceElement;\r\n }\r\n public set DummyNgModel(value: FormInstanceElement) {\r\n // Do nothing by design.\r\n //this.tryToReproduceOriginalNgModelError();\r\n }\r\n\r\n public get VirtualScrollingPageSize(): number {\r\n return this.dataUsedWithKendoGrid.gridState.take;\r\n }\r\n\r\n public get VirtualScrollingSkip(): number {\r\n let num = this.dataUsedWithKendoGrid.gridState.skip;\r\n return num;\r\n }\r\n\r\n public get Saving(): boolean {\r\n return this.saving;\r\n }\r\n\r\n public GridIsInvalid(): boolean {\r\n return this.gridValidity === FormFieldPropertyEnum.INVALID;\r\n }\r\n\r\n //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n public GetGridHeight() {\r\n let rowCount = this.kendoGridService?.DataResult?.data?.length;\r\n let rowsDisplayed: number = this.gridFormFieldComponent.formField.GetDisplayKendoGridRows;\r\n\r\n let retVal = GridFieldEditorComponent.CalculateGridHeight(this.rowHeight,\r\n this.toolbarHeadersFilters,\r\n this.detailRowHeight,\r\n this.extraHeightWhenEditingRow,\r\n rowCount,\r\n rowsDisplayed,\r\n true, // Wrapped header text is enabled.\r\n this.ShowNumericTotalsFooter);\r\n\r\n return retVal;\r\n }\r\n\r\n public handleValidityChange(state: string) {\r\n //VNEXT-894: KLW - So the valid property for a FormGroup is not working correctly. It will not accurately represent if all controls are valid\r\n //or not. So the work around is to iterate through all controls and if one is invalid then return invalid, otherwise return valid.\r\n if (this.formGroup) {\r\n var isValid = FormFieldPropertyEnum.VALID;\r\n\r\n for (const field in this.formGroup.controls) { // 'field' is a string\r\n\r\n const control = this.formGroup.get(field); // 'control' is a FormControl \r\n\r\n if (!control?.valid) {\r\n isValid = FormFieldPropertyEnum.INVALID;\r\n break;\r\n }\r\n }\r\n this.editorGridValidation.emit(isValid);\r\n }\r\n }\r\n\r\n public handleCellClose(event: any) {\r\n //console.log('handleCellClose');\r\n }\r\n\r\n private closeAnyExistingRowEditor(grid: GridComponent, rowIndex = this.dataUsedWithKendoGrid.editedRowIndex): void {\r\n if (grid != null) {\r\n grid.closeRow(rowIndex);\r\n }\r\n this.dataUsedWithKendoGrid.editedRowIndex = undefined;\r\n this.dataUsedWithKendoGrid.CurrentDataItem = null;\r\n this.rowEditInProgress = false;\r\n }\r\n\r\n private flagDirty() {\r\n this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n }\r\n private flagClean() {\r\n this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = false;\r\n }\r\n private gridIsDirty() {\r\n return this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData;\r\n }\r\n\r\n public get RowEditInProgress(): boolean {\r\n return this.rowEditInProgress;\r\n }\r\n\r\n public get FormFieldId(): number {\r\n return this.formFieldId;\r\n }\r\n\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ END STUFF ADDED FOR KENDO GRID ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n public get FieldDefinitionService() {\r\n return this.fieldDefinitionService;\r\n }\r\n\r\n public get GridFormFieldComponent() {\r\n return this.gridFormFieldComponent;\r\n }\r\n\r\n public get FormInstanceElementId() {\r\n return this.formInstanceElementId;\r\n }\r\n\r\n // Begin called by my HTML code.\r\n public ColumnIsSticky(colName: string): boolean {\r\n return this.gridFormFieldComponent.ColumnIsSticky(colName);\r\n }\r\n\r\n public GridColumnDisplayName(columnDef: FormField): string {\r\n let strDisplayName: string = columnDef.name;\r\n\r\n if ((columnDef !== undefined) && (columnDef !== null) && (columnDef.displayName !== null) && (columnDef.displayName.trim() !== ''))\r\n strDisplayName = columnDef.displayName;\r\n\r\n return strDisplayName;\r\n }\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getGridRowStyle(gridRow: GridRowDef): string {\r\n // // If style has already been set for this gridRow, simply return it, otherwise calculate it\r\n // // This is needed because this method is called from the template per cell, not per row\r\n // // and we don't want to repeat the same calculation for every cell in a row\r\n // if (gridRow.IsSelected && gridRow.RowSelectedStyle != null)\r\n // return gridRow.RowSelectedStyle;\r\n // else if (!gridRow.IsSelected && gridRow.RowUnselectedStyle != null)\r\n // return gridRow.RowUnselectedStyle;\r\n\r\n // let strStyle: string = '';\r\n // if (gridRow.IsSelected) {\r\n // if (this.gridFormFieldComponent.RuntimeData.iMaxComponentPreviewInstanceHeightRequired > 0) {\r\n // strStyle = `height: ${this.gridFormFieldComponent.RuntimeData.iMaxComponentPreviewInstanceHeightRequired}px;`;\r\n // strStyle += 'align-items: flex-start;'; // Needed to override a .mat-cell style.\r\n // }\r\n // gridRow.RowSelectedStyle = strStyle;\r\n // } else {\r\n // let rowsOfText = this.calulateRowsOfText(gridRow);\r\n\r\n // if (rowsOfText > 2) {\r\n // let lineHeight = 28;\r\n // let rowHeight = Math.min((rowsOfText * lineHeight), 200);\r\n // strStyle = `height: ${rowHeight}px;`;\r\n // strStyle += 'align-items: flex-start;';\r\n // } else {\r\n // strStyle = `height: ${DEFAULT_UNSELECTED_ROW_HEIGHT}px`;\r\n // }\r\n // gridRow.RowUnselectedStyle = strStyle;\r\n // }\r\n // return strStyle;\r\n //}\r\n\r\n public getFormInstanceElementWrapper(hshColumnDef: FormField, gridRow: GridRowDef): GridFormInstanceElementWrapper[] {\r\n let wrapper: GridFormInstanceElementWrapper = gridRow.getFormInstanceElementWrapper(hshColumnDef);\r\n\r\n if (wrapper && wrapper.formInstanceElement) {\r\n if (!wrapper.formInstanceElement.transientValuesHash) {\r\n wrapper.formInstanceElement.transientValuesHash = {};\r\n }\r\n\r\n wrapper.formInstanceElement.transientValuesHash[GRID_ROW_ID_KEY] = gridRow.ClientId;\r\n } else if (!wrapper) {\r\n let errorMsg: string = \"GridFormFieldComponent.getFormInstanceElementWrapper(): cannot get a form instance element wrapper.\";\r\n super.raiseException(errorMsg);\r\n } else {\r\n let errorMsg: string = \"GridFormFieldComponent.getFormInstanceElementWrapper(): cannot get a form instance element.\";\r\n super.raiseException(errorMsg);\r\n }\r\n\r\n let arrWrapper: GridFormInstanceElementWrapper[] = [wrapper];\r\n\r\n return arrWrapper;\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getValidationErrorsForCell(row: number, col: number): string[] {\r\n // let cellName = this.getCellNameFor(row, col);\r\n // let rowErrors: string[] = this.gridFormFieldComponent.RuntimeData.invalidGridRows[row];\r\n // if (rowErrors) {\r\n // this.editorGridValidation.emit(FormFieldPropertyEnum.INVALID);\r\n // let currentFieldErrors = rowErrors[cellName];\r\n // return currentFieldErrors ?? [];\r\n // } else {\r\n // this.editorGridValidation.emit(FormFieldPropertyEnum.VALID);\r\n // return [];\r\n // }\r\n //}\r\n\r\n //public FooterCellClass(colIndex: number): string {\r\n // let cellClass: string = 'footer-cell';\r\n\r\n // if (colIndex == 0)\r\n // cellClass = 'first-footer-cell';\r\n\r\n // return cellClass;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getNumericTotalValue(iColIndex: number, colDef: FormField): string {\r\n // // NOTE: THIS METHOD RETURNS A BLANK FOR NON - NUMERIC COLUMNS BY DESIGN.\r\n // let totalValue: string = '';\r\n\r\n // if ((this.gridFormFieldComponent.RuntimeMetadata != null) && (this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount > 0)) {\r\n // if ((iColIndex >= 0) && (iColIndex < this.gridFormFieldComponent.RuntimeMetadata.AllComponentsCount)) {\r\n // let fieldDefLogic: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName).customLogicHandler;\r\n\r\n // if (fieldDefLogic.hasNumericData()) {\r\n // let colTotal: number = this.gridFormFieldComponent.AllModesDataSource.getColumnTotal(colDef);\r\n\r\n // if (colDef.roundResultToWholeNumber)\r\n // colTotal = Math.round(colTotal);\r\n // if (colDef.showDigitsWithCommandSeparators)\r\n // totalValue = new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(colTotal);\r\n // else\r\n // totalValue = `${colTotal}`;\r\n // if (colDef.showDollarSignPrefix || fieldDefLogic.hasDollarSignPrefix())\r\n // totalValue = `$ ${totalValue}`;\r\n // }\r\n // }\r\n // }\r\n\r\n // return (totalValue);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get DeleteGridRowDisabled(): boolean {\r\n // return this.gridFormFieldComponent.FormField.transientFixedFirstColumnValues != null;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get IsLoadingGridData(): boolean {\r\n // return this.gridFormFieldComponent.IsLoadingGridData;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get LoadingDataText(): string {\r\n // return this.gridFormFieldComponent.LoadingDataText;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get LoadDataProgressMode(): ProgressBarMode {\r\n // return ProgressBarConstants.BUFFER_MODE;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get LoadDataProgressBufferValue(): number {\r\n // return this.loadingDataProgress.iLoadingDataProgressBufferValue;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get LoadDataProgressColor(): ThemePalette {\r\n // return ProgressBarConstants.THEME_PALETTE_PRIMARY;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get LoadDataProgressValue(): number {\r\n // return this.loadingDataProgress.iLoadingDataProgressValue;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get TotalRowCount(): number {\r\n // return this.gridFormFieldComponent.TotalRowCount;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get PageSize(): number {\r\n // return this.loadingDataProgress.iPageSize;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get PageSizeOptions(): number[] {\r\n // return this.loadingDataProgress.arrPageSizeOptions;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get ShowPaginator(): boolean {\r\n // let show: boolean = this.gridFormFieldComponent.TotalRowCount > this.loadingDataProgress.arrPageSizeOptions[0];\r\n // return show;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get PaginatorDisabled(): boolean {\r\n // return this.loadingDataProgress.isLoadingGridData && (this.loadingDataProgress.iLoadingDataProgressValue != 100);\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get ShowFirstLastButtons(): boolean {\r\n // return true;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get GridColumnNamesWithActions(): string[] {\r\n // return this.gridFormFieldComponent.GridColumnNamesWithActions;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get HeaderRowIsSticky(): boolean {\r\n // return true;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get ExpandedDetailColSpan(): number {\r\n // return this.gridFormFieldComponent.GridColumnNamesWithActions.length;\r\n //}\r\n //public elementIsExpanded(gridRow: GridRowDef): boolean {\r\n // return gridRow.IsExpanded;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public elementIsSelected = (i: number, gridRow: GridRowDef): boolean => {\r\n // return true;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public expandedDetailRowClass(gridRow: GridRowDef): string {\r\n // return gridRow.IsExpanded ? 'displayed-expanded-grid-row' : 'hidden-expanded-grid-row';\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public expandedDetailRowStyle(gridRow: GridRowDef): string {\r\n // return gridRow.IsExpanded ? '' : 'display: none;';\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public expandGridRow(gridRow: any): void {\r\n // // TO DO: CODE THIS METHOD.\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get SiteIsInAlphaMode(): boolean {\r\n // return this.currentUserService.user.isSystemAdmin && this.currentSiteService.Site.betaFeaturesEnabled;\r\n //}\r\n\r\n public get SiteIsInBetaMode(): boolean {\r\n return this.currentSiteService.Site.betaFeaturesEnabled;\r\n }\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public toggleExpandGridRow(gridRow: GridRowDef): void {\r\n // gridRow.IsExpanded = !gridRow.IsExpanded;\r\n //}\r\n // End called by my HTML code.\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Handle control events.\r\n //public userTriggeredColumnSort(eventData: any): void {\r\n // this.gridFormFieldComponent.userTriggeredColumnSort(eventData);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public unselectedGridRowClicked(clickedGridRow: GridRowDef, clickedCellWrapper: GridFormInstanceElementWrapper): void {\r\n // if (this.rowHasValidationErrors(this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex)) {\r\n // alert(\"You have invalid data in this row. Please correct before moving to another row. (2)\");\r\n // return;\r\n // }\r\n // //VNEXT-894: KLW - Account if the form field is a URL or not\r\n // let handler: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldDefinition(clickedCellWrapper.fieldClass).customLogicHandler;\r\n\r\n // if (handler) {\r\n // if (handler.isURLLink())\r\n // return;\r\n // }\r\n\r\n\r\n // // Make sure we have indexed the DynamicComponentHost directives by name.\r\n // if (this.gridFormFieldComponent.RuntimeData.hshDirectivesByName == null)\r\n // this.dynamicComponentHostsUpdated();\r\n\r\n // // If an existing row is selected, unselect it now.\r\n // this.unselectSelectedRowIfAny();\r\n\r\n // // Select the new row.\r\n // this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex = clickedGridRow.RowIndex;\r\n // clickedGridRow.IsSelected = true;\r\n\r\n // // Create any virtual col defs.\r\n // // Show controls within the newly selected row.\r\n // this.createFieldControlsInRow(clickedGridRow, clickedCellWrapper.colIndex);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public DynamicComponentHostNameFor(gridRow: GridRowDef, hshColumnDef: FormField, columnIndex: number): string {\r\n // // From the previously inline HTML:\r\n\r\n // let name = this.getCellNameFor(gridRow.RowIndex, hshColumnDef.fieldOrder);\r\n\r\n // return name;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public removeGridRowClicked(gridRow: GridRowDef): void {\r\n // let iIndexOfRowToDelete: number = gridRow.RowIndex;\r\n\r\n // let bDeleted: boolean = this.gridFormFieldComponent.AllModesDataSource.removeRow(gridRow.ClientId);\r\n\r\n // if (bDeleted && (this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex >= 0)) {\r\n // if (iIndexOfRowToDelete < this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex) {\r\n // this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex--;\r\n // } else if (iIndexOfRowToDelete == this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex) {\r\n // this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex = -1;\r\n // }\r\n // }\r\n // this.gridFormFieldComponent.designChange.emit();\r\n\r\n // this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n\r\n // return;\r\n //}\r\n\r\n public ignoredNgModelChange(columnDef: FormField, value: FormInstanceElement): void {\r\n // Note: this method is a NOOP by design.\r\n }\r\n // Note: method controlValueChanged(), next, must be defined as an arrow function.\r\n public gridColumnValueChanged(columnDef: FormField, value: FormInstanceElement): void {\r\n\r\n if (value != null) {\r\n this.flagDirty();\r\n\r\n let totalsHelper: GridColumnTotalsHelper = this.helper.DataSpy;\r\n if (totalsHelper != null)\r\n totalsHelper.cellValueChanged(this.dataUsedWithKendoGrid.editedRowIndex, columnDef, value);\r\n }\r\n }\r\n\r\n public handleMimickedNgModelChange(eventData: any): void {\r\n let formField: FormField = eventData['formField'];\r\n let formInstanceElement: FormInstanceElement = eventData['formInstanceElement'];\r\n\r\n // We need to reproduce the work of [(ngModel)] and then the call from the (ngModelChange) event.\r\n // Here are the original lines of code from this component's .html file:\r\n //\r\n // [(ngModel)]=this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement\r\n // (ngModelChange)=\"this.gridColumnValueChanged(columnDef,this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement)\"\r\n\r\n // 1. [(ngModel)]=this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement\r\n let columnDefs: FormField[] = this.GridColumnDefs;\r\n let iColIndex: number = 0\r\n let columnDef: FormField = null;\r\n let columnFound: boolean = false;\r\n for (; iColIndex < columnDefs.length; iColIndex++) {\r\n columnDef = columnDefs[iColIndex];\r\n if (columnDef.name == formField.name) {\r\n columnFound = true;\r\n break;\r\n }\r\n }\r\n\r\n if (columnFound) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex];\r\n if (formInstanceElementWrapper != null) {\r\n formInstanceElementWrapper.formInstanceElement.copyWithAnyChildElements(formInstanceElement);\r\n\r\n // 2. (ngModelChange)=\"this.gridColumnValueChanged(columnDef,this.DataUsedWithKendoGrid.selectedGridRow?.FormInstanceElementWrappers[iColIndex].formInstanceElement)\"\r\n this.gridColumnValueChanged(columnDef, formInstanceElementWrapper.formInstanceElement);\r\n }\r\n }\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public controlValueChanged = (value: FormInstanceElement, columnDefParam: FormField = null) => {\r\n // console.log('controlValueChanged 1');\r\n // if (value.transientValuesHash) {\r\n // console.log('controlValueChanged 2');\r\n // let iGridRowId: number = value.transientValuesHash[GRID_ROW_ID_KEY];\r\n // let iColumnId: number = value.transientValuesHash[GRID_COLUMN_ID_KEY];\r\n\r\n // if ((iGridRowId != null) && (columnDefParam != null || iColumnId != null)) {\r\n // let columnDef: FormField = columnDefParam != null ? columnDefParam : this.gridFormFieldComponent.GridConfig.getColumnDefByClientId(iColumnId);\r\n // let gridRowDef: GridRowDef = this.gridFormFieldComponent.AllModesDataSource.getRowByClientId(iGridRowId);\r\n\r\n // if ((columnDef != null) && (gridRowDef != null)) {\r\n // let wrapper: GridFormInstanceElementWrapper = gridRowDef.getFormInstanceElementWrapper(columnDef);\r\n\r\n // if (wrapper) {\r\n // // A value has been set, so set the 'transientValueSetFlag' flag.\r\n // wrapper.formInstanceElement.UserUpdatedData = true;\r\n // // pharvey - let the Grid's FormInstanceElement know there's been a value change\r\n // this.gridFormFieldComponent.FormInstanceElement.UserUpdatedData = true;\r\n\r\n // // Perform model value changed logic.\r\n // this.handleNgModelChangeLogic(gridRowDef, columnDef, wrapper, FormFieldProcessingPhaseEnum.EDITING_DATA);\r\n // }\r\n // }\r\n\r\n // }\r\n // }\r\n\r\n // return;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Note: method controlReceivedFocus(), next, must be defined as an arrow function.\r\n //public controlReceivedFocus = (myComponent: IFormFieldComponent, formFieldComponent: IFormFieldComponent, event: FocusEvent) => {\r\n // // Note: the following line should not be needed, but this arrow function\r\n // // is not returning property 'this' as does arrow function controlValueChanged().\r\n // let myself: GridFormFieldComponent = myComponent;\r\n\r\n // let componentFormField: FormField = formFieldComponent.FormField;\r\n\r\n // // Find the selected cell index.\r\n // let cellIndex: number = 0;\r\n // let colDefs: FormField[] = myself.GridConfig.ColumnDefs;\r\n // for (let colIndex: number = 0; colIndex < colDefs.length; colIndex++) {\r\n // let colDef: FormField = colDefs[colIndex];\r\n // if (colDef.name == componentFormField.name) {\r\n // cellIndex = colIndex;\r\n // break;\r\n // }\r\n // }\r\n // this.gridFormFieldComponent.RuntimeData.selectedGridColumnIndex = cellIndex;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // pjh - 01/28/2022 - added for new \"cancel\" action on a grid row\r\n //public unSelectRow(clickedGridRow: GridRowDef): void {\r\n // // Make sure we have indexed the DynamicComponentHost directives by name.\r\n // if (this.gridFormFieldComponent.RuntimeData.hshDirectivesByName == null)\r\n // this.dynamicComponentHostsUpdated();\r\n\r\n // // this does not indicate that the row is valid, but simply that we're not\r\n // // going to track it for now since the user is canceling their edit\r\n // delete this.gridFormFieldComponent.RuntimeData.invalidGridRows[clickedGridRow.RowIndex];\r\n\r\n // this.removeFieldControlsFromGridRow(clickedGridRow);\r\n // clickedGridRow.IsSelected = false;\r\n // this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex = -1;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Handle MatPaginator events.\r\n //public handlePageEvent(eventData: PageEvent): void {\r\n // this.gridFormFieldComponent.handlePageEvent(eventData);\r\n //}\r\n\r\n public getCellNameFor(row: number, col: number): string {\r\n return `t-${row}-${col}`;\r\n }\r\n // End handling MatPaginator events.\r\n\r\n // Helper methods.\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private unselectSelectedRowIfAny(): void {\r\n // // If an existing row is selected, unselect it now.\r\n // if (this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex >= 0) {\r\n // let selectedGridRow: GridRowDef = this.gridFormFieldComponent.AllModesDataSource.getGridRow(this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex);\r\n\r\n // if (selectedGridRow == null) {\r\n // let errorMsg: string = `GridFormFieldComponent.unselectedGridRowClicked(): could not un-select ` + `grid row ${this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex} as that index does not exist.`;\r\n // this.raiseException(errorMsg);\r\n // }\r\n\r\n // // Remove any controls from the previously selected row.\r\n // this.removeFieldControlsFromGridRow(selectedGridRow);\r\n // selectedGridRow.IsSelected = false;\r\n // }\r\n //}\r\n\r\n //private rowHasValidationErrors(row: number) {\r\n // return this.gridFormFieldComponent.RuntimeData.invalidGridRows[row] != null\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private dynamicComponentHostsUpdated(): void {\r\n // if (this.dynamicComponentHosts) {\r\n // this.gridFormFieldComponent.RuntimeData.templateDirectives = this.dynamicComponentHosts.toArray();\r\n\r\n // this.gridFormFieldComponent.RuntimeData.hshDirectivesByName = {};\r\n\r\n // for (let iDirective: number = 0; iDirective < this.gridFormFieldComponent.RuntimeData.templateDirectives.length; iDirective++) {\r\n // let directive: DynamicComponentHostDirective = this.gridFormFieldComponent.RuntimeData.templateDirectives[iDirective];\r\n\r\n // this.gridFormFieldComponent.RuntimeData.hshDirectivesByName[directive.name] = directive;\r\n // }\r\n // }\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private createFieldControlsInRow(gridRow: GridRowDef, iClickedColumn: number): void {\r\n // // Find the ng-template instances associated with this row.\r\n // let iRowIndex: number = gridRow.RowIndex;\r\n // let columnDefs: FormField[] = this.gridFormFieldComponent.GridConfig.getRuntimeColumnDefsWithConfiguredVirtualFormFields(this.fieldDefinitionService);\r\n // let iColCount: number = columnDefs.length;\r\n\r\n // let iTemplateOffset: number = (iRowIndex * iColCount);\r\n // let iNumTemplatesRequired: number = iTemplateOffset + iColCount;\r\n\r\n // if (this.dynamicComponentHosts != null) {\r\n // if (this.dynamicComponentHosts.length >= iNumTemplatesRequired) {\r\n // // Reset the number of row form fields created.\r\n // this.gridFormFieldComponent.RuntimeData.iNumRowFormFieldsInitialized = 0;\r\n // // Reset the hash of dynamically created formFields\r\n // this.gridFormFieldComponent.RuntimeData.dynamicallyCreatedFormFieldsByName = {};\r\n\r\n // // Create one form field component per column.\r\n // let iCol: number = 0;\r\n\r\n // for (let iCol: number = 0; iCol < iColCount; iCol++) {\r\n // let columnDef: FormField = columnDefs[iCol];\r\n\r\n // // Note: we should not assume that the array of DynamicComponentHosts\r\n // // directives will be in row, column order(in fact, they appear\r\n // // to be in column, row order)\r\n\r\n // // this is referring to this line in the HTML...\r\n // // \r\n // // ... where the dynamic-component-host directive is identifying the template which needs to display the control(s) for a field\r\n // let directive: DynamicComponentHostDirective = this.getDirective(iRowIndex, iCol);\r\n\r\n // let cellFormInstanceElementWrapper: GridFormInstanceElementWrapper = gridRow.FormInstanceElementWrappers[iCol]; // rowCellFormInstanceElementWrappers[iCol];\r\n // let focusOnThisField = iCol === iClickedColumn;\r\n // this.createFieldControlInRowCell(columnDef, cellFormInstanceElementWrapper, directive.viewContainerRef, focusOnThisField, iRowIndex, iCol);\r\n // } // for\r\n // } // if\r\n // } // if\r\n\r\n // return;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private getDirective(iRowIndex: number, iColIndex: number): DynamicComponentHostDirective {\r\n // if ((this.dynamicComponentHosts != null) && (this.gridFormFieldComponent.RuntimeData.hshDirectivesByName != null)) {\r\n // let hostsLength: number = this.dynamicComponentHosts.toArray().length;\r\n // let directivesHashLength: number = Object.keys(this.gridFormFieldComponent.RuntimeData.hshDirectivesByName).length;\r\n\r\n // if (hostsLength != directivesHashLength)\r\n // this.dynamicComponentHostsUpdated();\r\n // }\r\n\r\n // let strDirectiveName = this.getCellNameFor(iRowIndex, iColIndex);\r\n\r\n // let directive: DynamicComponentHostDirective = this.gridFormFieldComponent.RuntimeData.hshDirectivesByName[strDirectiveName];\r\n\r\n // if (directive == null) {\r\n // let error = `GridFormFieldComponent.getDirective(): cannot get directive ${strDirectiveName}.`;\r\n // throw error;\r\n // }\r\n\r\n // return (directive);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // pharv - 4/12/2022 - modified to take row and col indexes in order to keep\r\n // dynamically generated FormField components in memory so they can be looked up\r\n // by name and used to render validation messages\r\n //private createFieldControlInRowCell(formField: FormField, cellFormInstanceElementWrapper: GridFormInstanceElementWrapper, viewContainerRef: ViewContainerRef, bSetFocusInFieldControl: boolean, rowIndex: number, colIndex: number): void {\r\n // let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(formField.fieldDefinitionClassName);\r\n // let formFieldClass: AngularCoreType = fieldTypeAndName.formFieldClass;\r\n // let componentRef: ComponentRef =\r\n // fieldTypeAndName.componentRepresentative.createFormFieldDynamically(this.resolver, this.fieldDefinitionService, viewContainerRef, formField, this.gridFormFieldComponent.Mode, cellFormInstanceElementWrapper.formInstanceElement, false, null, true);\r\n\r\n // cellFormInstanceElementWrapper.componentRef = componentRef;\r\n // cellFormInstanceElementWrapper.formInstanceElement.transientValuesHash[GRID_COLUMN_ID_KEY] = formField.gridColClientId;\r\n\r\n // let formFieldComponent: any = componentRef.instance;\r\n // let cellName = this.getCellNameFor(rowIndex, colIndex);\r\n // this.gridFormFieldComponent.RuntimeData.dynamicallyCreatedFormFieldsByName[cellName] = formFieldComponent;\r\n\r\n // // https://stackoverflow.com/a/49038739\r\n // let formFieldComp = componentRef.instance as FormFieldBaseComponent;\r\n // formFieldComp.touched.subscribe(() => {\r\n // this.updateValidationErrors(rowIndex, colIndex);\r\n // });\r\n\r\n // formFieldComponent.onInit.subscribe(hshEventData => {\r\n // let component: FormFieldBaseComponent = hshEventData['component'];\r\n // if (component) {\r\n // let field: FormField = component.FormField;\r\n\r\n // this.gridColumnInit(hshEventData, field);\r\n // }\r\n // });\r\n\r\n // componentRef.instance.registerOnChange(this.controlValueChanged);\r\n // componentRef.instance.registerOnFocus(this.gridFormFieldComponent, this.controlReceivedFocus);\r\n\r\n // if (bSetFocusInFieldControl) {\r\n // let formFieldBaseComponent: FormFieldBaseComponent = formFieldComponent;\r\n\r\n // formFieldBaseComponent.setFocus();\r\n // }\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public removeFieldControlsFromGridRow(gridRow: GridRowDef): void {\r\n // // Find the ng-template instances associated with this row.\r\n // let iRowIndex: number = gridRow.RowIndex;\r\n // let columnDefs: FormField[] = this.gridFormFieldComponent.GridConfig.ColumnDefs;\r\n // let iColCount: number = this.gridFormFieldComponent.GridConfig.ColumnCount;\r\n\r\n // let iTemplateOffset: number = (iRowIndex * iColCount);\r\n // let iNumTemplatesRequired: number = iTemplateOffset + iColCount;\r\n\r\n // // Clear any content from the cell templates.\r\n // if (this.dynamicComponentHosts != null) {\r\n // if (this.dynamicComponentHosts.length >= iNumTemplatesRequired) {\r\n // let templateDirectives: DynamicComponentHostDirective[] = this.dynamicComponentHosts.toArray();\r\n\r\n // let rowCellFormInstanceElementWrappers: GridFormInstanceElementWrapper[] = gridRow.FormInstanceElementWrappers;\r\n\r\n // for (let iCol: number = 0; iCol < iColCount; iCol++) {\r\n // // Tell the form field to save its data.\r\n // let columnDef: FormField = columnDefs[iCol];\r\n // let cellFormInstanceElementWrapper: GridFormInstanceElementWrapper = rowCellFormInstanceElementWrappers[iCol];\r\n\r\n // if (cellFormInstanceElementWrapper.componentRef != null) {\r\n // let hshIgnored: any = {}; // TO DO: GET THE GRID'S FORM INSTANCE AND PASS IT TO METhod saveData().\r\n // cellFormInstanceElementWrapper.componentRef.instance.saveData(hshIgnored);\r\n\r\n // let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n // let fieldLogicHandler: IFieldDefinitionLogic = fieldDefinition.customLogicHandler;\r\n // cellFormInstanceElementWrapper.standinDisplayValue = fieldLogicHandler.getDisplayValue(columnDef, cellFormInstanceElementWrapper.formInstanceElement, gridRow, FormFieldProcessingPhaseEnum.EDITING_DATA);\r\n // }\r\n\r\n // // Note: we should not assume that the array of DynamicComponentHosts\r\n // // directives will be in row, column order(in fact, they appear\r\n // // to be in column, row order)\r\n // let directive: DynamicComponentHostDirective = this.getDirective(iRowIndex, iCol);\r\n // const viewContainerRef = directive.viewContainerRef;\r\n\r\n // // Clear any content.\r\n // viewContainerRef.clear();\r\n\r\n // // Nullify the prior component reference.\r\n // cellFormInstanceElementWrapper.componentRef = null;\r\n // } // for\r\n // } // if\r\n // } // if\r\n\r\n // // Done.\r\n // return;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Adds/Removes validation error messages to/from the invalidGridRows property\r\n //private updateValidationErrors(row: number, col: number) {\r\n // let cellName = this.getCellNameFor(row, col);\r\n // let field: IFormFieldComponent = this.gridFormFieldComponent.RuntimeData.dynamicallyCreatedFormFieldsByName[cellName];\r\n // let currentFieldErrors = field.getValidationErrors(true);\r\n // let selectedGridRow: GridRowDef = this.gridFormFieldComponent.AllModesDataSource.getGridRow(this.gridFormFieldComponent.RuntimeData.selectedGridRowIndex);\r\n\r\n // let rowErrors: string[] = this.gridFormFieldComponent.RuntimeData.invalidGridRows[row];\r\n // if (currentFieldErrors.length > 0) {\r\n // if (rowErrors == null) {\r\n // rowErrors = [];\r\n // }\r\n // rowErrors[cellName] = currentFieldErrors;\r\n // this.gridFormFieldComponent.RuntimeData.invalidGridRows[row] = rowErrors;\r\n // selectedGridRow.IsInvalid = true;\r\n // } else {\r\n // // Delete validation errors that no longer apply\r\n // if (rowErrors != null) {\r\n // if (rowErrors.hasOwnProperty(cellName)) {\r\n // delete rowErrors[cellName];\r\n // }\r\n // }\r\n // if (this.gridFormFieldComponent.RuntimeData.invalidGridRows.hasOwnProperty(row) && Object.keys(this.gridFormFieldComponent.RuntimeData.invalidGridRows[row]).length == 0) {\r\n // delete this.gridFormFieldComponent.RuntimeData.invalidGridRows[row];\r\n // }\r\n // selectedGridRow.IsInvalid = false;\r\n // }\r\n\r\n // // Was getting ExpressionChangedAfterItHasBeenCheckedError\r\n // //so bump this binding update to the next change detection loop\r\n // UtilityHelper.runWhenStackClear(() => {\r\n // this.gridFormFieldComponent.FieldHasValidationError = Object.keys(this.gridFormFieldComponent.RuntimeData.invalidGridRows).length > 0; // note: the field being marked imvalid here is the grid as a whole\r\n // });\r\n // return currentFieldErrors;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private calulateRowsOfText(gridRow: GridRowDef) {\r\n // let rowsOfText: number = 0;\r\n // for (let el of gridRow.FormInstanceElementWrappers) {\r\n // let rows = this.rowsOfText(gridRow.getTotalColumnCount(), el);\r\n // if (rows > rowsOfText) {\r\n // rowsOfText = rows;\r\n // }\r\n // }\r\n // rowsOfText = Math.max(this.gridFormFieldComponent.RuntimeMetadata.MaxRowsOfTextToDisplayOnUnselectedGridRows, rowsOfText);\r\n // return rowsOfText;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // pharv - 01/28/2022 - the goal here is calculate an estimate of how many rows of text\r\n // a cell contains. The calculation takes into account current column width.\r\n //private rowsOfText(columnCount: number, el: GridFormInstanceElementWrapper): number {\r\n // let characterPixelHeight = 32;\r\n // let avgCharacterPixelWidth = 7;\r\n // let colWidth = this.gridFormFieldComponent.RuntimeData.gridWidth / columnCount;\r\n // let lengthOfTextInPixels = characterPixelHeight;\r\n // if (el && el.standinDisplayValue) lengthOfTextInPixels = el.standinDisplayValue.length * avgCharacterPixelWidth;\r\n // let rowsOfText = lengthOfTextInPixels / colWidth;\r\n // return rowsOfText;\r\n //}\r\n\r\n private jobCompletedOrUpdatedArrowFunction = (asyncJob: AsyncJob): void => {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n private hideGridBodyIfSoConfigured(): void {\r\n let gridElement = $(this).find('kendo-grid');\r\n if (gridElement != null) {\r\n let gridBodyElement = $(gridElement).find(\"[aria-label='Data table']\");\r\n if (gridBodyElement != null) {\r\n gridBodyElement.remove();\r\n }\r\n }\r\n }\r\n\r\n //VNEXT-1540: KLW - Code to auto resize the columns when editing\r\n //https://www.telerik.com/kendo-angular-ui/components/grid/columns/resizing#auto-fitting-content\r\n //For this to work, you MUST have the grid attribute of \"resizable\" (https://www.telerik.com/kendo-angular-ui/components/grid/api/gridcomponent#resizable) set to true\r\n private fitColumns(): void {\r\n // this.ngZone.onStable\r\n // .asObservable()\r\n // .pipe(take(1))\r\n // .subscribe(() => {\r\n // this.kendoGridInstance.autoFitColumns();\r\n // });\r\n }\r\n}\r\n","import { DynamicComponentHostDirective } from '../../directives/dynamic-content-host.directive';\r\nimport { FormFieldBaseComponent } from \"../../components/form-fields/form-field-base/form-field-base.component\";\r\nimport { IDirectNameToDynamicComponentHost, IFormFieldByTemplateName, IGridRowErrors } from './type-safe-hashes';\r\n\r\nexport class GridRuntimeData {\r\n public templateDirectives: DynamicComponentHostDirective[] = null;\r\n public hshDirectivesByName: IDirectNameToDynamicComponentHost = null;\r\n\r\n public dynamicallyCreatedFormFieldsByName: IFormFieldByTemplateName = {};\r\n\r\n public componentBeingEdited: FormFieldBaseComponent = null;\r\n\r\n public selectedGridRowIndex: number = -1;\r\n public selectedGridColumnIndex: number = 0;\r\n\r\n public iNumRowFormFieldsInitialized: number = 0;\r\n public iMaxComponentPreviewInstanceHeightRequired: number = 0; // 0 => no height required.\r\n public gridWidth: number;\r\n\r\n public invalidGridRows: IGridRowErrors = {};\r\n}\r\n","\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
{{this.DisplayName}}
\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
{{this.DisplayName}}
\r\n\r\n \r\n \r\n
\r\n","import { Component, OnInit, AfterViewInit, AfterContentInit, Output, EventEmitter, ViewChild, ViewChildren, ViewContainerRef, QueryList, ComponentFactoryResolver, Renderer2, ComponentRef, Type as AngularCoreType, ElementRef, Input } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { MatPaginator, PageEvent } from '@angular/material/paginator';\r\nimport { ProgressBarMode } from '@angular/material/progress-bar';\r\nimport { MatMenuTrigger } from '@angular/material/menu';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\n\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { IFieldNameToFormField, IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { FormField, SecondaryGridCascadingFieldTransientData } from '../../../models/form-builder/form-field.model';\r\nimport { GridRowViewModel } from '../../../models/form-builder/grid-row.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { IFormFieldDisplayHint } from '../form-field-base/form-field-base.component';\r\nimport { DynamicComponentHostDirective } from '../../../directives/dynamic-content-host.directive';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FormFieldTypeAndNameService } from '../../../services/form-field-type-and-name.service';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormInstanceElementRequest } from '../../../models/form-instance-element-request.model';\r\nimport { ProgressBarConstants } from '../../../enums/progress-bar-constants.enum';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { ComponentAndFormField } from '../../../models/grid/component-and-form-field-model';\r\nimport { RuntimeMetadata } from '../../../models/grid/runtime-metadata.model';\r\nimport { GridRuntimeData } from '../../../models/grid/runtime-data.model';\r\nimport { GridCellContextMenuInfo } from '../../../models/grid/cell-context-menu-info.model';\r\nimport { LoadingDataProgressInfo } from '../../../models/grid/loading-data-progress.model';\r\nimport { FieldTypeAndName, IFieldTypeToFieldInfo, } from '../../../services/form-field-type-and-name.service';\r\nimport { CachedFormFieldService } from '../../../services/form-field-with-cache.service';\r\nimport { FormFieldConstraintLiaisonManager } from '../../form-builder/properties/form-field-properties/constraints/field-constraint-liaison-manager';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\nimport { CurrentUserService } from '../../../../security/current-user.service';\r\nimport { CsvOptionsFileData } from '../../../models/csv-data/csv-options-file-data.model';\r\nimport { FixedFirstColumnValues } from '../../../models/grid/fixed-first-column-values.model';\r\n\r\nimport { ShortTextFieldType, RichTextFieldType } from '../../../models/form-builder/form-field-types';\r\n\r\nimport { GridConfig } from '../../../models/grid/grid-config.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { IGetCellDisplayValue } from '../../../models/grid/grid-interfaces';\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { GridAllModesDataSource } from '../../../models/grid/grid-data-source.model';\r\nimport { AttachmentService } from '../../../services/attachment.service';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { UtilityHelper } from '../../../utility.helper';\r\nimport { IFormFieldConstraint } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { IFormFieldConstraintLiaison } from '../../form-builder/properties/form-field-properties/constraints/ifield-constraint-liason.interface';\r\nimport { FormFieldConfigurationSaveReason } from '../../../enums/form-field-save-config-reason.enum';\r\nimport { SortDirection } from '../../../enums/sort-direction.enum';\r\nimport { GridFieldDesignerComponent } from '../grid-field-designer/grid-field-designer.component';\r\nimport { GridFieldEditorComponent } from '../grid-field-editor/grid-field-editor.component';\r\nimport { ConditionalLogicColumnDefsFilterData } from '../grid-field-editor/grid-field-editor.component';\r\nimport { ColumnReorderConfig, ColumnBase } from \"@progress/kendo-angular-grid\";\r\nimport { GridFlavorEnum, GridFlavorModifiersEnum } from '../../../enums/grid.enums';\r\n\r\n// code commented out with \"// Commented out for VNEXT-1429 (remove old grid)\" note above it\r\n// can be deleted once we're sure this is all working ok\r\n\r\n// Define constants used below.\r\nconst GRID_ROW_ID_KEY: string = 'gridRowId';\r\nconst GRID_COLUMN_ID_KEY: string = 'gridColumnId';\r\nconst DEFAULT_UNSELECTED_ROW_HEIGHT: number = 48;\r\n\r\n// Implement the grid form field component.\r\n//\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-grid-form-field',\n templateUrl: './grid-form-field.component.html',\n styleUrls: ['./grid-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: GridFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class GridFormFieldComponent extends FormFieldBaseComponent implements OnInit, AfterViewInit, AfterContentInit, IGetCellDisplayValue {\r\n // Properties.\r\n @Input() showExportToExcelButton: boolean = true;\r\n @Input() isFootnotesGrid: boolean = false;\r\n // BEGIN ADDED FOR NEW ATTACHMENTS (TODO: DO THESE NEED TO BE INPUTS? I DON'T THINK SO)\r\n @Input() flavor: GridFlavorEnum = GridFlavorEnum.RegularGrid; // An alternative flavor of Attachments Grid can be set\r\n @Input() flavorModifier: GridFlavorModifiersEnum; // for example, when the flavor is AttachmentsGrid, this can be 'showAll' or 'latestOnly'\r\n @Input() userCanAdmin: boolean;\r\n // END ADDED FOR NEW ATTACHMENTS\r\n\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n // Emitted by design mode changes like adding/deleting/reordering a column\r\n @Output() designChange = new EventEmitter();\r\n // Request a form instance element load.\r\n @Output() loadFormInstanceElement = new EventEmitter();\r\n @Output() onEdit = new EventEmitter(); // For editing a column's properties.\r\n\r\n //TEAMS-894: KLW - Needed for grid validation\r\n @Output() mainGridValidation = new EventEmitter();\r\n\r\n @Output() conditionalLogicInstructions = new EventEmitter(); // VNEXT-1383, in particular the third use case.\r\n\r\n // Define read only data.\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.FIXED_FIRST_COLUMN_FILE,\r\n FormFieldPropertyEnum.FOOTER,\r\n FormFieldPropertyEnum.EXCEL_IMPORT_EXPORT_TEMPLATE,\r\n FormFieldPropertyEnum.DISPLAY_KENDO_GRID_ROWS, //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n FormFieldPropertyEnum.GRID_KEY_COLUMNS, // Note: related to environmental justice (EJ) requirements for importing grid data from Excel files.\r\n FormFieldPropertyEnum.HIDE_GRID_FILTERING, // https://maxjira.max.gov/browse/VNEXT-1252\r\n FormFieldPropertyEnum.HIDE_GRID_BODY, // VNEXT-1378\r\n FormFieldPropertyEnum.DISABLE_GRID_ROW_DELETE,\r\n FormFieldPropertyEnum.PRESET_FILTERS\r\n ];\r\n\r\n // Column definitions.\r\n // Note: the following initialization is now performed in the grid form field's constructor.\r\n private gridConfig: GridConfig = null;\r\n\r\n // Design mode data structures.\r\n private allModesDataSource: GridAllModesDataSource = null;\r\n\r\n private runtimeMetadata: RuntimeMetadata = new RuntimeMetadata();\r\n private runtimeData: GridRuntimeData = new GridRuntimeData();\r\n\r\n private formFieldDisplayHints: IFormFieldDisplayHint = {};\r\n\r\n // This references all of the templates in a row which look like this in the HTML:\r\n // \r\n @ViewChildren(DynamicComponentHostDirective, { read: DynamicComponentHostDirective }) dynamicComponentHosts: QueryList;\r\n @ViewChild(GridFieldEditorComponent, { read: GridFieldEditorComponent }) gridFieldEditorComponent: GridFieldEditorComponent;\r\n\r\n // Define instance data used with a MatPaginator.\r\n @ViewChild('matPaginatorMatFooter', { read: MatPaginator }) matPaginator;\r\n private loadingDataProgress: LoadingDataProgressInfo = new LoadingDataProgressInfo();\r\n // 01-20-2021 note: added the following instance variable.\r\n //\r\n // Might want to revisit the grid's direct\r\n // use of the service as it is not\r\n // consistent with existing architectural\r\n // norms.\r\n //\r\n // Will consider other options and revisit.\r\n //private formInstanceService: FormInstanceService = null;\r\n // End instance data used with a MatPaginator.\r\n\r\n // Define properties related to a design mode context menu.\r\n @ViewChild(MatMenuTrigger)\r\n gridCellContextMenu: MatMenuTrigger;\r\n // End properties related to a design mode context menu.\r\n\r\n @ViewChildren(FormFieldBaseComponent, { read: FormFieldBaseComponent }) formFieldComponentsQueryList: QueryList;\r\n\r\n // Constructor.\r\n public constructor(private resolver: ComponentFactoryResolver,\r\n private hostElement: ElementRef,\r\n private renderer: Renderer2,\r\n private attachmentService: AttachmentService, //TEAMS-424: KLW - Need reference to attachment service\r\n private dialog: MatDialog, //TEAMS-424: KLW - Need reference to Material Dialog\r\n private cachedFormFieldConstraintsService: CachedFormFieldService,\r\n private currentSiteService: CurrentSiteService,\r\n private currentUserService: CurrentUserService,\r\n private dateAdapter: DateAdapter,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private formFieldTypeAndNameService: FormFieldTypeAndNameService) {\r\n super();\r\n\r\n this.formFieldProperties.push(FormFieldPropertyEnum.READ_ONLY);\r\n\r\n // Create a blank config.\r\n this.createEmptyGridConfig();\r\n\r\n this.formFieldTypeAndNameService.initializeFieldTypesAndNames(this.renderer, this.dateAdapter, this.attachmentService, this.dialog);\r\n\r\n // Define a display hint to pass to contained form fields.\r\n this.formFieldDisplayHints[\"showLabel\"] = false;\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshEventProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayFormatValues: null,\r\n\r\n saveConfigurationRequired: true,\r\n saveDataRequired: true,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshEventProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n this.removeAnyExistingVirtualColDefs(); // Note: is this line still needed? Will plan to test without it enabled.\r\n\r\n // Note: even though a blank config is created in this class's\r\n // constructor, we need to create a blank config here.\r\n this.createEmptyGridConfig();\r\n\r\n // If we have an existing grid configuration, use it.\r\n if ((this.FormField.childFormFields) && (this.FormField.childFormFields.length > 0)) {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n this.createAnyVirtualColDefs();\r\n }\r\n this.createGridConfig();\r\n\r\n // Do we have a fixed first column?\r\n if (this.hasFixedFirstColumnJsonConfig) {\r\n // Note: the following line makes it easier to check if a grid has a fixed first column configuration.\r\n this.FormField.fixedFirstColumnJson = this.gridConfig.getColumnDef(0).fixedFirstColumnJson;\r\n this.FormField.transientFixedFirstColumnValues = FixedFirstColumnValues.createFromJson(this.gridConfig.getColumnDef(0).fixedFirstColumnJson);\r\n }\r\n }\r\n\r\n // Create data structures for our given operating mode.\r\n this.allModesDataSource = new GridAllModesDataSource(this.gridConfig, this);\r\n\r\n // Let my parent component know my configuration.\r\n let hshEventProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshEventProperties);\r\n\r\n if (this.Mode === 'design') {\r\n this.allModesDataSource.addRow();\r\n\r\n // Set a form field constraint updated callback.\r\n this.FormField.setConstraintUpdatedCallback(this.formFieldConstraintUpdated);\r\n this.FormField.setAcceptsConstraintUpdateFrom(this.acceptsConstraintUpdateFrom);\r\n }\r\n\r\n return;\r\n }\r\n\r\n public ngAfterContentInit(): void {\r\n return;\r\n }\r\n\r\n // Override base class/FormFieldComponent methods.\r\n public isCompoundObjectComponent(): boolean {\r\n // Note: this method is also used in apply conditional logic.\r\n return true;\r\n }\r\n public resetConditionalLogicSettings(): void {\r\n // Try to pass this on to my grid field editor component.\r\n if (this.gridFieldEditorComponent != null)\r\n this.gridFieldEditorComponent.resetConditionalLogicSettings();\r\n }\r\n public applyChildFieldAttributes(childFieldName: string, showChildField: boolean, childFieldIsReadOnly: boolean, childFieldIsRequired: boolean): void {\r\n // Try to pass this on to my grid field editor component.\r\n if (this.gridFieldEditorComponent != null)\r\n this.gridFieldEditorComponent.applyChildFieldAttributes(childFieldName, showChildField, childFieldIsReadOnly, childFieldIsRequired);\r\n }\r\n\r\n // Define methods called by my HTML code.\r\n public get FormField(): FormField {\r\n return this.formField;\r\n }\r\n public get GridConfig(): GridConfig {\r\n return this.gridConfig;\r\n }\r\n public get RuntimeMetadata(): RuntimeMetadata {\r\n return this.runtimeMetadata;\r\n }\r\n public get RuntimeData(): GridRuntimeData {\r\n return this.runtimeData;\r\n }\r\n\r\n public get AllModesDataSource(): GridAllModesDataSource {\r\n return this.allModesDataSource;\r\n }\r\n public get SelectedGridRowIndex(): number {\r\n return this.runtimeData.selectedGridRowIndex;\r\n }\r\n public get SectedGridColumnIndex(): number {\r\n return this.runtimeData.selectedGridColumnIndex;\r\n }\r\n // Used by GridEditorComponent\r\n public ColumnIsSticky(colName: string): boolean {\r\n // Note: this does not need to be a hard code value, but it is.\r\n return true;\r\n }\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get HeaderRowIsSticky(): boolean {\r\n // return true;\r\n //}\r\n\r\n public get ShowNumericTotalsFooter(): boolean {\r\n return (this.FormField ? this.FormField.showFooter === true : false);\r\n }\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getNumericFooterTotalValueFor(colIndex: number, columnDef: FormField): string {\r\n // // TO DO: CODE THIS METHO PROPERLY.\r\n // return 'Footer Value';\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getFormFieldFor(row: number, col: number): FormField {\r\n // let cellName: string = this.getCellNameFor(row, col);\r\n // let component: FormFieldBaseComponent = this.runtimeData.dynamicallyCreatedFormFieldsByName[cellName];\r\n // return component.FormField;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getCellNameFor(row: number, col: number): string {\r\n // return `t-${row}-${col}`;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get DeleteGridRowDisabled(): boolean {\r\n // return (this.FormField.transientFixedFirstColumnValues != null);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public DynamicComponentHostNameFor(gridRow: GridRowDef, hshColumnDef: FormField, columnIndex: number): string {\r\n // // From the previously inline HTML:\r\n\r\n // let name = this.getCellNameFor(gridRow.RowIndex, hshColumnDef.fieldOrder);\r\n\r\n // return name;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getValidationErrorsForCell(row: number, col: number): string[] {\r\n // let cellName = this.getCellNameFor(row, col);\r\n // let rowErrors: string[] = this.runtimeData.invalidGridRows[row];\r\n // if (rowErrors) {\r\n // let currentFieldErrors = rowErrors[cellName];\r\n // return currentFieldErrors ?? [];\r\n // } else {\r\n // return [];\r\n // }\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get UseAlphaFeatures(): boolean {\r\n // return (this.currentSiteService.Site.betaFeaturesEnabled && this.currentUserService.user.isSystemAdmin);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get UseBetaFeatures(): boolean {\r\n // return this.currentSiteService.Site.betaFeaturesEnabled;\r\n //}\r\n\r\n public set FieldHasValidationError(value: boolean) {\r\n this.fieldHasValidationError = value;\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get UseGridDesignComponent(): boolean {\r\n // // Note: we can revert the following line to \"return false\" if we find problems with the grid design component.\r\n // //return false;\r\n // return true;\r\n //}\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get UseGridEditorComponent(): boolean {\r\n // // Note: we can revert the following line to \"return false\" if we find problems with the grid editor component.\r\n // //return false;\r\n // return true;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Adds/Removes validation error messages to/from the invalidGridRows property\r\n //private updateValidationErrors(row: number, col: number) {\r\n // let cellName = this.getCellNameFor(row, col);\r\n // let field: IFormFieldComponent = this.runtimeData.dynamicallyCreatedFormFieldsByName[cellName];\r\n // let currentFieldErrors = field.getValidationErrors(true);\r\n // let selectedGridRow: GridRowDef = this.allModesDataSource.getGridRow(this.runtimeData.selectedGridRowIndex);\r\n\r\n // let rowErrors: string[] = this.runtimeData.invalidGridRows[row];\r\n // if (currentFieldErrors.length > 0) {\r\n // if (rowErrors == null) {\r\n // rowErrors = [];\r\n // }\r\n // rowErrors[cellName] = currentFieldErrors;\r\n // this.runtimeData.invalidGridRows[row] = rowErrors;\r\n // selectedGridRow.IsInvalid = true;\r\n // } else {\r\n // // Delete validation errors that no longer apply\r\n // if (rowErrors != null) {\r\n // if (rowErrors.hasOwnProperty(cellName)) {\r\n // delete rowErrors[cellName];\r\n // }\r\n // }\r\n // if (this.runtimeData.invalidGridRows.hasOwnProperty(row) && Object.keys(this.runtimeData.invalidGridRows[row]).length == 0) {\r\n // delete this.runtimeData.invalidGridRows[row];\r\n // }\r\n // selectedGridRow.IsInvalid = false;\r\n // }\r\n\r\n // // Was getting ExpressionChangedAfterItHasBeenCheckedError\r\n // //so bump this binding update to the next change detection loop\r\n // UtilityHelper.runWhenStackClear(() => {\r\n // this.fieldHasValidationError = Object.keys(this.runtimeData.invalidGridRows).length > 0; // note: the field being marked imvalid here is the grid as a whole\r\n // });\r\n // return currentFieldErrors;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // This overrides the method in the formfield base class\r\n // Note: this is gathering all validation errors for all fields in the whole grid\r\n //public getValidationErrors(revealValidationErrors: boolean = false): string[] {\r\n // let errorMessages: string[] = [];\r\n // if (this.fieldHasValidationError && revealValidationErrors) {\r\n // errorMessages.push(\"The following rows have validation errors. Please check and correct them.\");\r\n // for (let row of Object.keys(this.runtimeData.invalidGridRows)) {\r\n // let r = parseInt(row) + 1;\r\n // errorMessages.push('Row ' + r);\r\n // }\r\n // }\r\n // return errorMessages;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //private rowHasValidationErrors(row: number) {\r\n // return this.runtimeData.invalidGridRows[row] != null\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public getNumericTotalValue(iColIndex: number, colDef: FormField): string {\r\n // // NOTE: THIS METHOD RETURNS A BLANK FOR NON - NUMERIC COLUMNS BY DESIGN.\r\n // let totalValue: string = '';\r\n\r\n // if (this.runtimeMetadata && (this.runtimeMetadata.AllComponentsCount > 0)) {\r\n // if ((iColIndex >= 0) && (iColIndex < this.runtimeMetadata.AllComponentsCount)) {\r\n // let component: IFormFieldComponent = this.runtimeMetadata.getAllComponentsFormFieldComponent(iColIndex);\r\n\r\n // if (component.hasNumericData()) {\r\n // let colTotal: number = this.allModesDataSource.getColumnTotal(colDef);\r\n\r\n // totalValue = `${colTotal}`;\r\n // }\r\n // }\r\n // }\r\n\r\n // return (totalValue);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get ShowPaginator(): boolean {\r\n // // Until the paginator is ready, return false.\r\n // let show: boolean = false;\r\n // if (this.allModesDataSource.GridRows != null) {\r\n // if (this.allModesDataSource.GridRows.length >= this.loadingDataProgress.arrPageSizeOptions[0])\r\n // show = true;\r\n // }\r\n // return show;\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get InstanceModePaginatorColCount(): number {\r\n // let allColNames: string[] = this.GridColumnNamesWithActions;\r\n\r\n // return (allColNames.length);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get HasStickyHeaders(): boolean {\r\n // return (this.ShowPaginator);\r\n //}\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n //public get TotalRowCount(): number {\r\n // let iTotalRowCount: number = 0;\r\n\r\n // if (this.mode === 'instance') {\r\n // if ((this.FormInstanceElement.totalChildGridRows !== undefined) &&\r\n // (this.FormInstanceElement.totalChildGridRows !== null)) {\r\n // iTotalRowCount = this.FormInstanceElement.totalChildGridRows;\r\n // }\r\n // }\r\n\r\n // return (iTotalRowCount);\r\n //}\r\n\r\n public get PageSize(): number {\r\n return (this.loadingDataProgress.iPageSize);\r\n }\r\n\r\n public get PageSizeOptions(): number[] {\r\n return (this.loadingDataProgress.arrPageSizeOptions);\r\n }\r\n\r\n public get ShowFirstLastButtons(): boolean {\r\n return (true);\r\n }\r\n\r\n public get IsLoadingGridData(): boolean {\r\n return (this.loadingDataProgress.isLoadingGridData);\r\n }\r\n\r\n public get LoadingDataText(): string {\r\n return (this.loadingDataProgress.loadingDataMessage);\r\n }\r\n\r\n public get LoadDataProgressMode(): ProgressBarMode {\r\n return (ProgressBarConstants.BUFFER_MODE);\r\n }\r\n\r\n public get LoadDataProgressValue(): number {\r\n return (this.loadingDataProgress.iLoadingDataProgressValue);\r\n }\r\n\r\n public get LoadDataProgressBufferValue(): number {\r\n return (this.loadingDataProgress.iLoadingDataProgressBufferValue);\r\n }\r\n\r\n public get LoadDataProgressColor(): ThemePalette {\r\n return (ProgressBarConstants.THEME_PALETTE_PRIMARY);\r\n }\r\n\r\n public get PaginatorDisabled(): boolean {\r\n return (this.loadingDataProgress.isLoadingGridData && (this.loadingDataProgress.iLoadingDataProgressValue != 100));\r\n }\r\n\r\n public FooterCellClass(colIndex: number): string {\r\n let cellClass: string = 'footer-cell';\r\n\r\n if (colIndex == 0)\r\n cellClass = 'first-footer-cell';\r\n\r\n return cellClass;\r\n }\r\n // End methods called by my HTML code.\r\n\r\n public handleColumnOrderUpdate() {\r\n this.designChange.emit();\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Handle MatPaginator events.\r\n //public handlePageEvent(eventData: PageEvent): void {\r\n // this.loadingDataProgress.isLoadingGridData = true;\r\n\r\n // let request: FormInstanceElementRequest = new FormInstanceElementRequest();\r\n // request.formInstanceElementId = this.FormInstanceElement.id;\r\n // request.formInstanceId = this.FormInstanceElement.formInstanceId;\r\n // request.pageSize = eventData.pageSize;\r\n // request.pageIndex = eventData.pageIndex;\r\n\r\n // let iLastRecordToLoad: number = ((request.pageIndex + 1) * request.pageSize);\r\n // if (iLastRecordToLoad > this.TotalRowCount) {\r\n // iLastRecordToLoad = this.TotalRowCount;\r\n // }\r\n\r\n // this.loadingDataProgress.loadingDataMessage = `Loading records ${(request.pageIndex * request.pageSize) + 1} ` + `to ${iLastRecordToLoad} ...`;\r\n // this.loadingDataProgress.iLoadingDataProgressValue = 25;\r\n // this.loadingDataProgress.iLoadingDataProgressBufferValue = 50;\r\n\r\n // let loadRequest = {\r\n // request: request,\r\n // component: this\r\n // };\r\n // this.loadFormInstanceElement.emit(loadRequest);\r\n\r\n // return;\r\n //}\r\n // End handling MatPaginator events.\r\n\r\n // Implement base class method getDisplayValue().\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(formFieldParam.fieldDefinitionClassName);\r\n\r\n let strValue: string = '';\r\n if (fieldTypeAndName != null) {\r\n let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType);\r\n let fieldLogicHandler: IFieldDefinitionLogic = fieldDefinition.customLogicHandler;\r\n strValue = fieldLogicHandler.getDisplayValue(formFieldParam, formInstanceElementParam, gridRow, processingPhase);\r\n }\r\n\r\n return (strValue);\r\n }\r\n\r\n // Implement the IGetDisplayValue interface method.\r\n public isCalculatedField(iColumnIndex: number, formField: FormField): boolean {\r\n let bIsCalculatedField: boolean = false;\r\n\r\n if ((iColumnIndex >= 0) && (iColumnIndex < this.runtimeMetadata.AllComponentsCount)) {\r\n let component: FormFieldBaseComponent = this.runtimeMetadata.getAllComponentsFormFieldComponent(iColumnIndex);\r\n\r\n bIsCalculatedField = component.hasCalculatedValue();\r\n }\r\n\r\n return (bIsCalculatedField);\r\n }\r\n\r\n // Called from the constructor of GridRowDef\r\n public getCellDisplayValue(iColIndex: number, formFieldParam: FormField, formInstanceElementWrapperParam: GridFormInstanceElementWrapper, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n let formInstanceElement: FormInstanceElement = formInstanceElementWrapperParam.formInstanceElement;\r\n let strValue: string = this.pseudoStatic_getDisplayValue(formFieldParam, formInstanceElement, gridRow, processingPhase);\r\n return (strValue);\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Handle getting/receiving my form instance element.\r\n //protected formInstanceElementReceived(): void {\r\n // debugger;\r\n // if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // // Ask my data source to deserialize any JSON grid data (might not be any).\r\n // if (this.FormInstanceElement.childGridRows) {\r\n // this.createConfigFromChildGridRows(this.FormInstanceElement.childGridRows);\r\n // if (this.gridFieldEditorComponent != null)\r\n // this.gridFieldEditorComponent.parentReceivedFormInstanceElement(this.FormInstanceElement);\r\n // }\r\n // } // if \r\n\r\n // return;\r\n //}\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // Ask my data source to deserialize any JSON grid data (might not be any).\r\n if (this.FormInstanceElement.childGridRows) {\r\n this.createConfigFromChildGridRows(this.FormInstanceElement.childGridRows);\r\n }\r\n if (this.gridFieldEditorComponent != null) {\r\n this.gridFieldEditorComponent.parentReceivedFormInstanceElement(this.FormInstanceElement);\r\n }\r\n } // if \r\n\r\n return;\r\n }\r\n\r\n // Override a method used to get my class. (Required to implement abstract method in FormFieldBaseComponent)\r\n public getFormFieldClass(): AngularCoreType {\r\n return (GridFormFieldComponent);\r\n }\r\n\r\n public formInstanceElementLoaded(formInstanceElement: FormInstanceElement): void {\r\n if (formInstanceElement.childGridRows) {\r\n this.createConfigFromChildGridRows(formInstanceElement.childGridRows);\r\n }\r\n }\r\n\r\n // HTML accessor methods.\r\n public get DisplayName(): string {\r\n let displayName: string = null;\r\n\r\n if (this.FormField && this.FormField.displayName && (this.FormField.displayName.trim() !== '')) {\r\n displayName = this.FormField.displayName;\r\n } else {\r\n displayName = this.FormField.name;\r\n }\r\n\r\n return displayName;\r\n }\r\n\r\n public get GridFlavor(): GridFlavorEnum {\r\n return this.flavor;\r\n }\r\n\r\n public get FormFieldDisplayHints(): IFormFieldDisplayHint {\r\n return this.formFieldDisplayHints;\r\n }\r\n\r\n public get GridColumnDefs(): FormField[] {\r\n let colDefs = this.gridConfig.CachedGridColumnDefs;\r\n\r\n\r\n if (colDefs == null)\r\n colDefs = this.gridConfig.ColumnDefs;\r\n\r\n return colDefs;\r\n }\r\n\r\n public set GridColumnDefs(value: FormField[]) {\r\n if (value == null)\r\n console.log('GridColumnDefs(): setting CachedGridColumnDefs to null.');\r\n\r\n this.gridConfig.CachedGridColumnDefs = value;\r\n }\r\n\r\n public GridColumnNames(bIncludeAddColumn: boolean = false): string[] {\r\n let astrColumnNames: string[] = this.gridConfig.GridColumnNames;\r\n astrColumnNames = this.GridColumnDefs.map(ff => ff.name);\r\n\r\n if (bIncludeAddColumn) {\r\n astrColumnNames.push(\"Add Grid Column\");\r\n }\r\n\r\n return (astrColumnNames);\r\n }\r\n\r\n public GridColumnDisplayName(columnDef: FormField): string {\r\n let strDisplayName: string = columnDef.name;\r\n\r\n if ((columnDef !== undefined) &&\r\n (columnDef !== null) &&\r\n (columnDef.displayName !== undefined) &&\r\n (columnDef.displayName !== null) &&\r\n (columnDef.displayName.trim() !== '')) {\r\n strDisplayName = columnDef.displayName;\r\n }\r\n\r\n return (strDisplayName);\r\n }\r\n\r\n public get GridColumnNamesWithActions(): string[] {\r\n let astrColumnNames: string[] = this.GridColumnNames(false);\r\n\r\n astrColumnNames.push('Actions');\r\n\r\n return (astrColumnNames);\r\n }\r\n\r\n public get FieldTypesAndNames(): FieldTypeAndName[] {\r\n let fieldTypesAndNameFields = this.formFieldTypeAndNameService.getAllGridFieldTypesAndNameFields();\r\n return fieldTypesAndNameFields;\r\n }\r\n\r\n public getColumnTooltip(iColIndex: number, hshColumnDef: FormField): string {\r\n let columnTooltip: string = ''; // A default value.\r\n\r\n if (hshColumnDef.toolTip && (hshColumnDef.toolTip.trim() !== '')) {\r\n columnTooltip = hshColumnDef.toolTip;\r\n }\r\n\r\n return (columnTooltip);\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n\r\n return (position);\r\n }\r\n\r\n public getColumnTypeIconName(hshColumnDef: FormField): string {\r\n let strIconName: string = null;\r\n\r\n let fieldTypeAndName: FieldTypeAndName = this.formFieldTypeAndNameService.getFieldTypeAndField(hshColumnDef.fieldDefinitionClassName);\r\n if (!fieldTypeAndName) {\r\n let errorMsg: string =\r\n `GridFormFieldComponent.getColumnTypeIconName(): cannot find a field definition ` +\r\n `for field class '${hshColumnDef.fieldDefinitionClassName}'.`;\r\n this.raiseException(errorMsg);\r\n }\r\n strIconName = fieldTypeAndName.IconName;\r\n\r\n return (strIconName);\r\n }\r\n\r\n // pharv - 01/28/2022 - returns the standard class for all cells, plus adds additional ones based\r\n // on any particular needs of a field type\r\n public getUnselectedGridRowCellClass(gridRow: any, wrapper: GridFormInstanceElementWrapper): string {\r\n let cls = 'unselected-grid-row-cell-span';\r\n if (wrapper.fieldClass == RichTextFieldType) {\r\n cls += ' rich-text';\r\n }\r\n return cls;\r\n }\r\n\r\n // Called from Form Builder when properties drawer is closed\r\n public resetFormField(formField: FormField): void {\r\n if (this.runtimeData.componentBeingEdited != null) {\r\n if (this.runtimeData.componentBeingEdited != this) {\r\n this.runtimeData.componentBeingEdited.resetFormField(formField);\r\n }\r\n else {\r\n // Reload my configuration.\r\n if (this.Mode == 'design') {\r\n if ((this.FormField.childFormFields) && (this.FormField.childFormFields.length > 0))\r\n this.createGridConfig();\r\n else {\r\n this.createEmptyGridConfig();\r\n }\r\n }\r\n }\r\n\r\n this.runtimeData.componentBeingEdited = null;\r\n }\r\n }\r\n\r\n // Called when user chooses option from context menu\r\n public gridCellContextMenuItemClicked(eventData: any, menuItemName: string): void {\r\n // Get my menu data.\r\n let menuData: GridCellContextMenuInfo =\r\n (this.gridCellContextMenu && this.gridCellContextMenu.menuData ?\r\n this.gridCellContextMenu.menuData : null);\r\n\r\n let bSuccess: boolean = false;\r\n\r\n switch (menuItemName) {\r\n case 'Properties ...':\r\n {\r\n if (menuData && menuData.component) {\r\n let hshComponentProperties: any = menuData.component.getProperties();\r\n\r\n hshComponentProperties['component'] = this;\r\n\r\n this.onEdit.emit(hshComponentProperties);\r\n\r\n bSuccess = true;\r\n }\r\n }\r\n break;\r\n\r\n case 'Delete':\r\n {\r\n if (menuData && menuData.columnDef) {\r\n let gridConfigColDef: FormField = this.gridConfig.getColumnDefByName(menuData.columnDef.name);\r\n\r\n if (gridConfigColDef) {\r\n bSuccess = this.gridConfig.removeGridColumn(gridConfigColDef.gridColClientId);\r\n if (bSuccess)\r\n this.designChange.emit();\r\n }\r\n }\r\n }\r\n break;\r\n\r\n default:\r\n // Unknown menu item.\r\n break;\r\n }\r\n\r\n return;\r\n }\r\n\r\n public get ContextMenuPositionX(): string {\r\n let menuData: GridCellContextMenuInfo = (this.gridCellContextMenu && this.gridCellContextMenu.menuData ? this.gridCellContextMenu.menuData : null);\r\n return (menuData ? menuData.contextMenuXPos : '');\r\n }\r\n\r\n public get ContextMenuPositionY(): string {\r\n let menuData: GridCellContextMenuInfo = (this.gridCellContextMenu && this.gridCellContextMenu.menuData ? this.gridCellContextMenu.menuData : null);\r\n return (menuData ? menuData.contextMenuYPos : '');\r\n }\r\n\r\n public onEditSave = (formField: FormField): void => {\r\n // Note: deleted some code that was commented out but that can be found in source control.\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Called when the Form Template's Save button is clicked\r\n public saveConfiguration(form: any, reasonForSave: FormFieldConfigurationSaveReason): void {\r\n // Cache form fields during the save configuration operation.\r\n this.gridConfig.CachedGridColumnDefs = this.gridConfig.ColumnDefs;\r\n\r\n // Call form fields' saveConfiguration() method.\r\n let allComponentsAndFormFields: ComponentAndFormField[] = this.runtimeMetadata.AllComponents;\r\n for (let iComponent: number = 0; iComponent < allComponentsAndFormFields.length; iComponent++) {\r\n let component: FormFieldBaseComponent = allComponentsAndFormFields[iComponent].Component;\r\n\r\n component.saveConfiguration(form, reasonForSave);\r\n }\r\n\r\n // Save my column definitions as JSON text.\r\n let currentSite = this.currentSiteService.Site;\r\n this.FormField.childFormFields = [];\r\n\r\n for (let iCol: number = 0; iCol < this.gridConfig.ColumnCount; iCol++) {\r\n let gridColDef: FormField = this.gridConfig.getColumnDef(iCol);\r\n\r\n let childFormField: FormField = new FormField();\r\n\r\n childFormField.assignFrom(gridColDef);\r\n if (childFormField.id < 0)\r\n childFormField.id = 0;\r\n FormFieldConstraintLiaisonManager.synchronousUpdateFormFieldWithLatestConstraintValues(this.cachedFormFieldConstraintsService, currentSite.id, childFormField);\r\n\r\n this.FormField.childFormFields.push(childFormField);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Called after a successfuly save of the Form Template to which the Grid belongs\r\n public saveConfigurationCompleted(form: any): void {\r\n this.gridConfig.CachedGridColumnDefs = null;\r\n\r\n let allComponentsAndFormFields: ComponentAndFormField[] = this.runtimeMetadata.AllComponents;\r\n for (let iComponent: number = 0; iComponent < allComponentsAndFormFields.length; iComponent++) {\r\n let component: FormFieldBaseComponent = allComponentsAndFormFields[iComponent].Component;\r\n\r\n component.saveConfigurationCompleted(form);\r\n }\r\n }\r\n\r\n // Called from FormRenderer upon sucessful save of a Form Instance\r\n public saveCompleted(formInstance: any): void {\r\n // NOOP\r\n }\r\n\r\n // Called everytime a property is updated on the properties drawer in the Form Builder\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n let componentAndFormField: ComponentAndFormField = this.runtimeMetadata.AllComponents.find(cff => cff.FormField.name == formField.name);\r\n if (componentAndFormField != null) {\r\n if (propertyName == FormFieldPropertyEnum.FORMULA)\r\n this.notifyComponentOfFieldNames(componentAndFormField.Component);\r\n componentAndFormField.Component.propertyUpdated(formField, propertyName);\r\n }\r\n\r\n // Do we need to handle this property?\r\n if (propertyName === FormFieldPropertyEnum.FIXED_FIRST_COLUMN_FILE) {\r\n if (formField.csvOptionsData != null)\r\n this.processFixedFirstColumnFile(formField.csvOptionsData);\r\n else {\r\n // Clear any fixed first column configuration data.\r\n this.clearAnyFixedFirstColumnConfig();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Called when choosing a CSV to set fixed row headers\r\n private processFixedFirstColumnFile(csvOptionsData: CsvOptionsFileData): void {\r\n if ((csvOptionsData != null) && (csvOptionsData.headers != null) && (csvOptionsData.headers.length >= 1)) {\r\n let fixedValues: FixedFirstColumnValues = FixedFirstColumnValues.createFromHeaderValuePairs(csvOptionsData.headers[0], csvOptionsData.linesOfHeaderValuePairs);\r\n\r\n this.setFirstGridColAsFixedValues(fixedValues);\r\n }\r\n }\r\n\r\n // Called when choosing a CSV to set fixed row headers\r\n private setFirstGridColAsFixedValues(fixedValues: FixedFirstColumnValues): void {\r\n // Create the fixed column form field.\r\n let fixedColDef: FormField = (this.gridConfig.ColumnCount == 0 ? this.gridConfig.addGridColumn(ShortTextFieldType) : this.gridConfig.getColumnDef(0));\r\n fixedColDef.valuesAreFixed = true;\r\n fixedColDef.displayName = fixedValues.columnName;\r\n fixedColDef.defaultValue = `${fixedValues.values.length} values`;\r\n fixedColDef.readOnly = true;\r\n fixedColDef.fixedFirstColumnJson = JSON.stringify(fixedValues);\r\n this.FormField.fixedFirstColumnJson = fixedColDef.fixedFirstColumnJson; // Saving this in two places is merely a convenience.\r\n this.FormField.transientFixedFirstColumnValues = FixedFirstColumnValues.createFromJson(this.gridConfig.getColumnDef(0).fixedFirstColumnJson);\r\n }\r\n\r\n // Called when clicking the \"Clear Fixed Row Heading\" button on Form Field Properties drawer\r\n private clearAnyFixedFirstColumnConfig(): void {\r\n // Clear any fixed first column configuration data.\r\n if (this.FormField.fixedFirstColumnJson != null)\r\n this.FormField.fixedFirstColumnJson = null;\r\n if (this.FormField.transientFixedFirstColumnValues != null)\r\n this.FormField.transientFixedFirstColumnValues = null;\r\n if ((this.FormField.childFormFields != null) && (this.FormField.childFormFields.length >= 1)) {\r\n let firstChildField: FormField = this.FormField.childFormFields[0];\r\n\r\n if (firstChildField.fixedFirstColumnJson != null)\r\n firstChildField.fixedFirstColumnJson = null;\r\n if (firstChildField.valuesAreFixed)\r\n firstChildField.valuesAreFixed = false;\r\n if (firstChildField.defaultValue != null)\r\n firstChildField.defaultValue = null;\r\n }\r\n\r\n // Recreate my config.\r\n if ((this.FormField.childFormFields != null) && (this.FormField.childFormFields.length > 0))\r\n this.createGridConfig();\r\n else {\r\n this.createEmptyGridConfig();\r\n }\r\n }\r\n\r\n // Implement private helper methods.\r\n // Commented out for VNEXT-1429 (remove old grid)\r\n // Called when property on property drawer is updated (called from propertyUpdated())\r\n private notifyComponentOfFieldNames(component: FormFieldBaseComponent): void {\r\n // Assemble a hash of all component names.\r\n let astrFieldNames: string[] = [];\r\n let hshColNameToFormField: IFieldNameToFormField = {};\r\n\r\n for (let iComponent: number = 0; iComponent < this.runtimeMetadata.AllComponentsCount; iComponent++) {\r\n let component: FormFieldBaseComponent = this.runtimeMetadata.getAllComponentsFormFieldComponent(iComponent);\r\n\r\n let columnFormField: FormField = this.runtimeMetadata.getAllComponentsFormField(iComponent);\r\n component.FormField = columnFormField;\r\n\r\n let iCol: number = this.gridConfig.getColumnIndex(columnFormField) + 1;\r\n\r\n let colName: string = `col${iCol}`;\r\n astrFieldNames.push(colName);\r\n\r\n hshColNameToFormField[colName] = columnFormField;\r\n }\r\n\r\n component.receiveFormFieldNames(astrFieldNames, hshColNameToFormField);\r\n }\r\n\r\n // Called on Form Template load\r\n private createEmptyGridConfig(): void {\r\n this.gridConfig = new GridConfig(this.Mode, this.flavor, this.flavorModifier, this.fieldDefinitionService);\r\n }\r\n\r\n // Called on Form Template load\r\n private createGridConfig(): void {\r\n if (this.FormField.childFormFields && (this.FormField.childFormFields.length > 0)) {\r\n this.gridConfig = new GridConfig(this.Mode, this.flavor, this.flavorModifier, this.fieldDefinitionService, this.FormField.childFormFields, this.formInstance);\r\n this.gridConfig.setIsFootnote(this.FormField.isFootnote);\r\n }\r\n }\r\n\r\n // Called after saving a FormInstance when it reloads\r\n public createConfigFromChildGridRows(childGridRows: GridRowViewModel[]): void {\r\n // Create my configuration and load my data.\r\n this.createGridConfig();\r\n this.allModesDataSource = new GridAllModesDataSource(this.gridConfig, this);\r\n this.allModesDataSource.loadGridDataFromViewModelElements(this.fieldDefinitionService, childGridRows);\r\n\r\n // Do we have a footer for numeric totals?\r\n this.trackColumnTotalsIfSoConfigured();\r\n\r\n // Do we need to show a paginator?\r\n if (childGridRows.length >= this.loadingDataProgress.arrPageSizeOptions[0]) {\r\n this.loadingDataProgress.bShowPaginator = true;\r\n }\r\n\r\n // Update my progress.\r\n if (this.loadingDataProgress.isLoadingGridData) {\r\n this.loadingDataProgress.iLoadingDataProgressValue = 100;\r\n this.loadingDataProgress.iLoadingDataProgressBufferValue = 100;\r\n\r\n // Set a timer to reset my loading flag.\r\n setTimeout(() => {\r\n this.loadingDataProgress.isLoadingGridData = false;\r\n }, 2500);\r\n }\r\n }\r\n\r\n private trackColumnTotalsIfSoConfigured(): void {\r\n // Do we have a footer for numeric totals?\r\n if (this.FormField.showFooter) {\r\n // Do we have numeric form fields?\r\n let numericFFCompPairs: ComponentAndFormField[] = this.runtimeMetadata.AllNumericComponents;\r\n\r\n if (numericFFCompPairs && (numericFFCompPairs.length > 0)) {\r\n this.allModesDataSource.trackColumnTotals(numericFFCompPairs);\r\n }\r\n }\r\n }\r\n\r\n public copyDataToGrid(pasteData: string, replaceOrAppend: any): void {\r\n this.allModesDataSource.copyDataToGrid(pasteData, replaceOrAppend, this.runtimeMetadata.AllComponents, this.hasFixedFirstColumnJsonConfig, this.FormField, this.fieldDefinitionService);\r\n }\r\n\r\n private formFieldConstraintUpdated = (updatedConstraint: IFormFieldConstraint, constraintLiaison: IFormFieldConstraintLiaison): void => {\r\n // If any of my child form fields use the same constraint, updated their constraint fields accordingly.\r\n if (this.gridConfig.ColumnDefs != null) {\r\n for (let index: number = 0; index < this.gridConfig.ColumnDefs.length; index++) {\r\n let columnDef: FormField = this.gridConfig.ColumnDefs[index];\r\n\r\n constraintLiaison.updateOtherFieldIfUsingSameConstraint(updatedConstraint, columnDef);\r\n }\r\n }\r\n\r\n if ((this.runtimeMetadata != null) && (this.runtimeMetadata.AllComponents != null)) {\r\n for (let index: number = 0; index < this.runtimeMetadata.AllComponents.length; index++) {\r\n let componentInfo: ComponentAndFormField = this.runtimeMetadata.AllComponents[index];\r\n let childFormField: FormField = componentInfo.Component.getFormField();\r\n\r\n constraintLiaison.updateOtherFieldIfUsingSameConstraint(updatedConstraint, childFormField);\r\n }\r\n }\r\n }\r\n\r\n private acceptsConstraintUpdateFrom = (formField: FormField): boolean => {\r\n return formField != this.FormField;\r\n }\r\n\r\n private createAnyVirtualColDefs(): void {\r\n if (this.FormField.childFormFields != null) {\r\n // Remove any existing virtual fields.\r\n this.removeAnyExistingVirtualColDefs();\r\n\r\n // Do we have any virtual fields to create?\r\n if (GridConfig.hasColumnDefWithVirtualFormFieldsFor(this.FormField.childFormFields, this.fieldDefinitionService)) {\r\n let maxClientId: number = GridConfig.getMaxClientIdFor(this.FormField.childFormFields);\r\n this.FormField.childFormFields = GridConfig.getChildAndAnyVirtualFormFieldsFor(this.FormField.childFormFields, this.fieldDefinitionService, maxClientId);\r\n for (let index: number = 0; index < this.FormField.childFormFields.length; index++) {\r\n let childFormField: FormField = this.FormField.childFormFields[index];\r\n\r\n childFormField.fieldOrder = index + 1;\r\n childFormField.clientId = index + 1;\r\n if ((childFormField.id == null) || (childFormField.id == 0)) {\r\n childFormField.id = -(index + 1); // Note: this 'id' value is never saved in the database, so I am using a negative value to distinguish it from persistent id values.\r\n }\r\n if ((childFormField.displayName == null) || (childFormField.displayName.trim() == ''))\r\n childFormField.displayName = childFormField.name;\r\n } // for\r\n } // if\r\n } // if\r\n }\r\n\r\n private removeAnyExistingVirtualColDefs(): void {\r\n // Remove any existing virtual fields.\r\n this.FormField.childFormFields = this.FormField.childFormFields.filter(ff => !ff.transientFieldIsVirtual);\r\n }\r\n\r\n private get instanceOrPreviewChildFormFieldComponents(): FormFieldBaseComponent[] {\r\n let formFieldComponents: FormFieldBaseComponent[] = [];\r\n\r\n if (this.formFieldComponentsQueryList != null)\r\n formFieldComponents = this.formFieldComponentsQueryList.toArray();\r\n\r\n return formFieldComponents;\r\n }\r\n\r\n private get hasFixedFirstColumnJsonConfig(): boolean {\r\n return ((this.gridConfig != null) && (this.gridConfig.ColumnCount > 0) && (this.gridConfig.getColumnDef(0).fixedFirstColumnJson != null));\r\n }\r\n\r\n //TEAMS-894: KLW - Needed for grid validation\r\n public handleEditorGridValidation(state: string) {\r\n this.mainGridValidation.emit(state);\r\n }\r\n\r\n //public handleConditionalLogicColumnDefsFilter(filteredColumnDefs: FormField[]): void {\r\n public handleConditionalLogicColumnDefsFilter(outputData: ConditionalLogicColumnDefsFilterData): void {\r\n // Set our cached column defs to update our display.\r\n outputData.filteredColumnDefs.sort((ff1, ff2) => {\r\n let result: number = 0;\r\n\r\n if (ff1.fieldOrder < ff2.fieldOrder)\r\n result = -1\r\n else if (ff1.fieldOrder > ff2.fieldOrder)\r\n result = 1;\r\n\r\n return result;\r\n });\r\n this.gridConfig.CachedGridColumnDefs = outputData.filteredColumnDefs;\r\n\r\n // Begin some rather complicated logic to see if a newly shown column, if any, needs to be put in a different position.\r\n // See VNEXT-1387 for information on newly shown columns being shown as the last data column regardless of the configured position.\r\n //\r\n // Note: the following method has not been adequately tested and might no longer be necessary.\r\n // this.fixGridColumnPositionsIfNecessary(outputData);\r\n }\r\n\r\n // SWH Note: the following method has not been adequately tested and might no longer be necessary.\r\n //\r\n // I am electing to leave the code in the following method in place as it reflects some\r\n // amount of research and could be necessary or at least useful in the future.\r\n private fixGridColumnPositionsIfNecessary(outputData: ConditionalLogicColumnDefsFilterData): void {\r\n // Begin some rather complicated logic to see if a newly shown column, if any, needs to be put in a different position.\r\n // See VNEXT-1387 for information on newly shown columns being shown as the last data column regardless of the configured position.\r\n if (outputData.gridComponent != null) {\r\n // If we are showing a new field, let's set a timer to allow the grid to show the new field, and then we can see if it's in the correct position.\r\n if (outputData.showChildField && (outputData.childFieldColumnDef != null)) {\r\n setTimeout(() => {\r\n if ((outputData.gridComponent != null) && (outputData.gridComponent.columns != null)) {\r\n let columns = outputData.gridComponent.columns.toArray();\r\n\r\n // Note: all of the logic related to the \"number of data columns\" plus 2/two, relates to the fact that the first column is for reordering and the last for command buttons.\r\n if (columns.length == outputData.filteredColumnDefs.length + 2) {\r\n console.log('Continue here.');\r\n // Note: if the last column is not in the position it should be, set its order now.\r\n // Find the shown column's position.\r\n let colIndex: number = 0;\r\n let colPositionFound: boolean = false;\r\n for (colIndex = 0; colIndex < outputData.filteredColumnDefs.length; colIndex++) {\r\n if (outputData.childFieldColumnDef.name == outputData.filteredColumnDefs[colIndex].name) {\r\n colPositionFound = true;\r\n break;\r\n }\r\n\r\n }\r\n\r\n if (colPositionFound) {\r\n let dataColumn: ColumnBase = null;\r\n for (let dataColIndex: number = 1; dataColIndex < columns.length - 1; dataColIndex++) {\r\n let colFieldName: string = columns[dataColIndex]['field'];\r\n\r\n if (colFieldName == outputData.childFieldColumnDef.name) {\r\n dataColumn = columns[dataColIndex];\r\n if (colIndex + 1 != dataColIndex) {\r\n // Here is the definition of interface ColumnReorderConfig, the optional last parameter to grid component method reorderColumn():\r\n // export interface ColumnReorderConfig {\n // before: boolean; // Indicates whether the reordered column will be positioned before or after the destination index.\r\n // }\r\n outputData.gridComponent.reorderColumn(dataColumn, colIndex + 1);\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }, 100);\r\n }\r\n }\r\n }\r\n}\r\n","\n\n\n
\n
\n
\n \n \n
{{this.DisplayName}} *
\n \n
\n\n \n \n {{this.DisplayName}} *\n \n\n \n\n \n \n
\n \n
\n\n
\n
\n \n \n\n \n \n
{{this.DisplayName}} *
\n \n
\n\n \n\n \n \n \n \n {{this.DisplayName}} *\n \n\n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n
\n
\n","import {\r\n Component,\r\n Renderer2,\r\n OnInit,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\nimport { ControlType, ValidationInfo, ValidationMessageInfo } from '../form-field-base/form-field-base.component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\n\r\n@Component({\n selector: 'app-html-link-field',\n templateUrl: './html-link-field.component.html',\n styleUrls: ['./html-link-field.component.scss', '../form-fields.scss'], //VNEXT-984: KLW - Fixing issue where instructions weren't showing\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: HtmlLinkFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class HtmlLinkFieldComponent extends TextInputFormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.MAX_LENGTH,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT, // NOTE: temporarily using display format to display optional validations.\r\n FormFieldPropertyEnum.CONSTRAINT,\r\n FormFieldPropertyEnum.READ_ONLY,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT\r\n ];\r\n\r\n private readonly beginURlText: string = \"https://\";\r\n\r\n private readonly validationOptions: ValidationInfo[] =\r\n [\r\n {\r\n DISPLAY_NAME: 'HTML Regular Expression',\r\n IS_CUSTOM_REGULAR_EXPRESSION: true,\r\n REGULAR_EXPRESSION: /^https:\\/\\/.*$/,\r\n ERROR_MESSAGE: 'must begin with https://'\r\n }\r\n ];\r\n\r\n @Output() onInit = new EventEmitter();\r\n\r\n // Constructor.\r\n constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('html');\r\n\r\n return;\r\n }\r\n\r\n protected doSetFocus(): void {\r\n let inputSelector: string = `#${this.matInputId}`;\r\n\r\n // if (inputSelector) {\r\n // let matInput: any = this.renderer.selectRootElement(inputSelector);\r\n // matInput.focus();\r\n // }\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n public get FormControlValue(): string {\r\n var retVal = \"\";\r\n\r\n if (this.FormControl != null)\r\n if (this.FormControl.value != null)\r\n retVal = this.FormControl.value;\r\n\r\n return retVal;\r\n }\r\n\r\n public get htmlPlaceHolderText() {\r\n return this.beginURlText;\r\n }\r\n\r\n public get htmlDefaultValue() {\r\n return this.beginURlText;\r\n }\r\n\r\n public openLink() {\r\n var linkToOpen = this.FormControlValue;\r\n\r\n if (linkToOpen != \"\")\r\n window.open(linkToOpen, '_blank').focus();\r\n\r\n return false;\r\n }\r\n\r\n\r\n // Override some base class methods.\r\n public getProperties(): any {\r\n\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return (HtmlLinkFieldComponent);\r\n }\r\n \r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n\r\n if (this.FormControlValue == \"\")\r\n this.FormControl.setValue(this.htmlDefaultValue);\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n // Override\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[]): void {\r\n // First call super.\r\n super.buildValidatorFunctionsAndMessages(arrValidatorsParam, arrValidationMessagesParam);\r\n\r\n arrValidatorsParam.push(Validators.pattern(this.validationOptions[0].REGULAR_EXPRESSION));\r\n arrValidationMessagesParam.push({ type: 'pattern', message: `${this.DisplayName} ${this.validationOptions[0].ERROR_MESSAGE}` });\r\n\r\n // Done.\r\n return;\r\n }\r\n}\r\n","
{{FormField.displayName || FormField.name}}
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n
Loading...
\r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n Input,\r\n EventEmitter,\r\n Type as AngularCoreType,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\n//import { FormFieldPropertyEnum } from '../../form-builder/properties/form-field-properties/form-field-properties.component';\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { InlineContentService } from '../../../services/inline-content.service';\r\n\r\n/*\r\n !!!!! IMPORTANT NOTE !!!!!:\r\n This component relies upon use of a property of FormField named UrlBuilderConfigJson BUT THERE IS CURRENTLY NO UI FOR ENTER THIS\r\n The expected format of this property is...\r\n {\r\n \"urlTemplate\":\"https://services.max.gov/a11cs/adt/PA2024/textdata/FINAL/.html\",\r\n \"buttonName\":\"Render Report\"\r\n }\r\n There is an existing property of formfield which could have been used but was not - \"iframeSource\". 1) The component no longer uses\r\n an iframe, and 2) other types of field may need to be configured with a url - such as the address lookup functionality Steve\r\n worked on.\r\n*/\r\n\r\n@Component({\n selector: 'app-inline-content-form-field',\n templateUrl: './inline-content-form-field.component.html',\n styleUrls: ['./inline-content-form-field.component.scss'],\n encapsulation: ViewEncapsulation.None, //enable CSS overrides\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: InlineContentFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class InlineContentFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n private url: string = null;\r\n private resource: string = null;\r\n private showLoading: boolean = false;\r\n\r\n @Input() buttonName: string = \"Get Content\";\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.IFRAME_SRC\r\n ];\r\n\r\n private readonly formFieldNames: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME\r\n ]\r\n\r\n // Constructor.\r\n constructor(private renderer: Renderer2, private inlineContentService: InlineContentService)\r\n {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n // NOTE: NEED TO REVISIT THIS.\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (InlineContentFormFieldComponent);\r\n }\r\n\r\n public get ButtonName(): string {\r\n return this.buttonName;\r\n }\r\n\r\n public get Resource(): string {\r\n return this.resource;\r\n }\r\n\r\n public get Ready(): boolean {\r\n return \r\n }\r\n\r\n public get ShowLoading() {\r\n return this.showLoading;\r\n }\r\n\r\n public handleOpenContentButtonClick(event: any) {\r\n this.loading();\r\n this.inlineContentService.getUrl(this.FormInstance, this.formField.id).then(url => {\r\n this.showLoading = false;\r\n window.open(url, '_blank').focus();\r\n });\r\n }\r\n\r\n public handleOpenContentButtonClickForGridRow_FOR_DEV_ONLY(event: any) {\r\n this.loading();\r\n this.inlineContentService.getUrlFromGridRow(this.FormInstance.id, this.formField.id).then(url => {\r\n this.showLoading = false;\r\n window.open(url, '_blank').focus();\r\n });\r\n }\r\n\r\n public handleGetContentButtonClick(event: any) {\r\n this.loading();\r\n this.inlineContentService.getContent(this.formInstance.id, this.formField.id).then(resource => {\r\n this.showLoading = false;\r\n this.resource = resource;\r\n });\r\n }\r\n\r\n\r\n private loading() {\r\n this.resource = null;\r\n this.showLoading = true;\r\n }\r\n}\r\n","import {\r\n Component,\r\n Renderer2,\r\n AfterViewInit\r\n} from '@angular/core';\r\n\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\n\n@Component({\n selector: 'app-input-form-field-base',\n templateUrl: './input-form-field-base.component.html',\n styleUrls: ['./input-form-field-base.component.scss'],\n standalone: false\n})\nexport abstract class InputFormFieldBaseComponent extends FormFieldBaseComponent implements AfterViewInit {\n // Properties.\r\n protected matInputId: string = null;\r\n\r\n // Constructor.\n protected constructor(protected renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngAfterViewInit(): void {\r\n // Tell my base class that\r\n // my view has initialized.\r\n this.viewHasInitialized();\r\n\r\n return;\r\n }\r\n\r\n // Implement doSetFocus().\n protected doSetFocus(): void {\r\n let inputSelector: string = `#${this.matInputId}`;\r\n let matInput: any = this.renderer.selectRootElement(inputSelector);\r\n matInput.focus();\r\n\r\n return;\r\n }\r\n\r\n // Define getter methods.\r\n public get MatInputId(): string {\r\n return (this.matInputId);\r\n }\n}\n","import { Component, Renderer2 } from '@angular/core';\r\nimport { InputFormFieldBaseComponent } from './input-form-field-base.component';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\n\r\n@Component({\n selector: 'app-text-input-form-field-base',\n templateUrl: './input-form-field-base.component.html',\n styleUrls: ['./input-form-field-base.component.scss'],\n standalone: false\n})\r\nexport abstract class TextInputFormFieldBaseComponent extends InputFormFieldBaseComponent {\r\n // Constructor.\r\n protected constructor(protected renderer: Renderer2) { \r\n super(renderer);\r\n }\r\n\r\n // Static method.\r\n public static pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper): void {\r\n elementWrapper.formInstanceElement.TextValue = value;\r\n elementWrapper.standinDisplayValue = value;\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n }\r\n\r\n // Implement methods common to form field component classes that use FormInstanceElement property 'textValue'.\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n TextInputFormFieldBaseComponent.pasteValue(value, elementWrapper);\r\n }\r\n\r\n // Handle updates made outside the control.\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n if ((this.controlData != null) && (this.controlData.formControl != null))\r\n this.controlData.formControl.setValue(formInstanceElement.textValue);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n {{this.DisplayName}}\r\n \r\n \r\n
\r\n
\n","import {\n Component,\n OnInit,\n Output,\n EventEmitter,\n Type as AngularCoreType\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\n//import { FormFieldPropertyEnum } from '../../form-builder/properties/form-field-properties/form-field-properties.component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\n\r\n@Component({\n selector: 'app-instructions-form-field',\n templateUrl: './instructions-form-field.component.html',\n styleUrls: ['./instructions-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: InstructionsFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class InstructionsFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldNames: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT\r\n ]\r\n\r\n // Constructor.\r\n constructor()\r\n {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldNames\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\n // Override/implement the method used to get my class.\n public getFormFieldClass(): AngularCoreType {\r\n return (InstructionsFormFieldComponent);\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n // Accessor methods.\r\n}\r\n","import { Component, Renderer2 } from '@angular/core';\r\n\r\nimport { NumericInputFormFieldBaseComponent } from './num-input-form-field-base.component';\r\n//import { IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\n\r\n@Component({\n selector: 'app-integer-input-form-field-base',\n templateUrl: './num-input-form-field-base.component.html',\n styleUrls: ['./num-input-form-field-base.component.scss'],\n standalone: false\n})\r\nexport abstract class IntegerInputFormFieldBaseComponent extends NumericInputFormFieldBaseComponent {\r\n // Constructor.\r\n public constructor(protected renderer: Renderer2) {\r\n super(renderer);\r\n }\r\n\r\n // Implement methods common to form field component\r\n // classes that use FormInstanceElement property 'textValue'.\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n elementWrapper.formInstanceElement.IntValue = parseInt(value);\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeInteger;\r\n elementWrapper.standinDisplayValue = elementWrapper.formInstanceElement.IntValue.toString();\r\n }\r\n\r\n // Handle updates made outside the control.\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n if ((this.controlData != null) && (this.controlData.formControl != null))\r\n this.controlData.formControl.setValue(formInstanceElement.intValue);\r\n }\r\n}\r\n","import {Directive, Input, HostListener, ElementRef} from '@angular/core';\r\n\n@Directive({\n selector: '[IntegerOnly]',\n standalone: false\n})\n\r\nexport class IntegerOnlyDirective {\n\n constructor(private el: ElementRef) { }\n\r\n editingKeys = ['ArrowUp', 'ArrowRight', 'ArrowDown', 'ArrowLeft', 'Backspace', 'Delete', 'Home', 'Tab', 'End'];\r\n controlKeys = ['a','c','v','x','z']; //select all, copy, paste, cut, undo\n\n @HostListener('keydown', ['$event'])\r\n onKeyDown(e: KeyboardEvent) {\r\n if (this.editingKeys.includes(e.key)) {\r\n return; //allow editing keys\r\n }\r\n if (e.ctrlKey && this.controlKeys.includes(e.key)) {\r\n return; //allow Windows control keystrokes\r\n }\r\n if (e.metaKey && this.controlKeys.includes(e.key)) {\r\n return; //allow Mac control keystrokes\r\n }\r\n if (e.key === '-') {\r\n return; //allow negative numbers\r\n }\r\n if (e.key === ' ' || isNaN(Number(e.key))) {\r\n e.preventDefault(); //block space and non-numbers\r\n }\r\n }\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: ClipboardEvent) {\r\n event.preventDefault();\r\n const pastedInput: string = event.clipboardData\r\n .getData('text/plain')\r\n .replace(/\\D/g, ''); //digit-only string\r\n document.execCommand('insertText', false, pastedInput);\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n\r\n \r\n \r\n
\r\n \r\n\r\n
\r\n \r\n {{this.DesignModePreviewValue | number:'1.0-0'}}\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n {{this.DisplayName}}\r\n *\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n \r\n\r\n info\r\n\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n {{this.FormControl.value | number:'1.0-0'}}\r\n \r\n
\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n Renderer2,\r\n OnInit,\r\n AfterViewInit,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { FormBuilder, FormGroup, FormControl, Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\n//import { InputFormFieldBaseComponent } from '../input-form-field-base/input-form-field-base.component';\r\nimport { NumericInputFormFieldBaseComponent } from '../num-input-form-field-base/num-input-form-field-base.component';\r\nimport { IntegerInputFormFieldBaseComponent } from '../num-input-form-field-base/integer-input-form-field-base.component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-integer-form-field',\n templateUrl: './integer-form-field.component.html',\n styleUrls: [\n './integer-form-field.component.scss',\n '../form-fields.scss',\n '../num-input-form-field-base/num-input-form-field-base.component.scss'\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IntegerFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class IntegerFormFieldComponent extends IntegerInputFormFieldBaseComponent implements OnInit {//, AfterViewInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.MIN_VALUE,\r\n FormFieldPropertyEnum.MAX_VALUE,\r\n FormFieldPropertyEnum.SHOW_PREVIEW,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n // Constructor.\r\n constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('integer');\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n /*\r\n if (this.Mode === FormFieldMode.DESIGN) {\r\n this.onInit.emit({ formField: this.formField, properties: this.formFieldNames });\r\n }\r\n */\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n // Accessor methods.\r\n /*\r\n public get DesignModePreviewValue(): string {\r\n let previewValue: string = this.DefaultValue;\r\n\r\n if (previewValue == '') {\r\n previewValue = '0';\r\n }\r\n\r\n return (previewValue);\r\n }\r\n */\r\n\r\n // Override base class methods.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n if (this.FormInstanceElement.UserUpdatedData != true) {\r\n this.setDefaultIntegerValue();\r\n }\r\n\r\n // Use a base class method to set up an integer form group.\r\n this.setupIntegerFormControl();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n this.writeValueTriggered();\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultIntegerValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n let strValue: string =\r\n (formInstanceElementParam.intValue ?\r\n new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(formInstanceElementParam.intValue) :\r\n '');\r\n\r\n return (strValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (IntegerFormFieldComponent);\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return (true);\r\n }\r\n public getNumericValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): number {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultIntegerValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n //return (formInstanceElementParam.intValue ? formInstanceElementParam.intValue : 0);\r\n let numValue: number = 0;\r\n if (formInstanceElementParam.intValue) {\r\n if (typeof formInstanceElementParam.intValue == 'number') {\r\n numValue = formInstanceElementParam.intValue;\r\n } else {\r\n numValue = parseInt((formInstanceElementParam.intValue).toString());\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (Number.isNaN(numValue))\r\n numValue = 0;\r\n }\r\n }\r\n return numValue;\r\n }\r\n}\r\n","import { Component } from \"@angular/core\";\r\n\r\n\r\n\r\n@Component({\n selector: 'app-DO-NOT-USE-kendo-grid-base',\n template: '',\n standalone: false\n})\r\nexport abstract class KendoGridBaseComponent {\r\n\r\n\r\n\r\n //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n public static CalculateGridHeight(rowHeight: number,\r\n toolbarHeadersFilters: number,\r\n detailRowHeight: number,\r\n extraHeightWhenEditingRow: number,\r\n rowCount: number,\r\n rowsDisplayed: number,\r\n wrapHeaderTextEnabled: boolean,\r\n showFooter: boolean)\r\n {\r\n let gridHeight: number;\r\n // let rowHeight: number = 23.14; // 23.14;\r\n // let toolbarHeadersFilters = 107; // height of grid with no rows\r\n let toolbarHeadersFiltersDetailRowHeight: number = toolbarHeadersFilters + detailRowHeight + extraHeightWhenEditingRow;\r\n\r\n if (rowsDisplayed < 1) {\r\n rowsDisplayed = 5;\r\n } \r\n\r\n // The goal here is to calculate a reasonable fixed height for the grid when there are more than a few records\r\n // When there are fewer records the returned value of gridHeight will be undefined and when passed to Kendo Grid's [height] @Input\r\n // that will cause it to automatically size itself. The advantage of this is that tall rows will be displayed correctly\r\n // I played around a bit with the cutoff for this, and this seems to work pretty well.\r\n\r\n if (rowCount <= rowsDisplayed) {\r\n rowsDisplayed = rowCount;\r\n }\r\n\r\n // 05-03-2024: add to the displayed row count if we have wrapped header text and/or are showing a footer.\r\n if (wrapHeaderTextEnabled)\r\n rowsDisplayed += 2;\r\n if (showFooter)\r\n rowsDisplayed += 1;\r\n\r\n gridHeight = (rowHeight * rowsDisplayed) + toolbarHeadersFiltersDetailRowHeight;\r\n\r\n return gridHeight;\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n\r\n","
\r\n {{this.DisplayName}}\r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { FormBuilder, FormGroup, FormControl, Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-label-form-field',\n templateUrl: './label-form-field.component.html',\n styleUrls: ['./label-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: LabelFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class LabelFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldNames: string[] =\r\n ['name',\r\n 'fieldGroup',\r\n 'displayName',\r\n 'helpText',\r\n //'placeholderText',\r\n 'toolTip',\r\n 'displayFormat'\r\n ];\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n 'Align Left',\r\n 'Align Center',\r\n 'Align Right'\r\n ]\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\n // Implement abstract methods.\n public getProperties(): any {\n let hshEventProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldNames,\r\n displayFormatValues: this.displayFormats\r\n };\r\n\n return (hshEventProperties);\r\n }\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\n /*\r\n let hshEventProperties = {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldNames,\r\n displayFormatValues: this.displayFormats\r\n };\n */\n let hshEventProperties = this.getProperties();\r\n\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n this.onInit.emit(hshEventProperties);\r\n\r\n return;\r\n }\r\n\r\n // Override a base class method.\r\n public get CanBeReadOnly(): boolean {\r\n return (false);\r\n }\r\n\r\n // HTML accessor methods.\r\n get CssClass(): string {\r\n let strCssClass: string = 'label-div-align-left';\r\n\r\n switch (this.FormField.displayFormat) {\r\n case 'Align Center':\r\n strCssClass = 'label-div-align-center';\r\n break;\r\n\r\n case 'Align Right':\r\n strCssClass = 'label-div-align-right';\r\n break;\r\n\r\n default:\r\n // Note: the default value was set in the first line of this method.\r\n break;\r\n }\r\n\r\n return (strCssClass);\r\n }\r\n\r\n // Implement formInstanceElementReceived(), called from my base class.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.setupIntegerFormControl(); // SWH: this cannot be correct (and I wrote it).\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement): string {\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\n (!formInstanceElementParam.textValue)) {\n // Set a default value.\n formInstanceElementParam.TextValue = '';\r\n }\n\r\n // NOTE: NEED TO REVISIT THIS.\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (LabelFormFieldComponent);\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n {{this.DisplayName}}\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n {{this.DisplayName}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewContainerRef, Renderer2, Type as AngularCoreType, ViewChild, ElementRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { FormBuilder, FormGroup, FormControl, Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\nimport { ControlType, ValidationInfo, ValidationMessageInfo, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { CurrentUser } from '../../../../security/current-user.model';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { LastEditedDateFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { LastEditedDateFieldDefLogic } from '../../../models/form-builder/field-defs/last-edited-date-field-def-logic';\r\nimport { DatePipe } from '@angular/common';\r\n\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\r\n selector: 'app-last-edited-date-form-field',\r\n templateUrl: './last-edited-date-form-field.component.html',\r\n styleUrls: ['./last-edited-date-form-field.component.scss', '../form-fields.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: LastEditedDateFormFieldComponent,\r\n multi: true\r\n }\r\n ],\r\n standalone: false\r\n})\r\nexport class LastEditedDateFormFieldComponent extends TextInputFormFieldBaseComponent implements OnInit, AfterViewInit {\r\n // Properties\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n @ViewChild('gridOnlyTextArea') gridOnlyTextAreaElement: ElementRef;\r\n private currentUser: CurrentUser;\r\n /**\r\n * User configurable properties that appear in the drawer for this field\r\n */\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.MAX_LENGTH\r\n ];\r\n\r\n private readonly validationOptions: ValidationInfo[] =\r\n [\r\n {\r\n DISPLAY_NAME: 'None',\r\n IS_CUSTOM_REGULAR_EXPRESSION: false,\r\n REGULAR_EXPRESSION: null,\r\n ERROR_MESSAGE: null\r\n },\r\n ];\r\n\r\n public constructor(private rendererParam: Renderer2) {\r\n super(rendererParam);\r\n this.matInputId = this.generateUniqueId('lastEditedDate');\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n\r\n // Set a default constraint value.\r\n if (this.FormField) {\r\n if (!this.FormField.constraintName) {\r\n this.FormField.constraintName = \"None\";\r\n }\r\n }\r\n\r\n let hshOnInitProperties = this.getProperties();\r\n this.onInit.emit(hshOnInitProperties);\r\n\r\n return;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // Note: this is where a @ViewChild() definition should be resolved.\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let validationNames: string[] = [];\r\n for (let iValidation: number = 0; iValidation < this.validationOptions.length; iValidation++) {\r\n let validationInfo: ValidationInfo = this.validationOptions[iValidation];\r\n\r\n validationNames.push(validationInfo.DISPLAY_NAME);\r\n }\r\n\r\n let hshOnInitProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n constraintNames: validationNames,\r\n customRegexConstraintName: 'Custom Regular Expression'\r\n };\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 190;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshOnInitProperties;\r\n }\r\n\r\n // Override the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (LastEditedDateFormFieldComponent);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n //**Display the last edited date*/\r\n public get LastEditedDate(): string {\r\n let currentDate: Date = new Date();\r\n const datePipe = new DatePipe('en-US');\r\n const formattedDate = datePipe.transform(currentDate, 'yyyy-MM-dd HH:mm:ss') || '';\r\n\r\n return formattedDate.toString();\r\n }\r\n\r\n public get ReadOnly(): boolean {\r\n /***This field should always be Readonly*/\r\n let bResult: boolean = true;\r\n\r\n return bResult;\r\n }\r\n\r\n protected setDefaultTextValue(): void {\r\n //***No Default Value will be used outside of the current user*/\r\n }\r\n\r\n // Override methods defined in my base class.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // Use a base class method to\r\n // set up a decimal form group.\r\n this.setupTextFormControl();\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //This will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n }\r\n }\r\n\r\n //***When grid row enters edit mode, display the current date & time*/\r\n let fieldType: string = LastEditedDateFieldType;\r\n if (this.FormField.fieldDefinitionClassName == fieldType)\r\n this.FormControl.setValue(this.LastEditedDate);\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[]): void {\r\n // First call super.\r\n super.buildValidatorFunctionsAndMessages(arrValidatorsParam, arrValidationMessagesParam);\r\n\r\n // If I have a selected validation format, apply it here.\r\n // Note: temporarily using display format as an optional validation format.\r\n if (this.FormField.constraintName && (this.FormField.constraintName.trim() !== '')) {\r\n let arrValidationOption: ValidationInfo[] = this.validationOptions.filter(vi => vi.DISPLAY_NAME === this.FormField.constraintName);\r\n\r\n if (arrValidationOption && (arrValidationOption.length === 1)) {\r\n let validationOption: ValidationInfo = arrValidationOption[0];\r\n\r\n // Don't apply both a named validation and a regular expression.\r\n // A this.FormField.regex expression would have been applied in\r\n // the above call to the base class's method.\r\n if (!this.FormField.regex) {\r\n arrValidatorsParam.push(Validators.pattern(validationOption.REGULAR_EXPRESSION));\r\n\r\n arrValidationMessagesParam.push({ type: 'pattern', message: `${this.DisplayName} ${validationOption.ERROR_MESSAGE}` });\r\n }\r\n }\r\n }\r\n\r\n // Done.\r\n return;\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n
\r\n
{{this.DisplayName}}
\r\n \r\n No checkboxes defined\r\n \r\n\r\n 0)\">\r\n
\r\n \r\n \r\n\r\n {{checkboxData.title}}\r\n\r\n
\r\n    \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
{{this.DisplayName}}
\r\n \r\n No checkboxes defined\r\n \r\n\r\n 0)\">\r\n
\r\n \r\n \r\n \r\n {{checkboxData.title}}\r\n \r\n\r\n
\r\n    \r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport {\r\n NG_VALUE_ACCESSOR,\r\n UntypedFormControl\r\n} from '@angular/forms';\r\n\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport {\r\n ControlType,\r\n FormFieldBaseComponent\r\n} from '../form-field-base/form-field-base.component';\r\nimport { FormField, DisplayFormatEnum } from '../../../models/form-builder/form-field.model';\r\nimport {\r\n FormInstanceElement,\r\n FormInstanceElementValueTypeEnum\r\n} from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { ICheckboxValueChanged, CheckboxData } from '../../../models/checkboxes/checkbox-data.model';\r\n\r\n// Define an internally used interface.\r\n/*\r\ninterface ICheckboxValueChanged {\r\n checkboxValueChanged(index: number, checkboxData: CheckboxData): void;\r\n}\r\n\r\n// Define an internally used class.\r\nclass CheckboxData {\r\n // Properties.\r\n public id: number = 0;\r\n public title: string;\r\n public value: boolean = false;\r\n\r\n private index: number = -1;\r\n private checkboxValueChanged: ICheckboxValueChanged;\r\n private formControl: FormControl;\r\n\r\n // Constructor.\r\n public constructor(indexParam: number,\r\n checkboxValueChangedParam: ICheckboxValueChanged) {\r\n this.index = indexParam;\r\n this.checkboxValueChanged = checkboxValueChangedParam;\r\n\r\n return;\r\n }\r\n\r\n // Getter methods.\r\n public get FormControl(): FormControl {\r\n return (this.formControl);\r\n }\r\n\r\n // Methods.\r\n public setupFormControl(): void {\r\n // Setup my form control.\r\n let hshControlProperties = {\r\n value: this.value,\r\n disabled: false\r\n }\r\n\r\n this.formControl = new FormControl(hshControlProperties);\r\n\r\n // Listen for/subscribe to value changes.\r\n this.formControl.valueChanges\r\n .subscribe(val => {\r\n //this.FormInstanceElement.booleanValue = val;\r\n this.value = val;\r\n\r\n //this.notifyValueChanged();\r\n this.checkboxValueChanged.checkboxValueChanged(this.index, this);\r\n });\r\n\r\n return;\r\n }\r\n}\r\n*/\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-multi-checkbox-form-field',\n templateUrl: './multi-checkbox-form-field.component.html',\n styleUrls: ['./multi-checkbox-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: MultiCheckboxFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class MultiCheckboxFormFieldComponent extends FormFieldBaseComponent\r\n implements OnInit, ICheckboxValueChanged {\r\n // Properties.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.SELECT_OPTIONS,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n DisplayFormatEnum.HORIZONTAL,\r\n DisplayFormatEnum.VERTICAL\r\n ];\r\n\r\n private derivedCheckboxData: CheckboxData[] = [];\r\n private iDerivedCheckboxValueCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Lifecycle methods.\r\n public ngOnInit(): void {\r\n // Output my properties.\r\n let hshProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshProperties);\r\n\r\n // In case we have selected options, try to make sense of our configuration.\r\n if (this.Mode === 'design') {\r\n this.rebuildCheckboxData();\r\n }\r\n\r\n // If my display form is not set, set it to a default.\r\n if ((this.FormField.displayFormat === undefined) ||\r\n (this.FormField.displayFormat === null)) {\r\n this.FormField.displayFormat = DisplayFormatEnum.VERTICAL;\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Implement base class abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n displayFormatValues: this.displayFormats,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n // Need to ask for more display height.\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 100;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return (MultiCheckboxFormFieldComponent);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n // Implement interface ICheckboxValueChanged.\r\n public checkboxValueChanged(index: number, checkboxData: CheckboxData): void {\r\n // Update the corresponding\r\n // child form instance element.\r\n if (!this.FormInstanceElement.childFormInstanceElements ||\r\n (this.FormInstanceElement.childFormInstanceElements.length <= index)) {\r\n let errorMsg: string =\r\n `MultiCheckboxFormFieldComponent.checkboxValueChanged(): ` +\r\n `encountered an unexpected index value of {index} ` +\r\n `for select options '${this.FormField.selectOptions}'.`;\r\n throw (errorMsg);\r\n }\r\n\r\n let childFormInstanceElement: FormInstanceElement =\r\n this.FormInstanceElement.childFormInstanceElements[index];\r\n childFormInstanceElement.BooleanValue = checkboxData.value;\r\n\r\n // Did a user enter this value?\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n this.notifyValueChanged();\r\n\r\n return;\r\n }\r\n\r\n // Handle some form field event methods.\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if ((propertyName == FormFieldPropertyEnum.SELECT_OPTIONS) ||\r\n (propertyName == FormFieldPropertyEnum.ALL)) {\r\n // Set a 'reminder' to rebuild my checkbox titles.\r\n //\r\n // Note: do not want to do this now as it triggers\r\n // an endless loop of Angular callbacks.\r\n setTimeout(() => {\r\n this.rebuildCheckboxData();\r\n }, 0);\r\n }\r\n \r\n return;\r\n }\r\n\r\n // Methods called from my .html file.\r\n public get CheckboxData(): CheckboxData[] {\r\n return (this.derivedCheckboxData);\r\n }\r\n\r\n public get CheckboxValueCount(): number {\r\n return (this.iDerivedCheckboxValueCount);\r\n }\r\n\r\n public getCheckboxFormControl(indexParam: number): UntypedFormControl {\r\n let checkboxFormControl: UntypedFormControl = null;\r\n\r\n if (indexParam < this.iDerivedCheckboxValueCount) {\r\n checkboxFormControl = this.derivedCheckboxData[indexParam].FormControl;\r\n }\r\n\r\n return (checkboxFormControl);\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n // 03-14-2024 note: added this method so it can be called by the field conditional\r\n // logic to indicate that a component's form field has been updated.\r\n\r\n // Make sure the form control's disabled state agrees with the form field's 'isReadOnly' attribute.\r\n //this.toggleFormControlDisabledBasedOnReadOnlyAttribute();\r\n if (this.derivedCheckboxData != null) {\r\n for (let index: number = 0; index < this.derivedCheckboxData.length; index++) {\r\n let formControl: UntypedFormControl = this.getCheckboxFormControl(index);\r\n FormFieldBaseComponent.staticToggleFormControlDisabledBasedOnReadOnlyAttribute(formControl, this.formField);\r\n }\r\n }\r\n this.writeValueTriggered();\r\n }\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n\r\n // Note: this form field does not\r\n // yet handle default values.\r\n\r\n // Set my value type.\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeMultiBoolean;\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.rebuildCheckboxData();\r\n\r\n if (this.derivedCheckboxData &&\r\n (this.derivedCheckboxData.length > 0)) {\r\n for (let iCheckbox: number = 0; iCheckbox < this.derivedCheckboxData.length; iCheckbox++) {\r\n let checkboxData: CheckboxData = this.derivedCheckboxData[iCheckbox];\r\n\r\n checkboxData.setupFormControl();\r\n }\r\n } \r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n\r\n // Note: this form field does not\r\n // yet handle default values.\r\n\r\n // Set my value type.\r\n this.FormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeMultiBoolean;\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.rebuildCheckboxData();\r\n\r\n if (this.derivedCheckboxData &&\r\n (this.derivedCheckboxData.length > 0)) {\r\n for (let iCheckbox: number = 0; iCheckbox < this.derivedCheckboxData.length; iCheckbox++) {\r\n let checkboxData: CheckboxData = this.derivedCheckboxData[iCheckbox];\r\n\r\n checkboxData.setupFormControl(this.FormField.readOnly);\r\n }\r\n } \r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n let value: string = '';\r\n\r\n let selectOptions: string[] = this.SelectOptions;\r\n\r\n if (formInstanceElementParam.childFormInstanceElements &&\r\n (formInstanceElementParam.childFormInstanceElements.length > 0)) {\r\n let iNumValuesSelected: number = 0;\r\n\r\n for (let iChild: number = 0; iChild < formInstanceElementParam.childFormInstanceElements.length; iChild++) {\r\n let child: FormInstanceElement = formInstanceElementParam.childFormInstanceElements[iChild];\r\n\r\n if (!child.isDeleted) {\r\n if ((iChild < selectOptions.length) && (child.booleanValue == true)) {\r\n if (iNumValuesSelected > 0) {\r\n value += ',';\r\n }\r\n\r\n value += selectOptions[iChild];\r\n iNumValuesSelected++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (value);\r\n }\r\n\r\n // Handle control events.\r\n public handleCheckboxModelChange(checkboxIndex: number): void {\r\n return;\r\n }\r\n\r\n // Implement private helper methods.\r\n private rebuildCheckboxData(): void {\r\n this.derivedCheckboxData = null;\r\n this.iDerivedCheckboxValueCount = 0;\r\n\r\n let arrCheckboxTitles: string[] = this.SelectOptions;\r\n\r\n if (arrCheckboxTitles && (arrCheckboxTitles.length > 0)) {\r\n this.derivedCheckboxData = [];\r\n this.iDerivedCheckboxValueCount = 0;\r\n\r\n // We have some additional work to\r\n // do in preview and instance modes.\r\n let bPreviewOrInstanceMode = ((this.Mode === 'preview') || (this.Mode === 'instance'));\r\n\r\n if (bPreviewOrInstanceMode) {\r\n if (!this.FormInstanceElement.childFormInstanceElements)\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n }\r\n\r\n for (let iCheckbox: number = 0; iCheckbox < arrCheckboxTitles.length; iCheckbox++) {\r\n let checkboxTitle = arrCheckboxTitles[iCheckbox];\r\n\r\n let checkboxData: CheckboxData = new CheckboxData(iCheckbox, this);\r\n checkboxData.title = checkboxTitle;\r\n checkboxData.value = false;\r\n\r\n // If the last value is a blank, do not add it.\r\n let bIsLastValue: boolean = (iCheckbox === arrCheckboxTitles.length - 1);\r\n\r\n if (bIsLastValue && ((!checkboxTitle) || (checkboxTitle.trim() === ''))) \r\n continue;\r\n\r\n // Save the checkbox configuration.\r\n this.derivedCheckboxData.push(checkboxData);\r\n this.iDerivedCheckboxValueCount++;\r\n\r\n // We have some additional work to do in preview and instance modes.\r\n if (bPreviewOrInstanceMode) {\r\n let childFormInstanceElement: FormInstanceElement = null;\r\n\r\n if (this.FormInstanceElement.childFormInstanceElements.length > iCheckbox) {\r\n childFormInstanceElement = this.FormInstanceElement.childFormInstanceElements[iCheckbox];\r\n\r\n checkboxData.id = childFormInstanceElement.id;\r\n if (childFormInstanceElement.booleanValue === true) {\r\n checkboxData.value = true;\r\n } else {\r\n checkboxData.value = false;\r\n }\r\n } else {\r\n childFormInstanceElement = new FormInstanceElement();\r\n childFormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeBoolean;\r\n childFormInstanceElement.BooleanValue = false;\r\n\r\n this.FormInstanceElement.childFormInstanceElements.push(childFormInstanceElement);\r\n }\r\n } // if-else\r\n } // for\r\n } // if\r\n\r\n return;\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n {{this.DropDownOptionsFormControl.value.length}} of {{this.DropDownOptions.length}} selected\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n {{dropDownOption}}\r\n \r\n \r\n\r\n \r\n \r\n {{selected}}\r\n cancel\r\n \r\n \r\n Remove All\r\n \r\n \r\n\r\n \r\n
\r\n\r\n\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n","import {\r\n Component, EventEmitter, OnInit, Output, Renderer2, Type as AngularCoreType,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {\r\n UntypedFormControl, NG_VALUE_ACCESSOR\r\n} from '@angular/forms';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { IAutoCompleteItemData } from '../../../interfaces/iautocomplete-item-data.interface';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport {\r\n FormInstanceElement,\r\n FormInstanceElementValueTypeEnum\r\n} from '../../../models/form-builder/form-instance-element.model';\r\nimport { AutocompleteComponent } from '../../autocomplete/autocomplete.component';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormModeEnum } from '../../../enums/form-mode.enum';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-multi-drop-down-form-field',\n templateUrl: './multi-drop-down-form-field.component.html',\n styleUrls: ['./multi-drop-down-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: MultiDropDownFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class MultiDropDownFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n @Output() onInit = new EventEmitter();\r\n // Added for bug fix ticket - VNEXT-1590\r\n @Output() mimickedNgModelChange = new EventEmitter();\r\n\r\n @ViewChild('multidropdownauto') autoCompleteObject: AutocompleteComponent;\r\n @ViewChild('multiSelect') multiSelect;\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.SELECT_OPTIONS,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.AUTOCOMPLETE, //VNEXT-384: KLW - Implementing Autocomplete \r\n FormFieldPropertyEnum.AUTOCOMPLETE_STARTSWITH, //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n FormFieldPropertyEnum.AUTOCOMPLETE_CONTAINS, //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n FormFieldPropertyEnum.REQUIRED, //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n private dropDownOptionsFormControl: UntypedFormControl = null;\r\n private derivedDropDownOptions: string[] = [];\r\n private _autoCompleteItemDataOptions: string[] = [];\r\n private selectionsOpen: boolean = false;\r\n\r\n private readonly placeholderSelectOption: string = 'Set up options using properties';\r\n\r\n // Constructor.\r\n public constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Lifecycle methods.\r\n public ngOnInit(): void {\r\n // Output my properties to my containing component.\r\n let hshProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshProperties);\r\n\r\n // First setup my drop-down options.\r\n this.rebuildDropDownOptionsData();\r\n\r\n // Now setup my form control.\r\n //KLW - Do NOT remove or move this, this is required for the form field to show properly in the form template design\r\n //DO NOT MOVE OR DELETE this.setupFormControl() in ngOnInit!!!!\r\n this.setupFormControl();\r\n\r\n return;\r\n }\r\n\r\n // Implement base class abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldProperties,\r\n\r\n propertyUpdateRequired: true\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return (MultiDropDownFormFieldComponent);\r\n }\r\n\r\n public get DropDownOptions(): string[] {\r\n return (this.derivedDropDownOptions);\r\n }\r\n\r\n public get DropDownOptionsFormControl(): UntypedFormControl {\r\n return (this.dropDownOptionsFormControl);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n\r\n public get ShowRemoveAll(): boolean {\r\n\r\n //if (this.DropDownOptionsFormControl.value != null)\r\n // return this.DropDownOptionsFormControl.value.length > 0;\r\n //else\r\n // false;\r\n\r\n return false;\r\n }\r\n\r\n public get DropDownReadyToDisplay(): boolean {\r\n let bReady: boolean = (this.dropDownOptionsFormControl !== null);\r\n\r\n return (bReady);\r\n }\r\n\r\n\r\n public onRemove(option: string) {\r\n const options = this.dropDownOptionsFormControl.value as string[];\r\n this.removeFirst(options, option);\r\n this.dropDownOptionsFormControl.setValue(options); // To trigger change detection\r\n }\r\n\r\n public removeAllChips() {\r\n this.dropDownOptionsFormControl.setValue([]);\r\n }\r\n\r\n private removeFirst(array: T[], toRemove: T): void {\r\n const index = array.indexOf(toRemove);\r\n if (index !== -1) {\r\n array.splice(index, 1);\r\n }\r\n }\r\n\r\n public selectChange = (event: any) => {\r\n this.DropDownOptionsFormControl.setValue(event);\r\n };\r\n\r\n // Handle some form field event methods.\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if ((propertyName == FormFieldPropertyEnum.SELECT_OPTIONS) ||\r\n (propertyName == FormFieldPropertyEnum.ALL)) {\r\n // Set a 'reminder' to rebuild my checkbox titles.\r\n //\r\n // Note: do not want to do this now as it triggers\r\n // an endless loop of Angular callbacks.\r\n setTimeout(() => {\r\n this.rebuildDropDownOptionsData();\r\n }, 0);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Handle updates made outside the control.\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n /*\r\n if ((this.controlData != null) && (this.controlData.formControl != null))\r\n this.controlData.formControl.setValue(formInstanceElement.textValue);\r\n */\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n // 03-14-2024 note: added this method so it can be called by the field conditional\r\n // logic to indicate that a component's form field has been updated.\r\n\r\n // Make sure the form control's disabled state agrees with the form field's 'isReadOnly' attribute.\r\n this.toggleFormControlDisabledBasedOnReadOnlyAttribute()\r\n }\r\n\r\n public openSelections() {\r\n this.multiSelect.open();\r\n this.selectionsOpen = true;\r\n }\r\n\r\n public get SelectionsOpen() {\r\n return this.selectionsOpen;\r\n }\r\n\r\n public multiSelectBlur() {\r\n this.handleValidationOnBlur();\r\n }\r\n\r\n public multiSelectClosed() {\r\n this.selectionsOpen = false;\r\n }\r\n\r\n public multiSelectOpened() {\r\n this.selectionsOpen = true;\r\n }\r\n\r\n public closeSelections() {\r\n this.multiSelect.close();\r\n this.selectionsOpen = false;\r\n }\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n\r\n // Note: this form field does not\r\n // yet handle default values. \r\n\r\n\r\n // Rebuild my select options data.\r\n this.rebuildDropDownOptionsData();\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.setupFormControl();\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n if (this.mode != FormModeEnum.DESIGN) {\r\n this.controlData.formControl.markAsTouched();\r\n }\r\n\r\n //VNEXT-384: KLW - Implementing Autocomplete\r\n if (this.autoCompleteObject != null)\r\n if (this.SelectOptions != null) {\r\n\r\n var toPass: IAutoCompleteItemData[] = [];\r\n\r\n this.SelectOptions.forEach(option => {\r\n\r\n if (this._autoCompleteItemDataOptions.includes(option)) {\r\n toPass.push({ item: option, selected: true } as IAutoCompleteItemData);\r\n }\r\n });\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.autoCompleteObject.setIsRequired(this.FormField.required);\r\n this.autoCompleteObject.setData(toPass);\r\n this.autoCompleteObject.setFIE_ID(this.formField.id);\r\n this.autoCompleteObject.setHasStartsWith(this.formField.autocomplete_StartsWith);\r\n this.autoCompleteObject.setHasContains(this.formField.autocomplete_Contains);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n\r\n // Note: this form field does not\r\n // yet handle default values. \r\n\r\n\r\n // Rebuild my select options data.\r\n this.rebuildDropDownOptionsData();\r\n\r\n // Setup my Reactive Forms data structure.\r\n this.setupFormControl();\r\n\r\n\r\n //VNEXT-384: KLW - Implementing Autocomplete\r\n if (this.autoCompleteObject != null)\r\n if (this.SelectOptions != null) {\r\n\r\n var toPass: IAutoCompleteItemData[] = [];\r\n\r\n this.SelectOptions.forEach(option => {\r\n\r\n if (this._autoCompleteItemDataOptions.includes(option)) {\r\n toPass.push({ item: option, selected: true } as IAutoCompleteItemData);\r\n }\r\n });\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n this.autoCompleteObject.setIsRequired(this.FormField.required);\r\n this.autoCompleteObject.setData(toPass);\r\n this.autoCompleteObject.setFIE_ID(this.formField.id);\r\n this.autoCompleteObject.setHasStartsWith(this.formField.autocomplete_StartsWith);\r\n this.autoCompleteObject.setHasContains(this.formField.autocomplete_Contains);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n let value: string = '';\r\n\r\n if (formInstanceElementParam.childFormInstanceElements &&\r\n (formInstanceElementParam.childFormInstanceElements.length > 0)) {\r\n let iNumValuesSelected: number = 0;\r\n\r\n for (let iChild: number = 0; iChild < formInstanceElementParam.childFormInstanceElements.length; iChild++) {\r\n let child: FormInstanceElement = formInstanceElementParam.childFormInstanceElements[iChild];\r\n\r\n if (!child.isDeleted) {\r\n if (iNumValuesSelected > 0) {\r\n value += ',';\r\n }\r\n\r\n value += child.textValue;\r\n iNumValuesSelected++;\r\n }\r\n }\r\n }\r\n\r\n return (value);\r\n }\r\n\r\n public handleSelectionChange() {\r\n this.getFormInstanceElement().UserUpdatedData = true;\r\n }\r\n\r\n private formGroupName: string = 'MultiSelect_Control';\r\n\r\n // Implement private helper methods.\r\n private setupFormControl(): void {\r\n // Parse/package existing data, if any.\r\n var astrExistingValues: string[] = []; //['Apple', 'Orange'];\r\n\r\n if (this.FormInstanceElement) {\r\n if (this.FormInstanceElement.childFormInstanceElements &&\r\n (this.FormInstanceElement.childFormInstanceElements.length > 0)) {\r\n for (let iChild: number = 0; iChild < this.FormInstanceElement.childFormInstanceElements.length; iChild++) {\r\n let childFormInstanceElement: FormInstanceElement =\r\n this.FormInstanceElement.childFormInstanceElements[iChild];\r\n\r\n astrExistingValues.push(childFormInstanceElement.textValue);\r\n this._autoCompleteItemDataOptions.push(childFormInstanceElement.textValue);\r\n }\r\n }\r\n }\r\n\r\n // Setup/configure my form control.\r\n let hshControlProperties = {\r\n value: astrExistingValues,\r\n disabled: this.ReadOnly //false\r\n }\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n // this.createFormGroup(this.formGroupName, hshControlProperties);\r\n // this.dropDownOptionsFormControl = this.controlData.formGroup.get(this.formGroupName);\r\n\r\n this.setupMultiSelectFormGroup('MultiSelect_Control', hshControlProperties);\r\n this.dropDownOptionsFormControl = this.controlData.formGroup.get('MultiSelect_Control');\r\n\r\n //let hey = new FormControl(hshControlProperties);\r\n\r\n // If we are in preview or instance mode,\r\n // listen for/subscribe to value changes.\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n this.dropDownOptionsFormControl.valueChanges\r\n .subscribe(astrValues => {\r\n this.processSelectedValues(astrValues);\r\n }); // subscribe \r\n }\r\n\r\n return;\r\n }\r\n\r\n //VNEXT-384: KLW - Implementing Autocomplete\r\n private processSelectedValues(passedValues: string[]) {\r\n //console.log(\"Need to code this block ...\");\r\n // Rebuild my child form instance elements\r\n // based on the current selections.\r\n if (!this.FormInstanceElement.childFormInstanceElements) {\r\n this.FormInstanceElement.childFormInstanceElements = [];\r\n }\r\n\r\n // See if any existing child elements\r\n // need to be marked as deleted.\r\n for (let iChildElement: number = 0;\r\n iChildElement < this.FormInstanceElement.childFormInstanceElements.length;\r\n iChildElement++) {\r\n let childFormInstanceElement: FormInstanceElement =\r\n this.FormInstanceElement.childFormInstanceElements[iChildElement];\r\n\r\n let arrFoundValue: string[] =\r\n passedValues.filter(v => v == childFormInstanceElement.textValue);\r\n let bValueFound: boolean = (arrFoundValue && (arrFoundValue.length == 1));\r\n\r\n if (!bValueFound) {\r\n childFormInstanceElement.isDeleted = true;\r\n }\r\n }\r\n\r\n // For any child element marked as deleted\r\n // that does not have an Id, just remove it.\r\n this.FormInstanceElement.childFormInstanceElements =\r\n this.FormInstanceElement.childFormInstanceElements\r\n .filter(fie => (fie.id > 0) || (!fie.isDeleted));\r\n\r\n // Update or add each value in the control.\r\n if (passedValues && (passedValues.length > 0)) {\r\n for (let iValue: number = 0; iValue < passedValues.length; iValue++) {\r\n let strValue: string = passedValues[iValue];\r\n\r\n // See if this value already exists\r\n // as a child form instance element.\r\n let arrExistingChildFormInstanceElement: FormInstanceElement[] =\r\n this.FormInstanceElement.childFormInstanceElements.filter(fie => fie.textValue == strValue);\r\n\r\n if (arrExistingChildFormInstanceElement?.length == 1) {\r\n let existingChildFormInstanceElement: FormInstanceElement =\r\n arrExistingChildFormInstanceElement[0];\r\n\r\n existingChildFormInstanceElement.isDeleted = false;\r\n } else {\r\n let childFormInstanceElement = new FormInstanceElement();\r\n childFormInstanceElement.ValueType = FormInstanceElementValueTypeEnum.TypeText;\r\n childFormInstanceElement.TextValue = strValue;\r\n\r\n this.FormInstanceElement.childFormInstanceElements.push(childFormInstanceElement);\r\n } // if-else\r\n } // for\r\n } // if\r\n\r\n // Did a user enter this value?\r\n if (!this.FormInstanceElement.transientInSetupFlag) {\r\n // A user entered this value.\r\n //this.FormInstanceElement.transientValueSetFlag = true;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.userEnteredValue();\r\n }\r\n\r\n\r\n let hashWithFormFieldAndFormInstanceElement = {\r\n formField: this.FormField,\r\n formInstanceElement: this.FormInstanceElement\r\n };\r\n\r\n // Added for VNEXT-1590 which reported a bug in which childFormInstanceValues\r\n // were not longer getting sent to the server for multi-select flex fields in\r\n // Grids. My guess is it's something to do with the upgrade to Angular 19 but long\r\n // and short of it is that FormFieldWrapper was not emitting mimickedNgModelChange\r\n // for multi selects, but it was for single selects. So here the event is emitted\r\n this.mimickedNgModelChange.emit(hashWithFormFieldAndFormInstanceElement);\r\n\r\n return;\r\n }\r\n\r\n //VNEXT-539: KLW - Used for allowing required for multi select and auto complete\r\n protected userEnteredValue() {\r\n if (this.controlData.formControl.errors) {\r\n if (this.FormInstanceElement.childFormInstanceElements != null) {\r\n if (this.FormInstanceElement.childFormInstanceElements.length > 0) {\r\n this.controlData.formControl.setErrors({ 'required': false });\r\n }\r\n else {\r\n this.controlData.formControl.setErrors({ 'required': true });\r\n }\r\n }\r\n }\r\n }\r\n\r\n private rebuildDropDownOptionsData(): void {\r\n this.derivedDropDownOptions = [];\r\n\r\n // Evaulate select options.\r\n let arrDropDownOptions: string[] = this.SelectOptions;\r\n\r\n //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n if (!this.formField.autocomplete) {\r\n if (arrDropDownOptions && arrDropDownOptions.length > 0) {\r\n for (let iOption: number = 0; iOption < arrDropDownOptions.length; iOption++) {\r\n let dropDownOption: string = arrDropDownOptions[iOption];\r\n\r\n // If the last value is\r\n // a blank, do not add it.\r\n let bIsLastValue: boolean = (iOption === arrDropDownOptions.length - 1);\r\n\r\n if (bIsLastValue &&\r\n ((!dropDownOption) || (dropDownOption.trim() === ''))) {\r\n continue;\r\n }\r\n\r\n this.derivedDropDownOptions.push(dropDownOption);\r\n }\r\n } else {\r\n // Add a placeholder select option.\r\n this.derivedDropDownOptions.push(this.placeholderSelectOption);\r\n }\r\n }\r\n\r\n // If we are in preview or instance\r\n // mode, we have more work to do.\r\n /*\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n // TO DO: CODE THIS BLOCK.\r\n }\r\n */\r\n\r\n\r\n return;\r\n }\r\n}\r\n","import { Component, Renderer2, Output, EventEmitter, } from '@angular/core';\r\n\r\nimport { NumericInputFormFieldBaseComponent } from './num-input-form-field-base.component';\r\n//import { IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\n//import { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\n//import { InputFormFieldBaseComponent } from '../input-form-field-base/input-form-field-base.component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\n\r\n@Component({\n selector: 'app-decimal-input-form-field-base',\n templateUrl: './num-input-form-field-base.component.html',\n styleUrls: ['./num-input-form-field-base.component.scss'],\n standalone: false\n})\r\nexport abstract class DecimalInputFormFieldBaseComponent extends NumericInputFormFieldBaseComponent {\r\n // Properties.\r\n @Output() onInit = new EventEmitter();\r\n\r\n protected readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.MIN_VALUE,\r\n FormFieldPropertyEnum.MAX_VALUE,\r\n FormFieldPropertyEnum.SHOW_PREVIEW,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n // Constructor.\r\n public constructor(protected renderer: Renderer2) {\r\n super(renderer);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Implement methods common to form field component classes that use FormInstanceElement property 'textValue'.\r\n public pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n elementWrapper.formInstanceElement.decimalValue = parseFloat(value);\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeDecimal;\r\n elementWrapper.standinDisplayValue = elementWrapper.formInstanceElement.decimalValue.toString();\r\n }\r\n\r\n // Handle updates made outside the control.\r\n public formInstanceElementUpdated(formInstanceElement: FormInstanceElement): void {\r\n if ((this.controlData != null) && (this.controlData.formControl != null))\r\n this.controlData.formControl.setValue(formInstanceElement.decimalValue);\r\n }\r\n\r\n // Override base class methods.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n if (this.FormInstanceElement.UserUpdatedData != true) {\r\n this.setDefaultDecimalValue();\r\n }\r\n\r\n // Use a base class method to set up a decimal form group.\r\n this.setupDecimalFormControl();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultDecimalValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n let strValue: string = (formInstanceElementParam.decimalValue ?\r\n new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(formInstanceElementParam.decimalValue) :\r\n '');\r\n\r\n return strValue;\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n elementWrapper.formInstanceElement.decimalValue = parseFloat(value);\r\n elementWrapper.formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeDecimal;\r\n elementWrapper.standinDisplayValue = elementWrapper.formInstanceElement.decimalValue.toString();\r\n }\r\n\r\n // Override other base class methods.\r\n public hasNumericData(): boolean {\r\n return (true);\r\n }\r\n public getNumericValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): number {\r\n //if (!formInstanceElementParam.transientValueSetFlag) {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultDecimalValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n return (formInstanceElementParam.decimalValue ? formInstanceElementParam.decimalValue : 0);\r\n }\r\n\r\n // Protected methods.\r\n protected removeAnyExtraDigitsAfterDecimalPoint(value: string): string {\r\n let result: string = value;\r\n\r\n let numberParts: string[] = value.split('.');\r\n if (numberParts.length == 2) {\r\n let digitsAfterDecimalPoint: string = numberParts[1].trim();\r\n\r\n if (digitsAfterDecimalPoint.length > this.FormField.numDigitsAfterDecimalPoint) {\r\n digitsAfterDecimalPoint = digitsAfterDecimalPoint.substring(0, this.FormField.numDigitsAfterDecimalPoint);\r\n\r\n result = `${numberParts[0]}.${digitsAfterDecimalPoint}`;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n Renderer2,\r\n AfterViewInit\r\n} from '@angular/core';\r\n\r\n//import { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { InputFormFieldBaseComponent } from '../input-form-field-base/input-form-field-base.component';\r\n\r\n@Component({\n selector: 'app-numeric-input-form-field-base',\n templateUrl: './num-input-form-field-base.component.html',\n styleUrls: ['./num-input-form-field-base.component.scss'],\n standalone: false\n})\r\nexport abstract class NumericInputFormFieldBaseComponent extends InputFormFieldBaseComponent implements AfterViewInit {\r\n // Properties.\r\n // None at this time.\r\n\r\n // Constructor.\r\n constructor(protected renderer: Renderer2) {\r\n super(renderer);\r\n\r\n return;\r\n }\r\n\r\n // Implement methods available to derived classes.\r\n //\r\n // Note: the following methods have to be public\r\n // as they are called from .html code.\r\n public get ShowFormattedValue(): boolean {\r\n //return (this.bShowFormattedValue);\r\n return (this.FormField ? this.FormField.showPreview : false);\r\n }\r\n\r\n public get DesignModePreviewValue(): string {\r\n let previewValue: string = this.DefaultValue;\r\n\r\n if (previewValue == '') {\r\n previewValue = '0';\r\n }\r\n\r\n return (previewValue);\r\n }\r\n\r\n public get DesignModeOuterDivCssClass(): string {\r\n let cssClassName: string = null;\r\n\r\n if (this.HasTooltipText) {\r\n if (this.ShowFormattedValue) {\r\n cssClassName = 'design-mode-with-tooltip-with-formatted-value-div';\r\n } else {\r\n cssClassName = 'design-mode-with-tooltip-without-formatted-value-div';\r\n }\r\n } else {\r\n if (this.ShowFormattedValue) {\r\n cssClassName = 'design-mode-with-formatted-value-div';\r\n } else {\r\n cssClassName = 'design-mode-without-formatted-value-div';\r\n }\r\n }\r\n\r\n return (cssClassName);\r\n }\r\n\r\n public get PreviewInstanceModesOutDivCssClass(): string {\r\n let cssClassName: string = null;\r\n\r\n if (this.HasTooltipText) {\r\n if (this.ShowFormattedValue) {\r\n cssClassName = 'input-with-tooltip-with-formatted-value-div';\r\n } else {\r\n cssClassName = 'input-with-tooltip-without-formatted-value-div';\r\n }\r\n } else {\r\n if (this.ShowFormattedValue) {\r\n cssClassName = 'input-with-formatted-value-div';\r\n } else {\r\n cssClassName = 'input-without-formatted-value-div';\r\n }\r\n }\r\n\r\n return (cssClassName);\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n {{this.DisplayName}} *\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\n\r\n// 10-23-2020 note: this component class is now only used, at times, \r\n// during development, as it has been supplanted\r\n// with component class RichTextFormField.\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-paragraph-form-field',\n templateUrl: './paragraph-form-field.component.html',\n styleUrls: ['./paragraph-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: ParagraphFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class ParagraphFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.MAX_LENGTH,\r\n FormFieldPropertyEnum.REGEX,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n // Constructor.\r\n constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n //component: this,\r\n //formField: this.formField,\r\n //properties: this.formFieldNames,\r\n\r\n //'requiredPreviewInstanceModesHeight': 150,\r\n //'requiredPreviewInstanceModesHeightUnit': 'px'\r\n };\r\n hshProperties[FormFieldOnInitPropertyEnum.COMPONENT] = this;\r\n hshProperties[FormFieldOnInitPropertyEnum.FORM_FIELD] = this.formField;\r\n hshProperties[FormFieldOnInitPropertyEnum.PROPERTIES] = this.formFieldProperties;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 150;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\r\n /*\r\n if (this.Mode === FormFieldMode.DESIGN) {\r\n this.onInit.emit({ formField: this.formField, properties: this.formFieldNames });\r\n }\r\n */\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n protected formInstanceElementReceived(): void {\r\n if (this.Mode === 'design') {\r\n if ((this.FormField.displayRows === undefined) || (this.FormField.displayRows === null) || (this.FormField.displayRows.trim() === '')) {\r\n this.FormField.displayRows = '4';\r\n }\r\n } else if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n this.setDefaultTextValue();\r\n\r\n // Use a base class method to\r\n // set up a decimal form group.\r\n this.setupTextFormControl();\r\n\r\n if ((this.FormField.displayRows === undefined) || (this.FormField.displayRows === null) || (this.FormField.displayRows.trim() === '')) {\r\n this.FormField.displayRows = '5';\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if (this.Mode === 'design') {\r\n if ((this.FormField.displayRows === undefined) || (this.FormField.displayRows === null) || (this.FormField.displayRows.trim() === '')) {\r\n this.FormField.displayRows = '4';\r\n }\r\n } else if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n // this.setDefaultTextValue();\r\n\r\n // Use a base class method to\r\n // set up a decimal form group.\r\n // this.setupTextFormControl();\r\n\r\n this.SetupFormControlFromWriteValue();\r\n\r\n if ((this.FormField.displayRows === undefined) || (this.FormField.displayRows === null) || (this.FormField.displayRows.trim() === '')) {\r\n this.FormField.displayRows = '5';\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (ParagraphFormFieldComponent);\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n
\r\n
\r\n
{{DisplayName}} *
\r\n \r\n\r\n \r\n \r\n \r\n\r\n 0)\">\r\n
\r\n \r\n \r\n 0) && (!this.IsVertical)\">   \r\n 0) && (this.IsVertical)\">
\r\n \r\n {{strRadioButton}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{{DisplayName}} *
\r\n \r\n \r\n \r\n 0) && (!this.IsVertical)\">   \r\n 0) && (this.IsVertical)\">
\r\n\r\n \r\n {{strRadioButton}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
{{DisplayName}}

\r\n This control has no radio buttons defined\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n//import { FormFieldMode } from '../form-field-mode.enum';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField, DisplayFormatEnum } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngMode)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-radio-buttons-form-field',\n templateUrl: './radio-buttons-form-field.component.html',\n styleUrls: ['./radio-buttons-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: RadioButtonsFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class RadioButtonsFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n //VNEXT-561: KLW - Needed for form group\r\n private formGroupName: string = 'radio_buttons_form';\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.SELECT_OPTIONS,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n DisplayFormatEnum.HORIZONTAL,\r\n DisplayFormatEnum.HORIZONTALTABS,\r\n DisplayFormatEnum.VERTICAL,\r\n ];\r\n\r\n // Constructor.\r\n constructor(private renderer: Renderer2) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshEventProperties = {\r\n component: this,\r\n formField: this.formField,\r\n properties: this.formFieldProperties,\r\n displayFormatValues: this.displayFormats\r\n };\r\n\r\n return (hshEventProperties);\r\n }\r\n\r\n // Sets the active tab based on underlying radio button selection\r\n public selectedTabIndex() {\r\n let selectedTabName = this.FormInstanceElement.textValue;\r\n let indexOfSelectedTab = this.SelectOptions.indexOf(selectedTabName);\r\n return indexOfSelectedTab;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n let hshEventProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshEventProperties);\r\n\r\n return;\r\n }\r\n\r\n // HTML accessor methods.\r\n public get NoRadioButtonsConfiguredMessage(): string {\r\n let message: string =\r\n 'No radio buttons defined: click the pencil icon to configure this control';\r\n\r\n return (message);\r\n }\r\n\r\n public get DefaultRadioButtonValue(): string {\r\n let strDefaultText: string = '';\r\n\r\n if (this.FormField &&\r\n (this.FormField.defaultValue !== undefined) &&\r\n (this.FormField.defaultValue !== null) &&\r\n (this.FormField.defaultValue.trim() !== '')) {\r\n strDefaultText = this.FormField.defaultValue;\r\n }\r\n\r\n return (strDefaultText);\r\n }\r\n\r\n public set DefaultRadioButtonValue(strValue: string) {\r\n // Note: this method is a NOOP on purpose.\r\n\r\n return;\r\n }\r\n\r\n public get IsVertical(): boolean {\r\n return (this.FormField.displayFormat === DisplayFormatEnum.VERTICAL);\r\n }\r\n\r\n public get UseHorizontalTabFormat(): boolean {\r\n return (this.FormField.displayFormat === DisplayFormatEnum.HORIZONTALTABS);\r\n }\r\n\r\n // Handle getting this field's form instance element.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n //if (this.FormInstanceElement.transientValueSetFlag != true) {\r\n //VNEXT-561: KLW - Remove default value\r\n if (this.FormInstanceElement.UserUpdatedData != true) {\r\n this.setDefaultTextSelectValue();\r\n }\r\n\r\n // Use a base class method to\r\n // set up a textual form group.\r\n this.setupTextFormGroup('radio_buttons_form');\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormGroupFromWriteValue(this.formGroupName);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Override notifyValueChanged.\r\n protected notifyValueChanged(): void {\r\n super.notifyValueChanged();\r\n\r\n super.handleOnBlur();\r\n }\r\n\r\n public radioTabClick(event: any) {\r\n if (event.index > -1) {\r\n this.FormGroup.controls['radio_buttons_form'].setValue(this.SelectOptions[event.index]);\r\n }\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField,\r\n formInstanceElementParam: FormInstanceElement,\r\n gridRow: IGridRow,\r\n processingPhase: FormFieldProcessingPhaseEnum): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n //formInstanceElementParam.textValue = '';\r\n this.setDefaultTextSelectValue();\r\n\r\n formInstanceElementParam.TextValue = this.FormInstanceElement.textValue;\r\n }\r\n\r\n // NOTE: NEED TO REVISIT THIS.\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (RadioButtonsFormFieldComponent);\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Renderer2,\r\n Output,\r\n EventEmitter,\r\n Type as AngularCoreType\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\n//import { FormFieldPropertyEnum } from '../../form-builder/properties/form-field-properties/form-field-properties.component';\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\n\r\n@Component({\n selector: 'app-raw-html-form-field',\n templateUrl: './raw-html-form-field.component.html',\n styleUrls: ['./raw-html-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: RawHtmlFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class RawHtmlFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Properties.\r\n // Note: several properties are implemented in my base class.\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldNames: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.HTML_TEXT\r\n ]\r\n\r\n private testHTML: string = \"The Tortoise & and the Hare.\";\r\n\r\n // Constructor.\r\n constructor(private renderer: Renderer2)\r\n {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\r\n //this.onInit.emit({ component: this, formField: this.formField, properties: this.formFieldNames });\r\n let hshProperties = this.getProperties();\r\n this.onInit.emit(hshProperties);\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldNames\r\n };\r\n\r\n return (hshProperties);\r\n }\r\n\r\n // Accessor methods.\r\n public get HTML(): string {\r\n //return this.testHTML;\r\n return (this.FormField.htmlText != null ? this.FormField.htmlText : '*** Enter text to configure this field ***');\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n // NOTE: NEED TO REVISIT THIS.\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override a method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (RawHtmlFormFieldComponent);\r\n }\r\n}\r\n","\r\n
\r\n","\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n {{this.DisplayName}}\r\n \r\n \r\n {{this.DisplayName}} *\r\n \r\n\r\n \r\n History\r\n \r\n \r\n\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n {{versionToShow.getExtraInfo()}}\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, Type as AngularCoreType, ViewEncapsulation } from '@angular/core';\r\nimport { AbstractControl, AsyncValidatorFn, NG_VALUE_ACCESSOR, ValidationErrors } from '@angular/forms';\r\nimport { AsyncSubject, Observable, Subject } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElementForHistory } from '../../../models/form-builder/form-instance-element-for-history.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { FormInstanceService } from '../../../services/form-instance.service';\r\nimport { ExportDataService } from '../../../services/export-data.service';\r\nimport { ButtonConfig } from '../../list-view/list-view-button-config.model';\r\nimport { ControlType, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\nimport { AsyncJobService } from '../../../services/async-job.service';\r\nimport { AsyncJob } from '../../../models/async-job.model';\r\n\r\n@Component({\n selector: 'app-rich-text-form-field',\n templateUrl: './rich-text-form-field.component.html',\n styleUrls: ['./rich-text-form-field.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: RichTextFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class RichTextFormFieldComponent extends FormFieldBaseComponent implements OnInit {\r\n // Instance data.\r\n @Input() showHistoryLink: boolean = true;\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.MAX_LENGTH,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT,\r\n FormFieldPropertyEnum.READ_ONLY,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\r\n // Added to convert KendoEditor's HTML to XHTML so publishing won't be broken\r\n private domParser: DOMParser = new DOMParser();\r\n private xmlSerializer: XMLSerializer = new XMLSerializer();\r\n private initialHtmlValue: string;\r\n\r\n private editor: any;\r\n private editorSubject: Subject = new AsyncSubject();\r\n private readonly basic: string = 'bold italic underline superscript';\r\n private readonly bullets: string = 'bullist outdent indent';\r\n private readonly TOOLBARS: any = {\r\n \"Simple Text\": this.basic,\r\n \"Simple Text with Bullets\": `${this.basic} | ${this.bullets}`,\r\n \"Just Bullets\": this.bullets,\r\n \"Rich Text\": `${this.basic} subscript strikethrough fontselect formatselect forecolor | \r\n alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | \r\n table delete_col delete_row col_after col_before row_after row_before | undo redo | hr link`\r\n }\r\n\r\n private readonly displayFormats: string[] =\r\n [\r\n 'Simple Text With Bullets',\r\n 'Simple Text'\r\n ];\r\n\r\n private simpleText: string = 'bold italic underline';\r\n private simpleTextWithBullets: string = 'undo redo | bold italic underline | bullist numlist';\r\n private selectedToolbar = this.simpleTextWithBullets;\r\n\r\n // Constructor.\r\n\r\n public constructor(\r\n private formInstanceService: FormInstanceService = null,\r\n private exportDataService: ExportDataService = null,\r\n private asyncJobService: AsyncJobService = null) {\r\n super();\r\n\r\n return;\r\n }\r\n\r\n public getEditorCssDefaults(): string {\r\n return `\r\n .k-content {\r\n font-family:Arial;\r\n }`\r\n };\r\n\r\n // STUFF FOR HISTORY\r\n showHistory: boolean;\r\n showComparison: boolean;\r\n private listItems: any[];\r\n private buttonConfig = {\r\n right: [\r\n new ButtonConfig('Compare Selected', 'compare'),\r\n new ButtonConfig('Close History', 'close')\r\n ],\r\n item_actions: []\r\n };\r\n\r\n public get ShowHistoryLink() {\r\n return this.showHistoryLink && !this.ShowHistory && this.mode != 'design';\r\n }\r\n public get ListItems() {\r\n return this.listItems;\r\n }\r\n public get ButtonConfig() {\r\n return this.buttonConfig;\r\n }\r\n public get FormInstanceElementForHistory() {\r\n let ret = new FormInstanceElementForHistory();\r\n ret.id = this.FormInstanceElement.id;\r\n ret.formInstanceId = this.FormInstanceElement.formInstanceId;\r\n return ret;\r\n }\r\n\r\n // Handle control events.\r\n public doOnButtonClick(event): void {\r\n console.log(event);\r\n if (event.button == 'close') {\r\n this.showHistory = false;\r\n this.showComparison = false;\r\n } else if (event.button == 'compare') {\r\n this.showComparison = true;\r\n }\r\n }\r\n public onHistoryClick(event): void {\r\n this.formInstanceService.getFormInstanceElementHistory(this.FormInstanceElement.id).then(elements => {\r\n this.listItems = elements;\r\n this.showHistory = true;\r\n });\r\n }\r\n\r\n public exportRichTextHistoryClicked() {\r\n this.exportDataService.exportRichTextHistoryAsExcelSpreadsheet(this.FormInstanceElement.id).then(asyncJob => {\r\n this.asyncJobService.monitorJobUntilCompletion(asyncJob, 250, this.openExcelHistory);\r\n });\r\n }\r\n\r\n private openExcelHistory = (asyncJob: AsyncJob, successFlag: boolean) => {\r\n let downloadFileName: string = `rich_text_history_${this.FormField.id}_data.xlsx`;\r\n let downloadFileURL: string = this.exportDataService.getResultFileDownloadUrl(asyncJob, downloadFileName);\r\n\r\n window.open(downloadFileURL, '_blank');\r\n }\r\n\r\n public onVersionRestore(event: FormInstanceElementForHistory): void {\r\n this.initialHtmlValue = event.value;\r\n this.FormInstanceElement.textValue = event.value;\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n this.showHistory = false;\r\n this.versionToShow = null;\r\n }\r\n public versionToShow: FormInstanceElementForHistory;\r\n public onViewVersion(event: FormInstanceElementForHistory): void {\r\n this.versionToShow = event;\r\n }\r\n public onCloseHistory(event: any): void {\r\n this.showHistory = false;\r\n this.versionToShow = null;\r\n }\r\n public get ShowHistory(): boolean {\r\n return this.showHistory;\r\n }\r\n public set ShowHistory(val: boolean) {\r\n this.showHistory = val;\r\n }\r\n public get ShowComparison() {\r\n return this.showComparison;\r\n }\r\n public get VersionToShow(): FormInstanceElementForHistory {\r\n return this.versionToShow;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshOnInitProperties = {\r\n };\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.COMPONENT] = this;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.FORM_FIELD] = this.FormField;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.PROPERTIES] = this.formFieldProperties;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.DISPLAY_FORMAT_VALUES] = Object.keys(this.TOOLBARS);\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.PROPERTY_UPDATE_REQUIRED] = true;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 150;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return (hshOnInitProperties);\r\n }\r\n\r\n // Override/implement the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (RichTextFormFieldComponent);\r\n }\r\n\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n // Implement Angular life cycle methods.\r\n public ngOnInit(): void {\r\n this.initRichTextControl();\r\n\r\n // Set a default constraint value.\r\n if (this.FormField) {\r\n if (!this.FormField.constraintName) {\r\n this.FormField.constraintName = \"None\";\r\n }\r\n }\r\n\r\n // Assemble my proeprties hash.\r\n // USED IN NGIFs in FORM FIELD PROPERTIES\r\n let hshOnInitProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshOnInitProperties);\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if (propertyName === 'displayFormat') {\r\n this.initRichTextControl();\r\n } else if (propertyName == 'placeholderText') {\r\n this.editor.setContent(this.FormField.placeholderText);\r\n }\r\n }\r\n\r\n // Can be deleted\r\n //public handleEditorInit(e: any) {\r\n // this.editor = e.editor;\r\n // this.editorSubject.next(this.editor);\r\n // this.editorSubject.complete();\r\n\r\n // if (this.editor.getContent() == '' && this.FormField.placeholderText != null) {\r\n // this.editor.setContent(this.FormField.placeholderText);\r\n // }\r\n //}\r\n\r\n public initRichTextControl(): void {\r\n this.selectedToolbar = this.TOOLBARS[this.FormField.displayFormat];\r\n if (this.selectedToolbar == null) {\r\n this.selectedToolbar = this.TOOLBARS[\"Simple Text with Bullets\"];\r\n }\r\n }\r\n\r\n public includeSimpleTextButtons(): boolean {\r\n return !this.FormField.displayFormat ||\r\n ['Simple Text', 'Simple Text with Bullets', 'Rich Text'].indexOf(this.FormField.displayFormat) > -1;\r\n }\r\n\r\n public includeBulletButtons(): boolean {\r\n return !this.FormField.displayFormat ||\r\n ['Just Bullets', 'Simple Text with Bullets', 'Rich Text'].indexOf(this.FormField.displayFormat) > -1;\r\n }\r\n\r\n public includeAllButtons(): boolean {\r\n return ['Rich Text'].indexOf(this.FormField.displayFormat) > -1;\r\n }\r\n\r\n protected notifyValueChanged(): void {\r\n super.notifyValueChanged();\r\n\r\n if ((this.FormControl != null) && (this.FormInstanceElement != null))\r\n this.FormInstanceElement.textValue = this.convertToXHTML(this.FormControl.value);\r\n }\r\n\r\n public formFieldUpdated(): void {\r\n // 03-14-2024 note: added this method so it can be called by the field conditional\r\n // logic to indicate that a component's form field has been updated.\r\n\r\n // Make sure the form control's disabled state agrees with the form field's 'isReadOnly' attribute.\r\n let savedValue: string = this.FormInstanceElement.textValue; // 03-20-2025 note: added this line and the line after the next, original line, to restore the field's text value after applying any attribute updates.\r\n // 03-20-2025 note: when the field's Reactive Form control is manipulated, it must be causing a side effect that, e.g., a call to a listener,\r\n // that is causing the form instance element's text value to get overwritten. \r\n this.toggleFormControlDisabledBasedOnReadOnlyAttribute(); // 03-20-2025 note: something in this line is clobbering the form instance element's text value.\r\n this.FormInstanceElement.textValue = savedValue; // 03-20-2025 note: restored the saved value.\r\n }\r\n\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.setupTextFormControl();\r\n }\r\n }\r\n }\r\n\r\n // Note: This is not using Reactive Forms currently\r\n public get HtmlValue(): string {\r\n if (!this.initialHtmlValue) {\r\n this.initialHtmlValue = this.FormInstanceElement?.textValue;\r\n }\r\n return this.initialHtmlValue;\r\n }\r\n\r\n public set HtmlValue(value: string) {\r\n if (this.FormInstanceElement != null) {\r\n this.FormInstanceElement.textValue = this.convertToXHTML(value);;\r\n }\r\n }\r\n\r\n // Convert Kendo Editor's HTML into XHTML (Has to be XHTML for Doc Publishing)\r\n private convertToXHTML(html: string) {\r\n let xhtml = \"\";\r\n // DOMParser.parseFromString() creates a full HTML doc but we only want the childen of the tag\r\n var nodes = Array.from(this.domParser.parseFromString(html, 'text/html').body.children);\r\n for (let node of nodes) {\r\n // serialize each node, removing any namespaces (which mess up stylesheets' processing of the resulting XHTML)\r\n xhtml += this.xmlSerializer.serializeToString(node)?.replace(/xmlns=\"[^\"]+\"/, '');\r\n }\r\n\r\n this.FormInstanceElement.UserUpdatedData = true;\r\n\r\n return xhtml;\r\n }\r\n\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n }\r\n }\r\n }\r\n\r\n // Added for VNEXT-1355 to override call to base class saveData() which undoes the essential work of this.convertToXHTML()\r\n public saveData(formInstance: any): void {\r\n // NOOP by design\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n // Set a default value.\r\n if (formInstanceElementParam.textValue == null) formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public pseudoStatic_pasteValue(value: string, elementWrapper: GridFormInstanceElementWrapper, formField: FormField): void {\r\n TextInputFormFieldBaseComponent.pasteValue(value, elementWrapper);\r\n }\r\n\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n if (formInstanceElementParam.textValue == null) formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return formInstanceElementParam.textValue;\r\n }\r\n\r\n // 04-05-2022 note: added the method implementation/override.\r\n public get substantivelyChangedLogicApplies(): boolean {\r\n return true;\r\n }\r\n\r\n // Override\r\n // For maxLength property it returns an asynchronous validator function\r\n // according to expectations of Angular's FormControl component used in\r\n // reactive forms\r\n // https://www.tiny.cloud/blog/angular-rich-text-editor/\r\n // https://angular.io/guide/form-validation#async-validation\r\n protected asyncValidatorFn(validationPropertyName: string, formField: FormField): AsyncValidatorFn {\r\n if (validationPropertyName == 'maxLength') {\r\n let fn = (control: AbstractControl): Observable => {\r\n return this.editorSubject.pipe(\r\n map(editor => {\r\n let characterCount = editor.plugins.wordcount.body.getCharacterCount();\r\n let maxLength = formField.maxLength;\r\n\r\n if (characterCount > maxLength) {\r\n return {\r\n maxlength: {\r\n requiredLength: maxLength,\r\n actualLength: characterCount\r\n }\r\n }\r\n } else {\r\n return null;\r\n }\r\n })\r\n );\r\n };\r\n return fn;\r\n }\r\n };\r\n}\r\n","\r\n\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n
{{this.DisplayName}} *
\r\n \r\n
\r\n\r\n \r\n \r\n {{this.DisplayName}} *\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ComponentFactoryResolver, ViewContainerRef, Renderer2, Type as AngularCoreType, ViewEncapsulation, ViewChild, ElementRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { FormBuilder, FormGroup, FormControl, Validators, ValidatorFn } from '@angular/forms'; // Used for Reactive Forms\r\nimport { ControlType, ValidationInfo, ValidationMessageInfo, FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { TextInputFormFieldBaseComponent } from '../input-form-field-base/text-input-form-field-base.component';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\n\r\n// Note: please note the 'providers' definition below, as it is needed.\r\n// Without it, you will get the following exception:\r\n//\r\n// No value accessor for form control with unspecified name\r\n//\r\n// The above exception gets thrown when a component, in this case our\r\n// base class, implements interface 'ControlValueAccessor' and does not\r\n// provide the 'providers' definition below. Implementing the\r\n// 'ControlValueAccessor' interface allows a form field component to\r\n// support [(ngModel)], so users of the component can use [(ngModel)].\r\n@Component({\n selector: 'app-short-text-form-field',\n templateUrl: './short-text-form-field.component.html',\n styleUrls: ['./short-text-form-field.component.scss', '../form-fields.scss'],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: ShortTextFormFieldComponent,\n multi: true\n }\n ],\n standalone: false\n})\r\nexport class ShortTextFormFieldComponent extends TextInputFormFieldBaseComponent implements OnInit, AfterViewInit {\r\n // Properties.\r\n // Note: inputs have been moved into my base class.\r\n\r\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.REQUIRED,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH,\r\n FormFieldPropertyEnum.BLANK_VALUE,\r\n FormFieldPropertyEnum.HELP_TEXT,\r\n FormFieldPropertyEnum.PLACEHOLDER_TEXT,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.DEFAULT_VALUE,\r\n FormFieldPropertyEnum.MAX_LENGTH,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT, // NOTE: temporarily using display format to display optional validations.\r\n FormFieldPropertyEnum.CONSTRAINT,\r\n FormFieldPropertyEnum.REGEX,\r\n FormFieldPropertyEnum.READ_ONLY,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT\r\n ];\r\n\r\n private readonly validationOptions: ValidationInfo[] =\r\n [\r\n {\r\n DISPLAY_NAME: 'None',\r\n IS_CUSTOM_REGULAR_EXPRESSION: false,\r\n REGULAR_EXPRESSION: null,\r\n ERROR_MESSAGE: null\r\n },\r\n {\r\n DISPLAY_NAME: 'Email',\r\n IS_CUSTOM_REGULAR_EXPRESSION: false,\r\n REGULAR_EXPRESSION: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$/,\r\n ERROR_MESSAGE: 'must contain a valid email address'\r\n },\r\n {\r\n DISPLAY_NAME: 'Phone Number',\r\n IS_CUSTOM_REGULAR_EXPRESSION: false,\r\n REGULAR_EXPRESSION: /^[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$/,\r\n ERROR_MESSAGE: 'must contain a phone number in NNN-NNN-NNNN format'\r\n },\r\n {\r\n DISPLAY_NAME: 'Custom Regular Expression',\r\n IS_CUSTOM_REGULAR_EXPRESSION: true,\r\n REGULAR_EXPRESSION: null,\r\n ERROR_MESSAGE: 'must adhere to the configured regular expression constraint'\r\n }\r\n ];\r\n\r\n @ViewChild('gridOnlyTextArea') gridOnlyTextAreaElement: ElementRef;\r\n\r\n // Constructor.\r\n constructor(rendererParam: Renderer2) {\r\n super(rendererParam);\r\n\r\n this.matInputId = this.generateUniqueId('shortText');\r\n\r\n return;\r\n }\r\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let validationNames: string[] = [];\r\n for (let iValidation: number = 0; iValidation < this.validationOptions.length; iValidation++) {\r\n let validationInfo: ValidationInfo = this.validationOptions[iValidation];\r\n\r\n validationNames.push(validationInfo.DISPLAY_NAME);\r\n }\r\n\r\n let hshOnInitProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n constraintNames: validationNames,\r\n customRegexConstraintName: 'Custom Regular Expression'\r\n };\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 190;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshOnInitProperties;\r\n }\r\n\r\n // Override the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return (ShortTextFormFieldComponent);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n // Set a default constraint value.\r\n if (this.FormField) {\r\n if (!this.FormField.constraintName) {\r\n this.FormField.constraintName = \"None\";\r\n }\r\n }\r\n\r\n let hshOnInitProperties = this.getProperties();\r\n\r\n this.onInit.emit(hshOnInitProperties);\r\n\r\n return;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // Note: this is where a @ViewChild() definition should be resolved.\r\n }\r\n\r\n public get NumGridOnlyTextAreaRows(): string {\r\n // Note: if property this.gridOnlyTextAreaElement is resolved, use it.\r\n let numRowsText: string = '2';\r\n\r\n return numRowsText;\r\n }\r\n\r\n // Override methods defined in my base class.\r\n protected formInstanceElementReceived(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n // If I have no value assigned but\r\n // have a default value, apply it now.\r\n this.setDefaultTextValue();\r\n\r\n // Use a base class method to\r\n // set up a decimal form group.\r\n this.setupTextFormControl();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-561: KLW - Implement the first instance of writeValueTrigger which will eventually replace formInstanceElementReceived\r\n protected writeValueTriggered(): void {\r\n if ((this.Mode === 'preview') || (this.Mode === 'instance')) {\r\n if (this.ControlType === ControlType.REACTIVE_FORMS) {\r\n this.SetupFormControlFromWriteValue();\r\n } // if (this.controlType === ControlType.REACTIVE_FORMS)\r\n } // if ((this.Mode === 'preview') || (this.Mode === 'instance'))\r\n\r\n return;\r\n }\r\n\r\n // Override the getDisplayValue() base class method.\r\n // Define a method that allows a component to return its display value.\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n // Override\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[]): void {\r\n // First call super.\r\n super.buildValidatorFunctionsAndMessages(arrValidatorsParam, arrValidationMessagesParam);\r\n\r\n // If I have a selected validation format, apply it here.\r\n // Note: temporarily using display format as an optional validation format.\r\n if (this.FormField.constraintName && (this.FormField.constraintName.trim() !== '')) {\r\n let arrValidationOption: ValidationInfo[] = this.validationOptions.filter(vi => vi.DISPLAY_NAME === this.FormField.constraintName);\r\n\r\n if (arrValidationOption && (arrValidationOption.length === 1)) {\r\n let validationOption: ValidationInfo = arrValidationOption[0];\r\n\r\n // Don't apply both a named validation and a regular expression.\r\n // A this.FormField.regex expression would have been applied in\r\n // the above call to the base class's method.\r\n if (!this.FormField.regex) {\r\n arrValidatorsParam.push(Validators.pattern(validationOption.REGULAR_EXPRESSION));\r\n\r\n arrValidationMessagesParam.push({ type: 'pattern', message: `${this.DisplayName} ${validationOption.ERROR_MESSAGE}` });\r\n }\r\n }\r\n }\r\n\r\n // Done.\r\n return;\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n\r\n {{this.DescriptiveDisplayName}}\r\n\r\n \r\n \r\n
\r\n

{{this.ConfigurationHintText}}

\r\n
\r\n \r\n
\r\n \r\n Configured Roles:{{this.ConfiguredRoleNames}}\r\n \r\n\r\n \r\n Nesting Level: {{this.ConditionalNestingLevel}}\r\n \r\n
\r\n
\r\n
\r\n\r\n","import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ComponentFactoryResolver, ViewContainerRef, Renderer2, Type as AngularCoreType, forwardRef } from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormFieldBaseComponent } from '../form-field-base/form-field-base.component';\r\nimport { ShowToFieldType } from '../../../models/form-builder/form-field-types';\r\nimport { StringUtil } from '../../../utility-classes/string.util';\r\n\n@Component({\n selector: 'app-show-to-hide-from',\n templateUrl: './show-to-hide-from.component.html',\n styleUrls: ['./show-to-hide-from.component.scss', '../form-fields.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: ShowToHideFromComponent,\n multi: true\n }\n ],\n standalone: false\n})\nexport class ShowToHideFromComponent extends FormFieldBaseComponent implements OnInit, AfterViewInit {\n // Properties.\r\n // Output(s).\r\n @Output() onInit = new EventEmitter();\r\n\r\n // Read only properties.\r\n protected readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.NAME,\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.FIELD_GROUP,\r\n FormFieldPropertyEnum.DISPLAY_FORMAT, // NOTE: temporarily using display format to display optional validations.\r\n FormFieldPropertyEnum.ROLE_NAMES\r\n ];\r\n\r\n // Additional properties.\r\n private isShowTo: boolean; // Otherwise it is a \"Hide From\".\r\n //private specifiedRoleNames: string[] = []; // If this contains one or more role names, this field's conditional logic is operable.\r\n\r\n //private matchingBeginOrEndField: FormField = null;\r\n\r\n // Constructor.\n public constructor(private renderer: Renderer2) {\r\n super();\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n // Determine whether this field is a \"Show To\" or a \"Hide From\" conditional.\r\n this.isShowTo = (this.FormField.fieldDefinitionClassName == ShowToFieldType);\r\n\r\n // Emit my properties.\r\n let hshOnInitProperties = this.getProperties();\r\n this.onInit.emit(hshOnInitProperties);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n return;\r\n }\n\r\n // Implement abstract methods.\r\n public getProperties(): any {\r\n let hshOnInitProperties = {\r\n component: this,\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n\r\n propertyUpdateRequired: this.FormField.isConditionalBeginElement, // Need to update the end field's 'beginFieldName' property.\r\n displayPropertiesEdit: this.FormField.isConditionalBeginElement\r\n };\r\n\r\n return (hshOnInitProperties);\r\n }\r\n\r\n // Override the method used to get my class.\r\n public getFormFieldClass(): AngularCoreType {\r\n return ShowToHideFromComponent;\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n if (propertyName == 'displayName') {\r\n /*\r\n if (this.formField.transientMatchingBeginOrEndField != null)\r\n this.formField.transientMatchingBeginOrEndField.beginFieldName =\r\n (StringUtil.isEmptyString(this.formField.displayName) ? this.formField.name : this.formField.displayName);\r\n */\r\n } else if (propertyName == 'selectedRoleNames') {\r\n //console.log('Check this.formField.selectedRoleNames ...');\r\n }\r\n }\r\n\r\n public get canHaveInstructions(): boolean {\r\n return false;\r\n }\r\n public get canHaveFieldConditionalLogic(): boolean {\r\n return false;\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public get FieldTypeName(): string {\r\n return (this.isShowTo ? 'Show To' : 'Hide From');\r\n }\r\n public get BeginOrEndTag(): string {\r\n return (this.FormField.isConditionalBeginElement ? 'Begin' : 'End');\r\n }\r\n\r\n public get DescriptiveDisplayName(): string {\r\n let name: string = '';\r\n\r\n if (this.FormField.isConditionalBeginElement)\r\n name = `${this.BeginOrEndTag} ${this.FieldTypeName}: ${this.DisplayName}`;\r\n else {\r\n if (this.FormField.transientMatchingBeginOrEndField != null) {\r\n if (!StringUtil.isEmptyString(this.FormField.transientMatchingBeginOrEndField.displayName))\r\n name = `${this.BeginOrEndTag} ${this.FieldTypeName}: ${this.FormField.transientMatchingBeginOrEndField.displayName}`;\r\n else\r\n name = `${this.BeginOrEndTag} ${this.FieldTypeName}: ${this.FormField.transientMatchingBeginOrEndField.name}`;\r\n } else if (this.FormField.transientBeginFieldDisplayName != null) {\r\n name = `${this.BeginOrEndTag} ${this.FieldTypeName}: ${this.FormField.transientBeginFieldDisplayName}`;\r\n } else {\r\n //name = `this.formField.transientMatchingBeginOrEndField is null!`;\r\n if (this.FormField.transientMatchingBeginOrEndField != null)\r\n name = `${this.BeginOrEndTag} ${this.FieldTypeName}: ${this.FormField.transientMatchingBeginOrEndField.name}`;\r\n else\r\n name = 'Matching begin or end field error';\r\n }\r\n } \r\n\r\n return name;\r\n }\r\n\r\n /*\r\n public get HasConditionalExpression(): boolean {\r\n return this.specifiedRoleNames.length > 0;\r\n }\r\n */\r\n\r\n public get ShowConfigurationHint(): boolean {\r\n let show: boolean = (this.FormField.isConditionalBeginElement && StringUtil.isEmptyString(this.FormField.showToHideFromRoleNames));\r\n return show;\r\n }\r\n public get ConfigurationHintText(): string {\r\n let hint: string = `Use properties to configure \"${this.FieldTypeName}\" load options`;\r\n return hint;\r\n }\r\n\r\n public get ShowConfiguredRoleNames(): boolean {\r\n let show: boolean = (this.FormField.isConditionalBeginElement && (!StringUtil.isEmptyString(this.FormField.showToHideFromRoleNames)));\r\n return show;\r\n }\r\n public get ConfiguredRoleNames(): string {\r\n return this.FormField.showToHideFromRoleNames;\r\n }\r\n\r\n public get ConditionalNestingLevel(): number {\r\n return this.FormField.transientConditionalNestingLevel;\r\n }\r\n public get IndentationStyle(): string {\r\n let indentationStyle: string = '';\r\n\r\n if (this.FormField.transientConditionalNestingLevel > 1)\r\n indentationStyle = `margin-left: ${(this.FormField.transientConditionalNestingLevel - 1) * 20}px`;\r\n\r\n return indentationStyle;\r\n }\r\n\r\n public get DebugMode(): boolean {\r\n return false;\r\n }\r\n\r\n // Helper methods.\r\n // No helper methods so far.\n}\n","\r\n \r\n\r\n\r\n \r\n\r\n","import { Component, EventEmitter, OnInit, Output, Type as AngularCoreType, } from '@angular/core';\nimport { ValidatorFn, AsyncValidatorFn } from '@angular/forms';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { IFieldNameToFormField } from '../../../interfaces/iform-field-component';\r\nimport { FormFieldPropertyEnum } from '../../../models/form-builder/form-field-property-enum.model';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { FormFieldBaseComponent, ValidationMessageInfo } from '../form-field-base/form-field-base.component';\n\n@Component({\n selector: 'app-url-builder-form-field',\n templateUrl: './url-builder-form-field.component.html',\n styleUrls: ['./url-builder-form-field.component.scss'],\n standalone: false\n})\nexport class UrlBuilderFormFieldComponent extends FormFieldBaseComponent implements OnInit {\n @Output() onInit = new EventEmitter();\r\n\r\n private readonly formFieldProperties: string[] =\r\n [\r\n FormFieldPropertyEnum.DISPLAY_NAME,\r\n FormFieldPropertyEnum.TOOL_TIP,\r\n FormFieldPropertyEnum.URL_BUILDER,\r\n FormFieldPropertyEnum.URL_BUILDER_LABEL,\r\n FormFieldPropertyEnum.INSTRUCTIONS_TEXT,\r\n FormFieldPropertyEnum.GRID_COLUMN_WIDTH\r\n ];\r\n\n constructor() {\r\n super();\r\n }\n\n public ngOnInit(): void {\r\n this.onInit.emit(this.getProperties());\n }\r\n\r\n public getFormFieldClass(): AngularCoreType {\r\n return UrlBuilderFormFieldComponent;\r\n }\r\n\r\n protected writeValueTriggered(): void {\r\n super.writeValueTriggered();\r\n }\r\n\r\n protected buildValidatorFunctionsAndMessages(\r\n arrValidatorsParam: ValidatorFn[],\r\n arrValidationMessagesParam: ValidationMessageInfo[],\r\n arrAsyncValidatorsParam?: AsyncValidatorFn[]): void {\r\n }\r\n\r\n public receiveFormFieldNames(formFieldNamesParam: string[], hshColNameToFormFieldParam: IFieldNameToFormField): void {\r\n }\r\n\r\n public propertyUpdated(formField: FormField, propertyName: string): void {\r\n }\r\n\r\n public requiresFieldValueUpdate(): boolean {\r\n return true;\r\n }\r\n\r\n public formFieldValueUpdated(iColIndex: number, formFieldParam: FormField, formInstanceElement: FormInstanceElement, gridRow: IGridRow): boolean {\r\n return false;\r\n }\r\n\r\n public pseudoStatic_getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): string {\r\n return 'pseudoStatic_getDisplayValue';\r\n }\r\n\r\n public getProperties(): any {\r\n let hshEventProperties = {\r\n component: this,\r\n displayFormatValues: [],\r\n formField: this.FormField,\r\n properties: this.formFieldProperties,\r\n formFieldNamesRequired: false,\r\n formFieldValueUpdatesRequired: false,\r\n propertyUpdateRequired: false\r\n };\r\n\r\n return (hshEventProperties);\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return false;\r\n }\r\n\r\n public get ButtonLabel(): string {\r\n let label = this.formField.transientUrlBuilderButtonLabel?.trim();\r\n if (label) {\r\n return label;\r\n } else {\r\n return 'Open';\r\n }\r\n }\n\n}\n","import { DropEvent } from '../../../shared/external-libraries/ng-drag-drop/shared/drop-event.model';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\n\r\nexport class ListItemMoveData {\r\n\r\n private movedItems: IListItem[];\r\n private targetOfMove: IListItem;\r\n private reorder: boolean;\r\n\r\n public constructor(movedItems: IListItem[], targetOfMove: IListItem, reorder: boolean = false) {\r\n this.movedItems = movedItems;\r\n this.targetOfMove = targetOfMove;\r\n this.reorder = reorder;\r\n }\r\n\r\n public get MovedItems(): IListItem[] {\r\n return this.movedItems;\r\n }\r\n\r\n public get TargetOfMove(): IListItem {\r\n return this.targetOfMove;\r\n }\r\n\r\n public get Reorder(): boolean {\r\n return this.reorder;\r\n }\r\n\r\n public get MovedItemsNames(): string[] {\r\n let retVal: string[] = [];\r\n if (this.movedItems && this.movedItems.length > 0) {\r\n retVal = this.movedItems.map(x => x.name);\r\n }\r\n return retVal;\r\n }\r\n\r\n public get NothingMoved(): boolean {\r\n return this.movedItems == null || this.movedItems.length == 0;\r\n }\r\n}\r\n","import { SelectionModel } from '@angular/cdk/collections';\r\nimport { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { count } from 'rxjs/operators';\r\nimport { IFilesDroppedOnStructure } from '../../../../views/site/structure/structure.file-drop.event';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../../dialogs/confirmation/confirmation-dialog.component';\r\nimport { MoveListItemDialog } from '../../../dialogs/move-list-item/move-list-item.dialog';\r\nimport { ConfirmationDialogEnums } from '../../../enums/confirmation-dialog.enum';\r\nimport { DragDropEnum } from '../../../enums/drag-drop.enum';\r\nimport { ItemTypeEnum } from '../../../enums/item-type.enum';\r\nimport { IItem } from '../../../interfaces/iitem.interface';\r\nimport { IListItem } from '../../../interfaces/ilist-item.interface';\r\nimport { Folder } from '../../../models/site-content/folder.model';\r\nimport { FormInstance } from '../../../models/site-content/form-instance.model';\r\nimport { DragDropService } from '../../../services/drag-drop.service';\r\nimport { UtilityHelper } from '../../../utility.helper';\r\nimport { IButtonConfig } from '../list-view-button-config.model';\r\nimport {\r\n ListItemDragActionData, ListItemDragActionEnum\r\n} from '../list-view-drag-action.model';\r\nimport { ListItemMoveData } from '../list-view-item-move-action';\r\nimport { ListViewHelper } from '../list-view.helper';\r\n\r\n\r\n@Component({\n selector: 'app-base-view',\n templateUrl: './base-view.component.html',\n styleUrls: ['./base-view.component.scss'],\n standalone: false\n})\r\nexport class BaseViewComponent implements OnInit, OnChanges {\r\n // Inputs.\r\n @Input() list: IListItem[];\r\n @Input() filterTerm: string; // used to filter the list\r\n @Input() parentTitle: string;\r\n @Input() listType: string;\r\n @Input() currentFolder: Folder;\r\n @Input() totalListCount: number;\r\n\r\n // Sorting related inputs/properties\r\n @Input() typeSortOrderConfig: string[];\r\n // pjh - when adding a new type of IListItem, need to add it to typeSortOrder\r\n // TODO: refactor this, ListView shouldn't need to know anything about the things its listing out\r\n // when viewing multiple entities in the same view some should display before others - this structure determines that order\r\n @Input() typeSortOrder: string[] = [\r\n ItemTypeEnum.FOLDER,\r\n ItemTypeEnum.FORM_INSTANCE,\r\n ItemTypeEnum.WORKFLOW,\r\n ItemTypeEnum.FORM,\r\n ItemTypeEnum.ATTACH_W_URLS,\r\n ItemTypeEnum.DATACOLLECTION,\r\n ItemTypeEnum.DOCUMENT_PUBLISH_SETTINGS,\r\n ItemTypeEnum.FORM_INSTANCE_ELEMENT_FOR_HISTORY,\r\n ItemTypeEnum.LOG_MESSAGE,\r\n ItemTypeEnum.NOTIFICATION,\r\n ItemTypeEnum.SUBSCRIPTION\r\n ];\r\n @Input() sortDirection: string; // does it make sense to have it here -- won't it vary Tile vs. Grid view\r\n @Input() defaultSortColumn: string = 'position'; // if no sort is specified, this property will be sorted by. \r\n private sortableColumns: string[] = ['id', 'position', 'name', 'description', 'modifiedDate', 'modifiedBy', 'status'];\r\n\r\n // ----- IMPORTANT! -----\r\n // To get the correct selected/not-selected styling on icons/rows, make certain that you are setting < app - list - view[selectedItemId]=\"\" > correctly.\r\n // When it's null, the non-selected styling will be applied, and when it's a valid ListItem id, the selected formatting will be applied \r\n @Input() selectedItemId: number;\r\n @Input() selectedItemActionId: string; // a combination of entity id and type and action btn\r\n @Input() itemActionButtons: IButtonConfig[]; // icons that appear on each row/tile\r\n @Input() listItemsAreDraggable: boolean = false;\r\n\r\n @Output() editClick: EventEmitter = new EventEmitter();\r\n @Output() itemActionClick: EventEmitter = new EventEmitter();\r\n @Output() itemContextMenu: EventEmitter = new EventEmitter();\r\n @Output() dragAction: EventEmitter = new EventEmitter();\r\n @Output() filesDropped: EventEmitter = new EventEmitter();\r\n @Output() itemMoved: EventEmitter = new EventEmitter();\r\n @Output() selectionsSet: EventEmitter = new EventEmitter();\r\n\r\n private itemDragDataStart: ListItemDragActionData = null;\r\n private itemDragDataEnd: ListItemDragActionData = null;\r\n\r\n public dragDropService: DragDropService = null;\r\n\r\n private itemBeingDragged: boolean = false;\r\n\r\n // Constructor.\r\n constructor(\r\n public dialog: MatDialog,\r\n public injectedDragDropService: DragDropService) {\r\n this.dragDropService = injectedDragDropService;\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit() {\r\n return;\r\n }\r\n\r\n // listen for changes to @Input() selectedItemId since formatting depends on this property\r\n public ngOnChanges(changes: SimpleChanges) {\r\n if (changes.selectedItemId) {\r\n this.setSelected({ id: changes.selectedItemId.currentValue });\r\n }\r\n }\r\n\r\n // Define methods called by the tile or grid HTML code.\r\n public getItemTitle(item: IListItem): string {\r\n let title: string = item.getTitle();\r\n\r\n return (title);\r\n }\r\n\r\n //KEvin\r\n public isTypeWorkflow(item: IItem): boolean {\r\n return UtilityHelper.isTypeWorkflow(item);\r\n }\r\n\r\n public isTypeFormInstance(item: IItem): boolean {\r\n return UtilityHelper.isTypeFormInstance(item);\r\n }\r\n\r\n public isTypeFolder(item: IItem): boolean {\r\n return UtilityHelper.isTypeFolder(item);\r\n }\r\n\r\n public isTypeAttachment(item: IItem): boolean {\r\n return UtilityHelper.isTypeAttachment(item);\r\n }\r\n\r\n public isTypeBreadcrumb(item: IItem): boolean {\r\n return UtilityHelper.isTypeBreadcrumb(item);\r\n }\r\n\r\n public get ItemIsBeingDraggedBase(): boolean {\r\n return (this.itemBeingDragged);\r\n }\r\n\r\n public get ItemDragDataStart(): ListItemDragActionData {\r\n return this.itemDragDataStart;\r\n }\r\n\r\n //Kevin\r\n public onDragDrop(any, targetOfDrop: IListItem, passedItems: any = null, reorder: boolean = false) {\r\n // pharv -- added for VNEXT-556 -- This method is called from the (onDrop) binding on 's\r\n // AND ALSO from (onDrop) handlers for re-ordering divs. The method is thus called twice\r\n // when a user drops on a reordering zone div, and this code prevents the method executing\r\n // twice in this case\r\n \r\n //Kevin\r\n // let droppedOnElement = dropEvent.nativeEvent.srcElement; \r\n let droppedOnElement = {} as any;\r\n\r\n if (droppedOnElement.className == 'reorder-drop-zone' && !reorder) {\r\n return;\r\n }\r\n\r\n //Kevin\r\n // let droppedItems: IListItem[];\r\n\r\n let droppedItems: IListItem[] = [];\r\n\r\n if (passedItems) {\r\n droppedItems = passedItems;\r\n }\r\n //Kevin\r\n // else if (dropEvent.items) {\r\n // droppedItems = dropEvent.items;\r\n // } \r\n else if (this.itemDragDataStart.items) {\r\n droppedItems = this.itemDragDataStart.items;\r\n }\r\n\r\n if (droppedItems.filter(x => { return x.getId() == targetOfDrop.getId() }).length > 0) return; // don't proceed if the dragged item and the item dropped on are the same\r\n\r\n let itemData: ListItemMoveData = new ListItemMoveData(droppedItems, targetOfDrop, reorder);\r\n\r\n this.itemMoved.emit(itemData);\r\n } \r\n\r\n public allowDrop(ev) { \r\n UtilityHelper.allowDrop(ev);\r\n }\r\n\r\n public dropOnViewWhiteSpace(ev: DragEvent) {\r\n UtilityHelper.allowDrop(ev);\r\n\r\n let folderID = -1;\r\n let siteID = -1;\r\n\r\n if (this.currentFolder)\r\n folderID = this.currentFolder.getId();\r\n\r\n this.uploadDroppedFiles(ev, folderID, siteID);\r\n }\r\n\r\n // Not to be confused with onDragDrop() -- see below\r\n public dropGridOrTileObject(ev: DragEvent, item: IItem) {\r\n UtilityHelper.allowDrop(ev);\r\n\r\n if (this.isTypeFolder(item)) {\r\n this.uploadDroppedFiles(ev, item.getId(), -1);\r\n }\r\n }\r\n\r\n public selectedItems(passedSelectionModel: SelectionModel, passedItem: any = null): IListItem[] {\r\n let retVal: IListItem[] = null;\r\n\r\n if (passedSelectionModel) {\r\n if (passedSelectionModel.selected.length > 0) {\r\n retVal = passedSelectionModel.selected as IListItem[];\r\n }\r\n }\r\n\r\n if (retVal == null) {\r\n retVal = [passedItem] as IListItem[];\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n // Defines the sorting algorithm used by both GridView and ListView.\r\n // It takes into account that the view may be displaying more than one entity, as is the case with the structure screen\r\n public doSortListData(data: IListItem[], sortDirection: string, sortColumn: string = null): IListItem[] {\r\n\r\n let types = [];\r\n let sorted: IListItem[] = data;\r\n let retVal: IListItem[] = [];\r\n \r\n if (sortColumn) {\r\n let findItem = this.sortableColumns.find(x => x == sortColumn);\r\n\r\n if (findItem) {\r\n sorted = [];\r\n\r\n for (let i = 0, max = data.length; i < max; i++) {\r\n let type = data[i].getType();\r\n\r\n if (sorted[type] == undefined) {\r\n sorted[type] = [];\r\n types.push(type);\r\n }\r\n sorted[type].push(data[i]);\r\n }\r\n\r\n this.typeSortOrder.forEach((currentValue) => {\r\n let toConcat = sorted[currentValue];\r\n\r\n if (toConcat) {\r\n this.sortArrayInDirection(toConcat, sortDirection, sortColumn);\r\n\r\n retVal = retVal.concat(toConcat);\r\n }\r\n });\r\n\r\n }\r\n else {\r\n retVal = this.sortArrayInDirection(sorted, sortDirection, sortColumn);\r\n }\r\n }\r\n else {\r\n retVal = this.sortArrayInDirection(sorted, sortDirection, sortColumn);\r\n }\r\n\r\n\r\n return retVal;\r\n }\r\n\r\n public getActionButtonTitle(button: IButtonConfig, item: IListItem): string {\r\n let title = `${button.label} - ${item.name}`;\r\n if (button.isDisabled(item)) {\r\n title = `${title} (Disabled)`\r\n }\r\n return title;\r\n }\r\n\r\n // Called when an icon action on a row or tile is clicked\r\n public onItemActionClick(event: any, item: IListItem, buttonConfig: IButtonConfig): void {\r\n event.stopPropagation();\r\n\r\n if (buttonConfig.isDisabled(item)) return;\r\n\r\n let eventData = { originalEvent: event, item: item, button: buttonConfig };\r\n console.log(eventData);\r\n\r\n if (event instanceof KeyboardEvent) {\r\n return;\r\n }\r\n\r\n this.unsetSelected();\r\n\r\n // 01-08-2021 note: replaced the 'if' statement/block\r\n // with only the code within the block.\r\n //\r\n // Add'l notes: investigated this more and found that\r\n // property 'this.selectedItemId' is getting reset to\r\n // null via a call to ngOnChanges() when a calling\r\n // component, e.g. the StructureComponent, resets the\r\n // selected folder or form instance to null as the\r\n // selected object is an input to this component.\r\n // For StructureComponent, that occurs in method\r\n // deselectSelected(), called when the user clicks on,\r\n // among other options, the 'X' to close the drawer;\r\n // however, if the user uses the keyboard, typing\r\n // 'Escape', to close the drawer, deselectSelected()\r\n // never gets called and the subsequent call to open\r\n // the drawer, e.g. the drawer with folder 'info',\r\n // this method returns null for eventData.item.id,\r\n // causing the call to retrieve the folder's info\r\n // to fail.\r\n //\r\n // As a result of the above notes, I am replacing\r\n // the 'if' block (again) with the single line of\r\n // code to this.setSelected(), make sure this method\r\n // returns a non-null value for eventData.item.id\r\n // pending a conversation with Paul.\r\n /*\r\n if (item.id !== tmpId) {\r\n this.setSelected(item, buttonConfig);\r\n }\r\n */\r\n\r\n this.setSelected(item, buttonConfig);\r\n\r\n item.setId(this.selectedItemId); // this may be null when toggling off\r\n this.itemActionClick.emit(eventData);\r\n }\r\n\r\n public onEditClick(event: any, item: any): void {\r\n event.stopPropagation();\r\n this.editClick.emit({ originalEvent: event, item: item });\r\n }\r\n\r\n //TEAMS-424: KLW - Add in an optional parameter to pass a view's selection of items when then context menu is invoked\r\n public onItemContextMenu(event: any, item: any, selectedItems: any = null): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n let eventData = { originalEvent: event, item: item, selectedItems: selectedItems };\r\n this.itemContextMenu.emit(eventData);\r\n }\r\n\r\n // 05-18-2020 note: changed the protection level on the following method as \r\n // it needs to be accessed from derive classes' .html files.\r\n public generateItemActionId(item: IListItem, button: IButtonConfig) {\r\n return `${item.getId()}-${item.getType()}-${button.value}`;\r\n }\r\n\r\n public onItemDragStart(event: any, items: IListItem[]): void {\r\n this.itemDragDataStart = new ListItemDragActionData();\r\n this.itemDragDataStart.dragEventData = event;\r\n this.itemDragDataStart.items = items;\r\n this.itemDragDataStart.dragAction = ListItemDragActionEnum.DRAG_START;\r\n\r\n this.dragDropService.setItems(event, items);\r\n\r\n this.dragAction.emit(this.itemDragDataStart);\r\n this.itemBeingDragged = true;\r\n\r\n return;\r\n }\r\n\r\n public onItemDragEnd(event: any, items: IListItem[]): void {\r\n this.itemDragDataEnd = new ListItemDragActionData();\r\n this.itemDragDataEnd.dragEventData = event;\r\n this.itemDragDataEnd.items = items;\r\n this.itemDragDataEnd.dragAction = ListItemDragActionEnum.DRAG_END;\r\n\r\n this.dragDropService.setItems(event, items);\r\n\r\n this.dragAction.emit(this.itemDragDataEnd);\r\n this.itemBeingDragged = false;\r\n\r\n return;\r\n }\r\n\r\n // Implement private methods.\r\n\r\n private uploadDroppedFiles(ev: DragEvent, folderId: number, siteId: number) {\r\n if (ev.dataTransfer.files) {\r\n\r\n let files = ev.dataTransfer.files;\r\n if (files.length > 0) {\r\n\r\n let toPass: IFilesDroppedOnStructure = {\r\n Files: Array.from(ev.dataTransfer.files),\r\n FolderId: folderId,\r\n Reload: true,\r\n }\r\n\r\n this.filesDropped.emit(toPass);\r\n }\r\n }\r\n }\r\n\r\n private getFileNames(items: IItem[]): string[] {\r\n let retVal: string[] = [];\r\n\r\n if (items.length > 0) {\r\n retVal = items.map(x => x.name);\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n private setSelected(item: any, button?: IButtonConfig): void {\r\n this.selectedItemId = item.id;\r\n if (button) {\r\n this.selectedItemActionId = this.generateItemActionId(item, button);\r\n }\r\n }\r\n\r\n private unsetSelected(): void {\r\n this.selectedItemId = null;\r\n this.selectedItemActionId = null;\r\n }\r\n\r\n // Returned passedArray sorted accoring to direction and sortColumn\r\n // If direction is neither asc nor desc, the passedArray will be returned in its original order\r\n private sortArrayInDirection(passedArray, direction: string, sortColumn: string): any {\r\n if (sortColumn == ListViewHelper.NO_SORT) {\r\n return passedArray;\r\n }\r\n\r\n if (direction == \"asc\") {\r\n passedArray.sort((a: IListItem, b: IListItem) => {\r\n if (sortColumn == 'status') {\r\n return this.isGreaterThan(a.getStatus(), b.getStatus());\r\n } else if (sortColumn == 'position') {\r\n return this.isGreaterThan(a.getPosition(), b.getPosition());\r\n } else {\r\n return this.isGreaterThan(a[sortColumn], b[sortColumn]);\r\n }\r\n\r\n });\r\n }\r\n\r\n if (direction == \"desc\") {\r\n passedArray.sort((a: IListItem, b: IListItem) => {\r\n if (sortColumn == 'status') {\r\n return this.isGreaterThan(b.getStatus(), a.getStatus());\r\n } else if (sortColumn == 'position') {\r\n return this.isGreaterThan(b.getPosition(), a.getPosition());\r\n } else {\r\n return this.isGreaterThan(b[sortColumn], a[sortColumn]);\r\n }\r\n });\r\n }\r\n\r\n return passedArray;\r\n }\r\n\r\n private isGreaterThan(a, b): number {\r\n if (isNaN(a) || isNaN(b)) {\r\n let aAsLowercaseString = (a + '').toLowerCase();\r\n let bAsLowercaseString = (b + '').toLowerCase();\r\n\r\n return aAsLowercaseString > bAsLowercaseString ? 1 : -1;\r\n } else {\r\n return a > b ? 1 : -1;\r\n }\r\n }\r\n}\r\n","export class CustomColumnProperty {\r\n public id: string;\r\n public propertyName: string;\r\n\r\n // colConfig is a string of the form \"property(PropertyName)\"\r\n constructor(colConfig: string) {\r\n let pattern = /^property\\([a-zA-Z\\t\\s\\-_]+\\)$/;\r\n if (!pattern.test(colConfig)) {\r\n throw `It looks like you used a value in a ColumnsConfig @Input property to with an invalid property format. Expected format: \"${pattern}\". Supplied value: \"${colConfig}\"`;\r\n }\r\n\r\n let propertyName = colConfig.split('(')[1].split(')')[0];\r\n this.propertyName = propertyName;\r\n this.id = colConfig;\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n drag_indicator\r\n \r\n \r\n
\r\n
\r\n
{{GetColumnDisplayName('position')}}\r\n
\r\n
{{row.getPosition()}}
\r\n
\r\n
\r\n
{{GetColumnDisplayName('name') }}
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n {{row.getName()}}\r\n \r\n\r\n \r\n {{row.getName()}}\r\n \r\n\r\n \r\n \r\n \r\n {{btn.iconFor(row)}}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
{{GetColumnDisplayName('description')}} {{row.getExtraInfo()}} {{GetColumnDisplayName('status')}} {{row.getStatus()}} {{GetColumnDisplayName('childCount')}} {{row.getChildCount() > 0 ? row.getChildCount() : ''}} {{GetColumnDisplayName('modifiedBy')}} {{row.getModifiedBy()}} {{GetColumnDisplayName('modifiedDate')}} {{row.getModifiedDate() | date: 'medium'}} {{GetColumnDisplayName('createdByName')}} {{row.createdByName}} {{GetColumnDisplayName('createdDate')}} {{row.createdDate | date: 'medium'}} {{col.propertyName}} {{row.getValue(col.propertyName)}}
\r\n","import { SelectionModel } from '@angular/cdk/collections';\r\nimport { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { IListItem } from '../../../interfaces/ilist-item.interface';\r\nimport { BrowserStorageService } from '../../../services/browserstorage.service';\r\nimport { DragDropService } from '../../../services/drag-drop.service';\r\nimport { ListViewEnum, ListViewHelper } from '../list-view.helper';\r\nimport { BaseViewComponent } from '../base-view/base-view.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { UtilityHelper } from '../../../utility.helper';\r\nimport { CustomColumnProperty } from './extras';\r\nimport { StructureFieldConfig, ConfigureStructureFields } from '../../../models/structure/configure-structure-fields.model';\r\nimport { RoleService } from '../../../services/role.service';\r\nimport { CurrentSiteService } from '../../../services/current-site.service';\r\n\r\n// 07-26-2024 note: export the column names used in this component's grid view.\r\nexport const STRUCTURE_PROPERTY_SELECT = \"select\";\r\nexport const STRUCTURE_PROPERTY_NAME = \"name\";\r\nexport const STRUCTURE_PROPERTY_MODIFIED_DATE = \"modifiedDate\";\r\nexport const STRUCTURE_PROPERTY_MODIFIED_BY = \"modifiedBy\";\r\nexport const STRUCTURE_PROPERTY_TEMPLATE = \"property(Template)\";\r\nexport const STRUCTURE_PROPERTY_STATUS = \"property(Status)\";\r\n// 07-26-2024 note: end export of column names.\r\n\r\n/*\r\n * ----------------------------- NOTE TO DEVELOPERS ----------------------------- \r\n * Customization of Column Headers and Dynamic Property Values\r\n *\r\n * 1) Customization of Column Headers\r\n * When configuring ColumnsConfig on use of a you can specific custom columns headers to be used in place of standard column headers.\r\n *\r\n * For example if you supply this as a ColumnsConfig...\r\n *\r\n * [ColumnsConfig]=\"['select', 'name', 'modifiedDate', 'modifiedBy']\"\r\n * ...you'll get default column headers of \"Name\", \"Modified On\" and \"Modified By\"\r\n * You can configure custom column headers by using a notation of :, for example...\r\n *\r\n * [ColumnsConfig]=\"['select', 'name:Notification Message', 'modifiedDate:Modified', 'modifiedBy:By']\"\r\n * ...would result in column headers of \"Notification Message\", \"On\" and \"By\"\r\n *\r\n * 2) Supplying Dynamic Property Values\r\n * Suppose you are using ListView to display a class called Widget which implements IListItem, and you supply this ColumnsConfig to \r\n *\r\n * [ColumnsConfig]=\"['select', name, 'property(WidgetPurpose)', 'property(WidgetHeight)', 'property(WidgetWidth)', modifiedDate]\"\r\n *\r\n * GridView will iterate over the \"property(x)\" columns producing, in this case, three columns from them.\r\n * It'll use \"x\" as the columm header, and will call getValue(x) on each IListItem to supply values for each column\r\n * \r\n */\r\n\r\nclass UserSiteRoleNamesInfo {\r\n public structureColumnsComputed: boolean = false;\r\n public columnsToDisplay: string[] = [];\r\n\r\n public constructor(public userSiteRoleNamesRetrieved: boolean = false, public userSiteRoleNames: string[] = []) {\r\n }\r\n}\r\n\r\n@Component({\n selector: 'app-grid-view',\n templateUrl: './grid-view.component.html',\n styleUrls: ['./grid-view.component.scss'],\n standalone: false\n})\r\nexport class GridViewComponent extends BaseViewComponent implements OnInit, OnChanges {\r\n // Inputs.\r\n @Input() columnsConfig: string[];\r\n\r\n @Input() hasCheckboxes: boolean = false;\r\n @Input() hideActionButtons: boolean = false;\r\n\r\n @Input() enableInfiniteScrolling: boolean = false; // default is not enabled\r\n\r\n @Input() maxSelection: number = 0; // if zero, there is no limit\r\n\r\n @Input() renderNameAsLink: boolean = true;\r\n\r\n @Input() configuredStructureFields: ConfigureStructureFields;\r\n\r\n @Output() sortChange: EventEmitter = new EventEmitter();\r\n @Output() exceededMaxSelection: EventEmitter = new EventEmitter();\r\n\r\n // Properties.\r\n //TEAMS-424: KLW - Variables for the selection model and last selected row\r\n selection = new SelectionModel(true, []);\r\n lastSelectedRow = null;\r\n hideActionButtonsClass = '';\r\n\r\n //private userSiteRoleNames: string[] = [];\r\n private userSiteRoleNamesInfo: UserSiteRoleNamesInfo = new UserSiteRoleNamesInfo();\r\n\r\n private displayedColumns: string[] = ['select', 'name', 'modifiedDate', 'modifiedBy', 'status']; // set the defaults. Can be overridden by passing columnsConfig @Input param\r\n private columnDisplayNames: any = {\r\n 'select': '',\r\n 'name': 'Name',\r\n 'childCount': 'Forms',\r\n 'modifiedDate': 'Modified On',\r\n 'modifiedBy': 'Modified By',\r\n 'status': 'Status',\r\n 'description': 'Description',\r\n 'createdByName': 'Created By',\r\n 'createdDate': 'Created On',\r\n 'position': 'Published Order'\r\n };\r\n\r\n private dataSource: MatTableDataSource = new MatTableDataSource();\r\n\r\n // Used for the display of the drop zone above and below a row\r\n private idOfRepositionAbove: number;\r\n private idOfRepositionBelow: number;\r\n\r\n // This is the MatSort object associated with the in the template.\r\n // It gets passed to the data source of the grid to inform how it should sort itself\r\n @ViewChild(MatSort, { static: true }) matSort: MatSort;\r\n\r\n // This is our own custom structure. It gets serialized to JSON and stored in\r\n // local storage so we can persist a user's settings across sessions\r\n private savedSort;\r\n\r\n // Constructor.\r\n public constructor(\r\n private localStorageService: BrowserStorageService,\r\n private currentSiteService: CurrentSiteService,\r\n private roleService: RoleService,\r\n public dialog: MatDialog,\r\n public injectedDragDropService: DragDropService) {\r\n super(dialog, injectedDragDropService);\r\n }\r\n\r\n // Begin methods that handle reordering of dragged rows (pharvey for VNEXT-556)\r\n // The idea is that as the user drags over rows in the grid a blue reordering drop zone is displayed making it clear where a row will be go when it's dropped\r\n //\r\n // How this works:\r\n //
's inside the
containing the
which is currently being dragged over...\r\n public getExpandRowForReorderingClass(row: IListItem): string {\r\n let draggedRow = this.ItemDragDataStart?.items[0];\r\n if (draggedRow) {\r\n if (this.rowIsTargetOfReording(row, 'move-above')) {\r\n return \"expand-row-for-reordering\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n }\r\n\r\n // The next two methods Handle the dropping of a row on a
\r\n public onDropOnRepositionAbove(ev: DragEvent, rowBeingDroppedOn: IListItem) {\r\n let offset = (this.ItemDragDataStart.items[0].itemIndex < rowBeingDroppedOn.itemIndex) ? -1 : null;\r\n this.doReordering(ev, rowBeingDroppedOn, offset);\r\n }\r\n public onDropOnRepositionBelow(ev: DragEvent, rowBeingDroppedOn: IListItem) {\r\n let offset = (this.ItemDragDataStart.items[0].itemIndex > rowBeingDroppedOn.itemIndex) ? 1 : null;\r\n this.doReordering(ev, rowBeingDroppedOn, offset);\r\n }\r\n\r\n // Prep the data for a call to the base class's onDragDrop method\r\n private doReordering(ev: DragEvent, rowBeingDroppedOn: IListItem, offset: number) {\r\n if (offset) {\r\n let indexOfOffsetItem = rowBeingDroppedOn.itemIndex + offset;\r\n let offsetRow = this.list.filter(x => { return x.itemIndex == indexOfOffsetItem; })[0];\r\n if (offsetRow)\r\n rowBeingDroppedOn = offsetRow\r\n }\r\n this.onDragDrop({ nativeEvent: ev }, rowBeingDroppedOn, null, true);\r\n this.clearReposition();\r\n }\r\n\r\n // Resets the variables which control whether a reordering dropzone should be displayed or not\r\n public clearReposition() {\r\n this.idOfRepositionAbove = -1;\r\n this.idOfRepositionBelow = -1;\r\n }\r\n\r\n // Handles the somewhat complicated conditions which determine if a reordering dropzone should be displayed or not\r\n private rowIsTargetOfReording(row: IListItem, direction: string): boolean {\r\n if (!this.listItemsAreDraggable) return false;\r\n\r\n let draggedRow = this.ItemDragDataStart?.items[0];\r\n let draggedOverRowIsTargetOfReordering = row.getId() == (direction == 'move-above' ? this.idOfRepositionAbove : this.idOfRepositionBelow);\r\n let draggedAndDraggedOverAreNotTheSame = draggedRow?.getId() != row.getId();\r\n let draggedAndDraggedOverAreOfTheSameType = draggedRow?.getType() == row.getType();\r\n\r\n return draggedOverRowIsTargetOfReordering && draggedAndDraggedOverAreNotTheSame && draggedAndDraggedOverAreOfTheSameType;\r\n }\r\n\r\n // End methods that handle reordering of dragged rows \r\n\r\n // Life cycle methods.\r\n public ngOnInit() {\r\n if (this.columnsConfig != null) {\r\n let columnConfig = [];\r\n\r\n for (let col of this.columnsConfig) {\r\n // col can look like just 'description' or 'description:My Display Name'\r\n let internalAndDisplayName = col.split(':');\r\n let internalName = internalAndDisplayName[0];\r\n columnConfig.push(internalName);\r\n\r\n if (internalAndDisplayName.length == 2) {\r\n let displayName = internalAndDisplayName[1];\r\n this.columnDisplayNames[internalName] = displayName;\r\n }\r\n }\r\n this.displayedColumns = columnConfig;\r\n }\r\n\r\n if (this.typeSortOrderConfig != null) {\r\n this.typeSortOrder = this.typeSortOrderConfig;\r\n }\r\n\r\n this.dataSource.filterPredicate = (data: IListItem, filterValue: string) => {\r\n return !filterValue || data.name.indexOf(filterValue) > -1;\r\n }\r\n\r\n\r\n this.initializeSavedSort();\r\n this.setDataSource();\r\n\r\n if (this.hasCheckboxes)\r\n this.selection = new SelectionModel(true, []);\r\n\r\n if (this.hideActionButtons)\r\n this.hideActionButtonsClass = \"hide-action-buttons\";\r\n\r\n // If we have a configuration that hides at least one field, query the user's roles for the current site.\r\n // If we have a configuration that hides at least one field, query the user's roles for the current site.\r\n if ((this.configuredStructureFields != null) && this.configuredStructureFields.HasAtLeastOneHiddenField) {\r\n this.roleService.getUserSiteRoleNames(this.currentSiteService.Site.id).then(userRoleNames => {\r\n if (userRoleNames != null)\r\n this.userSiteRoleNamesInfo.userSiteRoleNames = userRoleNames;\r\n this.userSiteRoleNamesInfo.userSiteRoleNamesRetrieved = true;\r\n });\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.filterTerm?.currentValue != null) {\r\n this.filterGridData(changes);\r\n } else if (changes.list) {\r\n this.setDataSource();\r\n this.clearSelection();\r\n super.ngOnChanges(changes);\r\n }\r\n }\r\n\r\n public ngDoCheck(): void {\r\n this.selectionsSet.emit(this.selection.selected);\r\n }\r\n\r\n public selectionChange(event: any, row: IListItem) {\r\n if (event) {\r\n this.selection.toggle(row);\r\n\r\n if (this.maxSelection > 0 && this.selection.selected.length > this.maxSelection) {\r\n this.selection.toggle(row); // unselect it\r\n this.exceededMaxSelection.emit();\r\n }\r\n }\r\n }\r\n\r\n public GetColumnDisplayName(internalName: string) {\r\n return this.columnDisplayNames[internalName];\r\n }\r\n\r\n public get DataSource(): MatTableDataSource {\r\n return (this.dataSource);\r\n }\r\n\r\n public get SavedSort(): any {\r\n return (this.savedSort);\r\n }\r\n\r\n // Returns the currently saved sort column\r\n public get MatSortActive(): string {\r\n return (this.savedSort['active']);\r\n }\r\n // Returns the currently saved sort direction\r\n public get MatSortDirection(): string {\r\n return (this.savedSort['direction']);\r\n }\r\n\r\n public get DisplayedColumns(): string[] {\r\n //return (this.displayedColumns);\r\n let columnsToDisplay = this.displayedColumns;\r\n\r\n if ((this.configuredStructureFields != null) && this.configuredStructureFields.HasAtLeastOneHiddenField) {\r\n if (this.userSiteRoleNamesInfo.userSiteRoleNamesRetrieved) {\r\n if (!this.userSiteRoleNamesInfo.structureColumnsComputed) {\r\n // Compute the structure fields that the user can see.\r\n let isSiteAdmin: boolean = this.currentSiteService.Site.siteIsAdministerable;\r\n\r\n if (isSiteAdmin) {\r\n this.userSiteRoleNamesInfo.columnsToDisplay = columnsToDisplay;\r\n } else if (this.configuredStructureFields != null) {\r\n columnsToDisplay = this.configuredStructureFields.filterStructureColumnNames(columnsToDisplay, this.userSiteRoleNamesInfo.userSiteRoleNames);\r\n this.userSiteRoleNamesInfo.columnsToDisplay = columnsToDisplay;\r\n }\r\n\r\n this.userSiteRoleNamesInfo.structureColumnsComputed = true;\r\n } else {\r\n // Use the column names computed earlier.\r\n columnsToDisplay = this.userSiteRoleNamesInfo.columnsToDisplay;\r\n }\r\n } else {\r\n columnsToDisplay = [];\r\n }\r\n }\r\n\r\n return columnsToDisplay;\r\n }\r\n\r\n public get PropertyCols(): CustomColumnProperty[] {\r\n let cols = this.columnsConfig?.filter(x => { return x.indexOf('property(') > -1 });\r\n let props = [];\r\n if (cols) {\r\n for (let col of cols) {\r\n props.push(new CustomColumnProperty(col));\r\n }\r\n }\r\n return props;\r\n }\r\n\r\n public get selectAllTitle(): string {\r\n if (this.isAllSelected()) return 'Unselect All';\r\n return 'Select All';\r\n }\r\n\r\n public GridItemDragged(row) {\r\n if (this.selection.selected.indexOf(row) < 0) {\r\n this.selection.clear();\r\n this.selection.select(row);\r\n this.lastSelectedRow = row;\r\n }\r\n }\r\n\r\n // filters the grid's data source based on the list items name\r\n public doFilter(listItemName: string) {\r\n this.dataSource.filter = listItemName;\r\n }\r\n\r\n public clearSelection() {\r\n this.selection.clear();\r\n }\r\n\r\n // Define methods called by my HTML code.\r\n // Called when mat-table's sort is changed by cicking on a column header...\r\n //
s of the mat table handle the (dragover) event.\r\n // The first of thse divs in the td calls onDragOverRepositionAbove() and the last one calls onDragOverRepositionAbove()\r\n // These methods set idOfRepositionAbove aand idOfRepositionBelow to the id of the row containing the
currently being dragged over\r\n public onDragOverRepositionAbove(ev: DragEvent, row: IListItem) {\r\n this.idOfRepositionAbove = row.getId();\r\n this.idOfRepositionBelow = -1;\r\n }\r\n\r\n public onDragOverRepositionBelow(ev: DragEvent, row: IListItem) {\r\n this.idOfRepositionBelow = row.getId();\r\n this.idOfRepositionAbove = -1;\r\n }\r\n\r\n // These methods determine if classes should be added to the reordering div which will cause it to display\r\n // Note: Only the
in the very first
invokes this method.\r\n // The classes added will cause the div to display as a blue bar spreading across the table.\r\n public getRepositionAboveClass(row: IListItem): string {\r\n let draggedRow = this.ItemDragDataStart?.items[0];\r\n if (this.rowIsTargetOfReording(row, 'move-above')) {\r\n return \"show-reposition-above\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n public getRepositionBelowClass(row: IListItem): string {\r\n let draggedRow = this.ItemDragDataStart?.items[0];\r\n if (draggedRow) {\r\n if (this.rowIsTargetOfReording(row, 'move-below') &&\r\n row.itemIndex == (this.totalListCount - 1) // only display this on the last row\r\n ) {\r\n return \"show-reposition-below\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n }\r\n // We also want to expand the
indexOfCurrentSelection) {\r\n this.setSelectionGroup(displayedRows, indexOfCurrentSelection, indexOfLastClicked);\r\n }\r\n }\r\n\r\n if (event.ctrlKey) {\r\n this.ctrlSelect(row);\r\n }\r\n\r\n if (!event.shiftKey && !event.ctrlKey) {\r\n this.selection.clear();\r\n this.selection.select(row);\r\n }\r\n\r\n this.lastSelectedRow = row;\r\n }\r\n\r\n public ctrlSelect(row) {\r\n if (this.selection.isSelected(row))\r\n this.selection.deselect(row);\r\n else\r\n this.selection.select(row);\r\n\r\n this.lastSelectedRow = row;\r\n }\r\n\r\n public onRightClick(row) {\r\n if (!this.selection.selected.some(x => x == row)) {\r\n this.selection.clear();\r\n this.selection.select(row);\r\n\r\n this.lastSelectedRow = row;\r\n }\r\n }\r\n\r\n public setSelectedRow(row) {\r\n this.lastSelectedRow = row;\r\n }\r\n\r\n public onKeyDown($event): void {\r\n this.handleCtrlA($event);\r\n }\r\n\r\n //Prevent Ctrl+A from selecting all HTML elements in the table\r\n public handleCtrlA($event) {\r\n let charCode = String.fromCharCode($event.which).toLowerCase();\r\n if ($event.ctrlKey && charCode === 'a') {\r\n $event.preventDefault();\r\n this.selection.select(...this.dataSource.data);\r\n }\r\n }\r\n\r\n private setDataSource() {\r\n this.dataSource = new MatTableDataSource(this.list);\r\n this.dataSource.sortData = (data, sort) => {\r\n return this.doSortListData(data, this.matSort.direction, this.matSort.active);\r\n }\r\n\r\n // pharvey - 2/14/2022 - we used to rely on the parent of the ListView to pre-sort the items, but not all parents do this\r\n // In any case it's better to have the sorting happen automatically, and without this that doesn't happen on initialization\r\n UtilityHelper.runWhenStackClear(() => {\r\n this.dataSource.sort = this.matSort;\r\n });\r\n }\r\n\r\n private filterGridData(changes: SimpleChanges) {\r\n this.dataSource.filter = changes.filterTerm.currentValue;\r\n }\r\n\r\n private setSelectionGroup(rows, start: number, end: number) {\r\n let sliced = rows.slice(start, end + 1);\r\n\r\n sliced.forEach(x => {\r\n this.selection.select(x);\r\n });\r\n }\r\n}\r\n","export enum IconDisplayStyle {\r\n Default = 'default', // To be defined.\r\n\r\n MaterialIconsOutlined = 'material-icons-outlined'\r\n}\r\n","import { IListItem } from '../../../shared/interfaces/ilist-item.interface';\r\nimport { IconDisplayStyle } from '../../enums/icon-display-style.enum';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\n\r\nexport interface IButtonConfigClickHandler {\r\n handlePreButtonClick(): void;\r\n\r\n // Note: parameter 'contextItem' in the following call can be null.\r\n handleButtonClick(buttonConfig: IButtonConfig, eventData: any, contextItem: any): void;\r\n}\r\n\r\nexport interface IButtonConfig {\r\n // Properties.\r\n label: string;\r\n value: string;\r\n\r\n // Methods for conditional logic.\r\n appliesTo(item: IListItem): boolean; // Indicate whether this button applies to the specified item.\r\n isDisabled(item: IListItem): boolean; // Indicate with this button should be greyed out/disabled.\r\n\r\n // Methods for icon, icon format.\r\n iconFor(item: IListItem): string; // Returns the icon name for the specified item.\r\n iconFormatFor(item: IListItem): string; // Returns the icon format (MatIcon vs. SVG) for the specified item.\r\n\r\n buttonClickHandler: IButtonConfigClickHandler;\r\n}\r\n\r\nexport class SvgViewBox {\r\n public x: number;\r\n public y: number;\r\n public width: number;\r\n public height: number;\r\n\r\n public constructor(x: number, y: number, width: number, height: number) {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n }\r\n}\r\n\r\nexport class ButtonConfig implements IButtonConfig {\r\n // Properties.\r\n public label: string;\r\n public value: string;\r\n public icon: string;\r\n public iconFormat: string;\r\n public disabled: boolean = false; //TEAMS-424: KLW - Set the default value for disabled to false, making this an optional parameter\r\n public iconDisplayStyle: string = null;\r\n //public viewBox: SvgViewBox = null;\r\n public inlineStyles: string = null;\r\n\r\n //TEAMS-653: KLW - New property to set/add a class of a ButtonConfig\r\n public cssClass: string = null;\r\n\r\n // Implement additional IButtonConfig methods.\r\n public appliesTo(ignoredItem: any): boolean {\r\n return (true);\r\n }\r\n\r\n public isDisabled(ignoredItem: any): boolean {\r\n return this.disabled; //TEAMS-424: KLW - Return the variable representing disabled instead of a hard coded value\r\n }\r\n\r\n public iconFor(ignoredItem: any): string {\r\n return (this.icon);\r\n }\r\n public iconFormatFor(ignoredItem: any): string {\r\n return (this.iconFormat);\r\n }\r\n\r\n public buttonClickHandler: IButtonConfigClickHandler;\r\n\r\n // Constructor.\r\n //TEAMS-424: KLW - Change constructor to have an optional value for disabled\r\n public constructor(label: string,\r\n value: string,\r\n icon: string = null,\r\n iconFormat: string = IconFormatEnum.MAT_ICON,\r\n disabled: boolean = false,\r\n iconDisplayStyle: string = IconDisplayStyle.Default,\r\n cssClass: string = '') { \r\n this.label = label;\r\n this.value = value;\r\n this.icon = icon;\r\n this.iconFormat = iconFormat;\r\n this.disabled = disabled;\r\n this.iconDisplayStyle = iconDisplayStyle;\r\n this.cssClass = cssClass;\r\n }\r\n\r\n public setInlineStyles(inlineStyles: string): ButtonConfig {\r\n this.inlineStyles = inlineStyles;\r\n return this;\r\n }\r\n public setButtonClickHandler(buttonClickHandler: IButtonConfigClickHandler): ButtonConfig {\r\n this.buttonClickHandler = buttonClickHandler;\r\n return this;\r\n }\r\n}\r\n","import { IListItem } from '../../interfaces/ilist-item.interface';\r\n\r\nexport enum ListItemDragActionEnum {\r\n DRAG_START = 'dragStart',\r\n DRAG_END = 'dragEnd'\r\n}\r\n\r\nexport class ListItemDragActionData {\r\n public dragEventData: DragEvent; \r\n public items: IListItem[];\r\n public dragAction: ListItemDragActionEnum;\r\n}\r\n","import { DropEvent } from '../../../shared/external-libraries/ng-drag-drop/shared/drop-event.model';\r\n\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\n\r\n// 02-01-2021 note: defining class TrashConfig in case\r\n// we ever want to handle trash can/delete\r\n// configuration options.\r\n//\r\n// Also trying to remain consistent with\r\n// the precedent of ButtonConfig, the class\r\n// used to define a list view button\r\n// configuration.\r\n//\r\n// Also define a delete event class.\r\n//TEAMS-424: KLW - Make changes to pass an optional parameter for a group of items\r\nexport class TrashDeleteEvent {\r\n //Kevin\r\n public originalEvent: any;\r\n public items: any[];\r\n //public items; \r\n\r\n //public constructor(originalEventParam: DropEvent, itemParam: IListItem, itemsParam = null) {\r\n // this.originalEvent = originalEventParam;\r\n // this.item = itemParam;\r\n // this.items = itemsParam;\r\n\r\n // return;\r\n //}\r\n\r\n\r\n //Kevin\r\n public constructor(originalEventParam: any, itemsParam: any[]) {\r\n this.originalEvent = originalEventParam;\r\n //this.item = itemParam;\r\n this.items = itemsParam;\r\n\r\n return;\r\n }\r\n}\r\n\r\n \r\n\r\nexport class TrashConfig {\r\n // Properties.\r\n private bCanDelete: boolean = false;\r\n\r\n // Constructor.\r\n public constructor(bCanDeleteParam: boolean) {\r\n this.bCanDelete = bCanDeleteParam;\r\n return;\r\n }\r\n\r\n // Getter method.\r\n public get CanDelete(): boolean {\r\n return (this.bCanDelete);\r\n }\r\n}\r\n","\r\n\r\n
\r\n

{{title}}

\r\n\r\n \r\n \r\n {{this.PerspectiveLabel.trim()}}:\r\n \r\n\r\n \r\n \r\n {{perspectiveName}}\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
Load more...
\r\n
\r\n
\r\n","import { Component, OnInit, Input, EventEmitter, Output, OnChanges, SimpleChanges, ViewChild, ElementRef } from '@angular/core';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\nimport { DropEvent } from '../../../shared/external-libraries/ng-drag-drop/shared/drop-event.model';\r\nimport { Location } from '@angular/common';\r\n\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { ButtonConfig, IButtonConfig } from './list-view-button-config.model';\r\nimport { Logging } from '../../logging';\r\nimport { BrowserStorageService } from '../../services/browserstorage.service';\r\nimport { ListViewPerspective } from './list-view-perspective-config.model';\r\nimport {\r\n ListItemDragActionEnum,\r\n ListItemDragActionData\r\n} from './list-view-drag-action.model';\r\nimport { TrashConfig, TrashDeleteEvent } from './list-view-trash-config.model';\r\nimport { GridViewComponent } from './grid-view/grid-view.component';\r\nimport { TileViewComponent } from './tile-view/tile-view.component';\r\nimport { FilesDroppedOnStructureEvent, IFilesDroppedOnStructure } from '../../../views/site/structure/structure.file-drop.event';\r\nimport { ListItemMoveData } from './list-view-item-move-action';\r\nimport { Folder } from '../../models/site-content/folder.model';\r\nimport { ListViewHelper } from './list-view.helper';\r\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { debounceTime, switchMap } from 'rxjs/operators';\r\nimport { UtilityHelper } from '../../utility.helper';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { DragDropEnum } from '../../enums/drag-drop.enum';\r\nimport { IListViewLiaison } from './ilist-view-liaison.interface';\r\nimport { StructureFieldConfig, ConfigureStructureFields } from '../../models/structure/configure-structure-fields.model';\r\n\r\n@Component({\n selector: 'app-list-view',\n templateUrl: './list-view.component.html',\n styleUrls: ['./list-view.component.scss'],\n standalone: false\n})\r\nexport class ListViewComponent implements OnInit, OnChanges {\r\n @Input() list: IListItem[];\r\n\r\n @Input() title: string;\r\n @Input() listType: string;\r\n @Input() heading: string;\r\n @Input() selectedId: number;\r\n @Input() selectedType: string;\r\n @Input() selectedRolesId: number;\r\n @Input() selectedRolesType: string;\r\n @Input() buttonConfig: any;\r\n @Input() showGoUpOneLevel: boolean;\r\n @Input() showTreeButton: boolean = false;\r\n @Input() columnsConfig: string[];\r\n @Input() typeSortOrderConfig: string[];\r\n @Input() currentFolder: Folder;\r\n @Input() enableInfiniteScrolling: boolean = false; // this enables/disables infinite scrolling for a specific use of list-view\r\n //@Input() listResetAt: boolean;\r\n @Input() listResetAt: Date;\r\n @Input() throttleFilterChange: boolean = true;\r\n @Input() listItemsAreDraggable: boolean = false;\r\n\r\n @Input() totalListCount: number;\r\n\r\n @Input() hasCheckboxes: boolean = true;\r\n @Input() hideActionButtons: boolean = false;\r\n @Input() defaultSortColumn: string = 'position';\r\n\r\n @Input() maxSelection: number = 0; // zero means no limit\r\n @Input() viewOverride: string; // enables parent to force use of grid or tile only with no ability to switch\r\n @Input() renderNameAsLink: boolean = true;\r\n\r\n @Input() configureStructureFields: ConfigureStructureFields;\r\n\r\n @Input() listViewLiaison: IListViewLiaison = null; // Added 04-27-2023.\r\n\r\n @Output() editClick: EventEmitter = new EventEmitter();\r\n @Output() onTree: EventEmitter = new EventEmitter();\r\n @Output() buttonClick: EventEmitter = new EventEmitter();\r\n @Output() itemActionClick: EventEmitter = new EventEmitter();\r\n @Output() itemContextMenu: EventEmitter = new EventEmitter();\r\n\r\n @Output() itemDeleted: EventEmitter = new EventEmitter();\r\n @Output() perspectiveChanged: EventEmitter = new EventEmitter();\r\n @Output() exceededMaxSelection: EventEmitter = new EventEmitter();\r\n\r\n // for vNEXT-104 -- to support infinite scrolling\r\n private observer: IntersectionObserver;\r\n\r\n @ViewChild('infiniteScrollSentinel') infiniteScrollSentinel: ElementRef;\r\n\r\n @Output() loadMore: EventEmitter = new EventEmitter();\r\n @Output() sortChange: EventEmitter = new EventEmitter();\r\n @Output() viewChange: EventEmitter = new EventEmitter();\r\n @Output() filterTermChange: EventEmitter = new EventEmitter();\r\n\r\n @Output() itemMoved: EventEmitter = new EventEmitter();\r\n @Output() filesDropped: EventEmitter = new EventEmitter();\r\n\r\n @Output() dragged: EventEmitter = new EventEmitter();\r\n @Output() selectionsSet: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(GridViewComponent) gridViewComponent: ListViewComponent;\r\n @ViewChild(TileViewComponent) tileViewComponent: ListViewComponent;\r\n\r\n public filterTerm: string; // used to filter the list\r\n private listIsFiltered: boolean;\r\n private filterTermFormGroup: UntypedFormGroup = null;\r\n private listLengthWhenLoadMoreEmitted: number = -1;\r\n\r\n public view: string;\r\n sortDirection: string;\r\n\r\n private listViewPerspective: ListViewPerspective = null;\r\n private perspectiveName: string = null;\r\n\r\n private bShowTrashCan: boolean = false;\r\n private itemDragData: ListItemDragActionData = null;\r\n\r\n private trashConfig: TrashConfig = null;\r\n\r\n private allItemsLoaded: boolean = false;\r\n private loadMoreCounter: number = 0;\r\n private viewInitialized: boolean = false;\r\n\r\n //Kevin icon directive\r\n iconType = ItemTypeEnum.SVG_ICON;\r\n \r\n // Constructor.\r\n constructor(private location: Location,\r\n private browserStorageService: BrowserStorageService,\r\n private _formBuilder: UntypedFormBuilder\r\n ) { }\r\n\r\n ngOnInit() {\r\n // If I have a liaison, let it now that this component is initializing.\r\n if (this.listViewLiaison != null)\r\n this.listViewLiaison.listViewInitializing(this);\r\n\r\n this.filterTermFormGroup = this._formBuilder.group({\r\n filterTerm: ['']\r\n });\r\n this.initializeFilterTermControl();\r\n\r\n this.initView(this.browserStorageService.get(this.viewCacheKey()));\r\n\r\n // 07-07-2021: re-added the following two code blocks which got overwritten by a commit\r\n if (this.buttonConfig && this.buttonConfig.perspectives) {\r\n this.listViewPerspective =\r\n this.buttonConfig.perspectives;\r\n let perspectives: string[] = this.listViewPerspective.PerspectiveNames;\r\n let iSelectedIndex: number = this.listViewPerspective.InitialPerspectiveIndex;\r\n\r\n this.perspectiveName = perspectives[iSelectedIndex]; // The initially selected perspective.\r\n }\r\n\r\n if (this.buttonConfig && this.buttonConfig.trash) {\r\n let trashConfig: TrashConfig = this.buttonConfig.trash;\r\n\r\n this.bShowTrashCan = trashConfig.CanDelete;\r\n }\r\n }\r\n\r\n private initializeFilterTermControl(): void {\r\n this.filterTermFormGroup.controls['filterTerm'].valueChanges.pipe(\r\n debounceTime(350),\r\n ).subscribe((val) => {\r\n this.filterTerm = val;\r\n this.listIsFiltered = !!this.filterTerm;\r\n if (this.parentNeedsToFilterOnServer()) {\r\n this.filterTermChange.emit(val);\r\n }\r\n });\r\n }\r\n\r\n // Only want to emit the event when there's need to hit the server in which case\r\n // the parent component needs to handle it. filterTerm needs to be empty (signally we need to fetch everything)\r\n // or > 2 characters so we don't execute too wide of a search \r\n private parentNeedsToFilterOnServer() {\r\n let pageSizeCondition = this.totalListCount > ListViewHelper.PAGE_SIZE;\r\n let listLengthCondition = this.totalListCount > this.list.length;\r\n let filterTermCondition = (this.filterTerm.length == 0 || this.filterTerm.length > 2 || !this.throttleFilterChange);\r\n\r\n return pageSizeCondition && listLengthCondition && filterTermCondition;\r\n }\r\n\r\n // ADDED FOR VNEXT-104 - infinite scrolling\r\n public ngAfterViewInit() {\r\n this.viewInitialized = true;\r\n this.initializeInfiniteScroll();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.title && this.viewInitialized) {\r\n this.initializeInfiniteScroll();\r\n }\r\n else if (changes.listResetAt) {\r\n this.initializeInfiniteScroll();\r\n }\r\n\r\n if (this.list != null) {\r\n this.setSortDirection(this.browserStorageService.get(this.sortCacheKey())); }\r\n }\r\n\r\n initView(view: string): void {\r\n if (this.viewOverride) {\r\n this.view = this.viewOverride;\r\n } else {\r\n //TEAMS-827: KLW - Default the structure to Grid View instead of Tile View \r\n if (!view) view = 'grid';\r\n let cacheKey = this.viewCacheKey();\r\n this.browserStorageService.set(cacheKey, view);\r\n this.view = view;\r\n }\r\n }\r\n\r\n setView(view: string): void {\r\n this.initView(view);\r\n this.viewChange.emit(view);\r\n }\r\n\r\n public handleSortChange(event: any) {\r\n if (this.doInfiniteScrolling()) {\r\n this.sortChange.emit(event);\r\n }\r\n }\r\n\r\n public doInfiniteScrolling(): boolean {\r\n let done = this.totalListCount == this.list.length;\r\n let ret =\r\n ListViewHelper.APP_WIDE_INFINITE_SCROLL_ENABLED\r\n && this.enableInfiniteScrolling\r\n && !done;\r\n return ret;\r\n }\r\n\r\n public get DisplaySearch(): boolean {\r\n return this.list != null && (this.list.length > 5 || this.totalListCount > 5);\r\n }\r\n\r\n // Methods accessed by my .html code.\r\n public IsMaterialIconWithDefaultStyle(btn: ButtonConfig): boolean {\r\n return (btn.icon && btn.iconFormat == 'MatIcon') &&\r\n (btn.iconDisplayStyle == 'Default') &&\r\n (btn.inlineStyles == null);\r\n }\r\n public IsMaterialIconWithCustomStyle(btn: ButtonConfig): boolean {\r\n return (btn.icon && btn.iconFormat == 'MatIcon') &&\r\n (btn.iconDisplayStyle != 'Default') &&\r\n (btn.inlineStyles == null);\r\n }\r\n public IsMaterialIconWithInlineStyle(btn: ButtonConfig): boolean {\r\n return (btn.icon && btn.iconFormat == 'MatIcon')\r\n && (btn.inlineStyles != null);\r\n }\r\n\r\n public IsSvgIconWithNoInlineStyles(btn: ButtonConfig): boolean {\r\n return (btn.icon != null) && (btn.iconFormat == 'SvgIcon') && (btn.inlineStyles == null);\r\n }\r\n\r\n public IsSvgIconWithInlineStyles(btn: ButtonConfig): boolean {\r\n return (btn.icon != null) && (btn.iconFormat == 'SvgIcon') && (btn.inlineStyles != null);\r\n }\r\n\r\n public get Perspective(): ListViewPerspective {\r\n return (this.listViewPerspective);\r\n }\r\n\r\n public get PerspectiveLabel(): string {\r\n let label: string =\r\n (this.listViewPerspective ? this.listViewPerspective.Label : '');\r\n\r\n return (label);\r\n }\r\n\r\n public get FilterTermFormGroup(): UntypedFormGroup {\r\n return this.filterTermFormGroup;\r\n }\r\n\r\n //TEAMS-424: KLW - Moved from ngOnInit to the logic of the property to account for ButtonConfig being null when ngOnInit is called\r\n public get PerspectiveName(): string {\r\n if (this.buttonConfig && this.buttonConfig.perspectives) {\r\n if (!this.listViewPerspective) {\r\n this.listViewPerspective =\r\n this.buttonConfig.perspectives;\r\n let perspectives: string[] = this.listViewPerspective.PerspectiveNames;\r\n let iSelectedIndex: number = this.listViewPerspective.InitialPerspectiveIndex;\r\n\r\n this.perspectiveName = perspectives[iSelectedIndex]; // The initially selected perspective.\r\n }\r\n\r\n return this.perspectiveName;\r\n }\r\n }\r\n public set PerspectiveName(perspectiveNameParam: string) {\r\n this.perspectiveName = perspectiveNameParam;\r\n\r\n return;\r\n }\r\n\r\n public get PerspectiveNames(): string[] {\r\n let names: string[] =\r\n (this.listViewPerspective ? this.listViewPerspective.PerspectiveNames : []);\r\n\r\n return (names);\r\n }\r\n\r\n public get FilterTerm(): string {\r\n return (this.filterTerm);\r\n }\r\n public set FilterTerm(filterTermParam: string) {\r\n this.filterTerm = filterTermParam;\r\n }\r\n\r\n public get View(): string {\r\n return (this.view);\r\n }\r\n public set View(viewParam: string) {\r\n this.view = viewParam;\r\n }\r\n\r\n public get SortDirection(): string {\r\n return (this.sortDirection);\r\n }\r\n public set SortDirection(sortDirectionParam: string) {\r\n this.sortDirection = sortDirectionParam;\r\n }\r\n\r\n //TEAMS-424: KLW - Moved from ngOnInit to the logic of the property to account for ButtonConfig being null when ngOnInit is called\r\n public get HasTrashCan(): boolean {\r\n if (this.buttonConfig && this.buttonConfig.trash) {\r\n if (!this.trashConfig) {\r\n this.trashConfig = this.buttonConfig.trash;\r\n this.bShowTrashCan = this.trashConfig.CanDelete;\r\n }\r\n }\r\n\r\n return this.bShowTrashCan;\r\n }\r\n\r\n public get TrashCanTooltip(): string {\r\n let tooltip: string = \"Drag an item here to delete it\";\r\n\r\n return (tooltip);\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n\r\n return (position);\r\n }\r\n\r\n public get ItemIsBeingDragged(): boolean {\r\n return (this.itemDragData !== null);\r\n }\r\n\r\n //TEAMS-424: KLW - Have the MatTable source be a property so it can be updated easily\r\n public get ListItems(): IListItem[] {\r\n return this.list;\r\n }\r\n\r\n public get GetSortDirection(): string {\r\n return this.sortDirection;\r\n }\r\n\r\n public getMatIconCssClasses(sourceCssClass: string): string {\r\n return `${sourceCssClass} ${sourceCssClass}-enhancements`;\r\n }\r\n\r\n // Handle drag events.\r\n public onDragAction(event: ListItemDragActionData): void {\r\n if (event.dragAction === ListItemDragActionEnum.DRAG_START) {\r\n this.itemDragData = event;\r\n } else {\r\n this.itemDragData = null;\r\n }\r\n\r\n this.dragged.emit(event);\r\n\r\n return;\r\n }\r\n\r\n public onItemContextMenu(event: any): void {\r\n this.itemContextMenu.emit(event);\r\n\r\n return;\r\n }\r\n\r\n public setSelections(items: IListItem[]) {\r\n this.selectionsSet.emit(items);\r\n\r\n return;\r\n }\r\n\r\n public onItemMoved(event: ListItemMoveData): void {\r\n this.itemMoved.emit(event)\r\n\r\n return;\r\n }\r\n\r\n public onFileDropped(event: IFilesDroppedOnStructure): void {\r\n let toEmit: FilesDroppedOnStructureEvent = new FilesDroppedOnStructureEvent(event.Files);\r\n toEmit.setToDropFolderId(event.FolderId);\r\n toEmit.setObjectType(DragDropEnum.FORM);\r\n toEmit.setReload(event.Reload);\r\n\r\n this.filesDropped.emit(toEmit);\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-424: KLW - Pass in the selection of items to be handled if they exist\r\n //Kevin\r\n public onItemDroppedOnTrash(event: any): void {\r\n // Allow my parent to handle this.\r\n let eventData: TrashDeleteEvent = null;\r\n\r\n eventData = new TrashDeleteEvent(event, this.itemDragData.items);\r\n\r\n this.itemDeleted.emit(eventData);\r\n\r\n return;\r\n }\r\n\r\n //TEAMS-424: KLW - Have a way to update the MatTable source\r\n public updateTableSource(passedList: any): void {\r\n\r\n this.list = passedList;\r\n\r\n if (this.view == 'tile') {\r\n this.tileViewComponent.updateTableSource(passedList);\r\n }\r\n else if (this.view == 'grid') {\r\n this.gridViewComponent.updateTableSource(passedList);\r\n }\r\n }\r\n\r\n // Handle control events.\r\n public perspectiveNameChanged(): void {\r\n // Output a perspective changed event.\r\n this.perspectiveChanged.emit(this.perspectiveName);\r\n\r\n return;\r\n }\r\n\r\n // This sets up initial sort order for both TileView and GridView\r\n // From that point, GridView handles its own sorting using MatTable\r\n setSortDirection(direction: string): void {\r\n if (!direction) direction = 'none';\r\n this.browserStorageService.set(this.sortCacheKey(), direction);\r\n this.sortDirection = direction;\r\n }\r\n\r\n emitButtonClick(event: any, buttonConfig: IButtonConfig) {\r\n this.buttonClick.emit({ originalEvent: event, button: buttonConfig.value, buttonConfig: buttonConfig });\r\n }\r\n\r\n emitOnTree(entity) {\r\n this.onTree.emit(entity);\r\n }\r\n\r\n private viewCacheKey(): string {\r\n return `${this.listType}_listView`;\r\n }\r\n\r\n private sortCacheKey(): string {\r\n return `${this.listType}_sort`;\r\n }\r\n\r\n private initializeInfiniteScroll() {\r\n if (this.enableInfiniteScrolling) {\r\n // See https://www.smashingmagazine.com/2018/01/deferring-lazy-loading-intersection-observer-api/\r\n // I did a lot of experimenting with config options in trying to make infinite scrolling work across different resolutions\r\n const options = {\r\n root: null, // root will be viewport\r\n rootMargin: '0px 0px 0px 0px',\r\n threshold: [0.1, 1] // trigger intersection event when sentinel is 10% or 100% intersecting the viewport (may need to play with these values)\r\n };\r\n this.observer = new IntersectionObserver((entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting && this.okToEmitLoadMore()) {\r\n this.listLengthWhenLoadMoreEmitted = this.list?.length;\r\n this.loadMore.emit(entry);\r\n }\r\n });\r\n }, options);\r\n if (this.infiniteScrollSentinel) {\r\n // I don't know why it's necessary to wait until the stack is clear, but without this, reinitialization of the observer\r\n // would sometimes have no effect, especially when the parent of the ListView instance was the Structure screen\r\n UtilityHelper.runWhenStackClear(() => {\r\n this.observer.observe(this.infiniteScrollSentinel.nativeElement);\r\n });\r\n }\r\n }\r\n }\r\n\r\n public forceLoadMore() {\r\n this.loadMore.emit();\r\n }\r\n\r\n private okToEmitLoadMore() {\r\n // The IntersectionObserver governing infinite scrolling can fire multiple times and we want to ensure that\r\n // we only proess an intersections once, hence the check on loadMoreEmittedFor\r\n if (this.listLengthWhenLoadMoreEmitted != this.list?.length) {\r\n return !this.listIsFiltered && this.totalListCount > this.list?.length;\r\n }\r\n }\r\n\r\n public get DisplayInfiniteScrollSentinel() {\r\n return !this.listIsFiltered && this.totalListCount > this.list?.length;\r\n }\r\n}\r\n","import { BrowserStorageService } from '../../services/browserstorage.service';\r\n\r\nexport enum ListViewEnum {\r\n SITE_LIST = 'site-list',\r\n STRUCTURE = 'structure',\r\n\r\n GRID_VIEW = 'grid',\r\n TILE_VIEW = 'tile',\r\n\r\n VIEW_SORT_STATE = 'sort-state',\r\n\r\n FORM_INSTANCE_HISTORY = 'form-instance-history'\r\n}\r\n\r\nexport class ListViewHelper {\r\n public static readonly PAGE_SIZE: number = 50;\r\n public static readonly APP_WIDE_INFINITE_SCROLL_ENABLED: boolean = true;\r\n public static readonly DEFAULT_SORT: any = { active: 'name', direction: 'asc' };\r\n public static readonly FOLDER_DEFAULT_SORT: any = { active: 'position', direction: 'asc' };\r\n public static readonly NO_SORT = 'NONE';\r\n\r\n public static getInitialPageSize(): any {\r\n //const width = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\r\n //const height = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);\r\n //return [width, height];\r\n //return height * 10;\r\n }\r\n\r\n public static getSortObjFor(listType): any {\r\n let view = localStorage.getItem(`${listType}_listView`);\r\n\r\n let sortConfig = JSON.parse(localStorage.getItem(ListViewHelper.sortKey(listType, view)));\r\n sortConfig ||= this.FOLDER_DEFAULT_SORT;\r\n\r\n if (!sortConfig[\"direction\"]) sortConfig[\"direction\"] = \"asc\";\r\n\r\n return sortConfig;\r\n }\r\n \r\n // listType is \"structure\" or \"site-list\" etc...\r\n // view is \"grid\" or \"tile\"\r\n public static sortKey(listType: string, view: string): string {\r\n return `${listType}_${view}_${ListViewEnum.VIEW_SORT_STATE}`;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n {{btn.iconFor(item)}}\r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
{{ item.name }}
\r\n
{{ item.modifiedDate | date: 'MMMM d, YYYY' }}
\r\n
\r\n
\r\n
\r\n
\r\n","import { SelectionModel } from '@angular/cdk/collections';\r\nimport { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ItemTypeEnum } from '../../../enums/item-type.enum';\r\nimport { IListItem } from '../../../interfaces/ilist-item.interface';\r\nimport { FabricIconSizes } from '../../../mappings/fabric-file-types-icon.mapping';\r\nimport { DataCollection } from '../../../models/site-content/data-collection.model';\r\nimport { DragDropService } from '../../../services/drag-drop.service';\r\nimport { BrowserStorageService } from '../../../services/browserstorage.service';\r\nimport { BaseViewComponent } from '../base-view/base-view.component';\r\nimport { ListViewEnum, ListViewHelper } from '../list-view.helper';\r\n\r\n@Component({\n selector: 'app-tile-view',\n templateUrl: './tile-view.component.html',\n styleUrls: ['./tile-view.component.scss'],\n standalone: false\n})\r\nexport class TileViewComponent extends BaseViewComponent implements OnInit, OnChanges {\r\n // Inputs.\r\n @Input() icon: string;\r\n //TEAMS-424: KLW - Input to accept if view should have checkboxes or not\r\n @Input() hasCheckboxes: boolean = false;\r\n @Input() hideActionButtons: boolean = false;\r\n\r\n private selection: SelectionModel = new SelectionModel(true, []);\r\n private lastSelectedRow = null;\r\n private hideActionButtonsClass: string = '';\r\n\r\n // Properties.\r\n private defaultIcon: string = 'note';\r\n\r\n // holds a copy of the original list which\r\n // is used to render the view while honoring\r\n // search terms entered by the user\r\n private filteredList: IListItem[];\r\n\r\n private propetyToSortBy = 'name';\r\n @Output() sortChange: EventEmitter = new EventEmitter();\r\n\r\n // Constructor.\r\n constructor(private localStorageService: BrowserStorageService,\r\n public dialog: MatDialog,\r\n public injectedDragDropService: DragDropService) {\r\n super(dialog, injectedDragDropService);\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit() {\r\n //TEAMS-424: KLW - Create a selection model if checkboxes are required\r\n if (this.hasCheckboxes)\r\n this.selection = new SelectionModel(true, []);\r\n\r\n if (this.typeSortOrderConfig != null) {\r\n this.typeSortOrder = this.typeSortOrderConfig;\r\n }\r\n\r\n if (this.hideActionButtons)\r\n this.hideActionButtonsClass = \"hide-action-buttons\";\r\n\r\n //this.sortChange.emit(this.localStorageService.get(this.sortCacheKey()));\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.filterTerm) {\r\n if (changes.filterTerm.currentValue) {\r\n this.filteredList = this.copyOfOriginalList().filter(x => {\r\n return x.name.toLowerCase().indexOf(\r\n changes.filterTerm.currentValue.toLowerCase()\r\n ) > -1;\r\n });\r\n } else {\r\n this.initFilteredList();\r\n }\r\n }else if (changes.list) {\r\n this.initFilteredList();\r\n } else if (changes.sortDirection) {\r\n this.saveSortState({ active: this.propetyToSortBy, direction: changes.sortDirection.currentValue })\r\n }\r\n\r\n // so this gets called on every @Input change of any kind, shouldn't it be in ngOnInit?\r\n this.filteredList = this.doSortListData(this.filteredList, this.sortDirection, this.propetyToSortBy);\r\n\r\n if (changes.list) {\r\n if (this.selection)\r\n this.selection.clear();\r\n }\r\n }\r\n\r\n // move to base class to DRY it\r\n public saveSortState(sortState): void {\r\n this.localStorageService.set(this.sortCacheKey(), JSON.stringify(sortState));\r\n this.sortChange.emit(sortState); // new \r\n }\r\n // move to base class to DRY it\r\n private sortCacheKey(): string {\r\n return ListViewHelper.sortKey(this.listType, ListViewEnum.TILE_VIEW);\r\n }\r\n\r\n public ngDoCheck(): void {\r\n this.selectionsSet.emit(this.selection.selected);\r\n }\r\n\r\n //TEAMS-424: KLW - Set the attachment icon size to large\r\n public get fabricIconSize(): number {\r\n return FabricIconSizes.LARGE;\r\n }\r\n\r\n // Accessor methods called by my HTML code.\r\n public get Selection(): SelectionModel {\r\n return (this.selection);\r\n }\r\n\r\n public get HideActionButtonsClass(): string { \r\n return (this.hideActionButtonsClass);\r\n }\r\n\r\n public get FilteredList(): IListItem[] {\r\n return (this.filteredList);\r\n }\r\n\r\n public get DefaultIcon(): string {\r\n return (this.defaultIcon);\r\n }\r\n\r\n //VNEXT-473: KLW - Changes to have Tile View update after an attachment is added\r\n public updateTableSource(passedList: any) {\r\n this.filteredList = this.doSortListData(passedList, this.sortDirection, this.propetyToSortBy);\r\n }\r\n\r\n public TileItemDragged(item) {\r\n if (this.selection.selected.indexOf(item) < 0) {\r\n this.selection.clear();\r\n this.selection.select(item);\r\n this.lastSelectedRow = item;\r\n }\r\n }\r\n\r\n public isAttachmentIcon(item: DataCollection): boolean {\r\n let retVal: boolean = false;\r\n\r\n if (item.getType() == ItemTypeEnum.ATTACH_W_URLS)\r\n retVal = true;\r\n\r\n return retVal;\r\n }\r\n\r\n /** Whether the number of selected elements matches the total number of rows. */\r\n public isAllSelected() {\r\n const numSelected = this.selection.selected.length;\r\n const numRows = this.filteredList.length;\r\n return numSelected === numRows;\r\n }\r\n\r\n /** Selects all rows if they are not all selected; otherwise clear selection. */\r\n public masterToggle() {\r\n if (this.isAllSelected()) {\r\n this.selection.clear();\r\n return;\r\n }\r\n\r\n this.selection.select(...this.filteredList);\r\n }\r\n\r\n public rowClicked(item) {\r\n this.selection.clear();\r\n this.selection.select(item);\r\n }\r\n\r\n public ctrlSelect(row) {\r\n if (this.selection.isSelected(row))\r\n this.selection.deselect(row);\r\n else\r\n this.selection.select(row);\r\n\r\n this.lastSelectedRow = row;\r\n }\r\n\r\n public onRightClick(row) {\r\n if (!this.selection.selected.some(x => x == row)) {\r\n this.selection.clear();\r\n this.selection.select(row);\r\n\r\n this.lastSelectedRow = row;\r\n }\r\n }\r\n\r\n public setSelectedItem(event, item) {\r\n if (event.shiftKey) {\r\n this.selection.clear();\r\n\r\n //Must get the indexes of the last row clicked and current row clicked\r\n let indexOfLastClicked = this.filteredList.indexOf(this.lastSelectedRow);\r\n let indexOfCurrentSelection = this.filteredList.indexOf(item);\r\n\r\n if (indexOfLastClicked < indexOfCurrentSelection) {\r\n this.setSelectionGroup(this.filteredList, indexOfLastClicked, indexOfCurrentSelection - 1);\r\n }\r\n\r\n if (indexOfLastClicked > indexOfCurrentSelection) {\r\n this.setSelectionGroup(this.filteredList, indexOfCurrentSelection + 1, indexOfLastClicked);\r\n }\r\n }\r\n\r\n this.lastSelectedRow = item;\r\n }\r\n\r\n public onKeyDown($event): void {\r\n this.handleCtrlA($event);\r\n }\r\n\r\n //Prevent Ctrl+A from selecting all HTML elements in the table\r\n public handleCtrlA($event) {\r\n let charCode = String.fromCharCode($event.which).toLowerCase();\r\n if ($event.ctrlKey && charCode === 'a') {\r\n $event.preventDefault();\r\n this.selection.select(...this.filteredList);\r\n }\r\n }\r\n\r\n private setSelectionGroup(rows, start: number, end: number) {\r\n let sliced = rows.slice(start, end + 1);\r\n\r\n sliced.forEach(x => {\r\n this.selection.select(x);\r\n });\r\n }\r\n\r\n private initFilteredList() {\r\n this.filteredList = this.copyOfOriginalList();\r\n }\r\n\r\n private copyOfOriginalList() {\r\n return Object.assign([], this.list);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n {{this.UserGroupPickerLabel}}\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {{pickerItem.fullDisplay}}\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { debounceTime, switchMap } from 'rxjs/operators';\nimport { TooltipPosition } from '@angular/material/tooltip';\r\n\r\nimport { MaxPickerService } from '../../services/max-picker.service';\r\nimport { PickerItem } from '../../models/picker-item.model';\r\n\n@Component({\n selector: 'app-max-picker',\n templateUrl: './max-picker.component.html',\n styleUrls: ['./max-picker.component.scss'],\n standalone: false\n})\nexport class MaxPickerComponent implements OnInit {\r\n // Properties.\r\n private addMemberFormGroup: UntypedFormGroup = null;\n\r\n private showLoadingIndicator: boolean = false;\r\n private pickerItems: Observable = null;\r\n private pickerLoadingTmeoutId: any;\r\n\r\n // Inputs.\r\n @Input() userGroupPickerLabel: string = 'Add Member';\r\n @Input() pickerDisabled: boolean = false;\r\n @Input() maxMemberStyle: string = 'width: 75%;';\r\n @Input() addButtonName: string = 'Add';\r\n @Input() addButtonFlyoverText: string = 'Click to add a user or group';\r\n @Input() addButtonAdditionalStyle: string = '';\r\n @Input() addButtonCanEnable: boolean = true;\r\n @Input() scope: string = 'usersAndGroups';\r\n @Input() secondButtonName: string = null;\r\n @Input() secondButtonCanEnable: boolean = true;\r\n @Input() secondButtonIgnoreMemberInput: boolean = false;\r\n @Input() secondButtonFlyoverText: string = null;\r\n\r\n // Outputs.\r\n @Output() addButtonClicked: EventEmitter = new EventEmitter();\r\n @Output() secondButtonClicked: EventEmitter = new EventEmitter();\r\n\r\n // Constructor.\n public constructor(private _formBuilder: UntypedFormBuilder,\r\n private maxPickerService: MaxPickerService) {\r\n return;\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n // Create initial/blank form definitions.\r\n this.createFormGroupAndInitFilteredUsers();\r\n\r\n // Initialize picker elements.\r\n this.initializeLoadingIndicator();\r\n\r\n return;\n }\r\n\r\n // Accessor methods called by my HTML code.\r\n public get AddMemberFormGroup(): UntypedFormGroup {\r\n return (this.addMemberFormGroup);\r\n }\r\n\r\n public get MaxMemberStyle(): string {\r\n return (this.maxMemberStyle);\r\n }\r\n\r\n public get AddButtonName(): string {\r\n return (this.addButtonName);\r\n }\r\n public get AddButtonAdditionalStyle(): string {\r\n return (this.addButtonAdditionalStyle);\r\n }\r\n public get AddButtonFlyoverText(): string {\r\n return this.addButtonFlyoverText;\r\n }\r\n\r\n public get UserGroupPickerLabel(): string {\r\n let label: string = this.userGroupPickerLabel;\r\n\r\n if (this.scope == 'usersOnly') {\r\n label = 'Add User';\r\n } else if (this.scope == 'groupsOnly') {\r\n label = 'Add Group'\r\n }\r\n return label;\r\n }\r\n\r\n public get ShowLoadingIndicator(): boolean {\r\n return (this.showLoadingIndicator);\r\n }\r\n\r\n public DisplayUserName(pi: PickerItem): string {\n return (pi != null ? pi.displayName : '');\n }\r\n\r\n public get PickerItems(): Observable {\r\n return (this.pickerItems);\r\n }\r\n\r\n public get DisableAddButton(): boolean {\r\n let memberInput: UntypedFormControl = this.addMemberFormGroup.get('member');\r\n\r\n let bDisable: boolean = (\r\n (!this.addButtonCanEnable) ||\r\n (memberInput == null) ||\r\n (memberInput.value == null) ||\r\n (memberInput.value.toString().trim() == '') ||\r\n (!memberInput.value.key)); //VNEXT-806 make sure a member is selected before enabling Add button\r\n\r\n return bDisable;\r\n }\r\n public get DisableSecondButton(): boolean {\r\n let memberInput: UntypedFormControl = this.addMemberFormGroup.get('member');\r\n let bDisable: boolean = false;\r\n\r\n if (this.secondButtonIgnoreMemberInput)\r\n bDisable = (!this.secondButtonCanEnable);\r\n else\r\n bDisable = ((!this.secondButtonCanEnable) || (memberInput == null) || (memberInput.value == null) || (memberInput.value.toString().trim() == ''));\r\n\r\n return bDisable;\r\n }\r\n\r\n public get SecondButtonName(): string {\r\n return this.secondButtonName;\r\n }\r\n public get SecondButtonFlyoverText(): string {\r\n return this.secondButtonFlyoverText;\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n let position: TooltipPosition = 'below';\r\n\r\n return (position);\r\n }\r\n\r\n public get PickerDisabled(): boolean {\r\n return this.pickerDisabled;\r\n }\r\n\r\n // Handle control events.\r\n public addMembership(): void {\r\n this.membershipOrMemberAdded(true);\r\n }\r\n\r\n public addMember(): void {\r\n if (this.secondButtonIgnoreMemberInput)\r\n this.secondButtonClicked.emit(null);\r\n else\r\n this.membershipOrMemberAdded(false);\r\n }\r\n\r\n // Private helper methods.\r\n private membershipOrMemberAdded(membershipAdded: boolean): void {\r\n // Get and output the added member.\r\n let member: any = this.addMemberFormGroup.value.member;\r\n\r\n // Add a flag that the caller can change.\r\n if ((member != null) && (typeof member == 'object') && (member.constructor.name == 'PickerItem'))\r\n member['clearMemberInput'] = false;\r\n\r\n // Output the event.\r\n if (membershipAdded)\r\n this.addButtonClicked.emit(member);\r\n else\r\n this.secondButtonClicked.emit(member);\r\n\r\n // Clear the member input field?\r\n if (member['clearMemberInput'] == true)\r\n this.clearMemberInput();\r\n }\r\n\r\n private clearMemberInput(): void {\r\n //return;\r\n\r\n let memberInput: UntypedFormControl = this.addMemberFormGroup.get('member');\r\n if (memberInput != null) {\r\n // 04-07-2022 note: clearing the existing input fields was causing a\r\n // \"You provided 'undefined' where a stream was expected\" exception.\r\n //\r\n // The information on the following page gave me the idea to recreate\r\n // the form group instead:\r\n //\r\n // https://stackoverflow.com/questions/34742023/how-to-clear-form-after-submit-in-angular-2\r\n //memberInput.setValue('');\r\n this.createFormGroupAndInitFilteredUsers();\r\n /*\r\n try {\r\n //memberInput.setValue('');\r\n //memberInput.reset();\r\n this.createFormGroupAndInitFilteredUsers();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n */\r\n }\r\n }\n\r\n private initializeFilteredUsers(): void {\n this.pickerItems = this.addMemberFormGroup.controls['member'].valueChanges.pipe(\n debounceTime(300), // swallow multiple valueChanges made within 300ms period and just keep the most recent one\n switchMap(value => this.pickerServiceSearch(value)//this.maxPickerService.search(value)\r\n ) // switch to a new observable, canceling the previous\n );\n }\r\n\r\n private pickerServiceSearch(value: any): Promise {\r\n if ((value != null) && (value != '')) {\r\n let result: Promise = this.maxPickerService.search(value, 100, this.scope);\r\n\r\n return (result);\r\n } else {\r\n let retValue = new Promise((resolve, reject) => {\r\n resolve([]);\r\n });\r\n\r\n return retValue;\r\n }\r\n }\n\n private initializeLoadingIndicator(): void {\n this.maxPickerService.isSearching.subscribe((value) => {\n if (value) {\n if (!this.showLoadingIndicator) {\n this.pickerLoadingTmeoutId = setTimeout(() => { this.showLoadingIndicator = true }, 450);\r\n }\r\n }\n else {\n clearTimeout(this.pickerLoadingTmeoutId);\n this.showLoadingIndicator = false;\n }\n });\r\n }\r\n\r\n private createFormGroupAndInitFilteredUsers(): void {\r\n this.addMemberFormGroup = this._formBuilder.group({\r\n member: { value: '', disabled: this.pickerDisabled }\r\n });\r\n\r\n this.initializeFilteredUsers();\r\n }\n}\n","import { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\n\r\nexport class ScriptableElementsToFind {\r\n public elements: object = null;\r\n public elementsFound: boolean = false;\r\n\r\n public constructor(public anElementSelector: string, public elementTypeMetadata: ElementTypeMetadata, public additionalElementInfo: AdditionalElementInfo = null) {\r\n }\r\n}\r\n","import { ScriptableBaseComponent } from '../../components/scriptable-base/scriptable-base.component';\r\nimport { AdditionalElementInfo, IAdditionalElementInfo, INameToPrettyNameMap, IOperationCompletedServiceMap } from './additional-element-info.model';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\n\r\nexport interface IScriptableElement {\r\n anElementSelector: string; // An HTML element selector.\r\n\r\n // Methods for identifying types of HTML elements.\r\n hasLinks(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasButtons(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasButtonsWithMatIcons(optionalAdditionalElementInfo?: AdditionalElementInfo): IScriptableElement;\r\n hasMatListItems(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasMatIcons(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasInput(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasInputs(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasMatCheckBox(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasMatList(optionalAdditionalElementInfo?: IAdditionalElementInfo): IScriptableElement;\r\n hasMatSelect(optionalAdditionalElementInfo?: AdditionalElementInfo): IScriptableElement;\r\n\r\n // Methods for additional additional information for specified elements.\r\n hasInnerTextSelector(innerTextSelector: string): IScriptableElement;\r\n\r\n hasCustomPreprocessorFunction(preprocessingFunction: (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => void): IScriptableElement;\r\n hasCustomGetTextFunction(getTextFunction: (driver: IBrowserDriver, element: object, exitingTextValue: string, additionalElementInfo: IAdditionalElementInfo) => string): IScriptableElement;\r\n hasGetClickableElementFunction(getClickableElementFunction: (element: object) => object): IScriptableElement;\r\n\r\n hasToggleCheckboxMethodName(methodName: string): IScriptableElement;\r\n hasElementSubType(subtype: string): IScriptableElement;\r\n\r\n withName(name: string): IScriptableElement;\r\n withNames(names: string[]): IScriptableElement;\r\n withNameToPrettyNameMap(nameToPrettyNameMap: INameToPrettyNameMap): IScriptableElement; // This property is probably not going to be used.\r\n withStandardNameToPrettyStandardNameMap(standardNameToPrettyStandardNameMap: INameToPrettyNameMap): IScriptableElement;\r\n withElementsSubtypeMap(elementsSubtypeMap: INameToPrettyNameMap): IScriptableElement;\r\n withAddedDateTimeSuffix(hasSuffix?: boolean): IScriptableElement;\r\n withOperationCompletedServiceMap(operationCompletedServiceMap: IOperationCompletedServiceMap): IScriptableElement;\r\n\r\n allowsZeroElements(): IScriptableElement;\r\n withMaxTimeoutsLookingForScriptableElements(maxTimeoutsLookingForScriptableElements: number): IScriptableElement;\r\n\r\n //withCssFilter(filterExpr: string): IScriptableElement;\r\n}\r\nexport class ScriptableElement implements IScriptableElement {\r\n // Properties (that not defined in the constructor).\r\n //private typeOfElementBeingDefined: string = null; // Note: this property is not needed.\r\n\r\n // Constructor.\r\n public constructor(public anElementSelector: string, private component: ScriptableBaseComponent) { }\r\n\r\n // Methods for identifying types of HTML elements.\r\n public hasLinks(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasLinks(this.anElementSelector, optionalAdditionalElementInfo);\r\n //this.typeOfElementBeingDefined = HtmlElementTypeNames.links_metadataKey;\r\n return this;\r\n }\r\n public hasButtons(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasButtons(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasButtonsWithMatIcons(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasButtonsWithMatIcons(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasMatListItems(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasMatListItems(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasMatIcons(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasMatIcons(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasInput(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasInput(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasInputs(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasInputs(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasMatCheckBox(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasMatCheckBox(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasMatList(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasMatList(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n public hasMatSelect(optionalAdditionalElementInfo: AdditionalElementInfo = null): IScriptableElement {\r\n this.component.elementHasMatSelect(this.anElementSelector, optionalAdditionalElementInfo);\r\n return this;\r\n }\r\n \r\n // Methods for additional additional information for specified elements.\r\n public hasInnerTextSelector(innerTextSelector: string): IScriptableElement {\r\n this.component.hasInnerTextSelector(this.anElementSelector, innerTextSelector);\r\n return this;\r\n }\r\n\r\n public hasCustomPreprocessorFunction(preprocessingFunction: (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => void): IScriptableElement {\r\n this.component.elementHasCustomPreprocessingFunction(this.anElementSelector, preprocessingFunction);\r\n return this;\r\n }\r\n public hasCustomGetTextFunction(getTextFunction: (driver: IBrowserDriver, element: object, existingTextValue: string, additionalElementInfo: IAdditionalElementInfo) => string): IScriptableElement {\r\n this.component.elementHasCustomGetTextFunction(this.anElementSelector, getTextFunction);\r\n return this;\r\n }\r\n public hasGetClickableElementFunction(getClickableElementFunction: (element: object) => object): IScriptableElement {\r\n this.component.elementHasGetClickableElementFunction(this.anElementSelector, getClickableElementFunction);\r\n return this;\r\n }\r\n\r\n public hasToggleCheckboxMethodName(methodName: string): IScriptableElement {\r\n this.component.elementHasToggleCheckboxMethodName(this.anElementSelector, methodName);\r\n return this;\r\n }\r\n public hasElementSubType(subtype: string): IScriptableElement {\r\n this.component.elementHasSubtype(this.anElementSelector, subtype);\r\n return this;\r\n }\r\n\r\n public withName(name: string): IScriptableElement {\r\n this.component.elementHasName(this.anElementSelector, name);\r\n return this;\r\n }\r\n public withNames(names: string[]): IScriptableElement {\r\n this.component.elementHasNames(this.anElementSelector, names);\r\n return this;\r\n }\r\n public withNameToPrettyNameMap(nameToPrettyNameMap: INameToPrettyNameMap): IScriptableElement {\r\n this.component.elementHasNameToPrettyNamesMap(this.anElementSelector, nameToPrettyNameMap);\r\n return this;\r\n }\r\n public withStandardNameToPrettyStandardNameMap(standardNameToPrettyStandardNameMap: INameToPrettyNameMap): IScriptableElement {\r\n this.component.elementHasStandardNameToPrettyStandardName(this.anElementSelector, standardNameToPrettyStandardNameMap);\r\n return this;\r\n }\r\n public withElementsSubtypeMap(elementsSubtypeMap: INameToPrettyNameMap): IScriptableElement {\r\n this.component.elementHasElementSubtypesMaps(this.anElementSelector, elementsSubtypeMap);\r\n return this;\r\n }\r\n public withAddedDateTimeSuffix(hasSuffix: boolean = true): IScriptableElement {\r\n this.component.elementHasAddedDateTimeSuffix(this.anElementSelector, hasSuffix);\r\n return this;\r\n }\r\n public withOperationCompletedServiceMap(operationCompletedServiceMap: IOperationCompletedServiceMap): IScriptableElement {\r\n this.component.elementHasOperationCompletedServiceMap(this.anElementSelector, operationCompletedServiceMap);\r\n return this;\r\n }\r\n\r\n public allowsZeroElements(): IScriptableElement {\r\n this.component.elementAllowsZeroElements(this.anElementSelector);\r\n return this;\r\n }\r\n public withMaxTimeoutsLookingForScriptableElements(maxTimeoutsLookingForScriptableElements: number): IScriptableElement {\r\n this.component.elementHasMaxTimeoutsLookingForScriptableElements(this.anElementSelector, maxTimeoutsLookingForScriptableElements);\r\n return this;\r\n }\r\n\r\n /*\r\n public hasSelectorWithText(additionalElementInfo: AdditionalElementInfo): IScriptableElement {\r\n this.component.elementHasSelectorWithText(additionalElementInfo);\r\n return this;\r\n }\r\n */\r\n /*\r\n public withCssFilter(filterExpr: string): IScriptableElement {\r\n // TO DO: CODE THIS METHOD!!!\r\n return this;\r\n }\r\n */\r\n}\r\n","import { ScriptableBaseComponent } from '../../components/scriptable-base/scriptable-base.component';\r\n\r\nexport interface IEnumReference {\r\n enumName: string;\r\n\r\n hasValues(values: string[]): IEnumReference;\r\n withPrettyNames(prettyNames: string[]): IEnumReference;\r\n}\r\nexport class EnumReference implements IEnumReference {\r\n public constructor(public enumName: string, private component: ScriptableBaseComponent) { }\r\n\r\n public hasValues(values: string[]): IEnumReference {\r\n this.component.enumHasValues(this.enumName, values);\r\n return this;\r\n }\r\n public withPrettyNames(prettyNames: string[]): IEnumReference {\r\n this.component.enumHasPrettyNames(this.enumName, prettyNames);\r\n return this;\r\n }\r\n\r\n}\r\n","import { Component, OnInit, OnDestroy, AfterViewInit, ElementRef, forwardRef, SkipSelf, Optional, ViewChildren, QueryList, Injectable, Input, Type as AngularCoreType } from '@angular/core';\r\nimport { MatInput } from '@angular/material/input';\r\nimport { MatCheckbox } from '@angular/material/checkbox';\r\n\r\nimport { AppInjector } from '../../../app.module';\r\n\r\nimport { HtmlElementInfo } from '../../models/component-scripting/html-element-info.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ComponentHierarchyService } from '../../services/component-hierarchy.service';\r\nimport { ElementCountExpected } from '../../models/component-scripting/element-count-expected.enum';\r\nimport { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\nimport { ElementTypeMetadata } from '../../models/component-scripting/element-type-metadata.model';\r\nimport { ScriptableElementsToFind } from '../../models/component-scripting/elements-to-find.model';\r\nimport { ComponentMethodMetadata, ComponentMethodsMetadata, IComponentNameToMethodsMetadata } from '../../models/component-scripting/component-methods-metadata.model';\r\nimport { ComponentMethodsService, EnumMetadata, IEnumMetadataByName } from '../../models/component-scripting/component-methods.service';\r\nimport { Scriptable } from '../../models/component-scripting/scriptable-function.annotation';\r\nimport { IScriptableElement, ScriptableElement } from '../../models/component-scripting/scriptable-element.model';\r\nimport { IEnumReference, EnumReference } from '../../models/component-scripting/enum-reference.model';\r\nimport { StringUtil } from '../../utility-classes/string.util';\r\nimport { HtmlElementTypeService } from '../../services/html-element-type.service';\r\nimport { JQueryBrowserDriverService } from '../../services/jquery-browser-driver.service';\r\nimport { HtmlElementTypeNames } from '../../models/component-scripting/html-element-type-names.model';\r\nimport { AdditionalElementInfo, IAdditionalElementInfo, INameToPrettyNameMap, IOperationCompletedServiceMap } from '../../models/component-scripting/additional-element-info.model';\r\nimport { IDrawerComponentLiaison } from '../../interfaces/idrawer-component-liaison';\r\nimport { ScriptableComponentStatus } from '../../enums/component-scripting/scriptable-component-status.enum';\r\nimport { HtmlMetadataTagNames } from '../../models/component-scripting/html-element-type-names.model';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\n \r\n// Define classes, enumerations used within this file.\r\n\r\n // Package timeout-related properties in a class.\r\nclass WatchTimeoutInfo {\r\n public readonly timeoutInMilliseconds: number = 100;\r\n public readonly maxTimeoutsLookingForScriptableElements: number = 25;\r\n\r\n public timeoutsCompleted: number = 0;\r\n}\r\n\r\nclass ScriptableElementsData {\r\n public scriptableElementsToFind: ScriptableElementsToFind[] = [];\r\n public componentMethodsFound: boolean = false;\r\n\r\n //public enumMetadataByName: IEnumMetadataByName = {};\r\n}\r\n\r\n// Define the scriptable component base class.\r\n@Component({\n selector: 'app-scriptable-base',\n templateUrl: './scriptable-base.component.html',\n styleUrls: ['./scriptable-base.component.scss'],\n standalone: false\n})\r\n@Injectable({\r\n providedIn: 'root' // just before your class\r\n})\r\nexport class ScriptableBaseComponent implements OnInit, OnDestroy, AfterViewInit, ITestableComponent {\r\n // Properties.\r\n private initializationStatus: ScriptableComponentStatus = ScriptableComponentStatus.Initializing;\r\n\r\n private readonly watchTimeoutInfo: WatchTimeoutInfo = new WatchTimeoutInfo();\r\n private scriptableElementsInfo: ScriptableElementsData = new ScriptableElementsData();\r\n\r\n // Id management.\r\n private static nextId: number = 1;\r\n private componentId: number = ScriptableBaseComponent.nextId++;\r\n\r\n //private static htmlElementTypeService: HtmlElementTypeService = new HtmlElementTypeService();\r\n\r\n // MatInput elements.\r\n @ViewChildren(MatInput, { read: MatInput }) public matInputs: QueryList;\r\n @ViewChildren(MatInput, { read: ElementRef }) public matInputElementRefs: QueryList;\r\n // MatCheckbox elements.\r\n @ViewChildren(MatCheckbox, { read: MatCheckbox }) public matCheckboxes: QueryList;\r\n @ViewChildren(MatCheckbox, { read: ElementRef }) public matCheckboxElementRefs: QueryList;\r\n\r\n private optionalDrawerComponentLiaison: IDrawerComponentLiaison = null;\r\n\r\n // Constructor.\r\n protected constructor(private el: ElementRef) {\r\n }\r\n\r\n protected hasDrawerComponentLiaison(drawerComponentLiaison: IDrawerComponentLiaison) {\r\n this.optionalDrawerComponentLiaison = drawerComponentLiaison;\r\n }\r\n\r\n protected get componentHierarchyService(): ComponentHierarchyService {\r\n let service: ComponentHierarchyService = AppInjector.get(ComponentHierarchyService);\r\n return service;\r\n }\r\n protected get htmlElementTypeService(): HtmlElementTypeService {\r\n let service: HtmlElementTypeService = AppInjector.get(HtmlElementTypeService);\r\n return service;\r\n }\r\n protected get jqueryBrowserDriverService(): JQueryBrowserDriverService {\r\n let service: JQueryBrowserDriverService = AppInjector.get(JQueryBrowserDriverService);\r\n return service;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n this.componentHierarchyService.registerChildComponent(this);\r\n\r\n if (this.optionalDrawerComponentLiaison != null)\r\n this.optionalDrawerComponentLiaison.drawerComponentInitialized(this);\r\n\r\n if (this.scriptableElementsInfo.scriptableElementsToFind.length > 0) {\r\n // 03-06-2025 note: will disable the following line as the data it collect is presently not being used.\r\n this.findScriptableElements();\r\n } \r\n else {\r\n //ScriptableBaseComponent.findAnyScriptableComponentMethods(this.scriptableElementsToFind);\r\n this.InitializationStatus = ScriptableComponentStatus.InitializationComplete;\r\n this.notifyInitializationCompleted();\r\n }\r\n }\r\n protected reFindScriptableElements(): void {\r\n if (this.scriptableElementsInfo.scriptableElementsToFind.length > 0) {\r\n for (let index: number = 0; index < this.scriptableElementsInfo.scriptableElementsToFind.length; index++)\r\n this.scriptableElementsInfo.scriptableElementsToFind[index].elementsFound = false;\r\n\r\n this.initializationStatus = ScriptableComponentStatus.Initializing;\r\n this.watchTimeoutInfo.timeoutsCompleted = 0;\r\n this.findScriptableElements();\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.componentHierarchyService.removeComponent(this);\r\n }\r\n\r\n // ITestableComponent methods.\r\n public get tagName(): string {\r\n let tag: string = 'null';\r\n\r\n if ((this.el != null) && (this.el.nativeElement != null))\r\n tag = this.el.nativeElement.tagName.toLowerCase();\r\n\r\n return tag;\r\n }\r\n public get id(): number {\r\n return this.componentId;\r\n }\r\n\r\n // Define methods for querying a testable component's elements.\r\n public get elementTypes(): string[] {\r\n let elementTypes: string[] = [];\r\n\r\n // Get any component methods.\r\n /*\r\n if (!this.scriptableElementsInfo.componentMethodsFound) {\r\n this.findAnyScriptableComponentMethods(this.scriptableElementsInfo.scriptableElementsToFind);\r\n this.scriptableElementsInfo.componentMethodsFound = true;\r\n }\r\n */\r\n this.getAnyComponentMethods();\r\n\r\n // Get the \r\n let mapOfElementTypes = {};\r\n for (let index: number = 0; index < this.scriptableElementsInfo.scriptableElementsToFind.length; index++) {\r\n let elementsToFind: ScriptableElementsToFind = this.scriptableElementsInfo.scriptableElementsToFind[index];\r\n //let elementType: string = (elementsToFind.elementTypeMetadata.prettyElementTypeTitle != null ? elementsToFind.elementTypeMetadata.prettyElementTypeTitle : elementsToFind.elementTypeMetadata.metadataKey);\r\n let elementType: string = elementsToFind.elementTypeMetadata.metadataKey;\r\n //let elementSubTypes: string[] = this.getSubtypesForElementType(elementType);\r\n\r\n if (mapOfElementTypes[elementType] == null) {\r\n mapOfElementTypes[elementType] = elementType;\r\n elementTypes.push(elementType);\r\n }\r\n }\r\n\r\n return elementTypes;\r\n }\r\n /*\r\n public get elementTypeInfo(): ElementTypeInfo[] {\r\n let allElementTypeInfos: ElementTypeInfo[] = [];\r\n\r\n // Get any component methods.\r\n this.getAnyComponentMethods();\r\n\r\n // Get the \r\n let mapOfElementTypes = {};\r\n for (let index: number = 0; index < this.scriptableElementsInfo.scriptableElementsToFind.length; index++) {\r\n let elementsToFind: ScriptableElementsToFind = this.scriptableElementsInfo.scriptableElementsToFind[index];\r\n let elementType: string = elementsToFind.elementTypeMetadata.metadataKey;\r\n //let elementSubTypes: string[] = this.getSubtypesForElementType(elementType);\r\n let elementSubtype: string = (elementsToFind.additionalElementInfo.elementSubtypeNames != null) && \r\n\r\n if (mapOfElementTypes[elementType] == null) {\r\n mapOfElementTypes[elementType] = elementType;\r\n elementTypes.push(elementType);\r\n }\r\n }\r\n\r\n return allElementTypeInfos;\r\n }\r\n */\r\n\r\n private getAnyComponentMethods(): void {\r\n if (!this.scriptableElementsInfo.componentMethodsFound) {\r\n this.findAnyScriptableComponentMethods(this.scriptableElementsInfo.scriptableElementsToFind);\r\n this.scriptableElementsInfo.componentMethodsFound = true;\r\n }\r\n }\r\n\r\n /*\r\n public getSubtypesForElementType(elementType: string): string[] {\r\n let subtypes: string[] = [];\r\n //let allElementsHaveSubtype: boolean = true;\r\n\r\n for (let index: number = 0; index < this.scriptableElementsInfo.scriptableElementsToFind.length; index++) {\r\n let elementsToFind: ScriptableElementsToFind = this.scriptableElementsInfo.scriptableElementsToFind[index];\r\n\r\n if ((elementsToFind.elementTypeMetadata.metadataKey == elementType) && (elementsToFind.elements != null) && (elementsToFind.elements['length'] != null)) {\r\n if (elementsToFind.additionalElementInfo.elementSubtypeNames != null) {\r\n for (let elIndex: number = 0; elIndex < elementsToFind.elements['length']; elIndex++) {\r\n let elementSubtype: string = elementsToFind.additionalElementInfo.elementSubtypeNames.length > elIndex ? elementsToFind.additionalElementInfo.elementSubtypeNames[elIndex] : null;\r\n if ((elementSubtype != null) && (subtypes.find(st => st == elementSubtype) == null))\r\n subtypes.push(elementSubtype);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return subtypes;\r\n }\r\n */\r\n\r\n public getElementsOfType(elementType: string): HtmlElementInfo[] {\r\n let elements: HtmlElementInfo[] = [];\r\n\r\n let elementTypeMetadata: ElementTypeMetadata = ScriptableBaseComponent.getMetadataForElementType(this.htmlElementTypeService, elementType);\r\n\r\n for (let index: number = 0; index < this.scriptableElementsInfo.scriptableElementsToFind.length; index++) {\r\n let elementsToFind: ScriptableElementsToFind = this.scriptableElementsInfo.scriptableElementsToFind[index];\r\n\r\n if ((elementsToFind.elementTypeMetadata.metadataKey == elementType) && (elementsToFind.elements != null) && (elementsToFind.elements['length'] != null)) {\r\n for (let elIndex: number = 0; elIndex < elementsToFind.elements['length']; elIndex++) {\r\n let element: object = elementsToFind.elements[elIndex];\r\n //let elementTitle: string = elementTypeMetadata.getTitle(this.jqueryBrowserDriverService, element);\r\n let elementTitle: string;\r\n // TO DO: need to EITHER use property 'customTextValues' OR 'names', not both, probably the latter.\r\n if ((elementsToFind.additionalElementInfo != null) && (elementsToFind.additionalElementInfo.customTextValues != null) && (elementsToFind.additionalElementInfo.customTextValues.length > elIndex))\r\n elementTitle = elementsToFind.additionalElementInfo.customTextValues[elIndex]\r\n else if ((elementsToFind.additionalElementInfo != null) && (elementsToFind.additionalElementInfo.names != null) && (elementsToFind.additionalElementInfo.names.length > elIndex))\r\n elementTitle = elementsToFind.additionalElementInfo.names[elIndex];\r\n else\r\n elementTitle = elementTypeMetadata.getTitle(this.jqueryBrowserDriverService, element, elementsToFind.additionalElementInfo);\r\n\r\n if ((elementTitle != null) && (elementTitle.trim() != '')) {\r\n if (elementsToFind.additionalElementInfo == null)\r\n elementsToFind.additionalElementInfo = new AdditionalElementInfo({});\r\n if (elementsToFind.additionalElementInfo.names == null)\r\n elementsToFind.additionalElementInfo.names = [];\r\n\r\n if (elementsToFind.additionalElementInfo.names.length <= elIndex)\r\n elementsToFind.additionalElementInfo.names.push(elementTitle);\r\n } else if ((elementsToFind.additionalElementInfo != null) && (elementsToFind.additionalElementInfo.names != null) && elementsToFind.additionalElementInfo.names.length > elIndex) {\r\n elementTitle = elementsToFind.additionalElementInfo.names[elIndex];\r\n }\r\n\r\n let singularElementType: string = StringUtil.singular(elementType);\r\n let elementInfo: HtmlElementInfo = new HtmlElementInfo(elementTypeMetadata, element, singularElementType, elementTitle);\r\n // Any additional information for this element?\r\n if (elementsToFind.additionalElementInfo != null)\r\n elementInfo.additionalElementInfo = elementsToFind.additionalElementInfo;\r\n // Get the element's subtype, if any.\r\n if ((elementsToFind.additionalElementInfo != null) && (elementsToFind.additionalElementInfo.elementSubtypeNames != null) && (elementsToFind.additionalElementInfo.elementSubtypeNames.length > elIndex))\r\n elementInfo.elementSubtype = elementsToFind.additionalElementInfo.elementSubtypeNames[elIndex];\r\n else if ((elementsToFind.additionalElementInfo != null) && (elementsToFind.additionalElementInfo.elementSubtypeName != null))\r\n elementInfo.elementSubtype = elementsToFind.additionalElementInfo.elementSubtypeName;\r\n // Get the element's display tab name.\r\n this.setDisplayTabNameForElementTypeSubtype(elementInfo);\r\n\r\n elements.push(elementInfo);\r\n }\r\n }\r\n }\r\n\r\n return elements;\r\n }\r\n\r\n protected setDisplayTabNameForElementTypeSubtype(htmlElementInfo: HtmlElementInfo): void {\r\n // Note: this initial implementation simply sets the element subtype.\r\n if (htmlElementInfo.elementSubtype != null) {\r\n if ((htmlElementInfo.elementSubtype == 'Properties') || (htmlElementInfo.elementSubtype == 'Favorites') || (htmlElementInfo.elementSubtype == 'Roles'))\r\n htmlElementInfo.displayTabName = 'Properties, etc.';\r\n else if ((htmlElementInfo.elementSubtype == 'Folder') || (htmlElementInfo.elementSubtype == 'Form'))\r\n htmlElementInfo.displayTabName = 'Folders and Forms';\r\n else\r\n htmlElementInfo.displayTabName = htmlElementInfo.elementSubtype;\r\n } \r\n else\r\n htmlElementInfo.displayTabName = htmlElementInfo.elementTypeMetadata.prettyElementTypeTitle != null ? htmlElementInfo.elementTypeMetadata.prettyElementTypeTitle : htmlElementInfo.elementType;\r\n }\r\n\r\n // Configuration methods available to derived classes.\r\n protected element(anElementSelector: string): IScriptableElement {\r\n return new ScriptableElement(anElementSelector, this);\r\n }\r\n public elementHasLinks(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.links_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasButtons(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.buttons_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasButtonsWithMatIcons(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.buttonsWithMatIcons_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasMatListItems(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.matListItems_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasMatIcons(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.matIcons_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasMatSelect(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.matSelect_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasInput(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n //this.setupSearchForElements(anElementSelector, 'input');\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.input_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasInputs(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n //this.setupSearchForElements(anElementSelector, 'input');\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.inputs_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasMatCheckBox(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.matCheckBox_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n public elementHasMatList(anElementSelector: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n this.setupSearchForElements(anElementSelector, HtmlElementTypeNames.matList_metadataKey, optionalAdditionalElementInfo);\r\n }\r\n\r\n // Methods for additional additional information for specified elements.\r\n public hasInnerTextSelector(anElementSelector: string, innerTextSelector: string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.innerTextSelector = innerTextSelector;\r\n }\r\n\r\n public elementHasCustomPreprocessingFunction(anElementSelector: string, preprocessingFunction: (driver: IBrowserDriver, element: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => void): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.customPreprocessingFunction = preprocessingFunction;\r\n }\r\n public elementHasCustomGetTextFunction(anElementSelector: string, getTextFunction: (driver: IBrowserDriver, element: object, existingTextValue: string, additionalElementInfo: IAdditionalElementInfo) => string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.customGetTextForFunction = getTextFunction;\r\n }\r\n public elementHasGetClickableElementFunction(anElementSelector: string, getClickableElementFunction: (element: object) => object): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.getClickableElementFunction = getClickableElementFunction;\r\n }\r\n\r\n public elementHasName(anElementSelector: string, name: string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.name = name;\r\n additionalElementInfo.names = [name];\r\n }\r\n public elementHasNames(anElementSelector: string, names: string[]): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.names = names;\r\n }\r\n public elementHasNameToPrettyNamesMap(anElementSelector: string, nameToPrettyNameMap: INameToPrettyNameMap): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.nameToPrettyNameMap = nameToPrettyNameMap;\r\n }\r\n public elementHasStandardNameToPrettyStandardName(anElementSelector: string, standardNameToPrettyStandardName: INameToPrettyNameMap): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.standardNameToPrettyStandardNameMap = standardNameToPrettyStandardName;\r\n }\r\n public elementHasElementSubtypesMaps(anElementSelector: string, elementsSubtypeMap: INameToPrettyNameMap): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.elementsSubtypeMap = elementsSubtypeMap;\r\n }\r\n public elementHasAddedDateTimeSuffix(anElementSelector: string, hasAddedDateTimeSuffix: boolean = true): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.hasAddedDateTimeSuffix = hasAddedDateTimeSuffix;\r\n }\r\n public elementHasOperationCompletedServiceMap(anElementSelector: string, operationCompletedServiceMap: IOperationCompletedServiceMap): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.operationCompletedServiceMap = operationCompletedServiceMap;\r\n }\r\n\r\n public elementHasToggleCheckboxMethodName(anElementSelector: string, methodName: string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.toggleCheckboxMethodName = methodName;\r\n }\r\n public elementHasSubtype(anElementSelector: string, subtype: string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.elementSubtypeName = subtype;\r\n }\r\n\r\n public elementAllowsZeroElements(anElementSelector: string): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.allowZeroElements = true;\r\n }\r\n public elementHasMaxTimeoutsLookingForScriptableElements(anElementSelector: string, maxTimeoutsLookingForScriptableElements: number): void {\r\n let additionalElementInfo: AdditionalElementInfo = this.getLastAdditionalElementInfoFor(anElementSelector);\r\n additionalElementInfo.maxTimeoutsLookingForScriptableElements = maxTimeoutsLookingForScriptableElements;\r\n }\r\n\r\n public usesEnum(enumName: string): IEnumReference {\r\n return new EnumReference(enumName, this);\r\n }\r\n public enumHasValues(enumName: string, values: string[]): void {\r\n let enumMetadata: EnumMetadata = new EnumMetadata(enumName, values);\r\n //this.scriptableElementsInfo.enumMetadataByName[enumName] = enumMetadata;\r\n\r\n ComponentMethodsService.registerOrUpdateEnum(enumName, enumMetadata);\r\n }\r\n public enumHasPrettyNames(enumName: string, prettyNames: string[]): void {\r\n //let enumMetadata: EnumMetadata = this.scriptableElementsInfo.enumMetadataByName[enumName];\r\n let enumMetadata: EnumMetadata = ComponentMethodsService.getEnumMetadata(enumName);\r\n if (enumMetadata == null)\r\n ScriptableBaseComponent.raiseException(`enumHasPrettyNames(): cannot assign pretty names to unknown enum '${enumName}'.`);\r\n\r\n enumMetadata.prettyNames = prettyNames;\r\n\r\n ComponentMethodsService.registerOrUpdateEnum(enumName, enumMetadata);\r\n }\r\n\r\n // Define a method for preprocessing elements defined in a conmponent's list view.\r\n // Define a custom get text function that will be moved into a list view component file.\r\n public setupSearchForListViewElements(toolbarMatIconsNameToPrettyNameMap: INameToPrettyNameMap, elementSubtypeMap: INameToPrettyNameMap = null, allowZeroContentItems: boolean = true) {//maxTimeoutsLookingForScriptableElements: number = null): void {\r\n /*\r\n let toolbarScriptableElement: IScriptableElement = this.element('#listViewRightIcons').hasMatIcons();\r\n if (toolbarMatIconsNameToPrettyNameMap != null)\r\n toolbarScriptableElement = toolbarScriptableElement.withNameToPrettyNameMap(toolbarMatIconsNameToPrettyNameMap).hasCustomPreprocessorFunction(this.preprocessListViewToolbarMatIcons).hasGetClickableElementFunction(this.getClickableListViewToolbarElementFunction);\r\n toolbarScriptableElement = toolbarScriptableElement.hasButtonsWithMatIcons();\r\n */\r\n\r\n let toolbarScriptableElement: IScriptableElement = this.element('#listViewRightIcons').hasButtonsWithMatIcons();\r\n if (toolbarMatIconsNameToPrettyNameMap != null)\r\n toolbarScriptableElement = toolbarScriptableElement.withNameToPrettyNameMap(toolbarMatIconsNameToPrettyNameMap).hasCustomPreprocessorFunction(this.preprocessListViewToolbarMatIcons);\r\n\r\n let standardNamesToPrettyStandardNames = {\r\n 'info': 'Properties',\r\n 'bootstrap-star': 'Favorites',\r\n 'person-fill': 'Roles'\r\n };\r\n\r\n let scriptableElement: IScriptableElement = this.element('#listViewContent').hasMatIcons().withStandardNameToPrettyStandardNameMap(standardNamesToPrettyStandardNames);\r\n if (elementSubtypeMap != null)\r\n scriptableElement = scriptableElement.withElementsSubtypeMap(elementSubtypeMap);\r\n if (allowZeroContentItems)\r\n scriptableElement = scriptableElement.allowsZeroElements();\r\n scriptableElement = scriptableElement.hasCustomPreprocessorFunction(this.preprocessListViewMatIcons);\r\n }\r\n protected preprocessListViewToolbarMatIcons = (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => {\r\n if ((elements['length'] != null) && (elements['length'] > 0)) {\r\n additionalElementInfo.customTextValues = [];\r\n additionalElementInfo.elementSubtypeNames = [];\r\n\r\n for (let index: number = 0; index < elements['length']; index++) {\r\n let element: object = elements[index];\r\n\r\n let existingTextValue: string = elementTypeMetadata.getTitle(driver, element);\r\n if (existingTextValue != null)\r\n existingTextValue = existingTextValue.trim();\r\n\r\n let customTextValue: string;\r\n if ((additionalElementInfo.nameToPrettyNameMap != null) && (additionalElementInfo.nameToPrettyNameMap[existingTextValue]))\r\n customTextValue = additionalElementInfo.nameToPrettyNameMap[existingTextValue];\r\n else\r\n customTextValue = existingTextValue;\r\n\r\n additionalElementInfo.customTextValues.push(customTextValue);\r\n additionalElementInfo.elementSubtypeNames.push('Toolbar Buttons');\r\n }\r\n }\r\n }\r\n /*\r\n protected preprocessListViewToolbarButtons = (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => {\r\n }\r\n */\r\n\r\n protected preprocessListViewMatIcons = (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => {\r\n if ((elements['length'] != null) && (elements['length'] > 0)) {\r\n additionalElementInfo.customTextValues = [];\r\n additionalElementInfo.elementSubtypeNames = [];\r\n\r\n for (let index: number = 0; index < elements['length']; index++) {\r\n let element: object = elements[index];\r\n\r\n let existingTextValue: string = elementTypeMetadata.getTitle(driver, element);\r\n if (existingTextValue != null)\r\n existingTextValue = existingTextValue.trim();\r\n\r\n let customTextValue: string = existingTextValue;\r\n let elementSubtype: string = '';\r\n\r\n // First handle the 'info' and 'bootstrap-star' icons that are pretty commonly used with a list view component.\r\n if ((existingTextValue == 'info') || (existingTextValue == 'bootstrap-star') || (existingTextValue == 'person-fill')) {\r\n // Handle the 'info' and 'bootstrap-star' icons.\r\n let ancestor: object = driver.getAncestor(element, 5);\r\n if (ancestor != null) {\r\n let namePlateDiv: object = driver.findElementIn(ancestor, 'div.tile-namePlate');\r\n if (namePlateDiv != null) {\r\n let nameDiv: object = driver.findElementIn(namePlateDiv, 'div.tile-name');\r\n if (nameDiv != null) {\r\n let listItemName: string = nameDiv['innerText'];\r\n if ((listItemName != null) && (listItemName.trim() != '')) {\r\n if ((additionalElementInfo != null) && (additionalElementInfo.standardNameToPrettyStandardNameMap != null) && (additionalElementInfo.standardNameToPrettyStandardNameMap[existingTextValue] != null)) {\r\n let prettyStandardName: string = additionalElementInfo.standardNameToPrettyStandardNameMap[existingTextValue];\r\n\r\n customTextValue = prettyStandardName + ': ' + listItemName;\r\n elementSubtype = prettyStandardName;\r\n } else {\r\n let customTextValue: string = listItemName.trim();\r\n elementSubtype = existingTextValue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n //} else if ((existingTextValue == 'collections') || (existingTextValue == 'library_books') || (existingTextValue == 'folder')) {\r\n } else if ((existingTextValue != null) && (existingTextValue.trim() != '')) {\r\n // Handle any icon that is used to depict the type of element defined in a list view.\r\n let ancestor: object = driver.getAncestor(element, 3);\r\n if (ancestor != null) {\r\n let namePlateDiv: object = driver.findElementIn(ancestor, 'div.tile-namePlate');\r\n if (namePlateDiv != null) {\r\n let nameDiv: object = driver.findElementIn(namePlateDiv, 'div.tile-name');\r\n if (nameDiv != null) {\r\n let listItemName: string = nameDiv['innerText'];\r\n customTextValue = listItemName.trim();\r\n\r\n if ((listItemName != null) && (listItemName.trim() != '')) {\r\n if ((additionalElementInfo != null) && (additionalElementInfo.elementsSubtypeMap != null))\r\n elementSubtype = additionalElementInfo.elementsSubtypeMap[existingTextValue];\r\n else {\r\n elementSubtype = null;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n //console.log('Need to handle another icon name ...');\r\n }\r\n\r\n additionalElementInfo.customTextValues.push(customTextValue);\r\n additionalElementInfo.elementSubtypeNames.push(elementSubtype);\r\n }\r\n }\r\n }\r\n\r\n protected getClickableListViewToolbarElementFunction = (element: object): object => {\r\n let result: object = null;\r\n\r\n if ((element['parentNode'] != null) && (element['parentNode']['parentNode'] != null))\r\n result = element['parentNode']['parentNode'];\r\n else\r\n result = element;\r\n\r\n return result;\r\n }\r\n\r\n // Error handling.\r\n protected throwError(error: string): void {\r\n throw error;\r\n }\r\n\r\n // Callback methods that can be overriden by derived classes.\r\n protected scriptableElementInitialized(scriptableElementObject: object): void {\r\n // Note: this default implementation does nothing by design.\r\n }\r\n\r\n protected elementsInitialized(elementSelector: string, elements: object, elementTypeMetadata: ElementTypeMetadata) {\r\n let message: string = `elementsInitialized(): found ${elements['length']} ${elementTypeMetadata.htmlElementSelector}(s).`;\r\n this.logMessage(message);\r\n }\r\n\r\n protected initializationCompleted(): void {\r\n let message: string = `initializationCompleted(): status = '${this.InitializationStatus}'.`;\r\n this.logMessage(message);\r\n\r\n if (this.initializationStatus == ScriptableComponentStatus.InitializationFailed) {\r\n //let errorMessage: string = `Initialization failed for component '${this.tagName}'.`;\r\n //alert(errorMessage);\r\n }\r\n }\r\n\r\n public get InitializationStatus(): ScriptableComponentStatus {\r\n return this.initializationStatus;\r\n }\r\n protected set InitializationStatus(value: ScriptableComponentStatus) {\r\n this.initializationStatus = value;\r\n }\r\n\r\n public getMatInputWithElement(element: object): MatInput {\r\n let resultMatInput: MatInput = null;\r\n\r\n if ((this.matInputs != null) && (this.matInputElementRefs != null) &&\r\n (this.matInputs.length == this.matInputElementRefs.length)) {\r\n let matInputsArray: MatInput[] = this.matInputs.toArray();\r\n let matInputElementRefsArray: ElementRef[] = this.matInputElementRefs.toArray();\r\n\r\n if ((matInputsArray != null) && (matInputsArray.length > 0)) {\r\n for (let index: number = 0; index < matInputsArray.length; index++) {\r\n let matInput: MatInput = matInputsArray[index];\r\n let matInputElementRef: ElementRef = matInputElementRefsArray[index];\r\n\r\n if (element == matInputElementRef.nativeElement) {\r\n resultMatInput = matInput;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return resultMatInput;\r\n }\r\n\r\n // Helper methods.\r\n private findScriptableElements(): void {\r\n let timeout = setInterval(() => {\r\n this.watchTimeoutInfo.timeoutsCompleted++;\r\n\r\n let remainingElementsToFind: ScriptableElementsToFind[] = this.scriptableElementsInfo.scriptableElementsToFind.filter(se => !se.elementsFound);\r\n let allElementsFound: boolean = this.handleFindElementsTimeout(remainingElementsToFind);\r\n\r\n if (this.initializationStatus == ScriptableComponentStatus.InitializationFailed) {\r\n this.handleInitializedCompleted(timeout, ScriptableComponentStatus.InitializationFailed);\r\n } else if (allElementsFound) {\r\n this.handleInitializedCompleted(timeout, ScriptableComponentStatus.InitializationComplete);\r\n } else if (this.watchTimeoutInfo.timeoutsCompleted >= this.watchTimeoutInfo.maxTimeoutsLookingForScriptableElements) {\r\n let canKeepLooking: boolean = true;\r\n\r\n for (let index: number = 0; index < remainingElementsToFind.length; index++) {\r\n let remainingElementsInfo: ScriptableElementsToFind = remainingElementsToFind[index];\r\n\r\n if ((remainingElementsInfo.additionalElementInfo != null) &&\r\n (remainingElementsInfo.additionalElementInfo.allowZeroElements == true))\r\n {\r\n remainingElementsInfo.elementsFound = true; // Will get picked up on the next timeout.\r\n } else if ((remainingElementsInfo.additionalElementInfo == null) ||\r\n (remainingElementsInfo.additionalElementInfo.maxTimeoutsLookingForScriptableElements == null) ||\r\n (this.watchTimeoutInfo.timeoutsCompleted >= remainingElementsInfo.additionalElementInfo.maxTimeoutsLookingForScriptableElements))\r\n {\r\n canKeepLooking = false;\r\n\r\n let debugElements: any = null;\r\n for (let index: number = 0; index < remainingElementsToFind.length; index++) {\r\n let elementsToFind = remainingElementsToFind[index];\r\n debugElements = this.jqueryBrowserDriverService.findElementsIn(elementsToFind.anElementSelector, elementsToFind.elementTypeMetadata.htmlElementSelector);\r\n }\r\n \r\n break;\r\n }\r\n }\r\n\r\n if (!canKeepLooking)\r\n this.handleInitializedCompleted(timeout, ScriptableComponentStatus.InitializationFailed);\r\n } \r\n }, this.watchTimeoutInfo.timeoutInMilliseconds);\r\n }\r\n\r\n private handleInitializedCompleted(timeout: any, status: ScriptableComponentStatus): void {\r\n clearInterval(timeout);\r\n this.initializationStatus = status; // ScriptableComponentStatus.InitializationFailed;\r\n this.initializationCompleted();\r\n this.notifyInitializationCompleted();\r\n }\r\n\r\n private handleFindElementsTimeout(remainingElementsToFind: ScriptableElementsToFind[]): boolean {\r\n let findElementsWorkCompleted: boolean = true; // Will set to false if we find this not to be true.\r\n\r\n for (let index: number = 0; index < remainingElementsToFind.length; index++) {\r\n let elementsToFind: ScriptableElementsToFind = remainingElementsToFind[index];\r\n\r\n elementsToFind.elements = this.jqueryBrowserDriverService.findElementsIn(elementsToFind.anElementSelector, elementsToFind.elementTypeMetadata.htmlElementSelector);\r\n if (this.canClearIntervalFor(elementsToFind.elements, elementsToFind.elementTypeMetadata)) {\r\n elementsToFind.elementsFound = true;\r\n\r\n this.processAnyAdditionalElementInfoFor(elementsToFind);\r\n\r\n this.elementsInitialized(elementsToFind.anElementSelector, elementsToFind.elements, elementsToFind.elementTypeMetadata);\r\n } else\r\n findElementsWorkCompleted = false;\r\n }\r\n\r\n return findElementsWorkCompleted;\r\n }\r\n\r\n private findAnyScriptableComponentMethods(listOfScriptableElements: ScriptableElementsToFind[]): void {\r\n //let allClassMethods: IComponentNameToMethodsMetadata = ComponentMethodsService.getAllComponentMethods();\r\n let myClassName: string = this.constructor.name;\r\n let componentMethodsMetadata: ComponentMethodsMetadata = ComponentMethodsService.getComponentMethodsMetadataFor(myClassName);\r\n\r\n if ((componentMethodsMetadata != null) && (componentMethodsMetadata.methodsMetadata.length > 0)) {\r\n let methodsElementTypeMetadata: ElementTypeMetadata = this.htmlElementTypeService.getMetadataForElementType(HtmlElementTypeNames.componentMethods_metadataKey);\r\n\r\n let methodsScriptableElements: ScriptableElementsToFind = new ScriptableElementsToFind('na', methodsElementTypeMetadata);\r\n methodsScriptableElements.elements = componentMethodsMetadata.methodsMetadata;\r\n methodsScriptableElements.elementsFound = true;\r\n\r\n listOfScriptableElements.push(methodsScriptableElements);\r\n }\r\n }\r\n\r\n private canClearIntervalFor(elements: object, typeMetadata: ElementTypeMetadata): boolean {\r\n let canClear: boolean = elements != null;\r\n\r\n if (typeMetadata.elementCountExpected == ElementCountExpected.Singular) {\r\n canClear = elements['length'] == 1;\r\n\r\n if ((!canClear) && (elements['length'] > 1))\r\n this.initializationStatus = ScriptableComponentStatus.InitializationFailed;\r\n } else if (typeMetadata.elementCountExpected == ElementCountExpected.Singular_or_Plural) {\r\n canClear = elements['length'] >= 1;\r\n } else if (typeMetadata.elementCountExpected == ElementCountExpected.Plural) {\r\n canClear = elements['length'] > 1;\r\n }\r\n\r\n return canClear;\r\n }\r\n\r\n private logMessage(message: string): void {\r\n if (this.componentHierarchyService.LogToConsole) {\r\n console.log(message); \r\n } \r\n }\r\n\r\n private setupSearchForElements(anElementSelector: string, metadataKey: string, optionalAdditionalElementInfo: AdditionalElementInfo = null): void {\r\n let elementTypesMetadata = this.htmlElementTypeService.getElementTypeMetadata();\r\n let elementTypeMetadata: ElementTypeMetadata = elementTypesMetadata.find(md => md.metadataKey == metadataKey);\r\n\r\n if (elementTypeMetadata == null)\r\n ScriptableBaseComponent.raiseException(`setupSearchForElements(): cannot find element type metadata for key '${metadataKey}'.`);\r\n\r\n let searchCriteria: ScriptableElementsToFind = new ScriptableElementsToFind(anElementSelector, elementTypeMetadata, optionalAdditionalElementInfo);\r\n this.scriptableElementsInfo.scriptableElementsToFind.push(searchCriteria);\r\n }\r\n\r\n private notifyInitializationCompleted(): void {\r\n this.componentHierarchyService.componentInitialized(this, this.InitializationStatus);\r\n }\r\n\r\n private getLastAdditionalElementInfoFor(anElementSelector: string): AdditionalElementInfo {\r\n // Note: this method finds the LAST instance of AdditionalElementInfo for a given HTML selector.\r\n //\r\n // This ensures that the method returns the one that the caller is presently configuring.\r\n //let elementsInfo: ScriptableElementsToFind = this.scriptableElementsInfo.scriptableElementsToFind.find(sei => sei.anElementSelector == anElementSelector);\r\n let listOfElementsInfo: ScriptableElementsToFind[] = this.scriptableElementsInfo.scriptableElementsToFind.filter(sei => sei.anElementSelector == anElementSelector);\r\n if ((listOfElementsInfo == null) || (listOfElementsInfo.length == 0))\r\n throw `ScriptableBaseComponent.getAdditionalElementInfoFor(): cannot find any search criteria for element select '${anElementSelector}'.`;\r\n let elementsInfo: ScriptableElementsToFind = listOfElementsInfo[listOfElementsInfo.length - 1];\r\n\r\n if (elementsInfo.additionalElementInfo == null)\r\n elementsInfo.additionalElementInfo = new AdditionalElementInfo({});\r\n\r\n return elementsInfo.additionalElementInfo;\r\n }\r\n\r\n private processAnyAdditionalElementInfoFor(elementsToFind: ScriptableElementsToFind): void {\r\n let testValue: string = null; // Use to test operations performed in this method.\r\n\r\n if (elementsToFind.additionalElementInfo != null) {\r\n let numElements: number = 0;\r\n if ((elementsToFind.elements != null) && (elementsToFind.elements['length'] != null))\r\n numElements = elementsToFind.elements['length'];\r\n\r\n // If provided, execute a pre-processing function.\r\n if ((elementsToFind.additionalElementInfo.customPreprocessingFunction != null) && (numElements > 0)) {\r\n elementsToFind.additionalElementInfo.customPreprocessingFunction(this.jqueryBrowserDriverService, elementsToFind.elements, elementsToFind.elementTypeMetadata, elementsToFind.additionalElementInfo);\r\n }\r\n\r\n // If provided, set the display name(s) assign to this element.\r\n if ((elementsToFind.additionalElementInfo.name != null) && (numElements > 0)) {\r\n this.jqueryBrowserDriverService.setDataAttributeValue(elementsToFind.elements[0], HtmlMetadataTagNames.elementName_dataAttribute, elementsToFind.additionalElementInfo.name);\r\n testValue = this.jqueryBrowserDriverService.getDataAttributeValue(elementsToFind.elements[0], HtmlMetadataTagNames.elementName_dataAttribute);\r\n } \r\n\r\n if ((elementsToFind.additionalElementInfo.names != null) && (numElements > 0)) {\r\n let numNames: number = elementsToFind.additionalElementInfo.names.length;\r\n\r\n let nameIndex: number = 0;\r\n while ((nameIndex < numNames) && (nameIndex < numElements)) {\r\n let name: string = elementsToFind.additionalElementInfo.names[nameIndex];\r\n this.jqueryBrowserDriverService.setDataAttributeValue(elementsToFind.elements[0], HtmlMetadataTagNames.elementName_dataAttribute, name);\r\n testValue = this.jqueryBrowserDriverService.getDataAttributeValue(elementsToFind.elements[0], HtmlMetadataTagNames.elementName_dataAttribute);\r\n\r\n nameIndex++;\r\n }\r\n } \r\n }\r\n }\r\n\r\n private static getMetadataForElementType(htmlElementTypeService: HtmlElementTypeService, metadataKey: string): ElementTypeMetadata {\r\n let elementTypesMetadata = htmlElementTypeService.getElementTypeMetadata();\r\n let elementTypeMetadata: ElementTypeMetadata = elementTypesMetadata.find(md => md.metadataKey == metadataKey);\r\n\r\n if (elementTypeMetadata == null)\r\n ScriptableBaseComponent.raiseException(`getMetadataForElementType(): cannot find element type metadata for key '${metadataKey}'.`);\r\n\r\n return elementTypeMetadata;\r\n }\r\n\r\n private static raiseException(errorMessage: string): void {\r\n throw errorMessage;\r\n }\r\n}\r\n","

scriptable-base works!

\n","\r\n \r\n
\r\n \r\n
\r\n \r\n

A component's nodes display here.

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{this.getElementTitle(elementInfo)}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n

{{this.ComponentNoElementsMessage}}

\r\n
\r\n \r\n
\r\n\r\n

A selected element displays here.

\r\n \r\n \r\n
\r\n
\r\n\r\n","import { Component, OnInit, OnChanges, SimpleChanges, SimpleChange, Input, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';\r\n//import { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\n\r\nimport { HtmlElementInfo } from '../../models/component-scripting/html-element-info.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\n//import { ComponentHierarchyService, IComponentHierarchyChanged } from '../../services/component-hierarchy.service';\r\nimport { StringUtil } from '../../utility-classes/string.util';\r\nimport { ISelectedElementInfo } from '../../models/component-scripting/iselected-element-info.interface';\r\nimport { SelectedComponentData } from '../../models/component-scripting/selected-component-data.model';\r\nimport { JQueryBrowserDriverService } from '../../services/jquery-browser-driver.service';\r\nimport { HtmlElementTypeService } from '../../services/html-element-type.service';\r\nimport { ElementTypeMetadata } from '../../models/component-scripting/element-type-metadata.model';\r\nimport { SelectedNodeElementComponent } from '../selected-node-element/selected-node-element.component';\r\nimport { UITestActionRecorderService } from '../../services/ui-test-action-recorder.service';\r\nimport { ElementTypeInfo } from '../../models/component-scripting/element-type-info.model';\r\n\r\n@Component({\n selector: 'app-selected-component-info',\n templateUrl: './selected-component-info.component.html',\n styleUrls: ['./selected-component-info.component.scss'],\n standalone: false\n})\nexport class SelectedComponentInfoComponent implements OnInit, OnChanges {\n // Properties.\r\n @Input() selectedComponent: ITestableComponent = null;\r\n\r\n private selectedComponentInfo: SelectedComponentData = null;\r\n\r\n @ViewChild('selectedNodeElementComponent') selectedNodeElementComponent: SelectedNodeElementComponent;\r\n\r\n // Constructor.\n public constructor(private jqueryBrowserDriverService: JQueryBrowserDriverService,\r\n private htmlElementTypeService: HtmlElementTypeService,\r\n private uiTestActionRecorderService: UITestActionRecorderService)\r\n {\r\n }\n\n public ngOnInit(): void {\n }\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectedComponent'] != null) {\r\n let simpleChange: SimpleChange = changes['selectedComponent'];\r\n if (simpleChange != null) {\r\n let testableComponent: ITestableComponent = simpleChange.currentValue;\r\n if (testableComponent != null)\r\n this.handleComponentSelected(testableComponent);\r\n else\r\n this.selectedComponentInfo = null;\r\n }\r\n }\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public get ComponentSelected(): boolean {\r\n return this.selectedComponentInfo != null;\r\n }\r\n public get SelectedComponent(): ITestableComponent {\r\n return this.selectedComponentInfo != null ? this.selectedComponentInfo.component : null;\r\n }\r\n public get SelectedElementInfo(): ISelectedElementInfo {\r\n let selectedElementInfo: ISelectedElementInfo = this.selectedComponentInfo;\r\n return selectedElementInfo;\r\n }\r\n public get ComponentHasElements(): boolean {\r\n let hasElements: boolean = false;\r\n\r\n if (this.selectedComponentInfo != null) {\r\n hasElements = this.selectedComponentInfo.componentElementTypes.length > 0;\r\n }\r\n\r\n return hasElements;\r\n }\r\n public get ComponentNoElementsMessage(): string {\r\n let message: string = '';\r\n\r\n if ((this.selectedComponentInfo != null) && (!this.ComponentHasElements))\r\n message = `Component ${this.selectedComponentInfo.component.tagName.toLowerCase()} has no elements`;\r\n\r\n return message;\r\n }\r\n public get ComponentElementTypes(): string[] {\r\n return this.selectedComponentInfo.componentElementTypes;\r\n }\r\n public getElementTypeTitle(elementType: string): string {\r\n // Lookup the element type metadata for this element type.\r\n let elementTypeMetadata: ElementTypeMetadata = this.htmlElementTypeService.getMetadataForElementType(elementType);\r\n return (elementTypeMetadata.prettyElementTypeTitle != null ? elementTypeMetadata.prettyElementTypeTitle : StringUtil.capitalize(elementType));\r\n }\r\n public getComponentElementsOfType(elementType: string): HtmlElementInfo[] {\r\n return this.selectedComponentInfo.mapOfElementsByType[elementType];\r\n }\r\n public getElementTitle(elementInfo: HtmlElementInfo): string {\r\n return elementInfo.elementTitle;\r\n }\r\n public getElementTooltip(elementInfo: HtmlElementInfo): string {\r\n let tooltip = elementInfo.elementSubtype != null ? `${elementInfo.elementTitle} (${elementInfo.elementSubtype})` : `${elementInfo.elementTitle}`;\r\n // TO DO: ADD AN ELEMENT SUB-TYPE, IF ONE HAS BEEN SPECIFIED.\r\n return tooltip;\r\n }\r\n public get TooltipPosition(): TooltipPosition {\r\n return 'right';\r\n }\r\n\r\n public get ElementSelected(): boolean {\r\n return this.selectedComponentInfo != null ? this.selectedComponentInfo.selectedElement != null : false;\r\n }\r\n\r\n public get ComponentDisplayTabNames(): string[] {\r\n let tabNames: string[] = [];\r\n\r\n if (this.selectedComponentInfo != null) {\r\n for (let tabName in this.selectedComponentInfo.mapOfElementTypesByTabName)\r\n tabNames.push(tabName);\r\n }\r\n\r\n return tabNames;\r\n }\r\n public getComponentElementsForTab(displayTabName: string): HtmlElementInfo[] {\r\n let elementData: HtmlElementInfo[] = [];\r\n\r\n if (this.selectedComponentInfo != null) {\r\n let tabElementInfo: ElementTypeInfo = this.selectedComponentInfo.mapOfElementTypesByTabName[displayTabName];\r\n\r\n if (tabElementInfo.elements != null) {\r\n elementData = tabElementInfo.elements;\r\n } else {\r\n let elementsForType: HtmlElementInfo[] = this.selectedComponentInfo.mapOfElementsByType[tabElementInfo.elementType];\r\n\r\n if (elementsForType != null) {\r\n if ((tabElementInfo.elementSubtypes != null) && (tabElementInfo.elementSubtypes.length > 0))\r\n elementData = elementsForType.filter(e => (e.displayTabName == displayTabName) && tabElementInfo.elementSubtypes.includes(e.elementSubtype));\r\n else\r\n elementData = elementsForType.filter(e => (e.displayTabName == displayTabName));\r\n }\r\n }\r\n }\r\n\r\n return elementData;\r\n }\r\n \r\n // Handle control events.\r\n public elementTypeIndexChanged(eventData: any): void {\r\n // NOTE: THIS METHOD IS PRESENTLY A NOOP.\r\n }\r\n public onSelectedElementChanged(eventData: any): void {\r\n let elementType: string = this.selectedComponentInfo.componentElementTypes[this.selectedComponentInfo.selectedElementTypeIndex];\r\n let elements: HtmlElementInfo[] = this.selectedComponentInfo.mapOfElementsByType[elementType];\r\n\r\n this.selectedComponentInfo.selectedElement = elements.find(e => e.elementTitle == this.selectedComponentInfo.selectedElementName);\r\n }\r\n\r\n public onSelectedElementClicked(elementType: string, elementInfo: HtmlElementInfo): void {\r\n this.selectedComponentInfo.selectedElementName = elementInfo.elementTitle;\r\n\r\n // Note: disabling the following line as the information logged would seem to be unnecessary.\r\n //this.uiTestActionRecorderService.selectElement(elementType, elementInfo);\r\n\r\n //let elementType: string = this.selectedComponentInfo.componentElementTypes[this.selectedComponentInfo.selectedElementTypeIndex];\r\n let elements: HtmlElementInfo[] = this.selectedComponentInfo.mapOfElementsByType[elementType];\r\n if (elements == null)\r\n throw `SelectComponentInfoComponent.onSelectedElementClicked(): could not find elements of type '${elementType}'.`;\r\n this.selectedComponentInfo.selectedElement = elements.find(e => e.elementTitle == this.selectedComponentInfo.selectedElementName);\r\n\r\n if (this.selectedComponentInfo.selectedElement != null) {\r\n this.selectedComponentInfo.selectedElementHasProperties = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element) &&\r\n (this.selectedComponentInfo.selectedElement.elementTypeMetadata.getProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element).length > 0);\r\n this.selectedComponentInfo.selectedElementHasActions = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasActions(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n this.selectedComponentInfo.selectedElementHasInputs = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n }\r\n }\r\n public onSelectedElementDoubleClicked(elementType: string, elementInfo: HtmlElementInfo): void {\r\n if (elementInfo.elementTypeMetadata.hasActions(this.jqueryBrowserDriverService, elementInfo.element)) {\r\n if (this.selectedNodeElementComponent != null)\r\n this.selectedNodeElementComponent.onSelectedElementActionClicked();\r\n else {\r\n let getClickableElementFunction: (element: object) => object = elementInfo.additionalElementInfo != null ? elementInfo.additionalElementInfo.getClickableElementFunction : null;\r\n //elementInfo.elementTypeMetadata.click(this.jqueryBrowserDriverService, this.selectedComponent, elementInfo.element, getClickableElementFunction);\r\n elementInfo.elementTypeMetadata.click(this.jqueryBrowserDriverService, this.uiTestActionRecorderService, this.selectedComponent, elementInfo, elementInfo.element, getClickableElementFunction);\r\n } \r\n } else if (elementInfo.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, elementInfo.element)) {\r\n if (this.selectedNodeElementComponent != null)\r\n this.selectedNodeElementComponent.editSelectedInputValue();\r\n }\r\n }\r\n\r\n public onElementInfoClicked(elementInfo: HtmlElementInfo): void {\r\n this.onSelectedElementClicked(elementInfo.elementType, elementInfo);\r\n }\r\n public onElementInfoDoubleClicked(elementInfo: HtmlElementInfo): void {\r\n this.onSelectedElementDoubleClicked(elementInfo.elementType, elementInfo);\r\n }\r\n\r\n public getHtmlElementInfoFor(elementMetadataKey: string, elementSubtype: string, elementTitle: string, callNumber: number = 0): HtmlElementInfo {\r\n let htmlElementInfo: HtmlElementInfo = null;\r\n\r\n if (this.selectedComponentInfo != null) { \r\n if (elementSubtype != null) {\r\n let elementTypeInfo: ElementTypeInfo = this.selectedComponentInfo.mapOfElementTypesByTabName[elementSubtype];\r\n if ((elementTypeInfo != null) && (elementTypeInfo.elements != null)) {\r\n //htmlElementInfo = elementTypeInfo.elements.find(e => e.elementTitle == elementTitle);\r\n htmlElementInfo = elementTypeInfo.elements.find(e => e.elementTitle.trim() == elementTitle);\r\n } \r\n } else {\r\n let elements: HtmlElementInfo[] = this.selectedComponentInfo.mapOfElementsByType[elementMetadataKey];\r\n if (elements != null) {\r\n //htmlElementInfo = elements.find(e => e.elementTitle == elementTitle);\r\n htmlElementInfo = elements.find(e => e.elementTitle.trim() == elementTitle);\r\n } \r\n }\r\n }\r\n\r\n // If the looked up information is null, an error, repeat this call one time to facilitate troubleshooting.\r\n if ((htmlElementInfo == null) && (callNumber == 0))\r\n this.getHtmlElementInfoFor(elementMetadataKey, elementSubtype, elementTitle, 1);\r\n\r\n return htmlElementInfo;\r\n }\r\n\r\n // Helper methods.\r\n private handleComponentSelected(component: ITestableComponent): void {\r\n this.selectedComponentInfo = SelectedComponentData.handleComponentSelected(component, this.uiTestActionRecorderService);\r\n } \n}\n","import { Component, OnInit, Inject } from '@angular/core';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntypedFormControl } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nexport class EditValueResult {\r\n public value: string;\r\n public hasDateAndTimeSuffix: boolean = false;\r\n}\r\n\n@Component({\n selector: 'app-edit-value',\n templateUrl: './edit-value.dialog.html',\n styleUrls: ['./edit-value.dialog.scss'],\n standalone: false\n})\nexport class EditValueDialog implements OnInit {\r\n /*\r\n private value: string;\r\n private hasDateAndTimeSuffix: boolean = false;\r\n */\r\n private editValueResult: EditValueResult = new EditValueResult();\r\n private valueFormControl: UntypedFormControl = null;\r\n private hasDateTimeSuffixFormControl: UntypedFormControl = null;\n\n public constructor(@Inject(MAT_DIALOG_DATA) public existingValue: string, private dialogRef: MatDialogRef) {\r\n }\n\n public ngOnInit(): void {\r\n this.editValueResult.value = this.existingValue;\r\n\r\n this.setupFormControls();\n }\r\n\r\n // Methods called by HTML code.\r\n public get Value(): string {\r\n return this.editValueResult.value;\r\n }\r\n /*\r\n public set Value(value: string) {\r\n this.value = value;\r\n }\r\n\r\n public get HasDateAndTimeSuffix(): boolean {\r\n return this.hasDateAndTimeSuffix;\r\n }\r\n public set HasDateAndTimeSuffix(value: boolean) {\r\n this.hasDateAndTimeSuffix = value;\r\n }\r\n */\r\n\r\n public get ValueFormControl(): UntypedFormControl {\r\n return this.valueFormControl;\r\n }\r\n public get HasDateTimeSuffixFormControl(): UntypedFormControl {\r\n return this.hasDateTimeSuffixFormControl;\r\n }\r\n\r\n public get OkButtonDisabled(): boolean {\r\n return (this.editValueResult.value == null) || (this.editValueResult.value.trim() == '');\r\n }\r\n\r\n // Handle control events.\r\n public okButtonClicked(): void {\r\n this.dialogRef.close(this.editValueResult);\r\n }\r\n\r\n public handleOnModelChange(propertyName: string): void {\r\n }\r\n\r\n // Helper methods.\r\n private setupFormControls(): void {\r\n let valueControlProperties = {\r\n value: this.editValueResult.value,\r\n disabled: false\r\n };\r\n this.valueFormControl = new UntypedFormControl(valueControlProperties);\r\n this.valueFormControl.valueChanges.subscribe(updatedValue => {\r\n this.editValueResult.value = updatedValue;\r\n });\r\n\r\n this.hasDateTimeSuffixFormControl = new UntypedFormControl({ value: false, disabled: false });\r\n this.hasDateTimeSuffixFormControl.valueChanges.subscribe(updatedValue => {\r\n this.editValueResult.hasDateAndTimeSuffix = updatedValue;\r\n })\r\n }\n}\n","

\r\n Edit Value\r\n

\r\n\r\n
\r\n
\r\n \r\n Value\r\n \r\n \r\n\r\n \r\n Add Date/Time Suffix\r\n \r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n","\r\n
{{this.SelectedElementName}}
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, OnInit, SimpleChanges, Input, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\n//import { MenuItem, TreeNode } from 'primeng/api';\n//import { Tree } from 'primeng/tree';\nimport { TooltipPosition } from '@angular/material/tooltip';\n\n//import { HtmlElementInfo } from '../../models/component-scripting/html-element-info.model';\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\nimport { ComponentHierarchyService, IComponentHierarchyChanged } from '../../services/component-hierarchy.service';\n//import { ElementTypeMetadata } from '../../models/component-scripting/element-type-metadata.model';\r\nimport { HtmlPropertyValue } from '../../models/component-scripting/html-property-value.model';\r\nimport { HtmlInputValue } from '../../models/component-scripting/html-input-value.model';\n//import { HtmlElementTypeService } from '../../services/html-element-type.service';\nimport { EditValueDialog, EditValueResult } from '../../dialogs/edit-value/edit-value.dialog';\n//import { DisplayContentData, DisplayContentDialog, DisplayContentDialogInitData } from '../../dialogs/display-content/display-content.dialog';\nimport { UITestActionRecorderService } from '../../services/ui-test-action-recorder.service';\n//import { UITestExecutionService } from '../../services/ui-test-execution.service';\n//import { ServiceClassCatalogueService, ServiceClassInfo } from '../../services/service-class-catalogue.service';\nimport { ISelectedElementInfo } from '../../models/component-scripting/iselected-element-info.interface';\r\nimport { JQueryBrowserDriverService } from '../../services/jquery-browser-driver.service';\r\n\n@Component({\n selector: 'app-selected-node-element',\n templateUrl: './selected-node-element.component.html',\n styleUrls: ['./selected-node-element.component.scss'],\n standalone: false\n})\nexport class SelectedNodeElementComponent implements OnInit {\r\n @Input() selectedComponentInfo: ISelectedElementInfo = null;\n\n public constructor(private componentHierarchyService: ComponentHierarchyService,\r\n private jqueryBrowserDriverService: JQueryBrowserDriverService,\r\n private uiTestActionRecorderService: UITestActionRecorderService,\r\n private dialog: MatDialog) {\r\n }\n\n public ngOnInit(): void {\n }\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectedComponentInfo'] != null) {\r\n let testableComponent: ITestableComponent = changes['selectedComponentInfo'];\r\n //this.handleComponentSelected(testableComponent);\r\n }\r\n }\r\n\r\n // Define/implement methods called by my HTML code.\r\n public get ElementSelected(): boolean {\r\n return this.selectedComponentInfo != null ? this.selectedComponentInfo.selectedElement != null : false;\r\n }\r\n public get SelectedElementType(): string {\r\n return this.selectedComponentInfo.selectedElement != null ? this.selectedComponentInfo.selectedElement.elementType : null;\r\n }\r\n public get SelectedElementName(): string {\r\n return this.selectedComponentInfo.selectedElement != null ? this.selectedComponentInfo.selectedElement.elementTitle : null;\r\n }\r\n public set SelectedElementName(values: string) {\r\n this.selectedComponentInfo.selectedElementName = values[0];\r\n /*\r\n let elementType: string = this.selectedComponentInfo.componentElementTypes[this.selectedComponentInfo.selectedElementTypeIndex];\r\n let elements: HtmlElementInfo[] = this.selectedComponentInfo.mapOfElementsByType[elementType];\r\n this.selectedComponentInfo.selectedElement = elements.find(e => e.elementTitle == this.selectedComponentInfo.selectedElementName);\r\n */\r\n }\r\n public get SelectedElementHasProperties(): boolean {\r\n //let metadata = this.htmlElementTypeService.getMetadataForElementType(this.selectedComponentInfo.selectedElement.elementType);\r\n let hasProperties: boolean = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n if (hasProperties) {\r\n let properties: HtmlPropertyValue[] = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n if ((properties == null) || (properties.length == 0))\r\n hasProperties = false;\r\n }\r\n\r\n return hasProperties;\r\n }\r\n public get CachedSelectedElementHasProperties(): boolean {\r\n return this.selectedComponentInfo.selectedElementHasProperties;\r\n }\r\n public get SelectedElementProperties(): HtmlPropertyValue[] {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n if (this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element))\r\n properties = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getProperties(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n return properties;\r\n }\r\n public get SelectedElementHasActions(): boolean {\r\n return this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasActions(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n }\r\n public get CachedSelectedElementHasActions(): boolean {\r\n return this.selectedComponentInfo.selectedElementHasActions;\r\n }\r\n public get SelectedElementActions(): string[] {\r\n let actions: string[] = [];\r\n\r\n if (this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasActions(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element))\r\n actions = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getActions(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element)\r\n\r\n return actions;\r\n }\r\n public get SelectedElementHasInputs(): boolean {\r\n return this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n }\r\n public get CachedSelectedElementHasInputs(): boolean {\r\n return this.selectedComponentInfo.selectedElementHasInputs;\r\n }\r\n public get SelectedElementInputs(): HtmlInputValue[] {\r\n let inputs: HtmlInputValue[] = [];\r\n\r\n if (this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element))\r\n inputs = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n return inputs;\r\n }\r\n public get SelectedElementInput(): HtmlInputValue {\r\n let inputs = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n return inputs[0];\r\n }\r\n public get SelectedElementInputValue(): string {\r\n let inputs = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n return inputs[0].inputValue;\r\n }\r\n public getInputName(input: HtmlInputValue): string {\r\n return input.inputTitle;\r\n }\r\n /*\r\n public getInputValue(input: HtmlInputValue): string {\r\n return input.inputValue;\r\n }\r\n */\r\n public get TooltipPosition(): TooltipPosition {\r\n return 'right';\r\n }\r\n public get SelectedElementIsInput(): boolean {\r\n let isInput: boolean = false;\r\n\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.selectedElement != null))\r\n isInput = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n return isInput;\r\n }\r\n\r\n // Handle control events.\r\n public onSelectedElementActionClicked(): void {\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.selectedElement != null) && (this.selectedComponentInfo.selectedElement.element != null)) {\r\n //this.uiTestActionRecorderService.elementActionClicked(this.selectedComponentInfo.selectedElement.elementTitle);\r\n //this.selectedComponentInfo.selectedElement.elementTypeMetadata.recordActionClick(this.uiTestActionRecorderService, this.selectedComponentInfo.selectedElement);\r\n\r\n let getClickableElementFunction: (element: object) => object = this.selectedComponentInfo.selectedElement.additionalElementInfo != null ? this.selectedComponentInfo.selectedElement.additionalElementInfo.getClickableElementFunction : null;\r\n if ((this.selectedComponentInfo.selectedElement.additionalElementInfo != null) && (this.selectedComponentInfo.selectedElement.additionalElementInfo.useDoubleClick != null) && (this.selectedComponentInfo.selectedElement.additionalElementInfo.useDoubleClick == true)) {\r\n this.selectedComponentInfo.selectedElement.elementTypeMetadata.doubleClick(this.jqueryBrowserDriverService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement.element, getClickableElementFunction);\r\n }\r\n else {\r\n //this.selectedComponentInfo.selectedElement.elementTypeMetadata.click(this.jqueryBrowserDriverService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement.element, getClickableElementFunction);\r\n this.selectedComponentInfo.selectedElement.elementTypeMetadata.click(this.jqueryBrowserDriverService, this.uiTestActionRecorderService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement, this.selectedComponentInfo.selectedElement.element, getClickableElementFunction);\r\n } \r\n }\r\n }\r\n /*\r\n public onSelectedElementActionDoubleClicked(): void {\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.selectedElement != null) && (this.selectedComponentInfo.selectedElement.element != null)) {\r\n let message: string = `click('${this.selectedComponentInfo.selectedElement.elementTitle}');`;\r\n this.componentHierarchyService.logTestAction(message);\r\n\r\n this.selectedComponentInfo.selectedElement.elementTypeMetadata.doubleClick(this.jqueryBrowserDriverService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement.element);\r\n }\r\n }\r\n */\r\n\r\n public editSelectedInputValue(): void {\r\n let inputs: HtmlInputValue[] = this.selectedComponentInfo.selectedElement.elementTypeMetadata.getInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n if ((inputs != null) && (inputs.length > 0)) {\r\n let input: HtmlInputValue = inputs[0];\r\n\r\n this.editInputValue(input);\r\n }\r\n }\r\n\r\n // Helper methods.\r\n private editInputValue(input: HtmlInputValue): void {\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '400px';\r\n dialogConfig.height = '250px';\r\n dialogConfig.data = input.inputValue;\r\n\r\n const dialogRef = this.dialog.open(EditValueDialog, dialogConfig);\r\n dialogRef.afterClosed().subscribe(updatedValue => {\r\n //input.inputValue = updatedValue;\r\n input.inputValue = updatedValue.value;\r\n\r\n //this.selectedComponentInfo.selectedElement.elementTypeMetadata.setValue(this.jqueryBrowserDriverService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement.element, updatedValue.value);\r\n this.selectedComponentInfo.selectedElement.elementTypeMetadata.setValue(this.jqueryBrowserDriverService, this.uiTestActionRecorderService, this.selectedComponentInfo.component, this.selectedComponentInfo.selectedElement, updatedValue.value);\r\n\r\n //this.uiTestActionRecorderService.setInputValue(this.selectedComponentInfo.selectedElement.elementTitle, this.selectedComponentInfo.selectedElement.elementTypeMetadata.metadataKey, updatedValue.value, false);\r\n });\r\n }\r\n\n}\n","

\r\n {{this.Title}}\r\n

\r\n\r\n
\r\n
\r\n

\r\n
\r\n\r\n
\r\n Request assistance\r\n
\r\n
\r\n \r\n
\r\n \r\n Send CC to {{UserEmail}}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Technical Details\r\n \r\n \r\n \r\n \r\n
\r\n {{this.TechnicalInfo}}\r\n
\r\n
\r\n Correlation ID\r\n
\r\n \r\n \r\n \r\n  \r\n {{CorrelationId}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n {{EmailStatus}}\r\n
\r\n\r\n","import { Clipboard } from '@angular/cdk/clipboard';\r\nimport { Component, Inject, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Router } from '@angular/router';\r\nimport { environment } from '../../../../environments/environment';\r\nimport { CurrentUserService } from '../../../security/current-user.service';\r\nimport { EmailService } from '../../../shared/services/email.service';\r\nexport class AlertDialogModel {\r\n constructor(\r\n public title: string,\r\n public message: string,\r\n public technicalInfo: string = null,\r\n public correlationId: string = null,\r\n public hideRequestAssistance: boolean = false) { }\r\n}\r\n\r\n@Component({\n selector: 'app-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n styleUrls: ['./alert-dialog.component.scss'],\n standalone: false\n})\r\nexport class AlertDialogComponent implements OnInit {\r\n // Properties.\r\n private title: string;\r\n private message: string;\r\n private technicalInfo: string;\r\n private correlationId: string;\r\n private userEmail: string;\r\n private notifyDevs: boolean = false;\r\n private sendCCtoUser: boolean = false;\r\n private sendDisabled: boolean = false;\r\n private hideRequestAssistance: boolean = false;\r\n private isFeedback: boolean = false;\r\n private placeholder: string;\r\n private sendCaption: string;\r\n private emailStatus: string = '';\r\n private ngFormGroup: UntypedFormGroup;\r\n\r\n // Constructor.\r\n public constructor(\r\n public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public data: AlertDialogModel,\r\n private clipboard: Clipboard,\r\n public emailService: EmailService,\r\n private currentUserService: CurrentUserService,\r\n private fb: UntypedFormBuilder,\r\n public router: Router) {\r\n this.title = data.title;\r\n this.message = data.message;\r\n this.technicalInfo = data.technicalInfo;\r\n this.correlationId = data.correlationId;\r\n this.hideRequestAssistance = data.hideRequestAssistance;\r\n this.userEmail = '';\r\n this.emailStatus = '';\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n if (this.currentUserService) {\r\n this.userEmail = this.currentUserService.user.emailAddress;\r\n }\r\n else {\r\n console.log('this.currentUserService undefined in alert dialog');\r\n }\r\n this.placeholder = 'Please describe what you were trying to do.';\r\n this.sendCaption = 'Send Error Report';\r\n if (this.title == 'Send Feedback or Report an Issue') {\r\n this.isFeedback = true;\r\n this.hideRequestAssistance = false;\r\n this.notifyDevs = true;\r\n this.placeholder = '';\r\n this.sendCaption = 'Send feedback or report issue';\r\n }\r\n this.ngFormGroup = this.fb.group({\r\n tryingToDo: ['']\r\n });\r\n }\r\n\r\n // Workaround for angular component issue #13870 (panel briefly appears expanded when dialog opens)\r\n disableAnimation = true;\r\n ngAfterViewInit(): void {\r\n // timeout required to avoid the dreaded 'ExpressionChangedAfterItHasBeenCheckedError'\r\n setTimeout(() => this.disableAnimation = false);\r\n }\r\n\r\n // Getter methods called from my HTML.\r\n public get Title(): string {\r\n return this.title;\r\n }\r\n public get Message(): string {\r\n return this.message;\r\n }\r\n public get TechnicalInfo(): string {\r\n return this.technicalInfo;\r\n }\r\n public get NgFormGroup(): UntypedFormGroup {\r\n return (this.ngFormGroup);\r\n }\r\n public get CorrelationId(): string {\r\n return this.correlationId;\r\n }\r\n public get EmailStatus(): string {\r\n return this.emailStatus;\r\n }\r\n public get UserEmail(): string {\r\n return this.userEmail;\r\n }\r\n public get HideRequestAssistance(): boolean {\r\n return this.hideRequestAssistance;\r\n }\r\n public CopyToClipboard() {\r\n this.clipboard.copy(this.correlationId);\r\n }\r\n\r\n public toggleNotifyDevs() {\r\n this.notifyDevs = !this.notifyDevs;\r\n }\r\n public toggleCCtoUser() {\r\n this.sendCCtoUser = !this.sendCCtoUser;\r\n }\r\n public get NotifyDevs() {\r\n return this.notifyDevs;\r\n }\r\n public get Placeholder() {\r\n return this.placeholder;\r\n }\r\n public get SendCaption() {\r\n return this.sendCaption;\r\n }\r\n public get SendDisabled() {\r\n if (this.isFeedback && this.ngFormGroup.value.tryingToDo.trim() == '') return true;\r\n return this.sendDisabled;\r\n }\r\n public get ShowTechnicalDetails() {\r\n return this.correlationId || this.technicalInfo;\r\n }\r\n\r\n public SendErrorReport() {\r\n this.emailStatus = 'Sending email...';\r\n let msgBody = 'A OMB Collect user requested investigation of an error.

';\r\n if (this.isFeedback) {\r\n msgBody = 'An OMB Collect user submitted feedback or reported an issue.

';\r\n }\r\n msgBody += '
'\r\n if (this.title) {\r\n msgBody += ``\r\n }\r\n if (this.message) {\r\n msgBody += ``\r\n }\r\n if (this.technicalInfo) {\r\n msgBody += ``\r\n }\r\n if (this.correlationId) {\r\n msgBody += '`;\r\n }\r\n if (this.currentUserService.user) {\r\n msgBody += ``\r\n msgBody += ``\r\n }\r\n if (this.router) {\r\n msgBody += ``\r\n }\r\n msgBody += '
Title${this.title}
Message${this.message}
Technical Info   ${this.technicalInfo}
Correlation ID' + this.correlationId + '   ';\r\n msgBody += `Splunk
User${this.currentUserService.user.displayName}
Email${this.currentUserService.user.emailAddress}
URL${this.router.url}

'\r\n\r\n let context = this.ngFormGroup.value.tryingToDo;\r\n if (context) {\r\n msgBody += 'User provided this information:

';\r\n msgBody += context + '

';\r\n }\r\n\r\n let msgSubject = 'OMB Collect error report';\r\n if (this.isFeedback) {\r\n msgSubject = 'OMB Collect feedback or issue report';\r\n }\r\n else if (this.title) {\r\n msgSubject += ': ' + this.title;\r\n }\r\n\r\n let msgCC = '';\r\n if (this.sendCCtoUser) {\r\n msgCC = this.currentUserService.user.emailAddress;\r\n }\r\n\r\n let msgTo = 'devs'; // send to dev team\r\n if (this.isFeedback) {\r\n msgTo = 'all'; // send to dev team and DMT Help Desk\r\n }\r\n else if (this.title == 'Unauthorized') {\r\n msgTo = 'dmt' // send to DMT Help Desk\r\n }\r\n\r\n let msg = {\r\n subject: msgSubject,\r\n body: msgBody,\r\n to: msgTo,\r\n cc: msgCC\r\n };\r\n\r\n this.emailService.SendErrorMail(msg).then(resp => {\r\n this.sendDisabled = true;\r\n this.emailStatus = resp.toString();\r\n }).catch(error => {\r\n this.emailStatus = \"Problem sending email: \" + error.message;\r\n });\r\n return;\r\n }\r\n\r\n public reloadPage() {\r\n //should only reload when page is broken\r\n //location.reload();\r\n }\r\n}\r\n","import { AsyncJobService } from '../../services/async-job.service';\r\nimport { AsyncJob } from '../../models/async-job.model';\r\nimport { IJobSummaryText } from '../../models/export-import/i-job-summary-text';\r\n\r\nexport const JOB_COMPLETED_MESSAGE: string = 'Completed';\r\n\r\nexport abstract class AsyncJobDialogBase {\r\n // Properties.\r\n protected asyncJobInfo: AsyncJob = null;\r\n protected timeoutsSinceJobInitiated: number = 0;\r\n protected jobInProgress: boolean = false;\r\n protected jobCompleted: boolean = false;\r\n protected jobErrorOccurred: boolean = false;\r\n protected jobErrorText: string = null;\r\n protected jobCompletedMessageText: string = null;\r\n protected intervalTimeoutId: any = null;\r\n private jobCompletedCallback: any = null;\r\n private jobUpdatedCallback: any = null;\r\n private timeoutTimeInMilliseconds: number = 1000; // Default value only.\r\n\r\n // Constructor.\r\n protected constructor(private asyncJobService: AsyncJobService) {\r\n return;\r\n }\r\n\r\n // Abstract method.\r\n public abstract get ComponentClassName(): string;\r\n\r\n protected resetIdleTimer() {\r\n const event = new CustomEvent(\"ResetIdleTimer\")\r\n document.dispatchEvent(event);\r\n }\r\n\r\n // Implement one methods required by interface IAsyncJobMonitor.\r\n public getAppDataForRestoration(asyncJob: AsyncJob): string {\r\n let appData = {\r\n componentName: this.ComponentClassName,\r\n jobKey: asyncJob.jobKey\r\n };\r\n\r\n let appDataString: string = JSON.stringify(appData);\r\n return appDataString;\r\n }\r\n\r\n // Methods that can be accessed by component HTML code.\r\n public get JobInProgress(): boolean {\r\n return (this.jobInProgress);\r\n }\r\n\r\n public get JobTimeElapsed(): string {\r\n let time: string = null;\r\n\r\n if (this.timeoutsSinceJobInitiated < 60) {\r\n time = `${this.timeoutsSinceJobInitiated} seconds`;\r\n } else {\r\n let iMinutes: number = Math.floor(this.timeoutsSinceJobInitiated / 60);\r\n let iSeconds: number = (this.timeoutsSinceJobInitiated % 60);\r\n\r\n if (iSeconds < 10) {\r\n time = `${iMinutes}:0${iSeconds}`;\r\n } else {\r\n time = `${iMinutes}:${iSeconds}`;\r\n }\r\n }\r\n\r\n return (time);\r\n }\r\n\r\n public reInit(): void {\r\n this.asyncJobInfo = null;\r\n this.timeoutsSinceJobInitiated = 0;\r\n this.jobInProgress = false;\r\n this.jobCompleted = false;\r\n this.jobErrorOccurred = false;\r\n this.jobErrorText = null;\r\n this.jobCompletedMessageText = null;\r\n this.intervalTimeoutId = null;\r\n this.jobCompletedCallback = null;\r\n this.jobUpdatedCallback = null;\r\n }\r\n\r\n public get JobInitiated(): boolean {\r\n let bJobInitiated: boolean = (this.asyncJobInfo != null);\r\n\r\n return (bJobInitiated);\r\n }\r\n\r\n public get JobCompleted(): boolean {\r\n let bJobCompleted: boolean = ((this.asyncJobInfo != null) && (!this.jobInProgress));\r\n\r\n return (bJobCompleted);\r\n }\r\n\r\n public get JobErrorOccurred(): boolean {\r\n return (this.jobErrorOccurred);\r\n }\r\n\r\n public set JobErrorOccurred(jobErrorOccurred: boolean) {\r\n this.jobErrorOccurred = jobErrorOccurred;\r\n }\r\n\r\n public get JobErrorText(): string {\r\n return (this.jobErrorText);\r\n }\r\n\r\n // Handle some control events.\r\n\r\n // Method to start monitoring a job.\r\n protected startMonitoringJob(asyncJobInfo: AsyncJob, jobCompletedCallback: (asyncJob: AsyncJob) => void, jobUpdatedCallback: (asyncJob: AsyncJob) => void = null, timeoutTimeInMilliseconds: number = 1000): void\r\n {\r\n // Save the provided data.\r\n this.asyncJobInfo = asyncJobInfo;\r\n this.asyncJobInfo.appData = this.getAppDataForRestoration(this.asyncJobInfo);\r\n\r\n this.jobCompletedCallback = jobCompletedCallback;\r\n this.jobUpdatedCallback = jobUpdatedCallback;\r\n this.timeoutTimeInMilliseconds = timeoutTimeInMilliseconds;\r\n\r\n // Update status and set a recurring timeout.\r\n this.jobInProgress = true;\r\n this.intervalTimeoutId = setInterval(this.handleIntervalTimeout, this.timeoutTimeInMilliseconds);\r\n\r\n return;\r\n }\r\n\r\n // Helper methods available to derived classes.\r\n protected deriveExecutionSummaryText(metrics: IJobSummaryText): string {\r\n let summaryText: string = '';\r\n\r\n if (this.jobErrorOccurred && (this.jobErrorText != null) && (this.jobErrorText.trim() != '')) {\r\n summaryText = this.jobErrorText;\r\n\r\n if (metrics != null) {\r\n if ((metrics.getErrorLog() != null) && (metrics.getErrorLog().trim() != '')) {\r\n summaryText += \"\\r\\n\";\r\n summaryText += metrics.getErrorLog();\r\n } else if ((metrics.getWarningLog() != null) && (metrics.getWarningLog().trim() != '')) {\r\n summaryText += \"\\r\\n\";\r\n summaryText += metrics.getWarningLog();\r\n }\r\n }\r\n } else if (metrics != null) {\r\n summaryText = metrics.getJobSummaryText();\r\n }\r\n\r\n return (summaryText);\r\n }\r\n\r\n protected parseCreatedSiteId(asyncJob: AsyncJob): number {\r\n let iSiteId: number = -1; // Indicates an error.\r\n\r\n if ((asyncJob.stdOut != null) && (asyncJob.stdOut.trim() != '')) {\r\n let siteParts: string[] = asyncJob.stdOut.split(':');\r\n if ((siteParts != null) && (siteParts.length == 2)) {\r\n iSiteId = parseInt(siteParts[1]);\r\n }\r\n }\r\n\r\n return (iSiteId);\r\n }\r\n protected parseResultObjectId(asyncJob: AsyncJob): number {\r\n let iObjectId: number = -1; // Indicates an error.\r\n\r\n if ((asyncJob.stdOut != null) && (asyncJob.stdOut.trim() != '')) {\r\n let siteParts: string[] = asyncJob.stdOut.split(':');\r\n if ((siteParts != null) && (siteParts.length == 2)) {\r\n iObjectId = parseInt(siteParts[1]);\r\n }\r\n }\r\n\r\n return (iObjectId);\r\n }\r\n\r\n // Private helper methods.\r\n private handleIntervalTimeout = (): void => {\r\n this.timeoutsSinceJobInitiated++;\r\n\r\n // Every five timeouts, check the status of the copy job.\r\n if (this.timeoutsSinceJobInitiated % 2 == 0) {\r\n this.asyncJobService.getJob(this.asyncJobInfo.jobKey).then(asyncJob => {\r\n if (asyncJob.status == AsyncJob.STATUS_COMPLETE) {\r\n this.jobInProgress = false;\r\n this.jobCompleted = true;\r\n this.jobCompletedMessageText = asyncJob.stdOut;\r\n } else if (asyncJob.status == AsyncJob.STATUS_COMPLETE_ERROR) {\r\n this.jobErrorOccurred = true;\r\n this.jobCompleted = true;\r\n this.jobInProgress = false;\r\n this.jobErrorText = asyncJob.stdError;\r\n this.jobCompletedMessageText = asyncJob.stdOut;\r\n }\r\n\r\n if (this.jobCompleted) {\r\n clearInterval(this.intervalTimeoutId);\r\n\r\n // If the caller provided a job completed callback, call it now.\r\n if (this.jobCompletedCallback != null) {\r\n this.jobCompletedCallback(asyncJob);\r\n }\r\n } else if (this.jobUpdatedCallback != null) {\r\n\r\n this.jobUpdatedCallback(asyncJob);\r\n }\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import { ImportMetricsBase } from './import-metrics-base';\r\nimport { IJobSummaryText } from './i-job-summary-text';\r\n\r\nexport class ImportFormInstancesMetrics extends ImportMetricsBase {\r\n // File counts.\r\n public totalFileCount: number;\r\n public zipFileCount: number;\r\n public xmlFileCount: number;\r\n public jsonFileCount: number;\r\n public otherFileCount: number;\r\n\r\n // Processing counts.\r\n public formInstanceFilesProcessed: number;\r\n public formInstancesCreated: number;\r\n public formInstancesUpdated: number;\r\n\r\n public importFileNames: string[];\r\n public exceptionLoggedAndJobTerminated: boolean;\r\n\r\n // Import summary message.\r\n //public importSummaryMessage: string;\r\n\r\n // Property names for the super/base class constructor.\r\n private static readonly propertyNames: string[] =\r\n [\r\n // Properties from MetricsBase.\r\n 'progressLog',\r\n 'warningLog',\r\n 'errorLog',\r\n\r\n 'jobSummaryMessage',\r\n\r\n 'exceptionLoggedAndJobTerminated',\r\n\r\n // My properties.\r\n 'totalFileCount',\r\n 'zipFileCount',\r\n 'xmlFileCount',\r\n 'jsonFileCount',\r\n 'otherFileCount',\r\n\r\n 'formInstanceFilesProcessed',\r\n 'formInstancesCreated',\r\n 'formInstancesUpdated',\r\n\r\n 'importFileNames'\r\n ];\r\n\r\n // Constructor.\r\n public constructor(jsonData: Object) {\r\n super(ImportFormInstancesMetrics.propertyNames, jsonData);\r\n }\r\n}\r\n","\r\nimport { AsyncJobDialogBase, JOB_COMPLETED_MESSAGE } from './async-job-base.dialog';\r\nimport { AsyncJobService } from '../../services/async-job.service';\r\nimport { ImportMetricsBase } from '../../models/export-import/import-metrics-base';\r\nimport { ImportFormInstancesMetrics } from '../../models/export-import/import-form-instances-metrics.model';\r\nimport { ExportFormInstancesMetrics } from '../../models/export-import/export-form-instances-metrics.model';\r\n\r\nexport abstract class ImportAsyncJobDialogBase extends AsyncJobDialogBase {\r\n // Constructor.\r\n public constructor(private providedAsyncJobService: AsyncJobService) {\r\n super(providedAsyncJobService);\r\n }\r\n\r\n // Methods called by HTML code.\r\n public get ImportStatus(): string {\r\n let status: string = null;\r\n\r\n if ((!this.jobInProgress) && (this.asyncJobInfo == null)) {\r\n // We haven't started a copy job.\r\n status = 'Not started';\r\n } else if (this.jobInProgress) {\r\n // A copy job is in progress.\r\n status = 'Import in progress';\r\n } else if (!this.jobErrorOccurred) {\r\n // A copy completed without error.\r\n status = JOB_COMPLETED_MESSAGE;//'Completed';\r\n } else {\r\n // A copy error occurred.\r\n status = 'An import error occurred';\r\n }\r\n\r\n return (status);\r\n }\r\n\r\n // Protected methods.\r\n protected static parseImportFormInstancesMetrics(jobMetricsJson: string): ImportFormInstancesMetrics {\r\n let jobCompletedMessageJson: Object = JSON.parse(jobMetricsJson);\r\n let importMetrics: ImportFormInstancesMetrics = new ImportFormInstancesMetrics(jobCompletedMessageJson);\r\n\r\n return (importMetrics);\r\n }\r\n}\r\n","import { AsyncJobDialogBase, JOB_COMPLETED_MESSAGE } from './async-job-base.dialog';\r\nimport { AsyncJobService } from '../../services/async-job.service';\r\nimport { ImportFormInstancesMetrics } from '../../models/export-import/import-form-instances-metrics.model';\r\nimport { AsyncJob } from '../../models/async-job.model';\r\n\r\nexport class MonitorExcelImportToGridHelper extends AsyncJobDialogBase {\r\n // Constructor.\r\n public constructor(private providedAsyncJobService: AsyncJobService) {\r\n super(providedAsyncJobService);\r\n }\r\n\r\n public get ComponentClassName(): string {\r\n return 'MonitorExcelImportToGridHelper';\r\n }\r\n\r\n public startMonitoringJob(asyncJobInfo: AsyncJob, jobCompletedCallback: (asyncJob: AsyncJob) => void, jobUpdatedCallback: (asyncJob: AsyncJob) => void = null, timeoutTimeInMilliseconds: number = 1000): void\r\n {\r\n super.startMonitoringJob(asyncJobInfo, jobCompletedCallback, jobUpdatedCallback, timeoutTimeInMilliseconds);\r\n }\r\n\r\n // Protected methods.\r\n /*\r\n public static parseImportFormInstancesMetrics(jobMetricsJson: string): ImportFormInstancesMetrics {\r\n let jobCompletedMessageJson: Object = JSON.parse(jobMetricsJson);\r\n let importMetrics: ImportFormInstancesMetrics = new ImportFormInstancesMetrics(jobCompletedMessageJson);\r\n\r\n return (importMetrics);\r\n }\r\n */\r\n}\r\n","import { Component, OnInit, Output, EventEmitter, Input, Inject, ElementRef } from '@angular/core';\nimport { DataCollection } from '../../models/site-content/data-collection.model';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ScriptableBaseComponent } from '../../components/scriptable-base/scriptable-base.component';\nimport { INameToPrettyNameMap } from '../../models/component-scripting/additional-element-info.model';\nimport { environment } from '../../../../environments/environment';\n\nexport class NewSiteOptions {\n public type: string = 'empty';\n public name: string;\n}\n\n@Component({\n selector: 'app-collection-detail',\n templateUrl: './collection-detail.dialog.html',\n styleUrls: ['./collection-detail.dialog.scss'],\n standalone: false\n})\nexport class CollectionDetailDialog extends ScriptableBaseComponent implements OnInit {\n // Property.\n public options: NewSiteOptions;\n\n public constructor(public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) private data: any,\n elForBaseClass: ElementRef) {\n super(elForBaseClass);\n let namesMap: INameToPrettyNameMap =\n {\n 'siteName': 'Site Name'\n };\n this.element('#siteNameDiv').hasInput().withNameToPrettyNameMap(namesMap); //.withAddedDateTimeSuffix();\n this.element('#dialogActions').hasButtons();\n\n this.options = new NewSiteOptions();\n }\n\n // Life cycle method(s).\n public ngOnInit(): void {\n super.ngOnInit();\n }\n\n // Handle dialogue actions.\n public handleModelChange(): void {\n }\n\n public onOkClicked(): void {\n this.dialogRef.close(this.options);\n }\n\n //VNEXT-1066: KLW - Property to get site name\n public get SiteName() {\n return environment.sitename;\n } \n}\n","

\r\n New {{this.SiteName}} Site\r\n

\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n An Empty Site\r\n \r\n

\r\n Create a new site with no contents.\r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n From a Template\r\n \r\n

\r\n Create a new site based on an existing template.\r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Copy an Existing Site\r\n \r\n

\r\n Create a duplicate of an existing site.\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Site Name\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n","
\n

\n {{title}}\n

\n\n
\n {{dialogOptions?.dialogType}}\n
\n\n
\n

\n Time Remaining: {{dialogOptions?.minutes}} {{dialogOptions?.minutes != 1 ? 'Minutes' : 'Minute'}} {{dialogOptions?.seconds}} {{dialogOptions?.seconds != 1 ? 'Seconds' : 'Second'}}\n
\n\n
\n \n \n
\n
\n","export class ConfirmationDialogModel {\n constructor(public title: string, public message: string, public dialogOptions?: IConfirmationDialog) { }\r\n}\n\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { Component, OnInit, Inject } from '@angular/core';\nimport { IConfirmationDialog } from '../../interfaces/confirmation-dialog.interface';\r\n\n@Component({\n selector: 'app-confirmation-dialog',\n templateUrl: './confirmation-dialog.component.html',\n styleUrls: ['./confirmation-dialog.component.scss'],\n standalone: false\n})\n\nexport class ConfirmationDialogComponent implements OnInit {\n title: string;\n message: string;\n dialogOptions: IConfirmationDialog\n\n constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: ConfirmationDialogModel) {\n this.title = data.title;\n this.message = data.message;\n this.dialogOptions = data.dialogOptions;\n }\n\n ngOnInit() {\n if (this.dialogOptions?.seconds || this.dialogOptions?.minutes)\n this.startTimer();\n }\n\n startTimer() {\r\n let intervalId = setInterval(() => { \r\n if (this.dialogOptions.seconds - 1 == -1) {\r\n this.dialogOptions.minutes -= 1;\r\n this.dialogOptions.seconds = 59\r\n }\r\n else this.dialogOptions.seconds -= 1\r\n if (this.dialogOptions.minutes === 0 && this.dialogOptions.seconds == 0) clearInterval(intervalId)\r\n }, 1000)\r\n }\n\n onConfirm(): void {\n this.dialogRef.close(true);\r\n }\n\n onDismiss(): void {\n this.dialogRef.close(false);\r\n }\r\n\r\n public get ConfirmButtonText(): string {\r\n let yes = this.dialogOptions?.confirmButtonText;\r\n return yes ? yes : (this.dialogOptions?.showOk ? 'OK' : 'Yes');\r\n }\r\n public get DismissButtonText(): string {\r\n let no = this.dialogOptions?.dismissButtonText;\r\n return no ? no : 'No';\r\n }\n}\n","\r\n

\r\n {{this.Title}}\r\n

\r\n\r\n
\r\n \r\n \r\n \r\n \r\n {{this.ContentLabel}}\r\n\r\n \r\n \r\n \r\n\r\n 1)\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{this.ContentLabel}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{this.Message}}\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n
\r\n\r\n \r\n
\r\n\r\n
\r\n","import { Component, OnInit, Inject, ViewChild, ElementRef, AfterViewInit, Renderer2 } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\r\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Clipboard } from '@angular/cdk/clipboard';\r\n\r\n// Define exported initialization data classes.\r\nexport class DisplayContentData {\r\n public constructor(public content: string, public tabName: string, public makeContentReadonly: boolean = true) {\r\n }\r\n}\r\n\r\nexport interface IUpdateContent {\r\n newContentAdded(content: string, tabName: string): void;\r\n}\r\nexport interface IContentUpdated {\r\n contentUpdated(updatedContent: string, tabName: string): void;\r\n}\r\n\r\nexport class DisplayContentDialogInitData {\r\n public title: string = \"\";\r\n //public content: string;\r\n public contentData: DisplayContentData[] = [];\r\n\r\n //public contentLabel: string = 'Content';\r\n public numDisplayRows: number = 25;\r\n\r\n public constructor(titleParam: string, contentDataParam: DisplayContentData[], numDisplayRowsParam: number = 25) {\r\n this.title = titleParam;\r\n this.contentData = contentDataParam;\r\n this.numDisplayRows = numDisplayRowsParam;\r\n }\r\n}\r\n\r\n// Define an internally used class.\r\nclass DisplayContentDataWithFormControl {\r\n public contentData: DisplayContentData;\r\n public contentFormControl: UntypedFormControl; \r\n\r\n public constructor(contentData: DisplayContentData, contentFormControl: UntypedFormControl) {\r\n this.contentData = contentData;\r\n this.contentFormControl = contentFormControl;\r\n }\r\n}\r\n\n@Component({\n selector: 'app-display-content',\n templateUrl: './display-content.dialog.html',\n styleUrls: ['./display-content.dialog.scss'],\n standalone: false\n})\nexport class DisplayContentDialog implements OnInit, AfterViewInit {\n // Properties.\r\n @ViewChild('messageSpan') messageSpan: ElementRef;\r\n\r\n // Form/content-related properties.\r\n private bInitialized: boolean = false;\r\n private contentData: DisplayContentDataWithFormControl[] = [];\r\n private tabCount: number = 0;\r\n private tabNames: string[]= [];\r\n private selectedContentIndex: number = 0;\r\n\r\n private message: string = '';\r\n\r\n // Constructor.\n public constructor(@Inject(MAT_DIALOG_DATA) public initData: DisplayContentDialogInitData,\r\n private clipboard: Clipboard,\r\n private renderer: Renderer2)\r\n {\r\n return;\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n this.setupFormControls();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n return;\r\n }\r\n\r\n /*\r\n public activateTab(tabGroup: any, index: number): void {\r\n //console.log('DisplayContent.changeTab() = ' + index);\r\n tabGroup.selectedIndex = index;\r\n }\r\n */\r\n public tabChanged(): void {\r\n }\r\n\r\n // Methods called by my HTML code.\r\n public get Title(): string {\r\n return (this.initData.title);\r\n }\r\n\r\n public get HasInitialized(): boolean {\r\n return (this.bInitialized);\r\n }\r\n public get TabCount(): number {\r\n return this.tabCount;\r\n }\r\n public TabContent(tabIndex: number): string {\r\n //return (this.initData.content);\r\n return (this.contentData[tabIndex].contentData.content);\r\n }\r\n public get TabNames(): string[] {\r\n return this.tabNames;\r\n }\r\n public TabName(tabIndex: number): string {\r\n return (this.contentData[tabIndex].contentData.tabName);\r\n }\r\n public get SelectedContentIndex(): number {\r\n return (this.selectedContentIndex);\r\n }\r\n public set SelectedContentIndex(indexParam: number) {\r\n this.selectedContentIndex = indexParam;\r\n }\r\n\r\n public get HasNoContent(): boolean {\r\n //return ((this.initData.content == null) || (this.initData.content.length == 0));\r\n return (this.contentData.length == 0)\r\n }\r\n public get ContentLabel(): string {\r\n //return (this.initData.contentLabel);\r\n return (this.contentData[this.selectedContentIndex].contentData.tabName);\r\n }\r\n public get NumContentControlRows(): number {\r\n // If we have a tabbed interface (multiple content\r\n // elements), make the text area a bit shorter.\r\n let numDisplayRows: number =\r\n (this.contentData.length > 1 ? this.initData.numDisplayRows - 3 : this.initData.numDisplayRows);\r\n return (numDisplayRows);\r\n }\r\n\r\n public ContentFormControl(tabIndex: number): UntypedFormControl {\r\n //return (this.contentFormControl);\r\n return (this.contentData[tabIndex].contentFormControl);\r\n }\r\n public DataIsReadOnly(tabIndex: number): boolean {\r\n let tabData: DisplayContentDataWithFormControl = this.contentData[tabIndex];\r\n return tabData.contentData.makeContentReadonly;\r\n }\r\n\r\n public get Message(): string {\r\n return (this.message);\r\n }\r\n\r\n // Handle dialogue actions.\r\n public copyContentToClipboard(): void {\r\n let content: string = this.contentData[this.selectedContentIndex].contentData.content;\r\n this.clipboard.copy(content);\r\n\r\n this.message = 'Content copied to clipboard!';\r\n if (this.messageSpan != null) {\r\n this.renderer.removeClass(this.messageSpan.nativeElement, 'message-span-invisible-font');\r\n this.renderer.addClass(this.messageSpan.nativeElement, 'message-span-visible-font');\r\n }\r\n\r\n setTimeout(() => {\r\n if (this.messageSpan != null) {\r\n this.renderer.removeClass(this.messageSpan.nativeElement, 'message-span-visible-font');\r\n this.renderer.addClass(this.messageSpan.nativeElement, 'message-span-invisible-font');\r\n } else {\r\n this.message = '';\r\n } \r\n }, 3000);\r\n }\r\n\r\n // Helper methods.\r\n private setupFormControls(): void {\r\n for (let iContentInfo: number = 0; iContentInfo < this.initData.contentData.length; iContentInfo++) {\r\n let contentData: DisplayContentData = this.initData.contentData[iContentInfo];\r\n let controlProperties = {\r\n value: contentData.content,\r\n disabled: contentData.makeContentReadonly\r\n };\r\n //let contentDataWithFormControl: DisplayContentDataWithFormControl = new DisplayContentDataWithFormControl(contentData, new FormControl(contentData.content));\r\n let formControl = new UntypedFormControl(controlProperties);\r\n formControl.valueChanges.subscribe(updatedValue => {\r\n console.log('Value changed.');\r\n });\r\n let contentDataWithFormControl: DisplayContentDataWithFormControl = new DisplayContentDataWithFormControl(contentData, formControl);\r\n\r\n this.contentData.push(contentDataWithFormControl);\r\n this.tabNames.push(contentDataWithFormControl.contentData.tabName);\r\n }\r\n this.tabCount = this.contentData.length;\r\n\r\n this.bInitialized = true;\r\n }\n}\n","
\r\n

\r\n Upload new file for {{CurrentAttachmentTitle}}\r\n

\r\n
\r\n \r\n\r\n
\r\n \r\n upload_file\r\n \r\n
\r\n

Drag and drop file/s here

\r\n

or

\r\n \r\n
\r\n \r\n

Drop file/s

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

\r\n {{ file?.name }}\r\n

\r\n

\r\n {{ formatBytes(file?.size) }}\r\n

\r\n \r\n Title (Required)\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n clear\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{currentFileUploaded}}\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n Inject\r\n} from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\r\nimport { Observable, forkJoin } from 'rxjs';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\n\r\nimport {\r\n AttachmentService,\r\n IFileUploadProgressHash,\r\n FileUploadProgress\r\n} from '../../services/attachment.service';\r\n\r\n// Define a class of required Id values.\r\nexport class FileUploadDialogKeyValues {\r\n\r\n public formInstanceElementId: number;\r\n public attachmentId: number;\r\n public attachmentTitle: string;\r\n\r\n public dataCollectionId: number;\r\n public folderId: number;\r\n public formInstanceId: number;\r\n public formFieldId: number;\r\n public attachmentCount: number;\r\n}\r\n\r\n// Define a hash of progress/upload values.\r\nexport interface IFileUploadProgressValueHash {\r\n //[fileName: string]: number;\n [fileName: string]: FileUploadProgress;\r\n}\r\n\r\n// Define an internally used class.\r\nclass FileUploadRequestCallerData {\r\n public fileName: string;\r\n public component: FileUploadDialogComponent;\r\n}\r\n\r\nclass ProgressFileNameAndObservable {\r\n public fileName: string;\r\n public observable: Observable;\r\n}\r\n\r\n// Note: the code in this dialog component was derived from the following tutorial:\r\n// https://malcoded.com/posts/angular-file-upload-component-with-express/.\r\n\r\n@Component({\n selector: 'app-file-upload-dialog',\n templateUrl: './file-upload-dialog.component.html',\n styleUrls: ['./file-upload-dialog.component.scss'],\n standalone: false\n})\r\nexport class FileUploadDialogComponent implements OnInit {\r\n // Instance data.\r\n @ViewChild('file') file;\r\n //private files: Set = new Set();\r\n\r\n // State-related instance data.\r\n // Define two related progress hashes and a related array.\r\n private hshProgressObservables: IFileUploadProgressHash = null;\r\n private hshProgressValues: IFileUploadProgressValueHash = null;\r\n private iNumProgressValuesComplete: number = 0;\r\n //private allProgressFileNamesAndObservables: ProgressFileNameAndObservable[] = null;\r\n // Define a button text value.\r\n private primaryButtonText: string = 'Upload';\r\n // Define status/state values.\r\n private canBeClosed: boolean = true;\r\n private showCancelButton: boolean = true;\r\n private uploading: boolean = false;\r\n private uploadSuccessful: boolean = false;\r\n private titles: object = {}; \r\n\r\n // Constructor.\r\n constructor(private dialogRef: MatDialogRef,\r\n private attachmentService: AttachmentService,\r\n @Inject(MAT_DIALOG_DATA) public initData: FileUploadDialogKeyValues)\r\n {\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n ngOnInit(): void {\r\n return;\r\n }\r\n\r\n public setTitle($event: any, i: number) {\r\n const value = $event.target.value;\r\n this.titles[i] = value;\r\n }\r\n\r\n // Accessor methods (used by my .html file).\r\n\r\n // Show controls if multiple files can be uploaded OR, if not, if no files have been uploaded yet\r\n public get ShowUploadControls(): boolean {\r\n return this.AllowMultipleFileSelections || this.files?.length == 0;\r\n }\r\n // Only allow multiple files to be uploaded if we're doing an initial upload\r\n public get AllowMultipleFileSelections(): boolean {\r\n return this.initData.attachmentId <= 0;\r\n }\r\n // Only show the title input if we're doing an initial upload\r\n public get TitleIsEditable(): boolean {\r\n return this.initData.attachmentId <= 0;\r\n }\r\n public get CurrentAttachmentTitle(): string {\r\n return this.initData.attachmentTitle;\r\n }\r\n public get CurrentAttachmentId(): number {\r\n return this.initData.attachmentId;\r\n }\r\n public get Titles(): object {\r\n return this.titles;\r\n }\r\n public get CanBeClosed(): boolean {\r\n return (this.canBeClosed);\r\n }\r\n\r\n public get Uploading(): boolean {\r\n return (this.uploading);\r\n }\r\n\r\n public get UploadSuccessful(): boolean {\r\n return (this.uploadSuccessful);\r\n }\r\n\r\n public get FileType(): string {\r\n return ItemTypeEnum.FILE;\r\n }\r\n\r\n\r\n files: Array = [];\r\n\r\n public get Files(): Array {\r\n return (this.files);\r\n }\r\n\r\n public get Progress(): IFileUploadProgressHash {\r\n //return (this.progress);\r\n return (this.hshProgressObservables);\r\n }\r\n\r\n public GetProgressFor(file: File, index: number): number {\r\n //let iProgress: number = this.Progress[file.name].progress;\r\n //let iProgress: number = this.hshProgressValues[file.name];\n let progressInfo: FileUploadProgress = this.hshProgressValues[file.name];\n let iProgress = progressInfo.progressValue;\r\n\r\n if (iProgress == 100)\r\n this.deleteFile(index);\r\n\r\n return (iProgress);\r\n }\r\n\r\n public get ShowCancelButton(): boolean {\r\n return (this.showCancelButton);\r\n }\r\n\r\n public get PrimaryButtonText(): string {\r\n return (this.primaryButtonText);\r\n }\r\n\r\n // Handle control eventes.\r\n public addFiles(): void {\r\n this.file.nativeElement.click();\r\n\r\n return;\r\n }\r\n\r\n //public onFilesAdded(): void {\r\n // // Compile the set of selected files.\r\n // const files: { [key: string]: File } = this.file.nativeElement.files;\r\n\r\n // for (let key in files) {\r\n // if (!isNaN(parseInt(key))) {\r\n // this.files.add(files[key]);\r\n // }\r\n // }\r\n\r\n // return;\r\n //}\r\n\r\n //public static fnProgressSubscribor = function (progressData: FileUploadProgress) {\n public static fnProgressSubscribor(progressData: FileUploadProgress): void {\r\n //console.log(\"Received progress ...\");\r\n\r\n // Call into a private method\r\n // to perform the actual work.\r\n let component: FileUploadDialogComponent = progressData.callerData;\r\n\r\n component.handleFileUploadProgressUpdate(progressData);\r\n\r\n return;\r\n }\r\n\n public uploadFilesOrCloseDialog(): void {\r\n if (this.titleNotSupplied()) {\r\n alert(\"Title is required for each uploaded file.\");\r\n return;\r\n }\r\n // if everything was uploaded already, close the dialog.\r\n if (this.uploadSuccessful) {\n this.dialogRef.close(this.hshProgressValues);\n\n return;\r\n }\r\n\r\n // set the component state to \"uploading\"\r\n this.uploading = true;\r\n\r\n // start the upload and save the progress map\r\n this.hshProgressObservables = this.attachmentService.uploadFiles(this.initData.formInstanceElementId, this.initData.attachmentId, new Set(this.files), this);\r\n\r\n // convert the progress map into an array\r\n let allProgressObservables = [];\r\n this.hshProgressValues = {};\r\n this.iNumProgressValuesComplete = 0;\r\n\r\n for (let fileName in this.hshProgressObservables) {\r\n let progressObservable = this.hshProgressObservables[fileName].progress;\r\n allProgressObservables.push(progressObservable);\r\n\r\n let progressFileNameAndObservable: ProgressFileNameAndObservable =\r\n {\r\n fileName: fileName,\r\n observable: progressObservable\r\n };\r\n\n let initialProgressInfo: FileUploadProgress = new FileUploadProgress();\n this.hshProgressValues[fileName] = initialProgressInfo;\r\n progressObservable.subscribe(FileUploadDialogComponent.fnProgressSubscribor);\r\n }\r\n\r\n // Adjust the state variables\r\n\r\n // The OK-button should have the text \"Finish\" now\r\n this.primaryButtonText = 'Finish';\r\n\r\n // The dialog should not be closed while uploading\r\n this.canBeClosed = false;\r\n this.dialogRef.disableClose = true;\r\n\r\n // Hide the cancel-button\r\n this.showCancelButton = false;\r\n\r\n // When all progress-observables are completed...\r\n // The call to forkJoin() was not working,\r\n // so I decided to replace it with code above.\r\n /*\r\n forkJoin(allProgressObservables).subscribe(end => {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.dialogRef.disableClose = false;\r\n\r\n // ... the upload was successful...\r\n this.uploadSuccessful = true;\r\n\r\n // ... and the component is no longer uploading\r\n this.uploading = false;\r\n });\r\n */\r\n\r\n forkJoin(allProgressObservables).subscribe(end => {\r\n this.dialogRef.close(this.hshProgressValues);\r\n });\r\n\r\n return;\r\n }\r\n\r\n currentFileUploaded = '';\r\n\r\n // If we're doing a new upload of files, a title must be given to each one\r\n private titleNotSupplied() {\r\n return this.TitleIsEditable &&\r\n this.files.length > Object.keys(this.titles).length;\r\n }\r\n\r\n // Implement private helper methods.\r\n private handleFileUploadProgressUpdate(progressData: FileUploadProgress): void {\r\n // Update this file's progress value.\r\n if (this.hshProgressValues[progressData.fileName] != null) {\r\n\r\n this.currentFileUploaded = 'Uploading: ' + progressData.fileName;\r\n\r\n //this.hshProgressValues[progressData.fileName] = progressData.progressValue;\n this.hshProgressValues[progressData.fileName] = progressData;\r\n\r\n if (progressData.progressValue == 100) {\r\n this.iNumProgressValuesComplete++;\r\n }\r\n\r\n this.iNumProgressValuesComplete++;\r\n\r\n if (this.iNumProgressValuesComplete == Object.keys(this.hshProgressValues).length) {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.dialogRef.disableClose = false;\r\n\r\n // ... the upload was successful...\r\n this.uploadSuccessful = true;\r\n\r\n // ... and the component is no longer uploading\r\n this.uploading = false;\r\n\r\n \r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n\r\n \r\n\r\n /**\r\n * on file drop handler\r\n */\r\n onFileDropped($event) {\r\n if ($event.length > 1 && !this.AllowMultipleFileSelections) {\r\n alert('Only one file can be dropped when uploading a new file for an existing attachment.');\r\n return;\r\n }\r\n this.prepareFilesList($event);\r\n }\r\n\r\n fileEntered: boolean = false;\r\n\r\n onFileEntered(passedVal: boolean) {\r\n this.fileEntered = passedVal;\r\n }\r\n\r\n /**\r\n * handle file from browsing\r\n */\r\n fileBrowseHandler(files) {\r\n this.prepareFilesList(files);\r\n }\r\n\r\n /**\r\n * Delete file from files list\r\n * @param index (File index)\r\n */\r\n deleteFile(index: number) {\r\n this.files.splice(index, 1);\r\n\r\n //Do this to avoid ExpressionChangedAfterItHasBeenCheckedError\r\n //if (this.files.length < 1)\r\n // this.hasFiles = false;\r\n }\r\n\r\n /**\r\n * Simulate the upload process\r\n */\r\n uploadFilesSimulator(index: number) {\r\n //setTimeout(() => {\r\n // if (index === this.files.length) {\r\n // return;\r\n // } else {\r\n // const progressInterval = setInterval(() => {\r\n // if (this.files[index].progress === 100) {\r\n // clearInterval(progressInterval);\r\n // this.uploadFilesSimulator(index + 1);\r\n // } else {\r\n // this.files[index].progress += 5;\r\n // }\r\n // }, 200);\r\n // }\r\n //}, 1000);\r\n }\r\n\r\n //hasFiles: boolean = false;\r\n\r\n /**\r\n * Convert Files list to normal array list\r\n * @param files (Files List)\r\n */\r\n prepareFilesList(files: Array) {\r\n for (const item of files) {\r\n //Check if the files array already contains the file\r\n if (!this.files.some(file => file.name == item.name))\r\n this.files.push(item);\r\n }\r\n //this.uploadFilesSimulator(0);\r\n\r\n //Do this to avoid ExpressionChangedAfterItHasBeenCheckedError\r\n //if (this.files.length > 0)\r\n // this.hasFiles = true;\r\n }\r\n\r\n /**\r\n * format bytes\r\n * @param bytes (File size in bytes)\r\n * @param decimals (Decimals point)\r\n */\r\n formatBytes(bytes, decimals = 0.0) {\r\n if (bytes === 0) {\r\n return '0 Bytes';\r\n }\r\n const k = 1024;\r\n const dm = decimals <= 0 ? 0 : decimals || 2;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\r\n }\r\n\r\n \r\n \r\n\r\n}\r\n","import { Component, OnInit, Inject, ViewChild } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig } from '@angular/material/dialog';\r\n\r\nimport { CopySiteService } from '../../services/copy-site.service';\r\nimport { AsyncJobService } from '../../services/async-job.service';\r\nimport { AsyncJob } from '../../models/async-job.model';\r\nimport { AsyncJobDialogBase } from '../async-job-base/async-job-base.dialog';\r\nimport { ImportAsyncJobDialogBase } from '../async-job-base/import-async-job-base.dialog';\r\nimport { ExportSiteMetrics } from '../../models/export-import/export-site-metrics.model';\r\n\n@Component({\n selector: 'app-import-site',\n templateUrl: './import-site.dialog.html',\n styleUrls: [\n '../async-job-base/async-job-base.dialog.scss',\n './import-site.dialog.scss'\n ],\n standalone: false\n})\nexport class ImportSiteDialog extends ImportAsyncJobDialogBase implements OnInit {\r\n // Properties.\r\n private importSiteName: string = null;\r\n private importedSiteId: number = -1;\r\n private importSiteMetrics: ExportSiteMetrics;\r\n\r\n @ViewChild('file') file;\r\n private fileSet: Set = new Set();\r\n private selectedFileName: string = null;\r\n private ignoreValidationErrors: boolean = false; // NOTE: A true setting is not yet supported on the server, so this is not settable in the UI\r\n\r\n // Constructor.\n public constructor(public dialogRef: MatDialogRef,\r\n //@Inject(MAT_DIALOG_DATA) public siteToCopy: DataCollection,\r\n private copySiteService: CopySiteService,\r\n private injectedAsyncJobService: AsyncJobService)\r\n {\r\n super(injectedAsyncJobService);\r\n\r\n dialogRef.disableClose = true; // Disable closing the dialogue when the user clicks on the page.\r\n\r\n return;\r\n }\n\r\n // Implement a base class's abstract method.\r\n public get ComponentClassName(): string {\r\n return 'ImportSiteDialog';\r\n }\r\n\r\n public get ExecutionSummaryText(): string {\r\n let summaryText: string = super.deriveExecutionSummaryText(this.importSiteMetrics);\r\n\r\n return summaryText;\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n return;\n }\n\r\n // Accessor methods.\r\n public get ImportSiteName(): string {\r\n return (this.importSiteName);\r\n }\r\n public set ImportSiteName(importSiteNameParam: string) {\r\n this.importSiteName = importSiteNameParam;\r\n\r\n return;\r\n }\r\n\r\n public get ImportedSiteId(): number {\r\n return (this.jobCompleted ? this.importedSiteId : null);\r\n }\r\n\r\n public get DismissButtonTitle(): string {\r\n //return (this.jobCompleted && (!this.jobErrorOccurred) ? 'Dismiss, Load Imported Site' : 'Dismiss');\r\n return ('Dismiss');\r\n }\r\n\r\n public get ImportSiteNameIsEmpty(): boolean {\r\n let isEmpty: boolean = ((this.importSiteName == null) || (this.importSiteName.trim().length == 0));\r\n\r\n return (isEmpty);\r\n }\r\n\r\n public get FileSelected(): boolean {\r\n let bFileSelected: boolean = (this.fileSet.size > 0);\r\n\r\n return (bFileSelected);\r\n }\r\n public get IgnoreValidationErrors(): boolean {\r\n return this.ignoreValidationErrors;\r\n }\r\n\r\n public set IgnoreValidationErrors(value: boolean) {\r\n this.ignoreValidationErrors = value;\r\n }\r\n\r\n public get SelectedFileName(): string {\r\n return (this.selectedFileName != null ? this.selectedFileName : 'No File Selected');\r\n }\r\n\r\n // Handle dialogue action(s).\r\n public selectImportFile(): void {\r\n this.file.nativeElement.click(); // Cause the hidden file control to open.\r\n\r\n return;\r\n }\r\n\r\n public onFileAdded(): void {\r\n // Clear any previous file.\r\n this.fileSet = new Set()\r\n\r\n // Save the selected file.\r\n const files: { [key: string]: File } = this.file.nativeElement.files;\r\n\r\n for (let key in files) {\r\n if (!isNaN(parseInt(key))) {\r\n let selectedFile: File = files[key];\r\n\r\n this.fileSet.add(selectedFile);\r\n\r\n this.selectedFileName = selectedFile.name;\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public startSiteImport(): void {\r\n // Initiate the import.\r\n let arrFile: File[] = Array.from(this.fileSet);\r\n\r\n if (arrFile.length > 0) {\r\n let file: File = arrFile[0];\r\n\r\n this.copySiteService.importSite(file, this.importSiteName, this.ignoreValidationErrors).then(asyncJob => {\r\n // Save the returned job key.\r\n this.startMonitoringJob(asyncJob, this.jobCompletedArrowFunction, this.jobCompletedArrowFunction);\r\n });\r\n }\r\n\r\n return;\r\n }\r\n\r\n public dismissClicked(): void {\r\n let dialogResult: number = !this.jobErrorOccurred ? this.ImportedSiteId : null;\r\n this.dialogRef.close(dialogResult);\r\n }\r\n\r\n // Private methods.\r\n private jobCompletedArrowFunction = (asyncJob: AsyncJob): void => {\r\n this.importedSiteId = this.parseCreatedSiteId(asyncJob);\r\n\r\n let msg = asyncJob.stdOut || asyncJob.stdError;\r\n this.importSiteMetrics = this.parseMetrics(msg);\r\n }\r\n\r\n private parseMetrics(jobMetricsJson: string): ExportSiteMetrics {\r\n let jobMetricsObject: Object = JSON.parse(jobMetricsJson);\r\n let metrics: ExportSiteMetrics = new ExportSiteMetrics(jobMetricsObject);\r\n return metrics;\r\n }\r\n}\n","

\r\n Import Site\r\n

\r\n\r\n
\r\n
\r\n Name for Imported Site: \r\n\r\n \r\n Import Site As\r\n \r\n \r\n\r\n
\r\n\r\n Select Import File: \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n Selected Import File: \r\n {{this.SelectedFileName}}\r\n
\r\n\r\n
\r\n Execution Time:\r\n {{this.JobTimeElapsed}}\r\n
\r\n\r\n
\r\n Execution Status:\r\n {{this.ImportStatus}}\r\n
\r\n\r\n \r\n\r\n
\r\n

{{this.ExecutionSummaryText}}

\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\r\n\r\n@Component({\n selector: 'app-select-options',\n templateUrl: './select-options.dialog.html',\n styleUrls: ['./select-options.dialog.scss'],\n standalone: false\n})\nexport class SelectOptionsDialog implements OnInit {\n // Properties.\r\n private title: string = \"Select Options\";\r\n private label: string = 'Enter or Paste List of Options';\r\n public options: string = null;\r\n\r\n // Constructor.\n public constructor(@Inject(MAT_DIALOG_DATA) data) {\r\n this.options = data.options;\r\n if (data.title != null)\r\n this.title = data.title;\r\n if (data.label != null)\r\n this.label = data.label;\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\n }\n\r\n // Methods called by my HTML code.\r\n public get Title(): string {\r\n return this.title;\r\n }\r\n public get Label(): string {\r\n return this.label;\r\n }\n}\n","

\r\n {{this.Title}}\r\n

\r\n\r\n
\r\n \r\n {{this.Label}}\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n","import { Injectable, Type as AngularCoreType } from '@angular/core';\r\nimport { MenuItem, TreeNode } from 'primeng/api';\r\n\r\nimport { AppInjector } from '../../app.module';\r\n\r\nimport { ITestableComponent } from '../interfaces/itestable-component.interface';\r\n//import { UITestCenterDialog } from '../dialogs/ui-test-center/ui-test-center.dialog';\r\n//import { ScriptableBaseComponent } from '../components/scriptable-base/scriptable-base.component';\r\nimport { ComponentMethodsService } from '../models/component-scripting/component-methods.service';\r\nimport { StringUtil } from '../utility-classes/string.util';\r\nimport { ElementTypeMetadata } from '../models/component-scripting/element-type-metadata.model';\r\nimport { HtmlPropertyValue } from '../models/component-scripting/html-property-value.model';\r\nimport { HtmlInputValue } from '../models/component-scripting/html-input-value.model';\r\nimport { ComponentMethodMetadata, ComponentMethodsMetadata, IComponentNameToMethodsMetadata } from '../models/component-scripting/component-methods-metadata.model';\r\nimport { AsyncJobService } from './async-job.service';\r\nimport { AttachmentService } from './attachment.service';\r\nimport { AutocompleteService } from './autocomplete.service';\r\nimport { DataCollectionService } from './data-collection.service';\r\nimport { DocumentPublishingService } from './document-publishing.service';\r\nimport { ExcelExportService } from './excel-export.service';\r\nimport { ExportDataService } from './export-data.service';\r\nimport { FolderService } from './folder.service';\r\nimport { FormBuilderService } from './form-builder.service';\r\nimport { FormInstanceService } from './form-instance.service';\r\n// IMPORT MORE SERVICE CLASSES HERE!!!\r\n\r\nexport class ServiceClassInfo {\r\n public constructor(public className: string, public serviceClass: AngularCoreType, public serviceInstance: Object) {\r\n }\r\n\r\n public componentMethodsMetadata: ComponentMethodsMetadata = null;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ServiceClassCatalogueService {\r\n // Properties.\r\n private serviceClasses: AngularCoreType[] = [AsyncJobService, FormBuilderService, ExcelExportService];\r\n private cachedServiceClassInfo: ServiceClassInfo[] = null;\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Getter method(s).\r\n public get serviceClassCatalogue(): ServiceClassInfo[] {\r\n if (this.cachedServiceClassInfo == null) {\r\n this.cachedServiceClassInfo = [];\r\n\r\n for (let index: number = 0; index < this.serviceClasses.length; index++) {\r\n let service: Object = AppInjector.get(this.serviceClasses[index]);\r\n let serviceClassName: string = service.constructor.name;\r\n\r\n let serviceClassInfo: ServiceClassInfo = new ServiceClassInfo(serviceClassName, this.serviceClasses[index], service);\r\n serviceClassInfo.componentMethodsMetadata = ComponentMethodsService.getComponentMethodsMetadataFor(serviceClassName);\r\n //serviceClassInfo.componentMethodsMetadata = ScriptableBaseComponent.getComponentMethodsMetadata(serviceClassName);\r\n if (serviceClassInfo.componentMethodsMetadata == null)\r\n serviceClassInfo.componentMethodsMetadata = new ComponentMethodsMetadata(serviceClassName);\r\n\r\n this.cachedServiceClassInfo.push(serviceClassInfo);\r\n }\r\n }\r\n\r\n return this.cachedServiceClassInfo;\r\n }\r\n\r\n // Methods for recording test actions.\r\n public selectComponent(component: ITestableComponent): void {\r\n // TO DO: CODE THIS METOHD.\r\n }\r\n\r\n public clickElement(element: object, elementTypeMetadata: ElementTypeMetadata): void {\r\n // TO DO: CODE THIS METOHD.\r\n }\r\n\r\n public setValue(element: object, elementTypeMetadata: ElementTypeMetadata, value: string): void {\r\n // TO DO: CODE THIS METOHD.\r\n }\r\n public getValue(element: object, elementTypeMetadata: ElementTypeMetadata): string {\r\n let value: string = null;\r\n // TO DO: CODE THIS METOHD.\r\n return value;\r\n }\r\n\r\n // Helper methods.\r\n}\r\n","\r\nexport enum TokenCode {\r\n TOKEN_END_OF_INPUT = 'endOfInput',\r\n TOKEN_SYNTAX_ERROR = 'syntaxError',\r\n\r\n TOKEN_COMMA = 'comma',\r\n TOKEN_SEMICOLON = 'semicolon',\r\n TOKEN_STRING_SINGLE_QUOTES = 'stringInSingleQuotes',\r\n TOKEN_LEFT_PAREN = 'leftParen',\r\n TOKEN_RIGHT_PAREN = 'rightParen',\r\n TOKEN_IDENTIFIER = 'identifier',\r\n TOKEN_NUMBER = 'number',\r\n TOKEN_TRUE = 'true',\r\n TOKEN_FALSE = 'false',\r\n TOKEN_NULL = 'null',\r\n\r\n TOKEN_FUNCTION_CALL = 'functionCall'\r\n};\r\n","import { ITestActionRecorderService } from './itest-action-recorder-service.interface';\r\n\r\nexport enum FunctionExecutionStatus {\r\n NotStarted = 'NotStarted',\r\n Completed = 'Completed',\r\n Verifying = 'Verifying',\r\n Failed = 'Failed'\r\n}\r\n\r\nexport interface IScriptableFunction {\r\n get callableName(): string;\r\n\r\n get minNumParams(): number;\r\n get maxNumParams(): number;\r\n validateParams(params: string[]): boolean;\r\n\r\n execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus;\r\n checkExecutionStatus(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus;\r\n}\r\n","import { MatInput } from '@angular/material/input';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ServiceClassInfo } from '../../services/service-class-catalogue.service';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\nimport { ComponentMethodsMetadata, ComponentMethodMetadata } from './component-methods-metadata.model';\r\nimport { ComponentMethodsService } from './component-methods.service'\r\nimport { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { HtmlElementTypeService } from '../../services/html-element-type.service';\r\nimport { ScriptableComponentStatus } from '../../enums/component-scripting/scriptable-component-status.enum';\r\n\r\nexport class ServiceAsTestableComponent implements ITestableComponent {\r\n // Static data.\r\n private static nextServiceId: number = 1;\r\n\r\n // Properties.\r\n private _id: number;\r\n\r\n // Constructor.\r\n public constructor(public serviceInfo: ServiceClassInfo, private htmlElementTypeService: HtmlElementTypeService) {\r\n this._id = ServiceAsTestableComponent.nextServiceId++;\r\n }\r\n\r\n // Implement ITestableComponent methods.\r\n public get tagName(): string {\r\n let name: string = this.serviceInfo.serviceInstance.constructor.name;\r\n return name;\r\n }\r\n public get id(): number {\r\n return this._id;\r\n }\r\n\r\n public get InitializationStatus(): ScriptableComponentStatus {\r\n return ScriptableComponentStatus.InitializationComplete;\r\n }\r\n\r\n public get elementTypes(): string[] {\r\n return [HtmlElementTypeNames.componentMethods_metadataKey];\r\n }\r\n public getElementsOfType(elementType: string): HtmlElementInfo[] {\r\n let elements: HtmlElementInfo[] = [];\r\n\r\n let serviceClassName: string = this.serviceInfo.serviceInstance.constructor.name;\r\n let componentMethodsMetadata: ComponentMethodsMetadata = ComponentMethodsService.getComponentMethodsMetadataFor(serviceClassName);\r\n\r\n if ((componentMethodsMetadata != null) && (componentMethodsMetadata.methodsMetadata.length > 0)) {\r\n let methodsElementTypeMetadata: ElementTypeMetadata = this.htmlElementTypeService.getMetadataForElementType(HtmlElementTypeNames.componentMethods_metadataKey);\r\n\r\n for (let index: number = 0; index < componentMethodsMetadata.methodsMetadata.length; index++) {\r\n let methodMetadata: ComponentMethodMetadata = componentMethodsMetadata.methodsMetadata[index];\r\n\r\n let elementInfo: HtmlElementInfo = new HtmlElementInfo(methodsElementTypeMetadata, methodMetadata, HtmlElementTypeNames.componentMethods_metadataKey, methodMetadata.methodName);\r\n elements.push(elementInfo);\r\n }\r\n }\r\n\r\n return elements;\r\n }\r\n\r\n public getMatInputWithElement(element: object): MatInput {\r\n return null;\r\n }\r\n}\r\n","import { TokenCode } from './token-code.enum';\r\n\r\nexport class Token {\r\n // Instance data.\r\n //private code: number = -1;\r\n private code: TokenCode = null;\r\n private value: string = null;\r\n\r\n // Constructor.\r\n //public constructor(tokenCode: number, tokenValue: string = null) {\r\n public constructor(tokenCode: TokenCode, tokenValue: string = null) {\r\n this.code = tokenCode;\r\n if (tokenValue != null)\r\n this.value = tokenValue;\r\n }\r\n\r\n // Getter methods.\r\n //public get Code(): number {\r\n public get Code(): TokenCode {\r\n return this.code;\r\n }\r\n public get Value(): string {\r\n return this.value;\r\n }\r\n}\r\n","import { Token } from '../../models/parse/token.model';\r\nimport { TokenCode } from '../../models/parse/token-code.enum';\r\n\r\nexport class Tokenizer {\r\n // Constants.\r\n private static readonly ZERO: string = '0';\r\n private static readonly NINE: string = '9';\r\n\r\n private static readonly LITTLE_A: string = 'a';\r\n private static readonly LITTLE_Z: string = 'z';\r\n private static readonly BIG_A: string = 'A';\r\n private static readonly BIG_Z: string = 'Z';\r\n\r\n // Instance data.\r\n private strInput: string = null;\r\n private iInputLength: number = -1;\r\n private iInputIndex: number = 0;\r\n\r\n private token: Token = null;\r\n private strTokenValue: string = null;\r\n private bTokenPutBack: boolean = false;\r\n\r\n // Construcor.\r\n public constructor(strInputParam: string) {\r\n this.strInput = strInputParam;\r\n this.iInputLength = (this.strInput != null ? this.strInput.length : 0);\r\n this.iInputIndex = 0;\r\n\r\n this.token = null;\r\n this.strTokenValue = null;\r\n this.bTokenPutBack = false;\r\n\r\n return;\r\n }\r\n\r\n // Methods.\r\n // Get token method.\r\n public getToken(): Token {\r\n if (this.bTokenPutBack) {\r\n this.bTokenPutBack = false;\r\n\r\n return (this.token);\r\n } else if (this.iInputIndex < this.iInputLength) {\r\n let ch = ' ';\r\n let bEndOfInput: boolean = false;\r\n let bCharIsWhiteSpace: boolean = false;\r\n\r\n // Eat white space.\r\n do {\r\n if (this.iInputIndex < this.iInputLength) {\r\n ch = this.getChar();\r\n\r\n bCharIsWhiteSpace = this.isWhiteSpace(ch);\r\n } else {\r\n bEndOfInput = true;\r\n\r\n this.token = new Token(TokenCode.TOKEN_END_OF_INPUT);\r\n }\r\n } while ((!bEndOfInput) && bCharIsWhiteSpace);\r\n\r\n // If we are not at the end of the \r\n // input, see what token we might have.\r\n if (!bEndOfInput) {\r\n try {\r\n if (ch == '(') {\r\n this.token = new Token(TokenCode.TOKEN_LEFT_PAREN, \"(\");\r\n }\r\n else if (ch == ')') {\r\n this.token = new Token(TokenCode.TOKEN_RIGHT_PAREN, \")\");\r\n } else if (ch == ',') {\r\n this.token = new Token(TokenCode.TOKEN_COMMA, \",\");\r\n } else if (ch == ';') {\r\n this.token = new Token(TokenCode.TOKEN_SEMICOLON, \",\");\r\n } else if (ch == '\\'') {\r\n this.strTokenValue = this.getStringToken('\\'');\r\n this.token = new Token(TokenCode.TOKEN_STRING_SINGLE_QUOTES, this.strTokenValue);\r\n } else if (this.isDigit(ch)) {\r\n this.strTokenValue = this.getNumberToken(ch);\r\n this.token = new Token(TokenCode.TOKEN_NUMBER, this.strTokenValue);\r\n }\r\n else if (this.isAscii(ch)) {\r\n this.strTokenValue = this.getIdentifierOrKeywordTokenText(ch);\r\n //this.token = new Token(TokenCode.TOKEN_IDENTIFIER, this.strTokenValue);\r\n this.token = Tokenizer.getIdentifierOrKeywordTokenFromText(this.strTokenValue);\r\n }\r\n else {\r\n this.token = new Token(TokenCode.TOKEN_SYNTAX_ERROR);\r\n }\r\n }\r\n catch (Exception) {\r\n this.token = new Token(TokenCode.TOKEN_SYNTAX_ERROR);\r\n }\r\n }\r\n } else {\r\n // There is no more input.\r\n this.token = new Token(TokenCode.TOKEN_END_OF_INPUT);\r\n }\r\n\r\n // Return the token.\r\n return (this.token);\r\n }\r\n\r\n // Helper methods.\r\n private getChar(): string {\r\n let ch: string = '\\0';\r\n\r\n if (this.iInputIndex < this.iInputLength) {\r\n ch = this.strInput[this.iInputIndex++];\r\n } else {\r\n this.syntaxError();\r\n }\r\n\r\n return (ch);\r\n }\r\n\r\n private putBackChar(): void {\r\n if (this.iInputIndex > 0) {\r\n this.iInputIndex -= 1;\r\n }\r\n else {\r\n this.syntaxError();\r\n }\r\n\r\n return;\r\n }\r\n\r\n private getStringToken(chQuote: string): string {\r\n let tokenBuf: string = '';\r\n\r\n if (this.iInputIndex < this.iInputLength) {\r\n // *************************\r\n // Get the string characters.\r\n // *************************\r\n\r\n let ch = this.getChar();\r\n\r\n let bEndOfInput = false;\r\n let bGotQuoteChar = false;\r\n\r\n do {\r\n tokenBuf += ch;\r\n\r\n if (this.iInputIndex < this.iInputLength) {\r\n ch = this.getChar();\r\n\r\n bGotQuoteChar = (ch == chQuote ? true : false);\r\n\r\n /*\r\n // If the string literal is a \"'\" character, and \r\n // we are encountering a \"'s\" value, then keep parsing the string.\r\n\r\n if (bGotQuoteChar)\r\n {\r\n char nextCh = this.peekChar();\r\n\r\n if ((nextCh != '\\0') && (nextCh == chQuote))\r\n {\r\n bGotQuoteChar = false;\r\n this.skipChar();\r\n }\r\n }\r\n */\r\n }\r\n else {\r\n bEndOfInput = true;\r\n }\r\n } while ((!bEndOfInput) && (!bGotQuoteChar));\r\n\r\n // **************************\r\n // Did we complete the string? \r\n // **************************\r\n\r\n if (bGotQuoteChar) {\r\n // Nothing more to do.\r\n }\r\n else {\r\n this.syntaxError();\r\n }\r\n }\r\n\r\n // ****************************\r\n // Return the contructed symbol.\r\n // ****************************\r\n\r\n //string strValue = tokenBuf.ToString();\r\n\r\n return tokenBuf;\r\n\r\n }\r\n\r\n private getNumberToken(chDigit: string): string {\r\n let tokenBuf = '';\r\n\r\n tokenBuf += chDigit;\r\n\r\n // Scan remaining numbers, if any.\r\n if (this.iInputIndex < this.iInputLength) {\r\n let ch = this.getChar();\r\n\r\n let bEndOfInput = false;\r\n\r\n while (this.isDigit(ch) && (!bEndOfInput)) {\r\n tokenBuf += ch;\r\n\r\n if (this.iInputIndex < this.iInputLength) {\r\n ch = this.getChar();\r\n }\r\n else {\r\n bEndOfInput = true;\r\n }\r\n }\r\n\r\n {\r\n // Note: this method does not presently contain logic to\r\n // scan a decimal point and any ensuing numbers.\r\n }\r\n\r\n if (!bEndOfInput) {\r\n this.putBackChar();\r\n }\r\n }\r\n\r\n // Return the number token value.\r\n\r\n return tokenBuf;\r\n }\r\n\r\n private getIdentifierOrKeywordTokenText(chLetter: string): string {\r\n let tokenBuf: string = '';\r\n\r\n tokenBuf += chLetter;\r\n\r\n // Get remaining identifier characters, if any.\r\n if (this.iInputIndex < this.iInputLength) {\r\n let ch = this.getChar();\r\n\r\n let bEndOfInput = false;\r\n\r\n while ((!bEndOfInput) && (this.isAscii(ch) || this.isDigit(ch) || ch == '_')) {\r\n tokenBuf += ch;\r\n\r\n if (this.iInputIndex < this.iInputLength) {\r\n ch = this.getChar();\r\n } else {\r\n bEndOfInput = true;\r\n }\r\n } // while\r\n\r\n // Put back a character if we \r\n // are not at the end of input.\r\n if (!bEndOfInput) {\r\n this.putBackChar();\r\n }\r\n } // if\r\n\r\n // Return the scanned identifier.\r\n\r\n return tokenBuf;\r\n }\r\n\r\n private static getIdentifierOrKeywordTokenFromText(strTokenValue: string): Token {\r\n let token: Token = null;\r\n\r\n if (strTokenValue == 'true')\r\n token = new Token(TokenCode.TOKEN_TRUE, strTokenValue);\r\n else if (strTokenValue == 'false')\r\n token = new Token(TokenCode.TOKEN_FALSE, strTokenValue);\r\n else if (strTokenValue == 'null')\r\n token = new Token(TokenCode.TOKEN_NULL, strTokenValue);\r\n else\r\n token = new Token(TokenCode.TOKEN_IDENTIFIER, strTokenValue);\r\n\r\n return token;\r\n }\r\n\r\n private isWhiteSpace(ch: string): boolean {\r\n let bIsWhiteSpace: boolean =\r\n (ch == ' ') ||\r\n (ch == '\\r') ||\r\n (ch == '\\n') ||\r\n (ch == '\\t');\r\n\r\n return (bIsWhiteSpace);\r\n }\r\n\r\n private isAscii(ch: string): boolean {\r\n let bIsAscii = false;\r\n\r\n if ((ch >= Tokenizer.LITTLE_A) && (ch <= Tokenizer.LITTLE_Z)) {\r\n bIsAscii = true;\r\n } else if ((ch >= Tokenizer.BIG_A) && (ch <= Tokenizer.BIG_Z)) {\r\n bIsAscii = true;\r\n }\r\n\r\n return (bIsAscii);\r\n }\r\n\r\n private isDigit(ch: string): boolean {\r\n let bIsDigit = ((ch >= Tokenizer.ZERO) && (ch <= Tokenizer.NINE));\r\n\r\n return (bIsDigit);\r\n }\r\n\r\n private syntaxError(): void {\r\n throw \"Syntax error.\";\r\n }\r\n}\r\n","import { TokenCode } from './token-code.enum';\r\nimport { IScriptableFunction } from '../../interfaces/iscriptable-function';\r\n\r\nexport class Tuple {\r\n // Instance data.\r\n //private opCode: number = -1;\r\n private opCode: TokenCode = null;\r\n private leftValue: any = null;\r\n private rightValue: any = null;\r\n\r\n // Constructor.\r\n //public constructor(opCodeParam: number, leftValParam: any, rightValParam: any = null) {\r\n public constructor(opCodeParam: TokenCode, leftValParam: any, rightValParam: any = null) {\r\n this.opCode = opCodeParam;\r\n this.leftValue = leftValParam;\r\n if (rightValParam != null)\r\n this.rightValue = rightValParam;\r\n }\r\n\r\n // Getter methods.\r\n //public get OpCode(): number {\r\n public get OpCode(): TokenCode {\r\n return this.opCode;\r\n }\r\n public get LeftValue(): any {\r\n return this.leftValue;\r\n }\r\n public get RightValue(): any {\r\n return this.rightValue;\r\n }\r\n}\r\n\r\nexport class FunctionCallTuple extends Tuple {\r\n public constructor(public scriptableFunction: IScriptableFunction, public params: string[]) {\r\n super(TokenCode.TOKEN_FUNCTION_CALL, scriptableFunction, params);\r\n }\r\n}\r\n","\r\nimport { Token } from '../../models/parse/token.model';\r\nimport { TokenCode } from '../../models/parse/token-code.enum';\r\nimport { Tokenizer } from './tokenizer';\r\nimport { Tuple, FunctionCallTuple } from '../../models/parse/tuple.model';\r\nimport { ScriptableFunctionService } from '../../services/scriptable-function.service';\r\nimport { IScriptableFunction } from '../../interfaces/iscriptable-function';\r\n\r\nexport class ParsedTestCommands {\r\n public errorMessage: string = null;\r\n public tuples: Tuple[] = [];\r\n}\r\n\r\nexport class UITestDirectiveParser {\r\n // Properties.\r\n private tokenizer: Tokenizer = null;\r\n private token: Token = null;\r\n\r\n // Constructor.\r\n public constructor() { }\r\n\r\n // Parse method.\r\n public parseTuples(script: string, scriptableFunctionService: ScriptableFunctionService): ParsedTestCommands {\r\n //let tuples: Tuple[] = [];\r\n let parsedCommands: ParsedTestCommands = new ParsedTestCommands();\r\n\r\n // Create my tokenizer.\r\n this.tokenizer = new Tokenizer(script);\r\n\r\n let endOfInput: boolean = false;\r\n let firstToken: Token = this.expectAnyToken();\r\n while (!endOfInput) {\r\n // Expect an identifier. \r\n if (firstToken.Code == TokenCode.TOKEN_IDENTIFIER) {\r\n let nextToken: Token = this.expectAnyToken();\r\n if (nextToken.Code == TokenCode.TOKEN_LEFT_PAREN) {\r\n // Parse this function call notation.\r\n let functionCallTuple: Tuple = this.parseFunctionCall(firstToken);\r\n\r\n // Validate the function's name and parameters.\r\n let functionToken: Token = functionCallTuple.LeftValue;\r\n let functionName: string = functionToken.Value;\r\n let functionParams: string[] = functionCallTuple.RightValue;\r\n let scriptableFunction: IScriptableFunction = scriptableFunctionService.getScriptableFunctionNamed(functionName);\r\n if (scriptableFunction == null) {\r\n parsedCommands.errorMessage = `UITestDirectiveParser.parseTuples(): cannot find a scriptable function named '${functionName}'.`;\r\n endOfInput = true;\r\n } else if (!scriptableFunction.validateParams(functionParams)) {\r\n parsedCommands.errorMessage = `UITestDirectiveParser.parseTuples(): the parameters for function '${functionName}' could not be validated.`;\r\n endOfInput = true;\r\n } else {\r\n // Things look good.\r\n let functionCallTuple: FunctionCallTuple = new FunctionCallTuple(scriptableFunction, functionParams);\r\n parsedCommands.tuples.push(functionCallTuple);\r\n }\r\n\r\n if (!endOfInput) {\r\n // Start parsing the next command/directive, if any.\r\n firstToken = this.expectAnyToken();\r\n if (firstToken.Code == TokenCode.TOKEN_SEMICOLON)\r\n firstToken = this.expectAnyToken();\r\n }\r\n } else {\r\n //this.syntaxError();\r\n parsedCommands.errorMessage = this.SyntaxErrorMessage;\r\n endOfInput = true;\r\n }\r\n } else if (firstToken.Code == TokenCode.TOKEN_END_OF_INPUT) {\r\n endOfInput = true;\r\n } else {\r\n //this.syntaxError();\r\n parsedCommands.errorMessage = this.SyntaxErrorMessage;\r\n endOfInput = true;\r\n } \r\n } \r\n\r\n //return tuples;\r\n return parsedCommands;\r\n }\r\n\r\n public parseTuple(inputParam: string): Tuple {\r\n let result: Tuple = null;\r\n\r\n // Create my tokenizer.\r\n this.tokenizer = new Tokenizer(inputParam);\r\n\r\n // We only expect to see an identifier, a string,\r\n // a number, or a function call (which starts with\r\n // an identifier).\r\n\r\n let idOrStringToken: Token = this.expectAnyToken(); \r\n if ((idOrStringToken.Code != TokenCode.TOKEN_IDENTIFIER) &&\r\n (idOrStringToken.Code != TokenCode.TOKEN_STRING_SINGLE_QUOTES) &&\r\n (idOrStringToken.Code != TokenCode.TOKEN_NUMBER))\r\n {\r\n this.syntaxError();\r\n }\r\n\r\n let nextToken: Token = this.expectAnyToken();\r\n\r\n if (nextToken.Code == TokenCode.TOKEN_END_OF_INPUT)\r\n {\r\n result = new Tuple(idOrStringToken.Code, idOrStringToken.Value);\r\n } else if ((idOrStringToken.Code == TokenCode.TOKEN_IDENTIFIER) && (nextToken.Code == TokenCode.TOKEN_LEFT_PAREN))\r\n result = this.parseFunctionCall(idOrStringToken);\r\n else\r\n this.syntaxError();\r\n\r\n return result;\r\n }\r\n\r\n // Helper methods.\r\n private parseFunctionCall(idToken: Token): Tuple {\r\n let functionCallTuple: Tuple = null;\r\n\r\n // Get the first parameter.\r\n let firstParamOrRightParen: Token = this.expectAnyToken();\r\n if (firstParamOrRightParen.Code == TokenCode.TOKEN_RIGHT_PAREN)\r\n {\r\n // This function call has zero parameters.\r\n }\r\n else if ((firstParamOrRightParen.Code != TokenCode.TOKEN_STRING_SINGLE_QUOTES) &&\r\n (firstParamOrRightParen.Code != TokenCode.TOKEN_NUMBER) &&\r\n (firstParamOrRightParen.Code != TokenCode.TOKEN_TRUE) &&\r\n (firstParamOrRightParen.Code != TokenCode.TOKEN_FALSE) &&\r\n (firstParamOrRightParen.Code != TokenCode.TOKEN_NULL))\r\n {\r\n // Unexpected token/syntax error.\r\n this.syntaxError();\r\n }\r\n\r\n let functionParams: Token[] = null;\r\n\r\n // See if we have more parameters.\r\n //Token rightParen = this.expect((int)Tokenizer.TokenCode.TOKEN_RIGHT_PAREN);\r\n let nextToken: Token = (firstParamOrRightParen.Code == TokenCode.TOKEN_RIGHT_PAREN ? firstParamOrRightParen : this.expectAnyToken());\r\n\r\n if (nextToken.Code == TokenCode.TOKEN_RIGHT_PAREN)\r\n {\r\n // We are done ... no more parameters to parse.\r\n let lstParams: Token[] = [];\r\n\r\n if (firstParamOrRightParen.Code != TokenCode.TOKEN_RIGHT_PAREN)\r\n {\r\n lstParams.push(firstParamOrRightParen);\r\n }\r\n\r\n functionParams = lstParams;\r\n } else if (nextToken.Code == TokenCode.TOKEN_COMMA)\r\n {\r\n // We have more parameters.\r\n let lstParams: Token[] = this.parseAdditionalFunctionParams(firstParamOrRightParen);\r\n\r\n functionParams = lstParams;\r\n } else\r\n {\r\n // Unexpected token/syntax error.\r\n this.syntaxError();\r\n }\r\n\r\n // Package the result.\r\n functionCallTuple = new Tuple(TokenCode.TOKEN_FUNCTION_CALL, idToken, functionParams);\r\n\r\n return functionCallTuple;\r\n }\r\n\r\n private parseAdditionalFunctionParams(firstParam: Token): Token[] {\r\n let lstParamTokens: Token[] = [];\r\n\r\n lstParamTokens.push(firstParam);\r\n\r\n let bContinueParsingParameters: boolean = true;\r\n\r\n do {\r\n // Parse remaining parameters.\r\n let nextToken: Token = this.expectAnyToken();\r\n\r\n if ((nextToken.Code == TokenCode.TOKEN_STRING_SINGLE_QUOTES) ||\r\n (nextToken.Code == TokenCode.TOKEN_NUMBER) ||\r\n (nextToken.Code == TokenCode.TOKEN_TRUE) ||\r\n (nextToken.Code == TokenCode.TOKEN_FALSE) ||\r\n (nextToken.Code == TokenCode.TOKEN_NULL))\r\n {\r\n lstParamTokens.push(nextToken);\r\n } else {\r\n this.syntaxError();\r\n }\r\n\r\n nextToken = this.expectAnyToken();\r\n\r\n if (nextToken.Code == TokenCode.TOKEN_RIGHT_PAREN)\r\n {\r\n bContinueParsingParameters = false;\r\n } else if (nextToken.Code == TokenCode.TOKEN_COMMA)\r\n {\r\n // This is OK. We will continue parsing parameters.\r\n } else\r\n {\r\n // Error.\r\n this.syntaxError();\r\n }\r\n } while (bContinueParsingParameters);\r\n\r\n return lstParamTokens;\r\n }\r\n\r\n private expectAnyToken(): Token {\r\n this.token = this.tokenizer.getToken();\r\n\r\n if (this.token == null)\r\n this.syntaxError();\r\n\r\n return this.token;\r\n }\r\n\r\n //private expect(iTokenCode: number): Token {\r\n private expect(iTokenCode: TokenCode): Token {\r\n this.token = this.tokenizer.getToken();\r\n\r\n if (this.token == null) {\r\n this.syntaxError();\r\n } else if (this.token.Code != iTokenCode) {\r\n this.syntaxError();\r\n }\r\n\r\n return (this.token);\r\n }\r\n\r\n private syntaxError(): void {\r\n throw \"Syntax error.\";\r\n }\r\n private get SyntaxErrorMessage(): string {\r\n return \"Syntax error.\";\r\n }\r\n}\r\n","import { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { FunctionExecutionStatus } from '../../interfaces/iscriptable-function';\r\nimport { IScriptableFunction } from '../../interfaces/iscriptable-function';\r\nimport { IOperationCompletedCallback, IRegisterOperationCompletedCallback } from '../../interfaces/ioperation-completed.intefaces';\r\n\r\nexport abstract class ScriptableFunctionBase implements IScriptableFunction, IOperationCompletedCallback {\r\n // Properties.\r\n protected awaitingCompletionOfOperationName: string = null;\r\n protected awaitedOperationCompleted: boolean = false;\r\n protected numCheckExecutionCallsSinceComponentInitialized: number = 0;\r\n\r\n // Constructor.\r\n protected constructor() {\r\n }\r\n\r\n // Implement IScriptableFunction methods.\r\n public abstract get callableName(): string;\r\n\r\n public get minNumParams(): number {\r\n return 0; // default.\r\n }\r\n public get maxNumParams(): number {\r\n return 0; // Default.\r\n }\r\n public validateParams(params: string[]): boolean {\r\n return true; // Default.\r\n }\r\n\r\n public abstract execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus;\r\n public checkExecutionStatus(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n return FunctionExecutionStatus.Completed;\r\n }\r\n\r\n // Implement IOperationCompletedCallback.\r\n public operationCompleted(operationName: string): void {\r\n // NOTE: THIS IMPLEMENTATION IS A NOOP.\r\n // NOTE: MY DERIVED CLASS SHOULD IMPLEMENT THIS METHOD IF IT REQUIRES THE FUNCTIONALITY.\r\n }\r\n\r\n // Protected methods.\r\n protected registerAsOperationCompletedCallback(testActionService: ITestActionRecorderService, operationCompletedServiceName: string, operationName: string): boolean {\r\n let success = true;\r\n\r\n // Always reset the properties.\r\n this.awaitingCompletionOfOperationName = null;\r\n this.awaitedOperationCompleted = false;\r\n this.numCheckExecutionCallsSinceComponentInitialized = 0;\r\n\r\n // Conditionally register as a callback.\r\n if ((operationCompletedServiceName != null) && (operationName != null)) {\r\n let registerCallback: IRegisterOperationCompletedCallback = testActionService.getRegisterOperationCompletedCallbackFor(operationCompletedServiceName);\r\n if (registerCallback != null) {\r\n registerCallback.registerOperationCompletedCallback(this);\r\n this.awaitingCompletionOfOperationName = operationName;\r\n } else\r\n success = false;\r\n }\r\n\r\n return success;\r\n }\r\n}\r\n","//import { ISelectsComponent } from '../../interfaces/component-scripting/iselects-component';\r\nimport { ScriptableFunctionBase } from './scriptable-function-base';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { ComponentHierarchyService, IComponentHierarchyChanged } from '../../services/component-hierarchy.service';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { FunctionExecutionStatus, IScriptableFunction } from '../../interfaces/iscriptable-function';\r\nimport { ScriptableComponentStatus } from '../../enums/component-scripting/scriptable-component-status.enum';\r\n\r\nexport class SelectComponentScriptableFunction extends ScriptableFunctionBase implements IScriptableFunction, IComponentHierarchyChanged {\r\n private componentHierarchyService: ComponentHierarchyService = null;\r\n private testActionService: ITestActionRecorderService = null;\r\n private tagName: string = null;\r\n private selectedComponentInitialized: boolean = false;\r\n //private numCheckExecutionCallsSinceComponentInitialized: number = 0;\r\n\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public get callableName(): string {\r\n return 'selectComponent';\r\n }\r\n\r\n public execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n // (Re)initialize instance data since this function instance can be called multiple times with different parameters.\r\n if (this.componentHierarchyService == null) {\r\n this.componentHierarchyService = testActionService.componentHierarchyService;\r\n this.componentHierarchyService.addHierarchyChangedHandler(this);\r\n }\r\n if (this.testActionService == null)\r\n this.testActionService = testActionService;\r\n this.tagName = null;\r\n this.selectedComponentInitialized = false;\r\n this.numCheckExecutionCallsSinceComponentInitialized = 0;\r\n\r\n let executionStatus: FunctionExecutionStatus = FunctionExecutionStatus.Failed;\r\n\r\n if ((params != null) && (params.length == 1)) {\r\n this.tagName = params[0];\r\n let component: ITestableComponent = this.componentHierarchyService.findComponentTreeNodeByTagFromRoot(this.tagName);\r\n\r\n if ((component != null) && (component.InitializationStatus == ScriptableComponentStatus.InitializationComplete)) {\r\n testActionService.selectComponent(component);\r\n executionStatus = FunctionExecutionStatus.Completed;\r\n }\r\n else\r\n executionStatus = FunctionExecutionStatus.Verifying;\r\n }\r\n\r\n return executionStatus;\r\n }\r\n\r\n public checkExecutionStatus(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = this.selectedComponentInitialized && (this.numCheckExecutionCallsSinceComponentInitialized > 0) ? FunctionExecutionStatus.Completed : FunctionExecutionStatus.Verifying;\r\n if (this.selectedComponentInitialized)\r\n this.numCheckExecutionCallsSinceComponentInitialized++;\r\n return executionStatus;\r\n }\r\n\r\n // Implement IComponentHierarchyChanged methods.\r\n public componentAdded(component: ITestableComponent) { } // NOOP\r\n public componentRemoved(component: ITestableComponent, currentParentComponent: ITestableComponent): void { } // NOOP\r\n public hierarchyChanged(): void { } // NOOP\r\n public componentInitialized(component: ITestableComponent, initializationStatus: ScriptableComponentStatus): void {\r\n if ((this.tagName != null) && (this.tagName == component.tagName)) {\r\n this.testActionService.selectComponent(component);\r\n this.selectedComponentInitialized = true;\r\n } \r\n }\r\n}\r\n","//import { ICallsMethod } from '../../interfaces/component-scripting/icalls-method';\r\nimport { ScriptableFunctionBase } from './scriptable-function-base';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ComponentHierarchyService } from '../../services/component-hierarchy.service';\r\nimport { FunctionExecutionStatus, IScriptableFunction } from '../../interfaces/iscriptable-function';\r\n\r\nexport class CallMethodScriptableFunction extends ScriptableFunctionBase implements IScriptableFunction {// implements IClicksButton {\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public get callableName(): string {\r\n return 'callMethod';\r\n }\r\n\r\n public execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = FunctionExecutionStatus.Failed;\r\n\r\n if ((params != null) && (params.length >= 1)) {\r\n let componentHierarchyService: ComponentHierarchyService = testActionService.componentHierarchyService;\r\n //let tagName: string = params[0];\r\n //let component: ITestableComponent = componentHierarchyService.findComponentTreeNodeByTagFromRoot(tagName);\r\n let methodName: string = params[0];\r\n\r\n let methodParams: string[] = [];\r\n for (let paramsIndex: number = 1; paramsIndex < params.length; paramsIndex++)\r\n methodParams.push(params[paramsIndex]);\r\n\r\n testActionService.callMethod(methodName, methodParams);\r\n executionStatus = FunctionExecutionStatus.Completed;\r\n }\r\n\r\n return executionStatus;\r\n }\r\n}\r\n","//import { IClicksButton } from '../../interfaces/component-scripting/iclicks-button';\r\nimport { ScriptableFunctionBase } from './scriptable-function-base';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { FunctionExecutionStatus, IScriptableFunction } from '../../interfaces/iscriptable-function';\r\nimport { IOperationCompletedCallback, IRegisterOperationCompletedCallback } from '../../interfaces/ioperation-completed.intefaces';\r\n\r\nexport class ClickButtonScriptableFunction extends ScriptableFunctionBase implements IScriptableFunction, IOperationCompletedCallback {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IScriptableFunction methods.\r\n public get callableName(): string {\r\n return 'clickButton';\r\n }\r\n\r\n public execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = FunctionExecutionStatus.Failed;\r\n\r\n if ((params != null) && (params.length >= 2) && (params.length <= 5)) {\r\n let elementTitle: string = params[0];\r\n let elementMetadataKey: string = params[1];\r\n let elementSubtype: string = params.length >= 3 ? params[2] : null;\r\n let operationCompletedServiceName: string = params.length == 5 ? params[3] : null;\r\n let operationName: string = params.length == 5 ? params[4] : null;\r\n\r\n let okToProceed: boolean = this.registerAsOperationCompletedCallback(testActionService, operationCompletedServiceName, operationName);\r\n\r\n if (okToProceed) {\r\n testActionService.clickButton(elementTitle, elementMetadataKey, elementSubtype, operationCompletedServiceName, operationName);\r\n executionStatus = this.awaitingCompletionOfOperationName != null ? FunctionExecutionStatus.Verifying : FunctionExecutionStatus.Completed;\r\n }\r\n }\r\n\r\n return executionStatus;\r\n }\r\n\r\n public checkExecutionStatus(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = this.awaitedOperationCompleted && (this.numCheckExecutionCallsSinceComponentInitialized > 1) ? FunctionExecutionStatus.Completed : FunctionExecutionStatus.Verifying;\r\n this.numCheckExecutionCallsSinceComponentInitialized++;\r\n return executionStatus;\r\n }\r\n\r\n // Implement IRegisterOperationCompletedCallback.\r\n public operationCompleted(operationName: string): void {\r\n if (operationName == this.awaitingCompletionOfOperationName)\r\n this.awaitedOperationCompleted = true;\r\n }\r\n}\r\n","//import { IClicksLink } from '../../interfaces/component-scripting/iclicks-link';\r\nimport { ScriptableFunctionBase } from './scriptable-function-base';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { FunctionExecutionStatus, IScriptableFunction } from '../../interfaces/iscriptable-function';\r\nimport { IOperationCompletedCallback, IRegisterOperationCompletedCallback } from '../../interfaces/ioperation-completed.intefaces';\r\n\r\nexport class ClickLinkScriptableFunction extends ScriptableFunctionBase implements IScriptableFunction, IOperationCompletedCallback {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement IScriptableFunction methods.\r\n public get callableName(): string {\r\n return 'clickLink';\r\n }\r\n\r\n public execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = FunctionExecutionStatus.Failed;\r\n\r\n if ((params != null) && (params.length >= 2) && (params.length <= 5)) {\r\n let elementTitle: string = params[0];\r\n let elementMetadataKey: string = params[1];\r\n let elementSubtype: string = params.length == 3 ? params[2] : null;\r\n let operationCompletedServiceName: string = params.length == 5 ? params[3] : null;\r\n let operationName: string = params.length == 5 ? params[4] : null;\r\n\r\n let okToProceed: boolean = this.registerAsOperationCompletedCallback(testActionService, operationCompletedServiceName, operationName);\r\n\r\n if (okToProceed) {\r\n testActionService.clickLink(elementTitle, elementMetadataKey, elementSubtype, operationCompletedServiceName, operationName);\r\n executionStatus = this.awaitingCompletionOfOperationName != null ? FunctionExecutionStatus.Verifying : FunctionExecutionStatus.Completed;\r\n }\r\n }\r\n\r\n return executionStatus;\r\n }\r\n\r\n public checkExecutionStatus(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = this.awaitedOperationCompleted && (this.numCheckExecutionCallsSinceComponentInitialized > 1) ? FunctionExecutionStatus.Completed : FunctionExecutionStatus.Verifying;\r\n this.numCheckExecutionCallsSinceComponentInitialized++;\r\n return executionStatus;\r\n }\r\n\r\n // Implement IRegisterOperationCompletedCallback.\r\n public operationCompleted(operationName: string): void {\r\n if (operationName == this.awaitingCompletionOfOperationName)\r\n this.awaitedOperationCompleted = true;\r\n }\r\n}\r\n","//import { IInputsValue } from '../../interfaces/component-scripting/iinputs-value';\r\nimport { ScriptableFunctionBase } from './scriptable-function-base';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { FunctionExecutionStatus, IScriptableFunction } from '../../interfaces/iscriptable-function';\r\n\r\nexport class SetInputValueScriptableFunction extends ScriptableFunctionBase implements IScriptableFunction {\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public get callableName(): string {\r\n return 'setInputValue';\r\n }\r\n\r\n public execute(testActionService: ITestActionRecorderService, params: string[]): FunctionExecutionStatus {\r\n let executionStatus: FunctionExecutionStatus = FunctionExecutionStatus.Failed;\r\n\r\n if ((params != null) && (params.length >= 4) && (params.length <= 5)) {\r\n let elementTitle: string = params[0];\r\n let elementMetadataKey: string = params[1];\r\n let elementSubtype: string = params[2];\r\n let inputValue: string = params[3];\r\n let addDateTimeSuffix = (params.length == 5) && (params[4] != null) && (params[4].toLowerCase() == 'true') ? true : false;\r\n\r\n testActionService.setInputValue(elementTitle, elementMetadataKey, elementSubtype, inputValue, addDateTimeSuffix);\r\n executionStatus = FunctionExecutionStatus.Completed;\r\n }\r\n\r\n return executionStatus;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { IScriptableFunction } from '../interfaces/iscriptable-function';\r\nimport { SelectComponentScriptableFunction } from '../models/scriptable-functions/select-component.model';\r\nimport { CallMethodScriptableFunction } from '../models/scriptable-functions/call-method.model';\r\nimport { ClickButtonScriptableFunction } from '../models/scriptable-functions/click-button.model';\r\nimport { ClickLinkScriptableFunction } from '../models/scriptable-functions/click-link.model';\r\n//import { InputValueScriptableFunction } from '../models/scriptable-functions/input-value.model';\r\nimport { SetInputValueScriptableFunction } from '../models/scriptable-functions/set-input-value.model';\r\n \r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScriptableFunctionService {\r\n // Properties.\r\n private static scriptableFunctions: IScriptableFunction[] =\r\n [\r\n new SelectComponentScriptableFunction(),\r\n new ClickButtonScriptableFunction(),\r\n new ClickLinkScriptableFunction(),\r\n //new InputValueScriptableFunction(),\r\n new SetInputValueScriptableFunction(),\r\n new CallMethodScriptableFunction()\r\n ];\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Service methods.\r\n public get ScriptableFunctions(): IScriptableFunction[] {\r\n return ScriptableFunctionService.scriptableFunctions;\r\n }\r\n\r\n public getScriptableFunctionNamed(functionName: string): IScriptableFunction {\r\n let scriptableFunction: IScriptableFunction = ScriptableFunctionService.scriptableFunctions.find(f => f.callableName == functionName);\r\n return scriptableFunction;\r\n }\r\n\r\n // Helper methods.\r\n}\r\n","import { Component, OnInit, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\r\nimport { MenuItem, TreeNode } from 'primeng/api';\r\nimport { MatInput } from '@angular/material/input';\r\nimport { TooltipPosition } from '@angular/material/tooltip';\r\n\r\nimport { HtmlElementInfo, IComponentElementsByElementType } from '../../models/component-scripting/html-element-info.model';\r\n//import { ElementTypeMetadata } from '../../models/component-scripting/element-type-metadata.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ComponentHierarchyService, IComponentHierarchyChanged } from '../../services/component-hierarchy.service';\r\nimport { ComponentTreeNode, FlatComponentTreeNode } from '../../models/component-hierarchy/component-tree-node.model';\r\n//import { HtmlInputValue } from '../../models/component-scripting/html-input-value.model';\r\nimport { HtmlElementTypeService } from '../../services/html-element-type.service';\r\n//import { EditValueDialog } from '../../dialogs/edit-value/edit-value.dialog';\r\nimport { DisplayContentData, DisplayContentDialog, DisplayContentDialogInitData } from '../display-content/display-content.dialog';\r\nimport { UITestActionRecorderService } from '../../services/ui-test-action-recorder.service';\r\nimport { UITestExecutionService } from '../../services/ui-test-execution.service';\r\nimport { ServiceClassCatalogueService, ServiceClassInfo } from '../../services/service-class-catalogue.service';\r\nimport { ISelectedElementInfo } from '../../models/component-scripting/iselected-element-info.interface';\r\nimport { SelectedComponentData } from '../../models/component-scripting/selected-component-data.model';\r\n//import { ComponentMethodMetadata, ComponentMethodsMetadata, ComponentMethodsService } from '../../models/component-scripting/component-methods-metadata.model';\r\nimport { JQueryBrowserDriverService } from '../../services/jquery-browser-driver.service';\r\n//import { HtmlElementTypeNames } from '../../models/component-scripting/html-element-type-names.model';\r\nimport { ScriptableComponentStatus } from '../../enums/component-scripting/scriptable-component-status.enum';\r\nimport { ServiceAsTestableComponent } from '../../models/component-scripting/service-as-testable-component.model';\r\n//import { ElementTypeInfo } from '../../models/component-scripting/element-type-info.model';\r\nimport { UITestDirectiveParser, ParsedTestCommands } from '../../utility-classes/parse/ui-test-directive-parser';\r\nimport { IScriptableFunction, FunctionExecutionStatus } from '../../interfaces/iscriptable-function';\r\nimport { Tuple } from '../../models/parse/tuple.model';\r\nimport { Token } from '../../models/parse/token.model';\r\nimport { TokenCode } from '../../models/parse/token-code.enum';\r\nimport { ScriptableFunctionService } from '../../services/scriptable-function.service';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\n//import { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\n//import { ComponentMethodMetadata } from '../../models/component-scripting/component-methods-metadata.model';\r\nimport { SelectOptionsDialog } from '../select-options/select-options.dialog';\r\nimport { SelectedComponentInfoComponent } from '../../components/selected-component-info/selected-component-info.component';\r\nimport { IOperationCompletedCallback, IRegisterOperationCompletedCallback } from '../../interfaces/ioperation-completed.intefaces';\r\nimport { FormBuilderService } from '../../services/form-builder.service';\r\nimport { FolderService } from '../../services/folder.service';\r\nimport { FormInstanceService } from '../../services/form-instance.service';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\nexport class UITestCenterDialogManager {\r\n public constructor() {\r\n }\r\n\r\n // Open the dialogue.\r\n public openDialogUsing(dialog: MatDialog): MatDialogRef {\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = false;\r\n //dialogConfig.width = '800px';\r\n //dialogConfig.height = '325px';\r\n dialogConfig.data = null; // No data yet.\r\n\r\n const dialogRef = dialog.open(UITestCenterDialog, dialogConfig);\r\n dialogRef.afterClosed().subscribe(naResult => {\r\n // Note: presently there is no logic in this block by design.\r\n });\r\n\r\n return dialogRef;\r\n }\r\n}\r\n\r\nclass SelectedServiceData {\r\n public constructor(public serviceInfo: ServiceClassInfo) {\r\n } \r\n\r\n public serviceIsVisible: boolean = true;\r\n}\r\n\r\nclass ReplayTestActionInfo {\r\n public scriptCommands: ParsedTestCommands = null;\r\n public currentTupleIndex: number = 0;\r\n public lastExecutionStatus: FunctionExecutionStatus = FunctionExecutionStatus.NotStarted;\r\n public numCheckExecutionStatusCalls: number = 0;\r\n public readonly maxCheckExecutionStatusCalls: number = 50;\r\n\r\n public constructor(scriptCommands: ParsedTestCommands) {\r\n this.scriptCommands = scriptCommands;\r\n }\r\n}\r\n\r\n@Component({\n selector: 'app-ui-test-center',\n templateUrl: './ui-test-center.dialog.html',\n styleUrls: ['./ui-test-center.dialog.scss'],\n standalone: false\n})\nexport class UITestCenterDialog implements OnInit, AfterViewInit, OnDestroy, IComponentHierarchyChanged, ITestActionRecorderService {\n // Properties.\r\n //private treeData: TreeNode[] = [];\r\n private cachedTreeData: TreeNode[] = [];\r\n public selectedTreeNode: TreeNode = null;\r\n\r\n //@ViewChild('gfgtree') tree!: Tree;\r\n private selectedComponentInfo: SelectedComponentData = null;\r\n //private selectedServiceInfo: ServiceClassInfo = null;\r\n public readonly serviceClassNames: string[] = [];\r\n private selectedServiceInfo: SelectedServiceData = null;\r\n private replayTestActionInfo: ReplayTestActionInfo = null;\r\n\r\n @ViewChild('selectedComponentInfoComponent') selectedComponentInfoComponent: SelectedComponentInfoComponent;\r\n\r\n // Constructor.\n public constructor(public dialogRef: MatDialogRef,//, @Inject(MAT_DIALOG_DATA) public initData: UITestCenterDialogManager) { }\r\n private myComponentHierarchyService: ComponentHierarchyService,\r\n private uiTestActionRecorderService: UITestActionRecorderService,\r\n //private uiTestExecutionService: UITestExecutionService,\r\n private serviceCatalogueService: ServiceClassCatalogueService,\r\n private htmlElementTypeService: HtmlElementTypeService,\r\n private jqueryBrowserDriverService: JQueryBrowserDriverService,\r\n private scriptableFunctionService: ScriptableFunctionService,\r\n private formBuilderService: FormBuilderService,\r\n private folderService: FolderService,\r\n private formInstanceService: FormInstanceService,\r\n private dialog: MatDialog)\r\n {\r\n let servicesCatalogue: ServiceClassInfo[] = this.serviceCatalogueService.serviceClassCatalogue;\r\n if (servicesCatalogue != null) {\r\n for (let index: number = 0; index < servicesCatalogue.length; index++) {\r\n let serviceInfo: ServiceClassInfo = servicesCatalogue[index];\r\n this.serviceClassNames.push(serviceInfo.className);\r\n }\r\n }\r\n }\r\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n this.componentHierarchyService.UITestCenterDialog = this;\r\n this.componentHierarchyService.addHierarchyChangedHandler(this);\n }\r\n\r\n public ngAfterViewInit(): void {\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.componentHierarchyService.UITestCenterDialog = null;\r\n this.componentHierarchyService.removeHierarchyChangedHandler(this);\r\n }\n\r\n // Methods called by my HTML code.\r\n public get Title(): string {\r\n return 'UI Test Center';\r\n }\r\n\r\n public get TreeNodes(): TreeNode[] {\r\n if ((this.cachedTreeData == null) || (this.cachedTreeData.length == 0))\r\n this.cachedTreeData = this.componentHierarchyService.HierarchyAsTreeNodes;\r\n //this.cachedTreeData = this.componentHierarchyService.HierarchyAsTreeNodes;\r\n \r\n return this.cachedTreeData;\r\n }\r\n public get SelectedTreeNode(): TreeNode {\r\n return this.selectedTreeNode;\r\n }\r\n public set SelectedTreeNode(node: TreeNode) {\r\n this.selectedTreeNode = node;\r\n }\r\n\r\n public get ComponentSelected(): boolean {\r\n return (this.selectedComponentInfo != null) && (this.selectedComponentInfo.componentIsVisible == true);\r\n }\r\n public get ServiceSelected(): boolean {\r\n return (this.selectedServiceInfo != null) && (this.selectedServiceInfo.serviceIsVisible == true);\r\n }\r\n public get SelectedServiceInfo(): ServiceClassInfo {\r\n //return this.selectedServiceInfo;\r\n return this.selectedServiceInfo != null ? this.selectedServiceInfo.serviceInfo : null;\r\n }\r\n public get SelectedComponent(): ITestableComponent {\r\n return this.selectedComponentInfo != null ? this.selectedComponentInfo.component : null;\r\n }\r\n public get SelectedElementInfo(): ISelectedElementInfo {\r\n let selectedElementInfo: ISelectedElementInfo = this.selectedComponentInfo;\r\n return selectedElementInfo;\r\n }\r\n public get ComponentHasElements(): boolean {\r\n let hasElements: boolean = false;\r\n\r\n if (this.selectedComponentInfo != null) {\r\n hasElements = this.selectedComponentInfo.componentElementTypes.length > 0;\r\n }\r\n\r\n return hasElements;\r\n }\r\n public get ComponentNoElementsMessage(): string {\r\n let message: string = '';\r\n\r\n if ((this.selectedComponentInfo != null) && (!this.ComponentHasElements))\r\n message = `Component ${this.selectedComponentInfo.component.tagName.toLowerCase()} has no elements`;\r\n\r\n return message;\r\n }\r\n\r\n public get TooltipPosition(): TooltipPosition {\r\n return 'right';\r\n }\r\n public get SelectedElementIsInput(): boolean {\r\n let isInput: boolean = false;\r\n\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.selectedElement != null))\r\n isInput = this.selectedComponentInfo.selectedElement.elementTypeMetadata.hasInputs(this.jqueryBrowserDriverService, this.selectedComponentInfo.selectedElement.element);\r\n\r\n return isInput;\r\n }\r\n\r\n public get ReplayDisabled(): boolean {\r\n return this.uiTestActionRecorderService.LogIsEmpty;\r\n }\r\n\r\n // Implement ITestActionRecorderService methods.\r\n public get componentHierarchyService(): ComponentHierarchyService {\r\n return this.myComponentHierarchyService;\r\n }\r\n\r\n public getRegisterOperationCompletedCallbackFor(serviceName: string): IRegisterOperationCompletedCallback {\r\n let registerCallback: IRegisterOperationCompletedCallback = null;\r\n\r\n if (serviceName == 'formBuilderService')\r\n registerCallback = this.formBuilderService;\r\n else if (serviceName == 'folderService')\r\n registerCallback = this.folderService;\r\n else if (serviceName == 'formInstanceService')\r\n registerCallback = this.formInstanceService;\r\n\r\n return registerCallback;\r\n }\r\n\r\n public selectComponent(component: ITestableComponent): void {\r\n this.handleComponentSelected(component);\r\n }\r\n\r\n public clickButton(elementTitle: string, elementMetadataKey: string, elementSubtype: string, operationCompletedServiceName: string, operationName: string): void {\r\n if (this.selectedComponentInfoComponent != null) {\r\n let htmlElementInfo = this.selectedComponentInfoComponent.getHtmlElementInfoFor(elementMetadataKey, elementSubtype, elementTitle);\r\n if (htmlElementInfo != null) {\r\n this.selectedComponentInfoComponent.onElementInfoClicked(htmlElementInfo);\r\n this.selectedComponentInfoComponent.onElementInfoDoubleClicked(htmlElementInfo);\r\n } \r\n }\r\n }\r\n public clickLink(elementTitle: string, elementMetadataKey: string, elementSubtype: string, operationCompletedServiceName: string, operationName: string): void {\r\n this.clickButton(elementTitle, elementMetadataKey, elementSubtype, operationCompletedServiceName, operationName);\r\n }\r\n public setInputValue(elementTitle: string, elementMetadataKey: string, elementSubtype: string, value: string, addDateTimeSuffix: boolean): void {\r\n if ((this.selectedComponentInfoComponent != null) && (this.selectedComponentInfo != null) && (this.selectedComponentInfo.component != null)) {\r\n let htmlElementInfo = this.selectedComponentInfoComponent.getHtmlElementInfoFor(elementMetadataKey, elementSubtype, elementTitle);\r\n if (htmlElementInfo != null) {\r\n let matInput: MatInput = this.selectedComponentInfo.component.getMatInputWithElement(htmlElementInfo.element);\r\n if (matInput != null)\r\n this.jqueryBrowserDriverService.sendKeysTo(htmlElementInfo.element, matInput, value);\r\n }\r\n } \r\n }\r\n\r\n //public callMethod(component: ITestableComponent, methodName: string, parameters: string[]): void {\r\n public callMethod(methodName: string, parameters: string[]): void {\r\n if (this.selectedComponentInfo != null) {\r\n if ((parameters == null) || (parameters.length == 0)) {\r\n this.selectedComponentInfo.component[methodName]();\r\n } else {\r\n let fiveParameters: string[] = [];\r\n for (let index: number = 0; index < parameters.length; index++)\r\n fiveParameters.push(parameters[index]);\r\n while (fiveParameters.length < 5)\r\n fiveParameters.push(null);\r\n\r\n this.selectedComponentInfo.component[methodName](fiveParameters[0], fiveParameters[1], fiveParameters[2], fiveParameters[3], fiveParameters[4]);\r\n }\r\n }\r\n }\r\n // End ITestActionRecorderService methods.\r\n\r\n // Handle control events.\r\n public loadTestActions(): void {\r\n let dialogRef = this.dialog.open(SelectOptionsDialog, {\r\n width: '50%',\r\n autoFocus: true,\r\n data: {\r\n options: '',\r\n title: 'Paste Test Actions',\r\n label: 'Paste test actions here'\r\n }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(pastedData => {\r\n if (pastedData != null) {\r\n let actions: string[] = pastedData.split('\\n');\r\n this.uiTestActionRecorderService.setLogText(actions);\r\n }\r\n });\r\n }\r\n\r\n public replayTest(): void {\r\n let testableActions: string = this.uiTestActionRecorderService.TestActionLogText;\r\n let parser: UITestDirectiveParser = new UITestDirectiveParser();\r\n let scriptCommands: ParsedTestCommands = parser.parseTuples(testableActions, this.scriptableFunctionService);\r\n\r\n if (scriptCommands.errorMessage == null) {\r\n this.replayTestActionInfo = new ReplayTestActionInfo(scriptCommands);\r\n\r\n if (this.replayTestActionInfo.scriptCommands.tuples.length > 0)\r\n this.continueScriptExecution();\r\n } else {\r\n alert(scriptCommands.errorMessage);\r\n }\r\n\r\n /*\r\n for (let index: number = 0; index < scriptCommands.tuples.length; index++) {\r\n let tuple: Tuple = scriptCommands.tuples[index];\r\n\r\n if (tuple.OpCode == TokenCode.TOKEN_FUNCTION_CALL) {\r\n let scriptableFunction: IScriptableFunction = tuple.LeftValue;\r\n let functionParamTokens: Token[] = tuple.RightValue;\r\n let functionParamStrings: string[] = [];\r\n for (let paramIndex: number = 0; paramIndex < functionParamTokens.length; paramIndex++) {\r\n let token: Token = functionParamTokens[paramIndex];\r\n let paramString: string = null;\r\n if ((token.Code == TokenCode.TOKEN_STRING_SINGLE_QUOTES) || (token.Code == TokenCode.TOKEN_NUMBER))\r\n paramString = token.Value;\r\n else if (token.Code == TokenCode.TOKEN_NULL)\r\n paramString = null;\r\n else\r\n paramString = null;\r\n functionParamStrings.push(paramString);\r\n }\r\n\r\n scriptableFunction.execute(this, functionParamStrings);\r\n } \r\n }\r\n */\r\n }\r\n private continueScriptExecution(): void {\r\n if ((this.replayTestActionInfo != null) && (this.replayTestActionInfo.currentTupleIndex < this.replayTestActionInfo.scriptCommands.tuples.length)) {\r\n let tuple: Tuple = this.replayTestActionInfo.scriptCommands.tuples[this.replayTestActionInfo.currentTupleIndex];\r\n\r\n if (tuple.OpCode == TokenCode.TOKEN_FUNCTION_CALL) {\r\n let scriptableFunction: IScriptableFunction = tuple.LeftValue;\r\n let functionParamTokens: Token[] = tuple.RightValue;\r\n let functionParamStrings: string[] = [];\r\n for (let paramIndex: number = 0; paramIndex < functionParamTokens.length; paramIndex++) {\r\n let token: Token = functionParamTokens[paramIndex];\r\n let paramString: string = null;\r\n if ((token.Code == TokenCode.TOKEN_STRING_SINGLE_QUOTES) || (token.Code == TokenCode.TOKEN_NUMBER))\r\n paramString = token.Value;\r\n else if (token.Code == TokenCode.TOKEN_NULL)\r\n paramString = null;\r\n else\r\n paramString = null;\r\n functionParamStrings.push(paramString);\r\n }\r\n\r\n if ((this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.NotStarted) || (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Completed)) {\r\n this.replayTestActionInfo.numCheckExecutionStatusCalls = 0;\r\n this.replayTestActionInfo.lastExecutionStatus = scriptableFunction.execute(this, functionParamStrings);\r\n } else if (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Verifying) {\r\n if (this.replayTestActionInfo.numCheckExecutionStatusCalls < this.replayTestActionInfo.maxCheckExecutionStatusCalls) {\r\n this.replayTestActionInfo.lastExecutionStatus = scriptableFunction.checkExecutionStatus(this, functionParamStrings);\r\n this.replayTestActionInfo.numCheckExecutionStatusCalls++;\r\n } else {\r\n this.replayTestActionInfo.lastExecutionStatus = FunctionExecutionStatus.Failed;\r\n } \r\n }\r\n\r\n if (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Completed)\r\n this.replayTestActionInfo.currentTupleIndex++;\r\n else if (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Failed)\r\n alert('Script execution failed.');\r\n } else {\r\n alert('Script execution: encountered an unknown opCode.');\r\n } \r\n\r\n if ((this.replayTestActionInfo.currentTupleIndex < this.replayTestActionInfo.scriptCommands.tuples.length) &&\r\n ((this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Completed) || (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Verifying)))\r\n {\r\n setTimeout(() => {\r\n // Give the components a change to execute any life cycle events.\r\n this.continueScriptExecution();\r\n }, 100); \r\n } else {\r\n // Script execution completed.\r\n if ((this.replayTestActionInfo.currentTupleIndex == this.replayTestActionInfo.scriptCommands.tuples.length) && (this.replayTestActionInfo.lastExecutionStatus == FunctionExecutionStatus.Completed))\r\n alert('The test script completed successfully.');\r\n this.replayTestActionInfo = null;\r\n } \r\n }\r\n }\r\n\r\n public displayLogs(): void {\r\n let testableActions: string = this.uiTestActionRecorderService.TestActionLogText;\r\n let log: string = this.componentHierarchyService.LogText;\r\n let contentData: DisplayContentData[] =\r\n [\r\n { content: testableActions, tabName: 'Test Actions Log', makeContentReadonly: false },\r\n { content: log, tabName: 'Diagnostic Log', makeContentReadonly: true }\r\n ];\r\n let initData: DisplayContentDialogInitData = new DisplayContentDialogInitData('Test Logs', contentData);\r\n\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '800px';\r\n dialogConfig.height = '615px';\r\n dialogConfig.data = initData;\r\n\r\n const dialogRef = this.dialog.open(DisplayContentDialog, dialogConfig);\r\n dialogRef.afterClosed().subscribe(na => {\r\n // NOTE: NOTHING TO DO HERE BY DESIGN.\r\n });\r\n }\r\n public clearLogs(): void {\r\n this.uiTestActionRecorderService.clearLog();\r\n this.componentHierarchyService.clearLogs();\r\n }\r\n\r\n // Handle control events.\r\n public objectTypeIndexChanged(selectedTab: number): void {\r\n // NOTE: THIS METHOD IS PRESENTLY A NOOP.\r\n }\r\n\r\n public treeDivClick(eventData: any): void {\r\n }\r\n\r\n public onTreeNodeDrop(eventData: any): void {\r\n // Note: this functionality is presently not being used/not implemented.\r\n }\r\n public nodeSelect(event: Object): void {\r\n let treeNode: ComponentTreeNode = event['node'];\r\n let component: ITestableComponent = treeNode.Component;\r\n\r\n this.handleComponentSelected(component);\r\n }\r\n public handleNodeClicked(flatNode: FlatComponentTreeNode): void {\r\n let component: ITestableComponent = flatNode.Component;\r\n\r\n this.handleComponentSelected(component);\r\n }\r\n\r\n public nodeExpand(event: any): void {\r\n // Note: this functionality is presently not being used/not implemented.\r\n }\r\n\r\n public onServiceClassClicked(serviceClassName: string): void {\r\n let servicesCatalogue: ServiceClassInfo[] = this.serviceCatalogueService.serviceClassCatalogue;\r\n let serviceInfo = servicesCatalogue.find(si => si.className == serviceClassName);\r\n let serviceAsTestableComponent: ServiceAsTestableComponent = new ServiceAsTestableComponent(serviceInfo, this.htmlElementTypeService);\r\n\r\n this.handleComponentSelected(serviceAsTestableComponent);\r\n }\r\n\r\n public dismissDialogue(): void {\r\n this.dialogRef.close(null);\r\n }\r\n\r\n //Implement IComponentHierarchyChanged methods\r\n public componentAdded = (component: ITestableComponent): void => {\r\n // Nothing to do here as we need to wait for the component to initialize/identify its scriptable elements.\r\n this.cachedTreeData = null;\r\n }\r\n public componentRemoved = (component: ITestableComponent, currentParentComponent: ITestableComponent): void => {\r\n this.cachedTreeData = null;\r\n\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.component == component))\r\n this.selectedComponentInfo = null;\r\n\r\n if ((this.selectedComponentInfo == null) || (this.selectedComponentInfo.component != currentParentComponent)) {\r\n this.tryToFindAndSelectComponentNode(currentParentComponent);\r\n this.handleComponentSelected(currentParentComponent);\r\n } \r\n }\r\n public hierarchyChanged = (): void => {\r\n // NOOP.\r\n }\r\n public componentInitialized(component: ITestableComponent, initializationStatus: ScriptableComponentStatus): void {\r\n // Make the newly initialized component the selected component.\r\n if (initializationStatus == ScriptableComponentStatus.InitializationComplete) {\r\n this.tryToFindAndSelectComponentNode(component);\r\n this.handleComponentSelected(component);\r\n\r\n if ((this.selectedComponentInfo != null) && (this.selectedComponentInfo.component == component)) {\r\n // The same component has initialized again. Need to let the instance of see this change.\r\n let tempSelectedComponentInfo: SelectedComponentData = this.selectedComponentInfo;\r\n this.selectedComponentInfo = null;\r\n setTimeout(() => {\r\n this.selectedComponentInfo = tempSelectedComponentInfo;\r\n }, 0); \r\n }\r\n } \r\n }\r\n private tryToFindAndSelectComponentNode(component: ITestableComponent): void {\r\n // Make sure we have the latest tree data.\r\n //this.treeData = this.componentHierarchyService.HierarchyAsTreeNodes;\r\n this.cachedTreeData = this.componentHierarchyService.HierarchyAsTreeNodes;\r\n\r\n // Try to find the specified node in the hierarchy.\r\n let componentTreeNode: ComponentTreeNode = this.componentHierarchyService.findComponentTreeNodeIn(this.cachedTreeData[0], component);\r\n if (componentTreeNode != null) {\r\n let treeNode: TreeNode = componentTreeNode;\r\n this.selectedTreeNode = treeNode;\r\n }\r\n }\r\n\r\n // Helper methods.\r\n private handleComponentSelected(component: ITestableComponent): void {\r\n /*\r\n this.uiTestActionRecorderService.selectComponent(component);\r\n\r\n this.selectedComponentInfo = new SelectedComponentData(component);\r\n this.selectedComponentInfo.componentElementTypes = this.selectedComponentInfo.component.elementTypes;\r\n if ((this.selectedComponentInfo.componentElementTypes != null) && (this.selectedComponentInfo.componentElementTypes.length > 0)) {\r\n for (let index: number = 0; index < this.selectedComponentInfo.componentElementTypes.length; index++) {\r\n let elementType: string = this.selectedComponentInfo.componentElementTypes[index];\r\n let elements: HtmlElementInfo[] = this.selectedComponentInfo.component.getElementsOfType(elementType);\r\n\r\n // Save elements by type.\r\n this.selectedComponentInfo.mapOfElementsByType[elementType] = elements;\r\n\r\n // Save elements by tab name as well.\r\n this.selectedComponentInfo.mapElementsByTabNames(elementType, elements);\r\n }\r\n }\r\n */\r\n this.selectedComponentInfo = SelectedComponentData.handleComponentSelected(component, this.uiTestActionRecorderService, true);\r\n }\r\n}\n","\r\n\r\n\r\n\r\n\r\n \r\n

\r\n {{this.Title}}\r\n

\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Directive,\r\n Input,\r\n HostListener,\r\n ElementRef\r\n} from '@angular/core';\r\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\r\nimport { DatePipe } from '@angular/common';\r\n\r\n// Define, export a directive used to format a date 'matInput' control.\r\n//\r\n// Note: much of the code in the following directive was taken from the following article:\r\n// https://medium.com/angular-in-depth/angular-material-matinput-control-with-thousands-separation-ebcbb7b027f4.\r\n@Directive({\n selector: '[dateFormat]',\n providers: [\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CustomDateFormatDirective }\n // Note: could not make the directive implement NG_VALUE_ACCESSOR as component\n // DateFormFieldComponent implements NG_VALUE_ACCESSOR (I forget the exact\n // error message, but it will come back if the following code is enabled).\n /*\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CustomDateFormatDirective,\n multi: true,\n }\n */\n ],\n standalone: false\n})\r\nexport class CustomDateFormatDirective {\r\n // Properties.\r\n @Input() formatString: string = null;\r\n\r\n private _value: string | null;\r\n private fnOnChange = (_ignored: any) => { }; // Initial, NOOP function.\r\n\r\n // Constructor.\r\n public constructor(private elementRef: ElementRef) {\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n /*\r\n public ngOnInit(): void {\r\n return;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n return;\r\n }\r\n */\r\n // End life cycle methods.\r\n\r\n // Implement MAT_INPUT_VALUE_ACCESSOR.\r\n public get value(): string | null {\r\n return this._value;\r\n }\r\n\r\n @Input('value')\r\n public set value(value: string | null) {\r\n this._value = value;\r\n this.formatValue(value);\r\n }\r\n\r\n // Implement one of the NG_VALUE_ACCESSOR methods but not the interface itself\r\n // (per comments above). As this directive does not implement NG_VALUE_ACCESSOR,\r\n // the following writeValue() method is not called by the Angular framework.\r\n // Instead, it it calls manually from code in DateFormFieldComponent.\r\n public writeValue(value: any): void {\r\n this._value = value;\r\n this.formatValue(this._value); // format Value\r\n }\r\n\r\n /*\r\n writeValue(value: any) {\r\n this._value = value;\r\n this.formatValue(this._value); // format Value\r\n }\r\n\r\n registerOnChange(fn: (value: any) => void) {\r\n this.fnOnChange = fn;\r\n }\r\n\r\n registerOnTouched() {\r\n }\r\n */\r\n // End NG_VALUE_ACCESSOR implementation.\r\n\r\n // Handle control methods.\r\n /*\r\n @HostListener('input', ['$event.target.value'])\r\n onInput(value) {\r\n // here we cut any non numerical symbols \r\n //this._value = value.replace(/[^\\d.-]/g, '');\r\n return;\r\n }\r\n */\r\n\r\n @HostListener('blur')\r\n _onBlur() {\r\n if (this.elementRef && this.elementRef.nativeElement && this.elementRef.nativeElement.value) {\r\n this.formatValue(this.elementRef.nativeElement.value);\r\n }\r\n\r\n return;\r\n }\r\n\r\n @HostListener('focus')\r\n onFocus() {\r\n //this.unFormatValue(); // remove commas for editing purpose\r\n return;\r\n }\r\n // End handling of control methods.\r\n\r\n // Private helper methods.\r\n private formatValue(value: string | null): void {\r\n if (value !== null) {\r\n this.elementRef.nativeElement.value = this.applyDateFormatting(value);\r\n } else {\r\n this.elementRef.nativeElement.value = '';\r\n }\r\n\r\n return;\r\n }\r\n\r\n private applyDateFormatting(value: string | null): string {\r\n //var datePipe: DatePipe = this.getDatePipe();\r\n let datePipe: DatePipe = new DatePipe('en-US');\r\n let formattedValue: string = datePipe.transform(value, this.formatString);\r\n\r\n return (formattedValue);\r\n }\r\n\r\n // Define a public version of applyDateFormatting() so the logic for such formatting\r\n // is only contained in this directive class (rather than being repeated in class DateFormFieldComponent).\r\n public static applyDateFormattingUsing(formatString: string, value: string): string {\r\n let datePipe: DatePipe = new DatePipe('en-US');\r\n let formattedValue: string = datePipe.transform(value, formatString);\r\n\r\n return (formattedValue);\r\n }\r\n\r\n /*\r\n private getDatePipe(): DatePipe {\r\n let datePipe: DatePipe = new DatePipe('en-US');\r\n \r\n return (datePipe);\r\n }\r\n */\r\n}\r\n","import { Directive, ViewContainerRef, Input, OnInit, OnDestroy } from '@angular/core';\r\n\r\n@Directive({\n selector: '[dynamic-component-host]',\n standalone: false\n})\r\nexport class DynamicComponentHostDirective implements OnInit, OnDestroy {\r\n // Define instance data.\r\n @Input() name: string = null;\r\n\r\n // Implement my constructor.\r\n public constructor(public viewContainerRef: ViewContainerRef) {\r\n return;\r\n }\r\n\r\n // Life cycle methods.\r\n public ngOnInit(): void {\r\n return;\r\n }\r\n\r\n public ngAfterContentInit(): void {\r\n return;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n return;\r\n }\r\n // End life cycle methods.\r\n\r\n // Define getter methods.\r\n public get Name(): string {\r\n return (this.name);\r\n }\r\n // End getter methods.\r\n}\n","import { ComponentFactoryResolver, Directive, ElementRef, HostBinding, Input, OnInit, Renderer2, ViewContainerRef } from '@angular/core';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\nimport { IconFormatEnum } from '../enums/icon-format.enum';\r\nimport { ItemTypeEnum } from '../enums/item-type.enum';\r\nimport { FabricFileTypeIconMapping, FabricIconSizes, IFileTypeIconMap } from '../mappings/fabric-file-types-icon.mapping';\r\nimport { DataCollection } from '../models/site-content/data-collection.model'; \r\n\r\n@Directive({\n selector: '[appIcon]',\n standalone: false\n})\r\nexport class IconDirective implements OnInit {\r\n\r\n private fabricIconBaseURL: string = 'https://static2.sharepointonline.com/files/fabric/assets/item-types';\r\n\r\n protected _elementClass: string[] = [];\r\n\r\n @HostBinding('class')\r\n get elementClass(): string {\r\n return this._elementClass.join(' ');\r\n }\r\n //set(val: string) {\r\n // this._elementClass = val.split(' ');\r\n //}\r\n\r\n @Input() appIcon: DataCollection;\r\n\r\n @Input() appIconItemType: string;\r\n @Input() fileName: string;\r\n @Input() iconFormat: string;\r\n @Input() fabricIconSize: number = FabricIconSizes.SMALL;\r\n @Input() matIconText: string = '';\r\n\r\n @Input() fabricIconName: string = '';\r\n @Input() svgIcon: string = '';\r\n\r\n private elementRef: ElementRef;\r\n\r\n private _fileTypeIconMap: IFileTypeIconMap[] = null;\r\n\r\n constructor(private el: ElementRef, private domSanitizer: DomSanitizer) {\r\n this.elementRef = el;\r\n }\r\n\r\n get FileTypeIconMap(): IFileTypeIconMap[] {\r\n if (this._fileTypeIconMap == null) {\r\n this._fileTypeIconMap = new FabricFileTypeIconMapping().FileTypeIconMap;\r\n }\r\n\r\n return this._fileTypeIconMap;\r\n }\r\n\r\n /*Examples of how to implement\r\n *\r\n * -----Material Icons not from item base property\r\n *\r\n * You would want to overwrite the following properties;\r\n *\r\n * appIconItemType - Set to whatever case statement covers material icons ie ItemTypeEnum.ATTACHMENT_ACTIVITY\r\n * matIconText - Set to the key word used for icon ie \"edit\"\r\n *\r\n * Example:\r\n * \r\n *\r\n *\r\n * -----Material Icons from item base property\r\n *\r\n * Be sure your object class has the inherited method \"getIcon()\" returning the key word used for the icon and there is a case statement accounting for your ItemTypeEnum item type\r\n *\r\n * -----Fabric Icons (File Type)\r\n *\r\n * This is based on the extension of a file or attachment name. Pass in the entire object itself to this directive and be sure your ItemTypeEnum item type is accounted for in the\r\n * case statements. The directive will handle the rest\r\n *\r\n * Example:\r\n * \r\n *\r\n *-----Fabric Icons (Explicit Reference)\r\n *\r\n * To see what key to use for your file type, such as excel, word, etc. get it from here:\r\n *\r\n * https://developer.microsoft.com/en-us/fluentui#/styles/web/file-type-icons\r\n *\r\n * If you want to use a fabric icon directly do the following, first setup your values in the code behind\r\n *\r\n * fabricName: string = FabricIconNamesEnum.ARCHIVE;\r\n * itemType: string = ItemTypeEnum.FABRIC_ICON;\r\n *\r\n * Then assign the values in the HTML after calling the appIcon directive, remember to set a CSS class to have a height and width to the icon:\r\n * \r\n * \r\n * \r\n *-----SVG Icons\r\n *\r\n * In the code behind:\r\n *\r\n * itemType: string = ItemTypeEnum.SVG_ICON;\r\n * \r\n * In the HTML, set svgIcon as the svg icon name:\r\n * \r\n *\r\n * \r\n */\r\n ngOnInit(): void {\r\n\r\n if (this.appIcon) {\r\n if (!this.appIconItemType)\r\n this.appIconItemType = this.appIcon.getType();\r\n }\r\n\r\n switch (this.appIconItemType) {\r\n //KLW - Adding logic to use a fabric icon explicitly\r\n case ItemTypeEnum.FABRIC_ICON:\r\n { \r\n let inner = '\"'';\r\n this.elementRef.nativeElement.innerHTML = inner;\r\n break;\r\n }\r\n\r\n case ItemTypeEnum.SVG_ICON:\r\n {\r\n let inner = '';\r\n this.elementRef.nativeElement.innerHTML = inner;\r\n break;\r\n }\r\n\r\n case ItemTypeEnum.ATTACH_W_URLS:\r\n case ItemTypeEnum.FILE:\r\n {\r\n var fileIconProperties: IFileTypeIconMap = null;\r\n\r\n if (this.appIcon.name) {\r\n this.fileName = this.appIcon.name;\r\n fileIconProperties = this.getAssociatedFabricIconProperties(this.getFileExtension(this.fileName));\r\n\r\n if (fileIconProperties) {\r\n this.iconFormat = fileIconProperties.value.iconFormat;\r\n\r\n switch (this.iconFormat) {\r\n case IconFormatEnum.FABRIC_ICON: {\r\n let inner = '\"'';\r\n this.elementRef.nativeElement.innerHTML = inner;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else { //Default Fabric Icon\r\n this.elementRef.nativeElement.innerHTML = '';\r\n }\r\n }\r\n break;\r\n }\r\n // this catches me every time I add a new use of ListView and wonder why icons don't display -- I forget to add the type here\r\n // TODO: It would be good to find a way for IconDirective to not need to know about the types of thing using it\r\n case ItemTypeEnum.DATACOLLECTION:\r\n case ItemTypeEnum.FORM:\r\n case ItemTypeEnum.FORM_INSTANCE:\r\n case ItemTypeEnum.FOLDER:\r\n case ItemTypeEnum.ATTACHMENT_ACTIVITY:\r\n case ItemTypeEnum.WORKFLOW:\r\n case ItemTypeEnum.NOTIFICATION:\r\n case ItemTypeEnum.SUBSCRIPTION:\r\n case ItemTypeEnum.ICON:\r\n {\r\n this._elementClass.push('material-icons');\r\n if (this.matIconText == '')\r\n this.matIconText = this.appIcon.getIcon();\r\n\r\n this.elementRef.nativeElement.innerHTML = this.matIconText;\r\n\r\n break;\r\n }\r\n case ItemTypeEnum.DOCUMENT_PUBLISH_SETTINGS:\r\n {\r\n var fileIconProperties: IFileTypeIconMap = this.getAssociatedFabricIconProperties(this.appIcon.getIcon());\r\n this.iconFormat = fileIconProperties.value.iconFormat;\r\n let inner = '\"'';\r\n\r\n this.elementRef.nativeElement.innerHTML = inner;\r\n\r\n break;\r\n }\r\n\r\n default:\r\n }\r\n\r\n }\r\n\r\n private getFileExtension(fileName: string): string {\r\n var retVal = '';\r\n\r\n if (fileName)\r\n retVal = fileName.split('.').pop();\r\n\r\n return retVal;\r\n }\r\n\r\n private getAssociatedFabricIconProperties(extension: string): IFileTypeIconMap {\r\n var retVal: IFileTypeIconMap = null;\r\n\r\n if (extension) {\r\n var findKey = this.FileTypeIconMap.find(x => x.value.extensions.find(y => y == extension));\r\n\r\n if (findKey) {\r\n retVal = findKey;\r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n}\r\n","import { Directive, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';\r\nimport { DataBindingDirective, GridComponent, GridDataResult } from '@progress/kendo-angular-grid';\r\nimport { KendoGridService } from '../services/kendo-grid.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { GridConfig } from '../models/grid/grid-config.model';\r\nimport { FieldDefinitionService } from '../services/field-definition.service';\r\nimport { IGetCellDisplayValue } from '../models/grid/grid-interfaces';\r\nimport { HttpClient } from '@angular/common/http';\r\n\n@Directive({\r\n selector: '[kendoGridRemoteBinding]',\r\n exportAs: 'kendoGridRemoteBindingRef',\n standalone: false\r\n})\r\nexport class KendoGridRemoteBindingDirective extends DataBindingDirective implements OnInit, OnDestroy {\r\n\r\n @Input() gridConfig: GridConfig;\r\n @Input() fieldDefinitionService: FieldDefinitionService;\r\n @Input() getCellDisplayValue: IGetCellDisplayValue;\r\n @Input() formInstanceElementId: number;\r\n @Input() kendoGridService: KendoGridService;\r\n\r\n @Output() notifyLoaded: EventEmitter = new EventEmitter();\r\n\r\n private serviceSubscription: Subscription;\r\n\r\n constructor(private http: HttpClient, grid: GridComponent) {\r\n super(grid);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.serviceSubscription = this.kendoGridService.subscribe((result) => {\r\n this.grid.loading = false;\r\n this.grid.data = result;\r\n this.notifyDataChange();\r\n this.notifyLoaded.emit({ count: this.grid.data.data.length, gridData: result });\r\n });\r\n\r\n super.ngOnInit();\r\n this.rebind();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.serviceSubscription) {\r\n this.serviceSubscription.unsubscribe();\r\n }\r\n\r\n super.ngOnDestroy();\r\n }\r\n\r\n public rebind(): void {\r\n if (this.formInstanceElementId > 0) {\r\n this.grid.loading = true;\r\n this.kendoGridService.read(this.gridConfig, this.fieldDefinitionService, this.getCellDisplayValue, this.formInstanceElementId, this.state);\r\n }\r\n }\r\n\r\n public get Data(): GridDataResult {\r\n if (this.grid) {\r\n return this.grid.data as GridDataResult;\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","export enum BrowserStorageEnums {\n GOTO = 'goto',\n PREV = 'prev',\n PREVNAVBREADCRUMBSLABEL = 'prevNavBreadcrumbsLabel',\n IDLELOGOUT = 'idleLogout',\n PINTREEOPEN = 'pinTreeOpen',\r\n INCLUDE_FORMS_IN_TREE = 'includeFormsInTreeForSite',\n PREVNAVBREADCRUMBSURL = 'prevNavBreadcrumbsUrl',\r\n SIDE_NAV_OPEN = 'sideNavOpen',\r\n NEW_WORKFLOW_REFRESH = '', //VNEXT-235: KLW - New enum for new workflow\r\n NEW_FORM_INSTANCE_REFRESH = '', //VNEXT-235: KLW - New enum for new form instance\r\n FORCEDLOGOUT = 'forcelogout'\r\n}\n","\r\nexport enum ScriptableComponentStatus {\r\n Initializing = 'Initializing',\r\n InitializationFailed = 'InitializationFailed',\r\n InitializationComplete = 'InitializationComplete'\r\n}\r\n","export enum ConfirmationDialogEnums {\n WARNING = 'warning',\n ERROR = 'error_outline',\n EMAIL = 'email'\n}\n","export enum DragDropEnum {\r\n FORM = \"Form\",\r\n FORM_TEMPLATE = \"Form Template\",\r\n FOLDER = \"Folder\",\r\n FORM_TEMPLATE_CATALOG = \"Form Template Catalog\",\r\n DRAGGED_ITEMS = 'draggedItems',\r\n TEXT_FORMAT = 'text/JSON'\r\n}\r\n","export enum EventNameEnum {\r\n FormInstance_Workflow_Transition = 'FormInstance_Workflow_Transition',\r\n FormInstance_Added_To_Folder = \"FormInstance_Added_To_Folder\",\r\n FormInstance_Manually_Triggered = \"FormInstance_Manually_Triggered\"\r\n}\r\n","\r\nexport enum FormFieldConstraintTypeEnum {\r\n SelectOptions = 'SelectOptions',\r\n RegularExpression = 'Regex',\r\n CascadingDropdown = 'CascadingDropdown',\r\n NumericRange = 'NumericRange',\r\n DateRange = 'DateRange',\r\n\r\n // New list-values constraint types:\r\n SimpleListValues = 'SimpleListValues',\r\n CascadingListValues = 'CascadingListValues'\r\n}\r\n\r\n// Define a constraint type enumeration with user-friendly names.\r\nexport enum FormFieldConstraintTypeForUsersEnum {\r\n SelectOptions = 'List Options',\r\n RegularExpression = 'Regular Expression',\r\n CascadingDropdown = 'Cascading Dropdown',\r\n NumericRange = 'Numeric Range',\r\n DateRange = 'Date Range',\r\n\r\n // New list-values constraint types:\r\n SimpleListValues = 'Simple List Values',\r\n CascadingListValues = 'Cascading List Values'\r\n} \r\n","// Note: this enumeration is used to give a hint\r\n// to a form field class about what processing\r\n// phase is occurring.A value of this enumeration\r\n// is passed to ...\r\nexport enum FormFieldProcessingPhaseEnum {\r\n CREATING_DATA = 'Creating', \r\n LOADING_DATA = 'Loading',\r\n EDITING_DATA = 'Editing',\r\n CALCULATING_COLUMN_TOTAL = 'Calc Column Total'\r\n}\r\n","export enum FormFieldConfigurationSaveReason {\r\n SwitchingToFormPreviewMode,\r\n SavingFormToServer\r\n}\r\n","// Define the form 'modes' supported by\r\n// the form builder and form instances.\r\nexport enum FormModeEnum {\r\n DESIGN = 'design',\r\n PREVIEW = 'preview',\r\n INSTANCE = 'instance'\r\n}\r\n","export enum GridFlavorEnum {\r\n RegularGrid = 'regularGrid',\r\n AttachmentsGrid = 'attachmentsGrid',\r\n ContactsGrid = 'contactsGrid'\r\n}\r\n\r\nexport enum GridEventTypeEnum {\r\n Download = 'download',\r\n Upload = 'upload',\r\n Delete = 'delete',\r\n Restore = 'restore'\r\n}\r\n\r\nexport enum AttachmentStandardColumnNames{\r\n Title = 'standard_attachment_title_column',\r\n FileName = 'standard_attachment_file_name_column',\r\n FileType = 'standard_attachment_file_type_column',\r\n UploadInfo = 'standard_attachment_upload_info_column',\r\n DownloadInfo = 'standard_attachment_download_info_column',\r\n Version = 'standard_attachment_version_column',\r\n IsLatest = 'standard_attachment_is_latest_version_column',\r\n IsDisabled = 'standard_attachment_is_disabled_column'\r\n}\r\n\r\nexport enum GridFlavorModifiersEnum {\r\n ShowAll = 'ShowAll',\r\n ShowLatestOnly = 'ShowLatestOnly'\r\n}\r\n","export enum IconFormatEnum {\r\n MAT_ICON = 'MatIcon',\r\n SVG_ICON = 'SvgIcon',\r\n FABRIC_ICON = 'FabricIcon' //TEAMS-424: KLW - Add another icon type for the Fabric Icons\r\n}\r\n","//TEAMS-424: KLW - Create an enum to represent all object types in vNext so the \r\nexport enum ItemTypeEnum {\r\n FORM = 'form',\r\n FORM_INSTANCE_NO_DASH = 'forminstance',\r\n FORM_INSTANCE = 'form-instance',\r\n FORM_INSTANCE_ELEMENT_FOR_HISTORY = 'form-instance-el-for-hist',\r\n LOG_MESSAGE = 'log-message',\r\n MAGIC_FORM_INSTANCE = 'magic-form-instance',\r\n FOLDER = 'folder',\r\n MAGIC_FOLDER = 'magic-folder',\r\n WORKFLOW = 'Workflow',\r\n ROLE = 'role',\r\n ICON = 'icon',\r\n ATTACH_W_URLS = 'AttachmentInfoWithUrls',\r\n FILE = 'File',\r\n DATACOLLECTION = 'datacollection',\r\n ATTACHMENT_ACTIVITY = 'AttachmentActivity',\r\n DOCUMENT_PUBLISH_SETTINGS = 'DocPublishSettings',\r\n NOTIFICATION = 'notification',\r\n SUBSCRIPTION = 'subscription',\r\n BREADCRUMB = 'breadcrumb',\r\n FABRIC_ICON = 'fabricIcon',\r\n SVG_ICON = 'svgIcon'\r\n}\r\n","\r\nexport enum KendoGridOperatorName {\r\n // Note: this enumeration does not yet have all available Kendo grid operator values.\r\n Equals = 'eq',\r\n Contains = 'contains'\r\n}\r\n","export enum ProgressBarConstants {\n DETERMINATE_MODE = 'determinate',\n INDETERMINATE_MODE = 'indeterminate',\n BUFFER_MODE = 'buffer',\n QUERY_MODE = 'query',\n\n THEME_PALETTE_PRIMARY = 'primary',\n THEME_PALETTE_ACCENT = 'accent',\r\n THEME_PALETTE_WARN = 'warn'\r\n}\r\n","export enum XmlFileFormatEnum {\r\n VERBOSE_FORMAT = 'Verbose',\r\n SIMPLIFIED_MINIMALIST_FORMAT = 'Simplified'\r\n}\r\n","import { Directive, ElementRef, HostListener, Input, Output, EventEmitter, OnInit, HostBinding, Renderer2, NgZone, OnDestroy } from '@angular/core';\r\nimport { NgDragDropService } from '../services/ng-drag-drop.service';\r\nimport { DomHelper } from '../shared/dom-helper';\r\n\r\n@Directive({\n selector: '[draggable]',\n standalone: false\n})\r\n/**\r\n * Makes an element draggable by adding the draggable html attribute\r\n */\r\nexport class Draggable implements OnInit, OnDestroy {\r\n /**\r\n * The data that will be avaliable to the droppable directive on its `onDrop()` event.\r\n */\r\n @Input() dragData;\r\n\r\n /**\r\n * The selector that defines the drag Handle.\r\n * If defined drag will only be allowed if dragged from the selector element.\r\n */\r\n @Input() dragHandle: string;\r\n\r\n /**\r\n * Currently not used\r\n */\r\n @Input() dragEffect = 'move';\r\n\r\n /**\r\n * Defines compatible drag drop pairs. Values must match both in draggable and droppable.dropScope.\r\n */\r\n @Input() dragScope: string | Array = 'default';\r\n\r\n /**\r\n * The CSS class applied to a draggable element. If a dragHandle is defined then its applied to that handle\r\n * element only. By default it is used to change the mouse over pointer.\r\n */\r\n @Input() dragHandleClass = 'drag-handle';\r\n\r\n /**\r\n * CSS class applied on the source draggable element while being dragged.\r\n */\r\n @Input() dragClass = 'drag-border';\r\n\r\n /**\r\n * CSS class applied on the drag ghost when being dragged.\r\n */\r\n @Input() dragTransitClass = 'drag-transit';\r\n\r\n /**\r\n * The url to image that will be used as custom drag image when the draggable is being dragged.\r\n */\r\n @Input() set dragImage(value: string) {\r\n this._dragImage = value;\r\n this.dragImageElement = new Image();\r\n this.dragImageElement.src = this.dragImage;\r\n }\r\n\r\n get dragImage() {\r\n return this._dragImage;\r\n }\r\n\r\n /**\r\n * Defines if drag is enabled. `true` by default.\r\n */\r\n @HostBinding('draggable')\r\n @Input() set dragEnabled(value: boolean) {\r\n this._dragEnabled = value;\r\n this.applyDragHandleClass();\r\n };\r\n\r\n get dragEnabled() {\r\n return this._dragEnabled;\r\n }\r\n\r\n /**\r\n * Event fired when Drag is started\r\n */\r\n @Output() onDragStart: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Event fired while the element is being dragged\r\n */\r\n @Output() onDrag: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Event fired when drag ends\r\n */\r\n @Output() onDragEnd: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * @private\r\n * Keeps track of mouse over element that is used to determine drag handles\r\n */\r\n mouseDownElement: any;\r\n\r\n /**\r\n * @private\r\n * Backing field for the dragEnabled property\r\n */\r\n _dragEnabled = true;\r\n\r\n /**\r\n * @private\r\n * Backing field for the dragImage property\r\n */\r\n _dragImage: string;\r\n\r\n /**\r\n * @private\r\n * Image element for the dragImage\r\n */\r\n dragImageElement: HTMLImageElement;\r\n\r\n /**\r\n * @private\r\n * Function for unbinding the drag listener\r\n */\r\n unbindDragListener: Function;\r\n\r\n constructor(protected el: ElementRef, private renderer: Renderer2,\r\n private ng2DragDropService: NgDragDropService, private zone: NgZone) {\r\n }\r\n\r\n ngOnInit() {\r\n this.applyDragHandleClass();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unbindDragListeners();\r\n }\r\n\r\n @HostListener('dragstart', ['$event'])\r\n dragStart(e) {\r\n if (this.allowDrag()) {\r\n\r\n // This is a kludgy approach to apply CSS to the drag helper element when an image is being dragged.\r\n DomHelper.addClass(this.el, this.dragTransitClass);\r\n setTimeout(() => {\r\n DomHelper.addClass(this.el, this.dragClass);\r\n DomHelper.removeClass(this.el, this.dragTransitClass);\r\n }, 10);\r\n\r\n this.ng2DragDropService.dragData = this.dragData;\r\n this.ng2DragDropService.scope = this.dragScope;\r\n\r\n // Firefox requires setData() to be called otherwise the drag does not work.\r\n // We don't use setData() to transfer data anymore so this is just a dummy call.\r\n if (e.dataTransfer != null) {\r\n e.dataTransfer.setData('text', '');\r\n }\r\n\r\n // Set dragImage\r\n if (this.dragImage) {\r\n e.dataTransfer.setDragImage(this.dragImageElement, 0, 0);\r\n }\r\n\r\n e.stopPropagation();\r\n this.onDragStart.emit(e);\r\n this.ng2DragDropService.onDragStart.next(e);\r\n\r\n this.zone.runOutsideAngular(() => {\r\n this.unbindDragListener = this.renderer.listen(this.el.nativeElement, 'drag', (dragEvent) => {\r\n this.drag(dragEvent);\r\n });\r\n });\r\n } else {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n drag(e) {\r\n this.onDrag.emit(e);\r\n }\r\n\r\n @HostListener('dragend', ['$event'])\r\n dragEnd(e) {\r\n this.unbindDragListeners();\r\n DomHelper.removeClass(this.el, this.dragClass);\r\n this.ng2DragDropService.onDragEnd.next(e);\r\n this.onDragEnd.emit(e);\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n @HostListener('mousedown', ['$event'])\r\n @HostListener('touchstart', ['$event'])\r\n mousedown(e) {\r\n this.mouseDownElement = e.target;\r\n }\r\n\r\n private allowDrag() {\r\n if (this.dragHandle) {\r\n return DomHelper.matches(this.mouseDownElement, this.dragHandle) && this.dragEnabled;\r\n } else {\r\n return this.dragEnabled;\r\n }\r\n }\r\n\r\n private applyDragHandleClass() {\r\n let dragElement = this.getDragHandleElement();\r\n\r\n if (!dragElement) {\r\n return;\r\n }\r\n\r\n if (this.dragEnabled) {\r\n DomHelper.addClass(dragElement, this.dragHandleClass);\r\n } else {\r\n DomHelper.removeClass(this.el, this.dragHandleClass);\r\n }\r\n }\r\n\r\n private getDragHandleElement() {\r\n let dragElement = this.el;\r\n if (this.dragHandle) {\r\n dragElement = this.el.nativeElement.querySelector(this.dragHandle);\r\n }\r\n\r\n return dragElement;\r\n }\r\n\r\n unbindDragListeners() {\r\n if (this.unbindDragListener) {\r\n this.unbindDragListener();\r\n }\r\n }\r\n}\r\n","export class DropEvent {\r\n nativeEvent: any;\r\n dragData: any;\r\n\r\n constructor(event: any, data: any) {\r\n this.nativeEvent = event;\r\n this.dragData = data;\r\n }\r\n}\r\n","\r\nimport {of as observableOf, Subscription , Observable } from 'rxjs';\r\n\r\nimport {map} from 'rxjs/operators';\r\nimport { Directive, ElementRef, HostListener, Input, Output, EventEmitter, OnInit, OnDestroy, Renderer2, NgZone } from '@angular/core';\r\nimport { DropEvent } from '../shared/drop-event.model';\r\nimport { NgDragDropService } from '../services/ng-drag-drop.service';\r\nimport { DomHelper } from '../shared/dom-helper';\r\n\r\n\r\n\r\n@Directive({\n selector: '[droppable]',\n standalone: false\n})\r\nexport class Droppable implements OnInit, OnDestroy {\r\n\r\n /**\r\n * Event fired when Drag dragged element enters a valid drop target.\r\n */\r\n @Output() onDragEnter: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Event fired when an element is being dragged over a valid drop target\r\n */\r\n @Output() onDragOver: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Event fired when a dragged element leaves a valid drop target.\r\n */\r\n @Output() onDragLeave: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Event fired when an element is dropped on a valid drop target.\r\n */\r\n @Output() onDrop: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * CSS class that is applied when a compatible draggable is being dragged over this droppable.\r\n */\r\n @Input() dragOverClass = 'drag-over-border';\r\n\r\n /**\r\n * CSS class applied on this droppable when a compatible draggable item is being dragged.\r\n * This can be used to visually show allowed drop zones.\r\n */\r\n @Input() dragHintClass = 'drag-hint-border';\r\n\r\n /**\r\n * Defines compatible drag drop pairs. Values must match both in draggable and droppable.dropScope.\r\n */\r\n @Input() dropScope: string | Array | Function = 'default';\r\n\r\n /**\r\n * Defines if drop is enabled. `true` by default.\r\n */\r\n @Input() set dropEnabled(value: boolean) {\r\n this._dropEnabled = value;\r\n\r\n if (this._dropEnabled === true) {\r\n this.subscribeService();\r\n } else {\r\n this.unsubscribeService();\r\n }\r\n };\r\n\r\n get dropEnabled() {\r\n return this._dropEnabled;\r\n }\r\n\r\n /**\r\n * @private\r\n */\r\n dragStartSubscription: Subscription;\r\n\r\n /**\r\n * @private\r\n */\r\n dragEndSubscription: Subscription;\r\n\r\n /**\r\n * @private\r\n * Backing field for the dropEnabled property\r\n */\r\n _dropEnabled = true;\r\n\r\n /**\r\n * @private\r\n * Field for tracking drag state. Helps when\r\n * drag stop event occurs before the allowDrop()\r\n * can be calculated (async).\r\n */\r\n _isDragActive = false;\r\n\r\n /**\r\n * @private\r\n * Field for tracking if service is subscribed.\r\n * Avoids creating multiple subscriptions of service.\r\n */\r\n _isServiceActive = false;\r\n\r\n /**\r\n * @private\r\n * Function for unbinding the drag enter listener\r\n */\r\n unbindDragEnterListener: Function;\r\n\r\n /**\r\n * @private\r\n * Function for unbinding the drag over listener\r\n */\r\n unbindDragOverListener: Function;\r\n\r\n /**\r\n * @private\r\n * Function for unbinding the drag leave listener\r\n */\r\n unbindDragLeaveListener: Function;\r\n\r\n constructor(protected el: ElementRef, private renderer: Renderer2,\r\n private ng2DragDropService: NgDragDropService, private zone: NgZone) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.dropEnabled === true) {\r\n this.subscribeService();\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unsubscribeService();\r\n this.unbindDragListeners();\r\n }\r\n\r\n dragEnter(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.onDragEnter.emit(e);\r\n }\r\n\r\n dragOver(e, result) {\r\n if (result) {\r\n DomHelper.addClass(this.el, this.dragOverClass);\r\n e.preventDefault();\r\n this.onDragOver.emit(e);\r\n }\r\n }\r\n\r\n dragLeave(e) {\r\n DomHelper.removeClass(this.el, this.dragOverClass);\r\n e.preventDefault();\r\n this.onDragLeave.emit(e);\r\n }\r\n\r\n @HostListener('drop', ['$event'])\r\n drop(e) {\r\n this.allowDrop().subscribe(result => {\r\n if (result && this._isDragActive) {\r\n DomHelper.removeClass(this.el, this.dragOverClass);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.ng2DragDropService.onDragEnd.next(e);\r\n this.onDrop.emit(new DropEvent(e, this.ng2DragDropService.dragData));\r\n this.ng2DragDropService.dragData = null;\r\n this.ng2DragDropService.scope = null;\r\n }\r\n });\r\n }\r\n\r\n allowDrop(): Observable {\r\n let allowed: boolean | Observable = false;\r\n\r\n /* tslint:disable:curly */\r\n /* tslint:disable:one-line */\r\n if (typeof this.dropScope === 'string') {\r\n if (typeof this.ng2DragDropService.scope === 'string')\r\n allowed = this.ng2DragDropService.scope === this.dropScope;\r\n else if (this.ng2DragDropService.scope instanceof Array)\r\n allowed = this.ng2DragDropService.scope.indexOf(this.dropScope) > -1;\r\n } else if (this.dropScope instanceof Array) {\r\n if (typeof this.ng2DragDropService.scope === 'string')\r\n allowed = this.dropScope.indexOf(this.ng2DragDropService.scope) > -1;\r\n else if (this.ng2DragDropService.scope instanceof Array)\r\n allowed = this.dropScope.filter(item => {\r\n return this.ng2DragDropService.scope.indexOf(item) !== -1;\r\n }).length > 0;\r\n } else if (typeof this.dropScope === 'function') {\r\n allowed = this.dropScope(this.ng2DragDropService.dragData);\r\n if (allowed instanceof Observable) {\r\n return allowed.pipe(map(result => result && this.dropEnabled));\r\n }\r\n }\r\n\r\n /* tslint:enable:curly */\r\n /* tslint:disable:one-line */\r\n\r\n return observableOf(allowed && this.dropEnabled);\r\n }\r\n\r\n subscribeService() {\r\n if (this._isServiceActive === true) {\r\n return;\r\n }\r\n this._isServiceActive = true;\r\n this.dragStartSubscription = this.ng2DragDropService.onDragStart.subscribe(() => {\r\n this._isDragActive = true;\r\n this.allowDrop().subscribe(result => {\r\n if (result && this._isDragActive) {\r\n DomHelper.addClass(this.el, this.dragHintClass);\r\n\r\n this.zone.runOutsideAngular(() => {\r\n this.unbindDragEnterListener = this.renderer.listen(this.el.nativeElement, 'dragenter', (dragEvent) => {\r\n this.dragEnter(dragEvent);\r\n });\r\n this.unbindDragOverListener = this.renderer.listen(this.el.nativeElement, 'dragover', (dragEvent) => {\r\n this.dragOver(dragEvent, result);\r\n });\r\n this.unbindDragLeaveListener = this.renderer.listen(this.el.nativeElement, 'dragleave', (dragEvent) => {\r\n this.dragLeave(dragEvent);\r\n });\r\n });\r\n }\r\n });\r\n });\r\n\r\n this.dragEndSubscription = this.ng2DragDropService.onDragEnd.subscribe(() => {\r\n this._isDragActive = false;\r\n DomHelper.removeClass(this.el, this.dragHintClass);\r\n this.unbindDragListeners();\r\n });\r\n }\r\n\r\n unsubscribeService() {\r\n this._isServiceActive = false;\r\n if (this.dragStartSubscription) {\r\n this.dragStartSubscription.unsubscribe();\r\n }\r\n if (this.dragEndSubscription) {\r\n this.dragEndSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n unbindDragListeners() {\r\n if (this.unbindDragEnterListener) {\r\n this.unbindDragEnterListener();\r\n }\r\n if (this.unbindDragOverListener) {\r\n this.unbindDragOverListener();\r\n }\r\n if (this.unbindDragLeaveListener) {\r\n this.unbindDragLeaveListener();\r\n }\r\n }\r\n}\r\n","/**\r\n * Created by orehman on 2/22/2017.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class NgDragDropService {\r\n dragData: any;\r\n scope: string | Array;\r\n onDragStart = new Subject();\r\n onDragEnd = new Subject();\r\n\r\n constructor() {\r\n }\r\n}\r\n","/**\r\n * Created by orehman on 2/22/2017.\r\n */\r\n\r\nimport {ElementRef} from '@angular/core';\r\n\r\nexport class DomHelper {\r\n /**\r\n * Polyfill for element.matches()\r\n * See: https://developer.mozilla.org/en/docs/Web/API/Element/matches#Polyfill\r\n * @param element\r\n * @param selectorName\r\n */\r\n public static matches(element: any, selectorName: string): boolean {\r\n\r\n let proto: any = Element.prototype;\r\n\r\n let func =\r\n proto['matches'] ||\r\n proto.matchesSelector ||\r\n proto.mozMatchesSelector ||\r\n proto.msMatchesSelector ||\r\n proto.oMatchesSelector ||\r\n proto.webkitMatchesSelector ||\r\n function (s) {\r\n let matches = (this.document || this.ownerDocument).querySelectorAll(s),\r\n i = matches.length;\r\n while (--i >= 0 && matches.item(i) !== this) {\r\n }\r\n return i > -1;\r\n };\r\n\r\n return func.call(element, selectorName);\r\n }\r\n\r\n /**\r\n * Applies the specified css class on nativeElement\r\n * @param elementRef\r\n * @param className\r\n */\r\n public static addClass(elementRef: ElementRef | any, className: string) {\r\n\r\n let e = this.getElementWithValidClassList(elementRef);\r\n\r\n if (e) {\r\n e.classList.add(className);\r\n }\r\n }\r\n\r\n /**\r\n * Removes the specified class from nativeElement\r\n * @param elementRef\r\n * @param className\r\n */\r\n public static removeClass(elementRef: ElementRef | any, className: string) {\r\n\r\n const e = this.getElementWithValidClassList(elementRef);\r\n\r\n if (e) {\r\n e.classList.remove(className);\r\n }\r\n }\r\n\r\n /**\r\n * Gets element with valid classList\r\n *\r\n * @param elementRef\r\n * @returns ElementRef | null\r\n */\r\n private static getElementWithValidClassList(elementRef: ElementRef) {\r\n\r\n let e = elementRef instanceof ElementRef ? elementRef.nativeElement : elementRef;\r\n\r\n if (e.classList !== undefined && e.classList !== null) {\r\n return e;\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","// Define a general purpose interface for notifying code/components of significant\r\n// changes to a a model object, e.g.the completion of a save operation.\r\nexport enum ModelEventEnum {\r\n MODEL_WILL_SAVE = 'modelWillSave', // Called just prior to a save operation.\r\n MODEL_SAVED = 'modelSaved' // Called after a save operation completes.\r\n};\r\n\r\nexport interface IModelEventHandler {\r\n eventCompleted(event: ModelEventEnum, modelObject: any): void;\r\n}\r\n","import { RowClassArgs, CommandColumnComponent } from \"@progress/kendo-angular-grid\";\r\ninterface IKendoGridData {\r\n count: number;\r\n gridData: any; \r\n}\r\n\r\n// Define an interface, for which an object implementing the interface can be provided as @Input() 'dataSpy',\r\n// to which this directive class will pass data when it gets loaded by the instance of this.kendoGridService.\r\nexport interface IKendoGridDataSpy {\r\n dataLoaded(loadedData: any[]): void;\r\n}\r\n\r\n\r\nexport class KendoGridHelper {\r\n // Properties.\r\n private currentlyLoadedRowCount: number = 0;\r\n private totalRowCount: number = 0;\r\n\r\n private filters = { logic: 'and', filters: [] };\r\n private isBeingFiltered = false;\r\n\r\n private contextMenuDataItem: any = null; // Added 07-15-2024.\r\n private dataSpy: IKendoGridDataSpy = null; // Added 05-02-2024.\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Setter/getter methods.\r\n public get Filters() {\r\n return this.filters;\r\n }\r\n\r\n /*\r\n Used to make the \"Clear all Filters\" button work.\r\n Add this to you config...\r\n [(filter)]=\"Helper.Filters\"\r\n Then add something like to the toolbar...\r\n \r\n \r\n {{Helper.ShowingXofN}}\r\n \r\n */\r\n public set Filters(filters: any) {\r\n this.isBeingFiltered = filters.filters.length > 0;\r\n this.filters = filters;\r\n }\r\n public get IsBeingFiltered() {\r\n return this.isBeingFiltered;\r\n }\r\n\r\n public get ContextMenuDataItem(): any {\r\n return this.contextMenuDataItem;\r\n }\r\n public set ContextMenuDataItem(value: any) {\r\n this.contextMenuDataItem = value;\r\n }\r\n\r\n public get DataSpy(): IKendoGridDataSpy {\r\n return this.dataSpy;\r\n }\r\n public set DataSpy(value: IKendoGridDataSpy) {\r\n this.dataSpy = value;\r\n }\r\n\r\n // Regular methods.\r\n public handleClearFilters(): void {\r\n this.filters = { logic: 'and', filters: [] };\r\n this.isBeingFiltered = false;\r\n }\r\n\r\n // sets the value of totalRowCount when it has not yet been initialized\r\n // and the value of currentlyLoadedRowCount. These values can used to determine\r\n // if a Kendo Grid has been initialzed, and are also used to render a \"Displaying X of N\" message\r\n public handleLoaded(event: IKendoGridData) {\r\n if (event.gridData?.total > 0) {\r\n this.totalRowCount = event.gridData.total;\r\n }\r\n this.currentlyLoadedRowCount = event.count;\r\n\r\n // 05-02-2024: added the following two lines of code to accommodate a \"data spy\".\r\n if (this.dataSpy != null) {\r\n let rowData: any[] = event.gridData['data'];\r\n this.dataSpy.dataLoaded(rowData);\r\n } \r\n }\r\n\r\n public reInit(): void {\r\n this.currentlyLoadedRowCount = 0;\r\n }\r\n\r\n public get CurrentlyLoadedRowCount(): number {\r\n return this.currentlyLoadedRowCount;\r\n }\r\n\r\n public get TotalRowCount(): number {\r\n return this.totalRowCount;\r\n }\r\n\r\n public get ShowingXofN() {\r\n return `${this.currentlyLoadedRowCount} of ${this.totalRowCount} records`;\r\n }\r\n\r\n private indexOfClickedRow: number = -1;\r\n // THIS METHOD SHOULD SUPPLIED to the @Input\r\n // It applies a class called \"clickedRow\" which you can style as needed (for example, setting white-space: normal !important\r\n // if you want to turn on wrapping when a row is clicked (See it's use on form-template-instances.component.html)\r\n public applyClickedRowClassToClickedRow = (context: RowClassArgs) => {\r\n if (context.index == this.indexOfClickedRow) {\r\n return { clickedRow: true };\r\n }\r\n };\r\n\r\n public setIndexOfClickedRow(event: any) {\r\n if (event.column instanceof CommandColumnComponent || event.rowIndex < 0) {\r\n //console.log(event.column);\r\n //console.log(event.rowIndex);\r\n return;\r\n }\r\n if (this.indexOfClickedRow == event.rowIndex) {\r\n this.indexOfClickedRow = -1;\r\n } else {\r\n this.indexOfClickedRow = event.rowIndex;\r\n }\r\n }\r\n}\r\n","import { environment } from '../../environments/environment'\r\n\r\nexport class Logging {\r\n static log(val: any) {\r\n //if (environment.debug) // 03-06-2020 Note: temporarily relaxing this condition (will re-enable).\r\n console.log(val);\r\n }\n\n // convenience method to log all arguments\n // Usage:\n // Logging.all(\"My Object\", obj, `some id = ${something.id}`)\n static all(...entries: any[]) {\n entries.forEach(e => {\n console.log(e);\n });\r\n }\r\n}\n","/*\r\n * Enumeration of icon file names, and what extensions they map to.\r\n * Please keep items alphabetical.\r\n *\r\n * How to implement https://developer.microsoft.com/en-us/fluentui#/styles/web/icons\r\n *\r\n * Mapping taken from https://raw.githubusercontent.com/microsoft/fluentui/master/packages/react-file-type-icons/src/FileTypeIconMap.ts\r\n *\r\n * Check what the icon looks like by using this link, just change the size (48) and the name (svg):\r\n * https://static2.sharepointonline.com/files/fabric/assets/item-types/48/archive.svg\r\n * \r\n */\r\n\r\nimport { IconFormatEnum } from '../enums/icon-format.enum';\r\n\r\nexport interface IFileTypeIconMap {\r\n key: string;\r\n name?: string;\r\n value: IFileTypeIcon;\r\n}\r\n\r\nexport interface IFileTypeIcon {\r\n iconFormat: string;\r\n extensions?: string[];\r\n canpreview?: boolean;\r\n}\r\n\r\nexport enum FabricIconSizes {\r\n SMALL = 16,\r\n MEDIUM = 48,\r\n LARGE = 96\r\n}\r\n\r\nexport class FabricFileTypeIconMapping {\r\n\r\n public FileTypeIconMap: IFileTypeIconMap[] = [\r\n {\r\n key: 'accdb',\r\n value: {\r\n extensions: [\r\n 'accdb',\r\n 'mdb'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'archive',\r\n value: {\r\n extensions: [\r\n '7z',\r\n 'ace',\r\n 'arc',\r\n 'arj',\r\n 'dmg',\r\n 'gz',\r\n 'iso',\r\n 'lzh',\r\n 'pkg',\r\n 'rar',\r\n 'sit',\r\n 'tgz',\r\n 'tar',\r\n 'z',\r\n 'zip'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'audio',\r\n value: {\r\n extensions: [\r\n 'aif',\r\n 'aiff',\r\n 'aac',\r\n 'alac',\r\n 'amr',\r\n 'ape',\r\n 'au',\r\n 'awb',\r\n 'dct',\r\n 'dss',\r\n 'dvf',\r\n 'flac',\r\n 'gsm',\r\n 'm4a',\r\n 'm4p',\r\n 'mid',\r\n 'mmf',\r\n 'mp3',\r\n 'oga',\r\n 'ra',\r\n 'rm',\r\n 'wav',\r\n 'wma',\r\n 'wv'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'calendar',\r\n value: {\r\n extensions: [\r\n 'ical',\r\n 'icalendar',\r\n 'ics',\r\n 'ifb',\r\n 'vcs'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'code',\r\n value: {\r\n extensions: [\r\n 'abap',\r\n 'ada',\r\n 'adp',\r\n 'ahk',\r\n 'as',\r\n 'as3',\r\n 'asc',\r\n 'ascx',\r\n 'asm',\r\n 'asp',\r\n 'awk',\r\n 'bash',\r\n 'bash_login',\r\n 'bash_logout',\r\n 'bash_profile',\r\n 'bashrc',\r\n 'bat',\r\n 'bib',\r\n 'bsh',\r\n 'build',\r\n 'builder',\r\n 'c',\r\n 'cbl',\r\n 'c++',\r\n 'capfile',\r\n 'cc',\r\n 'cfc',\r\n 'cfm',\r\n 'cfml',\r\n 'cl',\r\n 'clj',\r\n 'cls',\r\n 'cmake',\r\n 'cmd',\r\n 'coffee',\r\n 'config',\r\n 'cpp',\r\n 'cpt',\r\n 'cpy',\r\n 'cs',\r\n 'cshtml',\r\n 'cson',\r\n 'csproj',\r\n 'css',\r\n 'ctp',\r\n 'cxx',\r\n 'd',\r\n 'ddl',\r\n 'di',\r\n 'disco',\r\n 'dml',\r\n 'dtd',\r\n 'dtml',\r\n 'el',\r\n 'emakefile',\r\n 'erb',\r\n 'erl',\r\n 'f',\r\n 'f90',\r\n 'f95',\r\n 'fs',\r\n 'fsi',\r\n 'fsscript',\r\n 'fsx',\r\n 'gemfile',\r\n 'gemspec',\r\n 'gitconfig',\r\n 'go',\r\n 'groovy',\r\n 'gvy',\r\n 'h',\r\n 'h++',\r\n 'haml',\r\n 'handlebars',\r\n 'hbs',\r\n 'hcp',\r\n 'hh',\r\n 'hpp',\r\n 'hrl',\r\n 'hs',\r\n 'htc',\r\n 'hxx',\r\n 'idl',\r\n 'iim',\r\n 'inc',\r\n 'inf',\r\n 'ini',\r\n 'inl',\r\n 'ipp',\r\n 'irbrc',\r\n 'jade',\r\n 'jav',\r\n 'java',\r\n 'js',\r\n 'json',\r\n 'jsp',\r\n 'jsproj',\r\n 'jsx',\r\n 'l',\r\n 'less',\r\n 'lhs',\r\n 'lisp',\r\n 'log',\r\n 'lst',\r\n 'ltx',\r\n 'lua',\r\n 'm',\r\n 'mak',\r\n 'make',\r\n 'manifest',\r\n 'master',\r\n 'md',\r\n 'markdn',\r\n 'markdown',\r\n 'mdown',\r\n 'mkdn',\r\n 'ml',\r\n 'mli',\r\n 'mll',\r\n 'mly',\r\n 'mm',\r\n 'mud',\r\n 'nfo',\r\n 'opml',\r\n 'osascript',\r\n 'p',\r\n 'pas',\r\n 'patch',\r\n 'php',\r\n 'php2',\r\n 'php3',\r\n 'php4',\r\n 'php5',\r\n 'phtml',\r\n 'pl',\r\n 'pm',\r\n 'pod',\r\n 'pp',\r\n 'profile',\r\n 'ps1',\r\n 'ps1xml',\r\n 'psd1',\r\n 'psm1',\r\n 'pss',\r\n 'pt',\r\n 'py',\r\n 'pyw',\r\n 'r',\r\n 'rake',\r\n 'rb',\r\n 'rbx',\r\n 'rc',\r\n 'rdf',\r\n 're',\r\n 'reg',\r\n 'rest',\r\n 'resw',\r\n 'resx',\r\n 'rhtml',\r\n 'rjs',\r\n 'rprofile',\r\n 'rpy',\r\n 'rss',\r\n 'rst',\r\n 'ruby',\r\n 'rxml',\r\n 's',\r\n 'sass',\r\n 'scala',\r\n 'scm',\r\n 'sconscript',\r\n 'sconstruct',\r\n 'script',\r\n 'scss',\r\n 'sgml',\r\n 'sh',\r\n 'shtml',\r\n 'sml',\r\n 'svn-base',\r\n 'swift',\r\n 'sql',\r\n 'sty',\r\n 'tcl',\r\n 'tex',\r\n 'textile',\r\n 'tld',\r\n 'tli',\r\n 'tmpl',\r\n 'tpl',\r\n 'vb',\r\n 'vi',\r\n 'vim',\r\n 'vmg',\r\n 'webpart',\r\n 'wsp',\r\n 'wsdl',\r\n 'xhtml',\r\n 'xoml',\r\n 'xsd',\r\n 'xslt',\r\n 'yaml',\r\n 'yaws',\r\n 'yml',\r\n 'zsh',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'contact',\r\n value: {\r\n extensions: [\r\n 'vcf'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'csv',\r\n value: {\r\n extensions: [\r\n 'csv'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'desktopfolder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'docset',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'documentfolder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'docx',\r\n name: 'MS Word',\r\n value: {\r\n extensions: [\r\n 'doc', 'docm', 'docx', 'docb'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'dotx',\r\n value: {\r\n extensions: [\r\n 'dot', 'dotm', 'dotx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'email',\r\n value: {\r\n extensions: [\r\n 'eml', 'msg', 'ost', 'pst'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'exe',\r\n value: {\r\n extensions: [\r\n 'application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'folder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'font',\r\n value: {\r\n extensions: [\r\n 'ttf', 'otf', 'woff'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'fluid',\r\n value: {\r\n extensions: [\r\n 'b', 'fluid'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'genericfile',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'html',\r\n value: {\r\n extensions: [\r\n 'htm', 'html', 'mht'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'link',\r\n value: {\r\n extensions: [\r\n 'lnk', 'link', 'url', 'website', 'webloc'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'linkedfolder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'listitem',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'splist',\r\n value: {\r\n extensions: [\r\n 'listitem'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'model',\r\n value: {\r\n extensions: [\r\n '3ds',\r\n '3mf',\r\n 'blend',\r\n 'cool',\r\n 'dae',\r\n 'df',\r\n 'dwfx',\r\n 'dwg',\r\n 'dxf',\r\n 'fbx',\r\n 'glb',\r\n 'gltf',\r\n 'holo',\r\n 'layer',\r\n 'layout',\r\n 'max',\r\n 'mcworld',\r\n 'mtl',\r\n 'obj',\r\n 'off',\r\n 'ply',\r\n 'skp',\r\n 'stp',\r\n 'stl',\r\n 't',\r\n 'thl',\r\n 'x',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'mpp',\r\n value: {\r\n extensions: [\r\n 'mpp'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'mpt',\r\n value: {\r\n extensions: [\r\n 'mpt'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'multiple',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'one',\r\n value: {\r\n extensions: [\r\n 'note', 'one'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'onetoc',\r\n value: {\r\n extensions: [\r\n 'ms-one-stub', 'onetoc', 'onetoc2', 'onepkg'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'pbiapp',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'pdf',\r\n value: {\r\n extensions: [\r\n 'pdf'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'photo',\r\n value: {\r\n extensions: [\r\n 'arw',\r\n 'bmp',\r\n 'cr2',\r\n 'crw',\r\n 'dic',\r\n 'dicm',\r\n 'dcm',\r\n 'dcm30',\r\n 'dcr',\r\n 'dds',\r\n 'dib',\r\n 'dng',\r\n 'erf',\r\n 'gif',\r\n 'heic',\r\n 'heif',\r\n 'ico',\r\n 'jfi',\r\n 'jfif',\r\n 'jif',\r\n 'jpe',\r\n 'jpeg',\r\n 'jpg',\r\n 'kdc',\r\n 'mrw',\r\n 'nef',\r\n 'orf',\r\n 'pct',\r\n 'pict',\r\n 'png',\r\n 'pns',\r\n 'psb',\r\n 'psd',\r\n 'raw',\r\n 'tga',\r\n 'tif',\r\n 'tiff',\r\n 'wdp',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'photo360',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'picturesfolder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'potx',\r\n value: {\r\n extensions: [\r\n 'pot', 'potm', 'potx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'powerbi',\r\n value: {\r\n extensions: [\r\n 'pbids', 'pbix'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'ppsx',\r\n value: {\r\n extensions: [\r\n 'pps', 'ppsm', 'ppsx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'pptx',\r\n value: {\r\n extensions: [\r\n 'ppt', 'pptm', 'pptx', 'sldx', 'sldm'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'presentation',\r\n value: {\r\n extensions: [\r\n 'odp', 'gslides', 'key'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'pub',\r\n value: {\r\n extensions: [\r\n 'pub'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'spo',\r\n value: {\r\n extensions: [\r\n 'aspx', 'classifier'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'sponews',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'spreadsheet',\r\n value: {\r\n extensions: [\r\n 'odc', 'ods', 'gsheet', 'numbers', 'tsv'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'stream',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'rtf',\r\n value: {\r\n extensions: [\r\n 'epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'sharedfolder',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'sway',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'sysfile',\r\n value: {\r\n extensions: [\r\n 'bak',\r\n 'bin',\r\n 'cab',\r\n 'cache',\r\n 'cat',\r\n 'cer',\r\n 'class',\r\n 'dat',\r\n 'db',\r\n 'dbg',\r\n 'dl_',\r\n 'dll',\r\n 'ithmb',\r\n 'jar',\r\n 'kb',\r\n 'ldt',\r\n 'lrprev',\r\n 'pkpass',\r\n 'ppa',\r\n 'ppam',\r\n 'pdb',\r\n 'rom',\r\n 'thm',\r\n 'thmx',\r\n 'vsl',\r\n 'xla',\r\n 'xlam',\r\n 'xlb',\r\n 'xll',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'txt',\r\n value: {\r\n extensions: [\r\n 'dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vaultclosed',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vaultopen',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vector',\r\n value: {\r\n extensions: [\r\n 'ai',\r\n 'ait',\r\n 'cvs',\r\n 'dgn',\r\n 'gdraw',\r\n 'pd',\r\n 'emf',\r\n 'eps',\r\n 'fig',\r\n 'ind',\r\n 'indd',\r\n 'indl',\r\n 'indt',\r\n 'indb',\r\n 'ps',\r\n 'svg',\r\n 'svgz',\r\n 'wmf',\r\n 'oxps',\r\n 'xps',\r\n 'xd',\r\n 'sketch',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'video',\r\n value: {\r\n extensions: [\r\n '3g2',\r\n '3gp',\r\n '3gp2',\r\n '3gpp',\r\n 'asf',\r\n 'avi',\r\n 'dvr-ms',\r\n 'flv',\r\n 'm1v',\r\n 'm4v',\r\n 'mkv',\r\n 'mod',\r\n 'mov',\r\n 'mm4p',\r\n 'mp2',\r\n 'mp2v',\r\n 'mp4',\r\n 'mp4v',\r\n 'mpa',\r\n 'mpe',\r\n 'mpeg',\r\n 'mpg',\r\n 'mpv',\r\n 'mpv2',\r\n 'mts',\r\n 'ogg',\r\n 'qt',\r\n 'swf',\r\n 'ts',\r\n 'vob',\r\n 'webm',\r\n 'wlmp',\r\n 'wm',\r\n 'wmv',\r\n 'wmx',\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'video360',\r\n value: {\r\n extensions: [\r\n ''\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vsdx',\r\n value: {\r\n extensions: [\r\n 'vdx', 'vsd', 'vsdm', 'vsdx', 'vsw', 'vdw'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vssx',\r\n value: {\r\n extensions: [\r\n 'vss', 'vssm', 'vssx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'vstx',\r\n value: {\r\n extensions: [\r\n 'vst', 'vstm', 'vstx', 'vsx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'xlsx',\r\n value: {\r\n extensions: [\r\n 'xlc', 'xls', 'xlsb', 'xlsm', 'xlsx', 'xlw'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'xltx',\r\n value: {\r\n extensions: [\r\n 'xlt', 'xltm', 'xltx'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON,\r\n canpreview: true\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'xml',\r\n value: {\r\n extensions: [\r\n 'xaml', 'xml', 'xsl'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n },\r\n {\r\n key: 'xsn',\r\n value: {\r\n extensions: [\r\n 'xsn'\r\n ],\r\n iconFormat: IconFormatEnum.FABRIC_ICON\r\n } as IFileTypeIcon\r\n }\r\n ];\r\n}\r\n","export class AsyncJob {\r\n\r\n public static readonly STATUS_NEW: string = \"New\";\r\n public static readonly STATUS_RUNNING: string = \"Running\";\r\n public static readonly STATUS_COMPLETE: string = \"Completed\";\r\n public static readonly STATUS_COMPLETE_ERROR: string = \"Completed with error\";\r\n\r\n public jobKey: string;\r\n public jobDescription: string;\r\n public status: string;\r\n public appData: string; // Added 05-02-2022 to correspond to the new property in the server's corresponding view model class.\n public userId: string;\r\n public errorDetails: string;\r\n public stdOut: string;\r\n public stdError: string;\r\n public whenCreated: string;\r\n public whenUpdated: string;\r\n public whenInitiated: string;\r\n public whenCompleted: string;\r\n\n public id: number = -1; // we just need this in order for generics to work on base service\r\n\r\n // Define transient properties.\r\n //public transientDataCollectionId: number;\r\n}\n","import { Type } from 'class-transformer'; \r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { DataCollection } from '../site-content/data-collection.model';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\n\r\nexport class AttachmentCheckoutInfo {\r\n public email: string;\r\n public fullName: string;\r\n public mf_userid: string;\r\n}\r\n\r\nexport class AttachmentStatus {\r\n public canCheckOut: boolean;\r\n public canEdit: boolean;\r\n\r\n public checkOutType: number;\r\n public checkedOutBy: AttachmentCheckoutInfo;\r\n public checkedOutDate: string;\r\n\r\n public lockExpires: string;\r\n public lockType: number;\r\n public lockedBy: AttachmentCheckoutInfo;\r\n public lockedDate: string;\r\n}\r\n\r\n//TEAMS-424: KLW - Create a new attachment class to handle the api call to get attachments\r\n// TODO this inherits from DataCollection but should inherit from IListItemBase...\r\nexport class AttachmentInfoWithUrls extends IListItemBase implements IListItem {\r\n public id: number;\r\n public currentStatus: string;\r\n\r\n public comment: string;\r\n\r\n public createdByEmail: string;\r\n public createdByMf_UserId: string;\r\n public createdByName: string;\r\n public createdDate: string;\r\n\r\n public downloadUrl: string;\r\n\r\n public editInAppUrl: string;\r\n public editInBrowserUrl: string;\r\n\r\n public fileName: string;\r\n\r\n // pharvey - added 2/9/2022\r\n public displayOrder: number;\r\n public description: string;\r\n\r\n public isCurrent: boolean;\r\n\r\n public miniViewUrl: string;\r\n public serverRelativeUrl: string;\r\n\r\n public size: number;\r\n\r\n public uniqueId: string;\r\n public url: string;\r\n\r\n public versionLabel: string;\r\n public viewInBrowserUrl: string;\r\n\r\n public status: AttachmentStatus;\r\n\r\n\r\n // Implement IListItem\r\n public getType(): string {\r\n return ItemTypeEnum.ATTACH_W_URLS;\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return this.description;\r\n }\r\n\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n\r\n public getPosition(): number {\r\n return this.displayOrder;\r\n }\r\n\r\n\r\n setId(idParam: number): void {\r\n this.id = idParam;\r\n }\r\n userCanDelete(): boolean {\r\n throw new Error('Method not implemented.');\r\n }\r\n modifiedDate: Date;\r\n modifiedBy: string;\r\n getStatus(): string {\r\n return (this.currentStatus);\r\n }\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n getIcon(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n setIcon(iconParam: string): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n canBeDeleted(): boolean {\r\n return true;\r\n }\r\n update(obj: any, type: string, icon?: string, position?: number): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n getUniqueId(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n findAndUpdateFrom(items: any, obj: any): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n getId(): number {\r\n return this.id;\r\n }\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n","export class Attachment {\r\n // Key.\r\n public id: number = 0;\r\n\r\n // Primitives.\r\n public name: string;\r\n\r\n public dataCollectionId: number;\r\n\r\n // Additional properties.\n // NOTE: additional properties TBD.\r\n}\r\n\r\n// This class models custom properties of attachments. These are stored in the\r\n// attachment itself in SharePoint in a CustomProperties field, but exposed in the application\r\n// as the properties encapsulated here\r\nexport class AttachmentProperties {\r\n public description: string;\r\n public displayOrder: number;\r\n\r\n public constructor(description: string, displayOrder: number) {\r\n this.description = description;\r\n this.displayOrder = displayOrder;\r\n }\r\n}\r\n\r\n","import { HeaderValuePair } from '../csv-data/header-value-pair.model';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { CsvOptionsFileData } from '../csv-data/csv-options-file-data.model';\r\n\r\nexport class CascadingDropDownFormFieldConfig {\r\n // Properties.\r\n public dropDownHeaders: string[];\r\n public dropDownOptionsAsHierarchy: HeaderValuePair[];\r\n\r\n // Constructor.\r\n constructor(properties: any) {\r\n this.dropDownHeaders = properties['dropDownHeaders'];\r\n this.dropDownOptionsAsHierarchy = properties['dropDownOptionsAsHierarchy'];\r\n }\r\n\r\n // Getter method(s).\r\n public get NumLevels(): number {\r\n return (this.dropDownHeaders != null ? this.dropDownHeaders.length : 0);\r\n }\r\n public get DropDownHeaders(): string[] {\r\n return this.dropDownHeaders;\r\n }\r\n\r\n // Static method.\r\n /*\r\n public static parseConfig(formField: FormField): CascadingDropDownFormFieldConfig {\r\n let config: CascadingDropDownFormFieldConfig = (formField != null ? CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig) : null);\r\n return config;\r\n }\r\n */\r\n /*\r\n public static parseConfigFrom(jsonConfig: string): CascadingDropDownFormFieldConfig {\r\n let config: CascadingDropDownFormFieldConfig = (jsonConfig != null ? CascadingDropDownFormFieldConfig.parseJsonConfig(jsonConfig) : null);\r\n return config;\r\n }\r\n */\r\n\r\n public static parseJsonConfig(jsonConfig: string): CascadingDropDownFormFieldConfig {\r\n let config: CascadingDropDownFormFieldConfig = null;\r\n\r\n //if (formField && formField.jsonConfig && (formField.jsonConfig.trim() !== '')) {\r\n if ((jsonConfig != null) && (jsonConfig.trim() !== '')) {\r\n //let hshConfig: any = JSON.parse(formField.jsonConfig);\r\n let hshConfig: any = JSON.parse(jsonConfig);\r\n config = new CascadingDropDownFormFieldConfig(hshConfig);\r\n }\r\n\r\n return config;\r\n }\r\n\r\n public static createConfigFromCsvOptionsData(csvOptions: CsvOptionsFileData): CascadingDropDownFormFieldConfig {\r\n //let config: CascadingDropDownFormFieldConfig = { dropDownHeaders: csvOptions.headers, dropDownOptionsAsHierarchy: null };\r\n let config: CascadingDropDownFormFieldConfig = new CascadingDropDownFormFieldConfig({ dropDownHeaders: csvOptions.headers, dropDownOptionsAsHierarchy: null });\r\n config.dropDownOptionsAsHierarchy = CascadingDropDownFormFieldConfig.buildOptionValuesHierarchy(config.dropDownHeaders, csvOptions.linesOfHeaderValuePairs);\r\n\r\n return config;\r\n }\r\n\r\n // Helper methods.\r\n private static buildOptionValuesHierarchy(dropDownHeaders: string[], flatHeaderValuePairs: HeaderValuePair[][], iHeader: number = 0,\r\n ancestorHeaderValuePairs: HeaderValuePair[] = [], iValuePairStartingIndex: number = 0): HeaderValuePair[] {\r\n // Initialize the result array.\r\n let rootHeaderValuePairs: HeaderValuePair[] = [];\r\n\r\n let previousValueText: string = null;\r\n let iNextIndex: number = 1;\r\n let bHaveNewValue: boolean = true;\r\n\r\n let iValuePair: number = iValuePairStartingIndex;\r\n\r\n while (flatHeaderValuePairs && (iValuePair < flatHeaderValuePairs.length) && bHaveNewValue) {\r\n let flatHeaderValuePairSet: HeaderValuePair[] = flatHeaderValuePairs[iValuePair];\r\n\r\n let flatHeaderValuePair: HeaderValuePair = flatHeaderValuePairSet[iHeader];\r\n\r\n if ((previousValueText == null) || (flatHeaderValuePair.ValueText !== previousValueText)) {\r\n // Check to see if we have a new value.\r\n // By definition, a change in the previous\r\n // values constitutes a new cascading\r\n // drop-down value if we are processing\r\n // the first/zeroeth header.\r\n //\r\n // If we are not processing the first/\r\n // zeroeth header, we have to check matches\r\n // with ancestor values.\r\n //let bHaveNewValue: boolean = (iHeader === 0);\r\n bHaveNewValue = (iHeader === 0);\r\n\r\n if (!bHaveNewValue) {\r\n //(iHeader === 0) || (prevHeaderValuePair.ValueText === ancestorHeaderValuePair.ValueText)) {\r\n let iNumMatches: number = 0;\r\n\r\n for (let iAncestor: number = 0; iAncestor < ancestorHeaderValuePairs.length; iAncestor++) {\r\n let ancestorHeaderValuePair: HeaderValuePair = ancestorHeaderValuePairs[iAncestor];\r\n\r\n if (flatHeaderValuePairSet[iAncestor].ValueText === ancestorHeaderValuePair.ValueText) {\r\n iNumMatches++;\r\n }\r\n }\r\n\r\n if (iNumMatches === ancestorHeaderValuePairs.length) {\r\n bHaveNewValue = true;\r\n }\r\n }\r\n\r\n if (bHaveNewValue) {\r\n let newHeaderValuePair: HeaderValuePair =\r\n {\r\n //Index: iNextIndex++,\r\n Index: iNextIndex++,\r\n Header: flatHeaderValuePair.Header,\r\n ValueText: flatHeaderValuePair.ValueText,\r\n ChildValuePairs: []\r\n }\r\n\r\n if (iHeader < dropDownHeaders.length - 1) {\r\n let ancestorsForNextHeader: HeaderValuePair[] = [];\r\n for (let iAncestor: number = 0; iAncestor < ancestorHeaderValuePairs.length; iAncestor++) {\r\n let ancestorHeaderValuePair: HeaderValuePair = ancestorHeaderValuePairs[iAncestor];\r\n\r\n ancestorsForNextHeader.push(ancestorHeaderValuePair);\r\n }\r\n ancestorsForNextHeader.push(newHeaderValuePair);\r\n\r\n newHeaderValuePair.ChildValuePairs =\r\n CascadingDropDownFormFieldConfig.buildOptionValuesHierarchy(dropDownHeaders,\r\n flatHeaderValuePairs,\r\n iHeader + 1,\r\n ancestorsForNextHeader,\r\n iValuePair); // Tell the method to start at my current location.\r\n } // if\r\n\r\n rootHeaderValuePairs.push(newHeaderValuePair);\r\n } // if\r\n } // if\r\n\r\n previousValueText = flatHeaderValuePair.ValueText;\r\n iValuePair++;\r\n } // while\r\n\r\n return (rootHeaderValuePairs);\r\n }\r\n\r\n}\r\n","import { plainToClass } from \"class-transformer\";\r\n\r\nimport { CascadingDropDownFormFieldConfig } from './cascading-dropdown-config.model';\r\nimport { HeaderValuePair } from '../csv-data/header-value-pair.model';\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\n\r\n// Note: defining class CachedDropDownValuesForHeader to make it a bit simpler to work with an array of arrays.\r\nexport class CachedDropDownValuesForHeader {\r\n public headerIndex: number = -1; // Will be replaced by a valid option.\r\n public previousHeaderSelectedIndex: number = -1; // Will be replaced by a valid option.\r\n public headerValuePairs: HeaderValuePair[] = null;\r\n\r\n public constructor(headerIndex: number) {\r\n this.headerIndex = headerIndex;\r\n }\r\n}\r\n\r\nexport class CascadingDropDownFormFieldData {\r\n // Properties.\r\n public dropDownHeaders: string[];\r\n public _dropDownValues: number[];\r\n public dropDownTextValues: string[]; // Per VNEXT-409: save dropdown values as text, not a numeric index.\r\n public dropDownSavedValues: string[]; // pharv, 8/4/22 - added for VNEXT-320\r\n public formInstanceElements: FormInstanceElement[]; // Note: this is presently only used by the grid-only cascading dropdown form field component class.\r\n public lastHeaderSelectedIndex: number = -1\r\n\r\n public cachedHeaders: CachedDropDownValuesForHeader[];\r\n\r\n // Constructor.\r\n public constructor() {\r\n return;\r\n }\r\n\r\n // Instance methods.\r\n public emptyCache(config: CascadingDropDownFormFieldConfig): void {\r\n if (config != null) {\r\n this.cachedHeaders = [];\r\n for (let index: number = 0; index < config.dropDownHeaders.length; index++)\r\n this.cachedHeaders.push(new CachedDropDownValuesForHeader(index));\r\n }\r\n }\r\n public clearCacheValuesPastHeader(headerIndex: number): void {\r\n for (let index: number = headerIndex; index < this.dropDownHeaders.length; index++)\r\n this.cachedHeaders.push(new CachedDropDownValuesForHeader(index));\r\n }\r\n\r\n // Getter/setter methods.\r\n private numberOfDropDownValuesGets: number = 0;\r\n public get dropDownValues(): number[] {\r\n this.numberOfDropDownValuesGets++;\r\n //console.log(`dropDownValues(${this.numberOfDropDownValuesGets}) ...`);\r\n let a = 1;\r\n if ((this._dropDownValues != null) && (this._dropDownValues.length >= 1) && (this._dropDownValues[0] == 1)) {\r\n //console.log(`dropDownValues(${this.numberOfDropDownValuesGets}): VALUE CHANGED.`);\r\n a = 2;\r\n }\r\n\r\n return this._dropDownValues;\r\n }\r\n public set dropDownValues(value: number[]) {\r\n this._dropDownValues = value;\r\n }\r\n public setDropDownValue(index: number, value: number): void {\r\n if ((this._dropDownValues != null) && (this._dropDownValues.length > index))\r\n this._dropDownValues[index] = value;\r\n }\r\n public setDropDownTextValue(index: number, value: string): void {\r\n if ((this.dropDownTextValues != null) && (this.dropDownTextValues.length > index))\r\n this.dropDownTextValues[index] = value;\r\n }\r\n\r\n // Static method.\r\n public static deserializeDropDownData(textValue: string, config: CascadingDropDownFormFieldConfig): CascadingDropDownFormFieldData {\r\n let hshData: any = JSON.parse(textValue);\r\n if (hshData.formInstanceElements != null)\r\n hshData.formInstanceElements = null;\r\n let data: CascadingDropDownFormFieldData = plainToClass(CascadingDropDownFormFieldData, hshData);\r\n data.emptyCache(config);\r\n data.formInstanceElements = [];\r\n data.cachedHeaders = [];\r\n\r\n // Did the configuration change?\r\n if (config.dropDownHeaders != null) {\r\n if ((config.dropDownHeaders.length > data.dropDownHeaders.length) ||\r\n (config.dropDownHeaders.length > data.dropDownValues.length) ||\r\n (config.dropDownHeaders.length > data.dropDownTextValues.length) ||\r\n (config.dropDownHeaders.length > data.dropDownSavedValues.length) ||\r\n (config.dropDownHeaders.length > data.cachedHeaders.length) ||\r\n (config.dropDownHeaders.length > data.formInstanceElements.length)) {\r\n for (let index: number = data.dropDownHeaders.length; index < config.dropDownHeaders.length; index++)\r\n data.dropDownHeaders.push('');\r\n for (let index: number = data.dropDownValues.length; index < config.dropDownHeaders.length; index++)\r\n data.dropDownValues.push(0);\r\n for (let index: number = data.dropDownTextValues.length; index < config.dropDownHeaders.length; index++)\r\n data.dropDownTextValues.push('');\r\n for (let index: number = data.dropDownSavedValues.length; index < config.dropDownHeaders.length; index++)\r\n data.dropDownSavedValues.push('');\r\n for (let index: number = data.cachedHeaders.length; index < config.dropDownHeaders.length; index++)\r\n data.cachedHeaders.push(new CachedDropDownValuesForHeader(index));\r\n for (let index: number = data.formInstanceElements.length; index < config.dropDownHeaders.length; index++)\r\n data.formInstanceElements.push(new FormInstanceElement());\r\n } else if ((config.dropDownHeaders.length < data.dropDownHeaders.length) ||\r\n (config.dropDownHeaders.length < data.dropDownValues.length) ||\r\n (config.dropDownHeaders.length < data.dropDownTextValues.length) ||\r\n (config.dropDownHeaders.length < data.dropDownSavedValues.length) ||\r\n (config.dropDownHeaders.length < data.cachedHeaders.length) ||\r\n (config.dropDownHeaders.length < data.formInstanceElements.length)) {\r\n while (data.dropDownHeaders.length > config.dropDownHeaders.length)\r\n data.dropDownHeaders.pop();\r\n while (data.dropDownValues.length > config.dropDownHeaders.length)\r\n data.dropDownValues.pop();\r\n while (data.dropDownTextValues.length > config.dropDownHeaders.length)\r\n data.dropDownTextValues.pop();\r\n while (data.dropDownSavedValues.length > config.dropDownHeaders.length)\r\n data.dropDownSavedValues.pop();\r\n while (data.cachedHeaders.length > config.dropDownHeaders.length)\r\n data.cachedHeaders.pop();\r\n while (data.formInstanceElements.length > config.dropDownHeaders.length)\r\n data.formInstanceElements.pop();\r\n }\r\n }\r\n\r\n return data;\r\n }\r\n\r\n public static createEmptyDataFromConfig(config: CascadingDropDownFormFieldConfig): CascadingDropDownFormFieldData {\r\n let data: CascadingDropDownFormFieldData = new CascadingDropDownFormFieldData();\r\n\r\n if (config != null) {\r\n if (config.dropDownHeaders) {\r\n data.dropDownHeaders = config.dropDownHeaders;\r\n data.dropDownValues = CascadingDropDownFormFieldData.createDropDownValuesFromHeaders(config.dropDownHeaders);\r\n data.dropDownTextValues = CascadingDropDownFormFieldData.createDropDownTextValuesFromHeaders(config.dropDownHeaders); // new for VNEXT-320\r\n data.dropDownSavedValues = CascadingDropDownFormFieldData.createDropDownSavedValuesFromHeaders(config.dropDownHeaders);\r\n data.formInstanceElements = CascadingDropDownFormFieldData.createDropDownFormInstanceElementsFromHeaders(config.dropDownHeaders);\r\n\r\n // Note: property 'formInstanceElements' is only being used by the grid version of the cascading dropdown\r\n // component class, so we will probably want to move the property into a derived class.\r\n //data.formInstanceElements = [];\r\n data.cachedHeaders = [];\r\n for (let index: number = 0; index < config.dropDownHeaders.length; index++) {\r\n //let blankDummyFormInstanceElement = new FormInstanceElement();\r\n //data.formInstanceElements.push(blankDummyFormInstanceElement);\r\n\r\n data.cachedHeaders.push(new CachedDropDownValuesForHeader(index));\r\n }\r\n }\r\n } else {\r\n console.log('createEmptyDataFromConfig(): config is null.');\r\n }\r\n\r\n return data;\r\n }\r\n\r\n private static createDropDownValuesFromHeaders(headers: string[]): number[] {\r\n let dropDownValues: number[] = [];\r\n\r\n if (headers) {\r\n for (let iHeader: number = 0; iHeader < headers.length; iHeader++)\r\n dropDownValues.push(0);\r\n }\r\n\r\n return (dropDownValues);\r\n }\r\n private static createDropDownTextValuesFromHeaders(headers: string[]): string[] {\r\n let dropDownTextValues: string[] = [];\r\n\r\n if (headers) {\r\n for (let iHeader: number = 0; iHeader < headers.length; iHeader++)\r\n dropDownTextValues.push('');\r\n }\r\n\r\n return dropDownTextValues;\r\n }\r\n private static createDropDownFormInstanceElementsFromHeaders(headers: string[]): FormInstanceElement[] {\r\n let formInstanceElements: FormInstanceElement[] = [];\r\n\r\n for (let iHeader: number = 0; iHeader < headers.length; iHeader++)\r\n formInstanceElements.push(new FormInstanceElement());\r\n\r\n return formInstanceElements;\r\n }\r\n\r\n // Added for VNEXT-320 -- parralel the approach used for createDropDownValuesFromHeaders but setting nulls \r\n public static createDropDownSavedValuesFromHeaders(headers: string[]): string[] {\r\n var dropDownValues: string[] = [];\r\n\r\n for (var iHeader: number = 0; iHeader < headers.length; iHeader++) {\r\n dropDownValues.push(null);\r\n }\r\n\r\n return (dropDownValues);\r\n }\r\n\r\n // Returns a string which is used to display the value of field when it is in view (rather than edit) mode\r\n public static getDisplayValue(config: CascadingDropDownFormFieldConfig, textValue: string): string {\r\n let displayValue: string = '';\r\n let currentLevel: number = 0;\r\n let currentHeaderValuePairs: HeaderValuePair[] = config.dropDownOptionsAsHierarchy;\r\n\r\n if (config != null) {\r\n let myData: CascadingDropDownFormFieldData = JSON.parse(textValue);\r\n if ((myData != null) && (myData.dropDownValues != null) && (myData.dropDownValues.length > 0)) {\r\n for (let valueLevel: number = 0; valueLevel < myData.dropDownValues.length; valueLevel++) {\r\n let iValue: number = myData.dropDownValues[valueLevel];\r\n let savedValue: string = myData.dropDownSavedValues[valueLevel];\r\n let iValueIndex: number = iValue - 1; // Adjust for one-based index.\r\n\r\n if ((iValue > 0) && (currentHeaderValuePairs != null) && (iValueIndex < currentHeaderValuePairs.length)) {\r\n let valuePair: HeaderValuePair = currentHeaderValuePairs[iValueIndex];\r\n let header: string = valuePair.Header;\r\n let value: string = valuePair.ValueText;\r\n\r\n // pharv - 01/28-2022 - do some html formatting to better layout\r\n // the selected values (and with headings) when displayed in a grid\r\n if (currentLevel > 0)\r\n displayValue += '
';\r\n displayValue += `${header}: ${savedValue || value}`;\r\n\r\n currentLevel++;\r\n currentHeaderValuePairs = valuePair.ChildValuePairs;\r\n } else {\r\n break; // Stop processing values.\r\n } // if-else\r\n } // for\r\n } // if\r\n }\r\n\r\n return displayValue;\r\n }\r\n}\r\n","import {\r\n NG_VALUE_ACCESSOR, UntypedFormControl\r\n} from '@angular/forms';\r\n\r\nexport interface ICheckboxValueChanged {\r\n checkboxValueChanged(index: number, checkboxData: CheckboxData): void;\r\n}\r\n\r\nexport class CheckboxData {\r\n // Properties.\r\n public id: number = 0;\r\n public title: string;\r\n public value: boolean = false;\r\n\r\n private index: number = -1;\r\n private checkboxValueChanged: ICheckboxValueChanged;\r\n private formControl: UntypedFormControl;\r\n\r\n // Constructor.\r\n public constructor(indexParam: number,\r\n checkboxValueChangedParam: ICheckboxValueChanged) {\r\n this.index = indexParam;\r\n this.checkboxValueChanged = checkboxValueChangedParam;\r\n\r\n return;\r\n }\r\n\r\n // Getter methods.\r\n public get FormControl(): UntypedFormControl {\r\n return (this.formControl);\r\n }\r\n\r\n // Methods.\r\n public setupFormControl(disabled: boolean = false): void {\r\n // Setup my form control.\r\n let hshControlProperties = {\r\n value: this.value,\r\n disabled: disabled\r\n }\r\n\r\n this.formControl = new UntypedFormControl(hshControlProperties);\r\n\r\n // Listen for/subscribe to value changes.\r\n this.formControl.valueChanges\r\n .subscribe(val => {\r\n this.value = val;\r\n\r\n if (this.checkboxValueChanged != null)\r\n this.checkboxValueChanged.checkboxValueChanged(this.index, this);\r\n });\r\n\r\n return;\r\n }\r\n}\r\n","import { add } from 'mathjs';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\n\r\nexport interface INameToPrettyNameMap {\r\n [name: string]: string;\r\n}\r\nexport class OperationCompletedServiceInfo {\r\n public constructor(public serviceName: string, public operationName: string) { }\r\n}\r\nexport interface IOperationCompletedServiceMap {\r\n [name: string]: OperationCompletedServiceInfo;\r\n}\r\n\r\nexport interface IAdditionalElementInfo {\r\n innerTextSelector?: string;\r\n customTextValue?: string;\r\n customTextValues?: string[];\r\n\r\n elementSubtypeName?: string;\r\n elementSubtypeNames?: string[];\r\n\r\n customPreprocessingFunction?: (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => void;\r\n customGetTextForFunction?: (driver: IBrowserDriver, element: object, existingTextValue: string, additionalElementInfo: IAdditionalElementInfo) => string;\r\n getClickableElementFunction?: (element: object) => object;\r\n\r\n //findElementFilter?: string; // Not yet used.\r\n reFindElementsAfterActionPerformed?: boolean;\r\n useDoubleClick?: boolean;\r\n cssFilter?: string;\r\n\r\n name?: string; // An element's display name.\r\n names?: string[]; // Display names for a list of elements.\r\n nameToPrettyNameMap?: INameToPrettyNameMap; // Note: this property is not presently being used.\r\n standardNameToPrettyStandardNameMap?: INameToPrettyNameMap; // For names used consistently throughout the app.\r\n elementsSubtypeMap?: INameToPrettyNameMap;\r\n hasAddedDateTimeSuffix?: boolean;\r\n operationCompletedServiceMap?: IOperationCompletedServiceMap;\r\n \r\n toggleCheckboxMethodName?: string;\r\n\r\n allowZeroElements?: boolean;\r\n maxTimeoutsLookingForScriptableElements?: number;\r\n}\r\nexport class AdditionalElementInfo {\r\n public innerTextSelector: string = null;\r\n public customTextValue: string = null;\r\n public customTextValues: string[];\r\n\r\n public elementSubtypeName: string = null;\r\n public elementSubtypeNames: string[] = null;\r\n\r\n public customPreprocessingFunction?: (driver: IBrowserDriver, elements: object, elementTypeMetadata: IElementTypeMetadata, additionalElementInfo: IAdditionalElementInfo) => void;\r\n public customGetTextForFunction?: (driver: IBrowserDriver, element: object, existingTextValue: string, additionalElementInfo: IAdditionalElementInfo) => string;\r\n public getClickableElementFunction?: (element: object) => object;\r\n\r\n //public findElementFilter?: string = null; // Not yet used.\r\n public reFindElementsAfterActionPerformed: boolean = false;\r\n public useDoubleClick: boolean = false;\r\n public cssFilter: string = null;\r\n\r\n public name: string = null; // Display name for an element\r\n public names: string[] = null; // Display names for a list of elements.\r\n public nameToPrettyNameMap: INameToPrettyNameMap = null;\r\n public standardNameToPrettyStandardNameMap: INameToPrettyNameMap;\r\n public elementsSubtypeMap: INameToPrettyNameMap;\r\n public hasAddedDateTimeSuffix: boolean = false;\r\n public operationCompletedServiceMap: IOperationCompletedServiceMap;\r\n\r\n public toggleCheckboxMethodName: string = null;\r\n\r\n public allowZeroElements: boolean = null;\r\n public maxTimeoutsLookingForScriptableElements: number = null;\r\n\r\n public constructor(additionalElementInfo: IAdditionalElementInfo) {\r\n if (additionalElementInfo.innerTextSelector != null)\r\n this.innerTextSelector = additionalElementInfo.innerTextSelector;\r\n if (additionalElementInfo.customTextValue != null)\r\n this.customTextValue = additionalElementInfo.customTextValue;\r\n if (additionalElementInfo.customTextValues != null)\r\n this.customTextValues = additionalElementInfo.customTextValues;\r\n\r\n if (additionalElementInfo.elementSubtypeName != null)\r\n this.elementSubtypeName = additionalElementInfo.elementSubtypeName;\r\n if (additionalElementInfo.elementSubtypeNames != null)\r\n this.elementSubtypeNames = additionalElementInfo.elementSubtypeNames;\r\n\r\n if (additionalElementInfo.customPreprocessingFunction != null)\r\n this.customPreprocessingFunction = additionalElementInfo.customPreprocessingFunction;\r\n if (additionalElementInfo.customGetTextForFunction != null)\r\n this.customGetTextForFunction = additionalElementInfo.customGetTextForFunction;\r\n\r\n //if (additionalElementInfo.findElementFilter != null)\r\n // this.findElementFilter = additionalElementInfo.findElementFilter;\r\n if (additionalElementInfo.reFindElementsAfterActionPerformed != null)\r\n this.reFindElementsAfterActionPerformed = additionalElementInfo.reFindElementsAfterActionPerformed;\r\n if (additionalElementInfo.useDoubleClick != null)\r\n this.useDoubleClick = additionalElementInfo.useDoubleClick;\r\n if (additionalElementInfo.cssFilter == null)\r\n this.cssFilter = additionalElementInfo.cssFilter;\r\n\r\n if (additionalElementInfo.name != null)\r\n this.name = additionalElementInfo.name;\r\n if (additionalElementInfo.names != null)\r\n this.names = additionalElementInfo.names;\r\n if (additionalElementInfo.nameToPrettyNameMap != null)\r\n this.nameToPrettyNameMap = additionalElementInfo.nameToPrettyNameMap;\r\n if (additionalElementInfo.standardNameToPrettyStandardNameMap != null)\r\n this.standardNameToPrettyStandardNameMap = additionalElementInfo.standardNameToPrettyStandardNameMap;\r\n if (additionalElementInfo.elementsSubtypeMap != null)\r\n this.elementsSubtypeMap = additionalElementInfo.elementsSubtypeMap;\r\n if (additionalElementInfo.hasAddedDateTimeSuffix != null)\r\n this.hasAddedDateTimeSuffix = additionalElementInfo.hasAddedDateTimeSuffix;\r\n if (additionalElementInfo.operationCompletedServiceMap != null)\r\n this.operationCompletedServiceMap = additionalElementInfo.operationCompletedServiceMap;\r\n\r\n if (additionalElementInfo.toggleCheckboxMethodName != null)\r\n this.toggleCheckboxMethodName = additionalElementInfo.toggleCheckboxMethodName;\r\n\r\n if (additionalElementInfo.allowZeroElements != null)\r\n this.allowZeroElements = additionalElementInfo.allowZeroElements;\r\n if (additionalElementInfo.maxTimeoutsLookingForScriptableElements != null)\r\n this.maxTimeoutsLookingForScriptableElements = additionalElementInfo.maxTimeoutsLookingForScriptableElements;\r\n }\r\n}\r\n","import { Type as AngularCoreType } from '@angular/core';\r\n\r\nexport class ComponentMethodMetadata {\r\n // Properties.\r\n public userFriendlyName: string = null;\r\n public parameterNames: string[] = null;\r\n public parametersTypeInfo: string[] = null;\r\n\r\n // Constructor with required properties.\r\n public constructor(public componentClass: AngularCoreType, public methodName: string, public argumentTypeNames: string[], public returnTypeName: string) {\r\n }\r\n}\r\nexport class ComponentMethodsMetadata {\r\n public constructor(public className: string) { }\r\n\r\n methodsMetadata: ComponentMethodMetadata[] = [];\r\n}\r\nexport interface IComponentNameToMethodsMetadata {\r\n [componentClassName: string]: ComponentMethodsMetadata;\r\n}\r\n\r\n\r\n\r\n","\r\nimport { IComponentNameToMethodsMetadata, ComponentMethodMetadata, ComponentMethodsMetadata } from './component-methods-metadata.model';\r\n\r\nexport class EnumMetadata {\r\n public constructor(public name: string, public values: string[] = null) { }\r\n public prettyNames: string[] = null;\r\n}\r\nexport interface IEnumMetadataByName {\r\n [enumName: string]: EnumMetadata;\r\n}\r\n\r\n// Define a service-like class, albeit one that is not dependency injected, for managing registered component methods and related data.\r\nexport class ComponentMethodsService {\r\n // Static data.\r\n private static mapOfComponentMethodsMetadata: IComponentNameToMethodsMetadata = {};\r\n private static enumMetadataByName: IEnumMetadataByName = {};\r\n\r\n // Static method(s).\r\n // Method for managing registered component methods.\r\n public static saveComponentMethodMetadataFor(componentClassName: string, methodMetadata: ComponentMethodMetadata): void {\r\n let componentMethodsMetadata: ComponentMethodsMetadata = ComponentMethodsService.mapOfComponentMethodsMetadata[componentClassName];\r\n if (componentMethodsMetadata == null) {\r\n componentMethodsMetadata = new ComponentMethodsMetadata(componentClassName);\r\n ComponentMethodsService.mapOfComponentMethodsMetadata[componentClassName] = componentMethodsMetadata;\r\n }\r\n\r\n if (componentMethodsMetadata.methodsMetadata.find(md => md.methodName == methodMetadata.methodName) == null)\r\n componentMethodsMetadata.methodsMetadata.push(methodMetadata);\r\n }\r\n public static getComponentMethodsMetadataFor(componentClassName: string): ComponentMethodsMetadata {\r\n let componentMethodsMetadata: ComponentMethodsMetadata = ComponentMethodsService.mapOfComponentMethodsMetadata[componentClassName];\r\n return componentMethodsMetadata;\r\n }\r\n /*\r\n public static getAllComponentMethods(): IComponentNameToMethodsMetadata {\r\n return this.mapOfComponentMethodsMetadata;\r\n }\r\n */\r\n\r\n // Methods for managing registered enumerations used for method parameters.\r\n public static registerOrUpdateEnum(enumName: string, enumMetadata: EnumMetadata): void {\r\n ComponentMethodsService.enumMetadataByName[enumName] = enumMetadata;\r\n }\r\n public static getEnumMetadata(enumName: string): EnumMetadata {\r\n let enumMetadata: EnumMetadata = ComponentMethodsService.enumMetadataByName[enumName];\r\n return enumMetadata;\r\n }\r\n}\r\n","\r\nexport enum ElementCountExpected {\r\n Singular = 'Singular',\r\n Singular_or_Plural = 'Singular_or_Plural',\r\n Plural = 'Plural',\r\n None = 'None'\r\n}\r\n","import { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\nimport { ElementTypeInfo } from './element-type-info.model';\r\n\r\nexport class HtmlElementInfo {\r\n public additionalElementInfo: AdditionalElementInfo = null;\r\n public elementSubtype: string = null;\r\n public displayTabName: string = null;\r\n\r\n public constructor(public elementTypeMetadata: IElementTypeMetadata, public element: object, unusedElementType: string, public elementTitle: string) {\r\n }\r\n\r\n public get elementType(): string {\r\n return this.elementTypeMetadata.metadataKey;\r\n }\r\n}\r\nexport interface IComponentElementsByElementType {\r\n [elementType: string]: HtmlElementInfo[];\r\n}\r\nexport interface IDisplayTabNameToElementType {\r\n [displayTabName: string]: ElementTypeInfo;\r\n}\r\n","export class HtmlElementTypeNames {\r\n // Constants.\r\n public static readonly links_metadataKey: string = 'links';\r\n public static readonly buttons_metadataKey: string = 'buttons';\r\n public static readonly buttonsWithMatIcons_metadataKey: string = 'buttonsWithMatIcons';\r\n public static readonly matListItems_metadataKey: string = 'matlistitems';\r\n public static readonly matIcons_metadataKey: string = 'maticons';\r\n public static readonly matSelect_metadataKey: string = 'matselect';\r\n public static readonly input_metadataKey: string = 'input';\r\n public static readonly inputs_metadataKey: string = 'inputs';\r\n public static readonly matCheckBox_metadataKey: string = 'matcheckbox';\r\n public static readonly matList_metadataKey: string = 'matlist';\r\n\r\n public static readonly componentMethods_metadataKey: string = 'class_method';\r\n\r\n private constructor() { }\r\n}\r\n\r\nexport class HtmlMetadataTagNames {\r\n public static readonly elementName_dataAttribute = 'data-display-name';\r\n}\r\n","import { Type as AngularCoreType } from '@angular/core';\r\n\r\nimport { ComponentMethodMetadata } from './component-methods-metadata.model';\r\nimport { ComponentMethodsService } from './component-methods.service';\r\n\r\n// Define a function used for handling @Scriptable() method annotations.\r\nexport function Scriptable(userFriendlyMethodName: string = null, parameterNames: string[] = null, parametersTypeInfo: string[] = null) {\r\n const decorator: MethodDecorator = (target: Object, propertyKey: string | symbol, description) => {\r\n const targetType = Reflect.getMetadata('design:type', target, propertyKey);\r\n\r\n if ((targetType != null) && (targetType.constructor.name == 'Function')) {\r\n const args = Reflect.getMetadata('design:paramtypes', target, propertyKey).map(c => c.name);\r\n const ret = Reflect.getMetadata('design:returntype', target, propertyKey);\r\n let returnType: string = '';\r\n if (ret == null)\r\n returnType = 'void';\r\n else\r\n returnType = ret.name;\r\n\r\n let componentClass = >target;\r\n let componentClassName: string = componentClass.constructor.name;\r\n let methodName: string = propertyKey.toString();\r\n let componentMethodMetadata: ComponentMethodMetadata = new ComponentMethodMetadata(componentClass, methodName, args, returnType);\r\n componentMethodMetadata.userFriendlyName = userFriendlyMethodName;\r\n componentMethodMetadata.parameterNames = parameterNames;\r\n componentMethodMetadata.parametersTypeInfo = parametersTypeInfo;\r\n\r\n ComponentMethodsService.saveComponentMethodMetadataFor(componentClassName, componentMethodMetadata);\r\n }\r\n }\r\n\r\n return decorator\r\n}\r\n","import { HtmlElementInfo } from './html-element-info.model';\r\n\r\nexport class ElementTypeInfo {\r\n public elementType: string; // An element type metadata key.\r\n public elementSubtypes: string[]; // A subtype, a first sub-categorization of elements of a given type.\r\n public elementTabName: string; // For display in the select component info component.\r\n\r\n public elements: HtmlElementInfo[] = null;\r\n\r\n public constructor(elementType: string, elementSubtypes: string[], elementTabName: string){\r\n this.elementType = elementType;\r\n this.elementSubtypes = elementSubtypes;\r\n this.elementTabName = elementTabName;\r\n }\r\n}\r\n","import { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { HtmlElementInfo, IComponentElementsByElementType, IDisplayTabNameToElementType } from './html-element-info.model';\r\nimport { ISelectedElementInfo } from './iselected-element-info.interface';\r\nimport { ElementTypeInfo } from './element-type-info.model';\r\nimport { UITestActionRecorderService } from '../../services/ui-test-action-recorder.service';\r\n\r\nexport class SelectedComponentData implements ISelectedElementInfo { // Note: presently ISelectedElementInfo only exposes some of the properties in this class? We will probably change that.\r\n public component: ITestableComponent;\r\n public componentIsVisible: boolean = true;\r\n\r\n public componentElementTypes: string[];\r\n public selectedElementTypeIndex: number = 0;\r\n public mapOfElementsByType: IComponentElementsByElementType = {};\r\n public mapOfElementTypesByTabName: IDisplayTabNameToElementType = {};\r\n\r\n public selectedElementName: string = null;\r\n public selectedElement: HtmlElementInfo = null;\r\n public selectedElementHasProperties: boolean = false;\r\n public selectedElementHasActions: boolean = false;\r\n public selectedElementHasInputs: boolean = false;\r\n\r\n public constructor(selectedComponent: ITestableComponent) {\r\n this.component = selectedComponent;\r\n }\r\n\r\n public static handleComponentSelected(component: ITestableComponent, uiTestActionRecorderService: UITestActionRecorderService, recordAction: boolean = false): SelectedComponentData {\r\n if (recordAction)\r\n uiTestActionRecorderService.selectComponent(component);\r\n\r\n let selectedComponentInfo: SelectedComponentData = new SelectedComponentData(component);\r\n selectedComponentInfo.componentElementTypes = selectedComponentInfo.component.elementTypes;\r\n if ((selectedComponentInfo.componentElementTypes != null) && (selectedComponentInfo.componentElementTypes.length > 0)) {\r\n for (let index: number = 0; index < selectedComponentInfo.componentElementTypes.length; index++) {\r\n let elementType: string = selectedComponentInfo.componentElementTypes[index];\r\n let elements: HtmlElementInfo[] = selectedComponentInfo.component.getElementsOfType(elementType);\r\n\r\n // Save elements by type.\r\n selectedComponentInfo.mapOfElementsByType[elementType] = elements;\r\n\r\n // Save elements by tab name as well.\r\n selectedComponentInfo.mapElementsByTabNames(elementType, elements);\r\n }\r\n }\r\n\r\n return selectedComponentInfo;\r\n }\r\n\r\n public mapElementsByTabNames(elementType: string, elements: HtmlElementInfo[]): void {\r\n for (let elIndex: number = 0; elIndex < elements.length; elIndex++) {\r\n let elementInfo: HtmlElementInfo = elements[elIndex];\r\n\r\n let elementTypeInfo: ElementTypeInfo;\r\n\r\n if (elementInfo.displayTabName != null) {\r\n elementTypeInfo = this.mapOfElementTypesByTabName[elementInfo.displayTabName];\r\n if (elementTypeInfo == null) {\r\n elementTypeInfo = new ElementTypeInfo(elementInfo.elementType, [elementInfo.elementSubtype], elementInfo.displayTabName);\r\n this.mapOfElementTypesByTabName[elementInfo.displayTabName] = elementTypeInfo;\r\n } else if (elementTypeInfo.elementSubtypes.find(st => st == elementInfo.elementSubtype) == null)\r\n elementTypeInfo.elementSubtypes.push(elementInfo.elementSubtype);\r\n } else {\r\n // Use the element type as the tab name.\r\n elementTypeInfo = this.mapOfElementTypesByTabName[elementType];\r\n if (elementTypeInfo == null) {\r\n elementTypeInfo = new ElementTypeInfo(elementInfo.elementType, [elementInfo.elementSubtype], elementInfo.elementType);\r\n this.mapOfElementTypesByTabName[elementType] = elementTypeInfo;\r\n } else if (elementTypeInfo.elementSubtypes.find(st => st == elementInfo.elementSubtype) == null)\r\n elementTypeInfo.elementSubtypes.push(elementInfo.elementSubtype);\r\n }\r\n\r\n if ((elementInfo.elementType == null) || (elementInfo.elementType.trim() == '') || (elementInfo.displayTabName == null) || (elementInfo.displayTabName.trim() == ''))\r\n console.log('SelectComponentNodeComponent.handleComponentSelected(): need to add additional metadata.');\r\n else {\r\n if (elementTypeInfo.elements == null)\r\n elementTypeInfo.elements = [];\r\n elementTypeInfo.elements.push(elementInfo);\r\n }\r\n }\r\n\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nexport class HeaderValuePair {\r\n public Index: number; // This is a one-based index, not zero based.\r\n //public OneBasedIndex: number;\r\n public Header: string;\r\n public ValueText: string;\r\n\r\n @Type(() => HeaderValuePair)\r\n public ChildValuePairs: HeaderValuePair[];\r\n\r\n public constructor(index: number = 1, header: string = 'tbd', valueText: string = 'tbd') {\r\n this.Index = index;\r\n this.Header = header;\r\n this.ValueText = valueText;\r\n }\r\n}\r\n","export class DataCollectionStatus {\n public static readonly SETUP: string = 'Setup';\n public static readonly ACTIVE: string = 'Active';\n public static readonly CLOSED: string = 'Closed';\n\n public id: number = 0;\n\n public name: string;\n public createdAt: Date;\n}\n","import { ItemTypeEnum } from '../enums/item-type.enum';\r\nimport { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { IListItem } from '../interfaces/ilist-item.interface';\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { DataCollection } from './site-content/data-collection.model';\r\nimport { IListItemBase } from './ilist-item-base.model';\r\nimport { IconFormatEnum } from '../enums/icon-format.enum';\r\n\r\n// This maps to XsltStylesheet on the backend\r\nexport class DocumentPublishingSettings extends IListItemBase implements IViewModel, IHasIdAndName, IListItem{\r\n\r\n id: number;\r\n name: string;\r\n outputType: string;\r\n xslt: string;\r\n viewableBy: string;\r\n viewableByMaxGroup: string;\r\n siteId: number;\r\n\r\n modifiedDate: Date;\r\n modifiedBy: string;\r\n\r\n private fileExtensions: any = { 'PDF': 'pdf', 'Word': 'docx', 'Excel': 'xlsx', 'HTML': 'html', 'XML': 'xml', 'Email':'eml'}\r\n\r\n public get FileName(): string {\r\n return `${this.name}.${this.fileExtensions[this.outputType]}`;\r\n }\r\n\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n }\r\n public userCanDelete(): boolean {\r\n return true;\r\n }\r\n public getPosition(): number {\r\n return this.id; // id forms a default attribute for ordering \r\n }\r\n public getStatus(): string {\r\n return this.outputType;\r\n }\r\n public getExtraInfo(): string {\r\n return \"\";\r\n }\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return this.fileExtensions[this.outputType];\r\n }\r\n public setIcon(iconParam: string): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public canBeDeleted(): boolean {\r\n return true; // TODO\r\n }\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getUniqueId(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public findAndUpdateFrom(items: any, obj: any): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getType(): string {\r\n return ItemTypeEnum.DOCUMENT_PUBLISH_SETTINGS;\r\n }\r\n public getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getId(): number {\r\n return this.id;\r\n }\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n public getName(): string {\r\n return this.name;\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n public typeName(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n public hasDescriptionField(): boolean {\r\n return false;\r\n }\r\n public getDescription(): string {\r\n return null;\r\n }\r\n public setDescription(val: string) {\r\n return;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n}\r\n","import { Type } from \"class-transformer\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { IconFormatEnum } from \"../enums/icon-format.enum\";\r\nimport { ItemTypeEnum } from \"../enums/item-type.enum\";\r\nimport { IListItem } from \"../interfaces/ilist-item.interface\";\r\nimport { IViewModel } from \"../interfaces/view-model.interface\";\r\nimport { IListItemBase } from \"./ilist-item-base.model\";\r\nimport { SubscriptionFilter } from \"./notifications/subscription-filter.model\";\r\n\r\nexport class EventSubscription extends IListItemBase implements IViewModel, IListItem {\r\n public id: number;\r\n public eventName: string;\r\n public subscribeeType: string;\r\n public subscribee: string;\r\n public expirationDate: Date;\r\n\r\n public isExactMatch: boolean;\r\n public isMatchedByAncestor: boolean;\r\n public entityName: string;\r\n public entityPath: string;\r\n\r\n public dataCollectionId: number;\r\n public folderId: number;\r\n public formId: number;\r\n public formInstanceId: number;\r\n public parentFolderId: number;\r\n public workflowId: number;\r\n public workflowStateId: number;\r\n public workflowTransitionId: number;\r\n\r\n //@Type(() => SubscriptionFilter)\r\n public filters: SubscriptionFilter[];\r\n\r\n public addFilter(filter: any): void {\r\n if (this.filters == null) {\r\n this.filters = [];\r\n }\r\n this.filters.push(filter);\r\n }\r\n\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n }\r\n public getName(): string {\r\n let msg = \"\";\r\n if (this.dataCollectionId) msg = `Data Collection: ${this.dataCollectionId}`;\r\n if (this.folderId) msg = ` Folder: ${this.folderId}`;\r\n if (this.parentFolderId) msg = ` Parent Folder: ${this.parentFolderId}`\r\n if (this.formId) msg = ` Form Template Id: ${this.formId}`;\r\n if (this.formInstanceId) msg = ` Form Id; ${this.formInstanceId}`;\r\n if (this.workflowId) msg = ` Workflow Id: ${this.workflowId}`;\r\n if (this.workflowStateId) msg = ` Workflow State: ${this.workflowStateId}`;\r\n if (this.workflowTransitionId) msg = ` Workflow Transition Id: ${this.workflowTransitionId}`;\r\n\r\n return `${this.eventName} for ${msg}`;\r\n }\r\n public getTitle(): string {\r\n return this.eventName;\r\n }\r\n public getExtraInfo(): string {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n public userCanDelete(): boolean {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getPosition(): number {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public modifiedDate: Date;\r\n public modifiedBy: string;\r\n public getStatus(): string {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return 'subscriptions';\r\n }\r\n public canBeDeleted(): boolean {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getUniqueId(): string {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getOriginalVersionId(): number {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public findAndUpdateFrom(items: any, obj: any): void {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public isMagicStructure(): boolean {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public name: string;\r\n public getId(): number {\r\n return this.id;\r\n }\r\n public getType(): string {\r\n return ItemTypeEnum.SUBSCRIPTION;\r\n }\r\n public getParentId(): number {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n}\r\n","export enum ExportSiteStepEnum {\r\n ExportingRoles = 1,\r\n ExportingWorkflows = 2,\r\n ExportingForms = 3,\r\n\r\n ExportingFoldersAndFormInstances = 4,\r\n\r\n ExportComplete = 5\r\n}\r\n","import { ExportSiteStepEnum } from './export-site-step.enum';\r\nimport { IJobSummaryText } from './i-job-summary-text';\r\nimport { MetricsBase } from './metrics-base.model';\r\n\r\nexport class ExportSiteMetrics extends MetricsBase {\r\n public numRolesFound: number;\r\n public numWorkflowsFound: number;\r\n public numFormsFound: number;\r\n public numFoldersFound: number;\r\n public numFormInstancesFound: number;\r\n\r\n public exportStep: ExportSiteStepEnum = ExportSiteStepEnum.ExportingRoles;\r\n\r\n public numRolesExported: number;\r\n public numWorkflowsExported: number;\r\n public numFormsExported: number;\r\n public numFoldersExported: number;\r\n public numFormInstancesExported: number;\r\n\r\n // Import summary message.\r\n //public importSummaryMessage: string;\r\n\r\n // Property names for the super/base class constructor.\r\n private static readonly propertyNames: string[] =\r\n [\r\n // Properties from MetricsBase.\r\n 'progressLog',\r\n 'warningLog',\r\n 'errorLog',\r\n\r\n 'jobSummaryMessage',\r\n\r\n 'exceptionLoggedAndJobTerminated',\r\n\r\n // My properties.\r\n 'numRolesFound',\r\n 'numWorkflowsFound',\r\n 'numFormsFound',\r\n 'numFoldersFound',\r\n 'numFormInstancesFound',\r\n\r\n 'exportStep',\r\n\r\n 'numRolesExported',\r\n 'numWorkflowsExported',\r\n 'numFormsExported',\r\n 'numFoldersExported',\r\n 'numFormInstancesExported'\r\n ];\r\n\r\n // Constructor.\r\n public constructor(jsonData: Object) {\r\n super(ExportSiteMetrics.propertyNames, jsonData);\r\n }\r\n\r\n}\r\n","import { ImportDataFromExcelDialogAction } from \"../../services/excel-import.service\";\r\n\r\n\r\nexport enum ImportDataServiceNames {\r\n ImportSiteStructureService = 'ImportSiteStructureService',\r\n ImportSiteFormInstancesService = 'ImportSiteFormInstancesService',\r\n ImportFormInstanceGridsService = 'ImportSiteGridsService',\r\n ImportValuesToExistingFormInstancesService = 'ImportValuesToExistingFormInstancesService'\r\n}\r\n\r\nexport class GenericImportDataFromExcelSpreadsheet {\r\n // Note: generally only one or two of the following Id properties will be set.\r\n public dataCollectionId: number; // A property that might or might not be set.\r\n public formInstanceId: number; // A property that might or might not be set.\r\n public formFieldId: number; // A property that might or might not be set.\r\n public formInstanceElementId: number; // A property that might or might not be set.\r\n\r\n // Note: the 'serviceName' property must be specified.\r\n public serviceName: string; // The name of the service to perform much of the download.\r\n\r\n // The object being imported to may be a site, a form instance, etc -- return it based on the service\r\n public getObjectId(): number {\r\n let objectId: number = 0;\r\n if (this.serviceName == ImportDataFromExcelDialogAction.ImportSiteStructure)\r\n objectId = this.dataCollectionId;\r\n else if (this.serviceName == ImportDataFromExcelDialogAction.ImportFormInstanceGrids)\r\n objectId = this.dataCollectionId;\r\n else if (this.serviceName == ImportDataFromExcelDialogAction.ImportSiteFormInstances)\r\n objectId = this.dataCollectionId;\r\n else if (this.serviceName == ImportDataFromExcelDialogAction.ImportValuesToExistingFormInstances)\r\n objectId = this.dataCollectionId;\r\n\r\n return objectId;\r\n }\r\n}\r\n","import { MetricsBase } from './metrics-base.model';\r\n\r\nexport class ImportMetricsBase extends MetricsBase {\r\n // Import summary message.\r\n //public importSummaryMessage: string;\r\n\r\n // Constructor.\r\n protected constructor(readonly propertyNames: string[], jsonData: Object) {\r\n super(propertyNames, jsonData);\r\n }\r\n}\r\n","import { IJobSummaryText } from './i-job-summary-text';\r\n\r\nexport class MetricsBase implements IJobSummaryText {\r\n // Properties.\r\n // Logs.\r\n public progressLog: string;\r\n public warningLog: string;\r\n public errorLog: string;\r\n\r\n // Job summary message.\r\n public jobSummaryMessage: string;\r\n\r\n // Implement IJobSummaryText.\r\n public getProgressLog(): string {\r\n return (this.progressLog);\r\n }\r\n public getWarningLog(): string {\r\n return (this.warningLog);\r\n }\r\n public getErrorLog(): string {\r\n return (this.errorLog);\r\n }\r\n\r\n public getJobSummaryText(): string {\r\n return (this.jobSummaryMessage);\r\n }\r\n\r\n // Constructor.\r\n protected constructor(readonly propertyNames: string[], jsonData: Object) {\r\n if (propertyNames != null) {\r\n for (let iProp: number = 0; iProp < propertyNames.length; iProp++) {\r\n let propertyName: string = propertyNames[iProp];\r\n let capPropertyName: string = MetricsBase.capitalizeFirstLetter(propertyName);\r\n\r\n if (jsonData[capPropertyName] != null) {\r\n this[propertyName] = jsonData[capPropertyName];\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Private helper methods.\r\n private static capitalizeFirstLetter(str: string): string {\r\n return (str.charAt(0).toUpperCase() + str.slice(1));\r\n }\r\n}\r\n","import { FormField } from '../models/form-builder/form-field.model';\r\n\r\nexport class FormFieldUtil {\r\n public static getFieldName(formField: FormField): string {\r\n return (formField.displayName != null) && (formField.displayName.trim() != '') ? formField.displayName : formField.name;\r\n }\r\n}\r\n","import { FormFieldExpression } from './form-field-expression.model';\r\nimport { FormFieldAction } from './form-field-action.model';\r\nimport { Form } from '../form-builder/form.model';\r\nimport { ConditionalLogicRuleOperator } from './rule-operator.model';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { FieldDefinition } from '../form-builder/field-definition.model';\r\nimport { FieldConditionalLogicService, FormFieldActionValue, TargetFieldDefaultAttributeValue } from '../../services/field-conditional-logic.service';\r\nimport { FieldConditionalLogicActionNameEnum, FieldConditionalLogicTargetFieldDefaultAttrs } from './enums';\r\nimport { FormFieldUtil } from '../../utility-classes/form-field.util';\r\nimport { MultipleFieldsMetadataFieldType } from '../form-builder/form-field-types';\r\nimport { FormBuilderService } from '../../services/form-builder.service';\r\nimport { FormTemplateInstancesFieldType, GridFieldType } from '../form-builder/form-field-types';\r\n\r\nexport class MultipleFieldsMetadataFieldInfo {\r\n public constructor(public multipleFieldsMetadataField: FormField, public fieldAlreadExisted: boolean = false) {\r\n }\r\n}\r\n\r\nexport class CurrentRuleCondition {\r\n // Properties.\r\n public formTemplate: Form = null;\r\n\r\n public sourceFieldId: number = 0;\r\n public sourceFormField: FormField = null;\r\n\r\n public sourceFieldChildFieldId: number = 0; // Only used for grid source fields.\r\n public sourceFieldChildFieldName: string = ''; // Only used for grid source fields.\r\n //public sourceFieldChildField: FormField = null;\r\n public get sourceFieldChildField(): FormField {\r\n let childField: FormField = null;\r\n\r\n if (this.formTemplate != null) {\r\n let sourceField: FormField = this.formTemplate.formFields != null ? this.formTemplate.formFields.find(ff => ff.id == this.sourceFieldId) : null;\r\n\r\n if ((sourceField != null) && (sourceField.childFormFields != null)) {\r\n if ((this.sourceFieldChildFieldName != null) && (this.sourceFieldChildFieldName.trim() != '')) {\r\n childField = sourceField.childFormFields.find(cff => cff.name == this.sourceFieldChildFieldName);\r\n } else if (this.sourceFieldChildFieldId > 0) {\r\n childField = sourceField.childFormFields.find(cff => cff.id == this.sourceFieldChildFieldId);\r\n }\r\n }\r\n }\r\n\r\n return childField;\r\n }\r\n\r\n public comparisonOperator: string;\r\n public comparisonOperatorId: number = 0;\r\n\r\n public comparisonValue: string;\r\n\r\n // Constructor.\r\n public constructor(//private form: Form\r\n )\r\n {\r\n }\r\n\r\n // Static methods.\r\n public static createConditionFromRule(form: Form, metadataFauxFormFields: FormField[], rule: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[]): CurrentRuleCondition {\r\n let condition: CurrentRuleCondition = new CurrentRuleCondition();\r\n\r\n condition.sourceFieldId = rule.sourceFieldId;\r\n condition.sourceFormField = CurrentConditionalLogicRuleInfo.findFormFieldById(form, metadataFauxFormFields, rule.sourceFieldId);\r\n\r\n condition.sourceFieldChildFieldName = rule.sourceFieldChildFieldName;\r\n let sourceFormField: FormField = form.formFields != null ? form.formFields.find(ff => ff.id == rule.sourceFieldId) : null;\r\n if ((sourceFormField != null) && (rule.sourceFieldChildFieldName != null) && (rule.sourceFieldChildFieldName != '') && (sourceFormField.childFormFields != null)) {\r\n //condition.sourceFieldChildField = sourceFormField.childFormFields.find(cff => cff.name == rule.sourceFieldChildFieldName);\r\n let childField: FormField = sourceFormField.childFormFields.find(cff => cff.name == rule.sourceFieldChildFieldName);\r\n //if (condition.sourceFieldChildField != null)\r\n if (childField != null) {\r\n //condition.sourceFieldChildFieldId = condition.sourceFieldChildField.id;\r\n condition.sourceFieldChildFieldId = childField.id;\r\n }\r\n }\r\n\r\n let operator: ConditionalLogicRuleOperator = availableOperators.find(o => o.symbol == rule.operatorSymbol);\r\n condition.comparisonOperatorId = operator.id;\r\n condition.comparisonValue = rule.operandValue;\r\n\r\n return condition;\r\n }\r\n\r\n public clone(): CurrentRuleCondition {\r\n let myClone: CurrentRuleCondition = new CurrentRuleCondition();\r\n\r\n myClone.sourceFieldId = this.sourceFieldId;\r\n myClone.sourceFormField = this.sourceFormField;\r\n\r\n myClone.sourceFieldChildFieldId = this.sourceFieldChildFieldId;\r\n myClone.sourceFieldChildFieldName = this.sourceFieldChildFieldName;\r\n //myClone.sourceFieldChildField = this.sourceFieldChildField;\r\n\r\n myClone.comparisonOperatorId = this.comparisonOperatorId;\r\n myClone.comparisonOperator = this.comparisonOperator;\r\n\r\n myClone.comparisonValue = this.comparisonValue;\r\n\r\n return myClone;\r\n }\r\n}\r\n\r\nexport class CurrentRuleAction {\r\n // Properties.\r\n public id: number;\r\n\r\n //public targetFieldId: number = 0;\r\n //public targetFormField: FormField;\r\n public targetFieldIds: number[] = [];\r\n public targetFormFields: FormField[] = [];\r\n\r\n public fetchingChildFormFields: boolean = false;\r\n public availableChildFormFields: FormField[] = [];\r\n public childFormFieldId: number = 0;\r\n public childFieldName: string = null;\r\n public filterOperator: string;\r\n\r\n public targetFieldDefaultAttributes: string = FieldConditionalLogicTargetFieldDefaultAttrs.None;\r\n\r\n public targetFieldAction: string = FieldConditionalLogicActionNameEnum.NoAction;\r\n\r\n public conditions: CurrentRuleCondition[] = [];\r\n\r\n public existingRule: FormFieldExpression = null; // Used to keep track of an existing rule.\r\n public existingRuleActionIndex: number = -1;\r\n\r\n public requiresOperandValue: boolean = true;\r\n\r\n // Constructor.\r\n public constructor(private form: Form,\r\n targetFieldIds: number[] = [],\r\n targetFieldAction: string = FieldConditionalLogicActionNameEnum.NoAction,\r\n targetFieldDefaultAttributes: string = FieldConditionalLogicTargetFieldDefaultAttrs.None)\r\n {\r\n //this.targetFieldId = targetFieldId;\r\n this.targetFieldIds = targetFieldIds;\r\n this.targetFieldDefaultAttributes = targetFieldDefaultAttributes;\r\n this.targetFieldAction = targetFieldAction;\r\n }\r\n\r\n public clone(): CurrentRuleAction {\r\n let myClone: CurrentRuleAction = new CurrentRuleAction(this.form);\r\n\r\n myClone.id = this.id;\r\n //myClone.targetFieldId = this.targetFieldId;\r\n //myClone.targetFormField = this.targetFormField;\r\n myClone.targetFieldIds = this.targetFieldIds;\r\n myClone.targetFormFields = this.targetFormFields;\r\n myClone.targetFieldDefaultAttributes = this.targetFieldDefaultAttributes;\r\n myClone.targetFieldAction = this.targetFieldAction;\r\n myClone.existingRuleActionIndex = this.existingRuleActionIndex;\r\n\r\n myClone.childFormFieldId = this.childFormFieldId;\r\n myClone.availableChildFormFields = this.availableChildFormFields;\r\n myClone.childFieldName = this.childFieldName;\r\n myClone.filterOperator = this.filterOperator;\r\n\r\n myClone.conditions = [];\r\n for (let index: number = 0; index < this.conditions.length; index++) {\r\n let condition: CurrentRuleCondition = this.conditions[index];\r\n let conditionClone: CurrentRuleCondition = condition.clone();\r\n myClone.conditions.push(conditionClone);\r\n }\r\n\r\n return myClone;\r\n }\r\n\r\n public setNoDefaultAttributesToNull(): void {\r\n if (this.targetFieldDefaultAttributes == FieldConditionalLogicTargetFieldDefaultAttrs.None)\r\n this.targetFieldDefaultAttributes = null;\r\n }\r\n public createMultipleFieldsMetadataFieldIfApplicable(): MultipleFieldsMetadataFieldInfo { //FormField {\r\n //let multipleFieldsMetadataField: FormField = null;\r\n let multipleFieldsMetadataFieldInfo: MultipleFieldsMetadataFieldInfo = null;\r\n\r\n // Note: if multiple target fields are selected, we have to replace the fields with a single, multiple fields metadata field.\r\n if (this.targetFormFields.length > 1) {\r\n // Build the multiple field Id values property.\r\n let targetFieldIds: string = '';\r\n for (let index: number = 0; index < this.targetFormFields.length; index++) {\r\n let targetField: FormField = this.targetFormFields[index];\r\n if (index > 0)\r\n targetFieldIds += ',';\r\n targetFieldIds += targetField.id;\r\n }\r\n\r\n // Per VNEXT-1387, first see if there is an existing field that represents the specified target fields.\r\n let multipleFieldsMetadataField: FormField = this.form.formFields.find(ff => (ff.fieldDefinitionClassName == MultipleFieldsMetadataFieldType) && (ff.multipleFieldIds == targetFieldIds));\r\n\r\n if (multipleFieldsMetadataField == null) {\r\n // Create a new metadata field that represents multiple fields.\r\n multipleFieldsMetadataField = new FormField();\r\n multipleFieldsMetadataField.fieldDefinitionClassName = MultipleFieldsMetadataFieldType;\r\n\r\n multipleFieldsMetadataField.multipleFieldIds = targetFieldIds;\r\n\r\n // Set the metadata field as my target field.\r\n this.targetFieldIds = [multipleFieldsMetadataField.id]; // Note: this assignment is meaningless as the field Id will be zero at this point.\r\n this.targetFormFields = [multipleFieldsMetadataField];\r\n\r\n multipleFieldsMetadataFieldInfo = new MultipleFieldsMetadataFieldInfo(multipleFieldsMetadataField, false);\r\n } else {\r\n multipleFieldsMetadataFieldInfo = new MultipleFieldsMetadataFieldInfo(multipleFieldsMetadataField, true);\r\n }\r\n }\r\n\r\n //return multipleFieldsMetadataField;\r\n return multipleFieldsMetadataFieldInfo;\r\n }\r\n public expandMultipleFieldsMetadataFieldIfApplicable(form: Form): void {\r\n if ((this.targetFormFields != null) && (this.targetFormFields.length == 1) && (this.targetFormFields[0].fieldDefinitionClassName == MultipleFieldsMetadataFieldType)) {\r\n let formFieldIdTextValues: string[] = this.targetFormFields[0].multipleFieldIds.split(',');\r\n let formFields: FormField[] = [];\r\n let formFieldIds: number[] = [];\r\n\r\n for (let index: number = 0; index < formFieldIdTextValues.length; index++) {\r\n let formFieldId: number = parseInt(formFieldIdTextValues[index]);\r\n if (!isNaN(formFieldId)) {\r\n let formField: FormField = form.formFields.find(ff => ff.id == formFieldId);\r\n if (formField != null) {\r\n formFields.push(formField);\r\n formFieldIds.push(formField.id);\r\n }\r\n }\r\n }\r\n\r\n this.targetFormFields = formFields;\r\n this.targetFieldIds = formFieldIds;\r\n }\r\n }\r\n\r\n public static createFromSingleActionRule(form: Form, metadataFauxFormFields: FormField[], singleActionRule: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[], formBuilderService: FormBuilderService): CurrentRuleAction {\r\n let singleAction: FormFieldAction = singleActionRule.actions[0];\r\n\r\n let targetFieldIds: number[] = [singleAction.targetFieldId];\r\n //let ruleAction: CurrentRuleAction = new CurrentRuleAction(singleAction.targetFieldId, singleAction.actionName, singleAction.targetFormFieldDefaultAttributes);\r\n let ruleAction: CurrentRuleAction = new CurrentRuleAction(form, targetFieldIds, singleAction.actionName, singleAction.targetFormFieldDefaultAttributes);\r\n //ruleAction.targetFormField = CurrentConditionalLogicRuleInfo.findFormFieldById(form, metadataFauxFormFields, singleAction.targetFieldId);\r\n ruleAction.targetFormFields = CurrentConditionalLogicRuleInfo.findFormFieldsById(form, metadataFauxFormFields, [singleAction.targetFieldId]);\r\n ruleAction.childFieldName = singleAction.childFieldName;\r\n ruleAction.filterOperator = singleAction.filterOperator;\r\n\r\n if (ruleAction.targetFormFields.length == 1) {\r\n let targetFormField: FormField = ruleAction.targetFormFields[0];\r\n\r\n CurrentRuleAction.loadAdditionalTargetFieldAttributes(ruleAction, targetFormField, formBuilderService);\r\n }\r\n\r\n let condition: CurrentRuleCondition = new CurrentRuleCondition();\r\n condition.sourceFieldId = singleActionRule.sourceFieldId;\r\n condition.sourceFormField = CurrentConditionalLogicRuleInfo.findFormFieldById(form, metadataFauxFormFields, singleActionRule.sourceFieldId);\r\n\r\n condition.sourceFieldChildFieldName = singleActionRule.sourceFieldChildFieldName;\r\n if ((condition.sourceFieldChildFieldName != null) && (condition.sourceFieldChildFieldName.trim() != '')) {\r\n //condition.sourceFieldChildField = (condition.sourceFormField != null) && (condition.sourceFormField.childFormFields != null) ? condition.sourceFormField.childFormFields.find(cff => cff.name == condition.sourceFieldChildFieldName) : null;\r\n let childField: FormField = (condition.sourceFormField != null) && (condition.sourceFormField.childFormFields != null) ? condition.sourceFormField.childFormFields.find(cff => cff.name == condition.sourceFieldChildFieldName) : null;\r\n //if (condition.sourceFieldChildField != null)\r\n //condition.sourceFieldChildFieldId = condition.sourceFieldChildField.id;\r\n if (childField != null)\r\n condition.sourceFieldChildFieldId = childField.id;\r\n }\r\n\r\n let operator: ConditionalLogicRuleOperator = availableOperators.find(o => o.symbol == singleActionRule.operatorSymbol);\r\n condition.comparisonOperatorId = operator.id;\r\n condition.comparisonOperator = singleActionRule.operatorSymbol;\r\n\r\n condition.comparisonValue = singleActionRule.operandValue;\r\n\r\n ruleAction.conditions = [condition];\r\n\r\n return ruleAction;\r\n }\r\n\r\n // Methods.\r\n public editExistingRule(form: Form, existingRule: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[]): boolean {\r\n this.existingRule = existingRule;\r\n\r\n if ((existingRule.actions != null) && (existingRule.actions.length > 0)) {\r\n let action: FormFieldAction = existingRule.actions[0];\r\n //this.targetFieldId = action.targetFieldId;\r\n this.targetFieldIds = [action.targetFieldId];\r\n //this.targetFormField = CurrentConditionalLogicRuleInfo.findFormFieldByName(form, action.targetFieldName);\r\n let targetField: FormField = CurrentConditionalLogicRuleInfo.findFormFieldByName(form, action.targetFieldName);\r\n this.targetFormFields = [targetField];\r\n this.targetFieldAction = action.actionName;\r\n }\r\n\r\n let condition: CurrentRuleCondition = new CurrentRuleCondition();\r\n condition.sourceFieldId = existingRule.sourceFieldId;\r\n condition.sourceFormField = CurrentConditionalLogicRuleInfo.findFormFieldByName(form, existingRule.sourceFieldName);\r\n let comparisonOperator: ConditionalLogicRuleOperator = availableOperators.find(o => o.symbol == existingRule.operatorSymbol);\r\n condition.comparisonOperatorId = comparisonOperator.id;\r\n condition.comparisonValue = existingRule.operandValue;\r\n this.conditions = [condition];\r\n\r\n return true;\r\n }\r\n public editExistingRuleAction(form: Form, existingRuleAction: CurrentRuleAction, availableOperators: ConditionalLogicRuleOperator[], formBuilderService: FormBuilderService): boolean {\r\n //this.targetFieldId = existingRuleAction.targetFieldId;\r\n //this.targetFormField = existingRuleAction.targetFormField;\r\n this.targetFieldIds = existingRuleAction.targetFieldIds;\r\n this.targetFormFields = existingRuleAction.targetFormFields;\r\n this.childFieldName = existingRuleAction.childFieldName;\r\n if ((this.childFieldName != null) && (this.childFieldName.trim() != '')) {\r\n if (this.targetFormFields.length == 1) {\r\n let loneTargetField: FormField = this.targetFormFields[0];\r\n\r\n if ((loneTargetField.fieldDefinitionClassName == GridFieldType) && (loneTargetField.childFormFields != null)) {\r\n let childFormField: FormField = loneTargetField.childFormFields.find(cff => cff.name == this.childFieldName);\r\n if (childFormField != null)\r\n this.childFormFieldId = childFormField.id;\r\n } else if (loneTargetField.fieldDefinitionClassName == FormTemplateInstancesFieldType) {\r\n // Note: this condition would require a request to the server, something this logic is not presently handling.\r\n //\r\n // The field conditional logic should handle getting the necessary information from the server.\r\n }\r\n }\r\n }\r\n this.filterOperator = existingRuleAction.filterOperator;\r\n\r\n if (this.targetFormFields.length == 1) {\r\n let targetFormField: FormField = this.targetFormFields[0];\r\n\r\n CurrentRuleAction.loadAdditionalTargetFieldAttributes(this, targetFormField, formBuilderService);\r\n }\r\n\r\n this.targetFieldDefaultAttributes = existingRuleAction.targetFieldDefaultAttributes;\r\n if ((this.targetFieldDefaultAttributes == null) || (this.targetFieldDefaultAttributes == ''))\r\n this.targetFieldDefaultAttributes = FieldConditionalLogicTargetFieldDefaultAttrs.None;\r\n\r\n this.targetFieldAction = existingRuleAction.targetFieldAction;\r\n\r\n this.conditions = existingRuleAction.conditions;\r\n if (this.conditions.length > 0) {\r\n for (let index: number = 0; index < this.conditions.length; index++) {\r\n let condition: CurrentRuleCondition = this.conditions[index];\r\n\r\n if ((condition.sourceFieldChildFieldName != null) && (condition.sourceFieldChildFieldName.trim() != null)) {\r\n //condition.sourceFieldChildField = (condition.sourceFormField != null) && (condition.sourceFormField.childFormFields != null) ? condition.sourceFormField.childFormFields.find(cff => cff.name == condition.sourceFieldChildFieldName) : null;\r\n let childField: FormField = (condition.sourceFormField != null) && (condition.sourceFormField.childFormFields != null) ? condition.sourceFormField.childFormFields.find(cff => cff.name == condition.sourceFieldChildFieldName) : null;\r\n //if (condition.sourceFieldChildField != null)\r\n // condition.sourceFieldChildFieldId = condition.sourceFieldChildField.id;\r\n if (childField != null)\r\n condition.sourceFieldChildFieldId = childField.id;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n private static loadAdditionalTargetFieldAttributes(currentRuleAction: CurrentRuleAction, targetFormField: FormField, formBuilderService: FormBuilderService): void {\r\n if ((targetFormField.fieldDefinitionClassName == FormTemplateInstancesFieldType) && (targetFormField.formTemplateId != null)) {\r\n formBuilderService.get(targetFormField.formTemplateId).then(formTemplate => {\r\n if (formTemplate.formFields != null) {\r\n currentRuleAction.availableChildFormFields = formTemplate.formFields;\r\n let childFormField: FormField = currentRuleAction.availableChildFormFields.find(ff => ff.name == currentRuleAction.childFieldName);\r\n if (childFormField != null) {\r\n currentRuleAction.childFormFieldId = childFormField.id;\r\n }\r\n }\r\n });\r\n }\r\n\r\n }\r\n public copyToExistingRuleAndNewRulesAsNeeded(form: Form, metadataFauxFormFields: FormField[], formFieldExpression: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[], numExistingConditionalLogicRules: number): FormFieldExpression[] {\r\n let newRules: FormFieldExpression[] = [];\r\n\r\n for (let conditionIndex: number = 0; conditionIndex < this.conditions.length; conditionIndex++) {\r\n let condition: CurrentRuleCondition = this.conditions[conditionIndex];\r\n\r\n let currentExpression: FormFieldExpression = (conditionIndex == 0) && (formFieldExpression != null) ? formFieldExpression : new FormFieldExpression();\r\n\r\n this.copyConditionInfo(form, metadataFauxFormFields, currentExpression, condition, availableOperators);\r\n let formFieldAction: FormFieldAction = new FormFieldAction();\r\n\r\n let multipleFieldsMetadataFieldInfo: MultipleFieldsMetadataFieldInfo = this.createMultipleFieldsMetadataFieldIfApplicable();\r\n //let targetFormField: FormField = this.targetFormFields[0];\r\n let targetFormField: FormField = multipleFieldsMetadataFieldInfo != null ? multipleFieldsMetadataFieldInfo.multipleFieldsMetadataField : this.targetFormFields[0];\r\n\r\n formFieldAction.targetFieldId = targetFormField.id;\r\n formFieldAction.targetFieldName = targetFormField.name;\r\n formFieldAction.childFieldName = this.childFieldName;\r\n formFieldAction.filterOperator = this.filterOperator;\r\n formFieldAction.targetFormFieldDefaultAttributes = this.targetFieldDefaultAttributes;\r\n formFieldAction.actionName = this.targetFieldAction;\r\n currentExpression.actions = [formFieldAction];\r\n\r\n if ((conditionIndex > 0) || (formFieldExpression == null))\r\n newRules.push(currentExpression);\r\n }\r\n\r\n // Reset my data to default values.\r\n this.resetToDefaults();\r\n\r\n return newRules;\r\n }\r\n public packageRuleAndResetToDefaults(form: Form, metadataFauxFormFields: FormField[], availableOperators: ConditionalLogicRuleOperator[], numExistingConditionalLogicRules: number): FormFieldExpression[] {\r\n let packagedFieldExprs: FormFieldExpression[] = [];\r\n\r\n //if ((this.targetFieldId != 0) && (this.targetFieldAction != FieldConditionalLogicActionNameEnum.NoAction) && this.RuleConditionsValid) {\r\n if ((this.targetFieldIds.length != 0) && (this.targetFieldAction != FieldConditionalLogicActionNameEnum.NoAction) && this.RuleConditionsValid) {\r\n for (let index: number = 0; index < this.conditions.length; index++) {\r\n let condition: CurrentRuleCondition = this.conditions[index];\r\n\r\n let fieldExpr: FormFieldExpression = new FormFieldExpression();\r\n this.copyConditionInfo(form, metadataFauxFormFields, fieldExpr, condition, availableOperators);\r\n\r\n this.copyBasicRuleInfo(fieldExpr, availableOperators);\r\n\r\n packagedFieldExprs.push(fieldExpr);\r\n }\r\n }\r\n\r\n // Reset my data to default values.\r\n this.resetToDefaults();\r\n\r\n return packagedFieldExprs;\r\n }\r\n public get RuleConditionsValid(): boolean {\r\n let valid: boolean = false;\r\n\r\n if (this.conditions.length > 0) {\r\n valid = true; // For the moment, but we'll continue checking.\r\n\r\n for (let index: number = 0; index < this.conditions.length; index++) {\r\n let ruleCondition: CurrentRuleCondition = this.conditions[index];\r\n\r\n // First check to see if we have a source field and a valid operator.\r\n if ((ruleCondition.sourceFormField == null) || (ruleCondition.comparisonOperatorId == 0)) {\r\n // If this operator requires a value, check to see if any value has been entered.\r\n if (this.requiresOperandValue) {\r\n if ((ruleCondition.comparisonValue == null) || (ruleCondition.comparisonValue.trim() == '')) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return valid;\r\n }\r\n\r\n // Helper methods.\r\n private copyBasicRuleInfo(formFieldExpression: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[]): void {\r\n let fieldAction: FormFieldAction = new FormFieldAction();\r\n let targetFormField: FormField = this.targetFormFields[0];\r\n //fieldAction.targetFieldId = this.targetFieldId;\r\n //fieldAction.targetFieldName = this.targetFormField.name;\r\n fieldAction.targetFieldId = targetFormField.id;\r\n fieldAction.targetFieldName = targetFormField.name;\r\n fieldAction.actionName = this.targetFieldAction;\r\n formFieldExpression.actions = [fieldAction];\r\n }\r\n private copyConditionInfo(form: Form, metadataFauxFormFields: FormField[], fieldExpr: FormFieldExpression, condition: CurrentRuleCondition, availableOperators: ConditionalLogicRuleOperator[]): void {\r\n fieldExpr.sourceFieldId = condition.sourceFieldId;\r\n let sourceFormField: FormField = CurrentConditionalLogicRuleInfo.findFormFieldById(form, metadataFauxFormFields, fieldExpr.sourceFieldId);\r\n fieldExpr.sourceFieldName = sourceFormField.name;\r\n\r\n fieldExpr.sourceFieldChildFieldName = condition.sourceFieldChildFieldName;\r\n\r\n let operatorInfo: ConditionalLogicRuleOperator = availableOperators.find(op => op.id == condition.comparisonOperatorId);\r\n fieldExpr.operandValue = operatorInfo.name;\r\n fieldExpr.operatorSymbol = operatorInfo.symbol;\r\n\r\n fieldExpr.operandValue = condition.comparisonValue;\r\n }\r\n private processConditions(formFieldExpression: FormFieldExpression): void {\r\n // Note: this method is presently a NOOP by design.\r\n }\r\n\r\n public resetToDefaults(): void {\r\n this.targetFieldIds = []\r\n this.targetFormFields = [];\r\n\r\n this.fetchingChildFormFields = false;\r\n this.availableChildFormFields = [];\r\n this.childFormFieldId = 0;\r\n this.childFieldName = null;\r\n this.filterOperator = null;\r\n\r\n //this.targetFieldDefaultAttributes = FieldConditionalLogicTargetFieldDefaultAttrs.None;\r\n\r\n this.targetFieldAction = FieldConditionalLogicActionNameEnum.NoAction;\r\n\r\n this.conditions = [];\r\n\r\n this.existingRule = null;\r\n this.existingRuleActionIndex = -1;\r\n\r\n this.requiresOperandValue = true;\r\n }\r\n}\r\n\r\nexport class CurrentConditionalLogicRuleInfo {\r\n public sourceFieldId: number = 0;\r\n public sourceFormField: FormField;\r\n\r\n public comparisonOperatorId: number = 0;\r\n\r\n public comparisonValue: string;\r\n\r\n public currentRuleActions: CurrentRuleAction[] = [];\r\n\r\n public existingRule: FormFieldExpression = null;\r\n\r\n public get RuleActionsValid(): boolean {\r\n let valid: boolean = false;\r\n\r\n if (this.currentRuleActions.length > 0) {\r\n valid = true; // For the moment, but we'll continue checking.\r\n\r\n for (let index: number = 0; index < this.currentRuleActions.length; index++) {\r\n let ruleAction: CurrentRuleAction = this.currentRuleActions[index];\r\n\r\n //if ((ruleAction.targetFormField == null) || (ruleAction.targetFieldAction == FieldConditionalLogicActionNameEnum.NoAction)) {\r\n if ((ruleAction.targetFormFields.length == 0) || (ruleAction.targetFieldAction == FieldConditionalLogicActionNameEnum.NoAction)) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return valid;\r\n }\r\n\r\n public packageRuleAndResetToDefaults(availableOperators: ConditionalLogicRuleOperator[], numExistingConditionalLogicRules: number): FormFieldExpression {\r\n let formFieldExpression: FormFieldExpression = new FormFieldExpression();\r\n\r\n // Package the current rule.\r\n this.copyBasicRuleInfo(formFieldExpression, availableOperators);\r\n formFieldExpression.expressionOrder = numExistingConditionalLogicRules;\r\n\r\n // Process actions.\r\n this.processActions(formFieldExpression);\r\n\r\n // Reset the current rule to default values.\r\n this.resetToDefaults()\r\n\r\n // Return the packaged rule.\r\n return formFieldExpression;\r\n }\r\n\r\n public copyToExistingRuleAndResetToDefaults(formFieldExpression: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[], numExistingConditionalLogicRules: number): void {\r\n // Package the current rule.\r\n this.copyBasicRuleInfo(formFieldExpression, availableOperators);\r\n\r\n // Process actions.\r\n this.processActions(formFieldExpression);\r\n\r\n // Reset the current rule to default values.\r\n this.resetToDefaults()\r\n }\r\n\r\n public editExistingRule(form: Form, existingRule: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[]): boolean {\r\n this.existingRule = existingRule;\r\n\r\n let sourceField: FormField = CurrentConditionalLogicRuleInfo.findFormFieldByName(form, existingRule.sourceFieldName);\r\n this.sourceFieldId = sourceField.id;\r\n this.sourceFormField = sourceField;\r\n\r\n let operatorInfo: ConditionalLogicRuleOperator = availableOperators.find(op => op.symbol == existingRule.operatorSymbol);\r\n this.comparisonOperatorId = operatorInfo.id;\r\n\r\n this.comparisonValue = existingRule.operandValue;\r\n\r\n this.currentRuleActions = [];\r\n if (existingRule.actions != null) {\r\n for (let index: number = 0; index < existingRule.actions.length; index++) {\r\n let formFieldAction: FormFieldAction = existingRule.actions[index];\r\n\r\n let ruleAction: CurrentRuleAction = new CurrentRuleAction(form);\r\n\r\n let targetField: FormField = CurrentConditionalLogicRuleInfo.findFormFieldByName(form, formFieldAction.targetFieldName);\r\n //ruleAction.targetFieldId = targetField.id;\r\n //ruleAction.targetFormField = targetField;\r\n ruleAction.targetFieldIds = [targetField.id];\r\n ruleAction.targetFormFields = [targetField];\r\n\r\n ruleAction.targetFieldDefaultAttributes = formFieldAction.targetFormFieldDefaultAttributes;\r\n\r\n ruleAction.targetFieldAction = CurrentConditionalLogicRuleInfo.modelActionValueToDisplayValues(formFieldAction.actionName);\r\n\r\n this.currentRuleActions.push(ruleAction);\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public static findFormFieldByName(form: Form, fieldName: string): FormField {\r\n let formField: FormField = form.formFields.find(ff => (ff.name == fieldName) && (!ff.isDeleted));\r\n return formField;\r\n }\r\n public static findFormFieldById(form: Form, metadataFauxFormFields: FormField[], fieldId: number): FormField {\r\n let formField: FormField = null;\r\n if (fieldId > 0) {\r\n // This is an ordinary form field.\r\n formField = form.formFields.find(ff => ff.id == fieldId);\r\n } else {\r\n // This is a metadata faux form field.\r\n formField = metadataFauxFormFields.find(ff => ff.id == fieldId);\r\n }\r\n\r\n if (formField == null)\r\n throw `findFormFieldById(): cannot find a form field with id value ${fieldId}.`\r\n\r\n return formField;\r\n }\r\n public static findFormFieldsById(form: Form, metadataFauxFormFields: FormField[], fieldIds: number[]): FormField[] {\r\n let formFields: FormField[] = [];\r\n\r\n for (let index: number = 0; index < fieldIds.length; index++) {\r\n let fieldId: number = fieldIds[index];\r\n let formField: FormField = CurrentConditionalLogicRuleInfo.findFormFieldById(form, metadataFauxFormFields, fieldId);\r\n if (formField != null)\r\n formFields.push(formField);\r\n }\r\n\r\n return formFields;\r\n }\r\n public static filterFormFieldsExceptField(form: Form, fieldName: string): FormField[] {\r\n let formFields: FormField[] = form.formFields.filter(ff => (ff.name != fieldName) && (!ff.isDeleted));\r\n return formFields;\r\n }\r\n\r\n // Helper methods.\r\n private copyBasicRuleInfo(formFieldExpression: FormFieldExpression, availableOperators: ConditionalLogicRuleOperator[]): void {\r\n formFieldExpression.sourceFieldName = this.sourceFormField.name;\r\n formFieldExpression.sourceFieldId = 0; // Will be assigned by the server.\r\n\r\n let operatorInfo: ConditionalLogicRuleOperator = availableOperators.find(op => op.id == this.comparisonOperatorId);\r\n formFieldExpression.operandValue = operatorInfo.name;\r\n formFieldExpression.operatorSymbol = operatorInfo.symbol;\r\n\r\n formFieldExpression.operandValue = this.comparisonValue;\r\n }\r\n\r\n private processActions(formFieldExpression: FormFieldExpression): void {\r\n formFieldExpression.actions = [];\r\n for (let index: number = 0; index < this.currentRuleActions.length; index++) {\r\n let ruleAction: CurrentRuleAction = this.currentRuleActions[index];\r\n\r\n let formFieldAction: FormFieldAction = new FormFieldAction();\r\n let targetFormField: FormField = ruleAction.targetFormFields[0];\r\n //formFieldAction.targetFieldName = ruleAction.targetFormField.name;\r\n formFieldAction.targetFieldName = targetFormField.name;\r\n formFieldAction.targetFieldId = 0; // Will be assigned by the server.\r\n\r\n formFieldAction.actionName = CurrentConditionalLogicRuleInfo.displayFieldActionToModelValue(ruleAction.targetFieldAction);\r\n\r\n formFieldAction.actionOrder = index;\r\n\r\n formFieldExpression.actions.push(formFieldAction);\r\n }\r\n }\r\n\r\n private resetToDefaults(): void {\r\n this.sourceFieldId = 0;\r\n this.sourceFormField = null;\r\n\r\n this.comparisonOperatorId = 0;\r\n\r\n this.comparisonValue = '';\r\n\r\n this.currentRuleActions = [];\r\n\r\n this.existingRule = null;\r\n }\r\n\r\n private static displayFieldActionToModelValue(displayFieldAction: string): string {\r\n let modelActionValue: string = displayFieldAction.replace(/, /g, '|');\r\n return modelActionValue;\r\n }\r\n private static modelActionValueToDisplayValues(modelActionValue: string): string {\r\n let displayActionValue: string = modelActionValue.replace(/\\|/g, ', ');\r\n return displayActionValue;\r\n }\r\n}\r\n\r\nexport interface IRulesByTargetFieldIdAndAction {\r\n [targetIdAndActionKey: string]: CurrentRuleAction;\r\n}\r\n\r\nexport class AllCurrentRuleActions {\r\n // Instance data.\r\n private ruleActions: CurrentRuleAction[] = [];\r\n private fieldConditionalLogicService: FieldConditionalLogicService = null;\r\n\r\n // Constructor.\r\n public constructor(fieldConditionalLogicService: FieldConditionalLogicService) {\r\n this.fieldConditionalLogicService = fieldConditionalLogicService;\r\n }\r\n\r\n public setRuleActions(ruleActions: CurrentRuleAction[]): void {\r\n this.ruleActions = ruleActions;\r\n this.sortByTargetFieldAndActionPrecedence();\r\n }\r\n public getRuleActions(): CurrentRuleAction[] {\r\n return this.ruleActions;\r\n }\r\n public removeAllRuleActions(): void {\r\n this.ruleActions = [];\r\n }\r\n\r\n public addRuleAction(ruleAction: CurrentRuleAction): void {\r\n this.ruleActions.push(ruleAction);\r\n this.sortByTargetFieldAndActionPrecedence();\r\n }\r\n public getExistingRuleIndex(existingRule: CurrentRuleAction): number {\r\n let ruleIndex: number = 0;\r\n while ((this.ruleActions[ruleIndex] != existingRule) && (ruleIndex < this.ruleActions.length))\r\n ruleIndex++;\r\n\r\n if (this.ruleActions[ruleIndex] != existingRule)\r\n ruleIndex = -1;\r\n\r\n return ruleIndex;\r\n }\r\n public replaceRuleAction(indexOfRuleToReplace: number, ruleAction: CurrentRuleAction): boolean {\r\n let success: boolean = false;\r\n\r\n if (indexOfRuleToReplace < this.ruleActions.length) {\r\n this.ruleActions.splice(indexOfRuleToReplace, 1, ruleAction);\r\n success = true;\r\n }\r\n\r\n this.sortByTargetFieldAndActionPrecedence();\r\n\r\n return success;\r\n }\r\n public removeRuleAction(ruleAction: CurrentRuleAction): boolean {\r\n let numActions: number = this.ruleActions.length;\r\n this.ruleActions = this.ruleActions.filter(ra => ra != ruleAction);\r\n\r\n this.sortByTargetFieldAndActionPrecedence();\r\n\r\n return numActions != this.ruleActions.length;\r\n }\r\n\r\n // Methods.\r\n public sortByTargetFieldAndActionPrecedence(): void {\r\n this.ruleActions.sort(this.doSortByTargetFieldAndActionPrecedence);\r\n }\r\n\r\n public convertToFormFieldExpressions(form: Form, metadataFauxFormFields: FormField[], availableOperators: ConditionalLogicRuleOperator[]): FormFieldExpression[] {\r\n let existingRulesCopy: FormFieldExpression[] = (form.conditionalLogicRules != null) && (form.conditionalLogicRules.length > 0) ? form.conditionalLogicRules.slice() : []; // Copy all existing rules.\r\n\r\n let convertedRules: FormFieldExpression[] = [];\r\n\r\n for (let ruleIndex: number = 0; ruleIndex < this.ruleActions.length; ruleIndex++) {\r\n let ruleAction: CurrentRuleAction = this.ruleActions[ruleIndex];\r\n\r\n // Is there an existing form field expression with this rule's first condition?\r\n let firstCondition: CurrentRuleCondition = ruleAction.conditions[0];\r\n let conditionOperator: ConditionalLogicRuleOperator = availableOperators.find(o => o.id == firstCondition.comparisonOperatorId);\r\n let existingRuleCopy: FormFieldExpression = existingRulesCopy.find(r => (r.sourceFieldName == firstCondition.sourceFormField.name) && (r.operatorSymbol == conditionOperator.symbol) && (r.operandValue == firstCondition.comparisonValue));\r\n if (existingRuleCopy != null) {\r\n existingRuleCopy.applyTargetFieldDefaultAttributesToActions(ruleAction.targetFieldDefaultAttributes);\r\n convertedRules.push(existingRuleCopy);\r\n existingRulesCopy = existingRulesCopy.filter(r => r != existingRuleCopy); // Don't use this expression more than once.\r\n }\r\n let additionalFormFieldExpressions: FormFieldExpression[] = ruleAction.copyToExistingRuleAndNewRulesAsNeeded(form, metadataFauxFormFields, existingRuleCopy, availableOperators, existingRulesCopy.length);\r\n\r\n for (let exprIndex: number = 0; exprIndex < additionalFormFieldExpressions.length; exprIndex++) {\r\n let convertedRule: FormFieldExpression = additionalFormFieldExpressions[exprIndex];\r\n convertedRule.applyTargetFieldDefaultAttributesToActions(ruleAction.targetFieldDefaultAttributes);\r\n convertedRules.push(convertedRule);\r\n }\r\n }\r\n\r\n // Finally, return the converted rule.\r\n return convertedRules;\r\n }\r\n\r\n public addAnyUsedMetadataFieldsNotYetInForm(form: Form, metadataFauxFormFields: FormField[]): number {\r\n let numMetadataFields: number = 0;\r\n\r\n // Are there any metadata fields used in expressions that are not yet part of the form?\r\n for (let exprIndex: number = 0; exprIndex < form.conditionalLogicRules.length; exprIndex++) {\r\n let expr: FormFieldExpression = form.conditionalLogicRules[exprIndex];\r\n if (expr.sourceFieldId < 0) {\r\n numMetadataFields++;\r\n\r\n let metadataFauxFormField: FormField = metadataFauxFormFields.find(ff => ff.id == expr.sourceFieldId);\r\n if (metadataFauxFormField == null)\r\n throw `AllCurrentRuleActions.convertToFormFieldExpressions(): cannot find a metadata field with id value ${expr.sourceFieldId}.`;\r\n\r\n let existingFormField: FormField = form.formFields.find(ff => ff.fieldDefinitionClassName == metadataFauxFormField.fieldDefinitionClassName);\r\n if (existingFormField == null) {\r\n let metadataFormField: FormField = new FormField();\r\n metadataFormField.isMetadataField = true;\r\n metadataFormField.id = 0; // Will save a new form field.\r\n metadataFormField.name = metadataFauxFormField.fieldDefinitionClassName;\r\n metadataFormField.displayName = metadataFauxFormField.displayName;\r\n metadataFormField.fieldDefinitionClassName = metadataFauxFormField.fieldDefinitionClassName;\r\n form.formFields.push(metadataFormField);\r\n }\r\n }\r\n }\r\n\r\n return numMetadataFields;\r\n }\r\n\r\n // Helper methods.\r\n private static doSortByTargetFieldAscending(ruleAction1: CurrentRuleAction, ruleAction2: CurrentRuleAction): number {\r\n let targetFormField1: FormField = ruleAction1.targetFormFields[0];\r\n let targetFormField2: FormField = ruleAction2.targetFormFields[0];\r\n //let targetField1Name: string = FormFieldUtil.getFieldName(ruleAction1.targetFormField);\r\n //let targetField2Name: string = FormFieldUtil.getFieldName(ruleAction2.targetFormField);\r\n let targetField1Name: string = FormFieldUtil.getFieldName(targetFormField1);\r\n let targetField2Name: string = FormFieldUtil.getFieldName(targetFormField2);\r\n\r\n let iCompare: number = targetField1Name.localeCompare(targetField2Name);\r\n\r\n return iCompare;\r\n }\r\n private doSortByTargetFieldAndActionPrecedence(ruleAction1: CurrentRuleAction, ruleAction2: CurrentRuleAction): number {\r\n let targetFormField1: FormField = ruleAction1.targetFormFields[0];\r\n let targetFormField2: FormField = ruleAction2.targetFormFields[0];\r\n //let targetField1Name: string = FormFieldUtil.getFieldName(ruleAction1.targetFormField);\r\n //let targetField2Name: string = FormFieldUtil.getFieldName(ruleAction2.targetFormField);\r\n let targetField1Name: string = FormFieldUtil.getFieldName(targetFormField1);\r\n let targetField2Name: string = FormFieldUtil.getFieldName(targetFormField2);\r\n\r\n let iCompare: number = targetField1Name.localeCompare(targetField2Name);\r\n\r\n if (iCompare == null)\r\n iCompare = this.fieldConditionalLogicService.compareFieldActions(ruleAction1.targetFieldAction, ruleAction2.targetFieldAction);\r\n\r\n return iCompare;\r\n }\r\n}\r\n\r\nexport class AllFieldInfo {\r\n private formFields: FormField[] = null;\r\n private metadataFieldDefs: FieldDefinition[] = null;\r\n private metadataFauxFormFields: FormField[] = null;\r\n private allFieldsSorted: FormField[] = null;\r\n\r\n public constructor(formFields: FormField[], metadataFields: FieldDefinition[]) {\r\n // Note: need to make sure we make array copies; otherwise, manipulating these arrays can modified the form's form fields.\r\n this.formFields = [];\r\n for (let index: number = 0; index < formFields.length; index++)\r\n this.formFields.push(formFields[index])\r\n this.metadataFieldDefs = [];\r\n for (let index: number = 0; index < metadataFields.length; index++)\r\n this.metadataFieldDefs.push(metadataFields[index]);\r\n }\r\n\r\n // Methods.\r\n public get AllFieldsSortedByNameAscending(): FormField[] {\r\n if (this.allFieldsSorted == null) {\r\n let fauxMetadataFields: FormField[] = this.metadataFieldsAsFauxFormFields();\r\n this.allFieldsSorted = this.formFields;\r\n for (let index: number = 0; index < fauxMetadataFields.length; index++) {\r\n let fauxMetadataField: FormField = fauxMetadataFields[index];\r\n let existingMetadataField: FormField = this.allFieldsSorted.find(ff => ff.fieldDefinitionClassName == fauxMetadataField.fieldDefinitionClassName);\r\n if (existingMetadataField == null)\r\n this.allFieldsSorted.push(fauxMetadataField);\r\n }\r\n this.allFieldsSorted.sort(AllFieldInfo.doSortFieldsByNameAscending);\r\n }\r\n\r\n return this.allFieldsSorted;\r\n }\r\n\r\n public metadataFieldsAsFauxFormFields(): FormField[] {\r\n if (this.metadataFauxFormFields == null) {\r\n this.metadataFauxFormFields = [];\r\n let sortedFieldDefs: FieldDefinition[] = this.metadataFieldDefs.sort(AllFieldInfo.doSortFieldDefsByNameAscending);\r\n\r\n let fauxFormFieldId: number = -1;\r\n for (let index: number = 0; index < sortedFieldDefs.length; index++) {\r\n let metadataField: FieldDefinition = sortedFieldDefs[index];\r\n\r\n let fauxFormField: FormField = new FormField();\r\n fauxFormField.isMetadataField = true;\r\n fauxFormField.id = fauxFormFieldId--;\r\n fauxFormField.name = metadataField.fieldDefinitionClassName;\r\n fauxFormField.displayName = metadataField.displayName;\r\n fauxFormField.fieldDefinitionClassName = metadataField.fieldDefinitionClassName;\r\n\r\n this.metadataFauxFormFields.push(fauxFormField);\r\n }\r\n }\r\n\r\n return this.metadataFauxFormFields;\r\n }\r\n public metadataFauxFormFieldNames(): string[] {\r\n let fauxFormFields: FormField[] = this.metadataFieldsAsFauxFormFields();\r\n let fauxFormFieldNames: string[] = fauxFormFields.map(ff => ff.displayName);\r\n return fauxFormFieldNames;\r\n }\r\n\r\n // Helper methods.\r\n private static doSortFieldsByNameAscending(formField1: FormField, formField2: FormField): number {\r\n let fieldName1: string = FormFieldUtil.getFieldName(formField1);\r\n let fieldName2: string = FormFieldUtil.getFieldName(formField2);\r\n\r\n let iCompare: number = fieldName1.localeCompare(fieldName2);\r\n\r\n return iCompare;\r\n }\r\n\r\n private static doSortFieldDefsByNameAscending(fieldDef1: FieldDefinition, fieldDef2: FieldDefinition): number {\r\n let iCompare: number = fieldDef1.displayName.localeCompare(fieldDef2.displayName);\r\n return iCompare;\r\n }\r\n}\r\n","\r\n// Export action names.\r\nexport enum FormFieldActionNameEnum {\r\n Show = 'Show',\r\n Hide = 'Hide',\r\n Require = 'Require',\r\n DoNotRequire = 'Do not require',\r\n};\r\n\r\n// Define an enumeration for the form field actions available with the new, enhanced field conditional logic.\r\nexport enum FieldConditionalLogicActionNameEnum {\r\n NoAction = '-- Select Action --',\r\n\r\n Show = 'Show',\r\n CanEdit = 'Can Edit',\r\n Require = 'Require',\r\n\r\n ApplyFilter = 'ApplyFilter',\r\n\r\n // Combinations:\r\n Show_CanEdit = 'Show, Can Edit',\r\n Show_CanEdit_Require = 'Show, Can Edit, Require'\r\n}\r\nexport enum FieldConditionalLogicTargetFieldDefaultAttrs {\r\n None = 'None',\r\n\r\n Show = 'Show',\r\n Show_CanEdit = 'Show, Can Edit'\r\n}\r\nexport enum FieldConditionalLogicActionPrecendencEnum {\r\n Show_CanEdit_Require = 1,\r\n Show_CanEdit = 2,\r\n\r\n Show = 3,\r\n CanEdit = 4,\r\n Require = 5\r\n}\r\n\r\n// Export comparison operator symbols.\r\nexport enum FormFieldComparisonOperatorNameEnum {\r\n IsGreaterThan = '>',\r\n IsGreaterThanOrEqualTo = '>=',\r\n Equals = '=',\r\n DoesNotEqual = '<>',\r\n IsLessThan = '<',\r\n IsLessThanOrEqualTo = '<=',\r\n InListOfValues = 'In',\r\n NotInListOfValues = 'NotIn',\r\n StartsWith = 'StartsWith',\r\n EndsWith = 'EndsWith',\r\n Contains = 'Contains',\r\n IsEmpty = 'IsEmpty',\r\n IsNotEmpty = 'IsNotEmpty',\r\n //Between = 'Between'\r\n} \r\n\r\nexport enum FormFieldActionGuidanceEnum {\r\n ApplyAction = 'ApplyAction',\r\n RemoveAction = 'RemoveAction'\r\n};\r\n","//import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\n\r\n//export class FormConditionalLogicAction {\r\nexport class FormFieldAction implements IViewModel, ICloneAndCopy {\r\n // Instance data.\r\n public id: number = 0;\r\n\r\n //public targetFieldClientId: number = 0; // This can be ignored by the server.\r\n public targetFieldId: number = 0;\r\n public targetFieldName: string = null; // Must be the internal form field name, not the display name.\r\n public childFieldName: string; // 06-25-2024: added this property.\r\n public filterOperator: string; // 06-25-2024: added this property.\r\n\r\n public targetFormFieldDefaultAttributes: string = null; // Added 03-04-2024.\r\n\r\n public actionName: string;\r\n\r\n public actionOrder: number = 0;\r\n\r\n // Constructor.\r\n public constructor(idParam: number = 0) {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldAction = new FormFieldAction();\r\n\r\n FormFieldAction.copyPropertiesFromTo(this, clone);\r\n\r\n return (clone);\r\n }\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let actionToCopy: FormFieldAction = objectToCopy;\r\n\r\n FormFieldAction.copyPropertiesFromTo(actionToCopy, this);\r\n\r\n return;\r\n }\r\n\r\n // Helper methods.\r\n private static copyPropertiesFromTo(fromAction: FormFieldAction, toAction: FormFieldAction): void {\r\n toAction.id = fromAction.id;\r\n\r\n //toAction.targetFieldClientId = fromAction.targetFieldClientId;\r\n toAction.targetFieldId = fromAction.targetFieldId;\r\n toAction.targetFieldName = fromAction.targetFieldName;\r\n\r\n toAction.actionName = fromAction.actionName;\r\n toAction.actionOrder = fromAction.actionOrder;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../form-builder/form-instance-element.model';\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\nimport { FormFieldAction } from './form-field-action.model';\r\nimport { FieldDefinition } from '../../models/form-builder/field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinitionService } from '../../services/field-definition.service';\r\nimport { Form } from '../../models/form-builder/form.model';\r\n\r\n// Define classes used to define static data.\r\nclass FieldDefinitionClassNameToValueTypeData {\r\n public fieldDefinitionClassName: string;\r\n public valueType: string;\r\n public comparisonValueType: string;\r\n public formInstanceElementPropertyName: string;\r\n public valueConversionFunction: (a) => any;\r\n\r\n public constructor(fieldDefinitionClassName: string, valueType: string, comparisonValueType: string, formInstanceElementPropertyName: string, valueConversionFunction: (a) => any) {\r\n this.fieldDefinitionClassName = fieldDefinitionClassName;\r\n this.valueType = valueType;\r\n this.comparisonValueType = comparisonValueType;\r\n this.formInstanceElementPropertyName = formInstanceElementPropertyName;\r\n this.valueConversionFunction = valueConversionFunction;\r\n }\r\n}\r\ninterface FieldDefinitionClassNameToValueTypeMap {\r\n [fieldDefinitionClassName: string]: FieldDefinitionClassNameToValueTypeData;\r\n}\r\n\r\nclass FieldExpressionComparator {\r\n public valueTypes: string[];\r\n public operatorSymbol: string;\r\n\r\n public comparator: (a, b) => boolean;\r\n\r\n public constructor(valueTypes: string[], operatorSymbol: string, comparator: (a, b) => boolean) {\r\n this.valueTypes = valueTypes;\r\n this.operatorSymbol = operatorSymbol;\r\n this.comparator = comparator;\r\n }\r\n}\r\ninterface FieldExpressionComparatorMap {\r\n [valueType_operatorSymbol_key: string]: FieldExpressionComparator;\r\n}\r\n\r\nexport class FormFieldExpression implements ICloneAndCopy {\r\n // Static data.\r\n private static staticDataInitialized: boolean = false;\r\n\r\n // Instance data.\r\n public id: number = 0;\r\n\r\n //public sourceFieldClientId: number = 0; // This can be ignored by the server.\r\n public sourceFieldId: number = 0; // Note: this is a database Id or zero if no DB Id yet exists.\r\n public sourceFieldName: string = null; // Must be the internal form field name, not the display name.\r\n\r\n public sourceFieldChildFieldName: string = null; // Added 08-15-2024.\r\n\r\n public operatorSymbol: string; // e.g. =, >, >=, <, <=\r\n\r\n public operandValue: string; // e.g. 'abc'\r\n\r\n public expressionOrder: number = 0;\r\n\r\n //public actions: FormConditionalLogicAction[];\r\n @Type(() => FormFieldAction)\r\n public actions: FormFieldAction[];\r\n\r\n public getRuleSummaryText(form: Form, fieldDefinitionService: FieldDefinitionService): string {\r\n let sourceFieldName: string = this.sourceFieldName;\r\n let sourceField: FormField = null;\r\n if (form.formFields != null) {\r\n sourceField = form.formFields.find(ff => ff.name == this.sourceFieldName);\r\n if (sourceField != null)\r\n sourceFieldName = (sourceField.displayName != null) && (sourceField.displayName.trim() != '') ? sourceField.displayName : sourceField.name;\r\n }\r\n let ruleText: string = `[${sourceFieldName}] ${this.operatorSymbol} `;\r\n\r\n let strOperandValue: string = (this.operandValue ? this.operandValue.toString() : '');\r\n\r\n let bUseQuotationMarks: boolean = false;\r\n if (sourceField != null) {\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(sourceField.fieldDefinitionClassName);\r\n if ((fieldDefinition != null) && (fieldDefinition.customLogicHandler != null))\r\n bUseQuotationMarks = fieldDefinition.customLogicHandler.displayValueWithQuotationMarks();\r\n } \r\n\r\n if (strOperandValue && (strOperandValue.trim() != '')) { // This test should never fail.\r\n // Add the operand value.\r\n let strTrimmedOperandValue: string = strOperandValue.trim();\r\n\r\n if (strTrimmedOperandValue.length <= 20) {\r\n ruleText += (bUseQuotationMarks ? `'${strTrimmedOperandValue}'` : strTrimmedOperandValue);\r\n } else {\r\n ruleText += (bUseQuotationMarks ? `'${strTrimmedOperandValue.substring(0, 16)}' ...` : `${strTrimmedOperandValue.substring(0, 16)} ...`);\r\n }\r\n\r\n // Add an action count.\r\n let iActionCount: number = this.actions != null ? this.actions.length : 0;\r\n\r\n if (iActionCount == 1) {\r\n ruleText += ' (1 action)';\r\n } else {\r\n ruleText += ` (${iActionCount} actions)`;\r\n }\r\n }\r\n\r\n return ruleText;\r\n }\r\n\r\n public getRuleConditionText(form: Form, fieldDefinitionService: FieldDefinitionService, addActionCount: boolean = true): string {\r\n //let ruleText: string = `[${sourceFieldName}] ${this.operatorSymbol} `;\r\n let ruleText: string = `${this.operatorSymbol} `;\r\n\r\n let strOperandValue: string = (this.operandValue ? this.operandValue.toString() : '');\r\n\r\n let sourceField: FormField = null;\r\n if (form.formFields != null) {\r\n sourceField = form.formFields.find(ff => ff.name == this.sourceFieldName);\r\n }\r\n\r\n let bUseQuotationMarks: boolean = false;\r\n if (sourceField != null) {\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(sourceField.fieldDefinitionClassName);\r\n if ((fieldDefinition != null) && (fieldDefinition.customLogicHandler != null))\r\n bUseQuotationMarks = fieldDefinition.customLogicHandler.displayValueWithQuotationMarks();\r\n }\r\n\r\n if (strOperandValue && (strOperandValue.trim() != '')) { // This test should never fail.\r\n // Add the operand value.\r\n let strTrimmedOperandValue: string = strOperandValue.trim();\r\n\r\n if (strTrimmedOperandValue.length <= 20) {\r\n ruleText += (bUseQuotationMarks ? `'${strTrimmedOperandValue}'` : strTrimmedOperandValue);\r\n } else {\r\n ruleText += (bUseQuotationMarks ? `'${strTrimmedOperandValue.substring(0, 16)}' ...` : `${strTrimmedOperandValue.substring(0, 16)} ...`);\r\n }\r\n\r\n if (addActionCount) {\r\n // Add an action count.\r\n let iActionCount: number = this.actions != null ? this.actions.length : 0;\r\n\r\n if (iActionCount == 1) {\r\n ruleText += ' (1 action)';\r\n } else {\r\n ruleText += ` (${iActionCount} actions)`;\r\n }\r\n }\r\n }\r\n\r\n return ruleText;\r\n }\r\n\r\n public get numberOfActions(): number {\r\n return this.actions != null ? this.actions.length : 0;\r\n }\r\n\r\n public applyTargetFieldDefaultAttributesToActions(targetFieldDefaultAttributes: string): void {\r\n if (this.actions != null) {\r\n for (let index: number = 0; index < this.actions.length; index++) {\r\n let action: FormFieldAction = this.actions[index];\r\n action.targetFormFieldDefaultAttributes = targetFieldDefaultAttributes;\r\n }\r\n }\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n // To do: make methods clone() and copy() use a common, static method to perform the copy operations.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldExpression = new FormFieldExpression();\r\n\r\n FormFieldExpression.copyPropertiesFromTo(this, clone);\r\n\r\n return (clone);\r\n }\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let exprToCopy: FormFieldExpression = objectToCopy;\r\n\r\n FormFieldExpression.copyPropertiesFromTo(exprToCopy, this);\r\n\r\n return;\r\n }\r\n\r\n private static copyPropertiesFromTo(fromExpr: FormFieldExpression, toExpr: FormFieldExpression): void {\r\n toExpr.id = fromExpr.id;\r\n\r\n //toExpr.sourceFieldClientId = fromExpr.sourceFieldClientId;\r\n toExpr.sourceFieldId = fromExpr.sourceFieldId;\r\n toExpr.sourceFieldName = fromExpr.sourceFieldName;\r\n\r\n toExpr.operatorSymbol = fromExpr.operatorSymbol;\r\n\r\n toExpr.operandValue = fromExpr.operandValue;\r\n\r\n toExpr.expressionOrder = fromExpr.expressionOrder;\r\n\r\n toExpr.actions = [];\r\n if (fromExpr.actions && (fromExpr.actions.length > 0)) {\r\n for (let iAction: number = 0; iAction < fromExpr.actions.length; iAction++) {\r\n let actionToCopy: FormFieldAction = fromExpr.actions[iAction];\r\n\r\n let actionClone: FormFieldAction = actionToCopy.clone();\r\n toExpr.actions.push(actionClone);\r\n }\r\n }\r\n }\r\n\r\n // Constructor.\r\n public constructor(idParam: number = 0) {\r\n this.id = idParam;\r\n\r\n //FormFieldExpression.initComparatorDefs();\r\n\r\n return;\r\n }\r\n\r\n /*\r\n private static initComparatorDefs(): void {\r\n if (!FormFieldExpression.staticDataInitialized) {\r\n // Initialize the 'fieldDefinitionClassName' to 'valueType' map.\r\n FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap = {};\r\n\r\n for (let index: number = 0; index < FormFieldExpression.fieldDefinitionClassNamesToValueTypes.length; index++) {\r\n let fieldDefToValueType: FieldDefinitionClassNameToValueTypeData = FormFieldExpression.fieldDefinitionClassNamesToValueTypes[index];\r\n\r\n //FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap[fieldDefToValueType.fieldDefinitionClassName] = fieldDefToValueType.valueType;\r\n FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap[fieldDefToValueType.fieldDefinitionClassName] = fieldDefToValueType;\r\n }\r\n\r\n // Initialize comparators.\r\n FormFieldExpression.mapOfFieldExpressionComparators = {};\r\n\r\n for (let index: number = 0; index < FormFieldExpression.fieldExpressionComparators.length; index++) {\r\n let comparatorDef: FieldExpressionComparator = FormFieldExpression.fieldExpressionComparators[index];\r\n\r\n for (let valueTypeIndex: number = 0; valueTypeIndex < comparatorDef.valueTypes.length; valueTypeIndex++) {\r\n let valueType: string = comparatorDef.valueTypes[valueTypeIndex];\r\n\r\n let valueType_operatorSymbol_key: string = FormFieldExpression.getValueTypeOperatorKeyString(valueType, comparatorDef.operatorSymbol); //`${valueType}_${comparatorDef.operatorSymbol}`;\r\n FormFieldExpression.mapOfFieldExpressionComparators[valueType_operatorSymbol_key] = comparatorDef;\r\n }\r\n }\r\n\r\n FormFieldExpression.staticDataInitialized = true;\r\n }\r\n }\r\n */\r\n\r\n private static getValueTypeOperatorKeyString(valueType: string, operatorSymbol: string): string {\r\n return `${valueType}_${operatorSymbol}`\r\n }\r\n\r\n // Rule test method.\r\n\r\n // Note: rewrite the logic in the following method to use interfaces.\r\n //\r\n // The key to the correct interface implementation could be\r\n // a form instance element's value type.\r\n //\r\n // Also need to abstract 'this.operatorSymbol' into an\r\n // expression evaluation interfadce that can be called without\r\n // if-then/switch/conditional logic.\r\n //\r\n // Question: could we get away with one interface implementation\r\n // per 'operatorSymbol' or do we need one implementation per\r\n // 'operatorSymbol' per 'valueType' value? The latter?\r\n public valueTriggersExpression(formField: FormField, formInstanceElement: FormInstanceElement, fieldDefinitionService: FieldDefinitionService): boolean {\r\n let triggersExprs: boolean = false;\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(formField.fieldDefinitionClassName);\r\n let fieldLogic: IFieldDefinitionLogic = (fieldDefinition != null ? fieldDefinition.customLogicHandler : null);\r\n if (fieldLogic == null) {\r\n let errorMsg = `FormFieldExpression.valueTriggersExpression(): cannot find an instance of IFieldDefinitionLogic for field definition class '${formField.fieldDefinitionClassName}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n /*\r\n let valueTypeData: FieldDefinitionClassNameToValueTypeData = FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap[formField.fieldDefinitionClassName];\r\n if (valueTypeData == null) {\r\n let errorMsg = `FormFieldExpression.valueTriggersExpression(): cannot find a 'valueType' value for field definition class name '${formField.fieldDefinitionClassName}'.`;\r\n throw errorMsg;\r\n }\r\n */\r\n\r\n //let propertyName: string = valueTypeData.formInstanceElementPropertyName;\r\n let propertyName: string = fieldDefinition.formInstanceElementPropertyName;\r\n let propertyValue: any = formInstanceElement[propertyName];\r\n\r\n triggersExprs = fieldLogic.compare(propertyValue, this.operatorSymbol, this.operandValue);\r\n\r\n return triggersExprs;\r\n }\r\n /*\r\n public originalNotUsed_valueTriggersExpression(formField: FormField, formInstanceElement: FormInstanceElement, fieldDefinitionService: FieldDefinitionService): boolean {\r\n //let valueType: string = FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap[formField.fieldDefinitionClassName];\r\n let valueTypeData: FieldDefinitionClassNameToValueTypeData = FormFieldExpression.fieldDefinitionClassNamesToValueTypesMap[formField.fieldDefinitionClassName];\r\n if (valueTypeData == null) {\r\n let errorMsg = `FormFieldExpression.valueTriggersExpression(): cannot find a 'valueType' value for field definition class name '${formField.fieldDefinitionClassName}'.`;\r\n throw errorMsg;\r\n }\r\n //let valueType: string = valueTypeData.valueType;\r\n let valueType: string = valueTypeData.comparisonValueType;\r\n let propertyName: string = valueTypeData.formInstanceElementPropertyName;\r\n\r\n let valueType_operatorSymbol_key: string = FormFieldExpression.getValueTypeOperatorKeyString(valueType, this.operatorSymbol); //`${formInstanceElement.valueType}_${this.operatorSymbol}`;\r\n let comparator: FieldExpressionComparator = FormFieldExpression.mapOfFieldExpressionComparators[valueType_operatorSymbol_key];\r\n if (comparator == null) {\r\n let errorMsg = `FormFieldExpression.valueTriggersExpression(): cannot find a comparator for 'valueType'/'operator' key '${valueType_operatorSymbol_key}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n let propertyValue: any = formInstanceElement[propertyName];\r\n let textPropertyValue: string = (propertyValue != null ? propertyValue.toString() : '');\r\n let convertedPropertyValue: any = valueTypeData.valueConversionFunction(textPropertyValue);\r\n let convertedOperandValue: any = valueTypeData.valueConversionFunction(this.operandValue);\r\n let triggersExpr: boolean = comparator.comparator(convertedPropertyValue, convertedOperandValue);\r\n\r\n return triggersExpr;\r\n }\r\n */\r\n\r\n // Helper/convenience methods.\r\n public static addRulesForSourceFormField(sourceFormFieldName: string,\r\n arrExistingRules: FormFieldExpression[],\r\n arrNewlyDefinedRules: FormFieldExpression[]): FormFieldExpression[] {\r\n let arrResults: FormFieldExpression[] = null;\r\n\r\n // Remove any existing rules for this form field.\r\n if (arrExistingRules && (arrExistingRules.length > 0)) {\r\n arrResults = arrExistingRules.filter(r => r.sourceFieldName !== sourceFormFieldName);\r\n } else {\r\n arrResults = [];\r\n }\r\n\r\n if (arrNewlyDefinedRules && (arrNewlyDefinedRules.length > 0)) {\r\n for (let iNewRule: number = 0; iNewRule < arrNewlyDefinedRules.length; iNewRule++) {\r\n let newRule: FormFieldExpression = arrNewlyDefinedRules[iNewRule];\r\n\r\n arrResults.push(newRule);\r\n }\r\n }\r\n\r\n return (arrResults);\r\n }\r\n\r\n public static getRulesForSourceFormField(sourceFormFieldName: string,\r\n arrExistingRules: FormFieldExpression[]): FormFieldExpression[] {\r\n let arrResults: FormFieldExpression[] = null;\r\n\r\n // Find any existing rules for\r\n // the specified source form field.\r\n if (arrExistingRules && (arrExistingRules.length > 0)) {\r\n //arrResults = arrExistingRules.filter(r => r.sourceFieldClientId === sourceFormFieldClientId);\r\n arrResults = arrExistingRules.filter(r => r.sourceFieldName === sourceFormFieldName);\r\n } else {\r\n arrResults = [];\r\n }\r\n\r\n return (arrResults);\r\n }\r\n}\r\n","import { FormField } from \"../form-builder/form-field.model\";\r\nimport { FormInstanceElement } from \"../form-builder/form-instance-element.model\";\r\nimport { GridRowViewModel } from \"../form-builder/grid-row.model\";\r\nimport { FormInstance } from \"../site-content/form-instance.model\";\r\n\r\nexport interface FieldIdToSelectedValues { [key: number]: string[]}\r\n\r\nexport interface FieldIdAndNameToSelectedValues { [key: string]: string[] }\r\n\r\nexport class FlexibleSelectionFieldInstructionsRequest {\r\n public formInstance: FormInstance;\r\n public formInstanceElement: FormInstanceElement;\r\n public fieldIdsToSelectedValues: FieldIdToSelectedValues;\r\n public gridRow: GridRowViewModel;\r\n public gridRowId: number = 0\r\n public gridColumnDefs: FormField[];\r\n public requestIsForInitialLoadOfGridFormField: boolean;\r\n\r\n public constructor(\r\n formInstance: FormInstance,\r\n formInstanceElement: FormInstanceElement,\r\n fieldIdsToSelectedValues: FieldIdToSelectedValues,\r\n gridRow: GridRowViewModel,\r\n gridRowId: number,\r\n gridColumnDefs: FormField[],\r\n requestIsForInitialLoadOfGridFormField: boolean = false) {\r\n\r\n this.formInstance = formInstance;\r\n this.formInstanceElement = formInstanceElement;\r\n this.fieldIdsToSelectedValues = fieldIdsToSelectedValues;\r\n this.gridRowId = gridRowId;\r\n this.gridRow = gridRow;\r\n this.gridColumnDefs = gridColumnDefs;\r\n this.requestIsForInitialLoadOfGridFormField = requestIsForInitialLoadOfGridFormField;\r\n }\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\n\r\nimport { FormField } from './../form-field.model';\r\nimport { FormInstanceElement } from './../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\nimport { CascadingDropDownFormFieldConfig } from '../../cascading-dropdown/cascading-dropdown-config.model';\r\n\r\nexport class FormFieldCascadingDropdownConstraint extends FormFieldConstraintBase implements IFormFieldConstraint, ICloneAndCopy {\r\n // Properties.\r\n protected jsonConfig: string;\r\n private configForConstraintExpressionSummary: CascadingDropDownFormFieldConfig = null;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.CascadingDropdown, constraintName);\r\n\r\n this.jsonConfig = constraintValue;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n return FormFieldConstraintTypeEnum.CascadingDropdown;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n return this.jsonConfig;\r\n }\r\n public set constraintExpression(value: string) {\r\n this.jsonConfig = value;\r\n }\r\n\r\n // Not relevant for this field type\r\n public get constraintFailureMessage(): string {\r\n return null;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n // noop\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n if (this.configForConstraintExpressionSummary == null)\r\n this.configForConstraintExpressionSummary = CascadingDropDownFormFieldConfig.parseJsonConfig(this.jsonConfig);\r\n let summary: string = '';\r\n if (this.configForConstraintExpressionSummary != null && this.configForConstraintExpressionSummary.dropDownHeaders != null) {\r\n for (let index: number = 0; index < this.configForConstraintExpressionSummary.dropDownHeaders.length; index++) {\r\n let header: string = this.configForConstraintExpressionSummary.dropDownHeaders[index];\r\n if (index > 0)\r\n summary += ' -> ';\r\n summary += header;\r\n }\r\n }\r\n return summary;\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldCascadingDropdownConstraint = new FormFieldCascadingDropdownConstraint(this.dataCollectionId, this.constraintId, this.constraintName, this.jsonConfig);\r\n\r\n //clone.constraintId = this.constraintId;\r\n //clone.constraintName = this.constraintName;\r\n //clone.jsonConfig = this.jsonConfig;\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldCascadingDropdownConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.jsonConfig = objectToCopy.jsonConfig;\r\n }\r\n}\r\n\r\nexport class FormFieldCascadingDropdownConstraintWithMetrics extends FormFieldCascadingDropdownConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, constraintName, constraintValue);\r\n }\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\nimport { plainToClass } from 'class-transformer';\r\n\r\n//import { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\n//import { SiteFormFieldConstraintProperties } from './site-form-field-constraint-props.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\nimport { DateUtil } from '../../../utility-classes/date.util';\r\n\r\nexport class DateRangeDataForJsonSerialization {\r\n // Properties.\r\n public minDate: string = null;\r\n public maxDate: string = null;\r\n\r\n // Constructor.\r\n public constructor(minDateValue: string, maxDateValue: string) {\r\n this.minDate = minDateValue;\r\n this.maxDate = maxDateValue;\r\n }\r\n\r\n // JSON-related methods.\r\n public toJson(): string {\r\n let json: string = JSON.stringify(this);\r\n return json;\r\n }\r\n public static fromJson(json: string): DateRangeDataForJsonSerialization {\r\n let object = ((json != null) && (json.trim() != '') ? JSON.parse(json) : null);\r\n let result: DateRangeDataForJsonSerialization = (object != null ? plainToClass(DateRangeDataForJsonSerialization, object) : null);\r\n return result;\r\n }\r\n}\r\n\r\nexport class FormFieldDateRangeConstraint extends FormFieldConstraintBase implements IFormFieldConstraint, ICloneAndCopy {\r\n // Properties.\r\n public minDate: string = null;\r\n public maxDate: string = null;\r\n\r\n // Constructor.\r\n /*\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.DateRange, constraintName);\r\n\r\n if (constraintValue != null)\r\n this.constraintExpression = constraintValue;\r\n }\r\n */\r\n public constructor() {\r\n super(0, 0, FormFieldConstraintTypeEnum.DateRange, null);\r\n }\r\n\r\n // Static method (will plan to do away with this after troubleshooting the problem with \"plainToClass(FormFieldDateRangeConstraint,object)\".\r\n //\r\n // Note: the problem is that the above constructor will not work with plainToClass(), so the constructor needs to be replaced.\r\n /*\r\n public static fromServerObject(serverObject: any): FormFieldDateRangeConstraint {\r\n let constraint = new FormFieldDateRangeConstraint();// serverObject['dataCollectionId'], serverObject['constraintId'], serverObject['constraintName']);\r\n\r\n constraint.dataCollectionId = serverObject['dataCollectionId'];\r\n constraint.constraintId = serverObject['constraintId'];\r\n constraint.constraintType = FormFieldConstraintTypeEnum.DateRange;\r\n constraint.constraintName = serverObject['constraintName'];\r\n constraint.minDate = serverObject['minDate'];\r\n constraint.maxDate = serverObject['maxDate'];\r\n\r\n return constraint;\r\n }\r\n */\r\n // constructConstraint() -- a constructor-like method.\r\n public static constructConstraint(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n let constraint = new FormFieldDateRangeConstraint();\r\n\r\n constraint.dataCollectionId = dataCollectionId;\r\n constraint.constraintId = constraintId;\r\n constraint.constraintType = FormFieldConstraintTypeEnum.DateRange;\r\n constraint.constraintName = constraintName;\r\n if (constraintValue != null)\r\n constraint.constraintExpression = constraintValue;\r\n\r\n return constraint;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n return FormFieldConstraintTypeEnum.DateRange;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n let objectForSerialization = new DateRangeDataForJsonSerialization(this.minDate, this.maxDate);\r\n let json = objectForSerialization.toJson();\r\n return json;\r\n }\r\n public set constraintExpression(value: string) {\r\n let serializationObject: DateRangeDataForJsonSerialization = DateRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n this.minDate = serializationObject.minDate;\r\n this.maxDate = serializationObject.maxDate;\r\n } else {\r\n this.minDate = null;\r\n this.maxDate = null;\r\n }\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n let minDate: Date = (this.minDate != null ? DateUtil.DateToUTCDate(this.minDate) : null);\r\n let maxDate: Date = (this.maxDate != null ? DateUtil.DateToUTCDate(this.maxDate) : null);\r\n\r\n /*\r\n if ((this.minDate != null) && (this.maxDate != null))\r\n summary = `${this.minDate} - ${this.maxDate}`;\r\n else if (this.minDate != null)\r\n summary = `> ${this.minDate}`;\r\n else if (this.maxDate != null)\r\n summary = `< ${this.maxDate}`;\r\n */\r\n /*\r\n let summary: string = '';\r\n\r\n if ((minDate != null) && (maxDate != null))\r\n summary = `${minDate} - ${maxDate}`;\r\n else if (minDate != null)\r\n summary = `On or after ${minDate}`;\r\n else if (maxDate != null)\r\n summary = `Before or on ${maxDate}`;\r\n */\r\n let summary: string = FormFieldDateRangeConstraint.deriveExpressionSummary(minDate, maxDate);\r\n \r\n return summary;\r\n }\r\n\r\n // Not relevant for this field type\r\n public get constraintFailureMessage(): string {\r\n return null;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n // noop\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n //let clone: FormFieldDateRangeConstraint = new FormFieldDateRangeConstraint(this.dataCollectionId, this.constraintId, this.constraintName);\r\n let clone = FormFieldDateRangeConstraint.constructConstraint(this.dataCollectionId, this.constraintId, this.constraintName);\r\n\r\n //clone.constraintId = this.constraintId;\r\n //clone.constraintName = this.constraintName;\r\n clone.minDate = this.minDate;\r\n clone.maxDate = this.maxDate;\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldDateRangeConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.minDate = objectToCopy.minDate;\r\n this.maxDate = objectToCopy.maxDate;\r\n }\r\n\r\n // Helper methods.\r\n private static deriveExpressionSummary(minDate: Date, maxDate: Date): string {\r\n let summary: string = '';\r\n\r\n if ((minDate != null) && (maxDate != null))\r\n summary = `${DateUtil.AsMMDDYYYY(minDate)} to ${DateUtil.AsMMDDYYYY(maxDate)}`;\r\n else if (minDate != null)\r\n summary = `On or after ${DateUtil.AsMMDDYYYY(minDate)}`;\r\n else if (maxDate != null)\r\n summary = `Before or on ${DateUtil.AsMMDDYYYY(maxDate)}`;\r\n\r\n return summary;\r\n }\r\n}\r\n\r\nexport class FormFieldDateRangeConstraintWithMetrics extends FormFieldDateRangeConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n //super(dataCollectionId, constraintId, constraintName, constraintValue);\r\n super();\r\n\r\n this.dataCollectionId = dataCollectionId;\r\n this.constraintId = constraintId;\r\n this.constraintName = constraintName;\r\n\r\n if (constraintValue != null)\r\n this.constraintExpression = constraintValue;\r\n }\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\nimport { plainToClass } from 'class-transformer';\r\n\r\n//import { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormField } from './../form-field.model';\r\nimport { FormInstanceElement } from './../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class NumericRangeDataForJsonSerialization {\r\n // Properties.\r\n public minValue: number = null;\r\n public maxValue: number = null;\r\n\r\n // Constructor.\r\n public constructor(minValue: number, maxValue: number) {\r\n this.minValue = minValue;\r\n this.maxValue = maxValue;\r\n }\r\n\r\n // JSON-related methods.\r\n public toJson(): string {\r\n let json: string = JSON.stringify(this);\r\n return json;\r\n }\r\n public static fromJson(json: string): NumericRangeDataForJsonSerialization {\r\n let object = ((json != null) && (json.trim() != '') ? JSON.parse(json) : null);\r\n let result: NumericRangeDataForJsonSerialization = (object != null ? plainToClass(NumericRangeDataForJsonSerialization, object) : null);\r\n return result;\r\n }\r\n}\r\n\r\nexport class FormFieldNumericRangeConstraint extends FormFieldConstraintBase implements IFormFieldConstraint, ICloneAndCopy {\r\n // Properties.\r\n public minValue: number = null;\r\n public maxValue: number = null;\r\n\r\n // Constructor.\r\n /*\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.NumericRange, constraintName);\r\n\r\n if (constraintValue != null)\r\n this.constraintExpression = constraintValue;\r\n }\r\n */\r\n public constructor() {\r\n super(0, 0, FormFieldConstraintTypeEnum.NumericRange, null);\r\n }\r\n\r\n // Static methods.\r\n // constructConstraint() -- a constructor-like method.\r\n public static constructConstraint(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n let constraint = new FormFieldNumericRangeConstraint();\r\n\r\n constraint.dataCollectionId = dataCollectionId;\r\n constraint.constraintId = constraintId;\r\n constraint.constraintType = FormFieldConstraintTypeEnum.NumericRange;\r\n constraint.constraintName = constraintName;\r\n if (constraintValue != null)\r\n constraint.constraintExpression = constraintValue;\r\n\r\n return constraint;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n return FormFieldConstraintTypeEnum.NumericRange;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n let objectForSerialization = new NumericRangeDataForJsonSerialization(this.minValue, this.maxValue);\r\n let json = objectForSerialization.toJson();\r\n return json;\r\n }\r\n public set constraintExpression(value: string) {\r\n let serializationObject: NumericRangeDataForJsonSerialization = NumericRangeDataForJsonSerialization.fromJson(value);\r\n if (serializationObject != null) {\r\n this.minValue = serializationObject.minValue;\r\n this.maxValue = serializationObject.maxValue;\r\n } else {\r\n this.minValue = null;\r\n this.maxValue = null;\r\n }\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n let summary: string = '';\r\n\r\n if ((this.minValue != null) && (this.maxValue != null))\r\n summary = `${this.minValue} to ${this.maxValue}`;\r\n else if (this.minValue != null)\r\n summary = `Equal to or greater than ${this.minValue}`;\r\n else if (this.maxValue != null)\r\n summary = `Less than or equal to ${this.maxValue}`;\r\n\r\n return summary;\r\n }\r\n\r\n // Not relevant for this field type\r\n public get constraintFailureMessage(): string {\r\n return null;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n // noop\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n //let clone: FormFieldNumericRangeConstraint = new FormFieldNumericRangeConstraint(this.dataCollectionId, this.constraintId, this.constraintName);\r\n let clone = FormFieldNumericRangeConstraint.constructConstraint(this.dataCollectionId, this.constraintId, this.constraintName);\r\n\r\n //clone.constraintId = this.constraintId;\r\n //clone.constraintName = this.constraintName;\r\n clone.minValue = this.minValue;\r\n clone.maxValue = this.maxValue;\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldNumericRangeConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.minValue = objectToCopy.minValue;\r\n this.maxValue = objectToCopy.maxValue;\r\n }\r\n}\r\n\r\nexport class FormFieldNumericRangeConstraintWithMetrics extends FormFieldNumericRangeConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n //super(dataCollectionId, constraintId, constraintName, constraintValue);\r\n super();\r\n\r\n this.dataCollectionId = dataCollectionId;\r\n this.constraintId = constraintId;\r\n this.constraintName = constraintName;\r\n\r\n if (constraintValue != null)\r\n this.constraintExpression = constraintValue;\r\n }\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\n\r\n//import { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormField } from './../form-field.model';\r\nimport { FormInstanceElement } from './../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\n//import { SiteFormFieldConstraintProperties } from './site-form-field-constraint-props.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldRegularExpressionConstraint extends FormFieldConstraintBase implements IFormFieldConstraint {\r\n // Properties.\r\n private regularExpressionConstraintValue: string;\r\n // pharv 11/9/2022 - renamed from regularExpressionConstraintMessage to parralel the naming in the ViewModel on the server\r\n private regularExpressionMessage: string;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null, constraintFailureMessage: string = null) {\r\n super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.RegularExpression, constraintName);\r\n\r\n this.regularExpressionConstraintValue = constraintValue;\r\n this.regularExpressionMessage = constraintFailureMessage;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n return FormFieldConstraintTypeEnum.RegularExpression;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n return this.regularExpressionConstraintValue;\r\n }\r\n public set constraintExpression(value: string) {\r\n this.regularExpressionConstraintValue = value;\r\n }\r\n\r\n public get constraintFailureMessage(): string {\r\n return this.regularExpressionMessage;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n this.regularExpressionMessage = value;\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldRegularExpressionConstraint = new FormFieldRegularExpressionConstraint(this.dataCollectionId, this.constraintId, this.constraintName, this.regularExpressionConstraintValue);\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldRegularExpressionConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.regularExpressionConstraintValue = objectToCopy.regularExpressionConstraintValue;\r\n this.regularExpressionMessage = objectToCopy.regularExpressionMessage;\r\n }\r\n}\r\n\r\nexport class FormFieldRegularExpressionConstraintWithMetrics extends FormFieldRegularExpressionConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null, constraintFailureMessage: string = null) {\r\n super(dataCollectionId, constraintId, constraintName, constraintValue, constraintFailureMessage);\r\n }\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\n\r\n//import { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormField } from './../form-field.model';\r\nimport { FormInstanceElement } from './../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\n//import { SiteFormFieldConstraintProperties } from './site-form-field-constraint-props.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\n\r\nexport class FormFieldSelectOptionsConstraint extends FormFieldConstraintBase implements IFormFieldConstraint, ICloneAndCopy {\r\n // Properties.\r\n protected selectOptionsConstraintValue: string;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.SelectOptions, constraintName);\r\n\r\n this.selectOptionsConstraintValue = constraintValue;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n return FormFieldConstraintTypeEnum.SelectOptions;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n return this.selectOptionsConstraintValue;\r\n }\r\n public set constraintExpression(value: string) {\r\n this.selectOptionsConstraintValue = value;\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n let constraintExprSummary: string = this.selectOptionsConstraintValue;\r\n\r\n const maxLength: number = 128;\r\n if ((this.selectOptionsConstraintValue != null) && (this.selectOptionsConstraintValue.length > maxLength)) {\r\n constraintExprSummary = '';\r\n\r\n let formField: FormField = new FormField();\r\n formField.selectOptions = this.selectOptionsConstraintValue;\r\n let selectOptions: string[] = FormField.ParseSelectOptions(formField);\r\n\r\n let index: number = 0;\r\n while ((index < selectOptions.length) && (constraintExprSummary.length < maxLength)) {\r\n if (index > 0)\r\n constraintExprSummary += '|';\r\n\r\n constraintExprSummary += selectOptions[index++];\r\n } \r\n }\r\n\r\n return constraintExprSummary;\r\n }\r\n\r\n // Not relevant for this field type\r\n public get constraintFailureMessage(): string {\r\n return null;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n // noop\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldSelectOptionsConstraint = new FormFieldSelectOptionsConstraint(this.dataCollectionId, this.constraintId, this.constraintName, this.selectOptionsConstraintValue);\r\n\r\n //clone.constraintId = this.constraintId;\r\n //clone.constraintName = this.constraintName;\r\n //clone.selectOptionsConstraintValue = this.selectOptionsConstraintValue;\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldSelectOptionsConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.selectOptionsConstraintValue = objectToCopy.selectOptionsConstraintValue;\r\n }\r\n}\r\n\r\nexport class FormFieldSelectOptionsConstraintWithMetrics extends FormFieldSelectOptionsConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n public constructor(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(dataCollectionId, constraintId, constraintName, constraintValue);\r\n }\r\n}\r\n","import { IFormFieldConstraint } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\n\r\nexport abstract class FormFieldConstraintBase implements IFormFieldConstraint { \r\n // Properties.\r\n public dataCollectionId: number;\r\n public constraintId: number = 0;\r\n public constraintType: string;\r\n public constraintName: string;\r\n public mdsLink: string; //VNEXT-1418\r\n\r\n // Constructor.\r\n public constructor(dataCollectionIdParam: number, constraintIdParam: number, constraintTypeParam: string, constraintNameParam: string) {\r\n this.dataCollectionId = dataCollectionIdParam;\r\n this.constraintId = constraintIdParam;\r\n this.constraintType = constraintTypeParam;\r\n this.constraintName = constraintNameParam;\r\n }\r\n\r\n // Abstract methods.\r\n public abstract get type(): string;\r\n\r\n public abstract get constraintExpression(): string;\r\n public abstract set constraintExpression(value: string);\r\n\r\n public abstract get constraintFailureMessage(): string;\r\n public abstract set constraintFailureMessage(value: string);\r\n\r\n // Logic-related methods.\r\n public abstract validate(formField: FormField, formInstanceElement: FormInstanceElement): void;\r\n\r\n // Implement some of the methods in interface IFormFieldConstraint.\r\n public get id(): number {\r\n return this.constraintId;\r\n }\r\n public set id(value: number) {\r\n this.constraintId = value;\r\n }\r\n\r\n public get name(): string {\r\n return this.constraintName;\r\n }\r\n public set name(value: string) {\r\n this.constraintName = value;\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n return this.constraintExpression;\r\n }\r\n}\r\n\r\nexport class FormFieldConstraintViewModel {\r\n // Properties.\r\n public dataCollectionId: number;\r\n\r\n public constraintId: number = 0;\r\n public constraintType: string;\r\n public constraintName: string;\r\n\r\n // Constraint-specific properties.\r\n public selectOptionsConstraintValue: string;\r\n public regularExpressionConstraintValue: string;\r\n public jsonConfig: string;\r\n public minValue: number = null;\r\n public maxValue: number = null;\r\n public minDate: string = null;\r\n public maxDate: string = null;\r\n}\r\n","// Note: named this file a bit differently so the name would not be excessively long.\r\n\r\nimport { FormField } from './../form-field.model';\r\nimport { FormInstanceElement } from './../form-instance-element.model';\r\nimport { IFormFieldConstraint, IFormFieldConstraintWithMetrics } from '../../../interfaces/iform-field-constraint.interface';\r\nimport { ICloneAndCopy } from '../../../interfaces/clone-and-copy';\r\nimport { FormFieldConstraintBase } from './form-field-constraint-base.model';\r\nimport { FormFieldConstraintTypeEnum } from '../../../enums/form-field-constraint-type.enum';\r\nimport { CascadingDropDownFormFieldConfig } from '../../cascading-dropdown/cascading-dropdown-config.model';\r\n\r\nexport class FormFieldListValuesConstraint extends FormFieldConstraintBase implements IFormFieldConstraint, ICloneAndCopy {\r\n // Properties.\r\n\r\n private selectOptionsValue: string;\r\n private config: string; // used to be jsonConfig\r\n private configForConstraintExpressionSummary: CascadingDropDownFormFieldConfig = null;\r\n\r\n // Constructor.\r\n protected constructor(constraintType: string, dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n //super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.SimpleListValues, constraintName);\r\n super(dataCollectionId, constraintId, constraintType, constraintName);\r\n\r\n if (this.constraintType == FormFieldConstraintTypeEnum.SimpleListValues)\r\n this.selectOptionsValue = constraintValue;\r\n else\r\n this.config = constraintValue;\r\n }\r\n\r\n public static createSimpleListValuesConstraintFrom(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null): FormFieldListValuesConstraint {\r\n //super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.SimpleListValues, constraintName);\r\n let constraint: FormFieldListValuesConstraint = new FormFieldListValuesConstraint(FormFieldConstraintTypeEnum.SimpleListValues, dataCollectionId, constraintId, constraintName, constraintValue);\r\n\r\n constraint.selectOptionsValue = constraintValue;\r\n\r\n return constraint;\r\n }\r\n public static createCascadingListValuesConstraintFrom(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null): FormFieldListValuesConstraint {\r\n //super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.SimpleListValues, constraintName);\r\n let constraint: FormFieldListValuesConstraint = new FormFieldListValuesConstraint(FormFieldConstraintTypeEnum.CascadingListValues, dataCollectionId, constraintId, constraintName, constraintValue);\r\n\r\n constraint.config = constraintValue;\r\n\r\n return constraint;\r\n }\r\n\r\n // Getters/setters.\r\n public get SelectOptionsValue(): string {\r\n return this.selectOptionsValue;\r\n }\r\n public set SelectOptionsValue(value: string) {\r\n this.selectOptionsValue = value;\r\n }\r\n\r\n public get Config(): string {\r\n return this.config;\r\n }\r\n public set Config(value: string) {\r\n this.config = value;\r\n }\r\n\r\n // Implement IFormFieldConstraint.\r\n // Property-related methods.\r\n public get type(): string {\r\n //return FormFieldConstraintTypeEnum.SimpleListValues;\r\n return this.constraintType;\r\n }\r\n\r\n public get constraintExpression(): string {\r\n let expr: string = null;\r\n\r\n if (this.constraintType == FormFieldConstraintTypeEnum.SimpleListValues)\r\n expr = this.selectOptionsValue;\r\n else if (this.constraintType == FormFieldConstraintTypeEnum.CascadingListValues)\r\n expr = this.config;\r\n\r\n return expr;\r\n }\r\n public set constraintExpression(value: string) {\r\n if (this.constraintType == FormFieldConstraintTypeEnum.SimpleListValues)\r\n this.selectOptionsValue = value;\r\n else if (this.constraintType == FormFieldConstraintTypeEnum.CascadingListValues)\r\n this.config = value;\r\n }\r\n\r\n public get constraintExpressionSummary(): string {\r\n //let constraintExprSummary: string = this.selectOptionsValue;\r\n let constraintExprSummary: string = '';\r\n\r\n const maxLength: number = 128;\r\n if ((this.selectOptionsValue != null) && (this.selectOptionsValue.trim() != '')) { //(this.selectOptionsValue.length > maxLength)) {\r\n constraintExprSummary = this.selectOptionsValue;\r\n\r\n if (this.selectOptionsValue.length > maxLength) {\r\n constraintExprSummary = '';\r\n\r\n let formField: FormField = new FormField();\r\n formField.selectOptions = this.selectOptionsValue;\r\n let selectOptions: string[] = FormField.ParseSelectOptions(formField);\r\n\r\n let index: number = 0;\r\n while ((index < selectOptions.length) && (constraintExprSummary.length < maxLength)) {\r\n if (index > 0)\r\n constraintExprSummary += '|';\r\n\r\n constraintExprSummary += selectOptions[index++];\r\n }\r\n }\r\n } else if ((this.config != null) && (this.config.trim() != '')) {\r\n if (this.configForConstraintExpressionSummary == null)\r\n this.configForConstraintExpressionSummary = CascadingDropDownFormFieldConfig.parseJsonConfig(this.config);\r\n \r\n if (this.configForConstraintExpressionSummary != null) {\r\n for (let index: number = 0; index < this.configForConstraintExpressionSummary.dropDownHeaders.length; index++) {\r\n let header: string = this.configForConstraintExpressionSummary.dropDownHeaders[index];\r\n if (index > 0)\r\n constraintExprSummary += ' -> ';\r\n constraintExprSummary += header;\r\n }\r\n }\r\n }\r\n\r\n return constraintExprSummary;\r\n }\r\n\r\n // Logic-related methods.\r\n public validate(formField: FormField, formInstanceElement: FormInstanceElement): void {\r\n // TO DO: IMPLEMENT THIS METHOD.\r\n }\r\n\r\n // Static methods.\r\n // constructConstraint() -- a constructor-like method.\r\n /*\r\n public static constructConstraint(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n let constraint = new FormFieldListValuesConstraint(dataCollectionId, constraintId, constraintName, constraintValue);\r\n\r\n return constraint;\r\n }\r\n */\r\n\r\n\r\n // Not relevant for this field type\r\n public get constraintFailureMessage(): string {\r\n return null;\r\n }\r\n public set constraintFailureMessage(value: string) {\r\n // noop\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: FormFieldListValuesConstraint = new FormFieldListValuesConstraint(this.constraintType, this.dataCollectionId, this.constraintId, this.constraintName, this.selectOptionsValue);\r\n\r\n return clone;\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: FormFieldListValuesConstraint = objectToCopyParam;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n this.constraintId = objectToCopy.constraintId;\r\n this.constraintType = objectToCopy.constraintType;\r\n this.constraintName = objectToCopy.constraintName;\r\n this.selectOptionsValue = objectToCopy.selectOptionsValue;\r\n this.config = objectToCopy.config;\r\n }\r\n}\r\n\r\nexport class FormFieldListValuesConstraintWithMetrics extends FormFieldListValuesConstraint implements IFormFieldConstraintWithMetrics {\r\n // Properties.\r\n public useCount: number = 0;\r\n\r\n // Constructor.\r\n private constructor(constraintType: string, dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null) {\r\n super(constraintType, dataCollectionId, constraintId, constraintName, constraintValue);\r\n }\r\n\r\n public static createSimpleListValuesConstraintFrom(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null): FormFieldListValuesConstraintWithMetrics {\r\n let constraint: FormFieldListValuesConstraintWithMetrics = new FormFieldListValuesConstraintWithMetrics(FormFieldConstraintTypeEnum.SimpleListValues, dataCollectionId, constraintId, constraintName, constraintValue);\r\n\r\n constraint.SelectOptionsValue = constraintValue;\r\n\r\n return constraint;\r\n }\r\n public static createCascadingListValuesConstraintFrom(dataCollectionId: number, constraintId: number = 0, constraintName: string = null, constraintValue: string = null): FormFieldListValuesConstraintWithMetrics {\r\n //super(dataCollectionId, constraintId, FormFieldConstraintTypeEnum.SimpleListValues, constraintName);\r\n let constraint: FormFieldListValuesConstraintWithMetrics = new FormFieldListValuesConstraintWithMetrics(FormFieldConstraintTypeEnum.CascadingListValues, dataCollectionId, constraintId, constraintName, constraintValue);\r\n\r\n constraint.Config = constraintValue;\r\n\r\n return constraint;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport class FieldDefinitionAllowDropFlags {\r\n public allowDrop: boolean;\r\n public dropErrorMessage: string;\r\n}\r\n\r\n// Note: interface IFieldDefinitionLogic plays much the same role as interface\r\n// IFieldDefinition within the server code. While the server's IFieldDefinition\r\n// interface is widely used, we are just starting to use interface\r\n// IFieldDefinitionLogic in the client code.\r\n//\r\n// Some existing functionality presently performed by components like the form\r\n// builder can be rolled into implementatios of this interface in order to reduce\r\n// the amount of conditional logic required in components, like the form builder,\r\n// that manage form fields of different types.\r\n//\r\n// Note: interface IFieldDefinitionLogic has been moved to file\r\n// ifield-definition-client-logic-interface.ts in directory ./field-defs.\r\n\r\nexport class FieldDefinition implements IViewModel {\r\n // Properties.\r\n public id: number;\r\n public toolBoxGroup: string;\r\n public className: string; // Note: this is the full field definition class name.\r\n public get fieldDefinitionClassName(): string {\r\n return this.className;\r\n }\r\n\r\n public displayName: string;\r\n public description: string;\r\n\r\n public icon: any[];\r\n public iconName: string;\n public iconType: string;\r\n public thumbNail: any[];\r\n\r\n public canBeDroppedOnForm: boolean; // Added 02-23-2021.\r\n public canBeDroppedOnFormAsCell: boolean; // Added 07-30-2022.\r\n public canBeDroppedOnGrid: boolean;\r\n public canBeDroppedOnSiteHomePage: boolean;\r\n\r\n public cannotBeSplitOnForm: boolean; // If true, the user cannot split the space use by this field.\r\n\r\n public hasCDataContent: boolean; // Defined on server, not relevant on client.\r\n\r\n // Properties related to \"Show To\"/\"Hide From\" logic.\r\n public occupiesEntireFormRow: boolean;\r\n public hasBeginAndEndElements: boolean; // Change this property name to 'createsFormRegion';\r\n\r\n public allowsFieldNesting: boolean;\r\n public isShowToConditional: boolean;\r\n public isHideFromConditional: boolean;\r\n public appliesRoleBasedBehavior: boolean; // Previously: public isShowToHideFromConditional: boolean;\r\n //public occupiesEntireRow: boolean;\r\n\r\n // Properties related to \"special form actions\".\r\n public hasSpecialFormAction: boolean;\r\n public specialFormAction: string;\r\n\r\n // Additional metadata property/properties.\r\n public isNumeric: boolean; // Note: this property is derived from a server method of the same name.\r\n public isTextual: boolean; // Added 01-12-2023.\r\n public isFootnote: boolean; // Added 01-12-2023.\r\n\r\n // Flag indicating that the field type is a beta feature.\r\n public isBetaFeature: boolean;\r\n\r\n public controlTypeHint: string; // Added 01-12-2023.\r\n\r\n public isMetadataField: boolean; // Added 02-07-2024.\r\n\r\n public shortFieldDefClassName: string; // Added 01-12-2023.\r\n\r\n public valueType: string; // Added 01-12-2023.\r\n public formInstanceElementPropertyName: string;\r\n public get formInstElemPropName(): string {\r\n return this.formInstanceElementPropertyName;\r\n }\r\n\r\n public availableFieldConditionalLogicOperators: string;\r\n\r\n // Custom logic handler.\r\n public customLogicHandler: IFieldDefinitionLogic = null;\r\n}\r\n","// Note: the following enum is used by form fields\n// when they emit their 'onInit' output.\nexport enum FormFieldOnInitPropertyEnum {\n COMPONENT = 'component',\n DISPLAY_FORMAT_VALUES = 'displayFormatValues',\n FORM_FIELD = 'formField',\n PROPERTIES = 'properties',\n PROPERTY_UPDATE_REQUIRED = 'propertyUpdateRequired',\n REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT = 'requiredPreviewInstanceModesHeight',\n REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT = 'requiredPreviewInstanceModesHeightUnit',\r\n ROWS_OF_TEXT_TO_DISPLAY_IN_UNSELECTED_GRID_ROW = 'rowsOfTextToDisplayInUnselectedGridRow'\r\n}\n","// NOTE: THE FOLLOWING VALUES SHOULD BE MAINTAINED IN\r\n// ALPHABETICAL ORDER TO HELP AVOID MAKING MISTAKES.\r\nexport enum FormFieldPropertyEnum {\r\n ALL = 'all',\r\n CANCEL_ALL = 'cancelEditOfAllFieldProperties',\r\n\r\n FORM_TEMPLATE_INSTANCE_ACTION_BUTTONS_CONFIG = 'formTemplateInstanceActionButtonsConfig',\r\n\r\n AUTOCOMPLETE = 'autocomplete',\r\n\r\n //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n AUTOCOMPLETE_STARTSWITH = 'autocompleteStartsWith',\r\n AUTOCOMPLETE_CONTAINS = 'autocompleteContains',\r\n\r\n BLANK_VALUE = 'blankValue',\r\n CASCADING_DROPDOWN_CONSTRAINT_NAME = 'cascadingDropdownConstraintName',\r\n SELECTED_CASCADING_DROPDOWN_CONSTRAINT = 'selectedNamedCascadingDropdownConstraint',\r\n CONSTRAINT = 'constraint',\r\n DEFAULT_VALUE = 'defaultValue',\r\n DISABLE_GRID_ROW_DELETE = 'disableGridRowDeleteForNonAdmins',\r\n DISPLAY_FORMAT = 'displayFormat',\r\n GRID_COLUMN_WIDTH = 'gridColumnWidth',\r\n DISPLAY_NAME = 'displayName',\r\n DISPLAY_ROWS = 'displayRows',\r\n DISPLAY_KENDO_GRID_ROWS = 'displayKendoGridRows', //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n EXCEL_IMPORT_EXPORT_TEMPLATE = 'excelImportExportTemplate',\r\n FIELD_GROUP = 'fieldGroup',\r\n FIXED_FIRST_COLUMN_FILE = 'fixedFirstColumnFile',\r\n //FIXED_ROW_HEADINGS_FILE = 'fixedRowHeadingsFile',\r\n FOOTER = 'footer', // For grid form fields.\r\n FORMULA = 'formula',\r\n URL_BUILDER = 'urlBuilder',\r\n URL_BUILDER_LABEL = 'urlBuilderLabel',\r\n FORM_INSTANCE_SERVICE_REQUIRED = 'formInstanceServiceRequired',\r\n FORM_TEMPLATE = 'formTemplate',\r\n FORM_TEMPLATE_PROPERTIES = 'formTemplateProperties',\r\n GRID_COLUMN_BEHAVIOR = 'gridColumnBehavior',\r\n GRID_COLUMN_ROLES = 'gridColumnRoles',\r\n GRID_COLUMN_VIEW_ROLES = 'gridColumnViewRoles',\r\n GRID_KEY_COLUMNS = 'gridKeyColumns', // Note: please see the comment above proeprty 'gridKeyColumns' in model class FormField for information about meaning of this property.\r\n HAS_FOOTNOTE = 'footnote', //TEAMS-424: KLW - Added property for footnote\r\n HELP_TEXT = 'helpText',\r\n HTML_TEXT = 'htmlText',\r\n HIDE_GRID_FILTERING = 'hideGridFiltering',\r\n HIDE_GRID_BODY = 'hideFormFieldBody',\r\n DISABLE_GRID_GROUPING = 'disableGridGrouping',\r\n IMAGE_MANAGEMENT_BUTTONS = 'imageButtons',\r\n IFRAME_SRC = 'iframeSource',\r\n INSTRUCTIONS_TEXT = 'instructionsText',\r\n MIN_DATE = 'minDate',\r\n MAX_DATE = 'maxDate',\r\n NO_DEFAULT_PROPERTIES = 'noDefaultProperties',\r\n SELECTED_DATE_RANGE_CONSTRAINT = 'selectedNamedDateRangeConstraint',\r\n DATE_RANGE_CONSTRAINT_NAME = 'dateRangeConstraintName',\r\n MAX_LENGTH = 'maxLength',\r\n MIN_VALUE = 'minValue',\r\n MAX_VALUE = 'maxValue',\r\n NAME = 'name',\r\n GRID_COLUMN_NAME = 'gridColumnName',\r\n NUM_DIGITS_AFTER_DECIMAL_POINT = 'numDigitsAfterDecimalPoint',\r\n NUMBER_OF_DISPLAY_ROWS = 'numDisplayRows',\r\n SELECTED_NUMERIC_RANGE_CONSTRAINT = 'selectedNamedNumericRangeConstraint',\r\n SHOW_TRAILING_ZEROES_AFTER_DECIMAL_POINT = 'showTrailingZeroesAfterDecimalPoint',\r\n NUMERIC_RANGE_CONSTRAINT_NAME = 'numericRangeConstraintName',\r\n OPEN_FORM_INSTANCES_IN_NEW_TAB = 'openFormInstancesInNewTab',\r\n PRESET_FILTERS = 'presetFilters',\r\n PLACEHOLDER_TEXT = 'placeholderText',\r\n READ_ONLY = 'readOnly',\r\n REGEX = 'regex',\r\n REGEX_CONSTRAINT_NAME = 'regularExpressionConstraintName',\r\n REGEX_CONSTRAINT_MSG = 'regularExpressionConstraintMessage',\r\n REQUIRED = 'required',\r\n ROLE_NAMES = 'roleNames',\r\n ROUND_TO_NUM_DIGITS_AFTER_DECIMAL_POINT = 'roundToNumDigitsAfterDecimalPoint',\r\n ROUND_TO_WHOLE_NUMBER = 'roundToWholeNumber',\r\n SELECT_OPTIONS = 'selectOptions',\r\n SELECT_OPTIONS_FILE = 'selectOptionsFile',\r\n SELECT_OPTIONS_CONSTRAINT_NAME = 'selectOptionsConstraintName',\r\n\r\n // 01-20-2021 note: added the following option\r\n // for grid form field components.\r\n //\r\n // Might want to rethink this\r\n // option to make the form\r\n // filler request any additional\r\n // data, but that would require\r\n // an additional output for every\r\n // form field type.\r\n\r\n SHOW_CONTACTS_PROPERTIES = 'showContactsProperties',\r\n SHOW_DIGITS_WITH_COMMA_SEPARATORS = 'showDigitsWithCommaSeparators',\r\n SHOW_DOLLAR_SIGN_PREFIX = 'showDollarSignPrefix',\r\n SHOW_PREVIEW = 'showPreview', // Used to show previews of numeric values, with formatting,\r\n // to make it easier for someone entering data to be sure\r\n // that the entered values are correct.\r\n TOOL_TIP = 'toolTip',\r\n\r\n // 06-22-2022: added the following property related only to a contacts form field.\r\n\r\n // 09-10-2022: added the following property related only to a comments form field.\r\n SHOW_COMMENTS_PROPERTIES = 'showCommentsProperties',\r\n SHOW_CASCADING_DROPDOWN_INDICES_IN_PREVIEW_MODE = 'showCascadingDropdownIndicesInPreviewMode',\r\n //VNEXT-384: KLW - Implementing Autocomplete\r\n\r\n //TEAMS-561: KLW - Logic for validation\r\n INVALID = 'INVALID',\r\n VALID = 'VALID',\r\n\r\n DISABLED = 'DISABLED',\r\n ENABLE_SIMPLE_FORM_GRID_DISPLAY = 'enableSimpleFormGridDisplay'\r\n\r\n}\r\n","// Define form field type constants used by multiple classes.\nexport const ShortTextFieldType = 'Collect.vNext.FieldDefinitions.ShortTextFieldDefinition';\nexport const ParagraphFieldType = 'Collect.vNext.FieldDefinitions.ParagraphFieldDefinition';\nexport const DateFieldType = 'Collect.vNext.FieldDefinitions.DateFieldDefinition';\nexport const CheckboxFieldType = 'Collect.vNext.FieldDefinitions.CheckBoxFieldDefinition';\nexport const RadioButtonsFieldType = 'Collect.vNext.FieldDefinitions.RadioButtonFieldDefinition';\nexport const IntegerFieldType = 'Collect.vNext.FieldDefinitions.IntegerFieldDefinition';\nexport const DecimalFieldType = 'Collect.vNext.FieldDefinitions.DecimalFieldDefinition';\nexport const CurrencyFieldType = 'Collect.vNext.FieldDefinitions.CurrencyFieldDefinition';\nexport const LabelFieldType = 'Collect.vNext.FieldDefinitions.LabelFieldDefinition';\nexport const DropDownFieldType = 'Collect.vNext.FieldDefinitions.DropDownFieldDefinition';\nexport const GridFieldType = 'Collect.vNext.FieldDefinitions.GridFieldDefinition';\nexport const CascadingDropDownFieldType = 'Collect.vNext.FieldDefinitions.CascadingDropDownFieldDefinition';\nexport const CascadingDropDownVirtualFieldType = 'Collect.vNext.FieldDefinitions.CascadingDropDownVirtualFieldDefinition';\nexport const AttachmentFieldType = 'Collect.vNext.FieldDefinitions.AttachmentFieldDefinition';\nexport const InstructionsFieldType = 'Collect.vNext.FieldDefinitions.InstructionsFieldDefinition';\nexport const RawHTMLFieldType = 'Collect.vNext.FieldDefinitions.RawHTMLFieldDefinition';\nexport const RichTextFieldType = 'Collect.vNext.FieldDefinitions.RichTextFieldDefinition';\nexport const InlineContentFieldType = 'Collect.vNext.FieldDefinitions.InlineContentFieldDefinition';\nexport const DevOnlyFieldType = 'Collect.vNext.FieldDefinitions.DevOnlyFieldDefinition';\nexport const FootnoteFieldType = 'Collect.vNext.FieldDefinitions.FootnoteFieldDefinition';\nexport const MultiCheckboxFieldType = 'Collect.vNext.FieldDefinitions.MultiCheckBoxFieldDefinition';\nexport const MultiDropDownFieldType = 'Collect.vNext.FieldDefinitions.MultiDropDownFieldDefinition';\r\nexport const FlexibleSelectionFieldType = 'Collect.vNext.FieldDefinitions.FlexibleSelectionFieldDefinition';\r\n\r\n//***Dynamic Fields used in Grid*/\r\nexport const EditorNameFieldType = 'Collect.vNext.FieldDefinitions.EditorNameFieldDefinition';\nexport const LastEditedDateFieldType = 'Collect.vNext.FieldDefinitions.LastEditedDateFieldDefinition';\r\n\n//export const StartShowHideFieldType = 'Collect.vNext.FieldDefinitions.StartShowHideFieldDefinition';\nexport const ShowToFieldType = 'Collect.vNext.FieldDefinitions.VisibilityShowToFieldDefinition';\nexport const HideFromFieldType = 'Collect.vNext.FieldDefinitions.VisibilityHideFromFieldDefinition';\r\nexport const MarkDataReadOnlyFieldType = 'Collect.vNext.FieldDefinitions.VisibilityMarkDataReadOnlyFieldDefinition';\n\nexport const AddRowAboveFieldType = 'Collect.vNext.FieldDefinitions.VisibilityAddRowAboveFieldDefinition';\nexport const AddRowBelowFieldType = 'Collect.vNext.FieldDefinitions.VisibilityAddRowBelowFieldDefinition';\n\nexport const GridCascadingDropDownFieldType = 'Collect.vNext.FieldDefinitions.GridCascadingDropDownFieldDefinition';\n\nexport const ContactsFieldType = 'Collect.vNext.FieldDefinitions.ContactsFieldDefinition';\nexport const CommentsFieldType = 'Collect.vNext.FieldDefinitions.CommentsFieldDefinition';\n\nexport const HTMLLinkFieldType = 'Collect.vNext.FieldDefinitions.HtmlLinkFieldDefinition';\n\n// Define form field type constants for field types only available in the grid form field component.\nexport const FormulaFieldType = 'Collect.vNext.FieldDefinitions.FormulaFieldDefinition';\nexport const UrlBuilderFieldType = 'Collect.vNext.FieldDefinitions.UrlBuilderFieldDefinition';\r\n\r\n// Metadata field definition class name constants.\r\nexport const UserRolesFieldType = 'Collect.vNext.FieldDefinitions.UserRolesFieldDefinition';\r\nexport const WorkflowStateFieldType = 'Collect.vNext.FieldDefinitions.WorkflowStateFieldDefinition';\r\nexport const FolderNameFieldType = 'Collect.vNext.FieldDefinitions.FolderNameFieldDefinition';\r\nexport const FolderPathFieldType = 'Collect.vNext.FieldDefinitions.FolderPathFieldDefinition';\r\nexport const FormInstanceNameFieldType = 'Collect.vNext.FieldDefinitions.FormInstanceNameFieldDefinition';\r\nexport const FormTemplateInstancesFieldType = 'Collect.vNext.FieldDefinitions.FormTemplateInstancesFieldDefinition';\r\nexport const IdFieldType = 'Collect.vNext.FieldDefinitions.IdFieldDefinition';\r\nexport const FavoriteFieldType = 'Collect.vNext.FieldDefinitions.FavoriteFieldDefinition';\r\nexport const MultipleFieldsMetadataFieldType = 'Collect.vNext.FieldDefinitions.MultipleFieldsMetadataFieldDefinition';\n\nexport enum FormFieldTypeEnum {\n ShortTextFieldType = 'Collect.vNext.FieldDefinitions.ShortTextFieldDefinition',\n DateFieldType = 'Collect.vNext.FieldDefinitions.DateFieldDefinition',\n CheckboxFieldType = 'Collect.vNext.FieldDefinitions.CheckBoxFieldDefinition',\n RadioButtonsFieldType = 'Collect.vNext.FieldDefinitions.RadioButtonFieldDefinition',\n IntegerFieldType = 'Collect.vNext.FieldDefinitions.IntegerFieldDefinition',\n DecimalFieldType = 'Collect.vNext.FieldDefinitions.DecimalFieldDefinition',\n CurrencyFieldType = 'Collect.vNext.FieldDefinitions.CurrencyFieldDefinition',\n LabelFieldType = 'Collect.vNext.FieldDefinitions.LabelFieldDefinition',\n DropDownFieldType = 'Collect.vNext.FieldDefinitions.DropDownFieldDefinition',\n GridFieldType = 'Collect.vNext.FieldDefinitions.GridFieldDefinition',\n CascadingDropDownFieldType = 'Collect.vNext.FieldDefinitions.CascadingDropDownFieldDefinition',\n AttachmentFieldType = 'Collect.vNext.FieldDefinitions.AttachmentFieldDefinition',\n //InstructionsFieldType = 'Collect.vNext.FieldDefinitions.InstructionsFieldDefinition',\n RawHTMLFieldType = 'Collect.vNext.FieldDefinitions.RawHTMLFieldDefinition',\n RichTextFieldType = 'Collect.vNext.FieldDefinitions.RichTextFieldDefinition',\n InlineContentFieldType = 'Collect.vNext.FieldDefinitions.InlineContentFieldDefinition',\n MultiCheckboxFieldType = 'Collect.vNext.FieldDefinitions.MultiCheckBoxFieldDefinition',\n MultiDropDownFieldType = 'Collect.vNext.FieldDefinitions.MultiDropDownFieldDefinition',\n\n ShowToFieldType = 'Collect.vNext.FieldDefinitions.VisibilityShowToFieldDefinition',\n HideFromFieldType = 'Collect.vNext.FieldDefinitions.VisibilityHideFromFieldDefinition',\n\n AddRowAboveFieldType = 'Collect.vNext.FieldDefinitions.VisibilityAddRowAboveFieldDefinition',\n AddRowBelowFieldType = 'Collect.vNext.FieldDefinitions.VisibilityAddRowBelowFieldDefinition',\n\n GridCascadingDropDownFieldType = 'Collect.vNext.FieldDefinitions.GridCascadingDropDownFieldDefinition',\n\n ContactsFieldType = 'Collect.vNext.FieldDefinitions.ContactsFieldDefinition',\n CommentsFieldType = 'Collect.vNext.FieldDefinitions.CommentsFieldDefinition',\n HTMLLinkFieldType = 'Collect.vNext.FieldDefinitions.HtmlLinkFieldDefinition', //TEAMS-835: KLW - Needed for the HTML Link form field\r\n FormTemplateInstancesFieldDefinition = 'Collect.vNext.FieldDefinitions.FormTemplateInstancesFieldDefinition',\r\n\r\n EditorNameFieldType = 'Collect.vNext.FieldDefinitions.EditorNameFieldDefinition',\n LastEditedDateFieldType = 'Collect.vNext.FieldDefinitions.LastEditedDateFieldDefinition'\n\n}\nexport enum FormFieldTypePrettyNamesEnum {\n ShortTextFieldType = 'Short Text',\n DateFieldType = 'Date',\n CheckboxFieldType = 'Check Box',\n RadioButtonsFieldType = 'Radio Buttons',\n IntegerFieldType = 'Integer',\n DecimalFieldType = 'Decimal',\n CurrencyFieldType = 'Currency',\n LabelFieldType = 'Label',\n DropDownFieldType = 'Drop-down',\n GridFieldType = 'Grid',\n CascadingDropDownFieldType = 'Cascading Drop-down',\n AttachmentFieldType = 'Attachment',\n //InstructionsFieldType = 'InstructionsFieldDefinition',\n RawHTMLFieldType = 'Raw HTML',\n RichTextFieldType = 'Rich Text',\n InlineContentFieldType = 'Inline Content',\n MultiCheckboxFieldType = 'Multiselected Check Box',\n MultiDropDownFieldType = 'Multiselected Drop-down',\n\n ShowToFieldType = 'Show To',\n HideFromFieldType = 'Hide From',\n\n AddRowAboveFieldType = 'Add Row Above',\n AddRowBelowFieldType = 'Add Row Below',\n\n GridCascadingDropDownFieldType = 'Grid Cascading Drop-down',\n\n ContactsFieldType = 'Contacts',\n CommentsFieldType = 'Comments',\n\n HTMLLinkFieldType = 'HTML Link', //TEAMS-835: KLW - Needed for the HTML Link form field\r\n\r\n EditorNameFieldType = 'Editor Name',\n LastEditedDateFieldType = 'Last Edited Date'\n}\n\n// Export an enum of control type hints.\nexport enum FieldControlTypeHint { // Listed in alphabetical order.\n DATE_INPUT = 'date',\n MULTI_SELECT_INPUT = 'multi-select',\n NONE = 'none',\n NUMERIC_INPUT = 'numeric input',\n SELECT_INPUT = 'select',\n TEXT_INPUT = 'input'\n}\n","import { Type } from 'class-transformer';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { Share } from '../share.model';\r\n\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\nimport { CsvOptionsFileData } from '../../models/csv-data/csv-options-file-data.model';\r\nimport { IFormFieldConstraintLiaison } from '../../components/form-builder/properties/form-field-properties/constraints/ifield-constraint-liason.interface';\r\nimport { IFormFieldConstraint } from '../../interfaces/iform-field-constraint.interface';\r\nimport { FixedFirstColumnValues } from '../grid/fixed-first-column-values.model';\r\nimport { CascadingDropDownFormFieldConfig } from '../cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../cascading-dropdown/cascading-dropdown-data.model';\r\nimport { GridCascadingDropDownFormFieldComponent } from '../../components/form-fields/grid-cascading-dropdown/grid-cascading-dropdown.component';\r\nimport { FormFieldListConstraintColumn } from '../../components/form-builder/field-configuration/flexible-selection-field-configuration/flexible-selection-field-configuration.component';\r\nimport { JavaScriptUtil } from '../../utility-classes/javascript.util';\r\n\r\n// Define an internally used class.\r\nclass FieldDefinitionMetadata {\r\n public fieldDefinitionClassName: string;\r\n public shortFieldDefClassName: string; // Future (if needed).\r\n\r\n public isNumeric: boolean;\r\n public isTextual: boolean;\r\n public isFootnote: boolean; // Added 05-13-2022.\r\n\r\n public controlTypeHint: string;\r\n\r\n public formInstElemPropName: string; // The string selector to use to get a value ...\r\n // ... from an instance of class FormInstanceElement.\r\n}\r\ninterface IFieldDefinitionMetadataByFieldDefName {\r\n [fieldDefinitionName: string]: FieldDefinitionMetadata;\r\n}\r\n\r\n// Define a display form enum.\r\nexport enum DisplayFormatEnum {\r\n HORIZONTAL = 'Horizontal',\r\n HORIZONTALTABS = 'Horizontal Tabs',\r\n VERTICAL = 'Vertical'\r\n}\r\n\r\n// Define a class for managing grid cascading dropdown virtual form field runtime resources.\r\nexport class GridCascadingDropDownRuntimeData {\r\n public config: CascadingDropDownFormFieldConfig;\r\n public data: CascadingDropDownFormFieldData;\r\n public primaryComponent: GridCascadingDropDownFormFieldComponent;\r\n\r\n public constructor(config: CascadingDropDownFormFieldConfig) {\r\n this.config = config;\r\n }\r\n}\r\n\r\nexport class SecondaryGridCascadingFieldTransientData {\r\n public transientPrimaryGridCascadingDropDownComponent: GridCascadingDropDownFormFieldComponent; // NOTE: THIS PROPERTY CAN REPLACE THE TWO PRIOR PROPERTIES.\r\n public transientCascadingDropdownConfig: CascadingDropDownFormFieldConfig; // 09-08-2022 note: this value is set for form fields other than the first grid cascading dropdown form field.\r\n public transientCascadingDropdownData: CascadingDropDownFormFieldData;\r\n\r\n public constructor(transientPrimaryGridCascadingDropDownComponent: GridCascadingDropDownFormFieldComponent, transientCascadingDropdownConfig: CascadingDropDownFormFieldConfig, transientCascadingDropdownData: CascadingDropDownFormFieldData) {\r\n this.transientPrimaryGridCascadingDropDownComponent = transientPrimaryGridCascadingDropDownComponent;\r\n this.transientCascadingDropdownConfig = transientCascadingDropdownConfig;\r\n this.transientCascadingDropdownData = transientCascadingDropdownData;\r\n }\r\n}\r\n\r\n// Define, export class FormField.\r\nexport class FormField implements IViewModel, ICloneAndCopy {\r\n public id: number = 0; // Database Id\r\n\r\n public clientId: number = 0; // Transient, client-side only Id.\r\n\r\n // Note: the following Id is managed by a grid, essentially within its own name space.\r\n public gridColClientId: number = 0; // Like the above 'clientId' but only used for grid column form fields.\r\n\r\n public isDeleted: boolean = false;\r\n public transientIsDeleted: boolean = false; // Added 08-04-2022: used for show to/hide from logic in form 'Preview' mode.\r\n\r\n public name: string;\r\n public transientNameUsedWhileEditingName: string;\r\n public get Name(): string {\r\n return this.name;\r\n }\r\n public set Name(value: string) {\r\n this.name = value;\r\n }\r\n\r\n public alias: string; // Added for VNEXT-900 -- enables aliasing of columns in a FormTemplateInstance Grid\r\n\r\n public transientToBeAppliedInternalName: string;\r\n\r\n public fieldDefinitionClassName: string;\r\n public fieldGroup: string;\r\n public required: boolean;\r\n\r\n // Display\r\n public displayName: string;\r\n public displayFormat: string;\r\n public blankValue: string;\r\n public helpText: string;\r\n public helpTextFormat: string;\r\n public defaultValue: string;\r\n public placeholderText: string;\r\n public toolTip: string;\r\n public displayRows: string;\r\n public gridColumnWidth: number;\r\n\r\n // added for VNEXT-1155 to allow standard attachments fields (which are virtual) to NOT display in the Grid\r\n // NOTE: currently this is only set in code, it's not configurable via the property drawer\r\n public doNotDisplayInGrid: boolean; \r\n\r\n public selectOptions: string;\r\n public maxSelections: number; // added for VNEXT-1193 (multi select flex fields)\r\n public transientParsedSelectOptions: string[]; // Not saved on the server.\r\n public selectOptionsConstraintId: number = null; //0;\r\n public selectOptionsConstraintName: string;\r\n public selectOptionsConstraintValue: string;\r\n\r\n // Undelete\r\n public iconName: string;\r\n public iconType: string;\r\n\r\n //public modifiedDate: Date;\r\n public createdDate: Date;\r\n public createdBy: string;\r\n public modifiedDate: Date;\r\n public modifiedBy: string;\r\n\r\n //TEAMS-424: KLW - Add the view model property to determine if a form field has an annotation\r\n public hasFootnote: boolean = false;\r\n public isFootnote: boolean = false;\r\n\r\n //VNEXT-384: KLW - Implementing Autocomplete\r\n public autocomplete: boolean = false;\r\n\r\n //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n public autocomplete_StartsWith: boolean = false;\r\n public autocomplete_Contains: boolean = false;\r\n\r\n //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n public displayKendoGridRows: number; //default\r\n\r\n // Universal values\r\n public jsonConfig: string;\r\n\r\n // Cascading dropdown properties.\r\n public cascadingDropdownConstraintId: number = null; //0;\r\n public cascadingDropdownConstraintName: string;\r\n public cascadingDropdownConstraintValue: string;\r\n public transientShowCascadingDropdownIndicesInPreviewMode: boolean;\r\n\r\n // String values\r\n public maxLength: number;\r\n\r\n public regex: string;\r\n public regularExpressionConstraintMessage: string;\r\n public regularExpressionConstraintId: number = null; //0;\r\n public regularExpressionConstraintName: string;\r\n public regularExpressionConstraintValue: string;\r\n\r\n // Numeric values\r\n public minValue: number;\r\n public maxValue: number;\r\n public numericRangeConstraintId: number = null;\r\n public numericRangeConstraintName: string;\r\n public numericRangeConstraintMinValue: number;\r\n public numericRangeConstraintMaxValue: number;\r\n\r\n public numDigitsAfterDecimalPoint: number = 2; // A default value.\r\n public roundToNumDigitsAfterDecimalPoint: number = 2; // A default value.\r\n public showTrailingZeroesAfterDecimalPoint: boolean;\r\n\r\n // Date values.\r\n public minDate: string; // Must be parseable by Date.parse().\r\n public maxDate: string; // Must be parseable by Date.parse().\r\n public dateRangeConstraintId: number = null; //0;\r\n public dateRangeConstraintName: string;\r\n public dateRangeConstraintMinDate: string;\r\n public dateRangeConstraintMaxDate: string;\r\n\r\n // New list value constraints: simple list value constraint and cascading list value constraint.\r\n public formFieldListConstraintColumns: FormFieldListConstraintColumn[]; // support association of multiple constraint columns with the form field\r\n public ListConstraintColumnId: number; // the id of the record which represents the column within a cascade that this field renders options for\r\n public dependsOnParentFormFieldId: number; // the id of the record that represents the field within a cascade that determines options for this field\r\n public listValuesConstraintId: number = null; // Note: this is the same Id for either type of list values constraint.\r\n public simpleListValuesConstraintValue: string;\r\n public cascadingListValuesConstraintValue: string;\r\n public fieldHasConfiguration: boolean = false; //show configuration panel in form designer\r\n\r\n public listValuesConstraintName: string = ''; // Note: this is the same name for either type of list values constraint.\r\n public listConstraintColumnName: string = '';\r\n public dependsOnParentFormFieldName: string = '';\r\n public dependsOnParentFormFieldDefinitionClassName: string = null; // added for metadata field handling\r\n\r\n // Custom values\r\n public customValidationCriteria: string;\r\n\r\n // Grid-related values.\r\n public readOnly: boolean;\r\n // Note: sometimes it's helpful to wrap an attribute, in the following case 'readOnly',\r\n // with accessor methods during troubleshooting and possibly development.\r\n /*\r\n public _readOnly: boolean;\r\n public set readOnly(value: boolean) {\r\n this._readOnly = value;\r\n }\r\n public get readOnly(): boolean {\r\n return this._readOnly;\r\n }\r\n */\r\n\r\n // Define attributes related to constraints.\r\n public constraintName: string;\r\n public constraintJson: string;\r\n\r\n public fieldOrder: number; // Added 06-12-2020.\r\n public primaryFieldName: string; // Added 09-06-2022 to support grid cascading dropdown form fields.\r\n public fieldSecondaryOrder: number; // Added 08-31-2022 to help with grid cascading dropdown fields.\r\n\r\n // isMetadataField.\r\n public isMetadataField: boolean;\r\n public multipleFieldIds: string;\r\n\r\n // 04-09-2024 Note: if the 'GridKeyColumns' (next) value is set to one, it means that the \r\n // first column in the associated grid field ('GridKeyColumns' only applies\r\n // to grid form fields) comprises each grid row's unique key. If the value\r\n // is set to two or more, it means that the first N columns in the grid's \r\n // definition comprise the grid's composite key.\r\n //\r\n // Grid with any type of key, a single column key or a composite key, can\r\n // only be manipulated using grid Excel data imports; that is, users cannot\r\n // edit the rows for such grids.\r\n //\r\n // When Excel import data references a key that already exists in the grid,\r\n // the existing row must be deleted and a new row with the same row number\r\n // added to replace it.\r\n public gridKeyColumns: number = 0;\r\n\r\n public hideGridFiltering: boolean; // https://maxjira.max.gov/browse/VNEXT-1252\r\n public disableGridGrouping: boolean; // https://maxjira.max.gov/browse/VNEXT-1271\r\n public disableGridRowDeleteForNonAdmins: boolean; // VNEXT-1515\r\n\r\n public formsGridOrdersJson: string; // https://maxjira.max.gov/browse/VNEXT-1305\r\n\r\n // Implement methods.\r\n public setSelectOptions(selectOptions: string) {\r\n this.selectOptions = selectOptions;\r\n }\r\n\r\n public get GetDisplayKendoGridRows() {\r\n return this.displayKendoGridRows;\r\n }\r\n\r\n // Define transient grid cascading dropdown data.\r\n public transientVirtualFormFields: FormField[]; // 09-08-2022 note: this value is only set for the first of N grid cascading dropdown form fields.\r\n public get TransientVirtualFormFields(): FormField[] {\r\n return this.transientVirtualFormFields;\r\n }\r\n public setTransientVirtualFormFields(value: FormField[]): void {\r\n this.transientVirtualFormFields = value;\r\n }\r\n public setTransientVirtualFormField(index: number, value: FormField): void {\r\n if ((this.transientVirtualFormFields != null) && (this.transientVirtualFormFields.length > index))\r\n this.transientVirtualFormFields[index] = value;\r\n }\r\n public setupSecondaryFieldTransientData(component: GridCascadingDropDownFormFieldComponent, config: CascadingDropDownFormFieldConfig, data: CascadingDropDownFormFieldData): void {\r\n for (let index: number = 0; index < this.transientVirtualFormFields.length; index++) {\r\n let virtualFormField: FormField = this.transientVirtualFormFields[index];\r\n\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n //virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = component;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = config;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData = data;\r\n }\r\n }\r\n public configureAnySecondaryComponents(component: GridCascadingDropDownFormFieldComponent): void {\r\n if (this.transientVirtualFormFields != null) {\r\n for (let index: number = 0; index < this.transientVirtualFormFields.length; index++) {\r\n let virtualFormField: FormField = this.transientVirtualFormFields[index];\r\n //virtualFormField.transientCascadingDropdownData = this.myData;\r\n //virtualFormField.transientCascadingDropdownData = this.dropDownData;\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n //virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n //virtualFormField.transientPrimaryGridCascadingDropDownComponent = this;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = component;\r\n }\r\n }\r\n }\r\n public secondaryGridCascadingFieldTransientData: SecondaryGridCascadingFieldTransientData = null;\r\n public transientFieldIsVirtual: boolean = false;\r\n public removeAnyCircularDependencies(): void {\r\n //if (this.IsPrimaryCascadingField) {\r\n if (!this.transientFieldIsVirtual) {\r\n // We need to set property 'transientVirtualFormFields' to null prior to a save\r\n // as it would cause a JSON serialization exception. Since this form field type\r\n // is only used in grids, and grid form fields components are deleted/destroyed\r\n // as a part of a grid save operation, there is no need to restore the value for\r\n // this property.\r\n if (this.transientVirtualFormFields != null)\r\n this.transientVirtualFormFields = null;\r\n } else if ((this.secondaryGridCascadingFieldTransientData != null) && (this.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent != null)) {\r\n // This property needs to be set to null for the same reason as in the prior block.\r\n this.secondaryGridCascadingFieldTransientData.transientPrimaryGridCascadingDropDownComponent = null;\r\n }\r\n\r\n if (this.childFormFields != null) {\r\n for (let index: number = 0; index < this.childFormFields.length; index++) {\r\n let childField: FormField = this.childFormFields[index];\r\n childField.removeAnyCircularDependencies();\r\n }\r\n }\r\n }\r\n\r\n public isHidden: boolean; // Added 04-24-2020.\r\n\r\n // A formula/calculation (added 05-05-2020)\r\n public formula: string;\r\n public transientFormulaError: string; // Note: this field is not saved in the database.\r\n public roundResultToWholeNumber: boolean; // Added 04-26-2023\r\n public showDigitsWithCommandSeparators: boolean; // Added 04-26-2023\r\n public showDollarSignPrefix: boolean; // Added 04-26-2023\r\n\r\n public transientUrlBuilderUrlTemplate: string; // Added 10-17-2024 (gets saved into UrlBuilderConfigJson column of FormField in the DB)\r\n public transientUrlBuilderButtonLabel: string // Added 10-17-2024 (gets saved into UrlBuilderConfigJson column of FormField in the DB)\r\n\r\n public instructionsText: string; // Added 05-20-2020.\r\n public htmlText: string; // Added 05-20-2020.\r\n public iframeSource: string; // pharv added 4/18/22\r\n\r\n public showPreview: boolean; // Added 10-06-2020.\r\n\r\n public showFooter: boolean; // Added 01-16-2021.\r\n\r\n // Define a property used by the contacts form field component.\r\n public contactFieldNames: string;\r\n\r\n // 07-05-2022: added a property for a grid's optional fixed first column of data.\r\n public fixedFirstColumnJson: string = null;\r\n\r\n public valuesAreFixed: boolean = false;\r\n public transientFixedFirstColumnValues: FixedFirstColumnValues = null;\r\n\r\n // Define properties related to conditional section/set of rows display logic.\r\n public isConditionalBeginElement: boolean; // Note: need to add to the server's FormField definition.\r\n public isConditionalEndElement: boolean; // Note: need to add to the server's FormField definition.\r\n public matchingBeginOrEndFieldName: string; // Note: this property, saved in the database, tells us the identity of the matching conditional field.\r\n public transientConditionalNestingLevel: number = 0; // 0 => no conditional logic; 1 => one conditional field; 2 => one conditional within another; and so on.\r\n public transientMatchingBeginOrEndField: FormField = null; // Note: this is not persisted in a database.\r\n // Note: property 'transientBeginFieldDisplayName', next, allows a conditional end field to display a meaningful name during a form save operation.\r\n public transientBeginFieldDisplayName: string = null; // Note: this is not persisted in a database.\r\n public cannotBeSplitOnForm: boolean = false; // Note: need to add to the server's FormField definition.\r\n public showToHideFromRoleNames: string;\r\n // End properties related to conditional section/set of rows display logic.\r\n\r\n // 06-15-2023: add a couple of grid-related properties.\r\n public gridColumnBehavior: string = \"ShowInRowDataOnly\";\r\n public gridColumnCanBeEditedByRoles: string = null;\r\n public gridColumnCanBeViewedByRoles: string = null;\r\n public gridFormLayout: string = null; // For likely future use.\r\n\r\n public formTemplateId: number = 0;\r\n public selectedFormTemplateIds: string = null;\r\n\r\n // Begin fields related to a site home page template instances grid. \r\n public formTemplateInstancesGridJsonConfig: string; // Saved as a JSON string, storing configurations for configured fields.\r\n public openFormInstancesInNewTab: boolean = false;\r\n public formTemplateInstanceActionButtonsConfig: string = null;\r\n public enableSimpleFormGridDisplay: boolean = false;\r\n // End fields related to a site home page template instances grid.\r\n\r\n // Begin fields related to a custom site banner.\r\n public centerBannerText: string;\r\n public leftBannerText: string;\r\n public rightBannerText: string;\r\n // End fields related to a custom site banner.\r\n\r\n // Begin fields related to a grid field custom Excel import/export template.\r\n public excelImportExportTemplateBase64Encoded: string;\r\n public excelImportExportTemplateStartingRowIndex: number;\r\n public excelImportExportTemplateStartingColumnIndex: number;\r\n // End fields related to a grid field custom Excel import/export template.\r\n\r\n public hideFormFieldBody: boolean; // VNEXT-1378: optional hiding of a grid's body when only Excel import and export are allowed (no direct user data entry).\r\n\r\n public hideStructureComponent: boolean = false;\r\n public hideLeftSideMenu: boolean = false;\r\n\r\n // Transient/not-persisted values.\r\n public base64FileReadResult: string;\r\n public csvOptionsData: CsvOptionsFileData;\r\n\r\n // 07-02-2024 note: added the following property, derived rather than saved in the database, to allow a forms grid\r\n // to know if it has pending conditional logic, specifically a pending filter operation.\r\n public hasPendingConditionalLogic: boolean;\r\n\r\n // 09-06-2024 note: added the following property that is not stored in the database but rather\r\n // derived from other data. Sending this back to the client allows the client to\r\n // suppress/hide form instance fields that are subject to field conditional logic.\r\n public fieldIsTargetOfConditionalLogic: boolean;\r\n public fieldIsSourceOfConditionalLogic: boolean; // Added 01-22-2025 to help reduce calls to the server (for fields that are not sources of conditional logic).\r\n public fieldIsAlwaysShown: boolean;\r\n\r\n // Define a method for informing a form field of a constraint update.\r\n // This technique could be used for other property updates, for for\r\n // now it is being used only for constraints.\r\n private noopConstraintUpdated(updatedConstraint: IFormFieldConstraint, constraintLiaison: IFormFieldConstraintLiaison): void {\r\n // NOTE: THIS METHOD IS A NOOP BY DESIGN.\r\n }\r\n private constraintUpdatedCallback: (IFormFieldConstraint, IFormFieldConstraintLiaison) => void = this.noopConstraintUpdated;\r\n public constraintUpdated(updatedConstraint: IFormFieldConstraint, formFieldConstraintLiaison: IFormFieldConstraintLiaison): void {\r\n this.constraintUpdatedCallback(updatedConstraint, formFieldConstraintLiaison);\r\n }\r\n public setConstraintUpdatedCallback(callback: (IFormFieldConstraint, IFormFieldConstraintLiaison) => void): void {\r\n this.constraintUpdatedCallback = callback;\r\n }\r\n public resetConstraintUpdatedCallback(): void {\r\n this.constraintUpdatedCallback = this.noopConstraintUpdated;\r\n }\r\n public defaultAcceptsConstraintUpdateFrom(formField: FormField): boolean {\r\n // Note: this default representation returns false.\r\n return false;\r\n }\r\n private acceptsConstraintUpdateFromCallback: (FormField) => boolean = this.defaultAcceptsConstraintUpdateFrom;\r\n public acceptsConstraintUpdateFrom(formField: FormField): boolean {\r\n return this.acceptsConstraintUpdateFromCallback(formField);\r\n }\r\n public setAcceptsConstraintUpdateFrom(callback: (FormField) => boolean): void {\r\n this.acceptsConstraintUpdateFromCallback = callback;\r\n }\r\n public resetAcceptsConstraintUpdateFromCallback(): void {\r\n this.acceptsConstraintUpdateFromCallback = this.defaultAcceptsConstraintUpdateFrom;\r\n }\r\n // End properties/methods related to constraint updates.\r\n\r\n // For sharing this form field.\r\n @Type(() => Share)\r\n public share: Share;\r\n\r\n // Child form fields (for the grid form field)\r\n @Type(() => FormField)\r\n public childFormFields: FormField[] = [];\r\n\r\n public parentFormField: FormField;\r\n public parentFormFieldId: number;\r\n\r\n // Define transient, client-side only data.\r\n private fieldDefMetadata: FieldDefinitionMetadata = null;\r\n public transientSelectedGridRow: number = -1; // Used by a grid to 'remember' the selected row.\r\n\r\n // 06-18-2022 note: adding a new property, 'formFieldNumberOnClient'\r\n // to assign each form field a unique id to facilitate troubleshooting.\r\n //\r\n // Static property 'numFormFieldsCreatedOnClient' is used to keep\r\n // track of the number of form field objects created on the client.\r\n public readonly formFieldNumberOnClient: number;\r\n private static numFormFieldsCreatedOnClient: number = 0;\r\n\r\n // Constructor.\r\n public constructor() {\r\n this.formFieldNumberOnClient = ++FormField.numFormFieldsCreatedOnClient;\r\n return;\r\n }\r\n\r\n //TEAMS-424: KLW - Method to call from Form Wrapper to see if a form field has an annotation\r\n public get HasFootnote() {\r\n return this.hasFootnote;\r\n }\r\n\r\n // Method for understanding a form field's metadata.\r\n /*\r\n public get IsNumeric(): boolean {\r\n this.getMetadata();\r\n\r\n return (this.fieldDefMetadata.isNumeric);\r\n }\r\n\r\n public get IsTextual(): boolean {\r\n this.getMetadata();\r\n\r\n return (this.fieldDefMetadata.isTextual);\r\n }\r\n\r\n public get IsShowToOrHideFromField(): boolean {\r\n return ((this.fieldDefinitionClassName == ShowToFieldType) || (this.fieldDefinitionClassName == HideFromFieldType));\r\n }\r\n\r\n public get ControlTypeHint(): string {\r\n this.getMetadata();\r\n\r\n return (this.fieldDefMetadata.controlTypeHint);\r\n }\r\n\r\n public get FormInstanceElementPropName(): string {\r\n this.getMetadata();\r\n\r\n return (this.fieldDefMetadata.formInstElemPropName);\r\n }\r\n */\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n //console.log('FormField.clone()');\r\n\r\n let clone: FormField = new FormField();\r\n\r\n clone.id = this.id;\r\n\r\n clone.clientId = this.clientId;\r\n\r\n clone.gridColClientId = this.gridColClientId;\r\n\r\n clone.isDeleted = this.isDeleted;\r\n\r\n clone.name = this.name;\r\n\r\n clone.fieldDefinitionClassName = this.fieldDefinitionClassName;\r\n clone.fieldGroup = this.fieldGroup;\r\n\r\n clone.required = this.required;\r\n\r\n clone.displayName = this.displayName;\r\n clone.displayFormat = this.displayFormat;\r\n clone.blankValue = this.blankValue;\r\n\r\n clone.helpText = this.helpText;\r\n clone.helpTextFormat = this.helpTextFormat;\r\n\r\n clone.defaultValue = this.defaultValue;\r\n\r\n clone.placeholderText = this.placeholderText;\r\n clone.toolTip = this.toolTip;\r\n\r\n clone.displayRows = this.displayRows;\r\n\r\n clone.selectOptions = this.selectOptions;\r\n clone.selectOptionsConstraintId = this.selectOptionsConstraintId;\r\n clone.selectOptionsConstraintName = this.selectOptionsConstraintName;\r\n clone.selectOptionsConstraintValue = this.selectOptionsConstraintValue;\r\n\r\n clone.hasFootnote = this.hasFootnote;\r\n\r\n clone.jsonConfig = this.jsonConfig;\r\n clone.cascadingDropdownConstraintId = this.cascadingDropdownConstraintId;\r\n clone.cascadingDropdownConstraintName = this.cascadingDropdownConstraintName;\r\n clone.cascadingDropdownConstraintValue = this.cascadingDropdownConstraintValue;\r\n\r\n clone.maxLength = this.maxLength;\r\n\r\n clone.regex = this.regex;\r\n clone.regularExpressionConstraintId = this.regularExpressionConstraintId;\r\n clone.regularExpressionConstraintName = this.regularExpressionConstraintName;\r\n clone.regularExpressionConstraintValue = this.regularExpressionConstraintValue;\r\n clone.regularExpressionConstraintMessage = this.regularExpressionConstraintMessage;\r\n\r\n clone.minValue = this.minValue;\r\n clone.maxValue = this.maxValue;\r\n clone.numericRangeConstraintId = this.numericRangeConstraintId;\r\n clone.numericRangeConstraintName = this.numericRangeConstraintName;\r\n clone.numericRangeConstraintMinValue = this.numericRangeConstraintMinValue;\r\n clone.numericRangeConstraintMaxValue = this.numericRangeConstraintMaxValue;\r\n\r\n clone.numDigitsAfterDecimalPoint = this.numDigitsAfterDecimalPoint;\r\n clone.roundToNumDigitsAfterDecimalPoint = this.roundToNumDigitsAfterDecimalPoint;\r\n\r\n clone.minDate = this.minDate;\r\n clone.maxDate = this.maxDate;\r\n clone.dateRangeConstraintId = this.dateRangeConstraintId;\r\n clone.dateRangeConstraintName = this.dateRangeConstraintName;\r\n clone.dateRangeConstraintMinDate = this.dateRangeConstraintMinDate;\r\n clone.dateRangeConstraintMaxDate = this.dateRangeConstraintMaxDate;\r\n\r\n clone.customValidationCriteria = this.customValidationCriteria;\r\n\r\n clone.readOnly = this.readOnly;\r\n\r\n clone.constraintName = this.constraintName;\r\n clone.constraintJson = this.constraintJson;\r\n\r\n clone.fieldOrder = this.fieldOrder;\r\n clone.primaryFieldName = this.primaryFieldName;\r\n\r\n clone.isHidden = this.isHidden;\r\n\r\n clone.formula = this.formula;\r\n clone.transientFormulaError = this.transientFormulaError;\r\n clone.roundResultToWholeNumber = this.roundResultToWholeNumber;\r\n clone.showDigitsWithCommandSeparators = this.showDigitsWithCommandSeparators;\r\n clone.showDollarSignPrefix = this.showDollarSignPrefix;\r\n\r\n clone.instructionsText = this.instructionsText;\r\n clone.htmlText = this.htmlText;\r\n\r\n clone.showPreview = this.showPreview;\r\n clone.showFooter = this.showFooter;\r\n\r\n clone.contactFieldNames = this.contactFieldNames;\r\n\r\n clone.fixedFirstColumnJson = this.fixedFirstColumnJson;\r\n clone.valuesAreFixed = this.valuesAreFixed;\r\n clone.transientFixedFirstColumnValues = this.transientFixedFirstColumnValues;\r\n\r\n // Begin properties related to conditional section/set of rows display logic.\r\n clone.isConditionalBeginElement = this.isConditionalBeginElement;\r\n clone.isConditionalEndElement = this.isConditionalEndElement;\r\n clone.cannotBeSplitOnForm = this.cannotBeSplitOnForm;\r\n clone.showToHideFromRoleNames = this.showToHideFromRoleNames;\r\n // End properties related to conditional section/set of rows display logic.\r\n\r\n clone.gridColumnBehavior = this.gridColumnBehavior;\r\n clone.gridColumnCanBeEditedByRoles = this.gridColumnCanBeEditedByRoles;\r\n clone.gridColumnCanBeViewedByRoles = this.gridColumnCanBeViewedByRoles;\r\n clone.gridFormLayout = this.gridFormLayout;\r\n\r\n clone.formTemplateId = this.formTemplateId;\r\n clone.selectedFormTemplateIds = this.selectedFormTemplateIds;\r\n\r\n //clone.selectedFormTemplatePropertyNames = this.selectedFormTemplatePropertyNames;\r\n clone.formTemplateInstancesGridJsonConfig = this.formTemplateInstancesGridJsonConfig;\r\n clone.openFormInstancesInNewTab = this.openFormInstancesInNewTab;\r\n clone.formTemplateInstanceActionButtonsConfig = this.formTemplateInstanceActionButtonsConfig;\r\n clone.enableSimpleFormGridDisplay = this.enableSimpleFormGridDisplay;\r\n\r\n clone.centerBannerText = this.centerBannerText;\r\n clone.leftBannerText = this.leftBannerText;\r\n clone.rightBannerText = this.rightBannerText;\r\n\r\n clone.autocomplete = this.autocomplete;\r\n clone.autocomplete_Contains = this.autocomplete_Contains;\r\n clone.autocomplete_StartsWith = this.autocomplete_StartsWith;\r\n\r\n clone.displayKendoGridRows = this.displayKendoGridRows; //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n\r\n clone.excelImportExportTemplateBase64Encoded = this.excelImportExportTemplateBase64Encoded;\r\n clone.excelImportExportTemplateStartingRowIndex = this.excelImportExportTemplateStartingRowIndex;\r\n clone.excelImportExportTemplateStartingColumnIndex = this.excelImportExportTemplateStartingColumnIndex;\r\n\r\n clone.hideStructureComponent = this.hideStructureComponent;\r\n clone.hideLeftSideMenu = this.hideLeftSideMenu;\r\n\r\n clone.base64FileReadResult = this.base64FileReadResult;\r\n clone.csvOptionsData = this.csvOptionsData;\r\n\r\n // 10-04-2022 note: added the following lines to copy properties that were not being copied in this method.\r\n clone.iframeSource = this.iframeSource;\r\n clone.iconName = this.iconName;\r\n clone.iconType = this.iconType;\r\n clone.fieldSecondaryOrder = this.fieldSecondaryOrder;\r\n clone.matchingBeginOrEndFieldName = this.matchingBeginOrEndFieldName;\r\n clone.createdBy = this.createdBy;\r\n clone.createdDate = this.createdDate;\r\n clone.modifiedBy = this.modifiedBy;\r\n clone.modifiedDate = this.modifiedDate;\r\n\r\n clone.transientVirtualFormFields = this.transientVirtualFormFields;\r\n // End 10-04-2022 changes.\r\n\r\n clone.listValuesConstraintId = this.listValuesConstraintId;\r\n clone.ListConstraintColumnId = this.ListConstraintColumnId;\r\n\r\n clone.isMetadataField = this.isMetadataField;\r\n clone.multipleFieldIds = this.multipleFieldIds;\r\n\r\n clone.gridKeyColumns = this.gridKeyColumns;\r\n\r\n clone.hideGridFiltering = this.hideGridFiltering;\r\n clone.disableGridGrouping = this.disableGridGrouping;\r\n\r\n if (this.share != null) {\r\n let shareCopy: Share = this.share.clone();\r\n\r\n clone.share = shareCopy;\r\n } else\r\n clone.share = null;\r\n\r\n if (this.childFormFields && (this.childFormFields.length > 0)) {\r\n clone.childFormFields = [];\r\n\r\n for (let iChild: number = 0; iChild < this.childFormFields.length; iChild++) {\r\n let childFF: FormField = this.childFormFields[iChild];\r\n\r\n let childFFCopy: FormField = childFF.clone();\r\n clone.childFormFields.push(childFFCopy);\r\n }\r\n }\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopy: ICloneAndCopy): void {\r\n //console.log('FormField.copy()..........................');\r\n let ffToCopy: FormField = objectToCopy;\r\n\r\n this.id = ffToCopy.id;\r\n\r\n this.clientId = ffToCopy.clientId;\r\n\r\n this.gridColClientId = ffToCopy.gridColClientId;\r\n\r\n this.isDeleted = ffToCopy.isDeleted;\r\n\r\n this.name = ffToCopy.name;\r\n\r\n this.fieldDefinitionClassName = ffToCopy.fieldDefinitionClassName;\r\n this.fieldGroup = ffToCopy.fieldGroup;\r\n\r\n this.required = ffToCopy.required;\r\n\r\n this.displayName = ffToCopy.displayName;\r\n this.displayFormat = ffToCopy.displayFormat;\r\n this.blankValue = ffToCopy.blankValue;\r\n\r\n this.helpText = ffToCopy.helpText;\r\n this.helpTextFormat = ffToCopy.helpTextFormat;\r\n\r\n this.defaultValue = ffToCopy.defaultValue;\r\n\r\n this.placeholderText = ffToCopy.placeholderText;\r\n this.toolTip = ffToCopy.toolTip;\r\n\r\n this.displayRows = ffToCopy.displayRows;\r\n\r\n this.selectOptions = ffToCopy.selectOptions;\r\n this.selectOptionsConstraintId = ffToCopy.selectOptionsConstraintId;\r\n this.selectOptionsConstraintName = ffToCopy.selectOptionsConstraintName;\r\n this.selectOptionsConstraintValue = ffToCopy.selectOptionsConstraintValue;\r\n\r\n this.hasFootnote = ffToCopy.hasFootnote;\r\n\r\n this.autocomplete = ffToCopy.autocomplete; //VNEXT-384: KLW - Implementing Autocomplete\r\n\r\n //VNEXT-519: KLW - Refinements to the Type ahead functionality\r\n this.autocomplete_StartsWith = ffToCopy.autocomplete_StartsWith;\r\n this.autocomplete_Contains = ffToCopy.autocomplete_Contains;\r\n\r\n\r\n\r\n this.jsonConfig = ffToCopy.jsonConfig;\r\n this.cascadingDropdownConstraintId = ffToCopy.cascadingDropdownConstraintId;\r\n this.cascadingDropdownConstraintName = ffToCopy.cascadingDropdownConstraintName;\r\n this.cascadingDropdownConstraintValue = ffToCopy.cascadingDropdownConstraintValue;\r\n\r\n this.maxLength = ffToCopy.maxLength;\r\n\r\n this.regex = ffToCopy.regex;\r\n this.regularExpressionConstraintId = ffToCopy.regularExpressionConstraintId;\r\n this.regularExpressionConstraintName = ffToCopy.regularExpressionConstraintName;\r\n this.regularExpressionConstraintValue = ffToCopy.regularExpressionConstraintValue;\r\n\r\n this.minValue = ffToCopy.minValue;\r\n this.maxValue = ffToCopy.maxValue;\r\n this.numericRangeConstraintId = ffToCopy.numericRangeConstraintId;\r\n this.numericRangeConstraintName = ffToCopy.numericRangeConstraintName;\r\n this.numericRangeConstraintMinValue = ffToCopy.numericRangeConstraintMinValue;\r\n\r\n this.numDigitsAfterDecimalPoint = ffToCopy.numDigitsAfterDecimalPoint;\r\n this.roundToNumDigitsAfterDecimalPoint = ffToCopy.roundToNumDigitsAfterDecimalPoint;\r\n\r\n this.minDate = ffToCopy.minDate;\r\n this.maxDate = ffToCopy.maxDate;\r\n this.dateRangeConstraintId = ffToCopy.dateRangeConstraintId;\r\n this.dateRangeConstraintName = ffToCopy.dateRangeConstraintName;\r\n this.dateRangeConstraintMinDate = ffToCopy.dateRangeConstraintMinDate;\r\n this.dateRangeConstraintMaxDate = ffToCopy.dateRangeConstraintMaxDate;\r\n\r\n this.customValidationCriteria = ffToCopy.customValidationCriteria;\r\n\r\n this.readOnly = ffToCopy.readOnly;\r\n\r\n this.constraintName = ffToCopy.constraintName;\r\n this.constraintJson = ffToCopy.constraintJson;\r\n\r\n this.fieldOrder = ffToCopy.fieldOrder;\r\n this.primaryFieldName = ffToCopy.primaryFieldName;\r\n\r\n this.isHidden = ffToCopy.isHidden;\r\n\r\n this.formula = ffToCopy.formula;\r\n this.transientFormulaError = ffToCopy.transientFormulaError;\r\n this.roundResultToWholeNumber = ffToCopy.roundResultToWholeNumber;\r\n this.showDigitsWithCommandSeparators = ffToCopy.showDigitsWithCommandSeparators;\r\n this.showDollarSignPrefix = ffToCopy.showDollarSignPrefix;\r\n\r\n this.instructionsText = ffToCopy.instructionsText;\r\n this.htmlText = ffToCopy.htmlText;\r\n\r\n this.showPreview = ffToCopy.showPreview;\r\n this.showFooter = ffToCopy.showFooter;\r\n\r\n this.contactFieldNames = ffToCopy.contactFieldNames;\r\n\r\n this.fixedFirstColumnJson = ffToCopy.fixedFirstColumnJson;\r\n this.valuesAreFixed = ffToCopy.valuesAreFixed;\r\n this.transientFixedFirstColumnValues = ffToCopy.transientFixedFirstColumnValues;\r\n\r\n // Begin properties related to conditional section/set of rows display logic.\r\n this.isConditionalBeginElement = ffToCopy.isConditionalBeginElement;\r\n this.isConditionalEndElement = ffToCopy.isConditionalEndElement;\r\n this.cannotBeSplitOnForm = ffToCopy.cannotBeSplitOnForm;\r\n this.showToHideFromRoleNames = ffToCopy.showToHideFromRoleNames;\r\n // End properties related to conditional section/set of rows display logic.\r\n\r\n this.gridColumnBehavior = ffToCopy.gridColumnBehavior;\r\n this.gridColumnCanBeEditedByRoles = ffToCopy.gridColumnCanBeEditedByRoles;\r\n this.gridColumnCanBeViewedByRoles = ffToCopy.gridColumnCanBeViewedByRoles;\r\n this.gridFormLayout = ffToCopy.gridFormLayout;\r\n\r\n this.formTemplateId = ffToCopy.formTemplateId;\r\n this.selectedFormTemplateIds = ffToCopy.selectedFormTemplateIds;\r\n \r\n\r\n //this.selectedFormTemplatePropertyNames = ffToCopy.selectedFormTemplatePropertyNames;\r\n this.formTemplateInstancesGridJsonConfig = ffToCopy.formTemplateInstancesGridJsonConfig;\r\n this.openFormInstancesInNewTab = ffToCopy.openFormInstancesInNewTab;\r\n this.formTemplateInstanceActionButtonsConfig = ffToCopy.formTemplateInstanceActionButtonsConfig;\r\n this.enableSimpleFormGridDisplay = ffToCopy.enableSimpleFormGridDisplay;\r\n\r\n this.centerBannerText = ffToCopy.centerBannerText;\r\n this.leftBannerText = ffToCopy.leftBannerText;\r\n this.rightBannerText = ffToCopy.rightBannerText;\r\n\r\n this.autocomplete = ffToCopy.autocomplete;\r\n this.autocomplete_Contains = ffToCopy.autocomplete_Contains;\r\n this.autocomplete_StartsWith = ffToCopy.autocomplete_StartsWith;\r\n\r\n this.displayKendoGridRows = ffToCopy.displayKendoGridRows; //VNEXT-980: KLW - Property to set the number of Kendo grid rows to display\r\n\r\n this.excelImportExportTemplateBase64Encoded = ffToCopy.excelImportExportTemplateBase64Encoded;\r\n this.excelImportExportTemplateStartingRowIndex = ffToCopy.excelImportExportTemplateStartingRowIndex;\r\n this.excelImportExportTemplateStartingColumnIndex = ffToCopy.excelImportExportTemplateStartingColumnIndex;\r\n\r\n this.formTemplateInstancesGridJsonConfig = ffToCopy.formTemplateInstancesGridJsonConfig;\r\n this.hideStructureComponent = ffToCopy.hideStructureComponent;\r\n this.hideLeftSideMenu = ffToCopy.hideLeftSideMenu;\r\n\r\n this.base64FileReadResult = ffToCopy.base64FileReadResult;\r\n this.csvOptionsData = ffToCopy.csvOptionsData;\r\n\r\n this.listValuesConstraintId = ffToCopy.listValuesConstraintId;\r\n this.ListConstraintColumnId = ffToCopy.ListConstraintColumnId;\r\n\r\n this.isMetadataField = ffToCopy.isMetadataField;\r\n this.multipleFieldIds = ffToCopy.multipleFieldIds;\r\n\r\n this.gridKeyColumns = ffToCopy.gridKeyColumns;\r\n\r\n this.hideGridFiltering = ffToCopy.hideGridFiltering;\r\n this.disableGridGrouping = ffToCopy.disableGridGrouping;\r\n\r\n if (ffToCopy.share != null) {\r\n let shareCopy: Share = ffToCopy.share.clone();\r\n\r\n this.share = shareCopy;\r\n }\r\n\r\n if (ffToCopy.childFormFields && (ffToCopy.childFormFields.length > 0)) {\r\n this.childFormFields = [];\r\n\r\n for (let iChild: number = 0; iChild < ffToCopy.childFormFields.length; iChild++) {\r\n let childFF: FormField = ffToCopy.childFormFields[iChild];\r\n\r\n let childFFCopy: FormField = childFF.clone();\r\n this.childFormFields.push(childFFCopy);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public deepCopy(formFieldToCopy: FormField): FormField {\r\n let ffDeepCopy: FormField = null;\r\n\r\n if (formFieldToCopy != null) {\r\n let objectCopy: any = JavaScriptUtil.deepCopy(formFieldToCopy);\r\n ffDeepCopy = plainToClass(FormField, objectCopy);\r\n ffDeepCopy.copy(formFieldToCopy);\r\n }\r\n\r\n return ffDeepCopy;\r\n }\r\n\r\n // Implement methods.\r\n public assignFrom(cloneObj: any): any {\r\n // Original code: assign attributes from the original form field.\r\n for (let attribute in cloneObj) {\r\n this[attribute] = cloneObj[attribute];\r\n }\r\n\r\n // 11-03-2021 new code: any attribute in the updated form field\r\n // that is not in the original form field needs to be reset.\r\n /*\r\n for (let attribute in this) {\r\n if (cloneObj[attribute] == undefined) {\r\n this[attribute] = undefined;\r\n } else if (cloneObj[attribute] == null) {\r\n this[attribute] = null;\r\n }\r\n }\r\n */\r\n\r\n return this;\r\n }\r\n\r\n public static ParseSelectOptions(formField: FormField): string[] {\r\n let arrSelectOptions: string[] = [];\r\n\r\n if ((formField.selectOptions !== undefined) &&\r\n (formField.selectOptions !== null) &&\r\n (formField.selectOptions.trim() !== '')) {\r\n arrSelectOptions = formField.selectOptions.split('|');\r\n }\r\n\r\n return (arrSelectOptions);\r\n }\r\n\r\n public static DateToUtcDate(strDate: string): any {\r\n let iTimeSince_Jan01_1970: number = Date.parse(strDate);\r\n let dateValue: Date = new Date(iTimeSince_Jan01_1970);\r\n //this.convertDateToLocalTime(dateValue);\r\n let strUTCDate: string = dateValue.toISOString();\r\n dateValue = new Date(strUTCDate);\r\n\r\n let hshResult = {\r\n utcDate: strUTCDate,\r\n dateValue: dateValue\r\n }\r\n\r\n return (hshResult);\r\n }\r\n\r\n public static sortFormFieldsAlphabetically(formFields: FormField[]): void {\r\n formFields.sort(this.compareFormFieldsAlphabetically);\r\n }\r\n\r\n // Helper methods.\r\n private static compareFormFieldsAlphabetically = (formField1: FormField, formField2: FormField): number => {\r\n let formField1Name: string = (formField1.displayName != null) && (formField1.displayName.trim() != '') ? formField1.displayName : formField1.name;\r\n let formField2Name: string = (formField2.displayName != null) && (formField2.displayName.trim() != '') ? formField2.displayName : formField2.name;\r\n\r\n let result = formField1Name.localeCompare(formField2Name);\r\n\r\n return result;\r\n }\r\n}\r\n","import { IViewModel } from '../interfaces/view-model.interface';\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\n\nexport class ShareMember implements IViewModel, ICloneAndCopy {\r\n // Properties.\n public id: number;\n\r\n public memberType: string; // User or Group\r\n public member: string; // User or group Id.\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n var memberCopy: ShareMember = new ShareMember();\r\n\r\n memberCopy.id = this.id;\r\n\r\n memberCopy.memberType = this.memberType;\r\n memberCopy.member = this.member;\r\n\r\n return(memberCopy)\r\n }\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n var memberToCopy: ShareMember = objectToCopy;\r\n\r\n this.id = memberToCopy.id;\r\n\r\n this.memberType = memberToCopy.memberType;\r\n this.member = memberToCopy.member;\r\n\r\n return;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { ShareMember } from './share-member.model';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\n\r\nexport class Share implements IViewModel, ICloneAndCopy {\r\n // Properties.\n public id: number;\n\r\n public name: string;\r\n public description: string;\r\n\r\n // Collection properties.\r\n @Type(() => ShareMember)\r\n public shareMembers: ShareMember[] = [];\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: Share = new Share();\r\n\r\n clone.id = this.id;\r\n\r\n clone.name = this.name;\r\n clone.description = this.description;\r\n\r\n clone.shareMembers = [];\r\n if (this.shareMembers && (this.shareMembers.length > 0)) {\r\n for (let iMember: number = 0; iMember < this.shareMembers.length; iMember++) {\r\n let memberToCopy: ShareMember = this.shareMembers[iMember];\r\n\r\n let memberClone: ShareMember = memberToCopy.clone();\r\n clone.shareMembers.push(memberClone);\r\n }\r\n }\r\n\r\n return (clone);\r\n }\r\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let shareToCopy: Share = objectToCopy;\r\n\r\n this.id = shareToCopy.id;\r\n\r\n this.name = shareToCopy.name;\r\n this.description = shareToCopy.description;\r\n\r\n this.shareMembers = [];\r\n if (shareToCopy.shareMembers && (shareToCopy.shareMembers.length > 0)) {\r\n for (let iMember: number = 0; iMember < shareToCopy.shareMembers.length; iMember++) {\r\n let memberToCopy: ShareMember = shareToCopy.shareMembers[iMember];\r\n\r\n let memberClone: ShareMember = memberToCopy.clone();\r\n this.shareMembers.push(memberClone);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n}\r\n","\r\nexport class JavaScriptUtil {\r\n // Note: the following method does not copy methods, so a call to plainToClass() will be\r\n // needed to convert the returned 'zombie' object to a full-fledged object copy.\r\n public static deepCopy(objectToCopy: any): any {\r\n // Note: this deep cpoy technique is discussed in the following article:\r\n // https://medium.com/@ashikmhussain.a/understanding-deep-copy-in-javascript-b1749c54de80\r\n let deepCopy: any = null;\r\n\r\n if (objectToCopy != null) {\r\n let objectJson: string = JSON.stringify(objectToCopy);\r\n deepCopy = JSON.parse(objectJson);\r\n }\r\n\r\n return deepCopy;\r\n }\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { FormInstance } from '../site-content/form-instance.model';\r\nimport { FormInstanceElement } from './form-instance-element.model';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\n\r\n// The motivation for this class is that I didn't want to muddy FormInstanceElement\r\n// by making it implement IListItem, whereas FormInstance already implements it\r\nexport class FormInstanceElementForHistory extends IListItemBase implements IViewModel, IListItem {\r\n public id: number;\r\n\r\n public value: string;\r\n\r\n public comment: string;\r\n\r\n public version: number;\r\n\r\n public formInstanceId: number;\r\n\r\n public formInstanceVersion: number;\r\n\r\n public originalFormInstanceId: number;\r\n\r\n public originalFormInstanceElementId: number;\r\n\r\n public get isOriginalVersion() {\r\n return this.originalFormInstanceElementId === this.id;\r\n }\r\n\r\n // IItem impl...\r\n public name: string;\r\n\r\n public getId(): number {\r\n return this.id;\r\n };\r\n\r\n public getType(): string {\r\n return (ItemTypeEnum.FORM_INSTANCE_ELEMENT_FOR_HISTORY); // TODO\r\n };\r\n\r\n public getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n // IListItem impl...\r\n\r\n public setId(idParam: number): void {\r\n //throw new Error('Method not implemented.');\r\n };\r\n\r\n public getTitle(): string {\r\n return \"\";\r\n };\r\n\r\n public getExtraInfo(): string {\r\n return this.comment ?? \"\";\r\n };\r\n\r\n public getValue(property: string): string {\r\n property = property.toLowerCase();\r\n return this[property];\r\n };\r\n\r\n // Always returns the original/current FormInstance's id, even if this is an older version\r\n public getOriginalVersionId(): number {\r\n return this.version == 0 ? this.id : this.originalFormInstanceId ?? this.id;\r\n }\r\n\r\n public userCanDelete(): boolean {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public getPosition(): number {\r\n return 0;\r\n };\r\n\r\n public modifiedDate: Date;\r\n\r\n public modifiedBy: string;\r\n\r\n public getStatus(): string {\r\n return null;\r\n };\r\n\r\n public getIconType(): IconFormatEnum {\r\n throw new Error('Method not implemented.');\r\n };\r\n public getIcon(): string {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n // 04-13-2022 note: no one was using the following method, setIcon(). Also\r\n // removed its NOOP implementation in a number of classes.\r\n //setIcon(iconParam: string): void;\r\n\r\n public canBeDeleted(): boolean {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public getUniqueId(): string {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public isMagicStructure(): boolean {\r\n throw new Error('Method not implemented.');\r\n };\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n };\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { FormField } from './form-field.model';\r\nimport { GridRowViewModel } from './grid-row.model';\r\n//import { AttachmentReference } from './attachment-reference.model';\r\nimport { AttachmentInfoWithUrls } from '../attachment/attachment-info-with-urls.model';\r\n\r\n// Define the valid values for\r\n// FormInstanceElement property 'valueType'.\r\nexport enum FormInstanceElementValueTypeEnum {\r\n TypeText = 'text',\r\n TypeInteger = 'integer',\r\n TypeDouble = 'double',\r\n TypeDecimal = 'decimal',\r\n TypeBoolean = 'boolean',\r\n\r\n TypeMultiBoolean = 'multiBoolean',\r\n TypeMultiText = 'multiText',\r\n TypeGridRows = 'gridRows'\r\n}\r\n\r\nexport class FormInstanceElement implements IViewModel {\r\n public id: number = 0;\r\n\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n\r\n public formInstanceId: number = -1;\r\n public formFieldId: number = -1;\r\n\r\n public parentFormInstanceElementId: number = -1;\r\n public formField: FormField;\r\n public formFieldName: string;\r\n\r\n //VNEXT-951: KLW - Changes to bypass leave site pop-up warning\r\n private _bypassSitePopUpWarning: boolean = false;\r\n\r\n public valueType: string;\r\n public get ValueType(): string {\r\n return this.valueType;\r\n }\r\n public set ValueType(val: string) {\r\n this.valueType = val;\r\n }\r\n\r\n public intValue: number = 0;\r\n public get IntValue(): number {\r\n return this.intValue;\r\n }\r\n public set IntValue(val: number) {\r\n this.intValue = val;\r\n }\r\n public doubleValue: number = 0.0;\r\n public get DoubleValue(): number {\r\n return this.doubleValue;\r\n }\r\n public set DoubleValue(val: number) {\r\n this.doubleValue = val;\r\n }\r\n\r\n public decimalValue: number = 0.0;\r\n public get DecimalValue(): number {\r\n return this.decimalValue;\r\n }\r\n public set DecimalValue(val: number) {\r\n this.decimalValue = val;\r\n }\r\n // Define a transient/client-only field used by the decimal form field.\r\n public transientOriginalDecimalValue: number;\r\n\r\n public customValue: string = null;\r\n public get CustomValue(): string {\r\n return this.customValue;\r\n }\r\n public set CustomValue(val: string) {\r\n this.customValue = val;\r\n }\r\n public textValue: string = null;\r\n public get TextValue(): string {\r\n return this.textValue;\r\n }\r\n public set TextValue(val: string) {\r\n this.textValue = val;\r\n }\r\n\r\n public booleanValue: boolean = false;\r\n public get BooleanValue(): boolean {\r\n return this.booleanValue;\r\n }\r\n public set BooleanValue(val: boolean) {\r\n this.booleanValue = val;\r\n }\r\n\r\n public isDeleted: boolean = false; // Added 12-30-2020.\r\n\r\n public isGridData: boolean = false; // Added for VNEXT-917 - to indicate that a cell's data in a Home Page comes from a Grid\r\n\r\n public transientGridCascadingDropDownName: string;\r\n\r\n //public formField: FormField;\r\n //public formInstance: FormInstance\r\n // Child element (for the grid form field).\r\n //public childElements: IRowCellDataHash[];\r\n\r\n // 12-31-2020: changed the name of the following property from childElements\r\n // to childGridRows to avoid confusion now that this class also\r\n // contains new member childFormInstanceElements.\r\n public totalChildGridRows: number;\r\n @Type(() => GridRowViewModel)\r\n public childGridRows: GridRowViewModel[];\r\n\r\n // 03-04-2021 note: replaced AttachmentReference\r\n // with AttachmentInfoWithUrls.\r\n /*\r\n @Type(() => AttachmentReference)\r\n public attachmentReferences: AttachmentReference[];\r\n */\r\n @Type(() => AttachmentInfoWithUrls)\r\n public attachmentDetails: AttachmentInfoWithUrls[];\r\n\r\n @Type(() => FormInstanceElement)\r\n public childFormInstanceElements: FormInstanceElement[];\r\n\r\n // 02-22-2021 note: added the following properties for footnotes.\r\n public totalFootnoteRows: number;\r\n @Type(() => GridRowViewModel)\r\n public childFootnoteRows: GridRowViewModel[];\r\n // End 02-22-2021 new footnote properties.\r\n\r\n // Define transient data (not saved in the database).\r\n //public transientInitializationCompleted: boolean = true;\r\n public transientValuesHash: any = {};\r\n //public transientFormField: any = null; // If assigned, this will be an instance of class FormField.\r\n //public transientFormInstanceElementWrapper: any = null; // If assigned, this will be an instance of class GridFormInstanceElementWrapper.\r\n //public transientColumnId: number; // This field is used by the grid form field.\r\n public transientInSetupFlag: boolean = false;\r\n //public transientValueSetFlag: boolean = false;\r\n private transientUserSetValueFlag: boolean = false;\r\n\r\n // Define methods related to users changing data.\r\n public set UserUpdatedData(bUpdatedParam: boolean) {\r\n this.transientUserSetValueFlag = bUpdatedParam;\r\n }\r\n\r\n public get UserUpdatedData(): boolean {\r\n return (this.transientUserSetValueFlag);\r\n }\r\n\r\n //VNEXT-951: KLW - Changes to bypass leave site pop-up warning\r\n public set BypassSitePopUpWarning(value: boolean) {\r\n this._bypassSitePopUpWarning = value;\r\n }\r\n\r\n public get BypassSitePopUpWarning(): boolean {\r\n return this._bypassSitePopUpWarning;\r\n }\r\n\r\n // Define helper methods.\r\n public toNumber(formField: FormField, propName: string): number {\r\n let property: number = this[propName];\r\n\r\n return (property != null ? property : 0);\r\n }\r\n\r\n // Load from de-serialized network data.\r\n public static loadFromDeserializedNetworkData(data: FormInstanceElement): FormInstanceElement {\r\n let formInstanceElement: FormInstanceElement = new FormInstanceElement();\r\n\r\n formInstanceElement.loadFromDeserializedNetworkData(data);\r\n\r\n return (formInstanceElement);\r\n }\r\n\r\n public copyFieldValuesFrom(sourceFormInstanceElement: FormInstanceElement): void {\r\n this.textValue = sourceFormInstanceElement.textValue;\r\n this.intValue = sourceFormInstanceElement.intValue;\r\n this.decimalValue = sourceFormInstanceElement.decimalValue;\r\n this.booleanValue = sourceFormInstanceElement.booleanValue;\r\n }\r\n\r\n public clone(): FormInstanceElement {\r\n let clone: FormInstanceElement = new FormInstanceElement();\r\n\r\n clone.formFieldId = this.formFieldId;\r\n\r\n clone.valueType = this.valueType;\r\n\r\n clone.textValue = this.textValue;\r\n clone.intValue = this.intValue;\r\n clone.decimalValue = this.decimalValue;\r\n clone.booleanValue = this.booleanValue;\r\n\r\n return clone;\r\n }\r\n public copy(sourceFormInstanceElement: FormInstanceElement): void {\r\n this.valueType = sourceFormInstanceElement.valueType;\r\n\r\n this.textValue = sourceFormInstanceElement.textValue;\r\n this.intValue = sourceFormInstanceElement.intValue;\r\n this.decimalValue = sourceFormInstanceElement.decimalValue;\r\n this.booleanValue = sourceFormInstanceElement.booleanValue;\r\n }\r\n public copyWithAnyChildElements(sourceFormInstanceElement: FormInstanceElement): void {\r\n this.copy(sourceFormInstanceElement);\r\n\r\n if (sourceFormInstanceElement.childFormInstanceElements != null) {\r\n this.childFormInstanceElements = [];\r\n\r\n for (let iChild: number = 0; iChild < sourceFormInstanceElement.childFormInstanceElements.length; iChild++) {\r\n let childFIE: FormInstanceElement = sourceFormInstanceElement.childFormInstanceElements[iChild];\r\n let childClone = childFIE.clone();\r\n this.childFormInstanceElements.push(childClone);\r\n }\r\n }\r\n }\r\n\r\n // TODO: replace this approach with use of IFieldDefinitionLogic\r\n public getValueAsStringArray(): string[] {\r\n let value = null;\r\n if (this.valueType == FormInstanceElementValueTypeEnum.TypeMultiText) {\r\n value = this.childFormInstanceElements?.map(x => { return x.textValue }).filter(x => { return x != null });\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeText) {\r\n if (this.textValue)\r\n value = [this.textValue];\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeBoolean) {\r\n value = [`${this.booleanValue}`];\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeDecimal) {\r\n if (this.decimalValue)\r\n value = [`${this.decimalValue}`];\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeDouble) {\r\n if (this.doubleValue)\r\n value = [`${this.doubleValue}`];\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeInteger) {\r\n value = [`${this.intValue}`];\r\n } else if (this.valueType == FormInstanceElementValueTypeEnum.TypeMultiBoolean) {\r\n value = this.childFormInstanceElements?.map(x => { return `${x.booleanValue}` });\r\n }\r\n\r\n return value;\r\n }\r\n\r\n // Helper methods.\r\n private loadFromDeserializedNetworkData(data: FormInstanceElement): void {\r\n this.id = data.id;\r\n\r\n this.formInstanceId = data.formInstanceId;\r\n this.formFieldId = data.formFieldId;\r\n\r\n this.valueType = data.valueType;\r\n\r\n this.intValue = data.intValue;\r\n this.doubleValue = data.doubleValue;\r\n this.decimalValue = data.decimalValue;\r\n this.customValue = data.customValue;\r\n this.textValue = data.textValue;\r\n this.booleanValue = data.booleanValue;\r\n\r\n this.totalChildGridRows = data.totalChildGridRows;\r\n this.childGridRows = data.childGridRows;\r\n\r\n //TEAMS-424: KLW - Assign the ChildFootnoteRows and TotalFootnoteRows\r\n this.childFootnoteRows = data.childFootnoteRows;\r\n this.totalFootnoteRows = data.totalFootnoteRows;\r\n\r\n this.childFormInstanceElements = data.childFormInstanceElements;\r\n\r\n //TEAMS-424: KLW - Attachments from the api call do not have an id associated with the object, for now have to set it through this code\r\n if (data.attachmentDetails) {\r\n let id = 0;\r\n\r\n this.attachmentDetails = [];\r\n data.attachmentDetails.forEach(x => {\r\n x.id = id;\r\n this.attachmentDetails.push(x);\r\n id++;\r\n });\r\n }\r\n\r\n return;\r\n }\r\n}\r\n","import { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\n\r\nexport class FormSettings implements ICloneAndCopy {\r\n // Properties.\r\n public hideSaveButton: boolean = false;\r\n public saveButtonCaption: string;\r\n public confirmSavePopup: boolean = false;\r\n public enableBulkWorkflow: boolean = false;\r\n\r\n // ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let settingsClone: FormSettings = new FormSettings();\r\n settingsClone.hideSaveButton = this.hideSaveButton;\r\n settingsClone.saveButtonCaption = this.saveButtonCaption;\r\n settingsClone.confirmSavePopup = this.confirmSavePopup;\r\n settingsClone.enableBulkWorkflow = this.enableBulkWorkflow;\r\n return (settingsClone);\r\n }\r\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let settingsToCopy: FormSettings = objectToCopy;\r\n this.hideSaveButton = settingsToCopy.hideSaveButton;\r\n this.saveButtonCaption = settingsToCopy.saveButtonCaption;\r\n this.confirmSavePopup = settingsToCopy.confirmSavePopup;\r\n this.enableBulkWorkflow = settingsToCopy.enableBulkWorkflow;\r\n return;\r\n }\r\n}\r\n","import { LayoutRow } from './layout-row.model';\r\nimport { Type } from 'class-transformer';\r\nimport { LayoutCell } from './layout-cell.model';\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\n//import { ObjectPropertyUtil, MapOfStrings } from '../../utility-classes/object-property.util';\r\n\r\nexport class LayoutCellInfo {\r\n public constructor(public rowIndex: number, public cellIndex: number, public layoutCell: LayoutRow, public cell: LayoutCell) {\r\n }\r\n}\r\n\r\nexport class FormLayout implements ICloneAndCopy {\r\n // Properties.\r\n public columnsDefault: number = 1;\r\n public alignment: string;\n public columnWidths: number[] = [12];\r\n\n @Type(() => LayoutRow)\r\n public rows: LayoutRow[] = [];\r\n\r\n // Implement the following public methods:\r\n //\r\n // MaxRowCellCountWithContent();\r\n // MaxCellColSpanWithContent();\r\n //\r\n // moveRow();\r\n // addBlankRow();\r\n // addRowAbove();\r\n // addRowBelow();\r\n // deleteRow();\r\n //\r\n // applyChanges();\r\n //\r\n // addColumn();\r\n //\r\n // addCellToEachRow();\r\n // removeCellFromEachRow();\r\n // removeCellsFromEachRow();\r\n // removeColumns();\r\n //\r\n // getCssClass();\r\n //\r\n // clearSelection();\r\n // selectedCells();\r\n // findCellContaining()\r\n //\r\n // fieldNameUpdated();\r\n //\r\n // clone();\r\n // copy();\r\n\r\n public get MaxRowCellCountWithContent(): number {\r\n let iDefaultCellWidth: number = 12 / this.columnsDefault;\r\n\r\n let iMaxColSpanCountCount: number = 0;\r\n\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n let iRowColSpanCount: number = 0;\r\n let iRowMaxColSpanCount: number = 0;\r\n\r\n for (let iCell: number = 0; iCell < row.cells.length; iCell++) {\r\n let cell: LayoutCell = row.cells[iCell];\r\n let iCellWidth = cell.width;\r\n\r\n //let iCellColSpan = iCellWidth / iDefaultCellWidth;\r\n let iCellColSpan = (cell.CellOccupiedByFullRowWidthField ? 1 : iCellWidth / iDefaultCellWidth);\r\n cell.transientColSpan = iCellColSpan;\r\n\r\n iRowColSpanCount += iCellColSpan;\r\n\r\n // Does this cell have content?\r\n if ((cell.formFieldId > 0) ||\r\n ((cell.name != null) && (cell.name.trim() != ''))) {\r\n iRowMaxColSpanCount = iRowColSpanCount;\r\n }\r\n }\r\n\r\n if (iRowMaxColSpanCount > iMaxColSpanCountCount) {\r\n iMaxColSpanCountCount = iRowMaxColSpanCount;\r\n }\r\n }\r\n\r\n return (iMaxColSpanCountCount);\r\n }\r\n\r\n public get MaxCellColSpanWithContent(): number {\r\n let iDefaultCellWidth: number = 12 / this.columnsDefault;\r\n\r\n let iMaxColSpan: number = 0;\r\n\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n for (let iCell: number = 0; iCell < row.cells.length; iCell++) {\r\n let cell: LayoutCell = row.cells[iCell];\r\n\r\n if (cell.hasContent) {\r\n //let iColSpan: number = cell.getColSpan(iDefaultCellWidth);\r\n let iColSpan: number = (cell.CellOccupiedByFullRowWidthField ? 1 : cell.getColSpan(iDefaultCellWidth));\r\n\r\n if (iColSpan > iMaxColSpan) {\r\n iMaxColSpan = iColSpan;\r\n } // if\r\n } // if\r\n } // for\r\n } // for\r\n\r\n return (iMaxColSpan);\r\n }\r\n\r\n public getPositionOfRow(row: LayoutRow): number {\r\n let position: number = -1;\r\n\r\n for (let index: number = 0; index < this.rows.length; index++) {\r\n if (this.rows[index] == row) {\r\n position = index;\r\n break;\r\n }\r\n }\r\n\r\n return position;\r\n }\n\n public moveRow(from: number, to: number): boolean {\n let success: boolean = true;\n\n if (to < from) {\n this.rows.forEach(x => {\n if (x.position < from && x.position >= to) {\n x.position = x.position + 1;\r\n }\n });\r\n }\n else if (to > from) {\n this.rows.forEach(x => {\n if (x.position > from && x.position <= to)\n x.position = x.position - 1;\n });\r\n }\n else\n success = false;\n\n return success;\n }\n\n public addBlankRow(insertIndex: number = undefined): LayoutRow {\r\n let newRow: LayoutRow = this.createBlankRow();\n\n let index: number;\n\r\n // 07-30-2022 note: the following condition does not seem correct:\r\n //\r\n // \"if (insertIndex) {\"\r\n //\r\n // That condition fails if insertIndex equals zero. Could that be\r\n // the correct intention of this code? Need to discuss.\r\n // if (insertIndex) {\r\n if (insertIndex == 0) {\r\n index = insertIndex;\r\n } else if (insertIndex) {\n index = insertIndex;\n }\n else {\n index = this.rows.length;\r\n }\n\n newRow.position = index + 1;\n newRow.isLastRow = newRow.position == (this.rows.length + 1);\n\n if (!this.rows)\n this.rows = [];\n\n this.rows.splice(index, 0, newRow);\n\n if ((insertIndex == 0) || insertIndex) {\n for (let i: number = index+1; i < this.rows.length; i++) {\n this.rows[i].position = this.rows[i].position + 1;\r\n }\r\n }\n\n return newRow;\n }\r\n\r\n public addRowAbove(row: LayoutRow): LayoutRow {\r\n let newRow: LayoutRow = null;\r\n\r\n let rowIndex: number = this.findRowIndex(row);\r\n if (rowIndex >= 0) {\r\n //let insertIndex: number = (rowIndex > 0 ? rowIndex - 1 : 0);\r\n let insertIndex: number = rowIndex;\r\n newRow = this.addBlankRow(insertIndex);\r\n } \r\n\r\n return newRow;\r\n }\r\n public addRowBelow(row: LayoutRow): LayoutRow {\r\n let newRow: LayoutRow = null;\r\n\r\n let rowIndex: number = this.findRowIndex(row);\r\n if (rowIndex >= 0) {\r\n let insertIndex: number = (rowIndex < this.rows.length ? rowIndex + 1 : rowIndex);\r\n newRow = this.addBlankRow(insertIndex);\r\n }\r\n\r\n return newRow;\r\n }\n\n public deleteRow(index: number) {\n this.rows = this.rows.filter(x => x.position != index + 1);\n\n for (let i: number = index; i < this.rows.length; i++) {\n this.rows[i].position = this.rows[i].position - 1;\r\n }\r\n }\r\n\r\n public get hasBlankRows(): boolean {\r\n let hasBlankRows: boolean = false;\r\n\r\n // Note: ignore the last row.\r\n for (let index: number = 0; index < this.rows.length - 1; index++) {\r\n let row: LayoutRow = this.rows[index];\r\n if (!row.hasContent) {\r\n hasBlankRows = true;\r\n break;\r\n }\r\n }\r\n\r\n return hasBlankRows;\r\n }\r\n\r\n public deleteBlankRows(): void {\r\n let replacementRows: LayoutRow[] = [];\r\n\r\n // Note: ignore the last row.\r\n for (let index: number = 0; index < this.rows.length - 1; index++) {\r\n let row: LayoutRow = this.rows[index];\r\n if (row.hasContent)\r\n replacementRows.push(row);\r\n }\r\n replacementRows.push(this.rows[this.rows.length - 1]);\r\n\r\n this.rows = replacementRows;\r\n }\n\n public applyChanges(): void {\r\n // Note: the last row should have no content in it.\n let lastRow = this.rows.filter(x => x.isLastRow == true)[0];\r\n let priorDefaultCellCount: number = 0;\n\n if (lastRow) {\n let currentCells = lastRow.cells.length;\r\n priorDefaultCellCount = currentCells;\r\n\r\n // Assign column spans/column\r\n // counts to all existing cells.\r\n {\r\n let iPriorDefaultCellWidth: number = 12 / priorDefaultCellCount;\r\n\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n for (let iCell: number = 0; iCell < row.cells.length; iCell++) {\r\n let cell: LayoutCell = row.cells[iCell];\r\n let iCellWidth: number = cell.width;\r\n\r\n //let iCellColSpan = iCellWidth / iPriorDefaultCellWidth;\r\n let iCellColSpan = Math.min(iCellWidth / iPriorDefaultCellWidth, this.columnsDefault);\r\n\r\n cell.transientColSpan = iCellColSpan;\r\n }\r\n }\r\n }\r\n\n while (currentCells != this.columnsDefault) {\n if (currentCells < this.columnsDefault) {\r\n // Add a column to all rows.\n //this.addColumn();\r\n this.addCellToEachRow();\r\n\n currentCells++;\n }\n else {\r\n // Remove one or more columns from all rows.\n //currentCells = this.removeColumns();\r\n //this.removeCellFromEachRow();\r\n let iNumCellsToRemove = currentCells - this.columnsDefault;\r\n //this.removeCellsFromEachRow(currentCells);\r\n this.removeCellsFromEachRow(currentCells, this.columnsDefault);\r\n\r\n //currentCells--;\r\n currentCells -= iNumCellsToRemove;\r\n }\r\n }\r\n }\n else {\n alert('formLayout.applyChanges(): error');\r\n return;\r\n }\n\n // Apply new styles to all cells\r\n // Note: the original code assumes\r\n // homogeneous cell widths for all rows.\r\n /*\n this.rows.forEach(row => {\n row.cells.forEach(cell => {\n cell.gridCssClass = this.getCssClass(cell.position - 1);\r\n });\r\n });\r\n */\r\n\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n let rowCellCount: number = row.cells.length;\r\n\r\n // Calculate cell widths/Css classes based\r\n // on the colspan values calculated above.\r\n for (let iCell = 0; iCell < row.cells.length; iCell++) {\r\n let cell: LayoutCell = row.cells[iCell];\r\n\r\n let iCellWidth: number = (12 * cell.transientColSpan) / this.columnsDefault;\r\n cell.gridCssClass = `col-${iCellWidth}`;\r\n }\r\n } // for\r\n\r\n return;\r\n }\n\n public addColumn(): void {\n this.rows.forEach(row => {\n let newPos = row.cells.length;\n\n if (row.cells.length < this.columnsDefault) {\n let cell = new LayoutCell();\n cell.position = newPos + 1;\n cell.gridCssClass = this.getCssClass(cell.position - 1);\n row.cells.push(cell);\r\n }\n });\r\n }\r\n\r\n public addCellToEachRow(): void {\r\n // Note: this method does essentially what the one above does,\r\n // but it defers the calculation of the cell CSS class.\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n if (row.cells.length < this.columnsDefault) {\r\n let newPos = row.cells.length;\r\n\r\n let cell = new LayoutCell();\n cell.position = newPos + 1;\n cell.gridCssClass = this.getCssClass(cell.position - 1);\r\n\n row.cells.push(cell);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public removeCellFromEachRow(): void {\r\n // Remove at most one cell per row.\r\n //\r\n // Note: we will prevent the user\r\n // from selecting a smaller\r\n // column count than what is\r\n // needed for all existing cells.\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n if (row.cells.length > 1) {\r\n let poppedCell: LayoutCell = row.cells.pop();\r\n\r\n if (poppedCell.hasContent) {\r\n // To do: move this cell to the next row.\r\n } // if\r\n } // if\r\n } // for\r\n \r\n return;\r\n }\r\n\r\n public removeCellsFromEachRow(iPriorMaxCellCount: number, iMaxCellCount: number): void {\r\n let iNewMaxCellCount = this.columnsDefault;\r\n\r\n // Derive the new, default cell column width.\r\n let iPriorDefaultColWidth: number = (12 / iPriorMaxCellCount);\r\n //let iNewDefaultColWidth: number = (12 / this.columnsDefault);\r\n\r\n // Remove the specified number of cells from each row.\r\n let iRow: number = 0;\r\n let iRowCount = this.rows.length;\r\n\r\n //for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n while (iRow < iRowCount) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n // If we are already within the max cell count, do nothing/continue.\r\n if (row.cells.length <= iMaxCellCount) {\r\n iRow++;\r\n continue;\r\n } \r\n\r\n // Add up row cell col spans.\r\n let iRowTotalColSpan: number = 0;\r\n //let newRow: LayoutRow = null;\r\n let newRowCells: LayoutCell[] = null;\r\n let iNewRowCellsWithContentCount: number = 0;\r\n\r\n for (let iCell: number = 0; iCell < row.cells.length; iCell++) {\r\n let cell: LayoutCell = row.cells[iCell];\r\n\r\n let iCellColSpan: number = cell.getColSpan(iPriorDefaultColWidth);\r\n\r\n //if (newRow != null) {\r\n if (newRowCells != null) {\r\n // We already have a new cell -- use it.\r\n //newRow.cells.push(cell);\r\n newRowCells.push(cell);\r\n\r\n if (cell.hasContent) {\r\n iNewRowCellsWithContentCount++;\r\n }\r\n } else if (iRowTotalColSpan + iCellColSpan <= iNewMaxCellCount) {\r\n // Still within the allow width.\r\n iRowTotalColSpan += iCellColSpan;\r\n } else {\r\n // Push this and any subsequent\r\n // cell to the next row.\r\n //newRow = this.addBlankRow(iRow + 1);\r\n\r\n //newRow.cells = [];\r\n newRowCells = [];\r\n //newRow.cells.push(cell);\r\n newRowCells.push(cell);\r\n\r\n if (cell.hasContent) {\r\n iNewRowCellsWithContentCount++;\r\n }\r\n } // if-else\r\n } // for\r\n\r\n // If we created a new row:\r\n //\r\n // 1. Pop the new rows cells from the prior row;\r\n // 2a. Check to see if the new row has any content;\r\n // 2b. Make sure it uses the full col span;\r\n // 2c. Add the new row; and\r\n // 2d. Update the while condition.\r\n if (newRowCells != null) {\r\n // 1. Pop the new rows cells from the prior row.\r\n let poppedCell: LayoutCell = null;\r\n //let iNumCellsToPop: number = newRow.cells.length;\r\n let iNumCellsToPop: number = newRowCells.length;\r\n while (iNumCellsToPop > 0) {\r\n poppedCell = row.cells.pop();\r\n iNumCellsToPop--;\r\n }\r\n\r\n // 2a. Do the new row cells contain any content?\r\n if (iNewRowCellsWithContentCount > 0) {\r\n // 2b. Make sure it uses the full col span.\r\n //while (newRow.cells.length < iNewMaxCellCount) {\r\n while (newRowCells.length < iNewMaxCellCount) {\r\n let blankCell: LayoutCell = new LayoutCell();\r\n // Note: column widths/styles get adjusted later.\r\n blankCell.gridCssClass = `col-${iPriorDefaultColWidth}`;\r\n\r\n //newRow.cells.push(blankCell);\r\n newRowCells.push(blankCell);\r\n }\r\n\r\n // 2c. Update the while condition.\r\n let newRow = this.addBlankRow(iRow + 1);\r\n newRow.cells = newRowCells;\r\n\r\n // 2d. Update the while condition.\r\n iRowCount = this.rows.length;\r\n } // if\r\n }\r\n\r\n // Move to the next row.\r\n iRow++;\r\n } // while\r\n\r\n return;\r\n }\n\n public removeColumns(): number {\n for (let i: number = 0; i < this.rows.length; i++) {\n let row: LayoutRow = this.rows[i];\n let poppedCells: LayoutCell[] = [];\n\n if (row.cells.length > this.columnsDefault) {\n while (row.cells.length > this.columnsDefault) {\n // get the last cell in the row\n let cell = row.cells.pop();\n if (cell.formFieldId > 0 || cell.name)\n poppedCells.push(cell);\n }\n\n while (poppedCells.length > 0) {\n // Insert row below\n let newRow = this.addBlankRow(i + 1);\n\n for (let j: number = 0; j < this.columnsDefault && poppedCells.length > 0; j++) {\n let cell = poppedCells.pop();\n\n cell.position = j + 1;\n\n newRow.cells[j] = cell;\r\n }\r\n }\r\n }\n }\n\n return this.columnsDefault;\r\n }\n\n public getCssClass(index: number): string {\n let columnWidth = this.columnWidths[index];\r\n if (columnWidth) {\n return 'col-' + columnWidth.toString();\r\n }\r\n else {\r\n console.log('Missing column width for column ' + index);\r\n return '';\r\n }\n }\n\n public clearSelection(exceptionCell: LayoutCell = null): void {\n // clear selected rows\n this.rows.forEach(x => x.isSelected = false);\n\n // clear selected cells \r\n this.rows.forEach(x => {\n x.cells.forEach(y => {\r\n if ((exceptionCell == null) || (exceptionCell != y))\n y.isSelected = false;\n })\n });\r\n }\r\n\r\n public get selectedCells(): LayoutCell[] {\r\n let selectedCells: LayoutCell[] = [];\r\n\r\n this.rows.forEach(r => {\n r.cells.forEach(c => {\n if (c.isSelected) {\r\n selectedCells.push(c);\r\n }\n })\n });\r\n\r\n return selectedCells;\r\n }\r\n public get selectedCell(): LayoutCell {\r\n let selectedCells: LayoutCell[] = this.selectedCells;\r\n return (selectedCells != null) && (selectedCells.length == 1) ? selectedCells[0] : null;\r\n }\r\n public get selectedCellInfo(): LayoutCellInfo {\r\n let cellInfo: LayoutCellInfo = null;\r\n\r\n let numCellsSelected: number = 0;\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let row: LayoutRow = this.rows[rowIndex];\r\n if (row.cells != null) {\r\n for (let cellIndex: number = 0; cellIndex < row.cells.length; cellIndex++) {\r\n let cell: LayoutCell = row.cells[cellIndex];\r\n if (cell.isSelected) {\r\n numCellsSelected++;\r\n\r\n if (cellInfo == null)\r\n cellInfo = new LayoutCellInfo(rowIndex, cellIndex, row, cell);\r\n\r\n break;\r\n }\r\n }\r\n } \r\n }\r\n\r\n return numCellsSelected == 1 ? cellInfo : null;\r\n }\r\n public getCellRowFor(cell: LayoutCell): LayoutRow {\r\n let resultLayoutRow: LayoutRow = null;\r\n\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let layoutRow: LayoutRow = this.rows[rowIndex];\r\n if (layoutRow.cells != null) {\r\n for (let cellIndex: number = 0; cellIndex < layoutRow.cells.length; cellIndex++) {\r\n let layoutCell: LayoutCell = layoutRow.cells[cellIndex];\r\n if (layoutCell == cell) {\r\n resultLayoutRow = layoutRow;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return resultLayoutRow;\r\n }\r\n\r\n public findCellContaining(formFieldName: string): LayoutCell {\r\n let foundCell: LayoutCell = null;\r\n\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let layoutRow: LayoutRow = this.rows[rowIndex];\r\n foundCell = layoutRow.cells.find(c => c.name == formFieldName);\r\n if (foundCell != null)\r\n break;\r\n }\r\n\r\n return foundCell;\r\n }\r\n public findCellInfoContaining(formFieldName: string): LayoutCellInfo {\r\n let foundCellInfo: LayoutCellInfo = null;\r\n\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let layoutRow: LayoutRow = this.rows[rowIndex];\r\n\r\n if (layoutRow.cells != null) {\r\n for (let cellIndex: number = 0; cellIndex < layoutRow.cells.length; cellIndex++) {\r\n let cell: LayoutCell = layoutRow.cells[cellIndex];\r\n if (cell.name == formFieldName) {\r\n foundCellInfo = new LayoutCellInfo(rowIndex, cellIndex, layoutRow, cell);\r\n break;\r\n }\r\n }\r\n } \r\n }\r\n\r\n return foundCellInfo;\r\n }\r\n\r\n public findCellInfoContainingFieldId(formFieldId: number): LayoutCellInfo {\r\n let foundCellInfo: LayoutCellInfo = null;\r\n\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let layoutRow: LayoutRow = this.rows[rowIndex];\r\n\r\n if (layoutRow.cells != null) {\r\n for (let cellIndex: number = 0; cellIndex < layoutRow.cells.length; cellIndex++) {\r\n let cell: LayoutCell = layoutRow.cells[cellIndex];\r\n if (cell.formFieldId == formFieldId) {\r\n foundCellInfo = new LayoutCellInfo(rowIndex, cellIndex, layoutRow, cell);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return foundCellInfo;\r\n }\r\n\r\n public fieldNameUpdated(originalFieldName: string, fieldId: number, updatedFieldName: string): void {\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\n let row: LayoutRow = this.rows[iRow];\r\n\r\n for (let iCol: number = 0; iCol < row.cells.length; iCol++) {\r\n let cell: LayoutCell = row.cells[iCol];\r\n\r\n if (cell.name == originalFieldName) {\r\n if ((fieldId == 0) || (fieldId == cell.formFieldId)) {\r\n cell.name = updatedFieldName;\r\n\r\n break; // 09-27-2021 change: only update a first reference to this field.\r\n }\r\n } // if\r\n } // for\n } // for\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let layoutClone: FormLayout = new FormLayout();\r\n\r\n layoutClone.columnsDefault = this.columnsDefault;\r\n layoutClone.alignment = this.alignment;\r\n\r\n layoutClone.columnWidths = [];\r\n if (this.columnWidths && (this.columnWidths.length > 0)) {\r\n for (let iIndex: number = 0; iIndex < this.columnWidths.length; iIndex++) {\r\n let iColWidth: number = this.columnWidths[iIndex];\r\n\r\n layoutClone.columnWidths.push(iColWidth);\r\n }\r\n }\r\n\r\n layoutClone.rows = [];\r\n if (this.rows && (this.rows.length > 0)) {\r\n for (let iRow: number = 0; iRow < this.rows.length; iRow++) {\r\n let row: LayoutRow = this.rows[iRow];\r\n\r\n let rowCopy: LayoutRow = row.clone();\r\n layoutClone.rows.push(rowCopy);\r\n }\r\n }\r\n\r\n /*\r\n let mapOfPropertiesToSkip: MapOfStrings = {\r\n };\r\n let mismatchedPropertyNames = ObjectPropertyUtil.propertyValuesMatch(this, layoutClone, mapOfPropertiesToSkip);\r\n */\r\n\r\n return (layoutClone);\r\n }\r\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let layoutToCopy: FormLayout = objectToCopy;\r\n\r\n this.columnsDefault = layoutToCopy.columnsDefault;\r\n this.alignment = layoutToCopy.alignment;\r\n\r\n this.columnWidths = [];\r\n if (layoutToCopy.columnWidths && (layoutToCopy.columnWidths.length > 0)) {\r\n for (let iIndex: number = 0; iIndex < layoutToCopy.columnWidths.length; iIndex++) {\r\n let iColWidth: number = layoutToCopy.columnWidths[iIndex];\r\n\r\n this.columnWidths.push(iColWidth);\r\n }\r\n }\r\n\r\n this.rows = [];\r\n if (layoutToCopy.rows && (layoutToCopy.rows.length > 0)) {\r\n for (let iRow: number = 0; iRow < layoutToCopy.rows.length; iRow++) {\r\n let rowToCopy: LayoutRow = layoutToCopy.rows[iRow];\r\n\r\n let rowCopy: LayoutRow = rowToCopy.clone();\r\n this.rows.push(rowCopy);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n public selectFirstCell(): boolean {\r\n let cellSelected: boolean = false;\r\n\r\n this.clearSelection();\r\n\r\n let row: LayoutRow = this.rows[0];\r\n if ((row.cells != null) && (row.cells.length > 0)) {\r\n row.cells[0].isSelected = true;\r\n cellSelected = true;\r\n }\r\n\r\n return cellSelected;\r\n }\r\n public selectNextCell(): boolean {\r\n let cellSelected: boolean = false;\r\n\r\n let selectedCells: LayoutCell[] = this.selectedCells;\r\n if ((selectedCells != null) && (selectedCells.length == 1)) {\r\n let cell: LayoutCell = selectedCells[0];\r\n let row: LayoutRow = this.getCellRowFor(cell);\r\n let cellPosition: number = row.getPositionOfCell(cell);\r\n\r\n if (cellPosition >= 0) {\r\n this.clearSelection();\r\n\r\n if (cellPosition < row.cells.length - 1) {\r\n row.cells[cellPosition + 1].isSelected = true;\r\n cellSelected = true;\r\n } else {\r\n let rowPosition: number = this.getPositionOfRow(row);\r\n if (rowPosition < this.rows.length - 1)\r\n row = this.rows[rowPosition + 1];\r\n else\r\n row = row = this.rows[0];\r\n\r\n if ((row.cells != null) && (row.cells.length > 0)) {\r\n row.cells[0].isSelected = true;\r\n cellSelected = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return cellSelected;\r\n }\r\n public selectLastCell(): boolean {\r\n let cellSelected: boolean = false;\r\n\r\n this.clearSelection();\r\n\r\n let rowNum: number = this.rows.length - 1;\r\n let row: LayoutRow = this.rows[rowNum];\r\n\r\n if ((row.cells != null) && (row.cells.length > 0)) {\r\n let cell: LayoutCell = row.cells[row.cells.length - 1];\r\n cell.isSelected = true;\r\n cellSelected = true;\r\n }\r\n\r\n return cellSelected;\r\n }\r\n public getCellOffset(): number {\r\n let cellOffset: number = -1;\r\n\r\n let selectedCells: LayoutCell[] = this.selectedCells;\r\n if ((selectedCells != null) && (selectedCells.length == 1)) {\r\n let selectedCell: LayoutCell = selectedCells[0];\r\n let selectedRow: LayoutRow = this.getCellRowFor(selectedCell);\r\n let cellPosition: number = selectedRow.getPositionOfCell(selectedCell);\r\n\r\n let cellIndex: number = 0;\r\n for (let rowIndex: number = 0; rowIndex < this.rows.length; rowIndex++) {\r\n let row: LayoutRow = this.rows[rowIndex];\r\n if (row == selectedRow) {\r\n if ((row.cells != null) && (cellPosition < row.cells.length)) {\r\n cellIndex += cellPosition;\r\n cellOffset = cellIndex;\r\n break;\r\n }\r\n } else\r\n cellIndex += (row.cells != null ? row.cells.length : 0);\r\n }\r\n }\r\n\r\n return cellOffset;\r\n }\r\n\r\n public findFirstCellWithContent(): LayoutCellInfo {\r\n let firstCellWithContent: LayoutCellInfo = null;\r\n\r\n for (let iRow: number = 0; (iRow < this.rows.length) && (firstCellWithContent == null); iRow++) {\n let row: LayoutRow = this.rows[iRow];\r\n\r\n for (let iCol: number = 0; iCol < row.cells.length; iCol++) {\r\n let cell: LayoutCell = row.cells[iCol];\r\n\r\n if (cell.hasContent) {\r\n firstCellWithContent = new LayoutCellInfo(iRow, iCol, row, cell);\r\n\r\n break;\r\n }\r\n } // for\n } // for\r\n\r\n return firstCellWithContent;\r\n }\r\n\r\n // Helper methods.\r\n private createBlankRow(): LayoutRow {\r\n let newRow = new LayoutRow();\n\n newRow.cells = [];\n\n for (let i: number = 0; i < this.columnsDefault; i++) {\n let cell = new LayoutCell();\n\n cell.position = i + 1;\n cell.gridCssClass = this.getCssClass(i);\n\n newRow.cells.push(cell);\r\n }\n\r\n return newRow;\r\n }\r\n\r\n private findRowIndex(rowToFind: LayoutRow): number {\r\n let rowIndex: number = -1; // Means the row was not found.\r\n\r\n if (this.rows != null) {\r\n for (let index: number = 0; index < this.rows.length; index++) {\r\n let row: LayoutRow = this.rows[index];\r\n\r\n if (row.position == rowToFind.position) {\r\n rowIndex = index;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return rowIndex;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\nimport { UntypedFormControl } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { FormLayout } from './form-layout.model';\r\nimport { FormField } from './form-field.model';\r\nimport { FormFieldExpression } from '../field-conditional-logic/form-field-expression.model';\r\nimport { Workflow } from '../site-content/workflow.model';\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\nimport { IHasIdAndName } from '../../interfaces/has-id-and-name.interface';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { ModelEventEnum, IModelEventHandler } from '../../interfaces/imodel-event-handler.interface';\r\nimport { LayoutRow } from './layout-row.model';\r\nimport { LayoutCell } from './layout-cell.model';\r\nimport { FormSettings } from './form-settings.model';\r\n\r\n// Define a type-safe hash for storing\r\n// form fields by one of their Ids values.\r\nexport interface IFormFieldIdToFormField {\r\n [clientId: number]: FormField;\r\n}\r\n// Define a type-safe set type.\r\nexport type ISetOfStrings = Set;\r\n// Define a type-safe hash type.\r\nexport interface IFieldNameValues {\r\n [fieldName: string]: string;\r\n}\r\n\r\nexport class Form extends IListItemBase implements IViewModel, ICloneAndCopy, IHasIdAndName, IListItem {\r\n public id: number;\r\n public getId(): number { // This method is part of interface IHasIdAndName\r\n return (this.id);\r\n }\r\n\r\n public deletableField: string;\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n public dataCollectionId: number;\r\n //public folderId: number; // Disabled 04-24-2020 as forms no longer reside in folders.\r\n public workflowId: number; // Added 04-24-2020\r\n public readonly siteWorkflows: Workflow[];\r\n\r\n //VNEXT-297 KLW: Put in a property for the workflow name\r\n public workflowName: string;\r\n\r\n //public name: string;\r\n public getName(): string { // This method is part of interface IHasIdAndName\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void { // This method is part of interface IHasIdAndName\r\n this.name = nameParam;\r\n }\r\n\r\n public childCount: number;\r\n public childCountTitle: string;\r\n\r\n public static readonly TypeName: string = 'Form';\r\n public typeName(): string { // This method is part of interface IHasIdAndName\r\n return (Form.TypeName);\r\n }\r\n\r\n hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n getDescription(): string {\r\n return this.description;\r\n }\r\n setDescription(val: string) {\r\n this.description = val;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n public description: string;\r\n\r\n public helpText: string;\r\n public helpTextFormat: string;\r\n\r\n public jsonConfig: string;\r\n\r\n public isDefaultForFolder: boolean;\r\n\r\n public currentUserCanBuildForms: boolean;\r\n // pjh - 2/5/2020 - quick fix to allow new forms to be built. \r\n public get CurrentUserCanBuildForms(): boolean {\r\n return this.id == 0 || this.currentUserCanBuildForms;\r\n }\r\n\r\n public currentUserCanEditHTML: boolean;\r\n\r\n // 02-24-2021 note: added the following property.\r\n public enableCellSelection: boolean = true;\r\n public alwaysShowCellSelection: boolean = false;\r\n\r\n public hideSaveButton: boolean = false;\r\n public saveButtonCaption: string = '';\r\n public confirmSavePopup: boolean = false;\r\n public enableBulkWorkflow: boolean = false;\r\n\r\n // 04-19-2021 note: added the following property.\r\n public wasDeletedFromUI: boolean;\r\n\r\n // 07-11-2024 note: begin properties related to auto-numbering.\r\n public suggestAutonumberFormNames: boolean;\r\n public prefixFormNameWithFolderName: boolean;\r\n public suggestedFormNamePrefix: string; // e.g. 'Submission #' which would become 'Submission #1', 'Submission #2', and so on.\r\n public numTemplateFormInstancesInFolder: number;\r\n public transient_suggestedFormNamePrefix_formControl: UntypedFormControl;\r\n // 07-11-2024 note: end properties related to auto-numbering.\r\n\r\n // Define, for now, a single, optional event handler for\r\n // this form(could be a list of zero or more in the future).\r\n public eventHandler: IModelEventHandler = null;\r\n public notifyEventHandler(event: ModelEventEnum): void {\r\n if (this.eventHandler) {\r\n this.eventHandler.eventCompleted(event, this);\r\n }\r\n }\r\n\r\n @Type(() => FormLayout)\r\n public formLayout: FormLayout;\r\n\r\n @Type(() => FormSettings)\r\n public formSettings: FormSettings;\r\n\r\n @Type(() => FormField)\r\n public formFields: FormField[] = [];\r\n\r\n @Type(() => FormField)\r\n public formFieldsDeleted: FormField[] = [];\r\n\r\n //@Type(() => FormConditionalLogicRule)\r\n //public conditionalLogicRules: FormConditionalLogicRule[] = [];\r\n @Type(() => FormFieldExpression)\r\n public conditionalLogicRules: FormFieldExpression[] = [];\r\n\r\n //history\r\n public createdBy: string;\r\n public createdByUserName: string;\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n\r\n public formInstanceCount: number; //number of form instances which use this form template\r\n\r\n // Constructor.\r\n public constructor(formToCopy: Form = null) {\r\n super();\r\n\r\n this.formFieldsDeleted = [];\r\n\r\n this.currentUserCanEditHTML = true;\r\n\r\n if (formToCopy != null) {\r\n // Copy primitives properties.\r\n this.id = formToCopy.id;\r\n\r\n this.dataCollectionId = formToCopy.dataCollectionId;\r\n this.workflowId = formToCopy.workflowId;\r\n\r\n this.siteWorkflows = formToCopy.siteWorkflows;\r\n\r\n this.name = formToCopy.name;\r\n this.description = formToCopy.description;\r\n\r\n this.helpText = formToCopy.helpText;\r\n this.helpTextFormat = formToCopy.helpTextFormat;\r\n\r\n this.currentUserCanBuildForms = formToCopy.currentUserCanBuildForms;\r\n\r\n this.enableCellSelection = formToCopy.enableCellSelection;\r\n\r\n // 10-07-2022: begin handling fields that were not being copied prior.\r\n // formLayout,createdBy,createdDate,modifiedBy,modifiedDate\r\n this.workflowName = formToCopy.workflowName;\r\n\r\n this.isDefaultForFolder = formToCopy.isDefaultForFolder;\r\n // 10-07-2022: end handling fields that were not being copied prior.\r\n\r\n // Copy object properties.\r\n this.formLayout = null;\r\n if (formToCopy.formLayout != null) {\r\n let layoutCopy: FormLayout = formToCopy.formLayout.clone();\r\n this.formLayout = layoutCopy;\r\n }\r\n\r\n this.formSettings = null;\r\n\r\n if (formToCopy.jsonConfig) {\r\n let fs: FormSettings = JSON.parse(formToCopy.jsonConfig);\r\n if (fs) {\r\n this.formSettings = fs;\r\n formToCopy.hideSaveButton = fs.hideSaveButton;\r\n formToCopy.saveButtonCaption = fs.saveButtonCaption;\r\n formToCopy.confirmSavePopup = fs.confirmSavePopup;\r\n formToCopy.enableBulkWorkflow = fs.enableBulkWorkflow;\r\n }\r\n }\r\n\r\n this.formFields = [];\r\n if (formToCopy.formFields && (formToCopy.formFields.length > 0)) {\r\n for (let iFF: number = 0; iFF < formToCopy.formFields.length; iFF++) {\r\n let formFieldToCopy: FormField = formToCopy.formFields[iFF];\r\n\r\n let formFieldCopy: FormField = formFieldToCopy.clone();\r\n this.formFields.push(formFieldCopy);\r\n }\r\n }\r\n\r\n this.conditionalLogicRules = [];\r\n if (formToCopy.conditionalLogicRules && (formToCopy.conditionalLogicRules.length > 0)) {\r\n for (let iExpr: number = 0; iExpr < formToCopy.conditionalLogicRules.length; iExpr++) {\r\n let exprToCopy: FormFieldExpression = formToCopy.conditionalLogicRules[iExpr];\r\n\r\n let exprCopy: FormFieldExpression = exprToCopy.clone();\r\n this.conditionalLogicRules.push(exprCopy);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Additional methods.\r\n public assignFrom(cloneObj: any): any {\r\n for (let attribut in cloneObj) {\r\n this[attribut] = cloneObj[attribut];\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public getFormFieldsByIdHash(): IFormFieldIdToFormField {\r\n let hshFormFieldsByClientId: IFormFieldIdToFormField = {};\r\n\r\n if ((this.formFields) && (this.formFields.length > 0)) {\r\n for (let iField: number = 0; iField < this.formFields.length; iField++) {\r\n let formField: FormField = this.formFields[iField];\r\n\r\n if (formField.id == 0) {\r\n let errorMsg: string =\r\n `Form.getFormFieldsByIdHash(): encountered form field ` +\r\n `'${formField.name}' with an id value of zero.`;\r\n throw (errorMsg);\r\n }\r\n\r\n hshFormFieldsByClientId[formField.id] = formField;\r\n }\r\n }\r\n\r\n return (hshFormFieldsByClientId);\r\n }\r\n\r\n public findFormField(formFieldNumberOnClient: number): FormField {\r\n let result: FormField = Form.doFindFormField(this.formFields, formFieldNumberOnClient);\r\n\r\n return result;\r\n }\r\n\r\n private static doFindFormField(formFields: FormField[], formFieldNumberOnClient: number): FormField {\r\n let result: FormField = null;\r\n\r\n if (formFields != null) {\r\n for (let index: number = 0; index < formFields.length; index++) {\r\n let formField: FormField = formFields[index];\r\n\r\n if (formField.formFieldNumberOnClient == formFieldNumberOnClient) {\r\n result = formField;\r\n break;\r\n } else if (formField.childFormFields != null) {\r\n result = Form.doFindFormField(formField.childFormFields, formFieldNumberOnClient);\r\n\r\n if (result != null)\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let formCopy: Form = new Form(this);\r\n\r\n return (formCopy);\r\n }\r\n\r\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let formToCopy =
objectToCopy;\r\n\r\n // Copy primitive properties.\r\n this.id = formToCopy.id;\r\n\r\n this.dataCollectionId = formToCopy.dataCollectionId;\r\n this.workflowId = formToCopy.workflowId;\r\n\r\n // TO DO: find out why property 'siteWorkflows' has to be marked as read only.\r\n //this.siteWorkflows = formToCopy.siteWorkflows;\r\n\r\n this.name = formToCopy.name;\r\n this.description = formToCopy.description;\r\n\r\n this.helpText = formToCopy.helpText;\r\n this.helpTextFormat = formToCopy.helpTextFormat;\r\n\r\n this.currentUserCanBuildForms = formToCopy.currentUserCanBuildForms;\r\n\r\n this.enableCellSelection = formToCopy.enableCellSelection;\r\n\r\n // Copy object properties.\r\n this.formLayout = null;\r\n if (formToCopy.formLayout != null) {\r\n let layoutCopy: FormLayout = formToCopy.formLayout.clone();\r\n\r\n this.formLayout = layoutCopy;\r\n }\r\n\r\n this.formSettings = null;\r\n if (formToCopy.formSettings != null) {\r\n let settingsCopy: FormSettings = formToCopy.formSettings.clone();\r\n this.formSettings = settingsCopy;\r\n }\r\n\r\n this.formFields = [];\r\n if (formToCopy.formFields && (formToCopy.formFields.length > 0)) {\r\n for (let iFF: number = 0; iFF < formToCopy.formFields.length; iFF++) {\r\n let formFieldToCopy: FormField = formToCopy.formFields[iFF];\r\n\r\n let formFieldCopy: FormField = formFieldToCopy.clone();\r\n this.formFields.push(formFieldCopy);\r\n }\r\n }\r\n\r\n this.conditionalLogicRules = [];\r\n if (formToCopy.conditionalLogicRules && (formToCopy.conditionalLogicRules.length > 0)) {\r\n for (let iExpr: number = 0; iExpr < formToCopy.conditionalLogicRules.length; iExpr++) {\r\n let exprToCopy: FormFieldExpression = formToCopy.conditionalLogicRules[iExpr];\r\n\r\n let exprCopy: FormFieldExpression = exprToCopy.clone();\r\n this.conditionalLogicRules.push(exprCopy);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // IListItem methods.\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n public userCanDelete(): boolean {\r\n return (false);\r\n // Note: delete permissions are based on the 'siteIsAdministerable'\r\n // flag in model class DataCollecdtion.\r\n }\r\n\r\n public getStatus(): string {\r\n return ('na');\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return \"\";\r\n }\r\n\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n\r\n public getType(): string {\r\n return ItemTypeEnum.FORM;\r\n }\r\n\r\n public getParentId(): number {\r\n return (0); // Note: \"parent\" has no meaning for form templates.\r\n }\r\n\r\n public getPosition(): number {\r\n return (this.id); // id forms a default attribute for ordering \r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n return (true);\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return ('library_books'); // Returns the default icon for a site/data collection.\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n let uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n return this.childCount;\r\n }\r\n\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n // TO DO: DISCUSS WITH PAUL.\r\n //\r\n // NOTE: I BELIEVE THIS CAN BE A NOOP SINCE\r\n // THE OBJECT WILL ALWAYS BE CONSISTENT\r\n // WITH ITSELF/NO NEED TO UPDATE/SYNC.\r\n\r\n return;\r\n }\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw ('Form.findAndUpdateFrom(): this method is not implemented.');\r\n }\r\n\r\n // Added 09-27-2021: methods related to form field uniqueness.\r\n public findDupFieldNames(formFieldsWithDupNames: FormField[] = null): ISetOfStrings {\r\n let error: boolean = false;\r\n\r\n let mapOfNameValues: IFieldNameValues = {};\r\n let setOfDupFieldNames: Set = new Set();\r\n for (let iField: number = 0; iField < this.formFields.length; iField++) {\r\n let formField: FormField = this.formFields[iField];\r\n let existingFieldName: string = mapOfNameValues[formField.name];\r\n\r\n if (existingFieldName == undefined) {\r\n mapOfNameValues[formField.name] = formField.name;\r\n } else {\r\n error = true;\r\n //break;\r\n setOfDupFieldNames.add(existingFieldName);\r\n if (formFieldsWithDupNames != null) {\r\n formFieldsWithDupNames.push(formField);\r\n }\r\n }\r\n }\r\n\r\n return (setOfDupFieldNames.size > 0 ? setOfDupFieldNames : null)\r\n }\r\n\r\n public formFieldNameIsNotUnique(formFieldToTest: FormField): boolean {\r\n let bIsNotUnique: boolean = false;\r\n\r\n let mapOfNameValues: IFieldNameValues = {};\r\n let otherFormFields: FormField[] = this.formFields.filter(ff => ff != formFieldToTest);\r\n for (let iField: number = 0; iField < otherFormFields.length; iField++) {\r\n let otherFormField: FormField = this.formFields[iField];\r\n mapOfNameValues[otherFormField.name] = otherFormField.name;\r\n }\r\n\r\n if (mapOfNameValues[formFieldToTest.name] != null)\r\n bIsNotUnique = true;\r\n\r\n return bIsNotUnique;\r\n }\r\n public nameForFormFieldNotUnique(formFieldToTest: FormField, nameToTest: string): boolean {\r\n let bIsNotUnique: boolean = false;\r\n\r\n let mapOfNameValues: IFieldNameValues = {};\r\n let otherFormFields: FormField[] = this.formFields.filter(ff => ff != formFieldToTest);\r\n for (let iField: number = 0; iField < otherFormFields.length; iField++) {\r\n let otherFormField: FormField = this.formFields[iField];\r\n mapOfNameValues[otherFormField.name] = otherFormField.name;\r\n }\r\n\r\n if (mapOfNameValues[nameToTest] != null)\r\n bIsNotUnique = true;\r\n\r\n return bIsNotUnique;\r\n }\r\n\r\n // Begin methods related to Show To/Hide From functionality.\r\n public clearTransientProperties(): void {\r\n // Note: for the time being, this method only calls method\r\n // clearShowToHideFromTransientProperties(), below,\r\n // but it acts as a placeholder for future, similar\r\n // functionality.\r\n this.clearShowToHideFromTransientProperties();\r\n }\r\n public clearShowToHideFromTransientProperties(): void {\r\n if (this.formFields != null) {\r\n for (let index: number = 0; index < this.formFields.length; index++) {\r\n let formField: FormField = this.formFields[index];\r\n\r\n if (formField.transientMatchingBeginOrEndField != null) {\r\n // Note: the following two lines avoid a show to or hide from\r\n // end field changing its display name during a form save.\r\n if (formField.isConditionalEndElement)\r\n formField.transientBeginFieldDisplayName =\r\n (formField.transientMatchingBeginOrEndField.displayName != null ?\r\n formField.transientMatchingBeginOrEndField.displayName :\r\n formField.transientMatchingBeginOrEndField.name);\r\n\r\n formField.transientMatchingBeginOrEndField = null;\r\n }\r\n }\r\n }\r\n }\r\n public restoreTransientProperties(): void {\r\n // Note: for the time being, this method only calls method\r\n // restoreShowToHideFromTransientProperties(), below,\r\n // but it acts as a placeholder for future, similar\r\n // functionality.\r\n this.restoreShowToHideFromTransientProperties();\r\n }\r\n public restoreShowToHideFromTransientProperties(): void {\r\n if (this.formFields != null) {\r\n let conditionalFieldNestingLevel = 0;\r\n\r\n for (let rowIndex: number = 0; rowIndex < this.formLayout.rows.length; rowIndex++) {\r\n let layoutRow: LayoutRow = this.formLayout.rows[rowIndex];\r\n for (let cellIndex: number = 0; cellIndex < layoutRow.cells.length; cellIndex++) {\r\n let layoutCell: LayoutCell = layoutRow.cells[cellIndex];\r\n\r\n if (layoutCell.hasContent) {\r\n let formField: FormField = this.formFields.find(ff => ff.name == layoutCell.name);\r\n\r\n if ((formField != null) && (formField.isConditionalBeginElement || formField.isConditionalEndElement)) {\r\n // Temporarily associate the current name of the field's matching field.\r\n let matchingFieldName: string = formField.matchingBeginOrEndFieldName;\r\n formField.transientMatchingBeginOrEndField = this.formFields.find(ff => ff.name == matchingFieldName);\r\n if (formField.transientMatchingBeginOrEndField == null)\r\n console.log(`Form: cannot find a matching field with name '${matchingFieldName}'.`);\r\n formField.transientBeginFieldDisplayName = null;\r\n\r\n // Update conditional nesting levels.\r\n if (formField.isConditionalBeginElement) {\r\n conditionalFieldNestingLevel++;\r\n formField.transientConditionalNestingLevel = conditionalFieldNestingLevel;\r\n } else {\r\n formField.transientConditionalNestingLevel = conditionalFieldNestingLevel;\r\n conditionalFieldNestingLevel--;\r\n }\r\n\r\n // Save an indication that the cell is occupied by a full width field\r\n // (as all conditional fields occupy an entire row width).\r\n //\r\n // We could probably make this code cleaner by passing in an instance\r\n // of class FieldDefinitionService so we would use FieldDefinition\r\n // metadata properties ... something to consider.\r\n layoutCell.transientCellOccupiedByFullRowWidthField = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // End methods related to Show To/Hide From functionality.\r\n\r\n public removeAnyCircularDependencies(): void {\r\n if (this.formFields != null) {\r\n for (let index: number = 0; index < this.formFields.length; index++) {\r\n let formField: FormField = this.formFields[index];\r\n formField.removeAnyCircularDependencies();\r\n }\r\n }\r\n }\r\n\r\n // 07-26-2024 note: begin methods related to suggesting auto-numbered form instance names.\r\n public hasFormInstanceAutoNumberConfig(): boolean {\r\n let hasAutoNumberConfig: boolean = (this.suggestAutonumberFormNames && (this.suggestedFormNamePrefix != null) && (this.suggestedFormNamePrefix.trim() != ''));\r\n\r\n return hasAutoNumberConfig;\r\n }\r\n public proposeAutoNumberName(numTemplateInstancesInCurrentFolder: number, folderName: string): string {\r\n let proposedName: string = ''\r\n\r\n if ((this.suggestAutonumberFormNames) && (this.suggestedFormNamePrefix != null) && (this.suggestedFormNamePrefix.trim() != '')) {\r\n if (this.prefixFormNameWithFolderName)\r\n proposedName = `${folderName} `;\r\n\r\n proposedName += this.suggestedFormNamePrefix;\r\n let nextFormNumberInFolder = numTemplateInstancesInCurrentFolder + 1;\r\n proposedName += nextFormNumberInFolder;\r\n }\r\n\r\n return proposedName;\r\n }\r\n}\r\n","export class GridFlavorBase {\r\n\r\n // buttons that all grid flavors have\r\n protected gridCommandButtons: string[] = ['edit', 'save', 'cancel'];\r\n\r\n\r\n public usesButton(button: string, rowIsDisabled: boolean): boolean {\r\n return this.gridCommandButtons.indexOf(button) > -1;\r\n }\r\n\r\n // This is a kendo grid setting where scrollable = \"virtual\" sets up the grid for infinite scrolling\r\n // This is the default, but other flavors can set a different mode\r\n public scrollMode(): string {\r\n return \"virtual\";\r\n }\r\n}\r\n","import { DragRow } from \"@progress/kendo-angular-grid\";\r\nimport { IGridFlavor } from \"../../../interfaces/igrid-flavor.interface\";\r\nimport { GridConfig } from \"../../grid/grid-config.model\";\r\nimport { GridFlavorBase } from \"./grid-flavor-base\";\r\n\r\nexport class RegularGridFlavor extends GridFlavorBase implements IGridFlavor {\r\n constructor() {\r\n super();\r\n this.addAdditionalButtons();\r\n }\r\n\r\n //VNEXT-1275: enable geocoding for \"Project Description Table - Geography\" grid in production Environmental Justice Data Call site ID 192\r\n public showGeocodeGrid(apiUrl: string, formFieldId: number): boolean {\r\n if (apiUrl.indexOf('.test.') < 0 && apiUrl.indexOf('.stage.') < 0 && apiUrl.indexOf('.sandbox.') < 0) {\r\n if (formFieldId == 12105) return true; \r\n return false; //disable in production\r\n }\r\n }\r\n\r\n public gridCommandColumnWidth(): number {\r\n return 75;\r\n }\r\n\r\n public addAnyVirtualColumns(gridConfig: GridConfig): void {\r\n // NO OP\r\n }\r\n\r\n public canAddNewRow(): boolean {\r\n return true;\r\n }\r\n\r\n public usesButton(button: string, dataItem: any /*ignored*/): boolean {\r\n return this.gridCommandButtons.indexOf(button) > -1;\r\n }\r\n\r\n // There are no constraints on moving regular grid rows\r\n public cannotMoveRowMessage(row: DragRow): string {\r\n return null;\r\n }\r\n\r\n private addAdditionalButtons() {\r\n this.gridCommandButtons = this.gridCommandButtons.concat(['delete']);\r\n }\r\n}\r\n","import { DragRow } from \"@progress/kendo-angular-grid\";\r\nimport { AttachmentStandardColumnNames } from \"../../../enums/grid.enums\";\r\nimport { IGridFlavor } from \"../../../interfaces/igrid-flavor.interface\";\r\nimport { GridConfig } from \"../../grid/grid-config.model\";\r\nimport { GridFlavorBase } from './grid-flavor-base';\r\n\r\nexport class AttachmentsGridFlavor extends GridFlavorBase implements IGridFlavor {\r\n\r\n constructor() {\r\n super();\r\n this.addAdditionalButtons();\r\n }\r\n\r\n public gridCommandColumnWidth(): number {\r\n return 150;\r\n }\r\n public showGeocodeGrid(apiUrl: string, formFieldId: number): boolean {\r\n return false;\r\n }\r\n public addAnyVirtualColumns(gridConfig: GridConfig): void {\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.Title, 'Title');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.FileName, 'File Name');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.FileType, 'File Type');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.UploadInfo, 'Upload');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.DownloadInfo, 'Download');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.Version, 'Version');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.IsLatest, 'Is Latest');\r\n gridConfig.addVirtualColumnDef(AttachmentStandardColumnNames.IsDisabled, 'Is Disabled', true);\r\n }\r\n\r\n public canAddNewRow(): boolean {\r\n return false;\r\n }\r\n\r\n public usesButton(button: string, dataItem: any): boolean {\r\n let rowIsDisabled: boolean = dataItem?.__gridRow?.hshFormInstanceElementsByName[AttachmentStandardColumnNames.IsDisabled]?.standinDisplayValue == \"1\";\r\n let initialResult: boolean = super.usesButton(button, rowIsDisabled);\r\n if (initialResult) {\r\n if (button == 'disable' && rowIsDisabled) {\r\n return false;\r\n } else if (button == 'restore' && !rowIsDisabled) {\r\n return false;\r\n } else if (button == 'download' && rowIsDisabled) {\r\n return false;\r\n } else if (button == 'upload' && rowIsDisabled) {\r\n return false;\r\n } else if (button == 'edit' && rowIsDisabled) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public cannotMoveRowMessage(row: DragRow): string {\r\n let msg = null;\r\n let isLatest = row.dataItem[AttachmentStandardColumnNames.IsLatest] == 'true';\r\n if (!isLatest) {\r\n msg = \"You cannot reposition an earlier version of an attachment, instead reposition the latest version.\";\r\n }\r\n return msg;\r\n }\r\n\r\n private addAdditionalButtons() {\r\n this.gridCommandButtons = this.gridCommandButtons.concat(['disable', 'restore', 'download', 'upload']);\r\n }\r\n\r\n // By setting Kendo Grid's scrollable property to null we turn off virtual scrolling, but are still able to scroll\r\n // (Don't want to set it to \"none\" or the user would be unable to scroll)\r\n // This became neccessary because of strange behavior on the attachments grid in which if you had to scroll down to a\r\n // row you couldn't click it to open it for editing. \r\n public scrollMode(): string {\r\n return null;\r\n }\r\n}\r\n","import { IGridFlavor } from \"../../../interfaces/igrid-flavor.interface\";\r\nimport { RegularGridFlavor } from \"./regular-grid-flavor\";\r\n\r\n// Currently ContactsGridFlavor is same as RegularGridFlavor so just extend it and we're done\r\nexport class ContactsGridFlavor extends RegularGridFlavor implements IGridFlavor {\r\n \r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { GridFlavorEnum } from '../../../enums/grid.enums';\r\nimport { RegularGridFlavor } from './regular-grid-flavor';\r\nimport { AttachmentsGridFlavor } from './attachments-grid-flavor';\r\nimport { ContactsGridFlavor } from './contacts-grid-flavor';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class GridFlavorFactory {\r\n\r\n public static getImplementation(flavor: GridFlavorEnum) {\r\n if (flavor == GridFlavorEnum.RegularGrid) {\r\n return new RegularGridFlavor();\r\n } else if (flavor == GridFlavorEnum.AttachmentsGrid) {\r\n return new AttachmentsGridFlavor();\r\n } else if (flavor == GridFlavorEnum.ContactsGrid) {\r\n return new ContactsGridFlavor();\r\n }\r\n }\r\n}\r\n","import { GridFlavorEnum } from '../../enums/grid.enums';\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport interface IFormContentElement {\r\n id: number;\r\n\r\n valueType: string;\r\n\r\n intValue: number;\r\n doubleValue: number;\r\n decimalValue: number;\r\n customValue: string;\r\n textValue: string;\r\n booleanValue: boolean;\r\n\r\n childFormInstanceElements: IFormContentElement[];\r\n}\r\n\r\nexport interface IRowCellDataHash {\r\n [columnKey: string]: IFormContentElement;\r\n}\r\n\r\n// This class maps to ViewModels.GridRow on the server\r\nexport class GridRowViewModel implements IViewModel {\r\n public id: number;\r\n\r\n public isPendingEditFor_GridRowId: number;\r\n\r\n public formInstanceElementId: number;\r\n\r\n public formInstanceId: number;\r\n\r\n public formFieldId: number;\r\n\r\n public isDeleted: boolean;\r\n\r\n public rowIndex: number;\r\n\r\n public cellDataHash: IRowCellDataHash;\r\n\r\n // Note: please see the comment defined above the 'GridKeyColumns' property in model class FormField\r\n // for information about grid row keys, how they are comprised, how the key values are used, etc.\r\n public rowKeyValue: string;\r\n\r\n public gridFlavor: GridFlavorEnum;\r\n\r\n // Begin ignored fields.\r\n public intValue: number;\r\n public doubleValue: number;\r\n public decimalValue: number;\r\n public textValue: string;\r\n public customValue: string;\r\n public booleanValue: boolean;\r\n // End ignored fields.\r\n}\r\n","import { FormInstanceElement } from './form-instance-element.model';\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\n\nexport class LayoutCell implements ICloneAndCopy {\r\n public position: number = 1;\n public formFieldId: number = 0;\n public name: string = '';\n public gridCssClass: string;\n public isSelected: boolean = false;\n\n public formInstanceElement: FormInstanceElement = null; // 11-26-2019 NOTE: ADDED BY STUART.\r\n\r\n // Transient cell value (not persisted).\r\n public transientColSpan: number = 1;\r\n public transientLayoutCellStyle: string;\r\n public transientCellOccupiedByFullRowWidthField: boolean = false;\r\n\r\n public transientIsHidden: boolean = false; // 04-11-2023 note: used for field conditional logic.\r\n // End transient cell values.\r\n\r\n public get hasContent(): boolean {\r\n let bHasContent: boolean = ((this.formFieldId > 0) || ((this.name != null) && (this.name.trim() != '')));\r\n\r\n return (bHasContent);\r\n }\r\n\r\n public get width(): number {\r\n let strWidth: string = this.gridCssClass.replace('col-', '');\r\n let iWidth: number = parseInt(strWidth);\r\n\r\n return (iWidth);\r\n }\r\n\r\n public clearContent(): void {\r\n this.formFieldId = 0;\r\n this.name = null;\r\n }\r\n\r\n public getColSpan(iDefaultColWidth: number,bSaveColspan = true): number {\r\n let iColSpan: number = this.width / iDefaultColWidth;\r\n\r\n if (bSaveColspan) {\r\n this.transientColSpan = iColSpan;\r\n }\r\n\r\n return (iColSpan);\r\n }\r\n\r\n public get ColSpan(): number {\r\n return (this.transientColSpan);\r\n }\r\n\r\n public CellOccupiedByFullRowWidthField(): boolean {\r\n return this.transientCellOccupiedByFullRowWidthField;\r\n }\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let newCell: LayoutCell = new LayoutCell();\n\n newCell.position = this.position;\n newCell.formFieldId = this.formFieldId;\n newCell.name = this.name;\n newCell.gridCssClass = this.gridCssClass;\r\n\r\n newCell.transientColSpan = this.transientColSpan;\n\n return newCell;\r\n }\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let cellToCopy: LayoutCell = objectToCopy;\r\n\r\n this.position = cellToCopy.position;\r\n this.formFieldId = cellToCopy.formFieldId;\r\n this.name = cellToCopy.name;\r\n this.gridCssClass = cellToCopy.gridCssClass;\r\n\r\n this.transientColSpan = cellToCopy.transientColSpan;\r\n\r\n return;\r\n }\r\n}\n","import { LayoutCell } from './layout-cell.model';\r\nimport { Type } from 'class-transformer';\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\n\nexport class LayoutRow implements ICloneAndCopy {\r\n // Properties.\n public position: number = 0;\n\n @Type(() => LayoutCell)\n public cells: LayoutCell[] = [];\n\n public isSelected: boolean = false;\n public isLastRow: boolean = false;\r\n\r\n // Begin transition fields used only in client code.\r\n public transientIsDeleted: boolean = false; // Note: this is a client-only property.\r\n //public transientSetHeightToZero: boolean = false;\r\n // End transition fields used only in client code.\r\n\r\n // Getter methods.\r\n public get hasContent(): boolean {\r\n let bHasContent: boolean = false;\r\n\r\n for (let iCell: number = 0; iCell < this.cells.length; iCell++) {\r\n let cell: LayoutCell = this.cells[iCell];\r\n\r\n if (cell.hasContent) {\r\n bHasContent = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n return (bHasContent);\r\n }\r\n\r\n public getPositionOfCell(cell: LayoutCell): number {\r\n let position: number = -1;\r\n\r\n if (this.cells != null) {\r\n for (let index: number = 0; index < this.cells.length; index++) {\r\n if (this.cells[index] == cell) {\r\n position = index;\r\n break;\r\n }\r\n }\r\n } \r\n\r\n return position;\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let newRow: LayoutRow = new LayoutRow();\r\n\r\n newRow.position = this.position;\r\n\r\n newRow.cells = [];\r\n if (this.cells && (this.cells.length > 0)) {\r\n for (let iCell: number = 0; iCell < this.cells.length; iCell++) {\r\n let cell: LayoutCell = this.cells[iCell];\r\n\r\n let cellClone: LayoutCell = cell.clone();\r\n newRow.cells.push(cellClone);\r\n }\r\n }\r\n\r\n newRow.isSelected = this.isSelected;\r\n newRow.isLastRow = this.isLastRow;\r\n\r\n return (newRow);\r\n }\n\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let rowToCopy: LayoutRow = objectToCopy;\r\n\r\n this.position = rowToCopy.position;\n\n this.cells = [];\r\n if (rowToCopy.cells && (rowToCopy.cells.length > 0)) {\r\n for (let iCell: number = 0; iCell < rowToCopy.cells.length; iCell++) {\r\n let cellToCopy: LayoutCell = rowToCopy.cells[iCell];\r\n\r\n let cellCopy: LayoutCell = cellToCopy.clone();\r\n this.cells.push(cellCopy);\r\n }\r\n }\n\r\n this.isSelected = rowToCopy.isSelected;\r\n this.isLastRow = rowToCopy.isLastRow;\n\r\n return;\r\n }\r\n}\n","import { plainToClass } from \"class-transformer\";\r\n\r\nimport { HeaderValuePair } from '../csv-data/header-value-pair.model';\r\n\r\nexport class FixedFirstColumnValues {\r\n // Properties.\r\n public columnName: string;\r\n public values: string[] = [];\r\n\r\n // Constructor.\r\n public constructor(columnName: string) {\r\n this.columnName = columnName;\r\n }\r\n\r\n // Static methods.\r\n public static createFromHeaderValuePairs(columnName: string, linesOfHeaderValuePairs: HeaderValuePair[][]): FixedFirstColumnValues {\r\n let fixedValues: FixedFirstColumnValues = new FixedFirstColumnValues(columnName);\r\n\r\n if (linesOfHeaderValuePairs != null) {\r\n for (let index: number = 0; index < linesOfHeaderValuePairs.length; index++) {\r\n let lineHeaderValuePairs: HeaderValuePair[] = linesOfHeaderValuePairs[index];\r\n if ((lineHeaderValuePairs != null) && (lineHeaderValuePairs.length >= 1)) {\r\n let value: string = lineHeaderValuePairs[0].ValueText;\r\n fixedValues.values.push(value);\r\n }\r\n }\r\n }\r\n\r\n return fixedValues;\r\n }\r\n\r\n public static createFromJson(json: string): FixedFirstColumnValues {\r\n let object: any = JSON.parse(json);\r\n let fixedValues: FixedFirstColumnValues = (object != null ? plainToClass(FixedFirstColumnValues, object) : null);\r\n return fixedValues;\r\n }\r\n}\r\n","import { FormField, SecondaryGridCascadingFieldTransientData } from '../form-builder/form-field.model';\r\nimport { FieldDefinitionService } from '../../services/field-definition.service';\r\nimport { FieldDefinition } from '../form-builder/field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { FormInstance } from '../site-content/form-instance.model';\r\nimport { AttachmentStandardColumnNames, GridFlavorEnum, GridFlavorModifiersEnum } from '../../enums/grid.enums';\r\nimport { ShortTextFieldType } from '../form-builder/form-field-types';\r\nimport { Attachment } from '../attachment/attachment.model';\r\nimport { GridFlavorFactory } from '../../models/form-builder/grid-flavor/grid-flavor-factory';\r\nimport { IGridFlavor } from '../../interfaces/igrid-flavor.interface';\r\n\r\nexport interface IFormFieldNameToFormField {\r\n [formFieldName: string]: FormField;\r\n}\r\n\r\nexport class GridConfig {\r\n // Properties.\r\n private mode: string;\r\n private flavor: GridFlavorEnum;\r\n private fieldDefinitionService: FieldDefinitionService;\r\n private iNextColumnDefId: number = 1;\r\n private columnDefs: FormField[] = [];\r\n private isFootnote: boolean = false;\r\n private hshFormFieldMNametoFormField: IFormFieldNameToFormField = {};\r\n\r\n private cachedGridColumnDefs: FormField[] = null; // Can be used by my caller ... no logic for this field whatsoever in this class.\r\n private conditionalLogicColumnDefs: FormField[] = null;\r\n private flavorModifier: GridFlavorModifiersEnum;\r\n private gridFlavorImpl: IGridFlavor;\r\n\r\n // Constructor.\r\n // pharv - 3/5/2024 - added formInstance param. It's needed for VNEXT-1135 - flexible selection fields (for which FormInstance is needed to look up values of all flex fields)\r\n public constructor(mode: string, flavor: GridFlavorEnum, flavorModifier: GridFlavorModifiersEnum, fieldDefinitionService: FieldDefinitionService, existingColDefsParam: FormField[] = null, formInstance: FormInstance = null) {\r\n this.mode = mode;\r\n this.flavor = flavor;\r\n this.flavorModifier = flavorModifier;\r\n this.gridFlavorImpl = GridFlavorFactory.getImplementation(this.flavor);\r\n\r\n this.fieldDefinitionService = fieldDefinitionService;\r\n \r\n if (existingColDefsParam && existingColDefsParam.length > 0) {\r\n this.columnDefs = existingColDefsParam;\r\n\r\n for (let iCol: number = 0; iCol < this.columnDefs.length; iCol++) {\r\n let columnDef: FormField = this.columnDefs[iCol];\r\n\r\n if ((columnDef.name != null) && (columnDef.name.trim() != \"\")) {\r\n let strId: string = columnDef.name.substring(1);\r\n let iClientId: number = parseInt(strId);\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (!Number.isNaN(iClientId)) {\r\n columnDef.gridColClientId = iClientId;\r\n } else {\r\n this.assignUniqueClientId(iCol);\r\n }\r\n } else {\r\n this.assignUniqueClientId(iCol);\r\n }\r\n\r\n columnDef.fieldOrder = iCol;\r\n\r\n // Save the form field in a hash by name.\r\n this.hshFormFieldMNametoFormField[columnDef.name] = columnDef;\r\n }\r\n\r\n this.setNextColumnDefId();\r\n } // if\r\n\r\n if (this.mode != 'design') {\r\n this.gridFlavorImpl.addAnyVirtualColumns(this);\r\n }\r\n return;\r\n }\r\n\r\n public addVirtualColumnDef(name: AttachmentStandardColumnNames, displayName: string, doNotDisplayInGrid: boolean = false) {\r\n let colDef = new FormField();\r\n colDef.name = name;\r\n colDef.displayName = displayName;\r\n colDef.fieldDefinitionClassName = ShortTextFieldType;\r\n colDef.readOnly = true;\r\n colDef.doNotDisplayInGrid = doNotDisplayInGrid;\r\n this.columnDefs.push(colDef);\r\n this.hshFormFieldMNametoFormField[colDef.name] = colDef;\r\n }\r\n\r\n // Accessor methods.\r\n // Getter methods.\r\n public get Flavor(): GridFlavorEnum {\r\n return this.flavor;\r\n }\r\n\r\n public get FlavorModifier(): GridFlavorModifiersEnum {\r\n return this.flavorModifier;\r\n }\r\n public set FlavorModifier(value: GridFlavorModifiersEnum) {\r\n this.flavorModifier = value;\r\n }\r\n\r\n public get ColumnCount(): number {\r\n return (this.columnDefs ? this.columnDefs.length : 0);\r\n }\r\n\r\n public get ColumnDefs(): FormField[] {\r\n return (this.mode == 'design' ? this.ColumnDefsWithVirtualFormFields : this.columnDefs);\r\n }\r\n public getRuntimeColumnDefsWithConfiguredVirtualFormFields(fieldDefinitionService: FieldDefinitionService): FormField[] {\r\n let columnDefs: FormField[] = this.ColumnDefs;\r\n\r\n for (let iCol: number = 0; iCol < columnDefs.length; iCol++) {\r\n let columnDef: FormField = columnDefs[iCol];\r\n GridConfig.configureAnyVirtualFormFields(iCol, columnDef, fieldDefinitionService, columnDefs);\r\n }\r\n\r\n return columnDefs;\r\n }\r\n\r\n public get CachedGridColumnDefs(): FormField[] {\r\n return this.cachedGridColumnDefs;\r\n }\r\n public set CachedGridColumnDefs(value: FormField[]) {\r\n this.cachedGridColumnDefs = value;\r\n }\r\n\r\n public get ConditionalLogicColumnDefs(): FormField[] {\r\n return this.conditionalLogicColumnDefs;\r\n }\r\n public set ConditionalLogicColumnDefs(value: FormField[]) {\r\n this.conditionalLogicColumnDefs = value;\r\n }\r\n // Define two static methods for dealing with grid virtual child form fields:\r\n //\r\n // hasColumnDefWithVirtualFormFieldsFor();\r\n // \r\n public static hasColumnDefWithVirtualFormFieldsFor(childFormFields: FormField[], fieldDefinitionService: FieldDefinitionService): boolean {\r\n let hasVirtualFields: boolean = false;\r\n\r\n for (let index: number = 0; index < childFormFields.length; index++) {\r\n let colDef: FormField = childFormFields[index];\r\n\r\n let fieldDef: FieldDefinition = fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n if ((fieldDef != null) && (fieldDef.customLogicHandler != null)) {\r\n if (fieldDef.customLogicHandler.hasVirtualSiblingFormFieldsFor(colDef)) {\r\n hasVirtualFields = true;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return hasVirtualFields;\r\n }\r\n public static getChildAndAnyVirtualFormFieldsFor(childFormFields: FormField[], fieldDefinitionService: FieldDefinitionService, maxClientId: number): FormField[] {\r\n let resultFormFields: FormField[] = [];\r\n\r\n for (let index: number = 0; index < childFormFields.length; index++) {\r\n let colDef: FormField = childFormFields[index];\r\n resultFormFields.push(colDef);\r\n\r\n let fieldDef: FieldDefinition = fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n if ((fieldDef != null) && (fieldDef.customLogicHandler != null)) {\r\n let virtualFormFields: FormField[] = fieldDef.customLogicHandler.getVirtualSiblingFormFieldsFor(colDef);\r\n\r\n if ((virtualFormFields != null) && (virtualFormFields.length > 0)) {\r\n for (let virtualIndex: number = 0; virtualIndex < virtualFormFields.length; virtualIndex++) {\r\n let virtualFormField: FormField = virtualFormFields[virtualIndex];\r\n virtualFormField.clientId = ++maxClientId;\r\n resultFormFields.push(virtualFormField);\r\n }\r\n\r\n // Save the virtual form fields in the source form field from which they were created.\r\n colDef.transientVirtualFormFields = virtualFormFields;\r\n }\r\n } else if (fieldDef == null) {\r\n ; // Note: this can happen when an entire page is refreshed as it can take time for the field definitions to load from the first/only time from server.\r\n } else\r\n console.log('GridFormFieldComponent.GridColumnDefs(): fieldDef.customLogicHandler() is null.');\r\n }\r\n\r\n return resultFormFields;\r\n }\r\n public static getVirtualSiblingFormFieldsFor(formField: FormField, fieldLogic: IFieldDefinitionLogic): FormField[] {\r\n let virtualFormFields: FormField[] = fieldLogic.getVirtualSiblingFormFieldsFor(formField);\r\n return virtualFormFields;\r\n }\r\n public static getMaxClientIdFor(childFormFields: FormField[]): number {\r\n let maxClientId: number = 0;\r\n\r\n for (let index: number = 0; index < childFormFields.length; index++) {\r\n if (childFormFields[index].clientId > maxClientId)\r\n maxClientId = childFormFields[index].clientId;\r\n }\r\n\r\n return maxClientId;\r\n }\r\n private get ColumnDefsWithVirtualFormFields(): FormField[] {\r\n let maxClientId: number = GridConfig.getMaxClientIdFor(this.columnDefs);\r\n let resultFormFields = GridConfig.getChildAndAnyVirtualFormFieldsFor(this.columnDefs, this.fieldDefinitionService, maxClientId);\r\n return resultFormFields;\r\n }\r\n\r\n public get IsFootnote(): boolean {\r\n return (this.isFootnote);\r\n }\r\n\r\n public setIsFootnote(isFootnoteParam: boolean) {\r\n this.isFootnote = isFootnoteParam;\r\n }\r\n\r\n // Additional query attribute methods.\r\n public getColumnDef(iColIndex: number): FormField {\r\n let colDef: FormField = null;\r\n\r\n if (this.columnDefs && (iColIndex >= 0) && (iColIndex < this.columnDefs.length)) {\r\n colDef = this.columnDefs[iColIndex];\r\n }\r\n\r\n return (colDef);\r\n }\r\n\r\n public getColumnDefAtIndex(index: number, fieldDefinitionClassName: string = null): FormField {\r\n let formField: FormField = ((this.columnDefs != null) && (index < this.columnDefs.length) ? this.columnDefs[index] : null); length\r\n\r\n if ((fieldDefinitionClassName != null) && (formField != null) && (formField.fieldDefinitionClassName != fieldDefinitionClassName))\r\n formField = null;\r\n\r\n return formField;\r\n }\r\n\r\n public getColumnDefByName(strColName: string): FormField {\r\n let formField: FormField = this.hshFormFieldMNametoFormField[strColName];\r\n\r\n return (formField);\r\n }\r\n\r\n public getColumnDefByClientId(iClientId: number): FormField {\r\n let columnDef: FormField = null;\r\n\r\n let searchColDefs: FormField[] = this.columnDefs.filter(cd => cd.gridColClientId == iClientId);\r\n if (searchColDefs && (searchColDefs.length == 1)) {\r\n columnDef = searchColDefs[0];\r\n }\r\n\r\n return (columnDef);\r\n }\r\n\r\n // Other lookup method(s).\r\n public ColumnIndex(formField: FormField): number {\r\n let iColIndex: number = -1;\r\n\r\n for (let iCol: number = 0; iCol < this.columnDefs.length; iCol++) {\r\n let colDef: FormField = this.columnDefs[iCol];\r\n\r\n if (colDef.id == formField.id) {\r\n iColIndex = iCol;\r\n\r\n break;\r\n }\r\n }\r\n\r\n return (iColIndex);\r\n }\r\n\r\n public get GridColumnNames(): string[] {\r\n let astrColumnNames: string[] = [];\r\n\r\n for (let iColDef: number = 0; iColDef < this.columnDefs.length; iColDef++) {\r\n let gridColDef: FormField = this.columnDefs[iColDef];\r\n\r\n astrColumnNames.push(gridColDef.name);\r\n }\r\n\r\n return (astrColumnNames);\r\n }\r\n\r\n public getColumnIndex(columnFormField: FormField): number {\r\n let iColIndex: number = -1;\r\n\r\n if (this.columnDefs) {\r\n for (let iCol: number = 0; iCol < this.columnDefs.length; iCol++) {\r\n let col: FormField = this.columnDefs[iCol];\r\n\r\n if (columnFormField.gridColClientId == col.gridColClientId) {\r\n iColIndex = iCol;\r\n\r\n break;\r\n } // if\r\n } // for\r\n } // if\r\n\r\n return (iColIndex);\r\n }\r\n\r\n // Data manipulation methods.\r\n public addGridColumn(fieldDefinitionClassNameParam: string, name: string = null, displayName: string = null): FormField {\r\n let iNewColumnId: number = this.iNextColumnDefId++;\r\n\r\n let newColumnDef: FormField = new FormField();\r\n\r\n newColumnDef.gridColClientId = iNewColumnId;\r\n\r\n this.setFieldOrderOnNewColumnDef(newColumnDef);\r\n\r\n newColumnDef.name = name ?? `c${iNewColumnId}`; // Create short names that can be used in the saved data.\r\n newColumnDef.fieldDefinitionClassName = fieldDefinitionClassNameParam;\r\n newColumnDef.displayName = displayName ?? newColumnDef.name;\r\n\r\n let fieldDef: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldDefinitionClassNameParam);\r\n newColumnDef.maxLength = fieldDef.customLogicHandler.getDefaultMaxLengthWhenInGrid();\r\n\r\n this.columnDefs.push(newColumnDef);\r\n\r\n this.setNextColumnDefId();\r\n\r\n return newColumnDef;\r\n }\r\n\r\n // Added for VNEXT-1312\r\n private setFieldOrderOnNewColumnDef(newColumnDef: FormField) {\r\n if (!this.columnDefs || this.columnDefs.length == 0) {\r\n newColumnDef.fieldOrder = 1;\r\n } else {\r\n let fieldOrders = this.columnDefs.map(x => { return x.fieldOrder; });\r\n let maxFieldOrder = Math.max(...fieldOrders);\r\n newColumnDef.fieldOrder = maxFieldOrder + 1;\r\n }\r\n }\r\n\r\n public removeGridColumn(iColumnClientId: number): boolean {\r\n let iNumExistingColumns = this.columnDefs.length;\r\n\r\n this.columnDefs = this.columnDefs.filter(cd => cd.gridColClientId !== iColumnClientId);\r\n\r\n this.setNextColumnDefId();\r\n\r\n return (iNumExistingColumns !== this.columnDefs.length);\r\n }\r\n\r\n public AdditionalCellDivStyleFor(columnDef: FormField): string {\r\n let strAddlCssClass: string = 'instance-and-preview-form-field-mat-cell-div';\r\n\r\n return (strAddlCssClass);\r\n }\r\n\r\n // Implement private helper methods.\r\n private setNextColumnDefId(): void {\r\n this.iNextColumnDefId = this.columnDefs.length + 1;\r\n let bNextColumnDefIdValidated: boolean = false;\r\n\r\n while (!bNextColumnDefIdValidated) {\r\n bNextColumnDefIdValidated = true;\r\n let strExistingColNameCheck: string = `c${this.iNextColumnDefId}`; // Cannot rename columns (if data already exists).\r\n\r\n for (let iCol: number = 0; iCol < this.columnDefs.length; iCol++) {\r\n let colDef: FormField = this.columnDefs[iCol];\r\n\r\n if (colDef.gridColClientId === this.iNextColumnDefId) {\r\n bNextColumnDefIdValidated = false;\r\n } else if (colDef.name == strExistingColNameCheck) {\r\n bNextColumnDefIdValidated = false;\r\n }\r\n } // for\r\n\r\n if (!bNextColumnDefIdValidated) {\r\n this.iNextColumnDefId++;\r\n } // if\r\n } // while\r\n\r\n return;\r\n }\r\n\r\n private assignUniqueClientId(iColIndexParam: number): void {\r\n let columnDef: FormField = this.columnDefs[iColIndexParam];\r\n\r\n //let errorMsg = `GridConfig constructor: encountered existing column ${columnDef.id} with an invalid 'name' attribute '${columnDef.name}'.`\r\n //console.log(errorMsg);\r\n\r\n let iTestClientId: number = iColIndexParam + 1;\r\n let bClientIdFound: boolean = false;\r\n\r\n while (!bClientIdFound) {\r\n bClientIdFound = true;\r\n\r\n for (let iCol: number = 0; iCol < this.columnDefs.length; iCol++) {\r\n if (iCol != iColIndexParam) {\r\n if (this.columnDefs[iCol].gridColClientId == iTestClientId) {\r\n bClientIdFound = false;\r\n iTestClientId++;\r\n\r\n break;\r\n } // if\r\n } // if\r\n } // for\r\n } // while\r\n\r\n columnDef.gridColClientId = iTestClientId;\r\n\r\n return;\r\n }\r\n\r\n public removeAnyCircularDependencies(): void {\r\n let colDefs: FormField[] = this.ColumnDefs;\r\n if (colDefs != null) {\r\n for (let index: number = 0; index < colDefs.length; index++) {\r\n let colDef: FormField = colDefs[index];\r\n colDef.removeAnyCircularDependencies();\r\n }\r\n }\r\n }\r\n\r\n // configureAnyVirtualFormFields() -- handle any virtual form fields for the current column/form field.\r\n //\r\n // Question: what is going on in the following method and why is it necessary?\r\n // Answer: in a grid cascading dropdown field (not the ordinary, form-based cascading dropdown field), the first of the\r\n // cascading fields, the leftmost grid column of the multi-column grid cascading dropdown field, needs to\r\n // pass information to the susbsequent cascading fields. Specifically, that first cascading field passes three\r\n // pieces of information:\r\n //\r\n // 1. Primary Field Component -- this allows the second cascading fields to access the first field's component;\r\n // 2. Primary Field Config -- this is the configuration that should be shared by all of the related cascading\r\n // field; and\r\n // 3. Primary Field Data -- this is the data structure that must be shared by all of the related cacading fields.\r\n //\r\n // Note: the above three fields are now packaged in an instance of class SecondaryGridCascadingFieldTransientData.\r\n //\r\n // In the following method, in the for loop, two main operations occur:\r\n //\r\n // a. Config and Data Copied -- the configuration and data class instances are copied from the generated\r\n // sibling virtual form fields into the column definitions that will be passed\r\n // to the secondary cascading field components as their form fields; and\r\n // b. Primary Field Virtual Fields Replaced -- we want the primary cascading field to have a reference to the\r\n // exact same copy of the grid column def/form field that will be\r\n // passed to the secondary cascading fields. This makes coherent\r\n // communication from the primary cascading field to the secondary\r\n // cascading fields work correctly.\r\n //\r\n // Other considerations: while the secondary cascading fields' access to the primary field's component should be\r\n // all that they would need to reference the primary field's configuration and data, there appear to be some life\r\n // cycle inconsistencies and/or race conditions that make depending on the primary field's component not reliable\r\n // in all situations; in such cases, the configuration or data object is used. Having the primary field's\r\n // component can be helpful, so it is copied/made available to the secondary cascading fields as well. Now that\r\n // three fields are packaged within a SecondaryGridCascadingFieldTransientData instance, it should be clearer that\r\n // all three of these fields are generally provided as a package deal if possible ... it's just that the timing of\r\n // copying/making available the primary field's component is not 100% reliable.\r\n private static configureAnyVirtualFormFields(iCol: number, columnDef: FormField, fieldDefinitionService: FieldDefinitionService, columnDefs: FormField[]): void {\r\n let fieldDef: FieldDefinition = fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n let virtualSiblingFormFields: FormField[] = GridConfig.getVirtualSiblingFormFieldsFor(columnDef, fieldDef.customLogicHandler);\r\n if ((columnDef.transientVirtualFormFields == null) && (virtualSiblingFormFields != null) && (virtualSiblingFormFields.length > 0)) {\r\n columnDef.transientVirtualFormFields = [];\r\n\r\n // Replace the virtual form fields with the ones just created.\r\n for (let virtualFFIndex: number = 0; virtualFFIndex < virtualSiblingFormFields.length; virtualFFIndex++) {\r\n let siblingVirtualFormField: FormField = virtualSiblingFormFields[virtualFFIndex];\r\n let corresspondingColDef: FormField = columnDefs[iCol + 1 + virtualFFIndex];\r\n\r\n // a. Config and Data Copied -- see above for the comment.\r\n if (corresspondingColDef.secondaryGridCascadingFieldTransientData == null)\r\n corresspondingColDef.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n corresspondingColDef.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = siblingVirtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig;\r\n corresspondingColDef.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData = siblingVirtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData;\r\n\r\n // b. Primary Field Virtual Fields Replaced -- see above for the comment.\r\n columnDef.transientVirtualFormFields[virtualFFIndex] = corresspondingColDef;\r\n }\r\n }\r\n }\r\n}\r\n","import { GridFormInstanceElementWrapper } from './grid-form-instance-element-wrapper.model';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { GridRowDef } from './grid-row.model';\r\nimport { IFormFieldComponent } from '../../interfaces/iform-field-component';\r\n\r\n// Define classes, an interface used in column total logic.\r\nexport class NumericFormInstanceElementWrapper {\r\n public gridRowDef: GridRowDef;\r\n public formInstanceElementWrapper: GridFormInstanceElementWrapper;\r\n public previousNumericValue: number;\r\n};\r\n\r\nexport class NumericColumnTotalInfo {\r\n // Properties.\r\n public numericComponent: IFormFieldComponent = null;\r\n public columnDef: FormField = null;\r\n\r\n //public columnCellData: GridFormInstanceElementWrapper[] = null;\r\n public columnCellData: NumericFormInstanceElementWrapper[] = null;\r\n\r\n public columnCellTotal: number = 0;\r\n};\r\n\r\n","import { GridFormInstanceElementWrapper } from './grid-form-instance-element-wrapper.model';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { GridRowDef } from './grid-row.model';\r\n\r\nexport class SortGridRowsByFormField {\r\n public constructor(private sortField: FormField, private fieldLogic: IFieldDefinitionLogic, private sortAscending: boolean) { }\r\n\r\n public compareGridRows = (gridRow1: GridRowDef, gridRow2: GridRowDef): number => {\r\n let cellValue1: GridFormInstanceElementWrapper = gridRow1.getFormInstanceElementWrapper(this.sortField);\r\n let cellValue2: GridFormInstanceElementWrapper = gridRow2.getFormInstanceElementWrapper(this.sortField);\r\n\r\n let compareResult: number = (this.sortAscending ? this.fieldLogic.compareAscendingFor(this.sortField, cellValue1.formInstanceElement, cellValue2.formInstanceElement) : this.fieldLogic.compareDescendingFor(this.sortField, cellValue1.formInstanceElement, cellValue2.formInstanceElement));\r\n return compareResult;\r\n }\r\n}\r\n\r\nexport class SortGridRowsByRowId {\r\n public constructor() { }\r\n\r\n public compareGridRows = (gridRow1: GridRowDef, gridRow2: GridRowDef): number => {\r\n let compareResult: number = 0;\r\n\r\n if (gridRow1.RowIndex > gridRow2.RowIndex)\r\n compareResult = 1;\r\n else if (gridRow1.RowIndex < gridRow2.RowIndex)\r\n compareResult = -1;\r\n\r\n return compareResult;\r\n }\r\n}\r\n","import { ComponentRef } from '@angular/core';\r\nimport { CollectionViewer, DataSource } from \"@angular/cdk/collections\";\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { Observable, of } from 'rxjs';\r\n//import { MatSort, Sort } from '@angular/material/sort';\r\n//import { MatTableDataSource } from '@angular/material/table';\r\n\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { GridConfig } from './grid-config.model';\r\nimport { IFormFieldComponent } from '../../interfaces/iform-field-component';\r\nimport { IFormContentElement, IRowCellDataHash, GridRowViewModel } from '../form-builder/grid-row.model';\r\nimport { FormFieldProcessingPhaseEnum } from '../../enums/form-field-processing-phase.enum';\r\nimport { INumericValuesHashByFieldName, IGridRow } from '../../interfaces/grid-row.interface';\r\nimport {\r\n CascadingDropDownFieldType, RichTextFieldType, ShortTextFieldType, IntegerFieldType,\r\n DateFieldType, DropDownFieldType, CurrencyFieldType, CheckboxFieldType\r\n} from '../form-builder/form-field-types';\r\nimport { CascadingDropDownFormFieldConfig } from '../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../../models/cascading-dropdown/cascading-dropdown-data.model';\r\nimport { GridFormInstanceElementWrapper } from './grid-form-instance-element-wrapper.model';\r\nimport { ComponentAndFormField } from './component-and-form-field-model';\r\nimport { FieldDefinition } from '../../models/form-builder/field-definition.model';\r\nimport { FieldDefinitionService } from '../../services/field-definition.service';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { NumericFormInstanceElementWrapper, NumericColumnTotalInfo } from './column-total-models';\r\nimport { GridRowDef, GRID_ROW_ID_KEY, GRID_COLUMN_ID_KEY } from './grid-row.model';\r\nimport { GridCellDataForSerialization } from './grid-cell-data.model';\r\nimport { SortGridRowsByFormField, SortGridRowsByRowId } from './sort-classes';\r\nimport { IFormFieldNameToFormInstanceElementWrapper, IGetCellDisplayValue } from './grid-interfaces';\r\nimport { KENDO_DATA_GRID_ROW_KEY } from '../../services/kendo-grid.service';\r\nimport { AttachmentStandardColumnNames, GridFlavorEnum } from '../../enums/grid.enums';\r\n\r\ninterface INumericColumnTotalInfoByColClientId {\r\n [gridColClientId: number]: NumericColumnTotalInfo;\r\n}\r\n\r\n//const KENDO_DATA_GRID_ROW_KEY: string = '__gridRow';\r\n\r\n// Define the grid data source.\r\nexport class GridAllModesDataSource implements DataSource {\r\n // Instance data.\r\n private gridConfig: GridConfig = null;\r\n //private igetDisplayValue: IGetDisplayValue = null;\r\n private igetDisplayValue: IGetCellDisplayValue = null;\r\n\r\n private arrGridRows: GridRowDef[] = [];\r\n private arrDeletedGridRows: GridRowDef[] = [];\r\n\r\n private gridRowsSubject: BehaviorSubject = new BehaviorSubject([]);\r\n //private simpleMatTableDataSource: MatTableDataSource = null; // Note: this is not presently being used.\r\n\r\n private iNextId: number = 1;\r\n\r\n // Begin properties related to numeric column totals.\r\n private hshTotalInfoByColClientId: INumericColumnTotalInfoByColClientId = null;\r\n // End properties related to numeric column totals.\r\n\r\n // Sort-related property.\r\n private sortField: FormField = null;\r\n private fieldLogic: IFieldDefinitionLogic = null;\r\n private sortAscending: boolean = false;\r\n\r\n // Kendo-related data.\r\n private arrKendoGridRows: object[] = [];\r\n\r\n // Constructor.\r\n public constructor(gridConfigParam: GridConfig, getDisplayValueParam: IGetCellDisplayValue) {\r\n this.gridConfig = gridConfigParam;\r\n this.igetDisplayValue = getDisplayValueParam;\r\n }\r\n\r\n // Implement the DataSource interface.\r\n public connect(collectionViewer: CollectionViewer): Observable {\r\n let result: Observable = this.gridRowsSubject.asObservable();\r\n\r\n this.gridRowsSubject.next(this.arrGridRows);\r\n\r\n return (result);\r\n }\r\n\r\n public disconnect(collectionViewer: CollectionViewer): void {\r\n this.gridRowsSubject.complete();\r\n\r\n return;\r\n }\r\n // End implementation the DataSource interface.\r\n\r\n // Getter methods.\r\n public get GridRows(): GridRowDef[] {\r\n return (this.arrGridRows);\r\n }\r\n\r\n public set GridRows(gridRows: GridRowDef[]) {\r\n this.arrGridRows = gridRows;\r\n }\r\n\r\n public getGridRow(iRowIndex: number): GridRowDef {\r\n let gridRowDef: GridRowDef =\r\n ((iRowIndex >= 0) && (iRowIndex < this.arrGridRows.length) ?\r\n this.arrGridRows[iRowIndex] : null);\r\n\r\n return (gridRowDef);\r\n }\r\n\r\n public get GridRowCount(): number {\r\n return (this.arrGridRows ? this.arrGridRows.length : 0);\r\n }\r\n\r\n public getRowByClientId(iRowClientId: number): GridRowDef {\r\n let result: GridRowDef = null;\r\n\r\n if (this.arrGridRows) {\r\n let searchRows: GridRowDef[] = this.arrGridRows.filter(gr => gr.ClientId == iRowClientId);\r\n if (searchRows && (searchRows.length == 1)) {\r\n result = searchRows[0];\r\n }\r\n }\r\n\r\n return (result);\r\n }\r\n\r\n // TODO -- optimize by building a map on first call\r\n public getRowByDatabaseId(databaseId: number): GridRowDef {\r\n let result: GridRowDef = null;\r\n\r\n if (this.arrGridRows) {\r\n let searchRows: GridRowDef[] = this.arrGridRows.filter(gr => gr.DatabaseId == databaseId);\r\n if (searchRows && (searchRows.length == 1)) {\r\n result = searchRows[0];\r\n }\r\n }\r\n\r\n return (result);\r\n }\r\n\r\n /*\r\n public get SimpleTableDataSource(): MatTableDataSource {\r\n return this.simpleMatTableDataSource;\r\n }\r\n */\r\n // End getter methods.\r\n\r\n // Manipulate grid data.\r\n public addRow(iDatabaseId: number = 0, bNotifySubject: boolean = true, bInitializeCellData: boolean = true): GridRowDef {\r\n let newRow: GridRowDef = null;\r\n if (bInitializeCellData) {\r\n newRow = new GridRowDef(this.gridConfig, this.iNextId++, this.arrGridRows.length, iDatabaseId, null, this.igetDisplayValue);\r\n } else {\r\n newRow = new GridRowDef(this.gridConfig, this.iNextId++, this.arrGridRows.length, iDatabaseId, null);\r\n }\r\n\r\n if (this.gridConfig.IsFootnote) {\r\n let footnoteNumber = this.arrGridRows.length + 1;\r\n newRow.FormInstanceElementWrappers[0].formInstanceElement.textValue = footnoteNumber.toString();\r\n newRow.FormInstanceElementWrappers[0].formInstanceElement.intValue = footnoteNumber;\r\n newRow.FormInstanceElementWrappers[0].standinDisplayValue = footnoteNumber.toString();\r\n newRow.FormInstanceElementWrappers[0].formInstanceElement.UserUpdatedData = true;\r\n }\r\n\r\n // Add a row to the original data model.\r\n this.arrGridRows.push(newRow);\r\n // Add a row to the Kendo-friendly data mode.\r\n let blankRow: object = {};\r\n blankRow[KENDO_DATA_GRID_ROW_KEY] = newRow;\r\n let colDefs: FormField[] = this.gridConfig.ColumnDefs;\r\n for (let index: number = 0; index < colDefs.length; index++) {\r\n let colDef: FormField = colDefs[index];\r\n blankRow[colDef.name] = ''; // Note: this is not always correct as columns can have default values.\r\n }\r\n this.arrKendoGridRows.push(blankRow); \r\n\r\n if (bNotifySubject)\r\n this.gridRowsSubject.next(this.arrGridRows);\r\n\r\n // In case we are managing column totals, call the 'addingRow' method.\r\n this.addingRow(newRow);\r\n\r\n return newRow;\r\n }\r\n\r\n public removeRow(IdToDelete: number): boolean {\r\n let iNumExistingRows: number = this.arrGridRows.length;\r\n\r\n let arrDeletedRows: GridRowDef[] =\r\n this.arrGridRows.filter(r => r.ClientId == IdToDelete);\r\n if ((!arrDeletedRows) || (arrDeletedRows.length != 1)) {\r\n return (false);\r\n }\r\n this.arrDeletedGridRows.push(arrDeletedRows[0]);\r\n\r\n // In case we are managing column totals, call the 'deletingRow' method.\r\n this.deletingRow(arrDeletedRows[0]);\r\n\r\n // Change the indexes of any subsequent rows to account for the deleted row.\r\n let iDeletedRowIndex: number = arrDeletedRows[0].RowIndex;\r\n if (iDeletedRowIndex + 1 < this.arrGridRows.length) {\r\n for (let iSubsequentRowIndex: number = iDeletedRowIndex + 1;\r\n iSubsequentRowIndex < this.arrGridRows.length;\r\n iSubsequentRowIndex++) {\r\n let subsequentRow: GridRowDef = this.arrGridRows[iSubsequentRowIndex];\r\n\r\n subsequentRow.RowIndex = subsequentRow.RowIndex - 1;\r\n }\r\n }\r\n\r\n this.arrGridRows = this.arrGridRows.filter(r => r.ClientId != IdToDelete);\r\n\r\n let bRemoved: boolean = (iNumExistingRows != this.arrGridRows.length);\r\n if (bRemoved) {\r\n this.gridRowsSubject.next(this.arrGridRows);\r\n }\r\n\r\n return bRemoved;\r\n }\r\n\r\n public copyDataToGrid(pasteData: string, replaceOrAppend: any, allComponents: ComponentAndFormField[], hasFixedFirstColumnJsonConfig: boolean, formField: FormField, fieldDefinitionService: FieldDefinitionService): void {\r\n if (!pasteData) {\r\n return;\r\n }\r\n let offset = 0;\r\n if (replaceOrAppend.pasteMode == 'append') {\r\n offset = this.GridRows.length;\r\n }\r\n else {\r\n this.GridRows.forEach(r => this.removeRow(r.ClientId));\r\n }\r\n\r\n let pasteDataLines: string[] = pasteData.split(/\\r\\n|\\r|\\n/);\r\n let pasteRowCount: number = pasteDataLines.length;\r\n let startingCol: number = 0;\r\n if (hasFixedFirstColumnJsonConfig && (formField.transientFixedFirstColumnValues != null)) {\r\n pasteRowCount = formField.transientFixedFirstColumnValues.values.length;\r\n offset = 0;\r\n startingCol = 1;\r\n }\r\n\r\n for (let row = 0; row < pasteRowCount; row++) {\r\n if (pasteDataLines[row].trim().length) {\r\n let pasteCells: string[] = pasteDataLines[row].split('\\t');\r\n if (row + offset + 1 > this.GridRows.length) {\r\n this.addRow();\r\n }\r\n\r\n for (let col = startingCol; col < pasteCells.length; col++) {\r\n let formField: FormField = this.gridConfig.getColumnDef(col);\r\n let elementWrapper: GridFormInstanceElementWrapper = this.GridRows[row + offset].FormInstanceElementWrappers[col];\r\n let pasteValue: string = pasteCells[col];\r\n let component: IFormFieldComponent = allComponents[col].Component;\r\n component.pseudoStatic_pasteValue(pasteValue, elementWrapper, formField);\r\n\r\n // Note: the following block will replace the use of the method component.pseudoStatic_pasteValue(), just above,\r\n // and that will allow us to move this logic into the grid component data class/this.allModesDataSource.\r\n //let fieldDefinition: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(formField.fieldDefinitionClassName);\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(formField.fieldDefinitionClassName);\r\n let fieldDefLogic: IFieldDefinitionLogic = (fieldDefinition != null ? fieldDefinition.customLogicHandler : null);\r\n /*\r\n if (fieldDefLogic != null)\r\n fieldDefLogic.pasteDataForInto(formField, elementWrapper.formInstanceElement, pasteValue);\r\n */\r\n\r\n elementWrapper.formInstanceElement.UserUpdatedData = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Load grid rows from the incoming view model data.\r\n public loadGridDataFromViewModelElements(fieldDefinitionService: FieldDefinitionService, gridRowVMs: GridRowViewModel[]): void {\r\n this.doLoadGridDataFromViewModelElements(fieldDefinitionService, gridRowVMs);\r\n }\r\n private doLoadGridDataFromViewModelElements(fieldDefinitionService: FieldDefinitionService, gridRowVMs: GridRowViewModel[]): void {\r\n if (gridRowVMs && (gridRowVMs.length > 0)) {\r\n for (let iRow: number = 0; iRow < gridRowVMs.length; iRow++) {\r\n let gridRowVM: GridRowViewModel = gridRowVMs[iRow];\r\n\r\n let nextRow: GridRowDef = this.addRow(gridRowVM.id, false, false); // Do not notify the grid on each row added.\r\n nextRow.RowIndex = iRow;\r\n // Notify the grid of all rows outside the for loop.\r\n let rowFIEWrappers: GridFormInstanceElementWrapper[] = nextRow.FormInstanceElementWrappers;\r\n // Keep track of form fields and form instance elements in case we have a form field, e.g. a formula form field, that needs all values.\r\n let rowFormFields: FormField[] = [];\r\n let rowFormInstanceElements: FormInstanceElement[] = [];\r\n\r\n for (let iFIEWrapper: number = 0; iFIEWrapper < rowFIEWrappers.length; iFIEWrapper++) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = rowFIEWrappers[iFIEWrapper];\r\n let iColIndex: number = formInstanceElementWrapper.colIndex;\r\n let columnDef: FormField = this.gridConfig.getColumnDef(iColIndex);\r\n\r\n rowFormFields.push(columnDef);\r\n rowFormInstanceElements.push(formInstanceElementWrapper.formInstanceElement);\r\n }\r\n\r\n // Now process each column in turn.\r\n for (let iFIEWrapper: number = 0; iFIEWrapper < rowFIEWrappers.length; iFIEWrapper++) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = rowFIEWrappers[iFIEWrapper];\r\n let iColIndex: number = formInstanceElementWrapper.colIndex;\r\n let columnDef: FormField = this.gridConfig.getColumnDef(iColIndex);\r\n let strCellName: string = columnDef.name.toLowerCase();\r\n\r\n let formInstanceElem: FormInstanceElement = formInstanceElementWrapper.formInstanceElement\r\n\r\n formInstanceElem.transientValuesHash = {};\r\n formInstanceElem.transientValuesHash[GRID_ROW_ID_KEY] = nextRow.ClientId\r\n\r\n let formContentElement: IFormContentElement = gridRowVM.cellDataHash[strCellName];\r\n\r\n //if (formInstanceElementWrapper) {\r\n if (formContentElement != null) {\r\n // Set up the wrapper's form instance element\r\n // and configure its transient/client-only values.\r\n formInstanceElem.UserUpdatedData = true;\r\n\r\n // Set the form instance element values.\r\n formInstanceElem.ValueType = formContentElement.valueType;\r\n // TO DO: ONLY PERFORM ONE OF THE FOLLOWING SET VALUES BASED ON formContentElement.valueType.\r\n formInstanceElem.IntValue = formContentElement.intValue;\r\n formInstanceElem.DoubleValue = formContentElement.doubleValue;\r\n formInstanceElem.DecimalValue = formContentElement.decimalValue;\r\n formInstanceElem.CustomValue = formContentElement.customValue;\r\n formInstanceElem.TextValue = formContentElement.textValue;\r\n formInstanceElem.BooleanValue = formContentElement.booleanValue;\r\n\r\n // the following block supports multi-select fields\r\n {\r\n if ((formContentElement.childFormInstanceElements != null) && (formContentElement.childFormInstanceElements.length > 0)) {\r\n formInstanceElem.childFormInstanceElements = [];\r\n\r\n for (let iChild: number = 0; iChild < formContentElement.childFormInstanceElements.length; iChild++) {\r\n let contentElementChild: IFormContentElement = formContentElement.childFormInstanceElements[iChild];\r\n\r\n let childElement: FormInstanceElement = new FormInstanceElement();\r\n childElement.id = contentElementChild.id;\r\n childElement.ValueType = contentElementChild.valueType;\r\n childElement.IntValue = contentElementChild.intValue;\r\n childElement.DoubleValue = contentElementChild.doubleValue;\r\n childElement.DecimalValue = contentElementChild.decimalValue;\r\n childElement.CustomValue = contentElementChild.customValue;\r\n childElement.TextValue = contentElementChild.textValue;\r\n childElement.BooleanValue = contentElementChild.booleanValue;\r\n\r\n formInstanceElem.childFormInstanceElements.push(childElement);\r\n }\r\n }\r\n }\r\n } // if\r\n\r\n // Do we have a form field that needs all field values, e.g. a formula form field?\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n if (fieldDefinition.customLogicHandler.requiresFieldValueUpdate()) {\r\n fieldDefinition.customLogicHandler.formFieldValuesUpdated(fieldDefinitionService, rowFormFields, rowFormInstanceElements, nextRow, columnDef, formInstanceElem);\r\n }\r\n\r\n //console.log(formInstanceElem);\r\n\r\n // Now get the cell's display value.\r\n formInstanceElementWrapper.standinDisplayValue =\r\n this.igetDisplayValue.getCellDisplayValue(\r\n iColIndex,\r\n columnDef,\r\n formInstanceElementWrapper,\r\n nextRow,\r\n FormFieldProcessingPhaseEnum.LOADING_DATA);\r\n } // for\r\n } // for\r\n\r\n this.gridRowsSubject.next(this.arrGridRows); // Notify the grid of all rows added.\r\n } // if\r\n\r\n return;\r\n }\r\n\r\n public static createGridRowFromGridViewModelObect(gridConfig: GridConfig, fieldDefinitionService: FieldDefinitionService, igetDisplayValue: IGetCellDisplayValue, gridRowVM: GridRowViewModel, iNextId: number, totalGridRows: number): GridRowDef {\r\n //debugger;\r\n //let nextRow: GridRowDef = new GridRowDef(this.gridConfig, this.iNextId++, this.arrGridRows.length, gridRowVM.id);\r\n let nextRow: GridRowDef = new GridRowDef(gridConfig, iNextId++, totalGridRows, gridRowVM.id, gridRowVM.isPendingEditFor_GridRowId);\r\n\r\n let rowFIEWrappers: GridFormInstanceElementWrapper[] = nextRow.FormInstanceElementWrappers;\r\n // Keep track of form fields and form instance elements in case we have a form field, e.g. a formula form field, that needs all values.\r\n let rowFormFields: FormField[] = [];\r\n let rowFormInstanceElements: FormInstanceElement[] = [];\r\n\r\n for (let iFIEWrapper: number = 0; iFIEWrapper < rowFIEWrappers.length; iFIEWrapper++) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = rowFIEWrappers[iFIEWrapper];\r\n let iColIndex: number = formInstanceElementWrapper.colIndex;\r\n let columnDef: FormField = gridConfig.getColumnDef(iColIndex);\r\n\r\n rowFormFields.push(columnDef);\r\n rowFormInstanceElements.push(formInstanceElementWrapper.formInstanceElement);\r\n }\r\n\r\n // Now process each column in turn.\r\n for (let iFIEWrapper: number = 0; iFIEWrapper < rowFIEWrappers.length; iFIEWrapper++) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = rowFIEWrappers[iFIEWrapper];\r\n let iColIndex: number = formInstanceElementWrapper.colIndex;\r\n let columnDef: FormField = gridConfig.getColumnDef(iColIndex);\r\n let strCellName: string = columnDef.name.toLowerCase();\r\n\r\n //if (strCellName == AttachmentStandardColumnNames.IsDisabled) {\r\n // continue;\r\n //}\r\n\r\n let formInstanceElem: FormInstanceElement = formInstanceElementWrapper.formInstanceElement\r\n\r\n formInstanceElem.transientValuesHash = {};\r\n formInstanceElem.transientValuesHash[GRID_ROW_ID_KEY] = nextRow.ClientId\r\n\r\n let formContentElement: IFormContentElement = gridRowVM.cellDataHash[strCellName];\r\n\r\n //if (formInstanceElementWrapper) {\r\n if (formContentElement != null) {\r\n // Set up the wrapper's form instance element\r\n // and configure its transient/client-only values.\r\n formInstanceElem.UserUpdatedData = true;\r\n\r\n // Set the form instance element values.\r\n formInstanceElem.ValueType = formContentElement.valueType;\r\n // TO DO: ONLY PERFORM ONE OF THE FOLLOWING SET VALUES BASED ON formContentElement.valueType.\r\n formInstanceElem.IntValue = formContentElement.intValue;\r\n formInstanceElem.DoubleValue = formContentElement.doubleValue;\r\n formInstanceElem.DecimalValue = formContentElement.decimalValue;\r\n formInstanceElem.CustomValue = formContentElement.customValue;\r\n formInstanceElem.TextValue = formContentElement.textValue;\r\n formInstanceElem.BooleanValue = formContentElement.booleanValue;\r\n\r\n // 05-10-2021 note: added the following block to support\r\n // multi - select fields as grid columns.\r\n {\r\n if ((formContentElement.childFormInstanceElements != null) && (formContentElement.childFormInstanceElements.length > 0)) {\r\n formInstanceElem.childFormInstanceElements = [];\r\n\r\n for (let iChild: number = 0; iChild < formContentElement.childFormInstanceElements.length; iChild++) {\r\n let contentElementChild: IFormContentElement = formContentElement.childFormInstanceElements[iChild];\r\n\r\n let childElement: FormInstanceElement = new FormInstanceElement();\r\n childElement.id = contentElementChild.id;\r\n childElement.ValueType = contentElementChild.valueType;\r\n childElement.IntValue = contentElementChild.intValue;\r\n childElement.DoubleValue = contentElementChild.doubleValue;\r\n childElement.DecimalValue = contentElementChild.decimalValue;\r\n childElement.CustomValue = contentElementChild.customValue;\r\n childElement.TextValue = contentElementChild.textValue;\r\n childElement.BooleanValue = contentElementChild.booleanValue;\r\n\r\n formInstanceElem.childFormInstanceElements.push(childElement);\r\n }\r\n }\r\n }\r\n } // if\r\n\r\n // Do we have a form field that needs all field values, e.g. a formula form field?\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(columnDef.fieldDefinitionClassName);\r\n if (fieldDefinition.customLogicHandler.requiresFieldValueUpdate()) {\r\n fieldDefinition.customLogicHandler.formFieldValuesUpdated(fieldDefinitionService, rowFormFields, rowFormInstanceElements, nextRow, columnDef, formInstanceElem);\r\n }\r\n\r\n // Now get the cell's display value.\r\n formInstanceElementWrapper.standinDisplayValue = igetDisplayValue.getCellDisplayValue(iColIndex, columnDef, formInstanceElementWrapper, nextRow, FormFieldProcessingPhaseEnum.LOADING_DATA);\r\n } // for\r\n\r\n return nextRow;\r\n }\r\n public get GridRowsAsJson(): object[] {\r\n return this.arrKendoGridRows;\r\n }\r\n\r\n public saveGridDataToViewModelElements(): GridRowViewModel[] {\r\n // Package the grid cell data as view model data structures.\r\n let arrColDefs: FormField[] = this.gridConfig.ColumnDefs;\r\n\r\n let arrAllRowsData: GridRowViewModel[] = [];\r\n\r\n // Process deleted rows.\r\n {\r\n for (let iDeletedRow: number = 0; iDeletedRow < this.arrDeletedGridRows.length; iDeletedRow++) {\r\n let deletedRow: GridRowDef = this.arrDeletedGridRows[iDeletedRow];\r\n\r\n let hshRowCellData: IRowCellDataHash = {};\r\n this.loadRowCellDataHash(arrColDefs, deletedRow, hshRowCellData);\r\n\r\n let gridRowVM: GridRowViewModel = new GridRowViewModel();\r\n gridRowVM.rowIndex = iDeletedRow;\r\n gridRowVM.id = deletedRow.DatabaseId;\r\n gridRowVM.cellDataHash = hshRowCellData;\r\n gridRowVM.isDeleted = true;\r\n\r\n arrAllRowsData.push(gridRowVM);\r\n }\r\n }\r\n\r\n // Process new and updated rows.\r\n {\r\n for (let iRow: number = 0; iRow < this.arrGridRows.length; iRow++) {\r\n let row: GridRowDef = this.arrGridRows[iRow];\r\n\r\n let hshRowCellData: IRowCellDataHash = {};\r\n this.loadRowCellDataHash(arrColDefs, row, hshRowCellData);\r\n\r\n let gridRowVM: GridRowViewModel = new GridRowViewModel();\r\n gridRowVM.rowIndex = iRow;\r\n gridRowVM.id = row.DatabaseId;\r\n gridRowVM.cellDataHash = hshRowCellData;\r\n arrAllRowsData.push(gridRowVM);\r\n }\r\n }\r\n\r\n // Save all of the JSON as a string.\r\n return (arrAllRowsData);\r\n }\r\n\r\n // Sorting.\r\n public sortRowsByColumn(formField: FormField, fieldLogic: IFieldDefinitionLogic, sortAscending: boolean): void {\r\n let gridRowSorter: SortGridRowsByFormField = new SortGridRowsByFormField(formField, fieldLogic, sortAscending);\r\n\r\n this.arrGridRows.sort(gridRowSorter.compareGridRows);\r\n this.gridRowsSubject.next(this.arrGridRows);\r\n }\r\n\r\n public sortRowsByRowId(): void {\r\n // Note: this method assumes an descending sort.\r\n let gridRowSorter: SortGridRowsByRowId = new SortGridRowsByRowId();\r\n\r\n this.arrGridRows.sort(gridRowSorter.compareGridRows);\r\n this.gridRowsSubject.next(this.arrGridRows);\r\n }\r\n\r\n /*\r\n private compareGridRows(gridRow1: GridRowDef, gridRow2: GridRowDef): number {\r\n let cellValue1: GridFormInstanceElementWrapper = gridRow1.getFormInstanceElementWrapper(this.sortField);\r\n let cellValue2: GridFormInstanceElementWrapper = gridRow2.getFormInstanceElementWrapper(this.sortField);\r\n\r\n let compareResult: number = (this.sortAscending ? this.fieldLogic.compareAscendingFor(this.sortField, cellValue1.formInstanceElement, cellValue2.formInstanceElement) : this.fieldLogic.compareDescendingFor(this.sortField, cellValue1.formInstanceElement, cellValue2.formInstanceElement));\r\n return compareResult;\r\n }\r\n */\r\n\r\n // Column totals logic.\r\n public trackColumnTotals(numericComponentPairs: ComponentAndFormField[]): void {\r\n if (numericComponentPairs.length > 0) {\r\n this.hshTotalInfoByColClientId = {};\r\n\r\n for (let iComp: number = 0; iComp < numericComponentPairs.length; iComp++) {\r\n let numericComponent: IFormFieldComponent = numericComponentPairs[iComp].Component;\r\n let compColDef: FormField = numericComponentPairs[iComp].FormField;\r\n let iColClientId = compColDef.gridColClientId;\r\n\r\n // Create and save the numeric component's total info.\r\n let compTotalInfo: NumericColumnTotalInfo = new NumericColumnTotalInfo();\r\n compTotalInfo.numericComponent = numericComponent;\r\n compTotalInfo.columnDef = compColDef;\r\n compTotalInfo.columnCellData = [];\r\n compTotalInfo.columnCellTotal = 0;\r\n\r\n this.hshTotalInfoByColClientId[iColClientId] = compTotalInfo;\r\n\r\n // Load the component's column data.\r\n {\r\n if (this.arrGridRows && (this.arrGridRows.length > 0)) {\r\n let dblColumnTotal: number = 0;\r\n\r\n for (let iRow: number = 0; iRow < this.arrGridRows.length; iRow++) {\r\n let gridRow: GridRowDef = this.arrGridRows[iRow];\r\n\r\n let fieWrapper: GridFormInstanceElementWrapper =\r\n gridRow.getFormInstanceElementWrapper(compColDef);\r\n\r\n if (fieWrapper) {\r\n let cellDataWrapper: NumericFormInstanceElementWrapper =\r\n new NumericFormInstanceElementWrapper();\r\n cellDataWrapper.gridRowDef = gridRow;\r\n cellDataWrapper.formInstanceElementWrapper = fieWrapper;\r\n cellDataWrapper.previousNumericValue =\r\n numericComponent.getNumericValue(compColDef,\r\n fieWrapper.formInstanceElement,\r\n gridRow,\r\n FormFieldProcessingPhaseEnum.CALCULATING_COLUMN_TOTAL);\r\n compTotalInfo.columnCellData.push(cellDataWrapper);\r\n\r\n dblColumnTotal += cellDataWrapper.previousNumericValue;\r\n }\r\n } // for\r\n\r\n compTotalInfo.columnCellTotal = dblColumnTotal;\r\n } // if\r\n } // block\r\n } // for \r\n } // if\r\n\r\n return;\r\n }\r\n\r\n public getColumnTotal(columnDef: FormField): number {\r\n let total: number = 0;\r\n\r\n if (this.hshTotalInfoByColClientId !== null) {\r\n let totalInfo: NumericColumnTotalInfo =\r\n this.hshTotalInfoByColClientId[columnDef.gridColClientId];\r\n\r\n if (totalInfo) {\r\n total = totalInfo.columnCellTotal;\r\n }\r\n }\r\n\r\n return (total);\r\n }\r\n\r\n public cellValueChanged(gridRowDef: GridRowDef, columnDef: FormField, fieldLogicHandler: IFieldDefinitionLogic, newValue: number): void {\r\n if (this.hshTotalInfoByColClientId !== null) {\r\n let totalInfo: NumericColumnTotalInfo = this.hshTotalInfoByColClientId[columnDef.gridColClientId];\r\n\r\n if ((totalInfo != null) && (totalInfo.columnCellData != null)) {\r\n let iRowIndex: number = gridRowDef.RowIndex;\r\n\r\n if ((iRowIndex >= 0) && (iRowIndex < totalInfo.columnCellData.length)) {\r\n let cellWrapper: NumericFormInstanceElementWrapper = totalInfo.columnCellData[iRowIndex];\r\n\r\n let changeAmount: number = (newValue - cellWrapper.previousNumericValue);\r\n cellWrapper.previousNumericValue = newValue;\r\n totalInfo.columnCellTotal += changeAmount;\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n private addingRow(gridRow: GridRowDef): void {\r\n if (this.hshTotalInfoByColClientId !== null) {\r\n // Note: incorporate the new row, the grid's\r\n // last row(addRow() always appends a row),\r\n // into the column totals logic.\r\n let astrClientIds: string[] = Object.keys(this.hshTotalInfoByColClientId);\r\n\r\n for (let iKeyIndex: number = 0; iKeyIndex < astrClientIds.length; iKeyIndex++) {\r\n let strClientId: string = astrClientIds[iKeyIndex];\r\n\r\n let totalInfo: NumericColumnTotalInfo =\r\n this.hshTotalInfoByColClientId[strClientId];\r\n\r\n let gridCellWrapper: GridFormInstanceElementWrapper =\r\n gridRow.getFormInstanceElementWrapper(totalInfo.columnDef);\r\n\r\n if (gridCellWrapper) {\r\n let totalCellWrapper: NumericFormInstanceElementWrapper =\r\n new NumericFormInstanceElementWrapper();\r\n\r\n {\r\n totalCellWrapper.formInstanceElementWrapper = gridCellWrapper;\r\n totalCellWrapper.gridRowDef = gridRow;\r\n\r\n totalCellWrapper.previousNumericValue =\r\n totalInfo.numericComponent.getNumericValue(totalInfo.columnDef,\r\n gridCellWrapper.formInstanceElement,\r\n gridRow,\r\n FormFieldProcessingPhaseEnum.LOADING_DATA);\r\n\r\n totalInfo.columnCellData.push(totalCellWrapper);\r\n } // block\r\n\r\n totalInfo.columnCellTotal += totalCellWrapper.previousNumericValue;\r\n } // if\r\n } // for\r\n } // if\r\n\r\n return;\r\n }\r\n\r\n private deletingRow(gridRowParam: GridRowDef): void {\r\n if (this.hshTotalInfoByColClientId !== null) {\r\n // Note: remove the row being deleted\r\n // from column totals logic.\r\n let astrClientIds: string[] = Object.keys(this.hshTotalInfoByColClientId);\r\n\r\n for (let iKeyIndex: number = 0; iKeyIndex < astrClientIds.length; iKeyIndex++) {\r\n let strClientId: string = astrClientIds[iKeyIndex];\r\n\r\n let totalInfo: NumericColumnTotalInfo =\r\n this.hshTotalInfoByColClientId[strClientId];\r\n\r\n if (totalInfo && totalInfo.columnCellData) {\r\n let arrCellBeingDeleted: NumericFormInstanceElementWrapper[] =\r\n totalInfo.columnCellData.filter(ccd => ccd.gridRowDef.RowIndex === gridRowParam.RowIndex);\r\n\r\n if (arrCellBeingDeleted && (arrCellBeingDeleted.length === 1)) {\r\n totalInfo.columnCellTotal -= arrCellBeingDeleted[0].previousNumericValue;\r\n\r\n totalInfo.columnCellData =\r\n totalInfo.columnCellData.filter(ccd => ccd.gridRowDef.RowIndex !== gridRowParam.RowIndex);\r\n } // if\r\n } // if\r\n } // for\r\n } // if\r\n\r\n return;\r\n }\r\n // End methods related to column totals logic.\r\n\r\n // Define/implement private methods.\r\n private loadRowCellDataHash(arrColDefs: FormField[],\r\n row: GridRowDef,\r\n hshRowCellData: IRowCellDataHash): void {\r\n let arrFormInstanceElementWrappers: GridFormInstanceElementWrapper[] = row.FormInstanceElementWrappers;\r\n\r\n //let arrRowCellData: GridCellDataForSerialization[] = [];\r\n //let hshRowCellData: IRowCellDataHash = {};\r\n\r\n //for (let iCol: number = 0; iCol < arrFormInstanceElements.length; iCol++) {\r\n for (let iCol: number = 0; iCol < arrFormInstanceElementWrappers.length; iCol++) {\r\n let colDef: FormField = arrColDefs[iCol];\r\n //let cellData: FormInstanceElement = arrFormInstanceElements[iCol];\r\n let cellDataWrapper: GridFormInstanceElementWrapper = arrFormInstanceElementWrappers[iCol];\r\n let cellData: FormInstanceElement = cellDataWrapper.formInstanceElement;\r\n\r\n let hshCellData: GridCellDataForSerialization = {\r\n id: cellData.id,\r\n\r\n valueType: cellData.valueType,\r\n\r\n intValue: cellData.intValue,\r\n doubleValue: cellData.doubleValue,\r\n decimalValue: cellData.decimalValue,\r\n customValue: cellData.customValue,\r\n textValue: cellData.textValue,\r\n booleanValue: cellData.booleanValue,\r\n\r\n childFormInstanceElements: cellData.childFormInstanceElements\r\n }\r\n\r\n let name = colDef.name; //.replace('_vff', '-vff');\r\n hshRowCellData[name] = hshCellData;\r\n }\r\n\r\n return;\r\n }\r\n}\r\n","import { ComponentRef } from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { IFormFieldComponent } from '../../interfaces/iform-field-component';\r\nimport {\r\n CascadingDropDownFieldType, RichTextFieldType, CheckboxFieldType\r\n} from '../form-builder/form-field-types';\r\nimport { FormField } from '../form-builder/form-field.model';\r\n\r\nexport class GridFormInstanceElementWrapper {\r\n public formInstanceElement: FormInstanceElement = null;\r\n public standinDisplayValue: string = null; // Note: this is used when a grid row is not the currently active row.\r\n public componentRef: ComponentRef = null;\r\n public colIndex: number = -1;\r\n public fieldName: string;\r\n public fieldDisplayName: string;\r\n public fieldClass: string;\r\n public formControl: UntypedFormControl = null;\r\n\r\n public constructor(formInstanceElementParam: FormInstanceElement, iColIndexParam: number, field: FormField) {\r\n this.formInstanceElement = formInstanceElementParam;\r\n this.colIndex = iColIndexParam;\r\n this.fieldClass = field.fieldDefinitionClassName;\r\n this.fieldName = field.name;\r\n this.fieldDisplayName = field.displayName;\r\n\r\n return;\r\n }\r\n\r\n public allowHtml() {\r\n let ind = [RichTextFieldType, CascadingDropDownFieldType, CheckboxFieldType].indexOf(this.fieldClass);\r\n return ind > -1;\r\n }\r\n}\r\n","import { GridConfig } from './grid-config.model';\r\nimport { INumericValuesHashByFieldName, IGridRow, IValuesByFieldName } from '../../interfaces/grid-row.interface';\r\nimport { GridFormInstanceElementWrapper } from './grid-form-instance-element-wrapper.model';\r\nimport { IFormFieldNameToFormInstanceElementWrapper, IGetCellDisplayValue } from './grid-interfaces';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { FormFieldProcessingPhaseEnum } from '../../enums/form-field-processing-phase.enum';\r\nimport { FieldDefinition } from '../form-builder/field-definition.model';\r\nimport { FieldDefinitionService } from '../../services/field-definition.service';\r\nimport { GridFlavorEnum } from '../../enums/grid.enums';\r\n\r\n// Define constants used below.\r\nexport const GRID_ROW_ID_KEY: string = 'gridRowId';\r\nexport const GRID_COLUMN_ID_KEY: string = 'gridColumnId';\r\n\r\nexport class GridRowDef implements IGridRow {\r\n // Instance data.\r\n private rowSelectedStyle: string;\r\n private rowUnselectedStyle: string;\r\n private gridFlavor: GridFlavorEnum;\r\n\r\n private clientId: number = -1;\r\n private databaseId: number = 0;\r\n private isPendingEditFor_DatabaseId: number = 0;\r\n\r\n private iRowIndex: number = -1;\r\n\r\n private isSelected: boolean = false;\r\n private isExpanded: boolean = false;\r\n private isInvalid: boolean = false;\r\n\r\n private gridConfig: GridConfig = null;\r\n private arrFormInstanceElementWrappers: GridFormInstanceElementWrapper[] = null;\r\n private hshFormInstanceElementsByName: IFormFieldNameToFormInstanceElementWrapper = {};\r\n\r\n // Define a property that is available to users of this class, as a convenience, but is not used by this class.\r\n public activeFormInstanceElementWrappers: GridFormInstanceElementWrapper[] = null;\r\n\r\n // Constructor.\r\n public constructor(gridConfigParam: GridConfig,\r\n iClientIdParam: number,\r\n iRowIndexParam: number,\r\n iDatabaseIdParam: number,\r\n isPendingEditFor_DatabaseId: number,\r\n igetDisplayValue: IGetCellDisplayValue = null\r\n ) { // 10-02-2020: added this second, optional parameter.\r\n this.gridConfig = gridConfigParam;\r\n\r\n this.clientId = iClientIdParam;\r\n this.iRowIndex = iRowIndexParam;\r\n this.databaseId = iDatabaseIdParam;\r\n this.isPendingEditFor_DatabaseId = isPendingEditFor_DatabaseId;\r\n\r\n let columnDefs: FormField[] = this.gridConfig.ColumnDefs;\r\n\r\n let bHasCalculatedField: boolean = false;\r\n let aiCalculatedColumnIndexes: number[] = [];\r\n this.arrFormInstanceElementWrappers = [];\r\n\r\n for (let iColumnDef: number = 0; iColumnDef < columnDefs.length; iColumnDef++) {\r\n let columnDef: FormField = columnDefs[iColumnDef];\r\n\r\n // Create the form instance element.\r\n let formInstanceElement: FormInstanceElement = new FormInstanceElement();\r\n\r\n // Create the form instance element's transient values.\r\n formInstanceElement.transientValuesHash = {};\r\n formInstanceElement.transientValuesHash[GRID_ROW_ID_KEY] = this.ClientId\r\n\r\n // Create the form instance element wrapper.\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper =\r\n new GridFormInstanceElementWrapper(formInstanceElement, iColumnDef, columnDef);\r\n\r\n\r\n if (igetDisplayValue) { // 10-02-2020: added this if block.\r\n let bIsCalculatedField: boolean =\r\n igetDisplayValue.isCalculatedField(iColumnDef, columnDef);\r\n\r\n if (!bIsCalculatedField) {\r\n // Get this field's value now.\r\n formInstanceElementWrapper.standinDisplayValue =\r\n igetDisplayValue.getCellDisplayValue(\r\n iColumnDef,\r\n columnDef,\r\n formInstanceElementWrapper,\r\n this,\r\n FormFieldProcessingPhaseEnum.CREATING_DATA); // Is this correct???\r\n } else {\r\n bHasCalculatedField = true; // Will get these values in a second pass.\r\n aiCalculatedColumnIndexes.push(iColumnDef);\r\n }\r\n }\r\n\r\n this.arrFormInstanceElementWrappers.push(formInstanceElementWrapper);\r\n\r\n this.hshFormInstanceElementsByName[columnDef.name] = formInstanceElementWrapper;\r\n }\r\n\r\n // Do we have any calculated fields; that is, do\r\n // we require a second pass through the columns ?\r\n if (bHasCalculatedField) {\r\n for (let iCalcColIndex: number = 0;\r\n iCalcColIndex < aiCalculatedColumnIndexes.length;\r\n iCalcColIndex++) {\r\n let iColIndex: number = aiCalculatedColumnIndexes[iCalcColIndex];\r\n\r\n let columnDef: FormField = columnDefs[iColIndex];\r\n let fieWrapper: GridFormInstanceElementWrapper = this.arrFormInstanceElementWrappers[iColIndex]\r\n\r\n // 12-07-2022 note: made changes to the following line of code after replacing all instances of 'var' with 'let',\r\n // as the use of 'let' showed that the code was referencing a value that was out of ordinary scope.\r\n //formInstanceElementWrapper.standinDisplayValue =\r\n fieWrapper.standinDisplayValue =\r\n igetDisplayValue.getCellDisplayValue(iColIndex,\r\n columnDef,\r\n //formInstanceElementWrapper,\r\n fieWrapper,\r\n this,\r\n FormFieldProcessingPhaseEnum.LOADING_DATA); // Is this correct???\r\n } // for\r\n } // if\r\n\r\n // Done.\r\n return;\r\n }\r\n\r\n // FOR KENDO\r\n public get GridConfig(){\r\n return this.gridConfig;\r\n }\r\n\r\n public get GridFlavor(): GridFlavorEnum {\r\n return this.gridFlavor;\r\n }\r\n public set GridFlavor(value: GridFlavorEnum) {\r\n this.gridFlavor = value;\r\n }\r\n\r\n // Implement interface IGridRow.\r\n public getNumericValuesHashByFieldName(fieldDefinitionService: FieldDefinitionService): INumericValuesHashByFieldName {\r\n let hshNumericValues: INumericValuesHashByFieldName = {};\r\n\r\n for (let iCol: number = 0; iCol < this.gridConfig.ColumnDefs.length; iCol++) {\r\n //for (let iCol: number = 0; iCol < this.gridConfig.ColumnDefsWithVirtualFormFields.length; iCol++) {\r\n let colDef: FormField = this.gridConfig.getColumnDef(iCol);\r\n let fieWrapper: GridFormInstanceElementWrapper = (iCol < this.arrFormInstanceElementWrappers.length ? this.arrFormInstanceElementWrappers[iCol] : null);\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n\r\n //if (fieWrapper && colDef.IsNumeric) {\r\n if ((fieWrapper != null) && fieldDefinition.isNumeric) {\r\n //let fieValueName: string = colDef.FormInstanceElementPropName;\r\n let fieValueName: string = fieldDefinition.formInstanceElementPropertyName;\r\n let numericValue: number = fieWrapper.formInstanceElement[fieValueName];\r\n\r\n if ((numericValue === undefined) || (numericValue === null)) {\r\n numericValue = 0;\r\n }\r\n\r\n hshNumericValues[colDef.name] = numericValue;\r\n\r\n hshNumericValues[`col${iCol + 1}`] = numericValue;\r\n\r\n if (colDef.displayName) {\r\n let displayVariableName: string = GridRowDef.displayNameToVariableName(colDef);\r\n\r\n hshNumericValues[displayVariableName] = numericValue;\r\n }\r\n }\r\n }\r\n\r\n return (hshNumericValues);\r\n }\r\n\r\n // Added for VNEXT-1419 - does same thing as getNumericValuesHashByFieldName() but for all values\r\n // not just numeric (perhaps this could be combined into a single method which takes a \"numericOnly\" flag)\r\n public getValuesByFieldName(fieldDefinitionService: FieldDefinitionService): IValuesByFieldName {\r\n let values: IValuesByFieldName = {};\r\n\r\n for (let iCol: number = 0; iCol < this.gridConfig.ColumnDefs.length; iCol++) {\r\n let colDef: FormField = this.gridConfig.getColumnDef(iCol);\r\n let fieWrapper: GridFormInstanceElementWrapper = (iCol < this.arrFormInstanceElementWrappers.length ? this.arrFormInstanceElementWrappers[iCol] : null);\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n\r\n if (fieWrapper != null) {\r\n let fieValueName: string = fieldDefinition.formInstanceElementPropertyName;\r\n let value: any = fieWrapper.formInstanceElement[fieValueName];\r\n\r\n if (!value) {\r\n value = null;\r\n }\r\n\r\n values[colDef.name] = value;\r\n\r\n values[`col${iCol + 1}`] = value;\r\n\r\n if (colDef.displayName) {\r\n let displayVariableName: string = GridRowDef.displayNameToVariableName(colDef);\r\n\r\n values[displayVariableName] = value;\r\n }\r\n }\r\n }\r\n\r\n return values;\r\n }\r\n\r\n private static displayNameToVariableName(formFieldParam: FormField): string {\r\n let variableName: string = formFieldParam.displayName.toLowerCase().replace(/ /g, '_');\r\n\r\n return (variableName);\r\n }\r\n\r\n // Getter methods.\r\n public get HshFormInstanceElementsByName(): IFormFieldNameToFormInstanceElementWrapper {\r\n return this.hshFormInstanceElementsByName;\r\n }\r\n public get RowSelectedStyle(): string {\r\n return this.rowSelectedStyle;\r\n }\r\n\r\n public get RowUnselectedStyle(): string {\r\n return this.rowUnselectedStyle;\r\n }\r\n\r\n public get ClientId(): number {\r\n return (this.clientId);\r\n }\r\n\r\n public get DatabaseId(): number {\r\n return (this.databaseId);\r\n }\r\n\r\n public get IsPendingEditFor_DatabaseId(): number {\r\n return this.isPendingEditFor_DatabaseId;\r\n }\r\n\r\n public get RowIndex(): number {\r\n return (this.iRowIndex);\r\n }\r\n\r\n public set RowIndex(iRowIndexParam: number) {\r\n this.iRowIndex = iRowIndexParam;\r\n\r\n return;\r\n }\r\n\r\n public get IsSelected(): boolean {\r\n return (this.isSelected);\r\n }\r\n\r\n public get IsExpanded(): boolean {\r\n return this.isExpanded;\r\n }\r\n public set IsExpanded(value: boolean) {\r\n this.isExpanded = value;\r\n }\r\n\r\n public get IsInvalid(): boolean {\r\n return (this.isInvalid);\r\n }\r\n\r\n public get FormInstanceElementWrappers(): GridFormInstanceElementWrapper[] {\r\n return (this.arrFormInstanceElementWrappers);\r\n }\r\n\r\n public set FormInstanceElementWrappers(value: GridFormInstanceElementWrapper[]) {\r\n this.arrFormInstanceElementWrappers = value;\r\n }\r\n\r\n // Setter methods.\r\n public set RowSelectedStyle(style: string) {\r\n this.rowSelectedStyle = style;\r\n }\r\n\r\n public set RowUnselectedStyle(style: string) {\r\n this.rowUnselectedStyle = style;\r\n }\r\n\r\n public set ClientId(clientIdParam: number) {\r\n this.clientId = clientIdParam;\r\n }\r\n\r\n public set DatabaseId(databaseIdParam: number) {\r\n this.databaseId = databaseIdParam;\r\n }\r\n\r\n public set IsSelected(isSelectedParam: boolean) {\r\n this.isSelected = isSelectedParam;\r\n }\r\n\r\n public set IsInvalid(isInvalidParam: boolean) {\r\n this.isInvalid = isInvalidParam;\r\n }\r\n\r\n // Accessor methods.\r\n public getFormFieldByColumnName(strCellName: string): FormField {\r\n let formField: FormField = this.gridConfig.getColumnDefByName(strCellName);\r\n\r\n return (formField);\r\n }\r\n\r\n public getFormInstanceElement(gridColumnDef: FormField): FormInstanceElement {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper =\r\n this.hshFormInstanceElementsByName[gridColumnDef.name];\r\n\r\n return (formInstanceElementWrapper ? formInstanceElementWrapper.formInstanceElement : null);\r\n }\r\n\r\n public getFormInstanceElementWrapper(gridColumnDef: FormField): GridFormInstanceElementWrapper {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = this.hshFormInstanceElementsByName[gridColumnDef.name];\r\n\r\n return (formInstanceElementWrapper);\r\n }\r\n\r\n public getFormInstanceElementWrapperByCellName(cellName: string): GridFormInstanceElementWrapper {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper =\r\n this.hshFormInstanceElementsByName[cellName];\r\n\r\n return (formInstanceElementWrapper);\r\n }\r\n\r\n public getTotalColumnCount(): number {\r\n return this.gridConfig.ColumnDefs.length + 1; // plus one is for the actions columns\r\n //return this.gridConfig.ColumnDefsWithVirtualFormFields.length + 1;\r\n }\r\n}\r\n","\r\n// Define a class used to keep track of loading data progress.\r\nexport class LoadingDataProgressInfo {\r\n public readonly arrPageSizeOptions: number[] =\r\n [\r\n //2,\r\n 25,\r\n 50,\r\n 100,\r\n 250\r\n ];\r\n public readonly iPageSize: number = 250;\r\n\r\n public isLoadingGridData: boolean = false;\r\n public loadingDataMessage: string = null;\r\n public iLoadingDataProgressValue: number = 0;\r\n public iLoadingDataProgressBufferValue: number = 0;\r\n\r\n public bShowPaginator: boolean = false;\r\n}\r\n","import { FormField } from \"../form-builder/form-field.model\";\r\nimport { FormFieldBaseComponent } from '../../components/form-fields/form-field-base/form-field-base.component';;\r\nimport { IFormFieldComponent } from '../../interfaces/iform-field-component';\r\n\r\nexport class ComponentAndFormField {\r\n // Properties.\r\n private component: FormFieldBaseComponent;\r\n //private component: IFormFieldComponent;\r\n private formField: FormField;\r\n\r\n // Constructor.\r\n public constructor(componentParam: FormFieldBaseComponent, formFieldParam: FormField) {\r\n //public constructor(componentParam: IFormFieldComponent, formFieldParam: FormField) {\r\n this.component = componentParam;\r\n this.formField = formFieldParam;\r\n\r\n return;\r\n }\r\n\r\n // Getter methods.\r\n public get Component(): FormFieldBaseComponent {\r\n //public get Component(): IFormFieldComponent {\r\n return (this.component);\r\n }\r\n /*\r\n public get ComponentAsInterface(): IFormFieldComponent {\r\n return (this.component);\r\n }\r\n */\r\n public get FormField(): FormField {\r\n return (this.formField);\r\n }\r\n}\r\n","import { FormField } from \"../../models/form-builder/form-field.model\";\r\nimport { FormFieldBaseComponent } from \"../../components/form-fields/form-field-base/form-field-base.component\";\r\nimport { ComponentAndFormField } from '../../models/grid/component-and-form-field-model';\r\n\r\n// Define a class used to keep track of components\r\nexport class RuntimeMetadata {\r\n // Properties.\r\n private maxRowsOfTextToDisplayOnUnselectedGridRows: number = 0;\r\n\r\n private allComponentFormFieldPairs: ComponentAndFormField[] = [];\r\n\r\n // Methods (to push more logic into this\r\n // class, out of the grid form field class).\r\n public allocateAllComponentsList(): void {\r\n this.allComponentFormFieldPairs = [];\r\n\r\n return;\r\n }\r\n\r\n public addToAllComponentsList(componentParam: FormFieldBaseComponent, formFieldParam: FormField): void {\r\n let pair: ComponentAndFormField = new ComponentAndFormField(componentParam, formFieldParam);\r\n this.allComponentFormFieldPairs.push(pair);\r\n\r\n return;\r\n }\r\n\r\n // Getter/Setter methods.\r\n public get MaxRowsOfTextToDisplayOnUnselectedGridRows(): number {\r\n return this.maxRowsOfTextToDisplayOnUnselectedGridRows;\r\n }\r\n\r\n public set MaxRowsOfTextToDisplayOnUnselectedGridRows(value: number) {\r\n this.maxRowsOfTextToDisplayOnUnselectedGridRows = value;\r\n }\r\n\r\n public get AllComponentsCount(): number {\r\n return (this.allComponentFormFieldPairs ? this.allComponentFormFieldPairs.length : 0);\r\n }\r\n public get AllComponents(): ComponentAndFormField[] {\r\n return this.allComponentFormFieldPairs;\r\n }\r\n\r\n public getAllComponentsFormFieldComponent(index: number): FormFieldBaseComponent {\r\n let componentResult: FormFieldBaseComponent = null;\r\n\r\n if (this.allComponentFormFieldPairs &&\r\n (index >= 0) &&\r\n (index < this.allComponentFormFieldPairs.length)) {\r\n componentResult = this.allComponentFormFieldPairs[index].Component;\r\n }\r\n\r\n return (componentResult);\r\n }\r\n public getAllComponentsFormField(index: number): FormField {\r\n let formFieldResult: FormField = null;\r\n\r\n if (this.allComponentFormFieldPairs &&\r\n (index >= 0) &&\r\n (index < this.allComponentFormFieldPairs.length)) {\r\n formFieldResult = this.allComponentFormFieldPairs[index].FormField;\r\n }\r\n\r\n return (formFieldResult);\r\n }\r\n // Note: the initial implementation of this method does not account\r\n // for multiple columns with the same component representative!!!\r\n //public get AllNumericComponents(): FormFieldBaseComponent[] {\r\n public get AllNumericComponents(): ComponentAndFormField[] {\r\n let numericFFComponents: ComponentAndFormField[] =\r\n (this.allComponentFormFieldPairs ?\r\n //this.compLists.allComponents.filter(c => c.hasNumericData() == true) : []);\r\n this.allComponentFormFieldPairs.filter(p => p.Component.hasNumericData() === true) :\r\n []);\r\n\r\n //let componentsResult: FormFieldBaseComponent[] = [];\r\n let resultPairs: ComponentAndFormField[] = [];\r\n\r\n for (let iPair: number = 0; iPair < numericFFComponents.length; iPair++) {\r\n let pair: ComponentAndFormField = numericFFComponents[iPair];\r\n\r\n //componentsResult.push(pair.Component);\r\n resultPairs.push(pair);\r\n }\r\n\r\n //return (componentsResult);\r\n return resultPairs;\r\n }\r\n\r\n\r\n // Replacement component methods.\r\n public addOrReplaceAllComponents(componentParam: FormFieldBaseComponent,\r\n formFieldParam: FormField): void {\r\n this.allComponentFormFieldPairs =\r\n this.allComponentFormFieldPairs.filter(p => p.FormField.gridColClientId !== formFieldParam.gridColClientId);\r\n\r\n let pair: ComponentAndFormField =\r\n new ComponentAndFormField(componentParam, formFieldParam);\r\n this.allComponentFormFieldPairs.push(pair);\r\n\r\n return;\r\n }\r\n\r\n}\r\n","// Define a single class that implements\r\n// commonly used IListItem properties/behavior.\r\nexport class IListItemBase {\r\n // Primitive properties.\r\n public itemIndex: number;\r\n\r\n public name: string = null;\r\n\r\n // Implement the IListItem getTitle() method in a standard way.\r\n public getName(): string {\r\n return this.name;\r\n }\r\n\r\n public getTitle(): string {\r\n let title: string = `Click to view ${this.name}`;\r\n\r\n return (title);\r\n }\r\n\r\n public isMagicStructure(): boolean {\r\n return false;\r\n }\r\n\r\n // Default constructor.\r\n public constructor() {\r\n return;\r\n }\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport class NotificationTemplate implements IViewModel {\r\n // Define primitive properties.\r\n // Key.\r\n public id: number = 0;\r\n\r\n public name: string;\r\n public category: string;\r\n public templateType: string;\r\n\r\n public format: string;\r\n\r\n public notificationType: string;\r\n public notificationText: string;\r\n\r\n // notificationText can be a | delimited string to allow presentation of summary information in a grid/list\r\n // this method returns either the first part of the text (or all of it if there's no pipe)\r\n public getFirstPartOfNotificationText(): string {\r\n return this.notificationText.split(\"|\")[0];\r\n }\r\n\r\n // returns all parts of the notification text so the caller can iterate them/concatenate them as needed\r\n public getAllTextParts(): string[] {\r\n return this.notificationText.split('|');\r\n }\r\n\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\n//import { Workflow } from '../workflow.model';\r\nimport { VirtualFolderPermissionsHierarchyRecord } from './virtualFolderPerHierarchyRecord.model';\r\nimport { PermissionsPreviewBase } from './permissions-preview-base.model';\r\n\r\nexport class PermissionsPreviewAllVirtualFoldersHierarchyRequest extends PermissionsPreviewBase {\r\n // Properties.\r\n public allRoleNames: string[];\r\n\r\n public distinctFolderIdList: string;\r\n\r\n // Permissions preview result properties.\r\n @Type(() => VirtualFolderPermissionsHierarchyRecord)\r\n public hierarchyRecords: VirtualFolderPermissionsHierarchyRecord[];\r\n\r\n // Constructor.\r\n public constructor(objectToCopy: PermissionsPreviewAllVirtualFoldersHierarchyRequest = null) {\r\n super(objectToCopy);\r\n\r\n if (objectToCopy != null) {\r\n this.allRoleNames = objectToCopy.allRoleNames;\r\n this.distinctFolderIdList = objectToCopy.distinctFolderIdList;\r\n\r\n this.hierarchyRecords = [];\r\n if (objectToCopy.hierarchyRecords != null) {\r\n for (let iRecord: number = 0; iRecord < objectToCopy.hierarchyRecords.length; iRecord++) {\r\n let recordAsObject: VirtualFolderPermissionsHierarchyRecord = objectToCopy.hierarchyRecords[iRecord];\r\n let record: VirtualFolderPermissionsHierarchyRecord = plainToClass(VirtualFolderPermissionsHierarchyRecord, recordAsObject);\r\n\r\n this.hierarchyRecords.push(record);\r\n }\r\n }\r\n\r\n }\r\n }\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { Workflow } from '../site-content/workflow.model';\r\nimport { VirtualFolderPermissionsHierarchyRecord } from './virtualFolderPerHierarchyRecord.model';\r\nimport { PermissionsPreviewBase } from './permissions-preview-base.model';\r\n\r\nexport class PermissionsPreviewVirtualFolderHierarchyRequest extends PermissionsPreviewBase {\r\n /*\r\n // Define an ignored Id field to correspond\r\n // to the client model class definition.\r\n public id: number;\r\n\r\n public dataCollectionId: number;\r\n\r\n // Define permissions preview inputs.\r\n @Type(() => Workflow)\r\n public workflowHierarchy: Workflow[];\r\n */\r\n\r\n // Properties.\r\n public allRoleNames: string[];\r\n\r\n public virtualFolderId: number;\r\n public selectedRoleName: string;\r\n\r\n // Permissions preview result properties.\r\n @Type(() => VirtualFolderPermissionsHierarchyRecord)\r\n public hierarchyRecords: VirtualFolderPermissionsHierarchyRecord[];\r\n\r\n // Constructor.\r\n public constructor(objectToCopy: PermissionsPreviewVirtualFolderHierarchyRequest = null) {\r\n super(objectToCopy);\r\n\r\n if (objectToCopy != null) {\r\n /*\r\n this.id = objectToCopy.id;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n\r\n this.workflowHierarchy = [];\r\n if (objectToCopy.workflowHierarchy != null) {\r\n for (let iWorkflow: number = 0; iWorkflow < objectToCopy.workflowHierarchy.length; iWorkflow++) {\r\n let workflowAsObject: Workflow = objectToCopy.workflowHierarchy[iWorkflow];\r\n let workflow: Workflow = plainToClass(Workflow, workflowAsObject);\r\n\r\n this.workflowHierarchy.push(workflow);\r\n }\r\n }\r\n */\r\n\r\n this.allRoleNames = objectToCopy.allRoleNames;\r\n\r\n this.virtualFolderId = objectToCopy.virtualFolderId;\r\n this.selectedRoleName = objectToCopy.selectedRoleName;\r\n\r\n this.hierarchyRecords = [];\r\n if (objectToCopy.hierarchyRecords != null) {\r\n for (let iRecord: number = 0; iRecord < objectToCopy.hierarchyRecords.length; iRecord++) {\r\n let recordAsObject: VirtualFolderPermissionsHierarchyRecord = objectToCopy.hierarchyRecords[iRecord];\r\n let record: VirtualFolderPermissionsHierarchyRecord = plainToClass(VirtualFolderPermissionsHierarchyRecord, recordAsObject);\r\n\r\n this.hierarchyRecords.push(record);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { Workflow } from '../site-content/workflow.model';\r\n\r\nexport class PermissionsPreviewBase {\r\n // Properties.\r\n public id: number; // Note: this property is not used by is required.\r\n\r\n public dataCollectionId: number; // The data collection for which this preview is being generated.\r\n\r\n // Permissions preview input properties.\r\n @Type(() => Workflow)\r\n public workflowHierarchy: Workflow[];\r\n\r\n // Constructor.\r\n protected constructor(objectToCopy: PermissionsPreviewBase) {\r\n if (objectToCopy != null) {\r\n this.id = objectToCopy.id;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n\r\n this.workflowHierarchy = [];\r\n if (objectToCopy.workflowHierarchy != null) {\r\n for (let iWorkflow: number = 0; iWorkflow < objectToCopy.workflowHierarchy.length; iWorkflow++) {\r\n let workflowAsObject: Workflow = objectToCopy.workflowHierarchy[iWorkflow];\r\n let workflow: Workflow = plainToClass(Workflow, workflowAsObject);\r\n\r\n this.workflowHierarchy.push(workflow);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { PermissionsPreviewVirtualFolderHierarchyRequest } from './perPreVirtualFolderHierarchyRequest.model';\r\nimport { VirtualFolderPermissionsHierarchyRecord } from './virtualFolderPerHierarchyRecord.model';\r\n\r\nexport class PermissionPreviewNode {\r\n // Properties.\r\n public id: number;\r\n\r\n public isFirstRoleRecordFlag: boolean;\r\n public isLastRoleRecordFlag: boolean;\r\n\r\n public roleId: number;\r\n public roleName: string;\r\n\r\n // The following two fields will probably be removed.\r\n //public memberType: string;\r\n //public member: string;\r\n\r\n public numGroupMembers: number;\r\n public numUserMembers: number;\r\n\r\n public folderId: number; // The 'virtual' folder Id.\r\n public folderName: string; // Replaces the 'workflowAndState' property.\r\n public workflowSortField: string;\r\n\r\n //public workflowAndState: string;\r\n public workflowId: number;\r\n public workflowStateId: number;\r\n\r\n public canBuildRoles: boolean;\r\n public canBuildWorkflows: boolean;\r\n public canBuildForms: boolean;\r\n public canBuildFolders: boolean;\r\n public canBuildFormInstances: boolean;\r\n\r\n public canView: boolean;\r\n public canEdit: boolean;\r\n public canDelete: boolean;\r\n public canGrant: boolean;\r\n\r\n // Define transient properties\r\n // only used by the client.\r\n //public transientClientId: number;\r\n public transientIsShown: boolean = false;\r\n //public transientVirtualFolderHierarchyResponse: PermissionsPreviewVirtualFolderHierarchyRequest;\r\n public transientHierarchyRecords: VirtualFolderPermissionsHierarchyRecord[] = null;\r\n public transientPermissionNameClicked: string = null;\r\n\r\n // Methods.\r\n public canBuild(permissionCellName: string): boolean {\r\n let canBuild: boolean = this[permissionCellName];\r\n\r\n return (canBuild);\r\n }\r\n\r\n public canPerform(permissionCellName: string): boolean {\r\n let canPerform: boolean = this[permissionCellName]\r\n\r\n return (canPerform);\r\n }\r\n\r\n public get workflowHierarchyShown(): boolean {\r\n return this.transientIsShown;\r\n }\r\n\r\n public get workflowHierarchyRecords(): VirtualFolderPermissionsHierarchyRecord[] {\r\n /*\r\n let hierarchyRecords: VirtualFolderPermissionsHierarchyRecord[] =\r\n (this.transientVirtualFolderHierarchyResponse != null ?\r\n this.transientVirtualFolderHierarchyResponse.hierarchyRecords : []);\r\n\r\n return (hierarchyRecords);\r\n */\r\n return this.transientHierarchyRecords;\r\n }\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { Workflow } from '../site-content/workflow.model';\r\nimport { Role } from '../role.model';\r\nimport { PermissionPreviewNode } from './permission-preview-node.model';\r\nimport { PermissionsPreviewBase } from './permissions-preview-base.model';\r\n\r\nexport class PermissionsPreview extends PermissionsPreviewBase implements IViewModel {\r\n // Properties.\r\n /*\r\n public id: number; // Note: this property is not used by is required.\r\n\r\n public dataCollectionId: number; // The data collection for which this preview is being generated.\r\n\r\n // Permissions preview input properties.\r\n @Type(() => Workflow)\r\n public workflowHierarchy: Workflow[];\r\n */\r\n\r\n public selectedRoleNames: string[] = null; // null => return results for all roles.\r\n\r\n // Permissions preview result properties.\r\n @Type(() => PermissionPreviewNode)\r\n public permissionNodes: PermissionPreviewNode[];\r\n\r\n public distinctFolderIdList: string;\r\n\r\n // Constructor.\r\n public constructor(objectToCopy: PermissionsPreview = null) {\r\n super(objectToCopy);\r\n\r\n if (objectToCopy != null) {\r\n /*\r\n this.id = objectToCopy.id;\r\n\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n\r\n this.workflowHierarchy = [];\r\n if (objectToCopy.workflowHierarchy != null) {\r\n for (let iWorkflow: number = 0; iWorkflow < objectToCopy.workflowHierarchy.length; iWorkflow++) {\r\n let workflowAsObject: Workflow = objectToCopy.workflowHierarchy[iWorkflow];\r\n let workflow: Workflow = plainToClass(Workflow, workflowAsObject);\r\n\r\n this.workflowHierarchy.push(workflow);\r\n }\r\n }\r\n */\r\n\r\n this.selectedRoleNames = objectToCopy.selectedRoleNames;\r\n\r\n this.permissionNodes = [];\r\n if (objectToCopy.permissionNodes != null) {\r\n for (let iNode: number = 0; iNode < objectToCopy.permissionNodes.length; iNode++) {\r\n let nodeAsObject: PermissionPreviewNode = objectToCopy.permissionNodes[iNode];\r\n let permissionNode: PermissionPreviewNode = plainToClass(PermissionPreviewNode, nodeAsObject);\r\n\r\n this.permissionNodes.push(permissionNode);\r\n }\r\n }\r\n\r\n this.distinctFolderIdList = objectToCopy.distinctFolderIdList;\r\n }\r\n }\r\n}\r\n","\r\nexport class VirtualFolderPermissionsHierarchyRecord {\r\n // Properties.\r\n public folderId: number;\r\n public folderName: string;\r\n\r\n public workflowId: number;\r\n public workflowName: string;\r\n public workflowStateId: number;\r\n public workflowStateName: string;\r\n\r\n public workflowSortField: number;\r\n public levelInHierarchy: number;\r\n\r\n public roleId: number;\r\n public roleName: string;\r\n\r\n public isSiteLevelPermission: boolean;\r\n\r\n public denormalizedRecordId: number;\r\n\r\n public canBuildRoles: boolean;\r\n public canBuildForms: boolean;\r\n public canBuildFolders: boolean;\r\n public canBuildFormInstances: boolean;\r\n\r\n public canView: boolean;\r\n public canEdit: boolean;\r\n public canDelete: boolean;\r\n public canGrant: boolean;\r\n\r\n // Methods.\r\n public static buildPermissionCellNames(): string[] {\r\n return ['canBuildRoles', 'canBuildWorkflows', 'canBuildForms', 'canBuildFolders', 'canBuildFormInstances'];\r\n }\r\n\r\n public static performPermissionCellNames(): string[] {\r\n return ['canView', 'canEdit', 'canDelete', 'canGrant'];\r\n }\r\n\r\n public canBuild(permissionCellName: string): boolean {\r\n let canBuild: boolean = this[permissionCellName];\r\n\r\n return (canBuild);\r\n }\r\n \r\n public canPerform(permissionCellName: string): boolean {\r\n let canPerform: boolean = this[permissionCellName]\r\n\r\n return (canPerform);\r\n }\r\n}\r\n","export class PickerItem {\n public key: string;\n public displayName: string;\n public secondaryDisplayName: string;\n public fullDisplay: string;\n public isUser: boolean;\n public isActive: boolean;\r\n public phone: string; \r\n public phoneExt: string;\r\n public agencyShortName: string;\n\n constructor(obj: any) {\n this.key = obj.key;\n this.displayName = obj.displayName;\n this.secondaryDisplayName = obj.secondaryDisplayName;\n this.isUser = obj.isUser;\n this.isActive = obj.isActive;\n this.fullDisplay = `${this.displayName} - ${this.secondaryDisplayName}`;\r\n this.phone = obj.phone;\r\n this.phoneExt = obj.phoneExt;\r\n this.agencyShortName = obj.agencyShortName;\r\n }\r\n}\n","import { IViewModel } from '../interfaces/view-model.interface';\r\n\r\nexport class RoleGroupMember implements IViewModel { // 10-12-2023 note: changed the name of this class to match the corresponding server-side class.\n public id: number;\r\n\n public member: string;\n public memberType: string;\n public memberId: string; //MAX User ID\n public selected: boolean; // used for UI display purposes only\n public readonly isInherited: boolean;\r\n\r\n public roleName: string; // Added 10-11-2023.\n\n private USER: string = 'User';\n private GROUP: string = 'Group';\n\n public constructor(member: string, isUser: boolean) {\n //console.log('isUser='+isUser);\n this.member = member;\n this.memberType = isUser ? this.USER : this.GROUP;\n }\r\n}\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../interfaces/view-model.interface';\nimport { RoleGroupMember } from './role-group-member.model';\r\nimport { SiteLevelRoleMember } from './site-level-role-member.model';\r\n\r\nexport class Role implements IViewModel {\r\n public id: number;\r\n public dataCollectionId: number;\r\n public name: string;\r\n public isSiteLevel: boolean = false;\r\n public isSiteAdmin: boolean;\r\n\r\n @Type(() => RoleGroupMember)\r\n public members: RoleGroupMember[];\r\n @Type(() => SiteLevelRoleMember)\r\n public siteLevelRoleMembers: SiteLevelRoleMember[]; // Added 10-15-2023.\r\n\r\n // Returns the _selected_ members of the Role\r\n // Implement the above method using the original name.\r\n public memberCount(): number {\r\n return this.members.filter(m => m.selected == true).length;\r\n }\r\n // Note: I am giving the following method an awkward name to distinguish from the previously named method memberCount(), now selectedMemberCount().\r\n public countOfAllRoleGroupMembers(): number {\r\n return this.members != null ? this.members.length : 0;\r\n }\r\n public countOfSiteLevelMembers(): number {\r\n return this.siteLevelRoleMembers != null ? this.siteLevelRoleMembers.length : 0;\r\n }\r\n\r\n /*\r\n public getMembersAsSiteLevelMembers(): SiteLevelRoleMember[] {\r\n let siteLevelMembers: SiteLevelRoleMember[] = [];\r\n\r\n if (this.members != null) {\r\n for (let index: number = 0; index < this.members.length; index++) {\r\n let roleGroupMember: RoleGroupMember = this.members[index];\r\n\r\n let siteLevelRoleMember = new SiteLevelRoleMember(roleGroupMember, this);\r\n siteLevelMembers.push(siteLevelRoleMember);\r\n }\r\n }\r\n\r\n return siteLevelMembers;\r\n }\r\n */\r\n}\r\n","export class CrossSiteUserNotificationsData {\r\n public formId: number;\r\n public formName: string;\r\n public siteId: number;\r\n public siteName: string;\r\n public folderId: number;\r\n public modifiedDate: Date;\r\n public modifiedBy: string;\r\n public workflowState: string;\r\n\r\n public isSuscribedToWorkflowChanges: boolean;\r\n}\r\nexport class CrossSiteUserNotificationsResults {\r\n public results: CrossSiteUserNotificationsData[] = [];\r\n\r\n public resultsAsPlainObjects: object[] = []; // results translated into plain JS objects needed by Kendo Grid by service code\r\n\r\n public total: number = 5000;\r\n}\r\n","import { Folder } from '../site-content/folder.model';\r\nimport { Form } from '../form-builder/form.model';\r\nimport { Role } from '../role.model';\r\nimport { Workflow } from '../site-content/workflow.model';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { SiteHomePage } from '../form-builder/site-home-page.model';\r\n\r\nexport class DataCollection extends IListItemBase implements IListItem {\r\n // Constants.\r\n public readonly SETUP_TO_ACTIVE: string = 'Setup to Active';\r\n public readonly ACTIVE_TO_SETUP: string = 'Active to Setup';\r\n public readonly ACTIVE_TO_CLOSED: string = 'Active to Closed';\r\n public readonly CLOSED_TO_ACTIVE: string = 'Closed to Active';\r\n\r\n // Constructor.\r\n public constructor(siteToCopy: DataCollection = null) {\r\n super();\r\n\r\n if (siteToCopy != null) {\r\n this.id = siteToCopy.id;\r\n\r\n this.statuses = siteToCopy.statuses;\r\n this.currentStatus = siteToCopy.currentStatus;\r\n this.selectedWorkflowTransition = siteToCopy.selectedWorkflowTransition;\r\n\r\n this.maxPointOfContact = siteToCopy.maxPointOfContact;\r\n this.maxPointOfContactDspl = siteToCopy.maxPointOfContactDspl;\r\n this.maxPointOfContactEmail = siteToCopy.maxPointOfContactEmail;\r\n\r\n this.betaFeaturesEnabled = siteToCopy.betaFeaturesEnabled;\r\n this.useSimplifiedPermissionsModel = siteToCopy.useSimplifiedPermissionsModel;\r\n\r\n this.purpose = siteToCopy.purpose; // The purpose field is labeled in the UI as \"BDR/Memo Number and Title\"\r\n this.description = siteToCopy.description;\r\n this.frequency = siteToCopy.frequency;\r\n this.totalDataCollectionsCount = siteToCopy.totalDataCollectionsCount;\r\n\r\n this.activatedDate = siteToCopy.activatedDate;\r\n this.closedDate = siteToCopy.closedDate;\r\n this.archivedDate = siteToCopy.archivedDate;\r\n this.startDate = siteToCopy.startDate;\r\n this.endDate = siteToCopy.endDate;\r\n\r\n this.myRole = siteToCopy.myRole;\r\n this.createdFromTemplate = siteToCopy.createdFromTemplate;\r\n\r\n this.folders = siteToCopy.folders;\r\n this.forms = siteToCopy.forms;\r\n this.siteHomePage = siteToCopy.siteHomePage;\r\n this.roles = siteToCopy.roles;\r\n this.workflows = siteToCopy.workflows;\r\n }\r\n }\r\n\r\n // Properties.\r\n public id: number = 0;\r\n\r\n public statuses: any[];\r\n public currentStatus: string;\r\n public selectedWorkflowTransition: string;\r\n\r\n public maxPointOfContact: string;\r\n public maxPointOfContactDspl: string;\r\n public maxPointOfContactEmail: string;\r\n\r\n public betaFeaturesEnabled: boolean = false;\r\n public useSimplifiedPermissionsModel: boolean;\r\n\r\n //VNEXT-1066: KLW - Properties of the Banner\r\n public leftBannerText: string;\r\n public centerBannerText: string;\r\n public rightBannerText: string;\r\n\r\n public backgroundColor: string;\r\n public textColor: string;\r\n\r\n //public name: string;\r\n public purpose: string; // Labeled in the UI as \"BDR/Memo Number and Title\"\r\n public description: string;\r\n public frequency: string;\r\n public totalDataCollectionsCount: number;\r\n\r\n public activatedDate: Date = new Date();\r\n public closedDate: Date = new Date();\r\n public archivedDate: Date = new Date();\r\n public startDate: Date = new Date();\r\n public endDate: Date = new Date();\r\n\r\n public myRole: string = '';\r\n public createdFromTemplate: boolean;\r\n\r\n public folders: Folder[];\r\n public forms: Form[];\r\n public siteHomePage: SiteHomePage;\r\n public roles: Role[];\r\n public workflows: Workflow[];\r\n\r\n public get SiteHomePage(): SiteHomePage {\r\n return this.siteHomePage;\r\n }\r\n\r\n //history\r\n public createdBy: string;\r\n public createdByUserName: string;\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n public lastAccessedByCurrentUser: Date;\r\n\r\n /* Flags used by the UI to govern show/hide logic */\r\n\r\n // siteIsBuildable is used to enable/disable buttons to\r\n // create/edit site-level entities like contacts, roles etc\r\n public siteIsBuildable: boolean;\r\n\r\n // siteIsAdministerable is used by the claims checking mechanism to allow/disallow routes\r\n // and show/hide side-nav menu buttons (like Forms Catalog and Workflow Catalog)\r\n // It's used on the site list screen to show what sites are administerable to a System Admin.\r\n // (Could siteIsBuildable and siteIsAdministerable be combined? Is there need for both? Would\r\n // require analysis and careful testing, but if so keep siteIsAdministerable)\r\n public siteIsAdministerable: boolean;\r\n\r\n // treeIsBuildable is used to enable/disable \"New Folder\" and \"New Form\" buttons\r\n public treeIsBuildable: boolean;\r\n\r\n // treeIsViewable is used in the claims checking mechanism to guard routes and show/hide nav\r\n // menu buttons\r\n public treeIsViewable: boolean;\r\n\r\n public isFavorite: boolean = false; // Added 01-07-2021.\r\n public favoriteTitle: string; // Added 01-07-2021.\r\n\r\n public currentUserCanSeeStructure: boolean; // Added 01-30-2024.\r\n public enableStructureForEndUsers: boolean; // Added 01-30-2024.\r\n\r\n\r\n // 07-09-2024: added the following property related to the implementation of https://maxjira.max.gov/browse/VNEXT-1340.\r\n public hideStructureMetadataFieldsJsonConfig: string; // A JSON string containing an optional configuration of structure metadata fields to hide.\r\n\r\n // 02-21-2025 note: add in permission flags that are defined in the server version of this view model but not this class until now.\r\n public currentUserCanBuildForms: boolean;\r\n public currentUserCanBuildFolders: boolean;\r\n public currentUserCanBuildFormInstances: boolean;\r\n public currentUserCanBuildWorkflows: boolean;\r\n public currentUserCanViewFromRoot: boolean;\r\n // 02-21-2025 note: end addition of permission flags in the server version of this view model class.\r\n\r\n public currentUserCanSeeSimplePermissions: boolean;\r\n\r\n // Begin VNEXT-1618 new permission flags.\r\n public currentUserCanBuildConstraints: boolean;\r\n public currentUserCanPublish: boolean;\r\n public currentUserCanEditFormTemplateHtml: boolean;\r\n public currentUserCanEditSiteHomePageHtml: boolean;\r\n // End VNEXT-1618 new permission flags.\r\n\r\n // Methods.\r\n // IListItem methods.\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n /*\r\n public getTitle(): string {\r\n let title: string =\r\n (this.description != null ? `${this.name} (${this.description})` : this.name);\r\n\r\n return (title);\r\n }\r\n */\r\n\r\n public getRootFolder(): Folder {\r\n let rootFolder: Folder = null;\r\n\r\n if (this.folders != null) {\r\n for (let iFolderIndex: number = 0; iFolderIndex < this.folders.length; iFolderIndex++) {\r\n let folder: Folder = this.folders[iFolderIndex];\r\n\r\n if (folder.parentFolderId == null) {\r\n rootFolder = folder;\r\n if (this.siteIsAdministerable) {\r\n rootFolder.canCreateFolder = true;\r\n rootFolder.canCreateForm = true;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return (rootFolder);\r\n }\r\n\r\n /*\r\n public deriveFolderPath(folderId: number): string {\r\n let folderPath: string = null;\r\n\r\n let ancestorFolders: Folder[] = [];\r\n let rootFolder: Folder = this.getRootFolder();\r\n\r\n if (rootFolder != null) {\r\n let foundFolder: Folder = DataCollection.findFolder(folderId, rootFolder, ancestorFolders);\r\n\r\n if (foundFolder != null) {\r\n folderPath = \"/\";\r\n\r\n for (let iAncestor: number = 0; iAncestor < ancestorFolders.length; iAncestor++) {\r\n let ancestorFolder: Folder = ancestorFolders[iAncestor];\r\n\r\n folderPath += ancestorFolder.name + \"/\";\r\n } // for\r\n\r\n folderPath += foundFolder.name;\r\n } // if\r\n } // if\r\n\r\n return (folderPath);\r\n }\r\n\r\n private static findFolder(folderId: number, parentFolder: Folder, ancestorFolders: Folder[]): Folder {\r\n let foundFolder: Folder = null;\r\n\r\n if (parentFolder.childFolders != null) {\r\n for (let iChildIndex: number = 0; iChildIndex < parentFolder.childFolders.length; iChildIndex++) {\r\n let childFolder: Folder = parentFolder.childFolders[iChildIndex];\r\n\r\n if (childFolder.id == folderId) {\r\n foundFolder = childFolder;\r\n\r\n break;\r\n } else {\r\n ancestorFolders.push(childFolder);\r\n\r\n foundFolder = DataCollection.findFolder(folderId, childFolder, ancestorFolders);\r\n\r\n if (foundFolder != null) {\r\n break;\r\n } else {\r\n ancestorFolders.pop();\r\n } // if-else\r\n } // if-else\r\n } // for \r\n } // if\r\n\r\n return (foundFolder);\r\n }\r\n */\r\n\r\n public userCanDelete(): boolean {\r\n return (this.siteIsAdministerable);\r\n }\r\n\r\n public getStatus(): string {\r\n return (this.currentStatus);\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return \"\";\r\n }\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n\r\n //TEAMS-424: KLW - return the object type\r\n public getType(): string {\r\n return ItemTypeEnum.DATACOLLECTION;\r\n }\r\n\r\n public getPosition(): number {\r\n return this.id; // When displayed in a list, barring another sort criteria, this forms a default\r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n return (true);\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return ('collections'); // Returns the default icon for a site/data collection.\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n let uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n // TO DO: DISCUSS WITH PAUL.\r\n //\r\n // NOTE: I BELIEVE THIS CAN BE A NOOP SINCE\r\n // THE OBJECT WILL ALWAYS BE CONSISTENT\r\n // WITH ITSELF/NO NEED TO UPDATE/SYNC.\r\n\r\n return;\r\n }\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw ('DataCollection.findAndUpdateFrom(): this method is not implemented.');\r\n }\r\n\r\n // Miscellaneous methods.\r\n public isValidWorkflowTransition(transitionName: string): boolean {\r\n return [\r\n this.SETUP_TO_ACTIVE,\r\n this.ACTIVE_TO_SETUP,\r\n this.ACTIVE_TO_CLOSED,\r\n this.CLOSED_TO_ACTIVE].indexOf(transitionName) > -1;\r\n }\r\n\r\n public foo() {\r\n //console.log('foo');\r\n }\r\n\r\n public getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { FormInstance } from '../site-content/form-instance.model';\r\nimport { FolderFormTemplate } from '../folder-form-template.model';\r\nimport { WorkflowTransition } from '../workflow-transition.model';\r\nimport { Workflow } from '../site-content/workflow.model';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IHasIdAndNameAndWorkflowId } from '../../interfaces/has-id-and-name.interface';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { Form } from '../form-builder/form.model';\r\n\r\nexport class Folder extends IListItemBase implements IViewModel, IListItem, IHasIdAndNameAndWorkflowId {\r\n // Primitive properties.\r\n public id: number = 0;\r\n public dataCollectionId: number; \r\n public parentFolderId: number;\r\n public workflowId: number;\r\n //public name: string;\r\n public folderOrder: number;\r\n public description: string;\r\n public helpTextFormat: string;\r\n public helpText: string;\r\n\r\n public readonly statuses: any[];\r\n public readonly siteWorkflows: Workflow[];\r\n public readonly siteForms: Form[];\r\n public currentWorkflowState: string;\r\n public selectedWorkflowTransition: string;\r\n\r\n public canView: boolean; \r\n public canEdit: boolean;\r\n public canDelete: boolean;\r\n public canGrant: boolean;\r\n public canTransition: boolean;\r\n public canBuildFolders: boolean;\r\n public canBuildFormInstances: boolean;\r\n public canPerformBulkWorkflowUpdate: boolean;\r\n public isTransparentFolder: boolean;\r\n\r\n //simplified permissions model\r\n public canCreateFolder: boolean;\r\n public canDeleteFolder: boolean;\r\n public canCreateForm: boolean;\r\n public canDeleteForm: boolean;\r\n public canGrantPermission: boolean;\r\n public canManageRoleMembers: boolean;\r\n\r\n public hideExportToExcel: boolean;\r\n public hideUpload: boolean;\r\n public hideDownload: boolean;\r\n public hidePrintForm: boolean;\r\n\r\n public isFavorite: boolean = false; \r\n public favoriteTitle: string;\r\n public roleMembersAreInherited: boolean; // added 4/28/2021\r\n public roleGroupName: string;\r\n\r\n public magicStructureDefinitionId: number;\r\n public magicFolderId: number;\r\n\r\n // Collection properties.\r\n public readonly workflowStateTransitions: WorkflowTransition[];\r\n\r\n public readonly childFolders: Folder[] = []; // 03-04-2020 note: this field is not treated as read only in some code. Change?\r\n public readonly ancestorFolders: Folder[] = [];\r\n public folderFormTemplate: FolderFormTemplate;\r\n\r\n private arrFormInstances: FormInstance[] = [];\r\n public get formInstances(): FormInstance[] {\r\n return (this.arrFormInstances);\r\n }\r\n public set formInstances(formInstancesParam: FormInstance[]) {\r\n this.arrFormInstances = formInstancesParam;\r\n }\r\n\r\n public childCount: number;\r\n public childCountTitle: string;\r\n\r\n // 09/08/2021 pharv - for pagination\r\n public readonly totalChildFolderCount: number; \r\n public readonly totalFormInstanceCount: number; \r\n\r\n //history\r\n public createdBy: string;\r\n public createdByUserName: string;\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n\r\n // Constructor.\r\n public constructor(sourceObject: Folder = null) {\r\n super();\r\n\r\n if (sourceObject != null) {\r\n // Basic properties.\r\n if (sourceObject.id != null) {\r\n this.id = sourceObject.id;\r\n } else {\r\n this.id = 0;\r\n }\r\n if (sourceObject.dataCollectionId != null) {\r\n this.dataCollectionId = sourceObject.dataCollectionId;\r\n } else {\r\n this.dataCollectionId = 0;\r\n }\r\n if (sourceObject.parentFolderId != null) {\r\n this.parentFolderId = sourceObject.parentFolderId;\r\n } else {\r\n this.parentFolderId = 0;\r\n }\r\n\r\n // Permission properties.\r\n this.canView = sourceObject.canView;\r\n this.canEdit = sourceObject.canEdit;\r\n this.canDelete = sourceObject.canDelete;\r\n this.canGrant = sourceObject.canGrant;\r\n this.canTransition = sourceObject.canTransition;\r\n this.canBuildFolders = sourceObject.canBuildFolders;\r\n this.canBuildFormInstances = sourceObject.canBuildFormInstances;\r\n this.isTransparentFolder = sourceObject.isTransparentFolder;\r\n\r\n //simplified permissions model\r\n this.canCreateFolder = sourceObject.canCreateFolder;\r\n this.canDeleteFolder = sourceObject.canDeleteFolder;\r\n this.canCreateForm = sourceObject.canCreateForm;\r\n this.canDeleteForm = sourceObject.canDeleteForm;\r\n this.canGrantPermission = sourceObject.canGrantPermission;\r\n this.canManageRoleMembers = sourceObject.canManageRoleMembers;\r\n\r\n // User favorite properties.\r\n this.isFavorite = sourceObject.isFavorite;\r\n this.favoriteTitle = sourceObject.favoriteTitle;\r\n\r\n // Role group properties.\r\n this.roleMembersAreInherited = sourceObject.roleMembersAreInherited;\r\n this.roleGroupName = sourceObject.roleGroupName;\r\n\r\n // Magic structure properties.\r\n this.magicStructureDefinitionId = sourceObject.magicStructureDefinitionId;\r\n this.magicFolderId = sourceObject.magicFolderId;\r\n\r\n // Additional properties.\r\n if (sourceObject.statuses != null) {\r\n this.statuses = sourceObject.statuses;\r\n } else {\r\n this.statuses = null;\r\n }\r\n if (sourceObject.siteWorkflows != null) {\r\n this.siteWorkflows = sourceObject.siteWorkflows;\r\n } else {\r\n this.siteWorkflows = null;\r\n }\r\n\r\n if (sourceObject.workflowStateTransitions != null) {\r\n this.workflowStateTransitions = sourceObject.workflowStateTransitions;\r\n } else {\r\n this.workflowStateTransitions = null;\r\n }\r\n\r\n if (sourceObject.childFolders != null) {\r\n this.childFolders = sourceObject.childFolders;\r\n } else {\r\n this.childFolders = [];\r\n }\r\n if (sourceObject.ancestorFolders != null) {\r\n this.ancestorFolders = sourceObject.ancestorFolders;\r\n } else {\r\n this.ancestorFolders = [];\r\n }\r\n }\r\n\r\n return;\r\n }\r\n setIcon(iconParam: string): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n // Load from de-serialized network data.\r\n public static loadFromDeserializedNetworkData(data: Folder): Folder {\r\n let folder: Folder = new Folder(data);\r\n\r\n folder.loadFromDeserializedNetworkData(data);\r\n\r\n return (folder);\r\n }\r\n\r\n private loadFromDeserializedNetworkData(data: Folder): void {\r\n // Copy primitive attributes.\r\n this.id = data.id;\r\n\r\n this.dataCollectionId = data.dataCollectionId;\r\n this.parentFolderId = data.parentFolderId;\r\n this.workflowId = data.workflowId;\r\n\r\n this.name = data.name;\r\n\r\n this.folderOrder = data.folderOrder;\r\n\r\n this.description = data.description;\r\n this.helpTextFormat = data.helpTextFormat;\r\n this.helpText = data.helpText;\r\n\r\n this.currentWorkflowState = data.currentWorkflowState;\r\n this.selectedWorkflowTransition = data.selectedWorkflowTransition;\r\n\r\n this.canView = data.canView;\r\n this.canEdit = data.canEdit;\r\n this.canDelete = data.canDelete;\r\n this.canGrant = data.canGrant;\r\n this.canTransition = data.canTransition;\r\n this.canBuildFolders = data.canBuildFolders;\r\n this.canBuildFormInstances = data.canBuildFormInstances;\r\n this.isTransparentFolder = data.isTransparentFolder;\r\n\r\n //simplified permissions model\r\n this.canCreateFolder = data.canCreateFolder;\r\n this.canCreateForm = data.canCreateForm;\r\n\r\n this.isFavorite = data.isFavorite;\r\n this.favoriteTitle = data.favoriteTitle;\r\n\r\n // Role group properties.\r\n this.roleMembersAreInherited = data.roleMembersAreInherited;\r\n this.roleGroupName = data.roleGroupName;\r\n\r\n // Magic structure properties.\r\n this.magicStructureDefinitionId = data.magicStructureDefinitionId;\r\n this.magicFolderId = data.magicFolderId;\r\n\r\n // Note: the following fields will be set in my constructor:\r\n //\r\n // statuses;\r\n // siteWorkflows;\r\n // workflowStateTransitions;\r\n // childFolders;\r\n // ancestorFolders.\r\n\r\n this.formInstances = data.formInstances;\r\n\r\n //history\r\n this.createdBy = data.createdBy;\r\n this.createdByUserName = data.createdByUserName;\r\n this.createdDate = data.createdDate;\r\n this.modifiedBy = data.modifiedBy;\r\n this.modifiedByUserName = data.modifiedByUserName;\r\n this.modifiedDate = data.modifiedDate;\r\n\r\n return;\r\n }\r\n\r\n // IListItem methods.\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n public getTitle(): string {\r\n let title: string =\r\n (this.description != null ? `Click to view ${this.name} (${this.description})` : super.getTitle());\r\n\r\n return (title);\r\n }\r\n\r\n public getIsTransparentFolder(): boolean {\r\n return this.isTransparentFolder;\r\n }\r\n\r\n public isMagicStructure(): boolean {\r\n return this.magicStructureDefinitionId != null;\r\n }\r\n\r\n public userCanDelete(): boolean {\r\n return (this.canDelete);\r\n }\r\n\r\n public getStatus(): string {\r\n return this.currentWorkflowState;\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return \"\";\r\n }\r\n\r\n public getValue(property: string): string {\r\n property = property.toLowerCase();\r\n if (property == 'status') {\r\n return this.getStatus();\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n //TEAMS-424: KLW - set the object type\r\n public static readonly TypeName: string = ItemTypeEnum.FOLDER;\r\n public getType(): string {\r\n //return (this.magicStructureDefinitionId != null ? ItemTypeEnum.MAGIC_FOLDER : Folder.TypeName);\r\n return Folder.TypeName;\r\n } \r\n\r\n public getPosition(): number {\r\n return (this.folderOrder);\r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n return (true);\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n // Note: will enable the following conditional line after reviewing the new magic folder icon with others.\r\n //return (this.magicStructureDefinitionId != null ? IconFormatEnum.SVG_ICON : IconFormatEnum.MAT_ICON);\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n // Note: will enable the following conditional line after reviewing the new magic folder icon with others.\r\n //return (this.magicStructureDefinitionId != null ? 'magic-folder' : 'folder'); // Returns the default icon for a site/data collection.\r\n return 'folder';\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n let uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n // If modifiedByUserName is set, return that\r\n public getModifiedBy(): string {\r\n return this.modifiedByUserName != '' ? this.modifiedByUserName : this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n // 03-19-2021 note: restoring the implementation of this code.\r\n this.id = obj.getId();\r\n\r\n if ((obj.name != null) && (obj.name != this.name)) {\r\n this.name = obj.name;\r\n }\r\n this.modifiedBy = obj.modifiedBy;\r\n this.modifiedDate = obj.modifiedDate;\r\n this.currentWorkflowState = obj.currentWorkflowState;\r\n this.description = obj.description;\r\n\r\n return;\r\n }\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw ('Folder.findAndUpdateFrom(): I am not yet implemented ... do I need to be implemented?');\r\n }\r\n\r\n // Implement interface IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public typeName(): string {\r\n return (Folder.TypeName);\r\n }\r\n\r\n hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n getDescription(): string {\r\n return this.description;\r\n }\r\n setDescription(val: string) {\r\n this.description = val;\r\n } \r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n public getParentId(): number {\r\n return this.parentFolderId;\r\n }\r\n\r\n public getWorkflowId(): number {\r\n return this.workflowId;\r\n }\r\n\r\n public get HideExportToExcel(): boolean {\r\n return (this.hideExportToExcel || this.HideExportToExcelIsInherited);\r\n }\r\n\r\n public get HideExportToExcelIsInherited(): boolean {\r\n return this.ancestorFolders.filter(x => x.hideExportToExcel).length > 0;\r\n }\r\n\r\n public get HideUpload(): boolean {\r\n return (this.hideUpload || this.HideUploadIsInherited);\r\n }\r\n\r\n public get HideUploadIsInherited(): boolean {\r\n return this.ancestorFolders.filter(x => x.hideUpload).length > 0;\r\n }\r\n\r\n public get HideDownload(): boolean {\r\n return (this.hideDownload || this.HideDownloadIsInherited);\r\n }\r\n\r\n public get HideDownloadIsInherited(): boolean {\r\n return this.ancestorFolders.filter(x => x.hideDownload).length > 0;\r\n }\r\n\r\n public get HidePrintForm(): boolean {\r\n return (this.hidePrintForm || this.HidePrintFormIsInherited);\r\n }\r\n\r\n public get HidePrintFormIsInherited(): boolean {\r\n // 03-06-2025 note: updated the following logic to check for a null value for this.ancestorFolders.\r\n return (this.ancestorFolders == null) || (this.ancestorFolders.filter(x => x.hidePrintForm).length > 0);\r\n }\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { Form } from '../form-builder/form.model';\r\n//import { FolderInstance } from './folder-instance.model'; // 03-04-2020 note: per below, this needs to be phased out.\r\nimport { Folder } from '../site-content/folder.model';\r\nimport { WorkflowTransition } from '../workflow-transition.model';\r\n// 02-02-2021 note: at some point, making class Folder\r\n// implement interface IListItem.\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { Workflow } from '../site-content/workflow.model'; //TEAMS-424: KLW - Import workflow model\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IHasIdAndNameAndWorkflowId } from '../../interfaces/has-id-and-name.interface';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { FieldIdToSelectedValues } from '../flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\n\r\nexport class FormInstance extends IListItemBase implements IViewModel, IListItem, IHasIdAndNameAndWorkflowId{\r\n // Constructor.\r\n public constructor(_id: number = 0) {\r\n super();\r\n\r\n this.id = _id;\r\n }\r\n\r\n // Define properties.\r\n // Key field.\r\n public id: number = 0;\r\n public explicitType: string = 'form-instance';\r\n\r\n // Foreign key fields.\r\n public dataCollectionId: number; \r\n public formId: number;\r\n public folderId: number;\r\n\r\n // Primitive properties.\r\n // Property 'name' has been moved into base class IListItemBase.\r\n\r\n public description: string;\r\n\r\n // 02-02-2021 note: added the following properties that were\r\n // defined in the server-side view model class,\r\n // FormInstanceVM, but not in this class.\r\n public ownerType: string;\r\n public owner: string;\r\n\r\n public currentWorkflowStateId: number;\r\n public currentWorkflowState: string;\r\n public showSendNotificationsButton: boolean;\r\n\r\n // start - new for VNEXT-1184\r\n public currentWorkflowStateIsStartState: boolean;\r\n public skipValidationOnUpdateContent: boolean;\r\n public hasFailedClientValidation: boolean;\r\n // end - new for VNEXT-1184\r\n\r\n //TEAMS-178: KLW - This is for the state order of the current state\r\n public currentWorkflowStateOrder: number;\r\n\r\n public formInstanceOrder: number;\r\n // End 02-02-2021 changes.\r\n\r\n // Workflow transition, if any, that the user has selected.\r\n public selectedWorkflowTransition: string;\r\n //TEAMS-178: KLW - This is needed to hold the end state order for the selected workflow transition\r\n public selectedWorkflowTransitionEndStateId: number;\r\n\r\n public createdBy: string;\r\n public createdByUserName: string;\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n public contentModifiedBy: string;\r\n public contentModifiedByUserName: string;\r\n public contentModifiedDate: Date;\r\n\r\n public version: number;\r\n public originalFormInstanceId: number;\r\n\r\n // Permission flags.\r\n public canEdit: boolean;\r\n public canView: boolean;\r\n public canGrant: boolean;\r\n public canDelete: boolean;\r\n public canTransition: boolean;\r\n public canEditMetadata: boolean;\r\n public canAdmin: boolean;\r\n\r\n public accessLostAfterTransition: boolean;\r\n\r\n public isFavorite: boolean = false; // Added 01-07-2021.\r\n public favoriteTitle: string; // Added 01-07-2021.\r\n\r\n public subscription: number;\r\n\r\n //TEAMS-424: KLW - Create collection for Workflows\r\n @Type(() => Workflow)\r\n public siteWorkflows: Workflow[];\r\n public workflowId: number;\r\n\r\n public folderName: string;\r\n public folderPath: string;\r\n\r\n public magicStructureDefinitionId: number;\r\n public magicFormInstanceId: number;\r\n\r\n //VNEXT-310: KLW - Variable to set if form action buttons are disabled during any saves\r\n public formButtonsDisabled: boolean = false;\r\n\r\n // Define transient properties not saved on the server.\r\n public transientFormInstanceIsSaving: boolean = false;\r\n\r\n // Related objects.\r\n @Type(() => Form)\r\n public form: Form;\r\n\r\n @Type(() => Folder)\r\n public folder: Folder;\r\n\r\n // Collection properties.\r\n @Type(() => FormInstanceElement)\r\n public formInstanceElements: FormInstanceElement[] = [];\r\n\r\n // Workflow transitions that the user can perform on this form instance.\r\n @Type(() => WorkflowTransition)\r\n public workflowStateTransitions: WorkflowTransition[] = [];\r\n\r\n public isReference: boolean;\r\n\r\n public isReferenced: boolean;\r\n\r\n public isReferencedCount: number;\r\n\r\n public rowVersion: string;\r\n\r\n @Type(() => FormInstance)\r\n public referencedFormInstance: FormInstance;\r\n\r\n public referencedFormInstanceId: number;\r\n\r\n @Type(() => FormInstance)\r\n public referencedBy: FormInstance;\r\n \r\n // Implement assignFrom.\r\n public assignFrom(cloneObj: any): any {\r\n for (let attribut in cloneObj) {\r\n this[attribut] = cloneObj[attribut];\r\n }\r\n\r\n return (this);\r\n }\r\n\r\n // Load from de-serialized network data.\r\n public static loadFromDeserializedNetworkData(data: FormInstance): FormInstance {\r\n let formInstance: FormInstance = new FormInstance();\r\n\r\n formInstance.loadFromDeserializedNetworkData(data);\r\n\r\n return (formInstance);\r\n }\r\n\r\n private loadFromDeserializedNetworkData(data: FormInstance): void {\r\n // Copy primitive attributes.\r\n this.id = data.id;\r\n\r\n this.dataCollectionId = data.dataCollectionId;\r\n this.formId = data.formId;\r\n this.folderId = data.folderId;\r\n this.formInstanceOrder = data.formInstanceOrder;\r\n\r\n this.name = data.name;\r\n\r\n this.canEdit = data.canEdit;\r\n this.canView = data.canView;\r\n this.canGrant = data.canGrant;\r\n this.canDelete = data.canDelete;\r\n this.canTransition = data.canTransition;\r\n this.canEditMetadata = data.canEditMetadata;\r\n this.canAdmin = data.canAdmin;\r\n this.accessLostAfterTransition = data.accessLostAfterTransition;\r\n\r\n //VNEXT-692\r\n this.isReference = data.isReference; \r\n this.referencedFormInstance = data.referencedFormInstance;\r\n this.referencedFormInstanceId = data.referencedFormInstanceId;\r\n\r\n this.isFavorite = data.isFavorite; // Added 01-10-2021.\r\n this.favoriteTitle = data.favoriteTitle; // Added 01-10-2021.\r\n\r\n this.subscription = data.subscription;\r\n\r\n this.magicStructureDefinitionId = data.magicStructureDefinitionId;\r\n this.magicFormInstanceId = data.magicFormInstanceId;\r\n\r\n this.version = data.version;\r\n this.originalFormInstanceId = data.originalFormInstanceId;\r\n\r\n this.workflowId = data.workflowId;\r\n this.siteWorkflows = [];\r\n if ((data.siteWorkflows != null) && (data.siteWorkflows.length > 0)) {\r\n for (let iWorkflow: number = 0; iWorkflow < data.siteWorkflows.length; iWorkflow++) {\r\n let siteWorkflow: Workflow = plainToClass(Workflow, data.siteWorkflows[iWorkflow]);\r\n this.siteWorkflows.push(siteWorkflow);\r\n }\r\n }\r\n\r\n // Copy non-primitive objects.\r\n this.form = plainToClass(Form, data.form); \r\n\r\n this.folder = plainToClass(Folder, data.folder);\r\n\r\n this.formInstanceElements = [];\r\n for (let iFIE: number = 0; iFIE < data.formInstanceElements.length; iFIE++) {\r\n let fieData = data.formInstanceElements[iFIE];\r\n\r\n //let formInstanceElement: FormInstanceElement = plainToClass(FormInstanceElement, fieData);\r\n let formInstanceElement: FormInstanceElement = FormInstanceElement.loadFromDeserializedNetworkData(fieData);\r\n\r\n this.formInstanceElements.push(formInstanceElement);\r\n }\r\n\r\n this.workflowStateTransitions = [];\r\n for (let iTransition: number = 0; iTransition < data.workflowStateTransitions.length; iTransition++) {\r\n let transitionData = data.workflowStateTransitions[iTransition];\r\n\r\n let transition: WorkflowTransition = plainToClass(WorkflowTransition, transitionData);\r\n\r\n this.workflowStateTransitions.push(transition);\r\n }\r\n\r\n this.referencedFormInstance = plainToClass(FormInstance, data.referencedFormInstance);\r\n\r\n this.currentWorkflowState = data.currentWorkflowState;\r\n this.showSendNotificationsButton = data.showSendNotificationsButton;\r\n\r\n //TEAMS-178: KLW - Set the current state order of the selected state\r\n this.currentWorkflowStateOrder = data.currentWorkflowStateOrder;\r\n\r\n this.currentWorkflowStateIsStartState = data.currentWorkflowStateIsStartState;\r\n\r\n //TEAMS-424: KLW - Set the workflows after the API call\r\n this.siteWorkflows = data.siteWorkflows;\r\n this.workflowId = data.workflowId;\r\n\r\n //history\r\n this.createdBy = data.createdBy;\r\n this.createdByUserName = data.createdByUserName;\r\n this.createdDate = data.createdDate;\r\n this.modifiedBy = data.modifiedBy;\r\n this.modifiedByUserName = data.modifiedByUserName;\r\n this.modifiedDate = data.modifiedDate;\r\n\r\n this.rowVersion = data.rowVersion;\r\n\r\n return;\r\n }\r\n\r\n // IListItem methods.\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n public getTitle(): string {\r\n let title: string =\r\n (this.description != null ? `Click to view ${this.name} (${this.description})` : super.getTitle());\r\n\r\n return (title);\r\n }\r\n\r\n public isMagicStructure(): boolean {\r\n return this.magicStructureDefinitionId != null;\r\n }\r\n\r\n public userCanDelete(): boolean {\r\n return (this.canDelete);\r\n }\r\n\r\n public getStatus(): string {\r\n return this.currentWorkflowState;\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return '';\r\n }\r\n\r\n public getValue(property: string): string {\r\n property = property.toLowerCase();\r\n if (property == 'template') {\r\n return this.form.name;\r\n } else if (property == 'status') {\r\n return this.getStatus();\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n public isOriginalVersion: boolean;\r\n\r\n // Always returns the original/current FormInstance's id, even if this is an older version\r\n public getOriginalVersionId(): number {\r\n return this.version == 0 ? this.id : this.originalFormInstanceId;\r\n }\r\n\r\n //TEAMS-424: KLW - set the object type\r\n public static readonly TypeName: string = ItemTypeEnum.FORM_INSTANCE;\r\n public getType(): string {\r\n return (FormInstance.TypeName);\r\n }\r\n\r\n public getPosition(): number {\r\n return (this.formInstanceOrder);\r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n return (true);\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n // Note: will enable the following conditional line after reviewing the new magic form icon with others.\r\n //return (this.magicStructureDefinitionId != null ? IconFormatEnum.SVG_ICON : IconFormatEnum.MAT_ICON);\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n // Note: will enable the following conditional line after reviewing the new magic form icon with others.modified\r\n //return (this.isReference || this.referencedFormInstance ? 'exit_to_app' : 'article');\r\n let icon: string = 'article';\r\n if (false && (this.magicStructureDefinitionId != null)) // We are not yet ready to use this condition.\r\n icon = 'magic-form';\r\n else if (this.referencedFormInstance)\r\n icon = 'exit_to_app';\r\n else if (this.isReferencedCount > 9)\r\n icon = 'filter_9_plus'\r\n else if (this.isReferencedCount > 0)\r\n icon = 'filter_' + this.isReferencedCount\r\n return icon;\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n let uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n // If modifiedByUserName is set, return that\r\n public getModifiedBy(): string {\r\n let result = this.contentModifiedByUserName != '' ? this.contentModifiedByUserName : this.contentModifiedBy;\r\n return result;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.contentModifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n // 03-19-2021 note: restoring the implementation of this code.\r\n this.id = obj.getId();\r\n\r\n if ((obj.name != null) && (obj.name != this.name)) {\r\n this.name = obj.name;\r\n }\r\n this.modifiedBy = obj.modifiedBy;\r\n this.modifiedDate = obj.modifiedDate;\r\n this.currentWorkflowState = obj.currentWorkflowState;\r\n this.description = obj.description; // Added 03-01-2022.\r\n\r\n return;\r\n }\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw ('FormInstance.findAndUpdateFrom(): I am not yet implemented ... do I need to be implemented?');\r\n }\r\n\r\n // Implement interface IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public typeName(): string {\r\n return (FormInstance.TypeName);\r\n }\r\n\r\n public hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n public getDescription(): string {\r\n return this.description;\r\n }\r\n public setDescription(val: string) {\r\n this.description = val;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n public getParentId(): number {\r\n return this.folderId;\r\n }\r\n\r\n public getWorkflowId(): number {\r\n return this.workflowId;\r\n }\r\n\r\n public replaceFormInstanceElementValue(formFieldId: number, formInstanceElement: FormInstanceElement): void {\r\n if (this.formInstanceElements != null) {\r\n for (let index: number = 0; index < this.formInstanceElements.length; index++) {\r\n let searchFormInstanceElement: FormInstanceElement = this.formInstanceElements[index];\r\n\r\n if (searchFormInstanceElement.formFieldId == formInstanceElement.formFieldId) {\r\n //searchFormInstanceElement.copyFieldValuesFrom(formInstanceElement);\r\n this.formInstanceElements.splice(index, 1, formInstanceElement);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Returns a FieldIdToSelectedValues which is mapping of FormField Id to a string array representation of the fields value (obtained from FormInstanceElements)\r\n // NOTE: this only includes the values of Form-Level fields\r\n public getSelectedValuesByFieldId(): FieldIdToSelectedValues {\r\n const valuesByFieldId: FieldIdToSelectedValues = {};\r\n if (this.id > 0) {\r\n for (let el of this.formInstanceElements) {\r\n let value = el.getValueAsStringArray();\r\n if (value && value[0])\r\n valuesByFieldId[el.formFieldId] = value;\r\n }\r\n }\r\n return valuesByFieldId;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { WorkflowState } from '../workflow-state.model';\r\nimport { WorkflowTransition } from '../workflow-transition.model';\r\nimport { WorkflowPermissionBase } from '../workflow-permission-base.model';\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { IHasIdAndName } from '../../interfaces/has-id-and-name.interface';\r\nimport { ICloneAndCopy } from '../../interfaces/clone-and-copy';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\n\r\n// Define an internally used type.\r\ninterface IWorkflowRoles {\r\n [roleName: string]: string;\r\n}\r\n\r\n// Define class Workflow.\r\nexport class Workflow extends IListItemBase implements IViewModel, IHasIdAndName, ICloneAndCopy, IListItem {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Key.\r\n public id: number = 0;\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n\r\n public getOriginalVersionId(): number {\r\n return -1;\r\n }\r\n\r\n // Implement IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public description: string; // Added 04-16-2022.\r\n\r\n public static readonly TypeName: string = 'Workflow';\r\n public typeName(): string {\r\n return (Workflow.TypeName);\r\n }\r\n\r\n public hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n public getDescription(): string {\r\n return this.description;\r\n }\r\n public setDescription(val: string) {\r\n this.description = val;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n // Primitives.\r\n //public name: string;\r\n\r\n public dataCollectionId: number;\r\n\r\n // Flags.\r\n public isSystemWorkflow: boolean;\r\n\r\n public isDefaultFormWorkflow: boolean;\r\n public isDefaultFolderWorkflow: boolean;\r\n public isFormWorkflow: boolean;\r\n public isFolderWorkflow: boolean;\r\n public currentUserCanBuildWorkflows: boolean;\r\n\r\n // 04-19-2021 note: added the following property.\r\n public wasDeletedFromUI: boolean;\r\n\r\n // 09-29-2021 note: added the following three properties\r\n // related to moving objects from one\r\n // workflow state to another.\r\n public needToMoveObjectsToDifferentWorkflowState: boolean = false;\r\n public stateToMoveObjectsFromState: WorkflowState = null;\r\n public stateToMoveObjectsToState: WorkflowState = null;\r\n public NumFormInstancesMoved: number = 0;\r\n public NumFoldersMoved: number = 0;\r\n\r\n //history\r\n public createdBy: string;\r\n public createdByUserName: string;\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByUserName: string;\r\n public modifiedDate: Date;\r\n\r\n // Collections.\r\n @Type(() => WorkflowState)\r\n public states: WorkflowState[];\r\n @Type(() => WorkflowTransition)\r\n public transitions: WorkflowTransition[];\r\n\r\n // pjh - 2/5/2020 - quick fix to allow new workflow to be built. \r\n public get CurrentUserCanBuildWorkflows(): boolean {\r\n return this.id == 0 || this.currentUserCanBuildWorkflows;\r\n }\r\n\r\n // Define client-only instance data.\r\n public hasGeneratedName: boolean = false;;\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: Workflow = new Workflow();\r\n\r\n // Copy primitives.\r\n clone.id = this.id;\r\n clone.name = this.name;\r\n clone.description = this.description;\r\n clone.dataCollectionId = this.dataCollectionId;\r\n\r\n clone.modifiedBy = this.modifiedBy;\r\n clone.modifiedDate = this.modifiedDate;\r\n\r\n clone.isSystemWorkflow = this.isSystemWorkflow;\r\n clone.isDefaultFormWorkflow = this.isDefaultFolderWorkflow;\r\n clone.isDefaultFolderWorkflow = this.isDefaultFolderWorkflow;\r\n clone.isFormWorkflow = this.isFormWorkflow;\r\n clone.isFolderWorkflow = this.isFolderWorkflow;\r\n clone.currentUserCanBuildWorkflows = this.currentUserCanBuildWorkflows;\r\n\r\n // Copy states and transitions.\r\n clone.states = [];\r\n if (this.states != null) {\r\n for (let iState: number = 0; iState < this.states.length; iState++) {\r\n let state: WorkflowState = this.states[iState];\r\n let stateClone: WorkflowState = state.clone();\r\n\r\n clone.states.push(stateClone);\r\n }\r\n }\r\n\r\n clone.transitions = [];\r\n if (this.transitions != null) { \r\n for (let iTransition: number = 0; iTransition < this.transitions.length; iTransition++) {\r\n let transition: WorkflowTransition = this.transitions[iTransition];\r\n let transitionClone: WorkflowTransition = transition.clone();\r\n\r\n clone.transitions.push(transitionClone);\r\n }\r\n }\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: Workflow = objectToCopyParam;\r\n\r\n // Copy primitives.\r\n this.id = objectToCopy.id;\r\n this.name = objectToCopy.name;\r\n this.description = objectToCopy.description;\r\n this.dataCollectionId = objectToCopy.dataCollectionId;\r\n\r\n this.modifiedBy = objectToCopy.modifiedBy;\r\n this.modifiedDate = objectToCopy.modifiedDate;\r\n\r\n this.isSystemWorkflow = objectToCopy.isSystemWorkflow;\r\n this.isDefaultFormWorkflow = objectToCopy.isDefaultFolderWorkflow;\r\n this.isDefaultFolderWorkflow = objectToCopy.isDefaultFolderWorkflow;\r\n this.isFormWorkflow = objectToCopy.isFormWorkflow;\r\n this.isFolderWorkflow = objectToCopy.isFolderWorkflow;\r\n this.currentUserCanBuildWorkflows = objectToCopy.currentUserCanBuildWorkflows;\r\n\r\n // Copy states and transitions.\r\n //VNEXT-233: KLW - Changed the referenced states to objectToCopy, which fixed the bug\r\n this.states = [];\r\n if (objectToCopy.states != null) {\r\n for (let iState: number = 0; iState < objectToCopy.states.length; iState++) {\r\n let state: WorkflowState = objectToCopy.states[iState];\r\n let stateClone: WorkflowState = state.clone();\r\n\r\n this.states.push(stateClone);\r\n }\r\n }\r\n\r\n //VNEXT-233: KLW - Changed the referenced states to objectToCopy, which fixed the bug\r\n this.transitions = [];\r\n if (objectToCopy.transitions != null) {\r\n for (let iTransition: number = 0; iTransition < objectToCopy.transitions.length; iTransition++) {\r\n let transition: WorkflowTransition = objectToCopy.transitions[iTransition];\r\n let transitionClone: WorkflowTransition = transition.clone();\r\n\r\n this.transitions.push(transitionClone);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // IListItem methods.\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n /*\r\n public getTitle(): string {\r\n return (this.name);\r\n }\r\n */\r\n\r\n public userCanDelete(): boolean {\r\n return (false); // Note: delete permissions are based on the 'siteIsAdministerable'\r\n // flag in model class DataCollecdtion.\r\n }\r\n\r\n public getStatus(): string {\r\n return ('na');\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return \"\";\r\n }\r\n\r\n public getValue(property: string): string {\r\n return '';\r\n }\r\n\r\n public getType(): string {\r\n return ItemTypeEnum.WORKFLOW; \r\n }\r\n\r\n public getPosition(): number {\r\n return this.id; // id is a reasonable default attribute for ordering\r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n let canBeDeleted: boolean = ((!this.isSystemWorkflow) && (!this.isDefaultFolderWorkflow) && (!this.isDefaultFormWorkflow));\r\n return (canBeDeleted);\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return ('timeline'); // Returns the default icon for a site/data collection.\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n let uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n // TO DO: DISCUSS WITH PAUL.\r\n //\r\n // NOTE: I BELIEVE THIS CAN BE A NOOP SINCE\r\n // THE OBJECT WILL ALWAYS BE CONSISTENT\r\n // WITH ITSELF/NO NEED TO UPDATE/SYNC.\r\n\r\n return;\r\n }\r\n\r\n public findAndUpdateFrom(items, obj: any): void {\r\n throw ('Workflow.findAndUpdateFrom(): this method is not implement.');\r\n }\r\n\r\n public getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n public getRoleNames(): string[] {\r\n let mapOfRoleNames: IWorkflowRoles = {};\r\n\r\n // Get state permission role names.\r\n if (this.states != null) {\r\n for (let iState: number = 0; iState < this.states.length; iState++) {\r\n let state: WorkflowState = this.states[iState];\r\n\r\n if (state.permissions != null) {\r\n for (let iPermission: number = 0; iPermission < state.permissions.length; iPermission++) {\r\n let permission: WorkflowPermissionBase = state.permissions[iPermission];\r\n\r\n if (!mapOfRoleNames[permission.roleName])\r\n mapOfRoleNames[permission.roleName] = permission.roleName;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Get transition permission role names.\r\n if (this.transitions != null) {\r\n for (let iTrans: number = 0; iTrans < this.transitions.length; iTrans++) {\r\n let transition: WorkflowTransition = this.transitions[iTrans];\r\n\r\n if (transition.permissions != null) {\r\n for (let iPermission: number = 0; iPermission < transition.permissions.length; iPermission++) {\r\n let permission: WorkflowPermissionBase = transition.permissions[iPermission];\r\n\r\n if (!mapOfRoleNames[permission.roleName])\r\n mapOfRoleNames[permission.roleName] = permission.roleName;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Convert the map of role names to an array.\r\n let roleNames: string[] = [];\r\n\r\n for (let roleName in mapOfRoleNames) {\r\n roleNames.push(roleName);\r\n }\r\n\r\n return roleNames;\r\n }\r\n}\r\n","import { IViewModel } from '../interfaces/view-model.interface';\r\nimport { RoleGroupMember } from './role-group-member.model';\r\nimport { Role } from './role.model';\r\n\r\nexport class SiteLevelRoleMember implements IViewModel {\r\n public id: number;\r\n\r\n public roleId: number;\r\n public roleName: string;\r\n\r\n public memberType: string; // User or Group\r\n\r\n public member: string; // UserId or GroupName\r\n public memberId: string; // The underlying user MAX Id or MAX group code.\r\n\r\n public constructor(roleGroupMember: RoleGroupMember = null, role: Role) {\r\n if (roleGroupMember != null) {\r\n this.roleName = roleGroupMember.roleName;\r\n this.memberType = roleGroupMember.memberType;\r\n this.member = roleGroupMember.member;\r\n this.memberId = roleGroupMember.memberId;\r\n }\r\n\r\n if (role != null) {\r\n this.roleId = role.id;\r\n this.roleName = role.name;\r\n }\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport {\r\n STRUCTURE_PROPERTY_SELECT,\r\n STRUCTURE_PROPERTY_MODIFIED_BY,\r\n STRUCTURE_PROPERTY_MODIFIED_DATE,\r\n STRUCTURE_PROPERTY_NAME,\r\n STRUCTURE_PROPERTY_STATUS,\r\n STRUCTURE_PROPERTY_TEMPLATE\r\n} from \"../../components/list-view/grid-view/grid-view.component\";\r\n\r\nexport interface IFieldRoleNamesChanged {\r\n roleNamesChangedFor(fieldConfig: StructureFieldConfig): void;\r\n}\r\n\r\n// Note: the following data structure/class is based on https://maxjira.max.gov/browse/VNEXT-1340.\r\nexport class StructureFieldConfig {\r\n // Properties.\r\n public disableForSpecifiedRoles: boolean = false\r\n public roleNames: string[] = [];\r\n private fieldConfigRoleChangeHandler: IFieldRoleNamesChanged = null;\r\n\r\n // Constructor.\r\n public constructor(public fieldName: string) { }\r\n\r\n public setFieldConfigRoleChangedHandler(fieldConfigRoleChangeHandler: IFieldRoleNamesChanged): void {\r\n this.fieldConfigRoleChangeHandler = fieldConfigRoleChangeHandler;\r\n }\r\n\r\n // Getter, setter methods.\r\n public get DisableForSpecifiedRoles(): boolean {\r\n return this.disableForSpecifiedRoles;\r\n }\r\n public set DisableForSpecifiedRoles(value: boolean) {\r\n this.disableForSpecifiedRoles = value;\r\n }\r\n\r\n public get RoleNames(): string[] {\r\n return this.roleNames;\r\n }\r\n public set RoleNames(value: string[]) {\r\n this.roleNames = value;\r\n\r\n if (this.fieldConfigRoleChangeHandler != null)\r\n this.fieldConfigRoleChangeHandler.roleNamesChangedFor(this);\r\n }\r\n\r\n /*\r\n public get HasInconsistentConfig(): boolean {\r\n let hasInconsistentConfig: boolean = this.disableForSpecifiedRoles && (this.roleNames.length == 0);\r\n\r\n return hasInconsistentConfig;\r\n }\r\n */\r\n // Note: the following getter methods returns a non-null string if there is a configuration error.\r\n public get ConfigInconsistencyError(): string {\r\n let error: string = null;\r\n\r\n if (this.disableForSpecifiedRoles && this.roleNames.length == 0) {\r\n error = `Please select one or more roles names for disabled field '${this.fieldName}'`;\r\n }\r\n\r\n return error;\r\n }\r\n}\r\nexport class ConfigureStructureFields {\r\n // Constants.\r\n public static FormName_FieldName: string = \"Form Name\";\r\n public static ModifiedOn_FieldName: string = \"Modified On\";\r\n public static ModifiedBy_FieldName: string = \"Modified By\";\r\n public static FormTemplateName_FieldName: string = \"Form Template Name\";\r\n public static Status_FieldName: string = \"Status\";\r\n\r\n // Define a mapping of the names used in this class to the property names used in the structure's grid view listing.\r\n private static structureFieldNamesToMyFieldNamesMap = null;\r\n\r\n // Static data\r\n private static readonly fieldNames: string[] =\r\n [\r\n ConfigureStructureFields.FormName_FieldName,\r\n ConfigureStructureFields.ModifiedOn_FieldName,\r\n ConfigureStructureFields.ModifiedBy_FieldName,\r\n ConfigureStructureFields.FormTemplateName_FieldName,\r\n ConfigureStructureFields.Status_FieldName\r\n ];\r\n\r\n // Properties.\r\n @Type(() => StructureFieldConfig)\r\n private fieldConfigs: StructureFieldConfig[] = [];\r\n\r\n // Constructor.\r\n private constructor() {\r\n if (ConfigureStructureFields.structureFieldNamesToMyFieldNamesMap == null) {\r\n ConfigureStructureFields.structureFieldNamesToMyFieldNamesMap = {\r\n \"Form Name\": STRUCTURE_PROPERTY_NAME,\r\n \"Modified On\": STRUCTURE_PROPERTY_MODIFIED_DATE,\r\n \"Modified By\": STRUCTURE_PROPERTY_MODIFIED_BY,\r\n \"Form Template Name\": STRUCTURE_PROPERTY_TEMPLATE,\r\n \"Status\": STRUCTURE_PROPERTY_STATUS\r\n }\r\n }\r\n }\r\n\r\n public setFieldConfigRoleChangedHandler(fieldConfigRoleChangeHandler: IFieldRoleNamesChanged): void {\r\n if (this.fieldConfigs != null) {\r\n for (let index: number = 0; index < this.fieldConfigs.length; index++) {\r\n let fieldConfig: StructureFieldConfig = this.fieldConfigs[index];\r\n fieldConfig.setFieldConfigRoleChangedHandler(fieldConfigRoleChangeHandler);\r\n }\r\n }\r\n }\r\n\r\n // Getter/getter-like method(s).\r\n public get FieldConfigs(): StructureFieldConfig[] {\r\n return this.fieldConfigs;\r\n }\r\n\r\n public getRoleNamesForField(fieldName: string): string[] {\r\n let roleNames: string[] = [];\r\n\r\n let fieldConfig: StructureFieldConfig = this.fieldConfigs.find(fc => fc.fieldName == fieldName);\r\n if (fieldConfig != null)\r\n roleNames = fieldConfig.roleNames;\r\n\r\n return roleNames;\r\n }\r\n\r\n public get HasAtLeastOneHiddenField(): boolean {\r\n let hasAtLeastOneHiddenField: boolean = false;\r\n\r\n if (this.fieldConfigs != null) {\r\n let hiddenFields: StructureFieldConfig[] = this.fieldConfigs.filter(fc => fc.disableForSpecifiedRoles);\r\n hasAtLeastOneHiddenField = hiddenFields.length > 0;\r\n }\r\n\r\n return hasAtLeastOneHiddenField;\r\n }\r\n\r\n // Note: the following getter methods returns a non-null string if there is a configuration error.\r\n public get ConfigInconsistencyError(): string {\r\n let error: string = null;\r\n\r\n if (this.fieldConfigs != null) {\r\n for (let index: number = 0; index < this.fieldConfigs.length; index++) {\r\n error = this.fieldConfigs[index].ConfigInconsistencyError;\r\n if (error != null)\r\n break;\r\n }\r\n }\r\n\r\n return error;\r\n }\r\n\r\n public filterStructureColumnNames(defaultColumnNames: string[], userRoleNames: string[]): string[] {\r\n let filteredColumnNames: string[] = defaultColumnNames;\r\n\r\n let disabledFieldDefs: StructureFieldConfig[] = this.fieldConfigs.filter(fc => fc.disableForSpecifiedRoles == true);\r\n for (let index: number = 0; index < disabledFieldDefs.length; index++) {\r\n // If the user is in ANY of the groups not allowed to see the current, then we must filter out that field from the result list.\r\n let disabledFieldDef: StructureFieldConfig = disabledFieldDefs[index];\r\n let intersectedRoleNames: string[] = disabledFieldDef.RoleNames.filter(rn => userRoleNames.includes(rn));\r\n let disabledForUserGroups: boolean = intersectedRoleNames.length > 0;\r\n\r\n if (disabledForUserGroups) {\r\n let disabledStructureFieldName: string = ConfigureStructureFields.structureFieldNamesToMyFieldNamesMap[disabledFieldDef.fieldName];\r\n\r\n if (disabledStructureFieldName != null) {\r\n filteredColumnNames = filteredColumnNames.filter(fcn => fcn != disabledStructureFieldName);\r\n }\r\n }\r\n }\r\n\r\n return filteredColumnNames;\r\n }\r\n\r\n // Static methods.\r\n public static createEmptyConfig(): ConfigureStructureFields {\r\n let config: ConfigureStructureFields = new ConfigureStructureFields();\r\n\r\n for (let index: number = 0; index < ConfigureStructureFields.fieldNames.length; index++) {\r\n let fieldConfig: StructureFieldConfig = new StructureFieldConfig(ConfigureStructureFields.fieldNames[index]);\r\n config.fieldConfigs.push(fieldConfig);\r\n }\r\n\r\n return config;\r\n }\r\n\r\n public static parseFromJson(jsonConfig: string): ConfigureStructureFields {\r\n let configObject: ConfigureStructureFields = JSON.parse(jsonConfig);\r\n //let config = plainToClass(ConfigureStructureFields, configObject);\r\n let config: ConfigureStructureFields = new ConfigureStructureFields();\r\n config.fieldConfigs = [];\r\n if (configObject.fieldConfigs != null) {\r\n for (let index: number = 0; index < configObject.fieldConfigs.length; index++) {\r\n let fieldConfigObject: StructureFieldConfig = configObject.fieldConfigs[index];\r\n if ((fieldConfigObject.fieldName != null) && (fieldConfigObject.fieldName.trim() != '')) {\r\n let fieldConfig: StructureFieldConfig = new StructureFieldConfig(fieldConfigObject.fieldName);\r\n fieldConfig.disableForSpecifiedRoles = fieldConfigObject.disableForSpecifiedRoles;\r\n fieldConfig.roleNames = fieldConfigObject.roleNames;\r\n\r\n config.fieldConfigs.push(fieldConfig);\r\n } \r\n }\r\n }\r\n\r\n // Make sure there is an entry for ever field.\r\n if (config.fieldConfigs == null)\r\n config.fieldConfigs = [];\r\n for (let index: number = 0; index < ConfigureStructureFields.fieldNames.length; index++) {\r\n let fieldName: string = ConfigureStructureFields.fieldNames[index];\r\n let fieldConfig: StructureFieldConfig = config.fieldConfigs.find(fc => fc.fieldName == fieldName);\r\n if (fieldConfig == null) {\r\n let fieldConfig: StructureFieldConfig = new StructureFieldConfig(ConfigureStructureFields.fieldNames[index]);\r\n config.fieldConfigs.push(fieldConfig);\r\n }\r\n }\r\n\r\n return config;\r\n }\r\n\r\n public static toJsonString(config: ConfigureStructureFields): string {\r\n let json: string = JSON.stringify(config);\r\n return json;\r\n }\r\n}\r\n","import { environment } from '../../../environments/environment';\r\nimport { CurrentUser } from '../../security/current-user.model';\r\nimport { Logging } from '../logging';\r\nimport { DataCollection } from './site-content/data-collection.model';\r\n\r\n// Added to model security claims for the current user\nexport class UserClaims {\n public id: number; // max id of user who claims this represents\r\n public claims: Set = new Set();\n\n constructor(user: CurrentUser, site: DataCollection = null) {\n\n if (user.isSystemAdmin) {\n this.claims.add('CanViewAdmin');\n this.claims.add('CanViewAdminAbout');\n this.claims.add('CanViewAdminSettings');\n this.claims.add('CanViewAdminUserInfo');\r\n this.claims.add('CanViewAdminAllSites');\r\n }\r\n\r\n //VNEXT-787 in prod, members of COLLECT-VNEXT-PROD-SITE-CREATORS(NONFED)\r\n let apiUrl = environment.apiUrl.toLowerCase();\r\n if (apiUrl.indexOf('.test.') < 0 && apiUrl.indexOf('.stage.') < 0 && apiUrl.indexOf('.sandbox.') < 0) {\r\n if (user.isProdSiteCreator) {\r\n this.claims.add('CanCreateSite');\r\n }\r\n }\r\n else {\r\n //console.log('Not production; user.isSiteCreator is ' + user.isSiteCreator + ' and user.isSystemAdmin is ' + user.isSystemAdmin);\r\n //members of COLLECT-VNEXT-SITE-CREATORS\r\n //or COLLECT-VNEXT-SYSTEM-ADMINS\r\n if (user.isSiteCreator || user.isSystemAdmin) {\n this.claims.add('CanCreateSite');\r\n }\r\n }\r\n\r\n if (user.hasAccessibleSites || user.isSystemAdmin) {\n this.claims.add('CanViewSiteList');\r\n }\n\r\n if (site) {\r\n if (site.siteIsAdministerable) {\n this.claims.add('CanViewSiteStructure');\n this.claims.add('CanViewSiteSummary');\n this.claims.add('CanViewSiteFormCatalog');\n this.claims.add('CanViewSitePermissions');\n this.claims.add('CanViewSiteWorkflowCatalog'); \n this.claims.add('CanViewSiteManagement');\r\n this.claims.add('CanBuildConstraints');\r\n this.claims.add('CanBuildWorkflows');\r\n this.claims.add('CanPublish');\r\n } else {\r\n // Note: per VNEXT-1619, if the user is not an admin but can edit form template HTML fields only, add a claim for that.\r\n if (site.currentUserCanSeeStructure)\r\n this.claims.add('CanEditFormTemplateHtmlOnly');\r\n }\r\n if (site.currentUserCanSeeSimplePermissions) {\r\n this.claims.add('CanViewSitePermissions');\r\n }\r\n // Note: discuss the next four lines with Paul before enabling them.\r\n if (site.treeIsBuildable) { // || site.treeIsViewable) {\n this.claims.add('CanViewSiteStructure');\r\n } else if (site.currentUserCanSeeStructure)\r\n this.claims.add('CanViewSiteStructure');\r\n\r\n //VNEXT-1618 enable access for non-admin editing\r\n if (site.currentUserCanEditSiteHomePageHtml) this.claims.add('CanViewSiteSummary');\r\n if (site.currentUserCanEditFormTemplateHtml) this.claims.add('CanEditFormTemplateHtmlOnly');\r\n if (site.currentUserCanBuildConstraints) this.claims.add('CanBuildConstraints');\r\n if (site.currentUserCanBuildWorkflows) this.claims.add('CanBuildWorkflows');\r\n if (site.currentUserCanBuildWorkflows) this.claims.add('CanViewSiteWorkflowCatalog');\r\n if (site.currentUserCanPublish) this.claims.add('CanPublish');\r\n }\r\n }\n\n // Returns true if user has claim \n public has(claim: string): boolean {\n // TODO: THIS IS TEMPORARY, REMOVE IT AFTER DEV\n if (environment.userGrantedAllClaims) {\n //console.warn(\"WARNING: UserClaims.has() is using environment.userGrantedAllClaims...\");\n return true;\r\n }\n if (claim == null) return true;\n\n return this.claims.has(claim);\r\n }\r\n}\n","import { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\n\r\nexport abstract class WorkflowPermissionBase implements IHasIdAndName, ICloneAndCopy {\r\n public abstract setId(value: number): void; // Note: getId() is already defined in interface IHasIdAndName.\r\n\r\n public get id(): number {\r\n return this.getId();\r\n }\r\n public set id(value: number) {\r\n this.setId(value);\r\n }\r\n\r\n // Properties.\r\n public roleId: number = 0;\r\n public roleName: string = null;\r\n public roleIsSiteAdmin: boolean = false;\r\n\r\n // Client-only key (not saved in the database).\r\n public clientId: number = 0; // The client/transition id of the underlying workflow state or workflow transition.\r\n\r\n public canEdit: boolean = false;\r\n public canView: boolean = false;\r\n public canGrant: boolean = false;\r\n public canDelete: boolean = false;\r\n public canBuildForms: boolean = false;\r\n public canBuildWorkflows: boolean = false;\r\n public canBuildFolders: boolean = false;\r\n public canBuildFormInstances: boolean = false;\r\n public canBuildRoles: boolean = false;\r\n\r\n public canDoAll: boolean = false; // 08-03-2021 note: this is only used for the configure roles dialogue.\r\n\r\n //VNEXT-392: KLW - New properties for suggesting permissions\r\n public suggestCanEdit: boolean = false;\r\n public suggestCanView: boolean = false;\r\n public suggestCanGrant: boolean = false;\r\n public suggestCanDelete: boolean = false;\r\n public suggestCanBuildForms: boolean = false;\r\n public suggestCanBuildWorkflows: boolean = false;\r\n public suggestCanBuildFolders: boolean = false;\r\n public suggestCanBuildFormInstances: boolean = false;\r\n public suggestCanBuildRoles: boolean = false;\r\n\r\n // Define a transient, client-only property.\r\n public transientIsExpanded: boolean = false;\r\n public transientParentPropertiesSet: boolean = false;\r\n\r\n // Methods.\r\n public copyFieldsFrom(sourcePermissionBase: WorkflowPermissionBase): void {\r\n this.roleId = sourcePermissionBase.roleId;\r\n this.roleName = sourcePermissionBase.roleName;\r\n this.roleIsSiteAdmin = sourcePermissionBase.roleIsSiteAdmin;\r\n\r\n this.canEdit = sourcePermissionBase.canEdit;\r\n this.canView = sourcePermissionBase.canView;\r\n this.canGrant = sourcePermissionBase.canGrant;\r\n this.canDelete = sourcePermissionBase.canDelete;\r\n this.canBuildForms = sourcePermissionBase.canBuildForms;\r\n this.canBuildWorkflows = sourcePermissionBase.canBuildWorkflows;\r\n this.canBuildRoles = sourcePermissionBase.canBuildRoles;\r\n this.canBuildFolders = sourcePermissionBase.canBuildFolders;\r\n this.canBuildFormInstances = sourcePermissionBase.canBuildFormInstances;\r\n\r\n //VNEXT-392: KLW - Set the new properties\r\n this.suggestCanEdit = sourcePermissionBase.suggestCanEdit;\r\n this.suggestCanView = sourcePermissionBase.suggestCanView;\r\n this.suggestCanGrant = sourcePermissionBase.suggestCanGrant;\r\n this.suggestCanDelete = sourcePermissionBase.suggestCanDelete;\r\n this.suggestCanBuildForms = sourcePermissionBase.suggestCanBuildForms;\r\n this.suggestCanBuildWorkflows = sourcePermissionBase.suggestCanBuildWorkflows;\r\n this.suggestCanBuildRoles = sourcePermissionBase.suggestCanBuildRoles;\r\n this.suggestCanBuildFolders = sourcePermissionBase.suggestCanBuildFolders;\r\n this.suggestCanBuildFormInstances = sourcePermissionBase.suggestCanBuildFormInstances;\r\n\r\n\r\n return;\r\n }\r\n\r\n // Default implementation which can be overridden\r\n public hasPermissions() {\r\n return (\r\n this.canView ||\r\n this.canEdit ||\r\n this.canGrant ||\r\n this.canDelete ||\r\n this.canBuildFolders ||\r\n this.canBuildFormInstances ||\r\n this.canBuildForms ||\r\n this.canBuildRoles ||\r\n this.canBuildWorkflows);\r\n }\r\n\r\n // Provide dummy implementations of interfaces IHasIdAndName, ICloneAndCopy.\r\n // Expect my derived classes to provide actual implementations of these interface.\r\n //\r\n // Dummy implementations for IHasIdAndName.\r\n public getId(): number {\r\n this.notImplemented('getId');\r\n\r\n return (-1); // Unreachable.\r\n }\r\n\r\n //public name: string;\r\n getName(): string {\r\n this.notImplemented('getName');\r\n\r\n return (null); // Unreachable.\r\n }\r\n setName(nameParam: string): void {\r\n this.notImplemented('setName');\r\n }\r\n\r\n public typeName(): string {\r\n this.notImplemented('typeName');\r\n\r\n return (null);\r\n }\r\n\r\n hasDescriptionField(): boolean {\r\n return false;\r\n }\r\n getDescription(): string {\r\n return null;\r\n }\r\n setDescription(val: string) {\r\n return;\r\n }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n // Dummy implementations for ICloneAndCopy.\r\n public clone(): ICloneAndCopy {\r\n this.notImplemented('clone');\r\n\r\n return (null); // Not reachable.\r\n }\r\n\r\n copy(objectToCopy: ICloneAndCopy): void {\r\n this.notImplemented('copy');\r\n }\r\n\r\n // Private methods.\r\n private notImplemented(methodName: string): void {\r\n let errorMsg: string = `WorkflowPermissionBase.${methodName}() is not implemented.`;\r\n throw (errorMsg);\r\n }\r\n}\r\n","import { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\nimport { WorkflowPermissionBase } from './workflow-permission-base.model';\r\n\r\nexport class WorkflowStatePermission extends WorkflowPermissionBase implements ICloneAndCopy {\r\n public workflowId: number;\r\n\r\n public stateId: number;\r\n public stateName: string;\r\n\r\n // Implement interface IHasIdAndName.\r\n public getId(): number {\r\n return (this.stateId);\r\n }\r\n public setId(value: number): void {\r\n this.stateId = value;\r\n }\r\n\r\n //public name: string;\r\n public getName(): string {\r\n return (this.stateName);\r\n }\r\n public setName(nameParam: string): void {\r\n this.stateName = nameParam;\r\n\r\n return;\r\n }\r\n\r\n public typeName(): string {\r\n return ('WorkflowStatePermission');\r\n }\r\n\r\n // Implement interface ICloneAndCopy.\r\n public clone(): ICloneAndCopy {\r\n let clone: WorkflowStatePermission = new WorkflowStatePermission();\r\n\r\n clone.copyFieldsFrom(this);\r\n clone.workflowId = this.workflowId;\r\n clone.stateId = this.stateId;\r\n clone.stateName = this.stateName;\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let wsPermission: WorkflowStatePermission = objectToCopy;\r\n\r\n this.copyFieldsFrom(wsPermission);\r\n this.workflowId = wsPermission.workflowId;\r\n this.stateId = wsPermission.stateId;\r\n this.stateName = wsPermission.stateName;\r\n\r\n return;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { WorkflowStatePermission } from './workflow-state-permission.model';\r\nimport { WorkflowPermissionBase } from './workflow-permission-base.model';\r\nimport { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { IHasWorkflowPermissions } from '../interfaces/has-workflow-permissions.interface';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\nimport { Workflow } from './site-content/workflow.model';\r\n\r\nexport class WorkflowState implements IViewModel,\r\n IHasIdAndName, IHasWorkflowPermissions, ICloneAndCopy {\r\n // Key.\r\n public id: number = 0;\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n\r\n // Client-only key (not saved in the database).\r\n public clientId: number = 0;\r\n\r\n // Primitives.\r\n public workflowId: number;\r\n\r\n public name: string;\r\n public description: string; // Added 04-16-2022.\r\n\r\n public notify: boolean;\r\n public showSendNotificationsButton: boolean;\r\n\r\n // Implement IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public static readonly TypeName: string = 'WorkflowState';\r\n public typeName(): string {\r\n return (WorkflowState.TypeName);\r\n }\r\n\r\n public hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n public getDescription(): string {\r\n return this.description;\r\n }\r\n public setDescription(val: string) {\r\n this.description = val;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for workflow states (as this time).\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n // End HasIdAndName interface methods that have no meaning for workflow states (as this time).\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return \"Workflow State Properties\";\r\n }\r\n\r\n public isStartState: boolean;\r\n public isEndState: boolean;\r\n\r\n public stateOrder: number;\r\n\r\n // Define transient/non-persisted values.\r\n public transientWorkflowStateTypeId: number;\r\n public transientWorkflowStateNotify: boolean;\r\n public transientWorkflowStateShowSendNotificationsButton: boolean;\r\n\r\n // Collections.\r\n @Type(() => WorkflowStatePermission)\r\n public permissions: WorkflowStatePermission[] = [];\r\n\r\n // Implement interface IHasWorkflowPermissions.\r\n public getPropertiesTitle(): string {\r\n let title: string = `Permissions: ${this.name}`;\r\n\r\n return (title);\r\n }\r\n\r\n public getPermissionNames(): string[] {\r\n \r\n let names: string[] = [\r\n 'View',\r\n 'Edit',\r\n 'Delete',\r\n 'Grant',\r\n\r\n 'BuildFolders',\r\n 'BuildFormInstances'\r\n ];\r\n \r\n return (names);\r\n }\r\n\r\n public getSimplePermissionNames(): string[] {\r\n let names: string[] =\r\n [\r\n 'Edit'\r\n ];\r\n\r\n return (names);\r\n }\r\n\r\n public getAdvancedPermissionNames(): string[] {\r\n let names: string[] = [\r\n 'View',\r\n 'Edit',\r\n 'Grant',\r\n\r\n 'BuildFolders',\r\n 'BuildForms'\r\n ];\r\n\r\n return (names);\r\n }\r\n\r\n public getPermissions(): WorkflowPermissionBase[] {\r\n // Make sure the following workflow state permissions\r\n // are set: workflowId, stateId, and stateName.\r\n if (this.permissions &&\r\n (this.permissions.length > 0) &&\r\n !this.permissions[0].transientParentPropertiesSet) {\r\n for (let iPermission: number = 0; iPermission < this.permissions.length; iPermission++) {\r\n let permission: WorkflowStatePermission = this.permissions[iPermission];\r\n\r\n permission.workflowId = this.workflowId;\r\n permission.stateId = this.id;\r\n permission.stateName = this.name;\r\n\r\n permission.transientParentPropertiesSet = true;\r\n }\r\n }\r\n\r\n // Return the permissions.\r\n return (this.permissions);\r\n }\r\n\r\n public get Permissions(): WorkflowPermissionBase[] {\r\n return (this.getPermissions());\r\n }\r\n\r\n public get PermissionCount(): number {\r\n let permissions: WorkflowPermissionBase[] = this.getPermissions();\r\n let permissionCount: number = (permissions != null ? permissions.length : 0);\r\n\r\n return (permissionCount);\r\n }\r\n\r\n public addPermission(permissionParam: WorkflowPermissionBase): boolean {\r\n let permission: WorkflowStatePermission = new WorkflowStatePermission();\r\n permission.workflowId = this.workflowId;\r\n permission.stateId = this.id;\r\n permission.stateName = this.name;\r\n permission.copyFieldsFrom(permissionParam);\r\n\r\n this.ensurePermissions();\r\n this.permissions.push(permission);\r\n\r\n return (true);\r\n }\r\n\r\n public updatePermission(permissionParam: WorkflowPermissionBase): boolean {\r\n this.ensurePermissions();\r\n\r\n let permissions: WorkflowStatePermission[] = this.permissions.filter(p => p.roleName == permissionParam.roleName);\r\n let bHavePermission: boolean = (permissions.length === 1);\r\n\r\n if (bHavePermission) {\r\n let permission: WorkflowStatePermission = permissions[0];\r\n permission.copyFieldsFrom(permissionParam);\r\n }\r\n\r\n return (bHavePermission);\r\n }\r\n\r\n public removePermission(permissionParam: WorkflowPermissionBase): boolean {\r\n this.ensurePermissions();\r\n\r\n let iNumPermissions = this.permissions.length;\r\n\r\n this.permissions = this.permissions.filter(p => p.roleName != permissionParam.roleName);\r\n\r\n return (this.permissions.length != iNumPermissions);\r\n }\r\n\r\n public replacePermissionsForRole(roleId: number, workflowStatePermissions: WorkflowStatePermission[]) {\r\n this.ensurePermissions();\r\n\r\n this.permissions = this.permissions.filter(p => p.roleId != roleId);\r\n for (let iPermission: number = 0; iPermission < workflowStatePermissions.length; iPermission++) {\r\n let workflowStatePermission: WorkflowStatePermission = workflowStatePermissions[iPermission];\r\n\r\n this.permissions.push(workflowStatePermission);\r\n }\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: WorkflowState = new WorkflowState();\r\n\r\n clone.id = this.id;\r\n clone.clientId = this.clientId;\r\n\r\n clone.workflowId = this.workflowId;\r\n\r\n clone.name = this.name;\r\n clone.description = this.description;\r\n\r\n clone.notify = this.notify;\r\n clone.showSendNotificationsButton = this.showSendNotificationsButton;\r\n\r\n clone.isStartState = this.isStartState;\r\n clone.isEndState = this.isEndState;\r\n\r\n clone.stateOrder = this.stateOrder;\r\n\r\n clone.permissions = [];\r\n if (this.permissions && (this.permissions.length > 0)) {\r\n for (let iPerm: number = 0; iPerm < this.permissions.length; iPerm++) {\r\n let permission: WorkflowStatePermission = this.permissions[iPerm];\r\n\r\n clone.permissions.push(permission);\r\n }\r\n }\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: WorkflowState = objectToCopyParam;\r\n\r\n this.id = objectToCopy.id;\r\n this.clientId = objectToCopy.clientId;\r\n\r\n this.workflowId = objectToCopy.workflowId;\r\n\r\n this.name = objectToCopy.name;\r\n this.description = objectToCopy.description;\r\n\r\n this.notify = objectToCopy.notify;\r\n this.showSendNotificationsButton = objectToCopy.showSendNotificationsButton;\r\n\r\n this.isStartState = objectToCopy.isStartState;\r\n this.isEndState = objectToCopy.isEndState;\r\n\r\n this.stateOrder = objectToCopy.stateOrder;\r\n\r\n this.permissions = [];\r\n if (objectToCopy.permissions && (objectToCopy.permissions.length > 0)) {\r\n for (let iPerm: number = 0; iPerm < objectToCopy.permissions.length; iPerm++) {\r\n let permission: WorkflowStatePermission = objectToCopy.permissions[iPerm];\r\n\r\n this.permissions.push(permission);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Implement additional public methods.\r\n public clientIdsEqual(secondWorkflowState: WorkflowState): boolean {\r\n return (this.clientId == secondWorkflowState.clientId);\r\n }\r\n\r\n // Implement private helper methods.\r\n private ensurePermissions(): void {\r\n if (!this.permissions) {\r\n this.permissions = [];\r\n }\r\n\r\n return;\r\n }\r\n}\r\n","import { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\nimport { WorkflowPermissionBase } from './workflow-permission-base.model';\r\n\r\nexport class WorkflowTransitionPermission extends WorkflowPermissionBase implements ICloneAndCopy {\r\n public workflowId: number;\r\n\r\n public transitionId: number;\r\n public transitionName: string;\r\n\r\n // override of base class method\r\n public hasPermissions() {\r\n return this.canEdit == true;\r\n }\r\n\r\n // Implement interface IHasIdAndName.\r\n public getId(): number {\r\n return (this.transitionId);\r\n }\r\n public setId(value: number): void {\r\n this.transitionId = value;\r\n }\r\n\r\n //public name: string;\r\n public getName(): string {\r\n return (this.transitionName);\r\n }\r\n public setName(nameParam: string): void {\r\n this.transitionName = nameParam;\r\n\r\n return;\r\n }\r\n\r\n public typeName(): string {\r\n return ('WorkflowTransitionPermission');\r\n }\r\n\r\n // Implement interface ICloneAndCopy.\r\n public clone(): ICloneAndCopy {\r\n let clone: WorkflowTransitionPermission = new WorkflowTransitionPermission();\r\n\r\n clone.copyFieldsFrom(this);\r\n clone.workflowId = this.workflowId;\r\n clone.transitionId = this.transitionId;\r\n clone.transitionName = this.transitionName;\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopy: ICloneAndCopy): void {\r\n let wsPermission: WorkflowTransitionPermission = objectToCopy;\r\n\r\n this.copyFieldsFrom(wsPermission);\r\n this.workflowId = wsPermission.workflowId;\r\n this.transitionId = wsPermission.transitionId;\r\n this.transitionName = wsPermission.transitionName;\r\n\r\n return;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { WorkflowTransitionPermission } from './workflow-transition-permission.model';\r\nimport { WorkflowPermissionBase } from './workflow-permission-base.model';\r\nimport { IHasIdAndName } from '../interfaces/has-id-and-name.interface';\r\nimport { IHasWorkflowPermissions } from '../interfaces/has-workflow-permissions.interface';\r\nimport { ICloneAndCopy } from '../interfaces/clone-and-copy';\r\nimport { WorkflowState } from './workflow-state.model';\r\n\r\nexport class WorkflowTransition implements IViewModel,\r\n IHasIdAndName, IHasWorkflowPermissions, ICloneAndCopy {\r\n // Key.\r\n public id: number = 0;\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n\r\n // Client-only key (not saved in the database).\r\n public clientId: number = 0;\r\n\r\n // Implement IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public static readonly TypeName: string = 'WorkflowTransition';\r\n public typeName(): string {\r\n return (WorkflowTransition.TypeName);\r\n }\r\n\r\n public hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n public getDescription(): string {\r\n return this.description;\r\n }\r\n public setDescription(val: string) {\r\n this.description = val;\r\n }\r\n\r\n // Define new HasIdAndName interface methods related to optional workflow transition customization.\r\n public getChangeWorkflowStateDialogTitle(): string {\r\n return this.changeWorkflowStateDialogTitle;\r\n }\r\n public setChangeWorkflowStateDialogTitle(value: string): void {\r\n this.changeWorkflowStateDialogTitle = value;\r\n }\r\n\r\n public getTransitionConfirmationDialogMessage(): string {\r\n return this.transitionConfirmationDialogMessage;\r\n }\r\n public setTransitionConfirmationDialogMessage(value: string): void {\r\n this.transitionConfirmationDialogMessage = value;\r\n }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean {\r\n return this.takeUserToSiteHomePageAfterTransitionApplied;\r\n }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void {\r\n this.takeUserToSiteHomePageAfterTransitionApplied = value;\r\n }\r\n // End new HasIdAndName interface methods related to optional workflow transition customization.\r\n\r\n // Primitives.\r\n public name: string;\r\n\r\n public description: string; // Added 04-08-2022.\r\n \r\n public workflowId: number;\r\n public startStateId: number;\r\n public endStateId: number;\r\n\r\n //TEAMS-178: KLW - State orders needed for the workflow transition buttons\r\n public startStateSortOrder: number;\r\n public endStateSortOrder: number;\r\n public isCurrentState: boolean = false;\r\n\r\n public startStateName: string; // For save new workflows when state Ids have not yet been assigned.\r\n public endStateName: string; \r\n\r\n // Client-only keys (not saved in the database).\r\n public transientStartStateClientId: number = 0;\r\n public transientEndStateClientId: number = 0;\r\n public transientClientOrder: number;\r\n\r\n // Begin new properties related to https://maxjira.max.gov/browse/VNEXT-1337.\r\n public changeWorkflowStateDialogTitle: string; // If not set to a value, dialogue title \"Change Workflow State\" is used.\r\n public transitionConfirmationDialogMessage: string; // If not set to a value, confirmation message \"Are you sure you want to [current state] to [new state]?\" is used.\r\n\r\n public takeUserToSiteHomePageAfterTransitionApplied: boolean;\r\n // End new properties related to https://maxjira.max.gov/browse/VNEXT-1337.\r\n\r\n public transientStatesBeforeTransition: WorkflowState[];\r\n public transientStatesAfterTransition: WorkflowState[];\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return \"Workflow Transition Properties\";\r\n }\r\n\r\n // Collections.\r\n @Type(() => WorkflowTransitionPermission)\r\n public permissions: WorkflowTransitionPermission[];\r\n\r\n // Implement interface IHasWorkflowPermissions.\r\n public getPropertiesTitle(): string {\r\n let title: string = `Permissions: ${this.name}`;\r\n\r\n return (title);\r\n }\r\n\r\n // getPermissionNames(): returns the permission names show to a user.\r\n public getPermissionNames(): string[] {\r\n let names: string[] = [\r\n 'Transition'\r\n ];\r\n\r\n return (names);\r\n }\r\n\r\n // getPermissionFlagNames(): returns the name(s) of permission flags,\r\n // without the 'can' portion, applicable within this model class.\r\n public getPermissionFlagNames(): string[] {\r\n return (['Edit']);\r\n }\r\n\r\n public getSimplePermissionNames(): string[] {\r\n return (this.getPermissionNames());\r\n }\r\n\r\n public getPermissions(): WorkflowPermissionBase[] {\r\n // Make sure the following workflow state permissions\r\n // are set: workflowId, stateId, and stateName.\r\n if (this.permissions &&\r\n (this.permissions.length > 0) &&\r\n !this.permissions[0].transientParentPropertiesSet) {\r\n for (let iPermission: number = 0; iPermission < this.permissions.length; iPermission++) {\r\n let permission: WorkflowTransitionPermission = this.permissions[iPermission];\r\n\r\n permission.workflowId = this.workflowId;\r\n permission.transitionId = this.id;\r\n permission.transitionName = this.name;\r\n\r\n permission.transientParentPropertiesSet = true;\r\n }\r\n }\r\n\r\n // Return the permissions.\r\n return (this.permissions);\r\n }\r\n\r\n public get Permissions(): WorkflowPermissionBase[] {\r\n return (this.getPermissions());\r\n }\r\n\r\n public get PermissionCount(): number {\r\n let permissions: WorkflowPermissionBase[] = this.getPermissions();\r\n let permissionCount: number = (permissions != null ? permissions.length : 0);\r\n\r\n return (permissionCount);\r\n }\r\n\r\n public addPermission(permissionParam: WorkflowPermissionBase): boolean {\r\n let permission: WorkflowTransitionPermission = new WorkflowTransitionPermission();\r\n permission.workflowId = this.workflowId;\r\n permission.transitionId = this.id;\r\n permission.transitionName = this.name;\r\n permission.copyFieldsFrom(permissionParam);\r\n\r\n this.ensurePermissions();\r\n this.permissions.push(permission);\r\n\r\n return (true);\r\n }\r\n\r\n public updatePermission(permissionParam: WorkflowPermissionBase): boolean {\r\n this.ensurePermissions();\r\n\r\n let permissions: WorkflowTransitionPermission[] = this.permissions.filter(p => p.roleName == permissionParam.roleName);\r\n let bHavePermission: boolean = (permissions.length === 1);\r\n\r\n if (bHavePermission) {\r\n let permission: WorkflowTransitionPermission = permissions[0];\r\n permission.copyFieldsFrom(permissionParam);\r\n }\r\n\r\n return (bHavePermission);\r\n }\r\n\r\n public removePermission(permissionParam: WorkflowPermissionBase): boolean {\r\n this.ensurePermissions();\r\n\r\n let iNumPermissions = this.permissions.length;\r\n\r\n this.permissions = this.permissions.filter(p => p.roleName != permissionParam.roleName);\r\n\r\n return (this.permissions.length != iNumPermissions);\r\n }\r\n\r\n public replacePermissionsForRole(roleId: number, workflowTransitionPermissions: WorkflowTransitionPermission[]) {\r\n this.ensurePermissions();\r\n\r\n this.permissions = this.permissions.filter(p => p.roleId != roleId);\r\n for (let iPermission: number = 0; iPermission < workflowTransitionPermissions.length; iPermission++) {\r\n let workflowTransitionPermission: WorkflowTransitionPermission = workflowTransitionPermissions[iPermission];\r\n\r\n this.permissions.push(workflowTransitionPermission);\r\n }\r\n }\r\n\r\n // Implement ICloneAndCopy methods.\r\n public clone(): ICloneAndCopy {\r\n let clone: WorkflowTransition = new WorkflowTransition();\r\n\r\n clone.id = this.id;\r\n\r\n clone.name = this.name;\r\n clone.description = this.description;\r\n\r\n clone.workflowId = this.workflowId;\r\n\r\n clone.startStateId = this.startStateId;\r\n clone.endStateId = this.endStateId;\r\n\r\n //TEAMS-178: KLW - State orders for end and start states of the transition\r\n clone.startStateSortOrder = this.startStateSortOrder;\r\n clone.endStateSortOrder = this.endStateSortOrder;\r\n\r\n clone.startStateName = this.startStateName;\r\n clone.endStateName = this.endStateName;\r\n\r\n //clone.startStateClientId = this.startStateClientId;\r\n //clone.endStateClientId = this.endStateClientId;\r\n clone.transientStartStateClientId = this.transientStartStateClientId;\r\n clone.transientEndStateClientId = this.transientEndStateClientId;\r\n\r\n clone.permissions = [];\r\n if (this.permissions && (this.permissions.length > 0)) {\r\n for (let iPerm: number = 0; iPerm < this.permissions.length; iPerm++) {\r\n let permission: WorkflowTransitionPermission = this.permissions[iPerm];\r\n\r\n clone.permissions.push(permission);\r\n }\r\n }\r\n\r\n return (clone);\r\n }\r\n\r\n public copy(objectToCopyParam: ICloneAndCopy): void {\r\n let objectToCopy: WorkflowTransition = objectToCopyParam;\r\n\r\n this.id = objectToCopy.id;\r\n\r\n this.name = objectToCopy.name;\r\n this.description = objectToCopy.description;\r\n\r\n this.workflowId = objectToCopy.workflowId;\r\n\r\n this.startStateId = objectToCopy.startStateId;\r\n this.endStateId = objectToCopy.endStateId;\r\n\r\n this.startStateName = objectToCopy.startStateName;\r\n this.endStateName = objectToCopy.endStateName;\r\n\r\n //this.startStateClientId = objectToCopy.startStateClientId;\r\n //this.endStateClientId = objectToCopy.endStateClientId;\r\n this.transientStartStateClientId = objectToCopy.transientStartStateClientId;\r\n this.transientEndStateClientId = objectToCopy.transientEndStateClientId;\r\n\r\n this.permissions = [];\r\n if (objectToCopy.permissions && (objectToCopy.permissions.length > 0)) {\r\n for (let iPerm: number = 0; iPerm < objectToCopy.permissions.length; iPerm++) {\r\n let permission: WorkflowTransitionPermission = objectToCopy.permissions[iPerm];\r\n\r\n this.permissions.push(permission);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Implement private helper methods.\r\n private ensurePermissions(): void {\r\n if (!this.permissions) {\r\n this.permissions = [];\r\n }\r\n\r\n return;\r\n }\r\n}\r\n","import { Pipe, PipeTransform, SecurityContext } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';\r\n\r\n@Pipe({\n name: 'safe',\n standalone: false\n})\r\nexport class SafePipe implements PipeTransform {\r\n constructor(private sanitizer: DomSanitizer) { }\r\n public transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\r\n switch (type) {\r\n case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);\r\n case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);\r\n case 'script': return this.sanitizer.bypassSecurityTrustScript(value);\r\n case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);\r\n case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);\r\n default: throw new Error(`Invalid safe type specified: ${type}`);\r\n }\r\n }\r\n} \r\n","import { Injectable } from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';\r\nimport { environment } from '../../../environments/environment';\r\nimport { FieldDefinitionService } from '../services/field-definition.service';\r\nimport { FormInstanceService } from '../services/form-instance.service';\r\n\n@Injectable()\r\nexport class FormInstanceResolver implements Resolve {\r\n constructor(private formInstanceService: FormInstanceService,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private readonly titleService: Title) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\n if (this.isFormInstance(state.url)) {\r\n // Make sure field definitions have been\r\n // loaded before loading the form instance.\r\n // 11-10-2022 note: need to find a simpler way to load all field definition objects from the server.\r\n return this.fieldDefinitionService.getAll().then(ignoredResponse => {\r\n return this.loadFormInstanceContent(state);\r\n });\r\n //return null;\n }\n return null;\r\n }\n\n private isFormInstance(url): boolean {\n return url.indexOf('/form/') > -1 || url.indexOf('/version/') > -1;\r\n }\r\n\r\n private getIdAndVersion(url: string): any {\r\n let ret = {};\r\n let segments = url.split('/');\r\n let lastSeg = segments[segments.length - 1].split('?');\r\n ret['id'] = +lastSeg[0];\r\n if (lastSeg.length == 2) {\r\n ret['isVersion'] = lastSeg[1].indexOf('true') > -1; // TODO: clean this up\r\n }\r\n return ret;\r\n }\n\n private getIdFromUrl(url: string): number {\n let segments = url.split('/');\n return +segments[segments.length - 1];\r\n }\r\n\r\n private loadFormInstanceContent(state: RouterStateSnapshot): Promise {\r\n let obj = this.getIdAndVersion(state.url);\r\n let id = obj.id;\r\n let isVersion = obj.isVersion;\r\n return this.formInstanceService.getContent(id, isVersion).then(response => {\r\n if (response && response.name) {\r\n this.titleService.setTitle(environment.sitename + ' - ' + response.name);\r\n }\n return response;\n });\r\n }\r\n}\n","import { Injectable } from '@angular/core';\nimport { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\nimport { FormInstanceService } from '../services/form-instance.service';\r\nimport { SiteResponseManagementService } from '../services/site-response-management.service';\r\n\n@Injectable()\r\nexport class SiteResponseManagementResolver implements Resolve {\r\n constructor(private siteResponseManagementService: SiteResponseManagementService,\n private formInstanceService: FormInstanceService,\n private router: Router) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\n // Get the site's data collection ID.\n let dataCollectionId = route.params['id']; // Get the data collection ID.\n\n if ((dataCollectionId === undefined) || (dataCollectionId === null) || (dataCollectionId.toString().trim() === '')) {\n dataCollectionId = '4'; // This is the ID of an existing data collection\n // --need to remove this code after testing!!!\n }\n\n // Get a form instance ID (for initial form instance testing only -- REMOVE AFTER TESTING).\n //let formInstanceId = route.params['id'];\n /*\n let formInstanceId = null;\n\n if ((formInstanceId === undefined) || (formInstanceId === null) || (formInstanceId.toString().trim() === '')) {\n formInstanceId = '11'; // This is the ID of an existing form.\n }\n */\n\n /*\n return this.formInstanceService.get(id).then(response => {\n return response;\n });\n */\n\n return this.siteResponseManagementService.get(dataCollectionId).then(response => {\n return (response);\r\n })\r\n }\r\n}\n","import { Injectable } from '@angular/core';\nimport { Router, Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\nimport { WorkflowService } from '../services/workflow.service';\r\n\n@Injectable()\r\nexport class WorkflowResolver implements Resolve {\r\n constructor(private workflowService: WorkflowService, private router: Router) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {\r\n let id = route.params['id'];\n\n return this.workflowService.get(id).then(response => {\n return response;\n });\r\n }\r\n}\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"changeSet\": \"8057\",\n \"buildNumber\": \"16505\",\n \"buildJob\": \"Collect.vNext.UI\",\n \"buildAgent\": \"TFS\",\n \"buildTime\": \"03/21/2025 16:05:51\"\n};\n/* tslint:enable */\n","import { BuildInfo } from './build-info.model';\r\n\r\nexport class AppBuildInfo {\r\n appBuildInfo: { \"changeSet\": string; \"buildNumber\": string; \"buildJob\": string; \"buildAgent\": string; \"buildTime\": string; };\r\n public apiBuildInfo: any;\r\n public webBuildInfo: any;\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpResponse, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { VERSION } from \"../../../environments/version\";\r\nimport { AppBuildInfo} from '../models/admin/app-build-info.model';\nimport { BuildInfo } from '../models/admin/build-info.model';\r\n\r\n@Injectable()\r\nexport class AdminService {\r\n\r\n private buildInfoUrl = \"\";\r\n\r\n\r\n constructor(private http: HttpClient) {\r\n this.buildInfoUrl = environment.apiUrl + \"/frameworkapi/buildinfo\";\r\n }\r\n\r\n public get appBuildInfo(): Promise {\r\n return this.http.get(this.buildInfoUrl)\r\n .toPromise()\r\n .then((response: BuildInfo) => {\r\n let abi = new AppBuildInfo();\r\n abi.apiBuildInfo = response;\r\n abi.webBuildInfo = VERSION;\r\n return abi;\r\n })\r\n .catch((error: Response) => {\r\n return this.handleError(error); //\"Can't get the API configuration at \" + this.baseUrl;\r\n });\r\n }\r\n\r\n private handleError(error: any): Promise {\r\n return Promise.reject(error.message || error);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { Injectable } from '@angular/core';\r\nimport { plainToClass } from \"class-transformer\";\r\n\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\r\n@Injectable()\r\nexport class AsyncJobService extends CollectApiServiceBase {\n // Properties.\r\n //private exportDataTimeout: number = 0;\r\n //private exportDataTimeout: NodeJS.Timeout = null;\r\n\r\n // Constructor.\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'asyncjob', AsyncJob)\n }\r\n\r\n public getJob(jobKey: string): Promise {\r\n var url = `${this.url}/${this.endpoint}/${jobKey}`;\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\n return this.formatResponse(response);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateJob(asyncJob: AsyncJob): Promise {\r\n var url = `${this.url}/${this.endpoint}/update`;\r\n\r\n return this.http.put(url, asyncJob)\r\n .toPromise()\r\n .then(response => {\r\n return this.formatResponse(response);\r\n //let result = plainToClass(AsyncJob, response);\r\n //return result;\r\n });\r\n }\r\n\r\n public monitorJobUntilCompletion(asyncJob: AsyncJob, timeoutDuration: number, callbackArrowFunction: any): void {\r\n //let exportDataTimeout: number = 0;\r\n let jobCompleted: boolean = false;\r\n\r\n let exportDataTimeout = setInterval(() => {\r\n this.getJob(asyncJob.jobKey).then(updatedAsyncJob => {\r\n if ((!jobCompleted) && (updatedAsyncJob.status == AsyncJob.STATUS_COMPLETE)) {\r\n jobCompleted = true;\r\n\r\n callbackArrowFunction(asyncJob, true);\r\n } else if ((!jobCompleted) && (updatedAsyncJob.status == AsyncJob.STATUS_COMPLETE_ERROR)) {\r\n jobCompleted = true; \r\n }\r\n\r\n if (jobCompleted)\r\n //clearInterval(this.exportDataTimeout);\r\n clearInterval(exportDataTimeout);\r\n });\r\n }, timeoutDuration);\r\n }\n}\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpClient,\r\n HttpRequest,\r\n HttpEventType,\r\n HttpResponse,\r\n HttpHeaders,\r\n HttpEvent\r\n} from '@angular/common/http';\r\nimport {\r\n Subject,\r\n Observable\r\n} from 'rxjs';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport {\r\n AttachmentCheckoutInfo,\r\n AttachmentStatus,\r\n AttachmentInfoWithUrls\r\n} from '../models/attachment/attachment-info-with-urls.model';\r\nimport { Attachment, AttachmentProperties } from '../models/attachment/attachment.model';\r\nimport { plainToClass } from \"class-transformer\";\r\nimport { AttachmentStatusAndHistory } from '../models/attachment/attachment-status-and-history.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\r\n// Note: the code in this service was derived from the following tutorial:\r\n// https://malcoded.com/posts/angular-file-upload-component-with-express/.\r\n\r\n// Define a file upload progress class.\r\nexport class FileUploadProgress {\r\n // Progress information.\r\n public fileName: string;\r\n public progressValue: number = 0;\r\n public callerData: any;\r\n\r\n // Saved/uploaded file info.\r\n /*\r\n public id: number;\r\n public clientFileName: string;\r\n public fileMimeType: string;\r\n public fileSize: number;\r\n public createdDate: string;\r\n */\r\n public attachInfoWithUrls: AttachmentInfoWithUrls = null;\r\n}\r\n\r\n// Export a progress hash class.\r\nexport interface IFileUploadProgressHash {\r\n //[fileName: string]: { progress: Observable };\r\n [fileName: string]: { progress: Observable };\r\n}\r\n\r\n// Define an internally used class.\r\nclass FileUploadSubject extends Subject {\r\n // Properties.\r\n private fileName: string;\r\n\r\n // Constructor.\r\n constructor(fileNameParam: string) {\r\n super();\r\n\r\n this.fileName = fileNameParam;\r\n\r\n return;\r\n }\r\n\r\n // Methods.\r\n public get FileName(): string {\r\n return (this.fileName);\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class AttachmentService extends CollectApiServiceBase {\r\n \r\n public reorderAttachments(attachmentsInDesiredOrder: AttachmentInfoWithUrls[]) {\r\n var url = `${this.url}/${this.endpoint}/reorderAttachments/`;\r\n return this.http.post(url, attachmentsInDesiredOrder)\r\n .toPromise()\r\n .then(members => {\r\n return members;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Constructor.\r\n constructor(http: HttpClient,\r\n public progressIndicatorService: ProgressIndicatorService\r\n ) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'attachment', Attachment)\r\n\r\n return;\r\n }\r\n\r\n public viewFile(id: number): string {\r\n var url = `${this.url}/${this.endpoint}/view/${id}`;\r\n return url;\r\n }\r\n\r\n // Custom service methods.\r\n public uploadFiles(formInstanceElementId: number, attachmentId: number, files: Set, optionalCallerData = null) {\r\n // this will be the our resulting map\r\n const status: IFileUploadProgressHash = {};\r\n const titles = optionalCallerData?.Titles;\r\n let i = 0;\r\n files.forEach(file => {\r\n // create a new multipart-form for every file\r\n const formData: FormData = new FormData();\r\n formData.append('file', file, file.name);\r\n formData.append('title', titles[i]);\r\n i++;\r\n\r\n // create a http-post request and pass the form\r\n // tell it to report the upload progress\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n\r\n // Construct the URL.\r\n var url = `${this.url}/${this.endpoint}/uploadFiles/${formInstanceElementId}/${attachmentId}`;\r\n\r\n // Issue the request.\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n headers: httpHeaders\r\n });\r\n\r\n // create a new progress-subject for every file\r\n //const progress = new Subject();\r\n //const progress = new Subject();\r\n const progress = new FileUploadSubject(file.name);\r\n\r\n // send the http-request and subscribe for progress-updates\r\n this.http.request(req).subscribe(event => {\r\n if (event.type === HttpEventType.UploadProgress) {\r\n\r\n // calculate the progress percentage\r\n const percentDone = Math.round(100 * event.loaded / event.total);\r\n\r\n // pass the percentage into the progress-stream\r\n var fileUploadProgress = new FileUploadProgress();\r\n fileUploadProgress.fileName = progress.FileName;\r\n fileUploadProgress.progressValue = percentDone;\r\n fileUploadProgress.callerData = optionalCallerData;\r\n //progress.next(percentDone);\r\n\r\n progress.next(fileUploadProgress);\r\n } else if ((event.type === HttpEventType.Sent) ||\r\n (event.type === HttpEventType.ResponseHeader) ||\r\n (event.type === HttpEventType.DownloadProgress)) {\r\n var consoleMsg: string =\r\n `AttachmentService.upload(): received an event of type ${event.type}.`;\r\n console.log(consoleMsg);\r\n } else if (event instanceof HttpResponse) {\r\n // Close the progress-stream if we get an answer form the API\r\n // The upload is complete\r\n var fileUploadProgress = new FileUploadProgress();\r\n fileUploadProgress.fileName = progress.FileName;\r\n fileUploadProgress.progressValue = 100;\r\n fileUploadProgress.callerData = optionalCallerData;\r\n\r\n var attachmentEntry: AttachmentInfoWithUrls = null;\r\n var arrAttachmentInfo: AttachmentInfoWithUrls[] =\r\n event.body;\r\n if (arrAttachmentInfo && (arrAttachmentInfo.length > 0)) {\r\n var arrAttachmentEntry: AttachmentInfoWithUrls[] =\r\n arrAttachmentInfo.filter(ai => ai?.fileName == progress?.FileName);\r\n\r\n if (arrAttachmentEntry && (arrAttachmentEntry.length == 1)) {\r\n attachmentEntry = arrAttachmentEntry[0];\r\n }\r\n }\r\n\r\n if (attachmentEntry != null) {\r\n fileUploadProgress.attachInfoWithUrls = attachmentEntry;\r\n }\r\n\r\n progress.next(fileUploadProgress);\r\n\r\n progress.complete();\r\n } else {\r\n console.log(\"AttachmentService.upload(): received an event of an unknown type.\")\r\n }\r\n });\r\n\r\n // Save every progress-observable in a map of all observables\r\n status[file.name] = {\r\n progress: progress.asObservable()\r\n };\r\n });\r\n\r\n // return the map of progress.observables\r\n return (status);\r\n }\r\n\r\n //public upload(files: Set): { [key: string]: { progress: Observable } } {\r\n public upload(files: Set, optionalCallerData = null): IFileUploadProgressHash {\r\n // this will be the our resulting map\r\n //const status: { [key: string]: { progress: Observable } } = {};\r\n const status: IFileUploadProgressHash = {};\r\n\r\n var url = `${this.url}/${this.endpoint}/upload`;\r\n\r\n files.forEach(file => {\r\n // create a new multipart-form for every file\r\n const formData: FormData = new FormData();\r\n formData.append('file', file, file.name);\r\n\r\n // create a http-post request and pass the form\r\n // tell it to report the upload progress\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n //httpHeaders.append('fileName', file.name);\r\n\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n // create a new progress-subject for every file\r\n //const progress = new Subject();\r\n //const progress = new Subject();\r\n const progress = new FileUploadSubject(file.name);\r\n\r\n // send the http-request and subscribe for progress-updates\r\n this.http.request(req).subscribe(event => {\r\n if (event.type === HttpEventType.UploadProgress) {\r\n\r\n // calculate the progress percentage\r\n const percentDone = Math.round(100 * event.loaded / event.total);\r\n\r\n // pass the percentage into the progress-stream\r\n var fileUploadProgress = new FileUploadProgress();\r\n fileUploadProgress.fileName = progress.FileName;\r\n fileUploadProgress.progressValue = percentDone;\r\n fileUploadProgress.callerData = optionalCallerData;\r\n //progress.next(percentDone);\r\n\r\n progress.next(fileUploadProgress);\r\n } else if ((event.type === HttpEventType.Sent) ||\r\n (event.type === HttpEventType.ResponseHeader) ||\r\n (event.type === HttpEventType.DownloadProgress)) {\r\n var consoleMsg: string =\r\n `AttachmentService.upload(): received an event of type ${event.type}.`;\r\n console.log(consoleMsg);\r\n } else if (event instanceof HttpResponse) {\r\n // Close the progress-stream if we get an answer form the API\r\n // The upload is complete\r\n var fileUploadProgress = new FileUploadProgress();\r\n fileUploadProgress.fileName = progress.FileName;\r\n fileUploadProgress.progressValue = 100;\r\n fileUploadProgress.callerData = optionalCallerData;\r\n\r\n var responseBody = event.body;\r\n\r\n /*\r\n fileUploadProgress.id = responseBody['id'];\r\n fileUploadProgress.clientFileName = responseBody['clientFileName'];\r\n fileUploadProgress.fileMimeType = responseBody['fileMimeType'];\r\n fileUploadProgress.fileSize = responseBody['fileSize'];\r\n fileUploadProgress.createdDate = responseBody['createdDate'];\r\n */\r\n var attachmentEntry: AttachmentInfoWithUrls = null;\r\n var arrAttachmentInfo: AttachmentInfoWithUrls[] =\r\n event.body;\r\n if (arrAttachmentInfo && (arrAttachmentInfo.length > 0)) {\r\n var arrAttachmentEntry: AttachmentInfoWithUrls[] =\r\n arrAttachmentInfo.filter(ai => ai.fileName == progress.FileName);\r\n\r\n if (arrAttachmentEntry && (arrAttachmentEntry.length == 1)) {\r\n attachmentEntry = arrAttachmentEntry[0];\r\n }\r\n }\r\n\r\n if (attachmentEntry != null) {\r\n fileUploadProgress.attachInfoWithUrls = attachmentEntry;\r\n }\r\n\r\n progress.next(fileUploadProgress);\r\n\r\n progress.complete();\r\n } else {\r\n console.log(\"AttachmentService.upload(): received an event of an unknown type.\")\r\n }\r\n });\r\n\r\n // Save every progress-observable in a map of all observables\r\n status[file.name] = {\r\n progress: progress.asObservable()\r\n };\r\n });\r\n\r\n // return the map of progress.observables\r\n return (status);\r\n }\r\n\r\n // disabling does not hide it from the application\r\n public disableAttachment(attachmentId: number, appliesToAllVersions: boolean = false): Promise {\r\n var url = `${this.url}/${this.endpoint}/disable/${attachmentId}?appliesToAllVersions=${appliesToAllVersions}`;\r\n return this.http.delete(url).toPromise().then(res => {\r\n return res;\r\n });\r\n }\r\n\r\n // disabling does not hide it from the application\r\n public restoreAttachment(attachmentId: number, appliesToAllVersions: boolean = false): Promise {\r\n var url = `${this.url}/${this.endpoint}/enable/${attachmentId}?appliesToAllVersions=${appliesToAllVersions}`;\r\n return this.http.put(url, {}).toPromise().then(res => {\r\n return res;\r\n });\r\n }\r\n\r\n //This does an actual delete (in the sense that it sets IsDeleted and hides it from the application)\r\n public deleteAttachment(dataCollectionId: number,\r\n folderId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n fileName: string): Promise {\r\n\r\n var url = `${this.url}/${this.endpoint}/delete/${dataCollectionId}/${folderId}/${formInstanceId}/${formFieldId}/${fileName}`;\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n\r\n const req = new HttpRequest('POST', url, {\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, req).toPromise().then(event => {\r\n if (event == 'true')\r\n return true;\r\n else\r\n return false;\r\n });\r\n }\r\n\r\n public setCustomProperties(dataCollectionId: number,\r\n folderId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n attachmentName: string,\r\n customProps: AttachmentProperties): Promise {\r\n var url = `${this.url}/${this.endpoint}/setCustomProperties/${dataCollectionId}/${folderId}/${formInstanceId}/${formFieldId}/${attachmentName}`;\r\n\r\n return this.http.put(url, customProps)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateDescription(dataCollectionId: number,\r\n folderId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n attachmentName: string,\r\n newDescription: string) {\r\n var url = `${this.url}/${this.endpoint}/updateDescription/${dataCollectionId}/${folderId}/${formInstanceId}/${formFieldId}/${attachmentName}/${newDescription}`;\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n\r\n const req = new HttpRequest('POST', url, {\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, req).toPromise().then(event => {\r\n if (event == 'true')\r\n return true;\r\n else\r\n return false;\r\n });\r\n }\r\n\r\n public renameAttachment(dataCollectionId: number,\r\n folderId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n attachmentName: string,\r\n newAttachmentName: string): Promise {\r\n\r\n var url = `${this.url}/${this.endpoint}/rename/${dataCollectionId}/${folderId}/${formInstanceId}/${formFieldId}/${attachmentName}/${newAttachmentName}`;\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n\r\n const req = new HttpRequest('POST', url, {\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, req).toPromise().then(event => {\r\n if (event == 'true')\r\n return true;\r\n else\r\n return false;\r\n });\r\n }\r\n\r\n //TEAMS-424: KLW - new method to get all attachment history and status\r\n public getAttachmentHistories(dataCollectionId: number,\r\n folderId: number,\r\n formInstanceId: number,\r\n formFieldId: number): Promise {\r\n\r\n var url = `${this.url}/${this.endpoint}/histories/${dataCollectionId}/${folderId}/${formInstanceId}/${formFieldId}`;\r\n\r\n return this.http.get(url).toPromise().then(response => {\r\n if (response)\r\n return response;\r\n else\r\n return null;\r\n });\r\n }\r\n\r\n //TEAMS-424: KLW - new method to see if the attachment service should actually use attachments.\r\n public getCanUseAttachments(): Promise {\r\n\r\n var url = `${this.url}/${this.endpoint}/GetCanUseAttachments/`;\r\n\r\n return this.http.get(url).toPromise().then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n formatResponse(data: Attachment): Attachment {\r\n var obj = plainToClass(Attachment, data);\r\n\r\n return (obj);\r\n }\r\n\r\n save(data: Attachment): Promise {\r\n console.log(data.id);\r\n if (data.id > 0) {\r\n return (this.update(data));\r\n } else\r\n return (this.create(data));\r\n }\r\n}\r\n","import {\r\n HttpClient\r\n} from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, EMPTY } from 'rxjs';\r\nimport { environment } from '../../../environments/environment';\r\nimport { IAutoCompleteItemData } from '../interfaces/iautocomplete-item-data.interface';\r\nimport { IAutoCompleteServiceCall } from '../interfaces/iautocomplete-service-call.interface';\r\nimport { Logging } from '../logging';\r\nimport { FieldIdToSelectedValues, FlexibleSelectionFieldInstructionsRequest } from '../models/flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\n\r\n@Injectable()\r\nexport class AutocompleteService // extends CollectApiServiceBase {\r\n{\r\n constructor(private http: HttpClient) {\r\n }\r\n\r\n public isSearching = new BehaviorSubject(false);\r\n public totalCount: number = 0;\r\n\r\n\r\n private lastCallToSearch: number;\r\n private lastResultOfSearch: any;\r\n public search(\r\n query: string,\r\n max: number = 10,\r\n selectedItems: string[],\r\n fie_id: number,\r\n flexSelectRequest: FlexibleSelectionFieldInstructionsRequest\r\n ): Promise {\r\n // prevent double hits to the server (two calls were coming into this method milliseconds apart - I don't know why)\r\n //let millisecondsSinceLastCall = this.lastCallToSearch ? (Date.now() - this.lastCallToSearch) : 101;\r\n //this.lastCallToSearch = Date.now();\r\n //if (millisecondsSinceLastCall < 101) {\r\n // console.log(`return this.lastResultOfSearch (${this.lastResultOfSearch})`);\r\n // return this.lastResultOfSearch;\r\n //} else if ((!query) || (query.length == 0)) {\r\n // return EMPTY.toPromise();\r\n //}\r\n\r\n this.isSearching.next(true);\r\n\r\n var url = `${environment.apiUrl}/api/autocomplete/search/${fie_id}/${query}/${max}`;\r\n\r\n let request = null;\r\n if (flexSelectRequest) {\r\n request = this.http.post(url, flexSelectRequest);\r\n } else {\r\n request = this.http.get(url);\r\n }\r\n\r\n return request\r\n .toPromise()\r\n .then(response => {\r\n var data: IAutoCompleteItemData[] = [];\r\n\r\n response.startsWithResults.forEach(x => {\r\n\r\n var isSelected: boolean = selectedItems.filter(y => y == x).length > 0;\r\n\r\n data.push({ item: x, selected: isSelected } as IAutoCompleteItemData);\r\n });\r\n\r\n response.containsResults.forEach(x => {\r\n\r\n var isSelected: boolean = selectedItems.filter(y => y == x).length > 0;\r\n\r\n data.push({ item: x, selected: isSelected } as IAutoCompleteItemData);\r\n });\r\n\r\n //VNEXT-558: KLW - Implement sorting options by ascending order\r\n data.sort();\r\n\r\n this.isSearching.next(false);\r\n this.totalCount = response.totalCount;\r\n this.lastResultOfSearch = data;\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public startsWith(query: string, max: number = 10, selectedItems: string[], fie_id: number): Promise {\r\n if ((!query) || (query.length == 0)) { return EMPTY.toPromise(); }\r\n\r\n this.isSearching.next(true);\r\n\r\n var url = `${environment.apiUrl}/api/autocomplete/startswith/${fie_id}/${query}/${max}`;\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n var data: IAutoCompleteItemData[] = [];\r\n\r\n response.startsWithResults.forEach(x => {\r\n\r\n var isSelected: boolean = selectedItems.filter(y => y == x).length > 0;\r\n\r\n data.push({ item: x, selected: isSelected } as IAutoCompleteItemData);\r\n });\r\n\r\n //VNEXT-558: KLW - Implement sorting options by ascending order\r\n data.sort();\r\n\r\n this.isSearching.next(false);\r\n this.totalCount = response.totalCount;\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n contains(query: string, max: number = 10, selectedItems: string[], fie_id: number): Promise {\r\n if ((!query) || (query.length == 0)) { return EMPTY.toPromise(); }\r\n\r\n this.isSearching.next(true);\r\n\r\n var url = `${environment.apiUrl}/api/autocomplete/contains/${fie_id}/${query}/${max}`;\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n var data: IAutoCompleteItemData[] = [];\r\n\r\n response.containsResults.forEach(x => {\r\n\r\n var isSelected: boolean = selectedItems.filter(y => y == x).length > 0;\r\n\r\n data.push({ item: x, selected: isSelected } as IAutoCompleteItemData);\r\n });\r\n\r\n //VNEXT-558: KLW - Implement sorting options by ascending order\r\n data.sort();\r\n\r\n this.isSearching.next(false);\r\n this.totalCount = response.totalCount;\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n handleError(error: Response | any): Promise {\r\n Logging.log(error);\r\n return Promise.reject(error.message || error);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core'; \r\n\r\n@Injectable()\r\nexport class BrowserStorageService {\r\n static readonly SESSION_SCOPE: number = 0;\r\n static readonly LOCAL_SCOPE: number = 1;\r\n\r\n public set(key: string, value: string, storageScope: number = BrowserStorageService.LOCAL_SCOPE): any {\r\n if (storageScope == BrowserStorageService.SESSION_SCOPE) {\n sessionStorage.setItem(key, value);\r\n } else {\n localStorage.setItem(key, value);\r\n }\r\n }\n\r\n /** Returns the string value from the indicated store, or null if the key does not exist. */\r\n public get(key: string, storageScope: number = BrowserStorageService.LOCAL_SCOPE): any {\r\n if (storageScope == BrowserStorageService.SESSION_SCOPE) {\n return sessionStorage.getItem(key);\r\n } else {\n return localStorage.getItem(key);\r\n }\r\n }\r\n\r\n public delete(key: string, storageScope: number = BrowserStorageService.LOCAL_SCOPE): void {\r\n if (storageScope == BrowserStorageService.SESSION_SCOPE) {\n sessionStorage.removeItem(key);\r\n } else {\n localStorage.removeItem(key);\r\n }\r\n }\r\n}\r\n","// Service that gets claims for the currently logged-in user, which are used for show/hide logic and to guard routes\nimport { Injectable } from '@angular/core';\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { UserClaims } from '../models/user-claims.model';\r\nimport { environment } from '../../../environments/environment';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Logging } from '../logging';\r\nimport { CurrentUserService } from '../../security/current-user.service';\r\nimport { CurrentUser } from '../../security/current-user.model';\r\nimport { DataCollectionService } from './data-collection.service';\r\nimport { User } from '../components/site-editor/site-editor.component';\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ClaimService {\n\n constructor(\n private currentUserService: CurrentUserService,\n private dataCollectionService: DataCollectionService) {\n \r\n }\n\n // Returns a Promise which resolves to a UserClaims object which the call can use to\n // test for presence of specific claims\n // Used by show/hide logic\n public getClaims(): Promise {\r\n return new Promise((resolve, reject) => {\r\n //return resolve(\r\n this.currentUserService.loginPromise.then(user => {\r\n if (this.dataCollectionService.currentSite != null) {\r\n return this.dataCollectionService.currentSite.then(site => {\r\n let claims = this.buildClaims(user, site);\r\n return resolve(claims);\r\n });\r\n } else {\r\n let claims = this.buildClaims(user);\r\n return resolve(claims);\r\n }\r\n })\r\n //);\r\n });\r\n }\r\n\n // Returns a Promise resolving to true if the current user has the claim passed, false otherwise\n // Used by Route Guards\n public has(requiredClaim: string, site: DataCollection = null): Promise {\n return new Promise((resolve, reject) => {\n // TODO: THIS IS TEMPORARY, REMOVE IT AFTER DEV\n // console.log(\"MESSAGE FROM ClaimService: userGrantedAllClaims?...\" + environment.userGrantedAllClaims);\n if (environment.userGrantedAllClaims) {\n //console.warn(\"WARNING: ClaimService.has() is using environment.userGrantedAllClaims...\")\n return resolve(true);\r\n }\r\n if (requiredClaim == \"CanViewSitePermissions\" && site && site.currentUserCanSeeSimplePermissions) {\r\n return resolve(true);\r\n }\r\n\r\n return resolve(\n this.currentUserService.loginPromise.then(user => {\n let claims = this.buildClaims(user, site);\n return claims.has(requiredClaim);\n })\n );\n });\r\n }\n\n // Takes a CurrentUser object and uses it to build and return a UserClaims object\n private buildClaims(user: CurrentUser, site: DataCollection = null): UserClaims {\n if (user.hasAccessibleSites == null) {\r\n // 01-11-2021 note: disabling after discussing via email with Paul.\r\n // Setting accessibleSites, a boolean, to true,\r\n // but the user might still have access to zero sites.\r\n /*\n this.dataCollectionService.CountAccessibleSites().then(x => {\n user.accessibleSites = (x > 0);\n });\r\n */\r\n user.accessibleSites = true;\r\n }\n\n var claims = new UserClaims(user, site);\n claims.id = 1; // what's this for?\n return claims;\r\n }\n\n}\n","import { HttpClient } from '@angular/common/http';\r\n//import { Observable } from 'rxjs';\r\nimport { IOperationCompletedCallback } from '../interfaces/ioperation-completed.intefaces';\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { Logging } from '../logging';\r\nimport { QueryOptions } from '../query-options';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\n \r\nexport class CollectApiServiceBase {\r\n // Properties.\r\n private operationCompletedCallbacks: IOperationCompletedCallback[] = [];\r\n private logDebugMessages: boolean = false;\r\n\r\n public constructor(\r\n public http: HttpClient,\r\n public progressIndicatorService: ProgressIndicatorService,\r\n public url: string,\r\n public endpoint: string,\r\n private TCreator: { new(): T; }) {\r\n\r\n this.url = (url.endsWith('/') ? url.slice(0, -1) : url) + '/api';\r\n }\r\n\r\n public getAll(queryOptions?: QueryOptions): Promise {\r\n let url = `${this.url}/${this.endpoint}`;\r\n\r\n if (queryOptions)\r\n url += `?${queryOptions.toQueryString()}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let data: T[] = [];\r\n\r\n response.forEach(x => {\r\n let obj = this.formatResponse(x);\r\n data.push(obj);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n this.getAllResponseReady(data);\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n protected getAllResponseReady(response: T[]): void {\r\n // Note: this default method implementation is a NOOP by design.\r\n }\r\n\r\n protected operationCompleted(operationName: string): void {\r\n // Note: this method can be overriden by derived classes.\r\n }\r\n\r\n public create(item: T, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}`;\r\n let msg = progressConfig.msgDuring || this.progressMsg('Creating');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.post(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n msg = progressConfig.msgOnComplete || this.progressMsg('Created');\r\n this.updateProgress(100, 100, msg);\r\n this.operationCompleted('create');\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public get(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${id}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let obj = this.formatResponse(response);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public update(item: T, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/${item.id}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Updating');\r\n this.updateProgress(50, 75, msg);\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let obj = this.formatResponse(response);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n this.operationCompleted('update');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateIsFavorite(item: T, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/UpdateIsFavorite/${item.id}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Updating is favorite');\r\n this.updateProgress(50, 75, msg);\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let obj = this.formatResponse(response);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public delete(id: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Deleting');\r\n this.updateProgress(50, 75, msg);\r\n return this.http.delete(`${this.url}/${this.endpoint}/${id}`)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Deleted');\r\n this.updateProgress(100, 100, msg);\r\n return id;\r\n }).catch(this.handleError);\r\n }\r\n\r\n // Override to fully instantiate child objects. Be sure to call super.formatResponse first to instantiate the parent object.\r\n public formatResponse(data: T): T {\r\n return Object.assign(new this.TCreator(), data);\r\n }\r\n\r\n public handleError(error: Response | any): Promise {\r\n Logging.log(error);\r\n if (this != null) {\r\n this.hideProgressIndicator();\r\n }\r\n return Promise.reject(error.message || error);\r\n }\r\n\r\n // Implement inteface IRegisterOperationCompleted.\r\n public registerOperationCompletedCallback(callback: IOperationCompletedCallback): void {\r\n // See if this callback is already registered.\r\n let alreadyRegisteredCallback: IOperationCompletedCallback = this.operationCompletedCallbacks.find(cb => cb == callback);\r\n\r\n if (alreadyRegisteredCallback == null)\r\n this.operationCompletedCallbacks.push(callback);\r\n }\r\n\r\n // This can be overridden in sub-classes as needed\r\n protected progressMsg(verb: string, entity: string = this.endpoint): string {\r\n let ending = verb.endsWith('ing') ? '...' : '.';\r\n let a = verb == 'Creating' ? ' a ' : ' ';\r\n return `${verb}${a}${entity}${ending}`;\r\n }\r\n // Define protected helper methods.\r\n protected reportResponseTime(lStartTime: number, lEndTime: number, url: string): void {\r\n let lElapsedTimeInMilliseconds: number = (lEndTime - lStartTime);\r\n\r\n if (this.logDebugMessages) {\r\n let message: string = `reportResponseTime(): call to url '${url}' ` + `took ${lElapsedTimeInMilliseconds} milliseconds.`;\r\n console.log(message);\r\n }\r\n\r\n return;\r\n }\r\n\r\n protected reportFormatTime(lStartTime: number, lEndTime: number, url: string): void {\r\n let lElapsedTimeInMilliseconds: number = (lEndTime - lStartTime);\r\n\r\n if (this.logDebugMessages) {\r\n let message: string = `reportFormatTime(): parsing the response from url '${url}' ` + `took ${lElapsedTimeInMilliseconds} milliseconds.`;\r\n console.log(message);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // delegates to service after null guard\r\n protected updateProgress(statusValue: number, bufferValue: number, statusText: string): void {\r\n if (this.progressIndicatorService != null) {\r\n this.progressIndicatorService.updateProgress(statusValue, bufferValue, statusText);\r\n }\r\n }\r\n\r\n // delegates to service after null guard\r\n protected hideProgressIndicator(): void {\r\n if (this.progressIndicatorService != null) {\r\n this.progressIndicatorService.hideProgress();\r\n }\r\n }\r\n\r\n protected notifyAnyCallbacksOperationCompleted(operationName: string): void {\r\n for (let index: number = 0; index < this.operationCompletedCallbacks.length; index++) {\r\n let callback: IOperationCompletedCallback = this.operationCompletedCallbacks[index];\r\n callback.operationCompleted(operationName);\r\n }\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { GridFieldEditorComponent } from '../components/form-fields/grid-field-editor/grid-field-editor.component';\r\n\n// A general purpose service for communicating across components within the UI\r\n@Injectable()\r\nexport class CommunicationService {\n\r\n // Pharvey - 6/3/2024 - added for VNEXT-1294 to allow any unsaved changes in grids to be saved to pending before the form as a whole is saved\r\n private gridComponents: GridFieldEditorComponent[] = [];\r\n\n constructor() { }\n\n // The \"Skip Navigation\" link (an accessibility measure) is in the top-level component\n // and in order for it to be kept up to date, lower-level components need to notify\n // that it has changed.\r\n private skipNavLinkSubject = new Subject();\n\n // This is what AppComponent subscribes to (see its constructor)\n public skipLinkChanged = this.skipNavLinkSubject.asObservable();\n\n // Called by components needing to notify that the skip link's url has changed\n // TODO: consider removing this and calls to it -- may not need to do this if skip to can be set\n // during initialization of AppComponent...\n public emitChangeToSkipNavLink(newLink: string, target: string = null) {\n newLink = newLink.split('#')[0]; // strip off anchor if present\n target = target == null ? \"#main-content\" : target;\n newLink = `${newLink}${target}`;\n this.skipNavLinkSubject.next(newLink);\r\n }\r\n\r\n // PHarvey - 6/3/2024 - for VNEXT-1294\r\n // I was going to put these methods in KendoGridService BUT that service is scoped\r\n // to each individual Grid and is not a singleton - I thought it would be confusing to also\r\n // have a singleton instance of it, so I placed them here in this generic service\r\n // (Perhaps it should go in a new, dedicated service?)\r\n public registerGrid(gridFieldEditorComponent: GridFieldEditorComponent) {\r\n this.gridComponents.push(gridFieldEditorComponent);\r\n }\r\n\r\n // Returns a Promise for all registered grids on a given Form. Each one is given the opportunity to save any unsaved rows.\r\n // The caller of this method can then wait for all of them to complete\r\n public saveAnyUnsavedGridData(): Promise {\r\n let promises = [];\r\n for (let grid of this.gridComponents) {\r\n promises.push(grid.saveAnyUnsavedRows('communicationService'));\r\n }\r\n return Promise.all(promises);\r\n }\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MenuItem, TreeNode } from 'primeng/api';\r\n\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { UITestCenterDialog } from '../../dialogs/ui-test-center/ui-test-center.dialog';\r\n\r\nexport class ComponentTreeNode implements TreeNode {\r\n // Properties.\r\n private childNodes: TreeNode[] = [];\r\n\r\n // Constructor.\r\n public constructor(private component: ITestableComponent, private _parent: TreeNode, private _level: number) { }\r\n\r\n // Child management.\r\n public addChild(childNode: TreeNode): void {\r\n this.childNodes.push(childNode);\r\n }\r\n\r\n // Getters.\r\n public get Component(): ITestableComponent {\r\n return this.component;\r\n }\r\n\r\n // Methods used by .\r\n public get label(): string {\r\n return this.component.tagName != null ? this.component.tagName.toLowerCase() : 'null';\r\n }\r\n public set label(value: string) {\r\n }\r\n public get name(): string {\r\n return this.label;\r\n }\r\n public get key(): string {\r\n let id: number = this.component.id;\r\n return id.toString();\r\n }\r\n public set key(value: string) {\r\n }\r\n public get icon(): string {\r\n return 'article';\r\n }\r\n public set icon(value: string) {\r\n }\r\n\r\n public get data(): ComponentTreeNode {\r\n return this;\r\n }\r\n public set data(value: ComponentTreeNode) {\r\n }\r\n\r\n public get level(): number {\r\n return this._level;\r\n }\r\n public get children(): TreeNode[] {\r\n return this.childNodes;\r\n }\r\n public set children(value: TreeNode[]) {\r\n }\r\n\r\n public get parent(): TreeNode {\r\n return this._parent;\r\n }\r\n public set parent(value: TreeNode) {\r\n }\r\n\r\n public get leaf(): boolean {\r\n return (this.childNodes == null) || (this.childNodes.length == 0);\r\n }\r\n public set leaf(value: boolean) {\r\n }\r\n public get expanded(): boolean {\r\n return true;\r\n }\r\n public set expanded(value: boolean) {\r\n }\r\n public get selectable(): boolean {\r\n return true;\r\n }\r\n public set selectable(value: boolean) {\r\n }\r\n public get draggable(): boolean {\r\n return false;\r\n }\r\n public set draggable(value: boolean) {\r\n }\r\n public get droppable(): boolean {\r\n return false;\r\n }\r\n public set droppable(value: boolean) {\r\n }\r\n\r\n // Following are TreeNode attributes that are not yet implemented.\r\n /*\r\n expandedIcon?: any;\r\n collapsedIcon?: any;\r\n type?: string;\r\n partialSelected?: boolean;\r\n styleClass?: string;\r\n */\r\n}\r\n\r\nexport class FlatComponentTreeNode {\r\n // Properties.\r\n private childNodes: FlatComponentTreeNode[] = [];\r\n\r\n // Constructor.\r\n public constructor(private component: ITestableComponent, private _parent: FlatComponentTreeNode, private _level: number) { }\r\n\r\n // Child management.\r\n public addChild(childNode: FlatComponentTreeNode): void {\r\n this.childNodes.push(childNode);\r\n }\r\n\r\n // Getters.\r\n public get Component(): ITestableComponent {\r\n return this.component;\r\n }\r\n public get name(): string {\r\n return this.component.tagName != null ? this.component.tagName.toLowerCase() : 'null';\r\n }\r\n public get children(): FlatComponentTreeNode[] {\r\n return this.childNodes;\r\n }\r\n public get level(): number {\r\n return this._level;\r\n }\r\n public get isExpandable(): boolean {\r\n return (this.childNodes != null) && (this.childNodes.length > 0);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MenuItem, TreeNode } from 'primeng/api';\r\n\r\nimport { ITestableComponent } from '../interfaces/itestable-component.interface';\r\nimport { UITestCenterDialog } from '../dialogs/ui-test-center/ui-test-center.dialog';\r\nimport { ComponentTreeNode, FlatComponentTreeNode } from '../models/component-hierarchy/component-tree-node.model';\r\nimport { StringUtil } from '../utility-classes/string.util';\r\nimport { ScriptableComponentStatus } from '../enums/component-scripting/scriptable-component-status.enum';\r\n\r\n// Define a class used to model the component hierarchy.\r\nclass ComponentHierarchyNode {\r\n public component: ITestableComponent;\r\n public childComponentNodes: ComponentHierarchyNode[] = [];\r\n\r\n public constructor(component: ITestableComponent, childComponentNodes: ComponentHierarchyNode[] = null) {\r\n\r\n this.component = component;\r\n if (childComponentNodes != null)\r\n this.childComponentNodes = childComponentNodes;\r\n }\r\n}\r\n \r\nexport interface IComponentHierarchyChanged {\r\n componentAdded(component: ITestableComponent);\r\n componentRemoved(component: ITestableComponent, currentParentComponent: ITestableComponent): void;\r\n hierarchyChanged(): void;\r\n componentInitialized(component: ITestableComponent, initializationStatus: ScriptableComponentStatus): void;\r\n}\r\n\r\nclass LogData {\r\n public logToConsole: boolean = false;\r\n public log: string[] = []; // Default log.\r\n public errorLog: string[] = [];\r\n //public testActionLog: string[] = [];\r\n\r\n public clearLog(): void {\r\n this.log = [];\r\n }\r\n public clearErrorLog(): void {\r\n this.errorLog = [];\r\n }\r\n public clearLogs(): void {\r\n this.log = [];\r\n this.errorLog = [];\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ComponentHierarchyService {\r\n // Properties.\r\n private rootComponentNode: ComponentHierarchyNode = null;\r\n private currentParentComponentNode: ComponentHierarchyNode = null;\r\n private cachedTreeNodes: TreeNode[] = null;\r\n\r\n private hierarchyChangedHandlers: IComponentHierarchyChanged[] = [];\r\n private uiTestCenterDialog: UITestCenterDialog = null; // Provided as a convenience to other classes.\r\n // Debug-related properties.\r\n private logData: LogData = new LogData();\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Getter method(s).\r\n public get LogToConsole(): boolean {\r\n return this.logData.logToConsole;\r\n }\r\n\r\n public set UITestCenterDialog(value: UITestCenterDialog) {\r\n this.uiTestCenterDialog = value;\r\n }\r\n public get UITestCenterDialog(): UITestCenterDialog {\r\n return this.uiTestCenterDialog;\r\n }\r\n public get UITestingUnderway(): boolean {\r\n return this.uiTestCenterDialog != null;\r\n }\r\n\r\n // Component registration.\r\n public registerChildComponent(component: ITestableComponent, registerAsCurrentParent: boolean = true): void {\r\n this.cachedTreeNodes = null; // Clear the cached nodes.\r\n\r\n // Create a new node.\r\n let componentNode: ComponentHierarchyNode = new ComponentHierarchyNode(component);\r\n\r\n if (this.rootComponentNode == null)\r\n this.rootComponentNode = componentNode;\r\n\r\n let tagName: string = (component.tagName != null ? component.tagName : 'null');\r\n\r\n let parentTagName: string = ((this.currentParentComponentNode != null) && (this.currentParentComponentNode.component.tagName != null) ? this.currentParentComponentNode.component.tagName : 'null');\r\n\r\n this.logComponentRegistration(tagName, parentTagName);\r\n\r\n // Add to the hierarchy.\r\n if (this.currentParentComponentNode != null)\r\n this.currentParentComponentNode.childComponentNodes.push(componentNode);\r\n\r\n // Register as the new parent component?\r\n if (registerAsCurrentParent) {\r\n this.currentParentComponentNode = componentNode;\r\n\r\n this.logComponentParentRegistration(tagName);\r\n }\r\n\r\n if (this.logData.logToConsole)\r\n this.printHierarchy();\r\n\r\n if (this.hierarchyChangedHandlers.length > 0) {\r\n for (let index: number = 0; index < this.hierarchyChangedHandlers.length; index++) {\r\n let handler: IComponentHierarchyChanged = this.hierarchyChangedHandlers[index];\r\n handler.componentAdded(component);\r\n handler.hierarchyChanged();\r\n }\r\n } \r\n }\r\n\r\n public componentInitialized(component: ITestableComponent, initializationStatus: ScriptableComponentStatus): void {\r\n if (this.hierarchyChangedHandlers.length > 0) {\r\n for (let index: number = 0; index < this.hierarchyChangedHandlers.length; index++) {\r\n let handler: IComponentHierarchyChanged = this.hierarchyChangedHandlers[index];\r\n handler.componentInitialized(component, initializationStatus);\r\n }\r\n }\r\n }\r\n\r\n public removeComponent(testableComponent: ITestableComponent): boolean {\r\n this.cachedTreeNodes = null; // Clear the cached nodes.\r\n\r\n let tagName: string = (testableComponent.tagName != null ? testableComponent.tagName : 'null');\r\n let message: string = `registerChildComponent(): removing a component with tag '${tagName.toLowerCase()}'.`;\r\n this.logInfo(message);\r\n\r\n //let removed: boolean = this.removeComponentNodeFor(null, this.rootComponentNode, testableComponent);\r\n let removedNode: ComponentHierarchyNode = this.removeComponentNodeFor(null, this.rootComponentNode, testableComponent);\r\n\r\n if (this.logData.logToConsole)\r\n this.printHierarchy();\r\n\r\n //if ((this.hierarchyChangedHandler != null) && removed) {\r\n if ((this.hierarchyChangedHandlers.length > 0) && (removedNode != null)) {\r\n for (let index: number = 0; index < this.hierarchyChangedHandlers.length; index++) {\r\n let handler: IComponentHierarchyChanged = this.hierarchyChangedHandlers[index];\r\n ComponentHierarchyService.notifyComponentRemoved(removedNode, this.currentParentComponentNode, handler);\r\n handler.hierarchyChanged();\r\n }\r\n } \r\n\r\n return removedNode != null;\r\n }\r\n\r\n public get HierarchyAsTreeNodes(): TreeNode[] {\r\n if (this.cachedTreeNodes == null) {\r\n this.cachedTreeNodes = [];\r\n\r\n if (this.rootComponentNode != null) {\r\n let node = this.mapHierarchyNodeToTreeNode(null, this.rootComponentNode);\r\n this.cachedTreeNodes.push(node);\r\n } \r\n }\r\n\r\n return this.cachedTreeNodes;\r\n }\r\n\r\n public get HierarchyAsFlatTreeNodes(): FlatComponentTreeNode[] {\r\n let nodes: FlatComponentTreeNode[] = [];\r\n\r\n if (this.rootComponentNode != null) {\r\n let node = this.mapHiherarchyNodeToFlatTreeNode(null, this.rootComponentNode);\r\n nodes.push(node);\r\n }\r\n\r\n return nodes;\r\n }\r\n\r\n public get Log(): string[] {\r\n return this.logData.log;\r\n }\r\n public get LogText(): string {\r\n return StringUtil.arrayToString(this.logData.log);\r\n }\r\n public get LogIsEmpty(): boolean {\r\n return this.logData.log.length == 0;\r\n }\r\n public get ErrorLog(): string[] {\r\n return this.logData.errorLog;\r\n }\r\n public get ErrorLogText(): string {\r\n return StringUtil.arrayToString(this.logData.errorLog);\r\n }\r\n\r\n //public findComponentTreeNodeIn(rootTreeNode: ComponentTreeNode, component: ITestableComponent): ComponentTreeNode {\r\n public findComponentTreeNodeIn(rootTreeNode: ComponentTreeNode, component: ITestableComponent): ComponentTreeNode {\r\n let componentTreeNode: ComponentTreeNode = null;\r\n\r\n if (rootTreeNode.Component == component)\r\n componentTreeNode = rootTreeNode;\r\n else {\r\n if (rootTreeNode.children != null) {\r\n for (let index: number = 0; index < rootTreeNode.children.length; index++) {\r\n let child: ComponentTreeNode = rootTreeNode.children[index];\r\n componentTreeNode = this.findComponentTreeNodeIn(child, component);\r\n if (componentTreeNode != null)\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return componentTreeNode;\r\n }\r\n\r\n public findComponentTreeNodeByTagFromRoot(tagName: string, rootNode: ComponentHierarchyNode = this.rootComponentNode): ITestableComponent {\r\n let foundComponent: ITestableComponent = null;\r\n\r\n if (rootNode != null) {\r\n if (rootNode.component.tagName == tagName)\r\n foundComponent = rootNode.component;\r\n else if (rootNode.childComponentNodes != null) {\r\n for (let index: number = 0; index < rootNode.childComponentNodes.length; index++) {\r\n let childNode: ComponentHierarchyNode = rootNode.childComponentNodes[index];\r\n foundComponent = this.findComponentTreeNodeByTagFromRoot(tagName, childNode);\r\n if (foundComponent != null)\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return foundComponent;\r\n }\r\n\r\n public clearLogs(): void {\r\n this.logData.clearLogs();\r\n }\r\n\r\n // Hierarchy changed handler.\r\n public addHierarchyChangedHandler(hierarchyChangedHandler: IComponentHierarchyChanged): void {\r\n this.hierarchyChangedHandlers.push(hierarchyChangedHandler);\r\n }\r\n public removeHierarchyChangedHandler(hierarchyChangedHandler: IComponentHierarchyChanged): boolean {\r\n let numHandlers: number = this.hierarchyChangedHandlers.length;\r\n this.hierarchyChangedHandlers = this.hierarchyChangedHandlers.filter(h => h != hierarchyChangedHandler);\r\n return numHandlers != this.hierarchyChangedHandlers.length;\r\n }\r\n\r\n // Logging.\r\n public logInfo(message: string): void {\r\n this.logData.log.push(message);\r\n\r\n if (this.logData.logToConsole) \r\n console.log(message); \r\n }\r\n public logError(message: string): void {\r\n this.logData.errorLog.push(message);\r\n\r\n if (this.logData.logToConsole)\r\n console.log(message); \r\n }\r\n\r\n // Helper methods.\r\n private getTagNameFor(component: ITestableComponent): string {\r\n return component.tagName != null ? component.tagName.toLowerCase() : 'null';\r\n }\r\n\r\n private printHierarchy(): void {\r\n this.logInfo(`printHierarchy(): begin component hierarchy:`);\r\n if (this.rootComponentNode != null) \r\n this.printHierarchyNode(this.rootComponentNode); \r\n this.logInfo(`printHierarchy(): component hierarchy complete.`);\r\n }\r\n\r\n private printHierarchyNode(node: ComponentHierarchyNode, hierarchyLevel: number = 0): void {\r\n let message: string = ' ';\r\n for (let index: number = 0; index < hierarchyLevel; index++)\r\n message += ' ';\r\n message += this.getTagNameFor(node.component);\r\n this.logInfo(message);\r\n\r\n if (node.childComponentNodes != null) {\r\n for (let index: number = 0; index < node.childComponentNodes.length; index++)\r\n this.printHierarchyNode(node.childComponentNodes[index], hierarchyLevel + 1);\r\n } \r\n }\r\n\r\n //private removeComponentNodeFor(parentComponentNode: ComponentHierarchyNode, currentComponentNode: ComponentHierarchyNode, component: ITestableComponent): boolean {\r\n private removeComponentNodeFor(parentComponentNode: ComponentHierarchyNode, currentComponentNode: ComponentHierarchyNode, component: ITestableComponent): ComponentHierarchyNode {\r\n //let removed: boolean = false;\r\n let removedComponentNode: ComponentHierarchyNode = null;\r\n\r\n if (currentComponentNode != null) {\r\n if (currentComponentNode.component == component) {\r\n if (parentComponentNode != null) {\r\n parentComponentNode.childComponentNodes = parentComponentNode.childComponentNodes.filter(n => n.component != component);\r\n this.currentParentComponentNode = parentComponentNode;\r\n } else {\r\n this.rootComponentNode = null;\r\n }\r\n\r\n //removed = true;\r\n removedComponentNode = currentComponentNode;\r\n } else {\r\n for (let index: number = 0; index < currentComponentNode.childComponentNodes.length; index++) {\r\n removedComponentNode = this.removeComponentNodeFor(currentComponentNode, currentComponentNode.childComponentNodes[index], component);\r\n //if (this.removeComponentNodeFor(currentComponentNode, currentComponentNode.childComponentNodes[index], component)) {\r\n if (removedComponentNode != null) {\r\n //removed = true;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n }\r\n\r\n //return removed;\r\n return removedComponentNode;\r\n }\r\n\r\n private static notifyComponentRemoved(removedComponentNode: ComponentHierarchyNode, currentParentComponentNode: ComponentHierarchyNode, handler: IComponentHierarchyChanged): void {\r\n handler.componentRemoved(removedComponentNode.component, currentParentComponentNode.component);\r\n\r\n // Notify of any removed children.\r\n if (removedComponentNode.childComponentNodes != null) {\r\n for (let index: number = 0; index < removedComponentNode.childComponentNodes.length; index++) {\r\n let childNode: ComponentHierarchyNode = removedComponentNode.childComponentNodes[index];\r\n ComponentHierarchyService.notifyComponentRemoved(childNode, currentParentComponentNode, handler);\r\n }\r\n }\r\n }\r\n\r\n private mapHierarchyNodeToTreeNode(parentTreeNode: TreeNode, hierarchyNode: ComponentHierarchyNode, hierarchyLevel: number = 0): TreeNode {\r\n let treeNode = new ComponentTreeNode(hierarchyNode.component, parentTreeNode, hierarchyLevel);\r\n\r\n if ((hierarchyNode.childComponentNodes != null) && (hierarchyNode.childComponentNodes.length > 0)) {\r\n for (let index: number = 0; index < hierarchyNode.childComponentNodes.length; index++) {\r\n let childHierarchyNode: ComponentHierarchyNode = hierarchyNode.childComponentNodes[index];\r\n\r\n let childTreeNode = this.mapHierarchyNodeToTreeNode(treeNode, childHierarchyNode, hierarchyLevel + 1);\r\n treeNode.addChild(childTreeNode);\r\n }\r\n }\r\n\r\n return treeNode;\r\n }\r\n private mapHiherarchyNodeToFlatTreeNode(parentTreeNode: FlatComponentTreeNode, hierarchyNode: ComponentHierarchyNode, hierarchyLevel: number = 0): FlatComponentTreeNode {\r\n let treeNode = new FlatComponentTreeNode(hierarchyNode.component, parentTreeNode, hierarchyLevel);\r\n\r\n if ((hierarchyNode.childComponentNodes != null) && (hierarchyNode.childComponentNodes.length > 0)) {\r\n for (let index: number = 0; index < hierarchyNode.childComponentNodes.length; index++) {\r\n let childHierarchyNode: ComponentHierarchyNode = hierarchyNode.childComponentNodes[index];\r\n\r\n let childTreeNode: FlatComponentTreeNode = this.mapHiherarchyNodeToFlatTreeNode(treeNode, childHierarchyNode, hierarchyLevel + 1);\r\n treeNode.addChild(childTreeNode);\r\n }\r\n }\r\n\r\n return treeNode;\r\n }\r\n\r\n // Logging-related methods.\r\n private logComponentRegistration(tagName: string, parentTagName: string): void {\r\n let message: string = `registerComponent(): component '${tagName.toLowerCase()}' ` +\r\n (this.currentParentComponentNode != null ? `is a child of component '${parentTagName.toLowerCase()}'.` : \"is the application root element.\");\r\n this.logInfo(message);\r\n }\r\n\r\n private logComponentParentRegistration(tagName: string): void {\r\n let message: string = `registerComponent(): component '${tagName.toLowerCase()}' is the current parent component.`;\r\n this.logInfo(message);\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\nimport { CopySiteAndTransformSettings } from '../models/copy-site-and-transform-settings.model';\r\n\r\n@Injectable()\r\nexport class CopySiteService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'copySite', DataCollection)\r\n }\r\n\r\n // Service methods.\r\n public copySite(siteId: number, siteCopyName: string): Promise {\r\n let url = `${this.url}/${this.endpoint}/copy/${siteId}/as/${siteCopyName}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public copyAndTransformSite(settings: CopySiteAndTransformSettings): Promise {\r\n let url = `${this.url}/${this.endpoint}/copyAndTransform`;\r\n\r\n return this.http.post(url, settings)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportAndTransformSite(settings: CopySiteAndTransformSettings): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportAndTransform`;\r\n\r\n return this.http.post(url, settings)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportSite(siteId: number, exportStructureOnly:boolean, componentClassName: string): Promise {\r\n let url = `${this.url}/${this.endpoint}/export/${siteId}/forAppComponent/${componentClassName}?exportStructureOnly=${exportStructureOnly}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getDownloadExportedSiteUrl(asyncJob: AsyncJob): string {\r\n let url = `${this.url}/${this.endpoint}/GetExportedSiteZipFile/${asyncJob.jobKey}`;\r\n\r\n return(url);\r\n }\r\n\r\n public importSite(siteDataZipFile: File, importSiteName: string, ignoreValidationErrors: boolean): Promise {\r\n let url = `${this.url}/${this.endpoint}/importsiteas/${importSiteName}?ignoreValidationErrors=${ignoreValidationErrors}`;\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = new FormData();\r\n formData.append('file', siteDataZipFile, siteDataZipFile.name);\r\n\r\n let httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url,formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Note: the following method is being moved into class ExportMetadataService.\r\n /*\r\n public exportFormDefinition(formId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportFormDefinition/${formId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Note: the following method is being moved into class ImportMetadataService.\r\n /*\r\n public importFormDefinitions(formDefinitionFiles: File[],\r\n targetDataCollectionId: number,\r\n xmlFileFormat: XmlFileFormatEnum) {\r\n let url: string = `${this.url}/${this.endpoint}/importFormDefinitionsInto/${targetDataCollectionId}`;\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = this.packageDataFiles(formDefinitionFiles);\r\n\r\n let httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n /*\r\n public exportFormInstances(formId: number, xmlFileFormat: XmlFileFormatEnum): Promise {\r\n let url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/exportFormInstances/${formId}` :\r\n `${this.url}/${this.endpoint}/exportSimplifiedFormInstances/${formId}`);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n public getDownloadExportedFormInstanceDataUrl(asyncJob: AsyncJob): string {\r\n let url = `${this.url}/${this.endpoint}/GetExportedFormInstanceDataZipFile/${asyncJob.jobKey}`;\r\n\r\n return (url);\r\n }\r\n\r\n // Note: the following method is being moved into class ImportDataService.\r\n /*\r\n public importFormInstances(formInstanceDataZipFile: File,\r\n xmlFileFormat: XmlFileFormatEnum,\r\n folderId: number,\r\n optionalFormId: number = 0): Promise {\r\n // Determine the target URL.\r\n let url: string = null;\r\n\r\n if (optionalFormId > 0) {\r\n url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/importFormInstancesInto/${folderId}/usingForm/${optionalFormId}` :\r\n `${this.url}/${this.endpoint}/importSimplifiedFormInstancesInto/${folderId}/usingForm/${optionalFormId}`);\r\n } else {\r\n url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/importFormInstancesInto/${folderId}` :\r\n `${this.url}/${this.endpoint}/importSimplifiedFormInstancesInto/${folderId}`);\r\n }\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = new FormData();\r\n formData.append('file', formInstanceDataZipFile, formInstanceDataZipFile.name);\r\n\r\n let httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Note: the following method is being moved into new service class ImportDataService.\r\n /*\r\n public importFormInstanceFiles(formInstanceDataFiles: File[], folderId: number): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/importSimplifiedFormInstanceFilesInto/${folderId}`\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = this.packageDataFiles(formInstanceDataFiles);\r\n\r\n let httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n let obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n\r\n /*\r\n private packageDataFiles(dataFiles: File[]): FormData {\r\n const formData: FormData = new FormData();\r\n //for (let iFile: number = 0; iFile < formInstanceDataFiles.length; iFile++) {\r\n for (let iFile: number = 0; iFile < dataFiles.length; iFile++) {\r\n //let dataFile: File = formInstanceDataFiles[iFile];\r\n let dataFile: File = dataFiles[iFile];\r\n formData.append('file', dataFile, dataFile.name);\r\n }\r\n\r\n return (formData);\r\n }\r\n */\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\nimport { Folder } from '../models/site-content/folder.model';\r\n\r\n/*\r\n * This is a singleton service used as the single source of the current folder of the Structure screen\r\n * It was added for VNEXT-111\r\n*/ \r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CurrentFolderService {\n\r\n private folder: Folder;\r\n\n constructor() { }\r\n\r\n public set Folder(folder: Folder) {\r\n this.folder = folder;\r\n }\r\n\r\n public get Folder(): Folder{\r\n return this.folder;\r\n }\r\n\r\n public nullifyCurrentFolder() {\r\n this.folder = null;\r\n }\r\n\r\n // If this.folder's id property matches that of the id argument, returns true, otherwise returns false\r\n public isCurrentFolder(id: number): boolean {\r\n if (this.folder != null && this.folder.id == id) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Role } from '../models/role.model';\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\n\r\n/*\r\n * This is a singleton service used as the single source of the current site\r\n * that a number of components need. The site is set from DataCollectionResolver.resolve()\r\n * which is set on the main 'site' route.\r\n * The Components of routes which are children of the 'site' route used to access the current site\r\n * via the router's parent's data property, but now get it via this service\r\n*/ \r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CurrentSiteService {\n\r\n private site: DataCollection;\r\n\n constructor() { }\r\n\r\n public set Site(site: DataCollection) {\r\n this.site = site;\r\n }\r\n\r\n public get Site(): DataCollection {\r\n return this.site;\r\n }\r\n\r\n // If this.site's id property matches that of the id argument, returns true, otherwise returns false\r\n public isCurrentSite(id: number): boolean {\r\n if (this.site != null && this.site.id == id) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // updates the given role in this.site.roles\r\n public updateRole(role: Role): void {\r\n this.deleteRole(role);\r\n this.site.roles.push(role);\r\n }\r\n\r\n public addRole(role: Role) {\r\n this.site.roles.push(role);\r\n }\r\n\r\n public deleteRole(role: Role) {\r\n let otherRoles = this.site.roles.filter(x => { return x.id != role.id });\r\n this.site.roles = otherRoles;\r\n }\n}\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\n\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\n//import * as parseUri from 'parse-uri';\r\nimport { DataCollection } from '../models/site-content/data-collection.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { Workflow } from '../models/site-content/workflow.model';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { Folder } from '../models/site-content/folder.model';\r\nimport { BrowserStorageService } from './browserstorage.service';\r\nimport { ListViewEnum, ListViewHelper } from '../components/list-view/list-view.helper';\r\nimport { BannerText } from '../models/banner/banner-text.model';\r\n\r\n@Injectable()\r\nexport class DataCollectionService extends CollectApiServiceBase {\r\n private searchCount: number = 0;\r\n\r\n public currentSite: Promise;\r\n\r\n public constructor(\r\n http: HttpClient,\r\n progressIndicatorService: ProgressIndicatorService,\r\n private localStorageService: BrowserStorageService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'datacollection', DataCollection)\r\n }\r\n\r\n public toggleIsFavorite(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/ToggleIsFavorite/${id}`;\r\n return this.http.put(url, {}).toPromise().then(x => {\r\n return x;\r\n });\r\n }\r\n\r\n //VNEXT-1066: KLW - Properties of the Banner\r\n public updateBannerText(bannerText: BannerText){ \r\n\r\n let url: string = `${this.url}/${this.endpoint}/UpdateBannerText`; \r\n\r\n return this.http.put(url, bannerText)\r\n .toPromise()\r\n .then(res => {\r\n })\r\n .catch(this.handleError);\r\n\r\n }\r\n\r\n // pharvey ~ added 9/13/2021 for vnext-104\r\n public getWithPagination(offset: number, maxToReturn: number, filterTerm: string = null, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let msg = ((filterTerm != null) && (filterTerm.trim() != '') ? 'Searching sites ...' : 'Loading sites ...');\r\n this.updateProgress(25, 50, msg);\r\n\r\n this.searchCount += 1;\r\n\r\n let sortObj = ListViewHelper.getSortObjFor(ListViewEnum.SITE_LIST) || ListViewHelper.DEFAULT_SORT;\r\n \r\n let url: string = `${this.url}/${this.endpoint}/getWithPagination/${offset}/${maxToReturn}/${sortObj.active}/${sortObj.direction}`;\r\n if (filterTerm) {\r\n url = `${url}?q=${filterTerm}&c=${this.searchCount}`;\r\n }\r\n\r\n //VNEXT-221: track search count and discard stale responses\r\n return this.http.get(url, { observe: \"response\" })\r\n .toPromise()\r\n .then(res => {\r\n this.progressIndicatorService.updateProgress(100, 100, '');\r\n\r\n let data: DataCollection[] = [];\r\n let sc = res.body['searchcount'];\r\n if (!sc) sc = \"1\";\r\n\r\n if (parseInt(sc) > 1 && parseInt(sc) < this.searchCount) {\r\n return;\r\n }\r\n\r\n res.body['siteVMs'].forEach(x => {\r\n let obj = this.formatResponse(x);\r\n data.push(obj);\r\n });\r\n return data;\r\n });\r\n }\r\n\r\n public getAllForAdmin() {\r\n let url: string = `${this.url}/${this.endpoint}/getAllForAdmin`;\r\n this.updateProgress(25, 50, \"Getting all Sites (this could take a while)...\");\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let data: DataCollection[] = [];\r\n res.forEach(x => {\r\n let obj = this.formatResponse(x);\r\n data.push(obj);\r\n });\r\n this.progressIndicatorService.updateProgress(100, 100, '');\r\n return data;\r\n })\r\n }\r\n\r\n public removeAsSiteAdmin(siteId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/RemoveFromSiteAdmin/${siteId}`;\r\n\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(res => {\r\n if (!res) {\r\n alert(\"Could not remove you. Perhaps you are a Site Admin via a Group? (This means the backend returned false.)\");\r\n }\r\n });\r\n }\r\n\r\n public addAsSiteAdmin(siteId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/AddAsSiteAdmin/${siteId}`;\r\n\r\n return this.http.post(url, {})\r\n .toPromise()\r\n .then(res => {\r\n if (!res) {\r\n alert(\"Could not add you! (This means the backend returned false.)\");\r\n }\r\n });\r\n }\r\n\r\n public transitionWorkflow(rootFolder: Folder, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let url: string = `${this.url}/${this.endpoint}/${rootFolder.dataCollectionId}/Transition`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Updating');\r\n this.updateProgress(50, 75, msg);\r\n return this.http.put(url, rootFolder)\r\n .toPromise()\r\n .then(res => {\r\n msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return this.formatResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public enableDisableBetaFeatures(dataCollectionId: number, enableBetaFeatures: boolean, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url: string =\r\n (enableBetaFeatures ?\r\n `${this.url}/${this.endpoint}/${dataCollectionId}/EnableBetaFeatures` :\r\n `${this.url}/${this.endpoint}/${dataCollectionId}/DisableBetaFeatures`);\r\n let firstStatus: string = (enableBetaFeatures ? 'Enabling site beta features' : 'Disabling site beta features');\r\n let secondStatus: string = (enableBetaFeatures ? 'Enabled' : 'Disabled');\r\n\r\n let msg = progressConfig.msgDuring || firstStatus;\r\n this.updateProgress(50, 75, msg);\r\n return this.http.put(url, dataCollectionId)\r\n .toPromise()\r\n .then(res => {\r\n msg = progressConfig.msgOnComplete || secondStatus;\r\n this.updateProgress(100, 100, msg);\r\n\r\n return this.formatResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // overriding so as to store the returned site in memmory\r\n public get(id: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/${id}`;\r\n\r\n let msg = 'Loading Site ...';\r\n this.updateProgress(25, 50, msg);\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.currentSite = this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n this.progressIndicatorService.updateProgress(100, 100, '');\r\n\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let obj = this.formatResponse(response);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormsBySite(siteId: number, format: string = null): Promise {\r\n let url = `${this.url}/${this.endpoint}/getFormsBySite/${siteId}`;\r\n if (format != null) url += `/${format}`;\r\n\r\n this.updateProgress(25, 50, 'Loading forms...');\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let data: Form[] = [];\r\n\r\n response.forEach(x => {\r\n let obj = this.formatFormResponse(x);\r\n\r\n obj.childCount = obj.formInstanceCount;\r\n obj.childCountTitle = 'template is used by one form';\r\n if (obj.childCount > 1) obj.childCountTitle = 'template is used by ' + obj.childCount + ' forms';\r\n\r\n data.push(obj);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n this.hideProgressIndicator();\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormsForFolder(siteId: number, folderId: number, format: string = null): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetFormsForFolder/${siteId}/${folderId}`;\r\n if (format != null) url += `/${format}`;\r\n\r\n this.updateProgress(25, 50, 'Loading forms...');\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let data: Form[] = [];\r\n\r\n response.forEach(x => {\r\n let obj = this.formatFormResponse(x);\r\n data.push(obj);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n this.hideProgressIndicator();\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormForFolder(formTemplateId: number, folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetFormForFolder/${formTemplateId}/${folderId}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n let formTemplate: Form = response != null ? this.formatFormResponse(response) : null;\r\n\r\n return formTemplate;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getWorkflowsBySite(siteId: number): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/getWorkflowsBySite/${siteId}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n this.updateProgress(25, 50, 'Loading workflows ...');\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let workflows: Workflow[] = [];\r\n\r\n response.forEach(wf => {\r\n let workflow = this.formatWorkflowResponse(wf);\r\n workflows.push(workflow);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n this.hideProgressIndicator();\r\n\r\n return workflows;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public CountAccessibleSites(): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/count`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFavorites(): Promise {\r\n let url = `${this.url}/${this.endpoint}/getFavorites`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n let msg = 'Loading favorite sites ...';\r\n this.updateProgress(25, 50, msg);\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n this.progressIndicatorService.updateProgress(100, 100, '');\r\n\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let data: DataCollection[] = [];\r\n\r\n response.forEach(dc => {\r\n let obj = this.formatResponse(dc);\r\n data.push(obj);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getRecentlyAccessed(maxObjectsToReturn: number = 25): Promise {\r\n let url = `${this.url}/${this.endpoint}/getRecentlyAccessed/${maxObjectsToReturn}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n let msg = \"Loading sites you've recently viewed...\";\r\n this.updateProgress(25, 50, msg);\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n this.progressIndicatorService.updateProgress(100, 100, '');\r\n\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let data: DataCollection[] = [];\r\n\r\n response.forEach(dc => {\r\n let obj = this.formatResponse(dc);\r\n data.push(obj);\r\n });\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public setPermissionsModelFlag(dataCollectionId: number, useSimplifiedPermissionsModel: boolean): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/${dataCollectionId}/SetPermissionsModelFlag/${useSimplifiedPermissionsModel}`;\r\n\r\n return this.http.put(url, dataCollectionId)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public enableStructureForEndUser(dataCollectionId: number, enableStructureForEndUser: boolean, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/${dataCollectionId}/SetEnableStructureForEndUser/${enableStructureForEndUser}`;\r\n\r\n return this.http.put(url, dataCollectionId)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // 04-15-2021: will re-enable the following method after completing site copies\r\n // (as an export will be the first part of a site copy).\r\n /*\r\n public exportSite(siteId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportSite/${siteId}`;\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(exportedDataCollection => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n\r\n return (exportedDataCollection);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Protected methods.\r\n protected formatFormResponse(data: Form): Form {\r\n let obj = plainToClass(Form, data);\r\n\r\n return obj;\r\n }\r\n\r\n protected progressMsg(verb: string): string {\r\n return super.progressMsg(verb, 'site');\r\n }\r\n\r\n // Private methods.\r\n private formatWorkflowResponse(data: Workflow): Workflow {\r\n let workflow = plainToClass(Workflow, data);\r\n\r\n return workflow;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\r\nimport { ConfirmationDialogModel, ConfirmationDialogComponent } from '../../shared/dialogs/confirmation/confirmation-dialog.component';\r\nimport { ConfirmationDialogEnums } from '../enums/confirmation-dialog.enum';\r\nimport { IListItem } from '../interfaces/ilist-item.interface';\r\n\r\n@Injectable()\r\nexport class DeleteOnConfirmDialogService {\r\n //Define a deleteOnConfirm() method.\r\n public deleteOnConfirm(dialogParam: MatDialog,\r\n entity: string,\r\n callback: Function) {\r\n let dialogRef = dialogParam.open(ConfirmationDialogComponent, {\r\n data: new ConfirmationDialogModel(`Delete ${entity}`, `Are you sure you want to delete this ${entity}? The operation cannot be undone.`)\r\n });\r\n dialogRef.afterClosed().subscribe(yes => {\r\n if (yes) {\r\n callback();\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n public deleteOnConfirmMultipleItems(dialogParam: MatDialog,\r\n items: IListItem[],\r\n callback: Function) {\r\n\r\n let title = 'Delete Item';\r\n let desc = 'Are you sure you want to delete the item';\r\n\r\n\r\n if (items.length > 1) {\r\n title += 's';\r\n desc += 's:\\n\\n';\r\n }\r\n else {\r\n desc += ':\\n\\n';\r\n }\r\n\r\n items.forEach(x => {\r\n desc += x.name + '\\n';\r\n });\r\n\r\n desc += '\\n';\r\n\r\n desc += `The operation cannot be undone!`;\r\n\r\n let dialogRef = dialogParam.open(ConfirmationDialogComponent, {\r\n data: new ConfirmationDialogModel(title, desc, { hideNo: false, dialogType: ConfirmationDialogEnums.WARNING }),\r\n panelClass: 'dialog-confirm'\r\n });\r\n dialogRef.afterClosed().subscribe(yes => {\r\n if (yes) {\r\n callback();\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { plainToClass } from 'class-transformer';\r\nimport { environment } from '../../../environments/environment';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { DocumentPublishingSettings } from '../models/document-publishing-settings.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\r\n@Injectable()\r\nexport class DocumentPublishingService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'documentpublishing', DocumentPublishingSettings);\r\n }\r\n\r\n public getDocumentPublishingSettingsForSite(siteId: number, forPicker: boolean = false): Promise {\r\n let url = `${this.url}/${this.endpoint}/SettingsForSite/${siteId}`\r\n if (forPicker) {\r\n url = `${url}?forPicker=true`;\r\n }\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let ret = [];\r\n for (let a of response) {\r\n ret.push(this.formatResponse(a))\r\n }\r\n return ret;\r\n });\r\n }\r\n\r\n public getDocumentPublishingSettings(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/Settings/${id}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatResponse(res);\r\n });\r\n }\r\n\r\n public publish(entityType: string, entityId: number, exportId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${entityType}/${entityId}/${exportId}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n return plainToClass(AsyncJob, res);\r\n });\r\n }\r\n\r\n // pharvey - 5/15/2024 - added for VNEXT-1289\r\n public publishMultiple(entityType: string, entityIds: number[], exportId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${entityType}/${exportId}`;\r\n return this.http.post(url, entityIds)\r\n .toPromise()\r\n .then(res => {\r\n return plainToClass(AsyncJob, res);\r\n });\r\n }\r\n\r\n public getPublishedDocUrl(asyncJob: AsyncJob, entityType: string, entityId: number, settingsId: number): string {\r\n let url = `${this.url}/${this.endpoint}/GetPublishedDoc/${entityType}/${entityId}/${asyncJob.jobKey}/${settingsId}`;\r\n return (url);\r\n }\r\n\r\n public saveDocumentPublishingSettings(exportSettings: DocumentPublishingSettings): Promise {\r\n let url = `${this.url}/${this.endpoint}/SaveStylesheet`;\r\n //KEvin\r\n // return this.http.post(url, exportSettings).toPromise().then(x => {\r\n // return this.formatResponse(x);\r\n // });\r\n\r\n\r\n return this.http.post(url, exportSettings).toPromise().then(x => {\r\n return this.formatResponse(x);\r\n });\r\n }\r\n\r\n public deleteDocumentPublishingSettings(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/DeleteStylesheet/${id}`;\r\n return this.http.delete(url).toPromise().then(x => {\r\n return id;\r\n });\r\n }\r\n\r\n /**\r\n * Emails forms to a reporting queue for processing\r\n * @param entityType - The type of entity being processed (i.e. formInstance)\r\n * @param entityIds - The Id for the entity\r\n * @param documentTypeId - The Id for the selected document type\r\n */\r\n public addFormsToEmailQueue(entityIds: number[], documentTypeId: number): Promise {\r\n const entityType: string = \"AddFormsToQueue\";\r\n let url = `${this.url}/${this.endpoint}/${entityType}/${documentTypeId}`;\r\n return this.http.post(url, entityIds)\r\n .toPromise()\r\n .then(res => {\r\n //TODO: Remove this if not needed\r\n return plainToClass(AsyncJob, res);\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DropEvent } from '../../shared/external-libraries/ng-drag-drop/shared/drop-event.model';\r\nimport { DragDropEnum } from '../enums/drag-drop.enum';\r\nimport { IDragDropItem } from '../interfaces/drag-drop-items.interface';\r\nimport { IListItem } from '../interfaces/ilist-item.interface';\r\n\r\n@Injectable()\r\nexport class DragDropService {\r\n\r\n public setItems(event: DragEvent, items: IListItem[]): DragEvent {\r\n let mappedItems = items.map((x) => {\r\n return {\r\n id: x.getId(),\r\n type: x.getType(),\r\n label: x.name\r\n\r\n } as IDragDropItem\r\n });\r\n\r\n event.dataTransfer.items.clear();\r\n\r\n event.dataTransfer.items.add(JSON.stringify(mappedItems), DragDropEnum.TEXT_FORMAT);\r\n\r\n return event;\r\n }\r\n\r\n //Kevin\r\n public getItems(event: any): Promise { \r\n return new Promise((resolve) => {\r\n\r\n let dragEvent: DragEvent = event.nativeEvent;\r\n\r\n let items: DataTransferItemList = dragEvent.dataTransfer.items;\r\n\r\n\r\n items[0].getAsString(function (s) {\r\n let retVal: IDragDropItem[] = JSON.parse(s) as IDragDropItem[];\r\n resolve(retVal);\r\n }); \r\n });\r\n } \r\n}\r\n\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { environment } from '../../../environments/environment';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmailService {\n\r\n constructor(private domSanitizer: DomSanitizer, private http: HttpClient) { }\n\n composeInvEmail(email: string, contactName: string, formInstanceName: string, formInstanceLink: string): SafeUrl {\n\n //Do NOT use the backtick interpolation to create this string, it will cause issues\n var mailtoProp = \"mailto:\" + email + \"?\";\n var name = contactName;\n\n if (contactName.indexOf(\"(\") > 0)\n name = contactName.substring(0, contactName.indexOf(\"(\"));\n\n var subjectProp = \"subject=\";\n var bodyProp = \"body=\";\n var amp = \"&\";\n var newLine = \"%0D%0A\";\n var footer = newLine + newLine + \"This message was automatically generated by vNext\"\n var subject = formInstanceName + \" link from vNext\";\n\n var body = \"Greetings \" + name + \",\" + newLine + newLine +\n \"Please click the following link to access the form instance \" + formInstanceName + \":\" + newLine + newLine +\n formInstanceLink;\n\n const url = `${mailtoProp}${subjectProp}${subject}&${bodyProp}${body}${footer}`;\n return this.domSanitizer.bypassSecurityTrustUrl(url)\n }\n\n //VNEXT-951: KLW - Changes to email a contact list\n public composeAllEmail(emails: string[], formInstanceName: string, formInstanceLink: string): SafeUrl {\n const url = this.composeAllEmailUrl(emails, formInstanceName, formInstanceLink);\n return this.domSanitizer.bypassSecurityTrustUrl(url)\n }\r\n\r\n public composeAllEmailUrl(emails: string[], formInstanceName: string, formInstanceLink: string): string {\n var emailsString: string = \"\";\n\n emails.forEach(email => {\n //Do NOT use the backtick interpolation to create this string, it will cause issues\n emailsString += email + \";\";\n });\n\n var mailtoProp = \"mailto:\" + emailsString + \"?\";\n\n var subjectProp = \"subject=\";\n var bodyProp = \"body=\";\n var newLine = \"%0D%0A\";\n var footer = newLine + newLine + \"This message was automatically generated by vNext\"\n var subject = formInstanceName + \" link from vNext\";\n\n var body = \"Greetings All,\" + newLine + newLine +\n \"Please click the following link to access the form instance \" + formInstanceName + \":\" + newLine + newLine +\n formInstanceLink;\n\n const url = `${mailtoProp}${subjectProp}${subject}&${bodyProp}${body}${footer}`;\n return url;\n }\n\r\n public SendErrorMail(msg: any) {\r\n let url = environment.apiUrl + \"/api/Error/SendErrorMail\";\r\n let message = { subject: msg.subject, body: msg.body, to: msg.to, CC: msg.cc };\r\n return this.http.post(url, message).toPromise();\r\n }\r\n}\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { EventSubscription } from '../models/event-subscription.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { EventNameEnum } from '../enums/event-subscription.enum';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { Folder } from '../models/site-content/folder.model';\r\n\r\n@Injectable()\r\nexport class EventSubscriptionService extends CollectApiServiceBase {\r\n\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'eventSubscription', EventSubscription)\r\n }\r\n\r\n public getFormInstanceSubscriptions(eventName: EventNameEnum, formInstance: FormInstance): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/getFormInstanceSubscriptions/${eventName}/${formInstance.id}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let ret = [];\r\n for (let sub of res) {\r\n ret.push(this.formatResponse(sub));\r\n }\r\n return ret;\r\n });\r\n }\r\n\r\n public getFolderSubscriptions(eventName: EventNameEnum, folder: Folder): Promise {\r\n\r\n let url: string = `${this.url}/${this.endpoint}/getFolderSubscriptions/${eventName}/${folder.id}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let ret = [];\r\n for (let sub of res) {\r\n ret.push(this.formatResponse(sub));\r\n }\r\n return ret;\r\n });\r\n }\r\n\r\n public subscribe(subscriptions: EventSubscription[]) {\r\n let url: string = `${this.url}/${this.endpoint}/subscribe`;\r\n return this.http.post(url, subscriptions)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n });\r\n\r\n }\r\n\r\n public unsubscribe(subscriptions: EventSubscription[]) {\r\n let subscriptionIds = subscriptions.map(x => x.id);\r\n let url: string = `${this.url}/${this.endpoint}/unsubscribe?optOut=true`;\r\n return this.http.post(url, subscriptionIds)\r\n .toPromise()\r\n .then(res => {\r\n\r\n });\r\n }\r\n\r\n public unsubscribeFromFormInstance(formInstanceId: number) {\r\n let url: string = `${this.url}/${this.endpoint}/unsubscribeFromFormInstance/${formInstanceId}`;\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(res => {\r\n\r\n });\r\n }\r\n\r\n // Overrides.\r\n formatResponse(data: EventSubscription): EventSubscription {\r\n var obj = plainToClass(EventSubscription, data);\r\n obj.eventName = Object.values(EventNameEnum)[data.eventName];\r\n return (obj);\r\n }\r\n\r\n}\r\n","\r\nexport class ExcelSiteFormDataExportRequest {\r\n public dataCollectionId: number;\r\n public selectedFormNames: string[];\r\n\r\n public constructor(dataCollectionId: number, selectedFormNames: string[]) {\r\n this.dataCollectionId = dataCollectionId;\r\n this.selectedFormNames = selectedFormNames;\r\n }\r\n}\r\n","\r\nexport class ExcelFolderFormDataExportRequest {\r\n public folderId: number;\r\n public selectedFormNames: string[];\r\n\r\n public constructor(folderId: number, selectedFormNames: string[]) {\r\n this.folderId = folderId;\r\n this.selectedFormNames = selectedFormNames;\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\nimport { ExcelSiteFormDataExportRequest } from '../models/export-import/excelSiteFormDataExportRequest';\r\nimport { ExcelFolderFormDataExportRequest } from '../models/export-import/excelFolderFormDataExportRequest';\r\n\r\n@Injectable()\r\nexport class ExcelExportService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'excelExport', FormInstance)\r\n }\r\n\r\n // Implement service methods.\r\n public exportSiteFormDataForSelectedForms(dataCollectionId: number, selectedFormNames: string[]): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportSiteFormDataForSelectedForms`;\r\n\r\n let exportRequest: ExcelSiteFormDataExportRequest = new ExcelSiteFormDataExportRequest(dataCollectionId, selectedFormNames);\r\n\r\n return this.http.post(url, exportRequest)\r\n .toPromise()\r\n .then(response => {\r\n let asyncJob: AsyncJob = this.formatAsyncJobResponse(response);\r\n let result = {\r\n dataCollectionId: dataCollectionId,\r\n asyncJob: asyncJob\r\n };\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportSiteFormData(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportSiteFormDefsAndFormData/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n //let result = plainToClass(FormInstance, response);\r\n //return result;\r\n let asyncJob: AsyncJob = this.formatAsyncJobResponse(response);\r\n //return response;\r\n let result = {\r\n dataCollectionId: dataCollectionId,\r\n asyncJob: asyncJob\r\n };\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportFolderFormDataForSelectedForms(folderId: number, selectedFormNames: string[]): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportFolderFormDataForSelectedForms`;\r\n\r\n let exportRequest: ExcelFolderFormDataExportRequest = new ExcelFolderFormDataExportRequest(folderId, selectedFormNames);\r\n\r\n return this.http.post(url, exportRequest)\r\n .toPromise()\r\n .then(response => {\r\n return this.formatAsyncJobResponse(response);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportFolderFormData(folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportFolderFormDefsAndFormData/${folderId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let asyncJob: AsyncJob = this.formatAsyncJobResponse(response);\r\n let result = {\r\n folderId: folderId,\r\n asyncJob: asyncJob\r\n };\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Implement additional public methods.\r\n public getResultFileDownloadUrl(asyncJob: AsyncJob, expectedDownloadFileName: string): string {\r\n let url = `${this.url}/${this.endpoint}/JobKey/${asyncJob.jobKey}/FileDownloadName/${expectedDownloadFileName}`;\r\n\r\n return (url);\r\n }\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n let obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpClient,\r\n HttpRequest,\r\n HttpEventType,\r\n HttpResponse,\n HttpHeaders,\r\n HttpEvent\r\n} from '@angular/common/http';\r\nimport {\r\n Subject,\r\n Observable\r\n} from 'rxjs';\r\n\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Attachment, AttachmentProperties } from '../models/attachment/attachment.model';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { plainToClass } from \"class-transformer\";\r\nimport { GenericImportDataFromExcelSpreadsheet, ImportDataServiceNames } from '../models/export-import/generic-import-data-from-excel-spreadsheet';\r\n\r\nexport enum ImportDataFromExcelDialogAction {\r\n ImportSiteStructure = 'ImportSiteStructureService',\r\n ImportSiteFormInstances = 'ImportSiteFormInstancesService',\r\n ImportFormInstanceGrids = 'ImportSiteGridsService',\r\n ImportValuesToExistingFormInstances = 'ImportValuesToExistingFormInstancesService'\r\n}\r\n\r\n@Injectable()\r\nexport class ExcelImportService extends CollectApiServiceBase {\r\n\r\n // Constructor.\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'ExcelImport', Attachment)\r\n\r\n return;\r\n }\r\n\r\n // The following method is meant to serve as a generic Excel data import endpoint.\r\n public genericImportDataFromExcelSpreadsheet(importInstructions: GenericImportDataFromExcelSpreadsheet, singleExcelFileAsArray: File[]): Promise {\r\n\r\n let url: string = `${this.url}/${this.endpoint}/GenericImportDataFromExcelSpreadsheet/${importInstructions.serviceName}/objectId/${importInstructions.getObjectId()}`;\r\n\r\n // Package the data file and create an HTTP POST request.\r\n const formData: FormData = this.packageDataFile(singleExcelFileAsArray);\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Custom service methods.\r\n public uploadExcelFile(dataCollectionId: number, folderId: number, importFile: File, notificationEmail: string, shiftClick: boolean): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/ImportExcel/${dataCollectionId}/${folderId}`;\r\n\r\n const formData: FormData = new FormData();\r\n formData.append('file', importFile, importFile.name);\r\n formData.append('email', notificationEmail);\r\n formData.append('shiftClick', String(shiftClick));\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public formatResponse(data: Attachment): Attachment {\r\n let obj = plainToClass(Attachment, data);\r\n return (obj);\r\n }\r\n\r\n public save(data: Attachment): Promise {\r\n //console.log(data.id);\r\n if (data.id > 0) {\r\n return (this.update(data));\r\n } else\r\n return (this.create(data));\r\n }\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n let obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n\r\n private packageDataFile(arrayOfOneDataFile: File[]): FormData {\r\n let formData: FormData = null;\r\n\r\n let dataFile: File = arrayOfOneDataFile.length > 0 ? arrayOfOneDataFile[0] : null;\r\n if (dataFile != null) {\r\n formData = new FormData();\r\n formData.append('file', dataFile, dataFile.name);\r\n } \r\n\r\n return formData;\r\n }\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport class ExcelImportExportTemplate implements IViewModel {\r\n public id: number; // Note: this dummy value is not used.\r\n\r\n public templateBase64Representation: string;\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { ExcelImportExportTemplate } from '../models/site-metadata/excel-import-export-template.model';\r\n\r\n@Injectable()\r\nexport class ExcelTemplateService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'excelTemplate', ExcelImportExportTemplate)\r\n }\r\n\r\n // Implement formatResponse()\r\n formatResponse(data: ExcelImportExportTemplate): ExcelImportExportTemplate {\r\n let obj = plainToClass(ExcelImportExportTemplate, data);\r\n return (obj);\r\n }\r\n\r\n // Implement service methods.\r\n public getGridExcelTemplateBase64Representation(templateFile: File): Promise {\r\n let url = `${this.url}/${this.endpoint}/getGridExcelTemplateBase64Representation`;\r\n\r\n const formData: FormData = new FormData();\r\n formData.append('file', templateFile, templateFile.name);\r\n\r\n /*\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, { \r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n */\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(response => {\r\n let asyncJob: AsyncJob = response['value']; // Not sure why this has to be done, but perhaps it's because the server is return IActionResult.\r\n let result = plainToClass(AsyncJob, asyncJob);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getGridExcelTemplateBase64RepresentationResult(asyncJob: AsyncJob): Promise {\r\n let url = `${this.url}/${this.endpoint}/getGridExcelTemplateBase64RepresentationResult/${asyncJob.jobKey}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let result = this.formatResponse(response);\r\n return result;\r\n });\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\nimport { GenericExportDataAsExcelSpreadsheet } from '../models/export-import/generic-export-data-as-excel-spreadsheet';\r\n\r\n@Injectable()\r\nexport class ExportDataService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'exportData', FormInstance)\r\n }\r\n\r\n // Service methods.\r\n public exportFormInstances(formId: number, xmlFileFormat: XmlFileFormatEnum): Promise {\r\n let url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/exportFormInstances/${formId}` :\r\n `${this.url}/${this.endpoint}/exportSimplifiedFormInstances/${formId}`);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportFormInstance(formInstanceId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportFormInstance/${formInstanceId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n \r\n public getResultFileDownloadUrl(asyncJob: AsyncJob, expectedDownloadFileName: string): string {\r\n let url = `${this.url}/${this.endpoint}/JobKey/${asyncJob.jobKey}/FileDownloadName/${expectedDownloadFileName}`;\r\n\r\n return (url);\r\n }\r\n\r\n public exportGridDataAsExcelSpreadsheet(formInstanceElementId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/ExportGridDataAsExcelSpreadsheet/${formInstanceElementId}`\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public exportRichTextHistoryAsExcelSpreadsheet(formInstanceElementId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/ExportRichTextHistoryAsExcelSpreadsheet/${formInstanceElementId}`\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public genericExportDataAsExcelSpreadsheet(exportInstructions: GenericExportDataAsExcelSpreadsheet): Promise {\r\n let url = `${this.url}/${this.endpoint}/genericExportDataAsExcelSpreadsheet`;\r\n\r\n return this.http.post(url, exportInstructions)\r\n .toPromise()\r\n .then(response => {\r\n let asyncJob: AsyncJob = response; // Not sure why this has to be done, but perhaps it's because the server is return IActionResult.\r\n let result = plainToClass(AsyncJob, asyncJob);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n var obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n } \r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { CascadingDropdownConfigRow } from '../models/site-metadata/cascading-drop-down-config-row.model';\r\n\r\n@Injectable()\r\nexport class ExportMetadataService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'exportMetadata', Form)\r\n }\r\n\r\n // Service methods.\r\n public exportFormDefinition(formId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportFormDefinition/${formId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n /*\r\n public exportCascadingDropDownConfig(formFieldId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/exportCascadingDropDownConfig/${formFieldId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(configRows => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n //return this.formatAsyncJobResponse(res);\r\n return configRows;\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n let obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n\r\n private packageDataFiles(dataFiles: File[]): FormData {\r\n const formData: FormData = new FormData();\r\n //for (let iFile: number = 0; iFile < formInstanceDataFiles.length; iFile++) {\r\n for (let iFile: number = 0; iFile < dataFiles.length; iFile++) {\r\n //let dataFile: File = formInstanceDataFiles[iFile];\r\n let dataFile: File = dataFiles[iFile];\r\n formData.append('file', dataFile, dataFile.name);\r\n }\r\n\r\n return (formData);\r\n }\r\n}\r\n","\r\nexport class TargetFieldConditionalLogicInstructions {\r\n public targetFieldId: number;\r\n public targetFieldName: string;\r\n public targetFieldDisplayName: string;\r\n\r\n public representedByTargetFieldName: string;\r\n\r\n public childFieldName: string; // Added 06-25-2024.\r\n //public applyChildFieldAttributes: boolean = false; // Added 08-06-2024.\r\n public applyChildFieldAttributes: boolean = true; // Added 08-06-2024.\r\n\r\n public showTargetField: boolean;\r\n public makeTargetFieldEditable: boolean;\r\n public makeTargetFieldRequired: boolean;\r\n\r\n public applyFilter: boolean; // Added 09-04-2024.\r\n public filterValue: string; // Added 06-25-2024.\r\n public filterOperator: string; // Added 06-25-2024.\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { TargetFieldConditionalLogicInstructions } from './target-field-logic-instructions';\r\n\r\nexport class SourceFieldChangeConditionalLogicInstructions {\r\n public triggeringSourceFieldId: number;\r\n\r\n @Type(() => TargetFieldConditionalLogicInstructions)\r\n public targetFieldInstructions: TargetFieldConditionalLogicInstructions[];\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { TargetFieldConditionalLogicInstructions } from './target-field-logic-instructions';\r\n\r\nexport class FormInstanceLoadedConditionalLogicInstructions {\r\n public formInstanceId: number;\r\n\r\n @Type(() => TargetFieldConditionalLogicInstructions)\r\n public targetFieldInstructions: TargetFieldConditionalLogicInstructions[];\r\n}\r\n","import { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { TargetFieldConditionalLogicInstructions } from './target-field-logic-instructions';\r\n\r\nexport class SiteHomePageLoadedConditionalLogicInstructions {\r\n public dataCollectionId: number;\r\n\r\n @Type(() => TargetFieldConditionalLogicInstructions)\r\n public targetFieldInstructions: TargetFieldConditionalLogicInstructions[];\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { plainToClass } from 'class-transformer';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\nimport { FormFieldActionInstructions } from '../models/field-conditional-logic/field-action-instructions.model';\r\nimport { FormFieldActionNameEnum } from '../models/field-conditional-logic/enums';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { FormFieldExpression } from '../models/field-conditional-logic/form-field-expression.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { environment } from '../../../environments/environment';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { SourceFieldChangeConditionalLogicInstructions } from '../models/site-metadata/source-field-change-logic-instructions.model';\r\nimport { FieldConditionalLogicActionNameEnum, FieldConditionalLogicTargetFieldDefaultAttrs } from '../models/field-conditional-logic/enums';\r\n//import { IOperandSymbolToCompareMethodName, allFieldOperators } from '../models/field-conditional-logic/conditional-logic-operators.model';\r\nimport { ConditionalLogicRuleOperator } from '../models/field-conditional-logic/rule-operator.model';\r\nimport { FormInstanceLoadedConditionalLogicInstructions } from '../models/site-metadata/form-instance-loaded-logic-instructions.model';\r\nimport { FormFieldComparisonOperatorNameEnum } from '../models/field-conditional-logic/enums';\r\nimport { SiteHomePageLoadedConditionalLogicInstructions } from '../models/site-metadata/site-home-page-loaded-logic-instructions.model';\r\n\r\nexport class FormFieldActionValue {\r\n public actionDisplayName: FieldConditionalLogicActionNameEnum;\r\n public actionValue: string; // The value that is stored in the database.\r\n\r\n public constructor(actionDisplayName: FieldConditionalLogicActionNameEnum, actionValue: string) {\r\n this.actionDisplayName = actionDisplayName;\r\n this.actionValue = actionValue;\r\n }\r\n}\r\n\r\nexport class TargetFieldDefaultAttributeValue {\r\n public attributeDisplayName: FieldConditionalLogicTargetFieldDefaultAttrs;\r\n public attributeValue: string;\r\n\r\n public constructor(attributeDisplayName: FieldConditionalLogicTargetFieldDefaultAttrs, attributeValue: string) {\r\n this.attributeDisplayName = attributeDisplayName;\r\n this.attributeValue = attributeValue;\r\n }\r\n}\r\n\r\nexport interface IOperandSymbolToCompareMethodName {\r\n [operatorSymbol: string]: string;\r\n}\r\n\r\ninterface IActionNameToPrecedence {\r\n [actionName: string]: number;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FieldConditionalLogicService extends CollectApiServiceBase {\r\n // Properties.\r\n // Static data.\r\n private static formFieldActionInstructions: FormFieldActionInstructions[] =\r\n [\r\n {\r\n actionName: FormFieldActionNameEnum.Show,\r\n oppositeActionName: FormFieldActionNameEnum.Hide,\r\n\r\n applyActionStyles: [\r\n 'apply-show-action'\r\n ],\r\n applyActionStylesToRemove: [\r\n 'apply-hide-action'\r\n ],\r\n reverseActionStyles: [\r\n 'reverse-show-action'\r\n ],\r\n\r\n appliesFormFieldAttribute: false,\r\n formFieldAttributeName: null,\r\n formFieldAttributeValue: null\r\n },\r\n {\r\n actionName: FormFieldActionNameEnum.Hide,\r\n oppositeActionName: FormFieldActionNameEnum.Show,\r\n\r\n applyActionStyles: [\r\n 'apply-hide-action'\r\n ],\r\n applyActionStylesToRemove: [\r\n 'apply-show-action'\r\n ],\r\n reverseActionStyles: [\r\n 'reverse-hide-action'\r\n ],\r\n\r\n appliesFormFieldAttribute: false,\r\n formFieldAttributeName: null,\r\n formFieldAttributeValue: null\r\n },\r\n {\r\n actionName: FormFieldActionNameEnum.Require,\r\n oppositeActionName: FormFieldActionNameEnum.DoNotRequire,\r\n\r\n applyActionStyles: [\r\n 'apply-require-action'\r\n ],\r\n applyActionStylesToRemove: [\r\n ],\r\n reverseActionStyles: [\r\n 'reverse-require-action'\r\n ],\r\n\r\n appliesFormFieldAttribute: true,\r\n formFieldAttributeName: 'required',\r\n formFieldAttributeValue: 'true'\r\n },\r\n {\r\n actionName: FormFieldActionNameEnum.DoNotRequire,\r\n oppositeActionName: FormFieldActionNameEnum.Require,\r\n\r\n applyActionStyles: [\r\n 'apply-do-not-require-action'\r\n ],\r\n applyActionStylesToRemove: [\r\n ],\r\n reverseActionStyles: [\r\n 'reverse-do-not-require-action'\r\n ],\r\n\r\n appliesFormFieldAttribute: true,\r\n formFieldAttributeName: 'required',\r\n formFieldAttributeValue: 'false'\r\n }\r\n // TO DO: ADD ENTRIES FOR EDITABLE AND POSSIBLY INSTRUCTION OPTIONS.\r\n // TO DO: ADD PROPERTY FOR ORDER OF PRECEDENCE.\r\n ];\r\n\r\n private static allFieldOperators: ConditionalLogicRuleOperator[] =\r\n [\r\n {\r\n id: 1,\r\n name: 'Is greater than',\r\n //symbol: '>',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsGreaterThan,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: false,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 2,\r\n name: 'Is greater than or equal to',\r\n //symbol: '>=',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsGreaterThanOrEqualTo,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: false,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 3,\r\n name: 'Equals',\r\n //symbol: '=',\r\n symbol: FormFieldComparisonOperatorNameEnum.Equals,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: true,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 4,\r\n name: 'Does not equal',\r\n //symbol: '<>',\r\n symbol: FormFieldComparisonOperatorNameEnum.DoesNotEqual,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: true,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 5,\r\n name: 'Is less than',\r\n //symbol: '<',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsLessThan,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: false,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 6,\r\n name: 'Is less than or equal to',\r\n //symbol: '<=',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsLessThanOrEqualTo,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: false,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 7,\r\n name: 'Includes/IN',\r\n symbol: FormFieldComparisonOperatorNameEnum.InListOfValues,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: false,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 8,\r\n name: 'Does not Include/NOT_IN',\r\n symbol: FormFieldComparisonOperatorNameEnum.NotInListOfValues,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: false,\r\n requiresOperandValue: true \r\n },\r\n {\r\n id: 9,\r\n name: 'Starts With',\r\n symbol: FormFieldComparisonOperatorNameEnum.StartsWith,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: false,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 10,\r\n name: 'Ends With',\r\n symbol: FormFieldComparisonOperatorNameEnum.EndsWith,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: false,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 11,\r\n name: 'Contains',\r\n symbol: FormFieldComparisonOperatorNameEnum.Contains,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: false,\r\n requiresOperandValue: true\r\n },\r\n {\r\n id: 12,\r\n name: 'IsEmpty',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsEmpty,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: true,\r\n requiresOperandValue: false\r\n },\r\n {\r\n id: 13,\r\n name: 'IsNotEmpty',\r\n symbol: FormFieldComparisonOperatorNameEnum.IsNotEmpty,\r\n appliesToNumericFields: false,\r\n appliesToTextFields: true,\r\n appliesToDateFields: true,\r\n requiresOperandValue: false\r\n },\r\n /*\r\n {\r\n id: 14,\r\n name: 'Range/Between',\r\n symbol: FormFieldComparisonOperatorNameEnum.Between,\r\n appliesToNumericFields: true,\r\n appliesToTextFields: false,\r\n appliesToDateFields: true,\r\n requiresOperandValue: true\r\n },\r\n */\r\n ];\r\n\r\n private static availableFormFieldActions: FieldConditionalLogicActionNameEnum[] =\r\n [\r\n FieldConditionalLogicActionNameEnum.NoAction,\r\n FieldConditionalLogicActionNameEnum.Show,\r\n FieldConditionalLogicActionNameEnum.CanEdit,\r\n FieldConditionalLogicActionNameEnum.Require,\r\n FieldConditionalLogicActionNameEnum.Show_CanEdit,\r\n FieldConditionalLogicActionNameEnum.Show_CanEdit_Require\r\n ]\r\n\r\n private static availableFormFieldActionValues: FormFieldActionValue[] =\r\n [\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.NoAction, FieldConditionalLogicActionNameEnum.NoAction),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.Show, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.Show)),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.CanEdit, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.CanEdit)),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.Require, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.Require)),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.Show_CanEdit, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.Show_CanEdit)),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.Show_CanEdit_Require, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.Show_CanEdit_Require)),\r\n new FormFieldActionValue(FieldConditionalLogicActionNameEnum.ApplyFilter, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicActionNameEnum.ApplyFilter)),\r\n ];\r\n\r\n private static targetFieldActionsInOrderOfPrecedence: FieldConditionalLogicActionNameEnum[] = \r\n [\r\n FieldConditionalLogicActionNameEnum.Show_CanEdit_Require,\r\n FieldConditionalLogicActionNameEnum.Show_CanEdit,\r\n\r\n FieldConditionalLogicActionNameEnum.Show,\r\n FieldConditionalLogicActionNameEnum.CanEdit,\r\n FieldConditionalLogicActionNameEnum.Require\r\n ];\r\n\r\n private static targetFieldDefaultAttributes: FieldConditionalLogicTargetFieldDefaultAttrs[] =\r\n [\r\n FieldConditionalLogicTargetFieldDefaultAttrs.None,\r\n\r\n FieldConditionalLogicTargetFieldDefaultAttrs.Show,\r\n FieldConditionalLogicTargetFieldDefaultAttrs.Show_CanEdit\r\n ];\r\n private static targetFieldDefaultAttributeValues: TargetFieldDefaultAttributeValue[] =\r\n [\r\n new TargetFieldDefaultAttributeValue(FieldConditionalLogicTargetFieldDefaultAttrs.None, FieldConditionalLogicTargetFieldDefaultAttrs.None),\r\n\r\n new TargetFieldDefaultAttributeValue(FieldConditionalLogicTargetFieldDefaultAttrs.Show, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicTargetFieldDefaultAttrs.Show)),\r\n new TargetFieldDefaultAttributeValue(FieldConditionalLogicTargetFieldDefaultAttrs.Show_CanEdit, FieldConditionalLogicService.removeCommasAndSpacesFrom(FieldConditionalLogicTargetFieldDefaultAttrs.Show_CanEdit))\r\n ];\r\n\r\n private static mapOfTargetFieldActionPrecedences: IActionNameToPrecedence = {};\r\n\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'fieldConditionalLogic', FormFieldExpression)\r\n }\r\n\r\n // Static methods.\r\n public static get AllFieldOperators(): ConditionalLogicRuleOperator[] {\r\n return FieldConditionalLogicService.allFieldOperators;\r\n }\r\n public static get AllTextFieldOperators(): ConditionalLogicRuleOperator[] {\r\n return FieldConditionalLogicService.allFieldOperators.filter(o => o.appliesToTextFields);\r\n }\r\n public static get AllNumericFieldOperators(): ConditionalLogicRuleOperator[] {\r\n return FieldConditionalLogicService.allFieldOperators.filter(o => o.appliesToNumericFields);\r\n }\r\n \r\n private static removeCommasAndSpacesFrom(actionName: string): string {\r\n return actionName.replace(/, /g, '|').replace(/ /g, '');\r\n }\r\n\r\n // Implement formatResponse.\r\n public formatResponse(data: FormFieldExpression): FormFieldExpression {\r\n let obj = plainToClass(FormFieldExpression, data);\r\n return (obj);\r\n }\r\n\r\n // Service methods.\r\n public getFormInstanceLoadedTargetFieldInstructions(formInstanceId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getFormLoadedTargetFieldInstructions/${formInstanceId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(formInstanceLoadedInstructions => {\r\n let instructionsResult: FormInstanceLoadedConditionalLogicInstructions = plainToClass(FormInstanceLoadedConditionalLogicInstructions, formInstanceLoadedInstructions);\r\n return instructionsResult;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteHomePageLoadedTargetFieldInstructions(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteHomePageLoadedTargetFieldInstructions/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(formInstanceLoadedInstructions => {\r\n let instructionsResult: SiteHomePageLoadedConditionalLogicInstructions = plainToClass(SiteHomePageLoadedConditionalLogicInstructions, formInstanceLoadedInstructions);\r\n return instructionsResult;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public sourceFieldValueChanged(formInstance: FormInstance, sourceFieldId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/sourceFieldValueChanged/${sourceFieldId}`;\r\n return this.http.put(url, formInstance)\r\n .toPromise()\r\n .then(sourceFieldChangeInstructions => {\r\n let instructionsResult: SourceFieldChangeConditionalLogicInstructions = plainToClass(SourceFieldChangeConditionalLogicInstructions, sourceFieldChangeInstructions);\r\n return instructionsResult;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormFieldActionInstructions(): FormFieldActionInstructions[] {\r\n return FieldConditionalLogicService.formFieldActionInstructions;\r\n }\r\n\r\n public getAvailableTargetFieldDefaultAttributes(): FieldConditionalLogicTargetFieldDefaultAttrs[] {\r\n return FieldConditionalLogicService.targetFieldDefaultAttributes;\r\n }\r\n public getAvailableTargetFieldDefaultAttributeValues(): TargetFieldDefaultAttributeValue[] {\r\n return FieldConditionalLogicService.targetFieldDefaultAttributeValues;\r\n }\r\n\r\n public getAvailableFormFieldActions(): FieldConditionalLogicActionNameEnum[] {\r\n return FieldConditionalLogicService.availableFormFieldActions;\r\n }\r\n public getAvailableFormFieldActionValues(): FormFieldActionValue[] {\r\n return FieldConditionalLogicService.availableFormFieldActionValues;\r\n }\r\n\r\n public getAvailableFieldOperators(): ConditionalLogicRuleOperator[] {\r\n return FieldConditionalLogicService.allFieldOperators;\r\n }\r\n public getFieldOperatorFromSymbol(operatorSymbol: string): ConditionalLogicRuleOperator {\r\n let operator: ConditionalLogicRuleOperator = FieldConditionalLogicService.allFieldOperators.find(o => o.symbol == operatorSymbol);\r\n return operator;\r\n }\r\n public getFieldOperatorFromId(operatorId: number): ConditionalLogicRuleOperator {\r\n let operator: ConditionalLogicRuleOperator = FieldConditionalLogicService.allFieldOperators.find(o => o.id == operatorId);\r\n return operator;\r\n }\r\n\r\n public compareFieldActions(action1: string, action2: string): number {\r\n // If the map of actions by precedence is not yet loaded, do that now.\r\n if (Object.keys(FieldConditionalLogicService.mapOfTargetFieldActionPrecedences).length == 0) {\r\n for (let index: number = 0; index < FieldConditionalLogicService.targetFieldActionsInOrderOfPrecedence.length; index++) {\r\n let actionName: FieldConditionalLogicActionNameEnum = FieldConditionalLogicService.targetFieldActionsInOrderOfPrecedence[index];\r\n FieldConditionalLogicService.mapOfTargetFieldActionPrecedences[actionName] = (index + 1);\r\n }\r\n }\r\n\r\n // Compare the two actions and return the result.\r\n let action1Precedence: number = FieldConditionalLogicService.mapOfTargetFieldActionPrecedences[action1];\r\n let action2Precedence: number = FieldConditionalLogicService.mapOfTargetFieldActionPrecedences[action2];\r\n\r\n if (action1Precedence == null)\r\n throw `FieldConditionalLogicService.compareFieldActions(): cannot get a precedence for action '${action1}'.`;\r\n else if (action2Precedence == null)\r\n throw `FieldConditionalLogicService.compareFieldActions(): cannot get a precedence for action '${action2}'.`;\r\n\r\n let iCompare: number = 0;\r\n if (action1Precedence != action2Precedence)\r\n iCompare = action1Precedence < action2Precedence ? -1 : 1;\r\n\r\n return iCompare;\r\n }\r\n\r\n // Helper methods.\r\n public getFormConditionalLogicExpr(form: Form): FormFieldExpression[] {\r\n return form.conditionalLogicRules != null ? form.conditionalLogicRules : [];\r\n }\r\n}\r\n","import { ComponentFactoryResolver, ViewContainerRef, ComponentRef, Type as AngularCoreType } from '@angular/core';\r\nimport { FieldDefinition, FieldDefinitionAllowDropFlags } from '../field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { LayoutCell } from '../layout-cell.model';\r\nimport { LayoutRow } from '../layout-row.model';\r\nimport { Form } from '../form.model';\r\nimport { FormObjectDroppedFlags } from '../form-object-dropped-flags.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { SelectOptionValue } from '../../selection-fields/select-option-value.model';\r\n//import { IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { ConditionalLogicRuleOperator } from '../../field-conditional-logic/rule-operator.model';\r\n//import { FormFieldComparisonOperatorNameEnum } from '../../field-conditional-logic/enums';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\n//import { InstructionsFieldType } from '../form-field-types';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\n//import { IOperandSymbolToCompareMethodName, allFieldOperators } from '../../field-conditional-logic/conditional-logic-operators.model';\r\nimport { KendoGridOperatorName } from '../../../enums/kendo-grid/kendo-grid-operator-name.enum';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\n// Define/implement field definition custom logic classes.\r\n// Define the custom logic handler that does nothing (works for most field definition classes).\r\nexport class DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n public constructor() { };\r\n\r\n public performSpecialFormAction(form: Form, row: LayoutRow, dropCell: LayoutCell, definition: FieldDefinition, objectDroppedFlags: FormObjectDroppedFlags): void {\r\n // Note: this method perform no function by design.\r\n }\r\n\r\n public pushFormPreRenderFilterFor(formField: FormField): IFormPreRenderFilter {\r\n return null; // This class has no pre-render filter.\r\n }\r\n public popFormPreRenderFilter(filter: IFormPreRenderFilter, formField: FormField): boolean {\r\n return false;\r\n }\r\n\r\n public checkAllowsNestedDrop(fieldDefinition: FieldDefinition, alowsDropFlags: FieldDefinitionAllowDropFlags): void {\r\n // Note: this method is a NOOP by design.\r\n }\r\n\r\n public fieldDraggedToTrash(formField: FormField, form: Form): void {\r\n // Note: this method is a NOOP by design.\r\n }\r\n\r\n public get canHaveInstructions(): boolean {\r\n return true;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean{\r\n return false;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return false;\r\n }\r\n\r\n public hasCustomFormLayoutStylesFor(formField: FormField): boolean {\r\n return false;\r\n }\r\n public customFormLayoutStylesFor(formField: FormField): string {\r\n return null;\r\n }\r\n\r\n public hasCustomFormFieldLayoutStylesFor(formField: FormField): boolean {\r\n return false;\r\n }\r\n public customFormFieldLayoutStylesFor(formField: FormField): string {\r\n return null;\r\n }\r\n\r\n public hasVirtualSiblingFormFieldsFor(formField: FormField): boolean {\r\n return false;\r\n }\r\n public getVirtualSiblingFormFieldsFor(formField: FormField): FormField[] {\r\n return null;\r\n }\r\n\r\n public displayDeleteIconInGridFor(formField: FormField): boolean {\r\n return true;\r\n }\r\n\r\n public getAvailableOperatorsFor(formField: FormField): ConditionalLogicRuleOperator[] {\r\n return [];\r\n }\r\n public getSelectableValuesFor(formField: FormField): SelectOptionValue[] {\r\n return [];\r\n }\r\n public compare(leftOperand: any, operator: string, rightOperand: any): boolean {\r\n return false;\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n // Note: the default version of this method does nothing by design.\r\n //\r\n // Derived logic handler classes must handle this method.\r\n }\r\n public validateData(formField: FormField, formInstanceElement: FormInstanceElement, dataValue: string): boolean {\r\n // Note: this default implementation returns false by design.\r\n return false;\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n // Note: this default implementation simply returns zero.\r\n return 0;\r\n }\r\n public compareDescendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = - this.compareAscendingFor(formField, value1, value2);\r\n return compareResult;\r\n }\r\n\r\n public compareValuesAscending(value1: any, value2: any): number {\r\n // Note: this default implementation simply returns zero.\r\n return 0;\r\n }\r\n public compareValuesDescending(value1: any, value2: any): number {\r\n // Note: this default implementation simply returns zero.\r\n return 0;\r\n }\r\n\r\n public allowsHtmlInDisplayValue(): boolean {\r\n return false; // A default.\r\n }\r\n\r\n public createFormFieldDynamically(componentFactoryResolver: ComponentFactoryResolver,\r\n fieldDefinitionService: FieldDefinitionService,\r\n viewContainerRef: ViewContainerRef,\r\n formFieldClass: AngularCoreType,\r\n formField: FormField,\r\n mode: string,\r\n formInstanceElement: FormInstanceElement,\r\n bReadOnly: boolean,\r\n parentComponentPrefix: string,\r\n useGridSpecificStyling: boolean): ComponentRef\r\n {\r\n let componentRef = FormFieldBaseComponent.staticCreateFormFieldDynamically(componentFactoryResolver, fieldDefinitionService, viewContainerRef, formField, formFieldClass, mode, formInstanceElement, bReadOnly, parentComponentPrefix, useGridSpecificStyling);\r\n return componentRef;\r\n }\r\n\r\n public setFieldSpecificValuesForDynamicallyCreatedField(formFieldComponent: FormFieldBaseComponent, formField: FormField, parentComponentPrefix: string): void {\r\n // NOTE: THIS DEFAULT IMPLEMENTATION IS A NOOP BY DESIGN.\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n return \"\";\r\n }\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n // NOTE: THIS METHOD RETURNS NO PROPERTIES BY DEFAULT.\r\n return {};\r\n }\r\n public hasNumericData(): boolean {\r\n return false; // A default implementation.\r\n }\r\n public getNumericValue(formFieldParam: FormField, otherFormFields: FormField[], formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): number {\r\n return 0;\r\n }\r\n public hasDollarSignPrefix(): boolean {\r\n return false;\r\n }\r\n /*\r\n public saveData(formInstance: any): void {\r\n // NOTE: THIS DEFAULT IMPLEMENTATION IS A NOOP BY DESIGN.\r\n }\r\n */\r\n\r\n // Methods presently only relevant to the formula field def logic class/the behavior of the formula form field.\r\n public requiresFieldValueUpdate(): boolean {\r\n return false;\r\n }\r\n public formFieldValuesUpdated(fieldDefinitionService: FieldDefinitionService, otherFormFields: FormField[], otherFormInstanceElements: FormInstanceElement[], gridRow: IGridRow, formField: FormField, formInstanceElementToUpdate: FormInstanceElement): void {\r\n // Note: this method is a NOOP by design.\r\n }\r\n\r\n // Protected methods.\r\n // Note: the following method needs to be tested before its first use.\r\n public static needsTestingBeforeFirstUse_fieldDefinitionClassNameToFieldTypeName(fieldDefinitionClassName: string): string {\r\n let result:string = null;\r\n\r\n let fieldDefNameParts = fieldDefinitionClassName.split('.');\r\n if ((fieldDefNameParts != null) && (fieldDefNameParts.length > 0)) {\r\n let lastNamePart = fieldDefNameParts[fieldDefNameParts.length - 1];\r\n let suffixLocation: number = lastNamePart.indexOf(\"FieldDefinition\");\r\n //result = lastNamePart.replace(suffixLocation, '');\r\n result = lastNamePart.substr(1, suffixLocation);\r\n } else {\r\n let errorMsg = `DefaultFieldDefinitionClientLogic.fieldDefinitionClassNameToFieldTypeName(): encountered unexpected field definition class name '${fieldDefinitionClassName}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n return (result);\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return false;\r\n }\r\n public filterOperator(): string {\r\n // Default to 'contains'.\r\n return 'contains';\r\n }\r\n\r\n public filterType(): string {\r\n return null;\r\n }\r\n\r\n public getDefaultMaxLengthWhenInGrid(): number {\r\n return null;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return false;\r\n }\r\n public isURLLink(): boolean {\r\n return false;\r\n }\r\n\r\n public whenInGridShowAs(): string {\r\n return 'SPAN';\r\n }\r\n\r\n public displayValueWithQuotationMarks(): boolean {\r\n return false;\r\n }\r\n\r\n public getDefaultKendoGridOperatorName(): KendoGridOperatorName {\r\n return KendoGridOperatorName.Equals;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n return null;\r\n }\r\n\r\n public getNumericValueFrom(value: string): number {\r\n return (value != null) && (value.trim() != '') ? parseFloat(value.replace(/,/g, '')) : 0;\r\n }\r\n\r\n public fieldCanBeUsedInSiteHomePageConditionalLogic(formField: FormField): boolean {\r\n return false;\r\n }\r\n public createSiteHomePageFormInstanceElementFor(formField: FormField): FormInstanceElement {\r\n let formInstanceElement = new FormInstanceElement();\r\n formInstanceElement.formFieldId = formField.id;\r\n formInstanceElement.formFieldName = formField.name;\r\n formInstanceElement.formField = formField;\r\n return formInstanceElement;\r\n }\r\n\r\n public isATypeOfGridField(formField: FormField): boolean {\r\n return false;\r\n }\r\n\r\n // By default, clicking on a field in a grid row will trigger editing of that row\r\n public doNotTriggerGridRowEditFor(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\n","import { FieldDefinition } from '../field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { LayoutCell } from '../layout-cell.model';\r\nimport { LayoutRow } from '../layout-row.model';\r\nimport { Form } from '../form.model';\r\nimport { FormObjectDroppedFlags } from '../form-object-dropped-flags.model';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\n\r\nexport class AddRowAboveFieldDefinitionCustomLogic extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement IFieldDefinitionLogic.\r\n public performSpecialFormAction(form: Form, row: LayoutRow, dropCell: LayoutCell, definition: FieldDefinition, objectDroppedFlags: FormObjectDroppedFlags): void {\r\n form.formLayout.addRowAbove(row);\r\n }\r\n}\r\n","import { FieldDefinition } from '../field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { LayoutCell } from '../layout-cell.model';\r\nimport { LayoutRow } from '../layout-row.model';\r\nimport { Form } from '../form.model';\r\nimport { FormObjectDroppedFlags } from '../form-object-dropped-flags.model';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\n\r\nexport class AddRowBelowFieldDefinitionCustomLogic extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public performSpecialFormAction(form: Form, row: LayoutRow, dropCell: LayoutCell, definition: FieldDefinition, objectDroppedFlags: FormObjectDroppedFlags): void {\r\n form.formLayout.addRowBelow(row);\r\n }\r\n}\r\n","import { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../../../models/cascading-dropdown/cascading-dropdown-data.model';\r\n\r\nexport class CascadingDropdownFieldDefLogic extends DefaultFieldDefinitionClientLogic {\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public allowsHtmlInDisplayValue(): boolean {\r\n return true;\r\n }\r\n\r\n // Note: need to implement sorting logic.\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let displayValue: string = '';\r\n\r\n if ((!formInstanceElementParam.UserUpdatedData) || (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n } else if ((formFieldParam.jsonConfig != null) && (formFieldParam.jsonConfig.trim() != '') && (formInstanceElementParam.textValue != null) && (formInstanceElementParam.textValue.trim() != '')) {\r\n let config: CascadingDropDownFormFieldConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formFieldParam.jsonConfig);\r\n\r\n displayValue = CascadingDropDownFormFieldData.getDisplayValue(config, formInstanceElementParam.textValue);\r\n }\r\n\r\n return displayValue;\r\n }\r\n \r\n\r\n public hasVirtualSiblingFormFieldsFor(formField: FormField): boolean {\r\n return true; // TODO fully implement this\r\n }\r\n\r\n public getVirtualSiblingFormFieldsFor(formField: FormField): FormField[] {\r\n let virtualFormFields: FormField[] = [];\r\n\r\n if (formField.jsonConfig != null && formField.jsonConfig.trim() != '') {\r\n let cascadingDropdownConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n\r\n if ((cascadingDropdownConfig != null) && (cascadingDropdownConfig.NumLevels > 0)) {\r\n for (let index: number = 0; index < cascadingDropdownConfig.DropDownHeaders.length; index++) {\r\n let header: string = cascadingDropdownConfig.DropDownHeaders[index];\r\n\r\n let virtualFormField: FormField = new FormField();\r\n\r\n virtualFormField.transientFieldIsVirtual = true;\r\n virtualFormField.primaryFieldName = formField.name;\r\n virtualFormField.fieldOrder = formField.fieldOrder;\r\n virtualFormField.fieldSecondaryOrder = index;\r\n virtualFormField.name = `${formField.name}_vff${index}`;\r\n virtualFormField.displayName = header;\r\n\r\n virtualFormFields.push(virtualFormField);\r\n }\r\n }\r\n }\r\n\r\n return virtualFormFields;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../../../models/form-builder/form-instance-element.model';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { CascadingDropDownFormFieldData } from '../../../models/cascading-dropdown/cascading-dropdown-data.model';\r\n\r\nexport class CascadingDropdownVirtualFieldDefLogic extends DefaultFieldDefinitionClientLogic {\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public allowsHtmlInDisplayValue(): boolean {\r\n return true;\r\n }\r\n \r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { ConditionalLogicRuleOperator } from '../../field-conditional-logic/rule-operator.model';\r\nimport { FormFieldComparisonOperatorNameEnum } from '../../field-conditional-logic/enums';\r\n//import { IOperandSymbolToCompareMethodName, allFieldOperators } from '../../field-conditional-logic/conditional-logic-operators.model';\r\nimport { FieldConditionalLogicService, IOperandSymbolToCompareMethodName } from '../../../services/field-conditional-logic.service';\r\n\r\nexport abstract class BinaryComparisonTypesFieldDefinitionLogicBase extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n // Static data.\r\n //private static myFieldOperators: ConditionalLogicRuleOperator[] = allFieldOperators.filter(o => o.appliesToTextFields);\r\n private static myFieldOperators: ConditionalLogicRuleOperator[] = FieldConditionalLogicService.AllTextFieldOperators;\r\n\r\n private static operatorSymbolsToMethodNames: IOperandSymbolToCompareMethodName = null;\r\n\r\n // Constructor.\r\n public constructor() {\r\n if (BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames == null) {\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames = {};\r\n\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.Equals] = 'equals';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.DoesNotEqual] = 'doesNotEqual';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.InListOfValues] = 'inListOfValues';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.NotInListOfValues] = 'notInListOfValues';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.StartsWith] = 'startsWith';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.EndsWith] = 'endsWith';\r\n BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.Contains] = 'contains';\r\n }\r\n\r\n super();\r\n }\r\n\r\n // Abstract methods.\r\n protected abstract formatValueForCompare(value: any): any;\r\n\r\n // IFieldDefinitionLogic methods.\r\n public getAvailableOperatorsFor(formField: FormField): ConditionalLogicRuleOperator[] {\r\n return BinaryComparisonTypesFieldDefinitionLogicBase.myFieldOperators;\r\n }\r\n public compare(leftOperand: any, operatorSymbol: string, rightOperand: any): boolean {\r\n let leftFormattedOperand: any = this.formatValueForCompare(leftOperand);\r\n let rightFormattedOperand: any = this.formatValueForCompare(rightOperand);\r\n\r\n let comparisonMethodName = BinaryComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[operatorSymbol];\r\n if (comparisonMethodName == null) {\r\n let errorMsg = `BinaryComparisonTypesFieldDefinitionLogicBase.compare(): this field type does not support comparion operator '${operatorSymbol}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n let result: boolean = this[comparisonMethodName](leftFormattedOperand, rightFormattedOperand);\r\n return result;\r\n }\r\n\r\n // Helper methods.\r\n private equals(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand == rightOperand;\r\n }\r\n private doesNotEqual(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand != rightOperand;\r\n }\r\n private inListOfValues(leftOperand: any, rightOperand: any): boolean {\r\n let inResult: boolean = false;\r\n\r\n if ((rightOperand != null) && (rightOperand.toString() != '')) {\r\n let listOfValues: string[] = rightOperand.toString().split('|');\r\n\r\n if (listOfValues != null) {\r\n for (let index: number = 0; index < listOfValues.length; index++) {\r\n let value: string = listOfValues[index];\r\n\r\n if (leftOperand == value) {\r\n inResult = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return inResult;\r\n }\r\n private notInListOfValues(leftOperand: any, rightOperand: any): boolean {\r\n return !this.inListOfValues(leftOperand, rightOperand);\r\n }\r\n private startsWith(leftOperand: any, rightOperand: any): boolean {\r\n let result: boolean = false;\r\n\r\n if ((leftOperand != null) && (rightOperand != null))\r\n result = leftOperand.toString().startsWith(rightOperand.toString());\r\n\r\n return result;\r\n }\r\n private endsWith(leftOperand: any, rightOperand: any): boolean {\r\n let result: boolean = false;\r\n\r\n if ((leftOperand != null) && (rightOperand != null))\r\n result = leftOperand.toString().endsWith(rightOperand.toString());\r\n\r\n return result;\r\n }\r\n private contains(leftOperand: any, rightOperand: any): boolean {\r\n let result: boolean = false;\r\n\r\n if ((leftOperand != null) && (rightOperand != null))\r\n result = leftOperand.toString().includes(rightOperand.toString());\r\n\r\n return result;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { BinaryComparisonTypesFieldDefinitionLogicBase } from './binary-comparison-base-logic';\r\nimport { SelectOptionValue } from '../../selection-fields/select-option-value.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class CheckboxFieldDefLogic extends BinaryComparisonTypesFieldDefinitionLogicBase { //DefaultFieldDefinitionClientLogic {\r\n // Static data.\r\n private static selectOptionValues: SelectOptionValue[] = [\r\n { id: 1, displayName: 'true' },\r\n { id: 2, displayName: 'false' }\r\n ];\r\n\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement IFieldDefinitionLogic methods.\r\n public getSelectableValuesFor(formField: FormField): SelectOptionValue[] {\r\n return CheckboxFieldDefLogic.selectOptionValues;\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n formInstanceElement.booleanValue = ((pasteValue != null) && pasteValue.toLowerCase() == 'true' ? true : false);\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.booleanValue != null) && (value2.booleanValue != null)) {\r\n if (value1.booleanValue != value2.booleanValue) {\r\n //compareResult = (value1.booleanValue == true ? 1 : -1);\r\n compareResult = (value1.booleanValue == true ? -1 : 1);\r\n }\r\n } else if (value1.booleanValue != null) {\r\n compareResult = 1;\r\n } else if (value2.booleanValue != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public allowsHtmlInDisplayValue(): boolean {\r\n return true;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n //VNEXT-981 - KLW: Changes to display a checkbox on the Site Homepage as disabled, use this string to add a class to make the checkbox read only\r\n let disableClass: string = '';\r\n \r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.booleanValue)) {\r\n // Set a default value.\r\n //this.setDefaultBooleanValue();\r\n FormFieldBaseComponent.staticSetDefaultBooleanValue(formFieldParam, formInstanceElementParam);\r\n\r\n formInstanceElementParam.BooleanValue = formInstanceElementParam.booleanValue;\r\n }\r\n\r\n //VNEXT-981 - KLW: Changes to display a checkbox on the Site Homepage as disabled, set the class name\r\n if (formFieldParam.readOnly)\r\n { \r\n disableClass = 'disabled-icon';\r\n } \r\n\r\n //VNEXT-981 - KLW: Changes to display a checkbox on the Site Homepage as disabled\r\n return (formInstanceElementParam.booleanValue ? `check_box` : `check_box_outline_blank`);\r\n }\r\n\r\n // Implement abstract methods.\r\n protected formatValueForCompare(value: any): any {\r\n let result: boolean = false;\r\n\r\n if ((value != null) && (value.toString().toLowerCase() == 'true'))\r\n result = true;\r\n\r\n return result;\r\n }\r\n\r\n\r\n public filterType(): string {\r\n return 'boolean';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: string = colValue.booleanValue == true ? 'true' : 'false';\r\n return fieldValue;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { FormField } from '../form-field.model';\r\n//import { IFormFieldComponent } from '../../../interfaces/iform-field-component';\r\nimport { ConditionalLogicRuleOperator } from '../../field-conditional-logic/rule-operator.model';\r\nimport { FormFieldComparisonOperatorNameEnum } from '../../field-conditional-logic/enums';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\n//import { InstructionsFieldType } from '../form-field-types';\r\n//import { IOperandSymbolToCompareMethodName, allFieldOperators } from '../../field-conditional-logic/conditional-logic-operators.model';\r\nimport { FieldConditionalLogicService, IOperandSymbolToCompareMethodName } from '../../../services/field-conditional-logic.service';\r\n\r\nexport abstract class NumericComparisonTypesFieldDefinitionLogicBase extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n // Static data.\r\n //private static myFieldOperators: ConditionalLogicRuleOperator[] = allFieldOperators.filter(o => o.appliesToNumericFields);\r\n private static myFieldOperators: ConditionalLogicRuleOperator[] = FieldConditionalLogicService.AllNumericFieldOperators;\r\n\r\n private static operatorSymbolsToMethodNames: IOperandSymbolToCompareMethodName = null;\r\n\r\n // Constructor.\r\n public constructor() {\r\n if (NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames == null) {\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames = {};\r\n\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.IsGreaterThan] = 'isGreaterThan';\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.IsGreaterThanOrEqualTo] = 'isGreaterThanOrEqualTo';\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.Equals] = 'equals';\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.DoesNotEqual] = 'doesNotEqual';\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.IsLessThan] = 'isLessThan';\r\n NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.IsLessThanOrEqualTo] = 'isLessThanOrEqualTo';\r\n //NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[FormFieldComparisonOperatorNameEnum.Between] = 'between';\r\n }\r\n\r\n super();\r\n }\r\n\r\n // Abstract methods.\r\n protected abstract formatValueForCompare(value: any): any;\r\n\r\n // IFieldDefinitionLogic methods.\r\n public getAvailableOperatorsFor(formField: FormField): ConditionalLogicRuleOperator[] {\r\n return NumericComparisonTypesFieldDefinitionLogicBase.myFieldOperators;\r\n }\r\n public compare(leftOperand: any, operatorSymbol: string, rightOperand: any): boolean {\r\n let leftFormattedOperand: any = this.formatValueForCompare(leftOperand);\r\n let rightFormattedOperand: any = this.formatValueForCompare(rightOperand);\r\n\r\n let comparisonMethodName = NumericComparisonTypesFieldDefinitionLogicBase.operatorSymbolsToMethodNames[operatorSymbol];\r\n if (comparisonMethodName == null) {\r\n let errorMsg = `NumericComparisonTypesFieldDefinitionLogicBase.compare(): this field type does not support comparion operator '${operatorSymbol}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n let result: boolean = this[comparisonMethodName](leftFormattedOperand, rightFormattedOperand);\r\n return result;\r\n }\r\n\r\n // Helper methods.\r\n private isGreaterThan(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand > rightOperand;\r\n }\r\n private isGreaterThanOrEqualTo(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand >= rightOperand;\r\n }\r\n private equals(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand == rightOperand;\r\n }\r\n private doesNotEqual(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand != rightOperand;\r\n }\r\n private isLessThan(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand < rightOperand;\r\n }\r\n private isLessThanOrEqualTo(leftOperand: any, rightOperand: any): boolean {\r\n return leftOperand <= rightOperand;\r\n }\r\n private between(leftOperand: any, rightOperand: any): boolean {\r\n let betweenResult: boolean = false;\r\n\r\n if ((leftOperand != null) && (leftOperand.toString() != '') && (rightOperand != null) && (rightOperand.toString() != '')) {\r\n let listOfValues: string[] = rightOperand.toString().split(',');\r\n\r\n if ((listOfValues != null) && (listOfValues.length == 2)) {\r\n let valueToCompare = parseFloat(leftOperand.toString());\r\n let minValue: number = parseFloat(listOfValues[0]);\r\n let maxValue: number = parseFloat(listOfValues[1]);\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if ((!Number.isNaN(valueToCompare)) && (!Number.isNaN(minValue)) && (!Number.isNaN(maxValue))) {\r\n if ((valueToCompare >= minValue) && (valueToCompare <= maxValue))\r\n betweenResult = true;\r\n }\r\n }\r\n }\r\n\r\n return betweenResult;\r\n }\r\n}\r\n\r\nexport abstract class NumericFieldDefinitionLogicBase extends NumericComparisonTypesFieldDefinitionLogicBase implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n formInstanceElement.textValue = pasteValue;\r\n\r\n // TO DO: ADD VALIDATION TO THIS METHOD.\r\n }\r\n\r\n // Sorting.\r\n public compareValuesAscending(value1: any, value2: any): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1 != null) && (value2 != null)) {\r\n let formattedValue1: any = this.formatValueForCompare(value1);\r\n let formattedValue2: any = this.formatValueForCompare(value2);\r\n\r\n if (formattedValue1 > formattedValue2)\r\n compareResult = 1;\r\n else if (formattedValue1 < formattedValue2)\r\n compareResult = -1;\r\n } else if (value1 != null) {\r\n compareResult = 1;\r\n } else if (value2 != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n public compareValuesDescending(value1: any, value2: any): number {\r\n let compareResult: number = - this.compareValuesAscending(value1, value2);\r\n return compareResult;\r\n }\r\n\r\n public hasNumericData(): boolean {\r\n return true;\r\n }\r\n\r\n public filterType(): string {\r\n return 'numeric';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n\r\n // Abstract method(s).\r\n public abstract compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number;\r\n\r\n protected abstract formatValueForCompare(value: any): any;\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { NumericFieldDefinitionLogicBase } from './numeric-compare-base-field-def-logic';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\n\r\nexport class DecimalFieldDefLogic extends NumericFieldDefinitionLogicBase implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n if (pasteValue != null) {\r\n let floatValue: number = parseFloat(pasteValue);\r\n formInstanceElement.decimalValue = floatValue;\r\n }\r\n\r\n // TO DO: ADD VALIDATION TO THIS METHOD.\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.decimalValue != null) && (value2.decimalValue != null)) {\r\n if (value1.decimalValue == value2.decimalValue)\r\n compareResult = 0;\r\n else if (value1.decimalValue > value2.decimalValue)\r\n compareResult = 1;\r\n else\r\n compareResult = -1;\r\n } else if (value1.decimalValue != null) {\r\n compareResult = 1;\r\n } else {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultDecimalValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n let strValue: string = (formInstanceElementParam.decimalValue ?\r\n new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(formInstanceElementParam.decimalValue) :\r\n '0');\r\n\r\n return strValue;\r\n }\r\n\r\n public getNumericValue(formFieldParam: FormField, otherFormFields: FormField[], formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): number {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultDecimalValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n return (formInstanceElementParam.decimalValue ? formInstanceElementParam.decimalValue : 0);\r\n }\r\n\r\n // Implement protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n let result: number = 0.0;\r\n\r\n if (value != null) {\r\n let valueAsString: string = value.toString();\r\n valueAsString = valueAsString.replace(/,/g,\"\"); // A formatted value could contain formatting characters that will confuse parseFloat().\r\n result = parseFloat(valueAsString);\r\n } \r\n\r\n return result;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: any = colValue.decimalValue != null ? colValue.decimalValue : 0;\r\n return fieldValue;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { DecimalFieldDefLogic } from './decimal-field-def-logic';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\n\r\nexport class CurrencyFieldDefLogic extends DecimalFieldDefLogic implements IFieldDefinitionLogic { \r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Note: the following methods, previsouly implemented here, are now implemented in my base class:\r\n //\r\n // pasteDataForInto()\r\n // compareAscendingFor()\r\n // formatValueForCompare()\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let displayValue: string = super.getDisplayValue(formFieldParam, formInstanceElementParam, gridRow, processingPhase, gridRowColumnDefs);\r\n displayValue = `$ ${displayValue}`;\r\n return displayValue;\r\n }\r\n\r\n public hasDollarSignPrefix(): boolean {\r\n return true;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public getNumericValueFrom(value: string): number {\r\n let numericValue: number = 0;\r\n\r\n if ((value != null) && (value.trim() != '')) {\r\n let valueWithoutDollarSignAndCommas: string = value.replace('$', '').replace(/,/g, '');\r\n numericValue = parseFloat(valueWithoutDollarSignAndCommas);\r\n }\r\n\r\n return numericValue;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { NumericComparisonTypesFieldDefinitionLogicBase } from './numeric-compare-base-field-def-logic';\r\nimport { DateUtil } from '../../../utility-classes/date.util';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { CustomDateFormatDirective } from '../../../directives/custom-date-format.directive';\r\n// Note: we should move the implementation of the DateFormFieldComponent static method called in this file into this file.\r\nimport { DateFormFieldComponent } from '../../../components/form-fields/date-form-field/date-form-field.component';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class DateFieldDefLogic extends NumericComparisonTypesFieldDefinitionLogicBase { //DefaultFieldDefinitionClientLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n // Note: this method is not yet implemented.\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.textValue != null) && (value2.textValue != null)) {\r\n let intValue1: number = DateUtil.DateToSecondsSinceJan1_1970(value1.textValue);\r\n let intValue2: number = DateUtil.DateToSecondsSinceJan1_1970(value2.textValue);\r\n\r\n if (intValue1 > intValue2)\r\n compareResult = 1;\r\n else if (intValue1 < intValue2)\r\n compareResult = -1;\r\n } else if (value1.textValue != null) {\r\n compareResult = 1;\r\n } else {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public compareValuesAscending(value1: any, value2: any): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1 != null) && (value2 != null)) {\r\n let formattedValue1: any = this.formatValueForCompare(value1);\r\n let formattedValue2: any = this.formatValueForCompare(value2);\r\n\r\n if (formattedValue1 > formattedValue2)\r\n compareResult = 1;\r\n else if (formattedValue1 < formattedValue2)\r\n compareResult = -1;\r\n } else if (value1 != null) {\r\n compareResult = 1;\r\n } else if (value2 != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n public compareValuesDescending(value1: any, value2: any): number {\r\n let compareResult: number = - this.compareValuesAscending(value1, value2);\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n if (formInstanceElementParam.textValue == 'Invalid Date') return 'Invalid Date';\r\n\r\n let d = new Date(formInstanceElementParam.textValue);\r\n if (!(d instanceof Date && !isNaN(d.valueOf()))) {\r\n if (formInstanceElementParam.textValue.trim().length == 0) {\r\n return '';\r\n }\r\n else {\r\n return 'Unrecognized Date ' + formInstanceElementParam.textValue;\r\n }\r\n }\r\n\r\n // Note: we have to use the display format for the provided form field definition.\r\n // Note: we should move the implementation of the DateFormFieldComponent static method called in this file into this file.\r\n let strDatePipeFormat: string = DateFormFieldComponent.displayFormatToDatePipeFormat(formFieldParam);\r\n\r\n let strValue: string =\r\n (formInstanceElementParam.textValue ?\r\n CustomDateFormatDirective.applyDateFormattingUsing(strDatePipeFormat, formInstanceElementParam.textValue) :\r\n '');\r\n\r\n return (strValue);\r\n }\r\n\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshProperties = {\r\n };\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 80;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshProperties;\r\n }\r\n\r\n // Implement protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n let result: number = 0;\r\n\r\n if (value != null)\r\n result = DateUtil.DateToSecondsSinceJan1_1970(value.toString());\r\n\r\n return result;\r\n }\r\n\r\n public filterType(): string {\r\n return 'date';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n return colValue.textValue;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { BinaryComparisonTypesFieldDefinitionLogicBase } from './binary-comparison-base-logic';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { KendoGridOperatorName } from '../../../enums/kendo-grid/kendo-grid-operator-name.enum';\r\nimport { FormInstanceGridRow } from '../../../models/site-content/form-instance-grid-row.model';\r\n\r\nexport class TextFieldDefinitionLogicBase extends BinaryComparisonTypesFieldDefinitionLogicBase implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n formInstanceElement.textValue = pasteValue;\r\n\r\n // TO DO: ADD VALIDATION TO THIS METHOD.\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = TextFieldDefinitionLogicBase.staticCompareAscendingFor(formField, value1, value2);\r\n return compareResult;\r\n }\r\n public static staticCompareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.textValue != null) && (value2.textValue != null)) {\r\n if (value1.textValue == value2.textValue)\r\n compareResult = 0;\r\n else if (value1.textValue > value2.textValue)\r\n compareResult = 1;\r\n else\r\n compareResult = -1;\r\n } else if (value1.textValue != null) {\r\n compareResult = 1;\r\n } else if (value2.textValue != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n public static staticCompareAscending(value1: string, value2: string): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1 != null) && (value2 != null)) {\r\n if (value1 == value2)\r\n compareResult = 0;\r\n else if (value1 > value2)\r\n compareResult = 1;\r\n else\r\n compareResult = -1;\r\n } else if (value1 != null) {\r\n compareResult = 1;\r\n } else if (value2 != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public compareValuesAscending(value1: any, value2: any): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1 != null) && (value2 != null)) {\r\n let formattedValue1: any = this.formatValueForCompare(value1);\r\n let formattedValue2: any = this.formatValueForCompare(value2);\r\n\r\n if (formattedValue1 > formattedValue2)\r\n compareResult = 1;\r\n else if (formattedValue1 < formattedValue2)\r\n compareResult = -1;\r\n } else if (value1 != null) {\r\n compareResult = 1;\r\n } else if (value2 != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n public compareValuesDescending(value1: any, value2: any): number {\r\n let compareResult: number = - this.compareValuesAscending(value1, value2);\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n //console.log('getDisplayValue');\r\n //console.log(formInstanceElementParam.TextValue);\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n public filterOperator(): string {\r\n return 'contains';\r\n }\r\n\r\n // Protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n return value;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public displayValueWithQuotationMarks(): boolean {\r\n return true;\r\n }\r\n\r\n public getDefaultKendoGridOperatorName(): KendoGridOperatorName {\r\n return KendoGridOperatorName.Contains;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n return colValue != null ? colValue.textValue : '';\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { SelectOptionValue } from '../../selection-fields/select-option-value.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\n\r\nexport class DropdownFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement IFieldDefinitionLogic methods.\r\n public getSelectableValuesFor(formField: FormField): SelectOptionValue[] {\r\n let values: SelectOptionValue[] = [];\r\n\r\n let arrSelectOptions: string[] = FormField.ParseSelectOptions(formField);\r\n\r\n for (let iOption: number = 0; iOption < arrSelectOptions.length; iOption++) {\r\n let selectOption: string = arrSelectOptions[iOption];\r\n\r\n let operandValue: SelectOptionValue =\r\n {\r\n id: iOption + 1,\r\n displayName: selectOption\r\n }\r\n\r\n values.push(operandValue);\r\n }\r\n\r\n return values;\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n let selectableValues: string[] = FormField.ParseSelectOptions(formField);\r\n let foundValue: string = (selectableValues != null ? selectableValues.find(v => v == pasteValue) : null);\r\n if (foundValue != null)\r\n formInstanceElement.textValue = pasteValue;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n //if ((!formInstanceElementParam.transientValueSetFlag) ||\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshProperties = {\r\n };\r\n let minHeight: number = 100; // Note: need to calculate this!!!\r\n if ((formField.jsonConfig != null) && (formField.jsonConfig.trim() != '')) {\r\n let config: CascadingDropDownFormFieldConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n if ((config.dropDownHeaders != null) && (config.dropDownHeaders.length > 0)) {\r\n minHeight = 50 // Header\r\n + (config.dropDownHeaders.length * 60) // Space for all drop-down fields.\r\n + ((config.dropDownHeaders.length - 1) * 25); // Space for filler between drop-down fields.\r\n }\r\n }\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = minHeight;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshProperties;\r\n }\r\n\r\n // Protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n return value;\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField, SecondaryGridCascadingFieldTransientData } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { GridCascadingDropDownFieldType } from '../form-field-types';\r\nimport { CascadingDropDownFormFieldConfig } from '../../cascading-dropdown/cascading-dropdown-config.model';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\n\r\nexport class GridCascadingDropdownFieldDefLogic extends DefaultFieldDefinitionClientLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Override two methods:\r\n //\r\n // hasVirtualSiblingFormFieldsFor();\r\n // getVirtualSiblingFormFieldsFor().\r\n public hasVirtualSiblingFormFieldsFor(formField: FormField): boolean {\r\n let hasVirtualFields: boolean = false;\r\n\r\n if ((formField.fieldDefinitionClassName == GridCascadingDropDownFieldType) &&\r\n (formField.jsonConfig != null) && (formField.jsonConfig.trim() != '')) {\r\n let cascadingDropdownConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n\r\n hasVirtualFields = ((cascadingDropdownConfig != null) && (cascadingDropdownConfig.NumLevels > 0));\r\n }\r\n\r\n return hasVirtualFields;\r\n }\r\n public getVirtualSiblingFormFieldsFor(formField: FormField): FormField[] {\r\n let virtualFormFields: FormField[] = [];\r\n\r\n if ((formField.fieldDefinitionClassName == GridCascadingDropDownFieldType) &&\r\n (formField.jsonConfig != null) && (formField.jsonConfig.trim() != '')) {\r\n let cascadingDropdownConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n\r\n if ((cascadingDropdownConfig != null) && (cascadingDropdownConfig.NumLevels > 0)) {\r\n for (let index: number = 1; index < cascadingDropdownConfig.DropDownHeaders.length; index++) {\r\n let header: string = cascadingDropdownConfig.DropDownHeaders[index];\r\n\r\n let virtualFormField: FormField = new FormField();\r\n\r\n virtualFormField.transientFieldIsVirtual = true;\r\n virtualFormField.primaryFieldName = formField.name;\r\n virtualFormField.fieldOrder = formField.fieldOrder;\r\n virtualFormField.fieldSecondaryOrder = index;\r\n //virtualFormField.transientCascadingDropdownConfig = cascadingDropdownConfig;\r\n virtualFormField.name = `${formField.name}_vff${index}`;\r\n virtualFormField.displayName = header;\r\n virtualFormField.fieldDefinitionClassName = GridCascadingDropDownFieldType;\r\n\r\n // Set transient data.\r\n //\r\n // TO DO: put all transient data into a single class.\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData == null)\r\n //virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData();\r\n virtualFormField.secondaryGridCascadingFieldTransientData = new SecondaryGridCascadingFieldTransientData(null, null, null);\r\n //virtualFormField.transientCascadingDropdownConfig = formField.transientCascadingDropdownConfig;\r\n //virtualFormField.transientCascadingDropdownData = formField.transientCascadingDropdownData;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = (formField.secondaryGridCascadingFieldTransientData != null ? formField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig : null);\r\n if (virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig == null)\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownConfig = cascadingDropdownConfig;\r\n virtualFormField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData = (formField.secondaryGridCascadingFieldTransientData != null ? formField.secondaryGridCascadingFieldTransientData.transientCascadingDropdownData : null);\r\n\r\n virtualFormFields.push(virtualFormField);\r\n /*\r\n for (let priorIndex: number = 0; priorIndex < priorFormFields.length; priorIndex++) {\r\n let priorFormField: FormField = priorFormFields[priorIndex];\r\n if (priorFormField.transientSecondaryFormFields == null)\r\n priorFormField.transientSecondaryFormFields = [];\r\n priorFormField.transientSecondaryFormFields.push(virtualFormField);\r\n }\r\n */\r\n } // for\r\n\r\n //formField.transientSecondaryFormFields = virtualFormFields;\r\n }\r\n }\r\n\r\n return virtualFormFields;\r\n }\r\n\r\n public displayDeleteIconInGridFor(formField: FormField): boolean {\r\n let display: boolean = (formField.primaryFieldName == null);\r\n return display;\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = TextFieldDefinitionLogicBase.staticCompareAscendingFor(formField, value1, value2);\r\n return compareResult;\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n // Note: this method needs to prevent pasting in data to a fixed column/column of fixed values if one exists.\r\n\r\n // TO DO: CODE THIS METHOD.\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n return (formInstanceElementParam ? formInstanceElementParam.textValue : null);\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\n\r\nexport class PreRenderFilterBase implements IFormPreRenderFilter {\r\n // Implement default IFormPreRenderFilter behavior.\r\n public allowFormInstanceElement(presentlyUnusedForm: Form, presentlyUnusedFormField: FormField, userRoleNames: string[], presentlyUnusedFormInstanceElement): boolean {\r\n return true; // A default behavior only.\r\n }\r\n public markFieldAsReadOnly(presentlyUnusedForm: Form, presentlyUnusedFormField: FormField, userRoleNames: string[], presentlyUnusedFormInstanceElement): boolean {\r\n return false; // A default behavior only.\r\n }\r\n\r\n // Constructor.\r\n protected constructor() {\r\n }\r\n}\r\n","import { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { PreRenderFilterBase } from './pre-render-filter-base';\r\n\r\nexport class HideFromPreRenderFilter extends PreRenderFilterBase implements IFormPreRenderFilter {\r\n // Properties.\r\n private formField: FormField;\r\n\r\n // Constructor.\r\n public constructor(formField: FormField) {\r\n super();\r\n this.formField = formField;\r\n }\r\n\r\n // Getter method.\r\n public get FormField(): FormField {\r\n return this.formField;\r\n }\r\n\r\n // Implement IFormPreRenderFilter.\r\n public allowFormInstanceElement(unusedForm: Form, unusedFormField: FormField, userRoleNames: string[], unusedFormInstanceElement): boolean {\r\n let allow: boolean = true;\r\n\r\n if ((this.formField.showToHideFromRoleNames != null) && (this.formField.showToHideFromRoleNames.trim() != '')) {\r\n let configuredRoleNames: string[] = this.formField.showToHideFromRoleNames.split(',');\r\n if ((configuredRoleNames.length > 0) && (userRoleNames.length > 0)) {\r\n for (let index: number = 0; index < userRoleNames.length; index++) {\r\n let userRoleName: string = userRoleNames[index];\r\n if (configuredRoleNames.indexOf(userRoleName) >= 0) {\r\n allow = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return allow;\r\n }\r\n}\r\n","import { FieldDefinition, FieldDefinitionAllowDropFlags } from '../field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\n//import { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { ShowToFieldType, HideFromFieldType } from '../form-field-types';\r\nimport { LayoutCell } from '../layout-cell.model';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\n\r\nexport abstract class ShowToHideFromCustomLogicBase extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Implement some IFieldDefinitionLogic methods.\r\n public checkAllowsNestedDrop(fieldDefinition: FieldDefinition, allowsDropFlags: FieldDefinitionAllowDropFlags): void {\r\n allowsDropFlags.allowDrop = ((fieldDefinition.className == ShowToFieldType) || (fieldDefinition.className == HideFromFieldType));\r\n if (!allowsDropFlags.allowDrop)\r\n allowsDropFlags.dropErrorMessage = `The dropped field cannot be placed within the existing field`; // Note: this error message is not yet being used.\r\n }\r\n\r\n public fieldDraggedToTrash(formField: FormField, form: Form): void {\r\n // Find the form field's matching form field. That is, if the deleted field\r\n // is a \"Show To\" field begin, find the corresponding \"Show To\" field end.\r\n let matchingFormField: FormField = form.formFields.find(ff => (ff.fieldDefinitionClassName == formField.fieldDefinitionClassName) && (ff.isConditionalBeginElement == !formField.isConditionalBeginElement) && (ff.isConditionalEndElement == !formField.isConditionalEndElement));\r\n // Find the matching form field's cell.\r\n let matchingFieldCell: LayoutCell = form.formLayout.findCellContaining(matchingFormField.name);\r\n\r\n if (matchingFormField != null) {\r\n // Mark the corresponding/matching field as deleted.\r\n matchingFormField.isDeleted = true;\r\n }\r\n if (matchingFieldCell != null) {\r\n // Mark the matching field's cell as empty.\r\n matchingFieldCell.clearContent();\r\n }\r\n }\r\n\r\n public get canHaveInstructions(): boolean {\r\n return false;\r\n }\r\n\r\n public hasCustomFormLayoutStylesFor(formField: FormField): boolean {\r\n return formField.isConditionalEndElement; // We want to make end elements use less vertical space.\r\n }\r\n public customFormLayoutStylesFor(formField: FormField): string {\r\n return (formField.isConditionalEndElement ? 'min-height: 30px' : '');\r\n }\r\n\r\n public hasCustomFormFieldLayoutStylesFor(formField: FormField): boolean {\r\n return formField.isConditionalEndElement; // We want to make end elements use less vertical space.\r\n }\r\n public customFormFieldLayoutStylesFor(formField: FormField): string {\r\n return (formField.isConditionalEndElement ? 'margin-bottom: 0px' : '');\r\n }\r\n\r\n // Methods common to show to and hide from custom logic handlers.\r\n protected static popFilter(filterFormField: FormField, formField: FormField): boolean {\r\n let pop: boolean = false;\r\n\r\n if ((filterFormField.fieldDefinitionClassName == formField.fieldDefinitionClassName) &&\r\n filterFormField.isConditionalBeginElement &&\r\n formField.isConditionalEndElement &&\r\n (filterFormField.matchingBeginOrEndFieldName == formField.name) &&\r\n (formField.matchingBeginOrEndFieldName == filterFormField.name)) {\r\n pop = true;\r\n }\r\n\r\n return pop;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { HideFromPreRenderFilter } from './hide-from-pre-render-filter';\r\nimport { ShowToHideFromCustomLogicBase } from './show-to-hide-from-logic-base';\r\n\r\nexport class HideFromFieldDefinitionCustomLogic extends ShowToHideFromCustomLogicBase implements IFieldDefinitionLogic { // IFormPreRenderFilter {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement some IFieldDefinitionLogic methods.\r\n public pushFormPreRenderFilterFor(formField: FormField): IFormPreRenderFilter {\r\n let filter: IFormPreRenderFilter = null;\r\n // As a show to or hide from has a begin and an end form field, only return a filter for the begin field.\r\n if (formField.isConditionalBeginElement)\r\n filter = new HideFromPreRenderFilter(formField);\r\n return filter;\r\n }\r\n public popFormPreRenderFilter(filter: IFormPreRenderFilter, formField: FormField): boolean {\r\n let pop: boolean = false;\r\n\r\n if (filter instanceof HideFromPreRenderFilter) {\r\n let showToFilter = filter;\r\n let filterFormField: FormField = showToFilter.FormField;\r\n\r\n pop = ShowToHideFromCustomLogicBase.popFilter(filterFormField, formField);\r\n }\r\n\r\n return pop;\r\n }\r\n\r\n // Implement IFormPreRenderFilter.\r\n // Note: investigate to see if support for interface IFormPreRenderFilter is needed in this class.\r\n /*\r\n public allowFormInstanceElement(form: Form, formField: FormField, userRoleNames: string[], formInstanceElement): boolean {\r\n return false;\r\n }\r\n public markFieldAsReadOnly(presentlyUnusedForm: Form, presentlyUnusedFormField: FormField, userRoleNames: string[], presentlyUnusedFormInstanceElement): boolean {\r\n return false; // A default behavior only.\r\n }\r\n */\r\n\r\n public filterType(): string {\r\n return null;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { NumericFieldDefinitionLogicBase } from './numeric-compare-base-field-def-logic';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class IntegerFieldDefLogic extends NumericFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n if (pasteValue != null) {\r\n let intValue: number = parseInt(pasteValue);\r\n formInstanceElement.intValue = intValue;\r\n }\r\n\r\n // TO DO: ADD VALIDATION TO THIS METHOD.\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.intValue != null) && (value2.intValue != null)) {\r\n if (value1.intValue == value2.intValue)\r\n compareResult = 0;\r\n else if (value1.intValue > value2.intValue)\r\n compareResult = 1;\r\n else\r\n compareResult = -1;\r\n } else if (value1.intValue != null) {\r\n compareResult = 1;\r\n } else {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultIntegerValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n let strValue: string =\r\n (formInstanceElementParam.intValue ?\r\n new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 }).format(formInstanceElementParam.intValue) :\r\n '0');\r\n\r\n return (strValue);\r\n }\r\n\r\n public getNumericValue(formFieldParam: FormField, otherFormFields: FormField[], formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): number {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n FormFieldBaseComponent.setDefaultIntegerValueFor(formFieldParam, formInstanceElementParam);\r\n }\r\n\r\n let numValue: number = 0;\r\n if (formInstanceElementParam.intValue) {\r\n if (typeof formInstanceElementParam.intValue == 'number') {\r\n numValue = formInstanceElementParam.intValue;\r\n } else {\r\n numValue = parseInt((formInstanceElementParam.intValue).toString());\r\n //VNEXT-1430: KLW - Due to changes from Angular 14 to 15, NaN cannot be use directly and instead we must use the method from the Numbers class\r\n //Number.IsNan()\r\n if (Number.isNaN(numValue))\r\n numValue = 0;\r\n }\r\n }\r\n return numValue;\r\n }\r\n\r\n // Implement protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n let result: number = 0;\r\n\r\n if (value != null)\r\n result = parseInt(value.toString());\r\n\r\n return result;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n if (!colValue) {\r\n console.log(\"null colValue received in unpackTemplateInstancesRow for formField \" + formField.name);\r\n }\r\n let fieldValue: any = colValue?.intValue != null ? colValue.intValue : 0; \r\n return fieldValue;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { DropdownFieldDefLogic } from './dropdown-field-def-logic';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\n\r\nexport class MultiDropdownFieldDefLogic extends DropdownFieldDefLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n // Note: this method is not yet implemented.\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = MultiDropdownFieldDefLogic.staticCompareAscendingFor(formField, value1, value2);\r\n return compareResult;\r\n }\r\n public static staticCompareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n if ((value1.childFormInstanceElements != null) && (value2.childFormInstanceElements != null)) {\r\n let childIndex: number = 0;\r\n\r\n do {\r\n if ((childIndex < value1.childFormInstanceElements.length) && (childIndex < value2.childFormInstanceElements.length)) {\r\n compareResult = TextFieldDefinitionLogicBase.staticCompareAscendingFor(formField, value1.childFormInstanceElements[childIndex], value2.childFormInstanceElements[childIndex]);\r\n } else if (childIndex < value1.childFormInstanceElements.length) {\r\n compareResult = 1;\r\n } else if (childIndex < value2.childFormInstanceElements.length) {\r\n compareResult = -1;\r\n }\r\n\r\n childIndex++;\r\n } while ((compareResult == 0) && ((childIndex < value1.childFormInstanceElements.length) || (childIndex < value2.childFormInstanceElements.length)));\r\n } else if (value1.childFormInstanceElements != null) {\r\n compareResult = 1;\r\n } else if (value2.childFormInstanceElements != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let value: string = '';\r\n\r\n if (formInstanceElementParam.childFormInstanceElements &&\r\n (formInstanceElementParam.childFormInstanceElements.length > 0)) {\r\n let iNumValuesSelected: number = 0;\r\n\r\n for (let iChild: number = 0; iChild < formInstanceElementParam.childFormInstanceElements.length; iChild++) {\r\n let child: FormInstanceElement = formInstanceElementParam.childFormInstanceElements[iChild];\r\n\r\n if (!child.isDeleted) {\r\n if (iNumValuesSelected > 0) {\r\n value += ',';\r\n }\r\n\r\n value += child.textValue;\r\n iNumValuesSelected++;\r\n }\r\n }\r\n }\r\n\r\n return (value);\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { MultiDropdownFieldDefLogic } from './multi-dropdown-field-def-logic';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\n\r\nexport class MultiCheckboxFieldDefLogic extends MultiDropdownFieldDefLogic {\r\n public constructor(){\r\n super();\r\n }\r\n\r\n // Sorting.\r\n public compareAscendingFor(formField: FormField, value1: FormInstanceElement, value2: FormInstanceElement): number {\r\n let compareResult: number = 0;\r\n\r\n // Compare.\r\n if ((value1.childFormInstanceElements != null) && (value2.childFormInstanceElements != null)) {\r\n let textValue1: string = MultiCheckboxFieldDefLogic.buildCompareValueFor(formField, value1);\r\n let textValue2: string = MultiCheckboxFieldDefLogic.buildCompareValueFor(formField, value2);\r\n\r\n compareResult = TextFieldDefinitionLogicBase.staticCompareAscending(textValue1, textValue2);\r\n } else if (value1.childFormInstanceElements != null) {\r\n compareResult = 1;\r\n } else if (value2.childFormInstanceElements != null) {\r\n compareResult = -1;\r\n }\r\n\r\n return compareResult;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let value: string = '';\r\n\r\n //let selectOptions: string[] = this.SelectOptions;\r\n let selectOptions: string[] = FormField.ParseSelectOptions(formFieldParam);\r\n\r\n if (formInstanceElementParam.childFormInstanceElements &&\r\n (formInstanceElementParam.childFormInstanceElements.length > 0)) {\r\n let iNumValuesSelected: number = 0;\r\n\r\n for (let iChild: number = 0; iChild < formInstanceElementParam.childFormInstanceElements.length; iChild++) {\r\n let child: FormInstanceElement = formInstanceElementParam.childFormInstanceElements[iChild];\r\n\r\n if (!child.isDeleted) {\r\n if ((iChild < selectOptions.length) && (child.booleanValue == true)) {\r\n if (iNumValuesSelected > 0) {\r\n value += ',';\r\n }\r\n\r\n value += selectOptions[iChild];\r\n iNumValuesSelected++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (value);\r\n }\r\n\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshProperties = {\r\n };\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 100;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshProperties;\r\n }\r\n\r\n // Helper methods.\r\n private static buildCompareValueFor(formField: FormField, value: FormInstanceElement): string {\r\n // Parse select options.\r\n if (formField.transientParsedSelectOptions == null)\r\n formField.transientParsedSelectOptions = FormField.ParseSelectOptions(formField);\r\n\r\n let textValue: string = '';\r\n\r\n if (value.childFormInstanceElements != null) {\r\n for (let childIndex: number = 0; (childIndex < value.childFormInstanceElements.length) && (childIndex < formField.transientParsedSelectOptions.length); childIndex++) {\r\n if (value.childFormInstanceElements[childIndex].booleanValue == true) {\r\n if (textValue != '')\r\n textValue += ',';\r\n\r\n textValue += formField.transientParsedSelectOptions[childIndex];\r\n }\r\n }\r\n }\r\n\r\n return textValue;\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n}\r\n","import { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { FormField } from '../form-field.model';\r\n\r\nexport class ParagraphFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshProperties = {\r\n };\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 150;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshProperties;\r\n }\r\n\r\n public getDefaultMaxLengthWhenInGrid(): number {\r\n return 250;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DropdownFieldDefLogic } from './dropdown-field-def-logic';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormField } from '../../../models/form-builder/form-field.model';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../../../models/form-builder/form-instance-element.model';\r\n\r\nexport class RadioButtonsFieldDefLogic extends DropdownFieldDefLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n if ((!formInstanceElementParam.UserUpdatedData) ||\r\n (!formInstanceElementParam.textValue)) {\r\n // Set a default value.\r\n let selectOptions: string[] = FormField.ParseSelectOptions(formFieldParam);\r\n FormFieldBaseComponent.staticSetDefaultTextSelectValue(formFieldParam, formInstanceElementParam, selectOptions);\r\n\r\n formInstanceElementParam.TextValue = formInstanceElementParam.textValue;\r\n }\r\n\r\n return (formInstanceElementParam.textValue);\r\n }\r\n\r\n public fieldCanBeUsedInSiteHomePageConditionalLogic(formField: FormField): boolean {\r\n return true;\r\n }\r\n public createSiteHomePageFormInstanceElementFor(formField: FormField): FormInstanceElement {\r\n let formInstanceElement = new FormInstanceElement();\r\n formInstanceElement.formFieldId = formField.id;\r\n formInstanceElement.formFieldName = formField.name;\r\n formInstanceElement.formField = formField;\r\n formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeText;\r\n formInstanceElement.textValue = 'Debugging radio buttons ...';\r\n return formInstanceElement;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { FormFieldBaseComponent } from '../../../components/form-fields/form-field-base/form-field-base.component';\r\nimport { RichTextFormFieldComponent } from '../../../components/form-fields/rich-text-form-field/rich-text-form-field.component';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\n\r\nexport class RichTextFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n formInstanceElement.textValue = pasteValue;\r\n\r\n // TO DO: ADD VALIDATION TO THIS METHOD.\r\n }\r\n\r\n public allowsHtmlInDisplayValue(): boolean {\r\n return true;\r\n }\r\n\r\n public setFieldSpecificValuesForDynamicallyCreatedField(formFieldComponent: FormFieldBaseComponent, formField: FormField, parentComponentPrefix: string): void {\r\n let mode: string = formFieldComponent.Mode;\r\n\r\n let richTextComponent: RichTextFormFieldComponent = formFieldComponent as RichTextFormFieldComponent;\r\n richTextComponent.showHistoryLink = false;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n if (!formInstanceElementParam.UserUpdatedData) {\r\n if (formInstanceElementParam.textValue == null) formInstanceElementParam.TextValue = '';\r\n }\r\n\r\n return formInstanceElementParam.textValue;\r\n }\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshOnInitProperties = {\r\n };\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = 150;\r\n hshOnInitProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return (hshOnInitProperties);\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class ShortTextFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public getDefaultMaxLengthWhenInGrid(): number {\r\n return 250;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { PreRenderFilterBase } from './pre-render-filter-base';\r\n\r\nexport class ShowToPreRenderFilter extends PreRenderFilterBase implements IFormPreRenderFilter {\r\n // Properties.\r\n private formField: FormField;\r\n\r\n // Constructor.\r\n public constructor(formField: FormField) {\r\n super();\r\n this.formField = formField;\r\n }\r\n\r\n // Getter method.\r\n public get FormField(): FormField {\r\n return this.formField;\r\n }\r\n\r\n // Implement IFormPreRenderFilter.\r\n public allowFormInstanceElement(unusedForm: Form, unusedFormField: FormField, userRoleNames: string[], unusedFormInstanceElement): boolean {\r\n let allow: boolean = false;\r\n\r\n if ((this.formField.showToHideFromRoleNames != null) && (this.formField.showToHideFromRoleNames.trim() != '')) {\r\n let configuredRoleNames: string[] = this.formField.showToHideFromRoleNames.split(',');\r\n if ((configuredRoleNames.length > 0) && (userRoleNames.length > 0)) {\r\n for (let index: number = 0; index < userRoleNames.length; index++) {\r\n let userRoleName: string = userRoleNames[index];\r\n if (configuredRoleNames.indexOf(userRoleName) >= 0) {\r\n allow = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return allow;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { ShowToHideFromCustomLogicBase } from './show-to-hide-from-logic-base';\r\nimport { ShowToPreRenderFilter } from './show-to-pre-render-filter';\r\n\r\nexport class ShowToFieldDefinitionCustomLogic extends ShowToHideFromCustomLogicBase implements IFieldDefinitionLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement some IFieldDefinitionLogic methods.\r\n public pushFormPreRenderFilterFor(formField: FormField): IFormPreRenderFilter {\r\n let filter: IFormPreRenderFilter = null;\r\n // As a show to or hide from has a begin and an end form field, only return a filter for the begin field.\r\n if (formField.isConditionalBeginElement)\r\n filter = new ShowToPreRenderFilter(formField);\r\n return filter;\r\n }\r\n public popFormPreRenderFilter(filter: IFormPreRenderFilter, formField: FormField): boolean {\r\n let pop: boolean = false;\r\n\r\n if (filter instanceof ShowToPreRenderFilter) {\r\n let showToFilter = filter;\r\n let filterFormField: FormField = showToFilter.FormField;\r\n\r\n pop = ShowToHideFromCustomLogicBase.popFilter(filterFormField, formField);\r\n }\r\n\r\n return pop;\r\n }\r\n\r\n public filterType(): string {\r\n return null;\r\n }\r\n}\r\n","import { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class EditorNameFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public getDefaultMaxLengthWhenInGrid(): number {\r\n return 250;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return false;\r\n }\r\n}\r\n","import { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class LastEditedDateFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public getDefaultMaxLengthWhenInGrid(): number {\r\n return 250;\r\n }\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return false;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class MetadataFieldDefinitionLogicBase extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor(protected fieldName: string) {\r\n super();\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: string = row[formField.name];\r\n return fieldValue;\r\n }\r\n}\r\n","import { MetadataFieldDefinitionLogicBase } from './metadata-field-def-logic-base';\r\n\r\nexport class FavoriteFieldDefLogic extends MetadataFieldDefinitionLogicBase {\r\n public constructor() {\r\n super('Favorite');\r\n }\r\n}\r\n","import { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { SelectOptionValue } from '../../selection-fields/select-option-value.model';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { FormFieldOnInitPropertyEnum } from '../../../models/form-builder/form-field-on-init-output-property.enum';\r\nimport { CascadingDropDownFormFieldConfig } from '../../../models/cascading-dropdown/cascading-dropdown-config.model';\r\nimport { DropdownFieldDefLogic } from './dropdown-field-def-logic';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class FlexibleSelectionFieldDefLogic extends DropdownFieldDefLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement IFieldDefinitionLogic methods.\r\n public getSelectableValuesFor(formField: FormField): SelectOptionValue[] {\r\n let values: SelectOptionValue[] = [];\r\n\r\n let arrSelectOptions: string[] = FormField.ParseSelectOptions(formField);\r\n\r\n for (let iOption: number = 0; iOption < arrSelectOptions.length; iOption++) {\r\n let selectOption: string = arrSelectOptions[iOption];\r\n\r\n let operandValue: SelectOptionValue =\r\n {\r\n id: iOption + 1,\r\n displayName: selectOption\r\n }\r\n\r\n values.push(operandValue);\r\n }\r\n\r\n return values;\r\n }\r\n\r\n // pasteDataForInto(): only allow the pasting of values that are valid for a given form field.\r\n public pasteDataForInto(formField: FormField, formInstanceElement: FormInstanceElement, pasteValue: string): void {\r\n let selectableValues: string[] = FormField.ParseSelectOptions(formField);\r\n let foundValue: string = (selectableValues != null ? selectableValues.find(v => v == pasteValue) : null);\r\n if (foundValue != null)\r\n formInstanceElement.textValue = pasteValue;\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let value: string = '';\r\n\r\n if (formInstanceElementParam.childFormInstanceElements &&\r\n (formInstanceElementParam.childFormInstanceElements.length > 0)) {\r\n let iNumValuesSelected: number = 0;\r\n\r\n for (let iChild: number = 0; iChild < formInstanceElementParam.childFormInstanceElements.length; iChild++) {\r\n let child: FormInstanceElement = formInstanceElementParam.childFormInstanceElements[iChild];\r\n\r\n if (!child.isDeleted) {\r\n if (iNumValuesSelected > 0) {\r\n value += ',';\r\n }\r\n\r\n value += child.textValue;\r\n iNumValuesSelected++;\r\n }\r\n }\r\n }\r\n\r\n return (value);\r\n }\r\n\r\n public getPropertiesRequiredByGrid(formField: FormField): any {\r\n let hshProperties = {\r\n };\r\n let minHeight: number = 100; // Note: need to calculate this!!!\r\n if ((formField.jsonConfig != null) && (formField.jsonConfig.trim() != '')) {\r\n let config: CascadingDropDownFormFieldConfig = CascadingDropDownFormFieldConfig.parseJsonConfig(formField.jsonConfig);\r\n if ((config.dropDownHeaders != null) && (config.dropDownHeaders.length > 0)) {\r\n minHeight = 50 // Header\r\n + (config.dropDownHeaders.length * 60) // Space for all drop-down fields.\r\n + ((config.dropDownHeaders.length - 1) * 25); // Space for filler between drop-down fields.\r\n }\r\n }\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT] = minHeight;\r\n hshProperties[FormFieldOnInitPropertyEnum.REQUIRED_PREVIEW_INSTANCE_MODE_HEIGHT_UNIT] = 'px';\r\n\r\n return hshProperties;\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: string = null;\r\n\r\n if (colValue.childFormInstanceElements != null) {\r\n for (let index: number = 0; index < colValue.childFormInstanceElements.length; index++) {\r\n let childValue: FormInstanceElement = colValue.childFormInstanceElements[index];\r\n if (childValue.textValue != null) {\r\n if (fieldValue == null)\r\n fieldValue = childValue.textValue;\r\n else {\r\n fieldValue += ',';\r\n fieldValue += childValue.textValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return fieldValue;\r\n }\r\n\r\n // Protected methods.\r\n protected formatValueForCompare(value: any): any {\r\n return value;\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n public isFilterable(): boolean {\r\n return true;\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\n\r\nexport class TextMetadataFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n public constructor(protected fieldName: string) {\r\n super();\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: string = row[formField.name];\r\n return fieldValue;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { TextMetadataFieldDefLogic } from './text-metadata-field-def-logic';\r\n\r\nexport class FolderNameFieldDefinitionLogic extends TextMetadataFieldDefLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super('folderName');\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { TextMetadataFieldDefLogic } from './text-metadata-field-def-logic';\r\n\r\nexport class FolderPathFieldDefinitionLogic extends TextMetadataFieldDefLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super('folderPath');\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { TextMetadataFieldDefLogic } from './text-metadata-field-def-logic';\r\n\r\nexport class FormInstanceNameFieldDefinitionLogic extends TextMetadataFieldDefLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super('name');\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DecimalFieldDefLogic } from './decimal-field-def-logic';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../form-instance-element.model';\r\nimport { IGridRow, INumericValuesHashByFieldName } from '../../../interfaces/grid-row.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { FormulaFormFieldComponent } from '../../../components/form-fields/formula-form-field/formula-form-field.component';\r\nimport { FieldNameHashes } from '../../../components/form-fields/formula-form-field/field-name-hashes';\r\nimport { FormulaEvaluationHelper } from '../../../components/form-fields/formula-form-field/formula-evaluation-helper';\r\nimport { FormulaEvaluator } from '../../../components/form-fields/formula-form-field/formula-evaluator';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { AppInjector } from '../../../../app.module';\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\n\r\nimport * as math from 'mathjs';\r\n\r\nexport class FormulaFieldDefLogic extends DecimalFieldDefLogic {\r\n // Constructor.\r\n public constructor(private fieldDefinitionServce: FieldDefinitionService) {\r\n super();\r\n };\r\n\r\n // This method returns the result of the formula calculation for display in a grid row including formatting it per field settings\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[]): string {\r\n let displayValue: string = '';\r\n if (gridRowColumnDefs != null) {\r\n\r\n let hshFieldValues: INumericValuesHashByFieldName = gridRow.getNumericValuesHashByFieldName(this.fieldDefinitionServce);\r\n let formulaEvaluationHelper = new FormulaEvaluationHelper().init(formFieldParam, gridRow, gridRowColumnDefs);\r\n\r\n // I hadn't noticed that this class already has its own evaluateFormula()\r\n let result = FormulaEvaluator.evaluateFormula(formulaEvaluationHelper, formFieldParam.formula, hshFieldValues);\r\n displayValue = result.error ? result.error : result.result;\r\n } else {\r\n // not sure if this actualy does anything, doesn't seem to as of 8/4/2023\r\n if (formInstanceElementParam.doubleValue != null) {\r\n if (formFieldParam.showDigitsWithCommandSeparators) {\r\n let formatter = new Intl.NumberFormat('en-us', { minimumFractionDigits: 0 });\r\n displayValue = formFieldParam.roundResultToWholeNumber ? formatter.format(Math.round(formInstanceElementParam.doubleValue)) : formatter.format(formInstanceElementParam.doubleValue);\r\n } else\r\n displayValue = formFieldParam.roundResultToWholeNumber ? Math.round(formInstanceElementParam.doubleValue).toString() : formInstanceElementParam.doubleValue.toString();\r\n }\r\n }\r\n\r\n if (formFieldParam.showDigitsWithCommandSeparators) {\r\n // Try to convert the display value to a number to format it according to its\r\n // locale, e.g.with embedded commas in the U.S.for a number greater than 999.\r\n let displayValueAsNumber: number = parseFloat(displayValue);\r\n if (!isNaN(displayValueAsNumber))\r\n displayValue = displayValueAsNumber.toLocaleString();\r\n }\r\n\r\n // Has this field been configured to show a leading dollar sign?\r\n if (formFieldParam.showDollarSignPrefix)\r\n displayValue = `$ ${displayValue}`;\r\n\r\n return displayValue;\r\n }\r\n\r\n public requiresFieldValueUpdate(): boolean {\r\n return true;\r\n }\r\n\r\n // Calulates the result and sets it as the value of the underlying form instance element\r\n public formFieldValuesUpdated(fieldDefinitionService: FieldDefinitionService, otherFormFields: FormField[], otherFormInstanceElements: FormInstanceElement[], gridRow: IGridRow, formField: FormField, formInstanceElementToUpdate: FormInstanceElement): void {\r\n let hshFieldValues: INumericValuesHashByFieldName = gridRow.getNumericValuesHashByFieldName(this.fieldDefinitionServce);\r\n let formulaEvaluationHelper = new FormulaEvaluationHelper().init(formField, gridRow, otherFormFields);\r\n\r\n // I hadn't noticed that this class already has its own evaluateFormula()\r\n let hshResult = FormulaEvaluator.evaluateFormula(formulaEvaluationHelper, formField.formula, hshFieldValues);\r\n\r\n if (hshResult) {\r\n if (!hshResult['error']) {\r\n formInstanceElementToUpdate.DoubleValue = hshResult['result'];\r\n formInstanceElementToUpdate.DecimalValue = hshResult['result'];\r\n formInstanceElementToUpdate.valueType = FormInstanceElementValueTypeEnum.TypeDouble;\r\n }\r\n }\r\n }\r\n\r\n // Not sure if this is actually getting called from anywhere\r\n public getNumericValue(formFieldParam: FormField, otherFormFields: FormField[], formInstanceElementParam: FormInstanceElement, gridRowParam: IGridRow, processingPhase: FormFieldProcessingPhaseEnum): number {\r\n let formulaEvaluationHelper = new FormulaEvaluationHelper();\r\n\r\n if ((processingPhase === FormFieldProcessingPhaseEnum.EDITING_DATA) || (processingPhase === FormFieldProcessingPhaseEnum.LOADING_DATA) || (processingPhase === FormFieldProcessingPhaseEnum.CREATING_DATA)) {\r\n let fieldDefinitionService: FieldDefinitionService = AppInjector.get(FieldDefinitionService);\r\n let hshFieldValues: INumericValuesHashByFieldName = gridRowParam.getNumericValuesHashByFieldName(fieldDefinitionService);\r\n\r\n let parser: any = math.parser();\r\n let otherFormInstanceElements: FormInstanceElement[] = [];\r\n let gridRow: GridRowDef = gridRowParam;\r\n if (gridRow.FormInstanceElementWrappers != null) {\r\n for (let index: number = 0; index < gridRow.FormInstanceElementWrappers.length; index++) {\r\n let formInstanceElementWrapper: GridFormInstanceElementWrapper = gridRow.FormInstanceElementWrappers[index];\r\n if (formInstanceElementWrapper.formInstanceElement != formInstanceElementParam)\r\n otherFormInstanceElements.push(formInstanceElementWrapper.formInstanceElement);\r\n }\r\n }\r\n\r\n formulaEvaluationHelper.FieldNameHashes = FormulaFieldDefLogic.buildFieldNameHashes(fieldDefinitionService, otherFormFields, otherFormInstanceElements);\r\n formulaEvaluationHelper.FormField = formFieldParam;\r\n\r\n if ((parser != null) && (hshFieldValues != null) && (formulaEvaluationHelper.FieldNameHashes.hshColNameToFormField != null) && (formFieldParam.formula != null) && (formFieldParam.formula.trim() !== '')) {\r\n\r\n let hshResult = FormulaEvaluator.evaluateFormula(formulaEvaluationHelper, formFieldParam.formula, hshFieldValues);\r\n\r\n if (hshResult != null) {\r\n if (!hshResult['error']) {\r\n formInstanceElementParam.DoubleValue = hshResult['result'];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return formInstanceElementParam.doubleValue;\r\n }\r\n\r\n private static displayNameToVariableName(formFieldParam: FormField): string {\r\n let variableName: string = formFieldParam.displayName.toLowerCase().replace(/ /g, '_');\r\n\r\n return (variableName);\r\n }\r\n\r\n private static buildFieldNameHashes(fieldDefinitionService: FieldDefinitionService, otherFormFields: FormField[], otherFormInstanceElements: FormInstanceElement[]): FieldNameHashes {\r\n let fieldNameHashes: FieldNameHashes = new FieldNameHashes();\r\n fieldNameHashes.hshColNameToFormField = {};\r\n fieldNameHashes.hshDisplayVariableNameToFormField = {};\r\n fieldNameHashes.hshFieldIdToFieldName = {};\r\n let hshDebugFieldValues: any = {};\r\n\r\n for (let index: number = 0; index < otherFormFields.length; index++) {\r\n let otherFormField: FormField = otherFormFields[index];\r\n let otherFormInstanceElement: FormInstanceElement = otherFormInstanceElements[index];\r\n\r\n fieldNameHashes.hshColNameToFormField[otherFormField.name] = otherFormField;\r\n fieldNameHashes.hshFieldIdToFieldName[otherFormField.id] = otherFormField.name;\r\n\r\n // Determine the field's value.\r\n let numValue: number = 0.0;\r\n\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(otherFormField.fieldDefinitionClassName);\r\n\r\n if (fieldDefinition.isNumeric) {\r\n if (otherFormInstanceElement != null) {\r\n numValue = otherFormInstanceElement.toNumber(otherFormField, fieldDefinition.formInstanceElementPropertyName);\r\n }\r\n }\r\n\r\n // Save the value in the values hash. \r\n hshDebugFieldValues[`col${index + 1}`] = numValue;\r\n\r\n hshDebugFieldValues[`col${otherFormField.id}`] = numValue;\r\n\r\n if (otherFormField.displayName != null) {\r\n let displayVariableName: string = FormulaFieldDefLogic.displayNameToVariableName(otherFormField);\r\n fieldNameHashes.hshDisplayVariableNameToFormField[displayVariableName] = otherFormField;\r\n hshDebugFieldValues[displayVariableName] = numValue;\r\n }\r\n }\r\n\r\n return fieldNameHashes;\r\n }\r\n\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return false;\r\n }\r\n}\r\n","import { DefaultFieldDefinitionClientLogic } from \"./default-field-def-client-logic\";\r\nimport { FormField } from '../form-field.model';\r\n\r\nexport class GridFieldDefLogic extends DefaultFieldDefinitionClientLogic {\r\n\r\n public includeInFormTemplateInstancesGrid(): boolean {\r\n return true;\r\n }\r\n\r\n public isATypeOfGridField(formField: FormField): boolean {\r\n return true;\r\n }\r\n}\r\n","//TEAMS-835: KLW - Create the defninition logic for the HTML Link form field\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { IGridRow } from '../../../interfaces/grid-row.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class HtmlLinkFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n };\r\n\r\n public isURLLink(): boolean {\r\n return true;\r\n }\r\n\r\n public whenInGridShowAs(): string {\r\n return 'LINK';\r\n }\r\n\r\n //VNEXT-938: KLW - Use the getDisplayValue to create a URL link for when the HTML field is used on the site homepage.\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[] = null): string {\r\n let url = formInstanceElementParam.textValue;\r\n //VNEXT-1096: KLW - URL field doesn't need this anymore\r\n // return `${url}`;\r\n return url;\r\n }\r\n}\r\n","import { IntegerFieldDefLogic } from './integer-field-def-logic';\r\nimport { FormField } from '../form-field.model';\r\nimport { FormInstanceElement } from '../form-instance-element.model';\r\nimport { FormInstanceGridRow } from '../../site-content/form-instance-grid-row.model';\r\nimport { MetadataFieldDefinitionLogicBase } from './metadata-field-def-logic-base';\r\n\r\nexport class IdMetadataFieldDefLogic extends MetadataFieldDefinitionLogicBase {\r\n public constructor() {\r\n super('id');\r\n }\r\n\r\n public unpackTemplateInstancesRow(formField: FormField, colValue: FormInstanceElement, row: FormInstanceGridRow): any {\r\n let fieldValue: string = row[formField.name];\r\n return fieldValue;\r\n }\r\n}\r\n","import { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { Form } from '../form.model';\r\nimport { FormField } from '../form-field.model';\r\nimport { PreRenderFilterBase } from './pre-render-filter-base';\r\n\r\nexport class MarkDataAsReadOnlyPreRenderFilter extends PreRenderFilterBase implements IFormPreRenderFilter {\r\n // Properties.\r\n private formField: FormField;\r\n\r\n // Constructor.\r\n public constructor(formField: FormField) {\r\n super();\r\n this.formField = formField;\r\n }\r\n\r\n // Getter method.\r\n public get FormField(): FormField {\r\n return this.formField;\r\n }\r\n\r\n // Implement IFormPreRenderFilter.\r\n public markFieldAsReadOnly(unusedForm: Form, unusedFormField: FormField, userRoleNames: string[], unusedFormInstanceElement): boolean {\r\n let markReadOnly: boolean = false;\r\n\r\n if ((this.formField.showToHideFromRoleNames != null) && (this.formField.showToHideFromRoleNames.trim() != '')) {\r\n let configuredRoleNames: string[] = this.formField.showToHideFromRoleNames.split(',');\r\n if ((configuredRoleNames.length > 0) && (userRoleNames.length > 0)) {\r\n for (let index: number = 0; index < userRoleNames.length; index++) {\r\n let userRoleName: string = userRoleNames[index];\r\n if (configuredRoleNames.indexOf(userRoleName) >= 0) {\r\n markReadOnly = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return markReadOnly;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { IFormPreRenderFilter } from '../../../interfaces/iform-pre-render-filter.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { ShowToHideFromCustomLogicBase } from './show-to-hide-from-logic-base';\r\nimport { MarkDataAsReadOnlyPreRenderFilter } from './mark-data-as-read-only-pre-render-filter';\r\n\r\nexport class MarkDataAsReadOnlyFieldDefinitionCustomLogic extends ShowToHideFromCustomLogicBase implements IFieldDefinitionLogic {\r\n public constructor() {\r\n super();\r\n };\r\n\r\n // Implement some IFieldDefinitionLogic methods.\r\n public pushFormPreRenderFilterFor(formField: FormField): IFormPreRenderFilter {\r\n let filter: IFormPreRenderFilter = null;\r\n // As a show to or hide from has a begin and an end form field, only return a filter for the begin field.\r\n if (formField.isConditionalBeginElement)\r\n filter = new MarkDataAsReadOnlyPreRenderFilter(formField);\r\n return filter;\r\n }\r\n public popFormPreRenderFilter(filter: IFormPreRenderFilter, formField: FormField): boolean {\r\n let pop: boolean = false;\r\n\r\n if (filter instanceof MarkDataAsReadOnlyPreRenderFilter) {\r\n let showToFilter = filter;\r\n let filterFormField: FormField = showToFilter.FormField;\r\n\r\n pop = ShowToHideFromCustomLogicBase.popFilter(filterFormField, formField);\r\n }\r\n\r\n return pop;\r\n }\r\n\r\n public filterType(): string {\r\n return null;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { DefaultFieldDefinitionClientLogic } from './default-field-def-client-logic';\r\nimport { FormField } from '../form-field.model';\r\n\r\nexport class FormTemplateInstancesFieldDefLogic extends DefaultFieldDefinitionClientLogic implements IFieldDefinitionLogic {\r\n // Note: this class can be enhanced to allow for custom form template instances field definition client logic.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n // Override default method implementations where appropriate.\r\n public isATypeOfGridField(formField: FormField): boolean {\r\n return true;\r\n }\r\n}\r\n","import { DecimalFieldDefLogic } from './decimal-field-def-logic';\r\nimport { FormInstanceElement, FormInstanceElementValueTypeEnum } from '../form-instance-element.model';\r\nimport { IGridRow, IValuesByFieldName } from '../../../interfaces/grid-row.interface';\r\nimport { FormField } from '../form-field.model';\r\nimport { FieldDefinitionService } from '../../../services/field-definition.service';\r\nimport { FieldDefinition } from '../../../models/form-builder/field-definition.model';\r\nimport { FormulaFormFieldComponent } from '../../../components/form-fields/formula-form-field/formula-form-field.component';\r\nimport { FieldNameHashes } from '../../../components/form-fields/formula-form-field/field-name-hashes';\r\nimport { FormulaEvaluationHelper } from '../../../components/form-fields/formula-form-field/formula-evaluation-helper';\r\nimport { FormulaEvaluator } from '../../../components/form-fields/formula-form-field/formula-evaluator';\r\nimport { FormFieldProcessingPhaseEnum } from '../../../enums/form-field-processing-phase.enum';\r\nimport { AppInjector } from '../../../../app.module';\r\nimport { GridRowDef } from '../../../models/grid/grid-row.model';\r\nimport { GridFormInstanceElementWrapper } from '../../../models/grid/grid-form-instance-element-wrapper.model';\r\n\r\nimport * as math from 'mathjs';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class UrlBuilderFieldDefLogic extends TextFieldDefinitionLogicBase {\r\n // Constructor.\r\n public constructor(private fieldDefinitionServce: FieldDefinitionService) {\r\n super();\r\n }\r\n\r\n public whenInGridShowAs(): string {\r\n return 'BUTTON';\r\n }\r\n\r\n public getDisplayValue(formFieldParam: FormField, formInstanceElementParam: FormInstanceElement, gridRow: IGridRow, processingPhase: FormFieldProcessingPhaseEnum, gridRowColumnDefs: FormField[]): string {\r\n let displayValue: string = '';\r\n\r\n if (gridRowColumnDefs != null) {\r\n let hshFieldValues: IValuesByFieldName = gridRow.getValuesByFieldName(this.fieldDefinitionServce);\r\n let formulaEvaluationHelper = new FormulaEvaluationHelper().init(formFieldParam, gridRow, gridRowColumnDefs);\r\n let url = FormulaEvaluator.evaluateUrl(formulaEvaluationHelper, formFieldParam.transientUrlBuilderUrlTemplate, hshFieldValues);\r\n displayValue = url;\r\n }\r\n\r\n return displayValue;\r\n }\r\n\r\n public requiresFieldValueUpdate(): boolean {\r\n return true;\r\n }\r\n\r\n private static displayNameToVariableName(formFieldParam: FormField): string {\r\n let variableName: string = formFieldParam.displayName.toLowerCase().replace(/ /g, '_');\r\n\r\n return (variableName);\r\n }\r\n\r\n public filterType(): string {\r\n return 'text';\r\n }\r\n\r\n public isFilterable(): boolean {\r\n return false;\r\n }\r\n\r\n // this field displays as a button in a grid cell, and we don't want clicking the button to place the grid row into edit mode\r\n public doNotTriggerGridRowEditFor(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { MetadataFieldDefinitionLogicBase } from './metadata-field-def-logic-base';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\n\r\nexport class UserRolesFieldDefinitionLogic extends TextFieldDefinitionLogicBase implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super();\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { IFieldDefinitionLogic } from '../../../interfaces/ifield-definition-logic.interface';\r\nimport { MetadataFieldDefinitionLogicBase } from './metadata-field-def-logic-base';\r\nimport { TextFieldDefinitionLogicBase } from './text-logic-base';\r\nimport { TextMetadataFieldDefLogic } from './text-metadata-field-def-logic'\r\n\r\nexport class WorkflowStateFieldDefinitionLogic extends TextMetadataFieldDefLogic implements IFieldDefinitionLogic {\r\n // Constructor.\r\n public constructor() {\r\n super('workflowState');\r\n }\r\n\r\n public get canParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n\r\n public get isNonFlexFieldButCanParticipateInFlexFieldBehavior(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { IFieldDefinitionLogic } from '../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinition } from '../models/form-builder/field-definition.model';\r\nimport { AddRowAboveFieldDefinitionCustomLogic } from '../models/form-builder/field-defs/add-row-above-field-def-logic';\r\nimport { AddRowBelowFieldDefinitionCustomLogic } from '../models/form-builder/field-defs/add-row-below-field-def-logic';\r\nimport { CascadingDropdownFieldDefLogic } from '../models/form-builder/field-defs/cascading-dropdown-field-def-logic';\r\nimport { CascadingDropdownVirtualFieldDefLogic } from '../models/form-builder/field-defs/cascading-dropdown-virtual-field-def-logic';\r\nimport { CheckboxFieldDefLogic } from '../models/form-builder/field-defs/checkbox-field-def-logic';\r\nimport { CurrencyFieldDefLogic } from '../models/form-builder/field-defs/currency-field-def-logic';\r\nimport { DateFieldDefLogic } from '../models/form-builder/field-defs/date-field-def-logic';\r\nimport { DecimalFieldDefLogic } from '../models/form-builder/field-defs/decimal-field-def-logic';\r\nimport { DefaultFieldDefinitionClientLogic } from '../models/form-builder/field-defs/default-field-def-client-logic';\r\nimport { DropdownFieldDefLogic } from '../models/form-builder/field-defs/dropdown-field-def-logic';\r\nimport { GridCascadingDropdownFieldDefLogic } from '../models/form-builder/field-defs/grid-cascading-dropdown-field-def-logic';\r\nimport { HideFromFieldDefinitionCustomLogic } from '../models/form-builder/field-defs/hide-from-field-def-logic';\r\nimport { IntegerFieldDefLogic } from '../models/form-builder/field-defs/integer-field-def-logic';\r\nimport { MultiCheckboxFieldDefLogic } from '../models/form-builder/field-defs/multi-checkbox-field-def-logic';\r\nimport { MultiDropdownFieldDefLogic } from '../models/form-builder/field-defs/multi-dropdown-field-def-logic';\r\nimport { ParagraphFieldDefLogic } from '../models/form-builder/field-defs/paragraph-field-def-logic';\r\nimport { RadioButtonsFieldDefLogic } from '../models/form-builder/field-defs/radio-buttons-field-def-logic';\r\nimport { RichTextFieldDefLogic } from '../models/form-builder/field-defs/rich-text-field-def-logic';\r\nimport { ShortTextFieldDefLogic } from '../models/form-builder/field-defs/short-text-field-def-logic';\r\nimport { ShowToFieldDefinitionCustomLogic } from '../models/form-builder/field-defs/show-to-field-def-logic';\r\nimport { EditorNameFieldDefLogic } from '../models/form-builder/field-defs/editor-name-field-def-logic';\r\nimport { LastEditedDateFieldDefLogic } from '../models/form-builder/field-defs/last-edited-date-field-def-logic';\r\n\r\nimport {\r\n AddRowAboveFieldType,\r\n AddRowBelowFieldType,\r\n CascadingDropDownFieldType,\r\n CascadingDropDownVirtualFieldType,\r\n CheckboxFieldType,\r\n CurrencyFieldType,\r\n DateFieldType,\r\n DecimalFieldType,\r\n DropDownFieldType,\r\n FavoriteFieldType,\r\n FlexibleSelectionFieldType,\r\n FolderNameFieldType,\r\n FolderPathFieldType,\r\n FormInstanceNameFieldType,\r\n FormTemplateInstancesFieldType,\r\n FormulaFieldType,\r\n GridCascadingDropDownFieldType,\r\n GridFieldType,\r\n HideFromFieldType,\r\n HTMLLinkFieldType,\r\n IdFieldType,\r\n IntegerFieldType,\r\n MarkDataReadOnlyFieldType,\r\n MultiCheckboxFieldType,\r\n MultiDropDownFieldType,\r\n ParagraphFieldType,\r\n RadioButtonsFieldType,\r\n RichTextFieldType,\r\n ShortTextFieldType,\r\n ShowToFieldType,\r\n UrlBuilderFieldType,\r\n UserRolesFieldType,\r\n WorkflowStateFieldType,\r\n EditorNameFieldType,\r\n LastEditedDateFieldType\r\n} from '../models/form-builder/form-field-types';\r\nimport { QueryOptions } from '../query-options';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\n;\r\n//import { AttachmentService } from './attachment.service';\r\nimport { FavoriteFieldDefLogic } from '../models/form-builder/field-defs/favorite-field-def-logic';\r\nimport { FlexibleSelectionFieldDefLogic } from '../models/form-builder/field-defs/flexible-selection-field-def-logic';\r\nimport { FolderNameFieldDefinitionLogic } from '../models/form-builder/field-defs/folder-name-field-def-logic';\r\nimport { FolderPathFieldDefinitionLogic } from '../models/form-builder/field-defs/folder-path-field-def-logic';\r\nimport { FormInstanceNameFieldDefinitionLogic } from '../models/form-builder/field-defs/form-instance-name-field-def-logic';\r\nimport { FormulaFieldDefLogic } from '../models/form-builder/field-defs/formula-field-def-logic';\r\nimport { GridFieldDefLogic } from '../models/form-builder/field-defs/grid-field-def-logic';\r\nimport { HtmlLinkFieldDefLogic } from '../models/form-builder/field-defs/html-link-field-def-logic';\r\nimport { IdMetadataFieldDefLogic } from '../models/form-builder/field-defs/id-metadata-field-def-logic';\r\nimport { MarkDataAsReadOnlyFieldDefinitionCustomLogic } from '../models/form-builder/field-defs/mark-data-as-read-only-field-def-logic';\r\nimport { FormTemplateInstancesFieldDefLogic } from '../models/form-builder/field-defs/template-instances-field-def-logic';\r\nimport { UrlBuilderFieldDefLogic } from '../models/form-builder/field-defs/url-builder-field-def-logic';\r\nimport { UserRolesFieldDefinitionLogic } from '../models/form-builder/field-defs/user-roles-field-def-logic';\r\nimport { WorkflowStateFieldDefinitionLogic } from '../models/form-builder/field-defs/workflow-state-field-def-logic';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\r\n// Define type-safe map types.\r\ninterface IFieldDefinitionNameToFieldDefinition {\r\n [fieldName: string]: FieldDefinition;\r\n}\r\ninterface IFieldDefinitionNameToDisplayName {\r\n [fieldName: string]: string;\r\n}\r\nexport interface IFieldDefintionToCustomLogicHandler {\r\n [fieldDefinitionClassName: string]: IFieldDefinitionLogic;\r\n}\r\n\r\n// Define/implement field definition custom logic classes.\r\n// Define the custom logic handler that does nothing (works for most field definition classes).\r\n//\r\n// Note: these classes have been moved into their own files and are imported above.\r\n\r\n// Implement this file's service class.\r\n@Injectable(\r\n { providedIn: 'root' }\r\n)\r\nexport class FieldDefinitionService extends CollectApiServiceBase {\r\n // Properties.\r\n /*\r\n private cachedFieldDefs: FieldDefinition[] = null;\r\n private mapOfCachedFieldDefs: IFieldDefinitionNameToFieldDefinition = null;\r\n\r\n private mapOfFieldDefinitionNamesToDisplayNames: IFieldDefinitionNameToDisplayName = {};\r\n private mapOfCustomLogicHandlers: IFieldDefintionToCustomLogicHandler = {};\r\n */\r\n private static staticCachedFieldDefs: FieldDefinition[] = null;\r\n private static staticMapOfCachedFieldDefs: IFieldDefinitionNameToFieldDefinition = null;\r\n\r\n private static staticMapOfFieldDefinitionNamesToDisplayNames: IFieldDefinitionNameToDisplayName = {};\r\n private static staticMapOfCustomLogicHandlers: IFieldDefintionToCustomLogicHandler = {};\r\n\r\n // Constructor.\r\n public constructor(http: HttpClient,\r\n public progressIndicatorService: ProgressIndicatorService,\r\n ) {\r\n //private renderer: Renderer2,\r\n //private attachmentService: AttachmentService,\r\n //private dateAdapter: DateAdapter,\r\n //private dialog: MatDialog) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'fieldDefinition', FieldDefinition);\r\n\r\n this.loadCustomLogicHandlers();\r\n\r\n return;\r\n }\r\n\r\n // Getter/setter methods.\r\n public get fieldDefinitionsLoaded(): boolean {\r\n let loaded = ((this.cachedFieldDefs != null) && (this.cachedFieldDefs.length > 0));\r\n return loaded;\r\n }\r\n\r\n // Getter/setters methods for accessing static variables.\r\n private get cachedFieldDefs(): FieldDefinition[] {\r\n return FieldDefinitionService.staticCachedFieldDefs;\r\n }\r\n private get mapOfCachedFieldDefs(): IFieldDefinitionNameToFieldDefinition {\r\n return FieldDefinitionService.staticMapOfCachedFieldDefs;\r\n }\r\n private get mapOfFieldDefinitionNamesToDisplayNames(): IFieldDefinitionNameToDisplayName {\r\n return FieldDefinitionService.staticMapOfFieldDefinitionNamesToDisplayNames;\r\n }\r\n private get mapOfCustomLogicHandlers(): IFieldDefintionToCustomLogicHandler {\r\n return FieldDefinitionService.staticMapOfCustomLogicHandlers;\r\n }\r\n\r\n private set cachedFieldDefs(value: FieldDefinition[]) {\r\n FieldDefinitionService.staticCachedFieldDefs = value;\r\n }\r\n private set mapOfCachedFieldDefs(value: IFieldDefinitionNameToFieldDefinition) {\r\n FieldDefinitionService.staticMapOfCachedFieldDefs = value;\r\n }\r\n private set mapOfFieldDefinitionNamesToDisplayNames(value: IFieldDefinitionNameToDisplayName) {\r\n FieldDefinitionService.staticMapOfFieldDefinitionNamesToDisplayNames = value;\r\n }\r\n private set mapOfCustomLogicHandlers(value: IFieldDefintionToCustomLogicHandler) {\r\n FieldDefinitionService.staticMapOfCustomLogicHandlers = value;\r\n }\r\n\r\n //formatResponse(data: FieldDefinition): FieldDefinition {\r\n // let obj = Object.assign(new FieldDefinition(), data);\r\n\r\n // return obj;\r\n //}\r\n public formatResponse(data: FieldDefinition): FieldDefinition {\r\n let obj = plainToClass(FieldDefinition, data);\r\n\r\n return (obj);\r\n }\r\n\r\n public getAll(queryOptions?: QueryOptions): Promise {\r\n let result: Promise = null;\r\n\r\n if (this.cachedFieldDefs == null) {\r\n result = new Promise((resolve, reject) => {\r\n super.getAll(queryOptions).then(responseFieldDefs => {\r\n this.cacheFieldDefinitions(responseFieldDefs);\r\n\r\n resolve(responseFieldDefs);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.cachedFieldDefs);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public getMetadataFields(): Promise {\r\n let result: Promise = null;\r\n\r\n result = new Promise((resolve, reject) => {\r\n this.getAll().then(allFieldDefs => {\r\n let metadataFieldDefs: FieldDefinition[] = allFieldDefs.filter(fd => fd.isMetadataField);\r\n\r\n resolve(metadataFieldDefs);\r\n });\r\n });\r\n\r\n return result;\r\n }\r\n /*\r\n public getAllGridFieldTypesAndNameFields(): Promise {\r\n let result: Promise = null;\r\n\r\n result = new Promise((resolve, reject) => {\r\n this.getAll().then(allFieldDefs => {\r\n let responseFieldDefs: FieldDefinition[] = allFieldDefs.filter(fd => fd.canBeDroppedOnGrid);\r\n\r\n resolve(responseFieldDefs);\r\n });\r\n });\r\n\r\n return result;\r\n }\r\n */\r\n\r\n // Implement getAllResponseReady(), called by the base class's getAll() method.\r\n protected getAllResponseReady(response: FieldDefinition[]): void {\r\n // Have we initialized the map of field definition names to display names?\r\n let mapKeys: string[] = Object.keys(this.mapOfFieldDefinitionNamesToDisplayNames);\r\n if (mapKeys.length == 0) {\r\n // Initialize the map now.\r\n for (let iFieldDef: number = 0; iFieldDef < response.length; iFieldDef++) {\r\n let fieldDefinition: FieldDefinition = response[iFieldDef];\r\n\r\n this.mapOfFieldDefinitionNamesToDisplayNames[fieldDefinition.className] = fieldDefinition.displayName;\r\n }\r\n }\r\n }\r\n\r\n public getFieldTypeDisplayName(fieldDefinitionName: string, throwExceptionOnError: boolean = true): string {\r\n let displayName: string = this.mapOfFieldDefinitionNamesToDisplayNames[fieldDefinitionName];\r\n\r\n if ((displayName == undefined) && throwExceptionOnError) {\r\n let errorMsg: string = `FieldDefinitionService.getFieldTypeDisplayName(): could not find a display name for field definition class '${fieldDefinitionName}.`;\r\n throw (errorMsg);\r\n }\r\n\r\n return (displayName);\r\n }\r\n\r\n // Note: it might make sense to rework the following method to return a Promise \r\n // result, though we would have to analyze how this method is being used before doing so.\r\n public getFieldDefinition(fieldDefinitionClassName: string, throwExceptionOnFailure: boolean = true): FieldDefinition {\r\n let fieldDefinition: FieldDefinition = null;\r\n\r\n if (this.mapOfCachedFieldDefs != null) {\r\n fieldDefinition = this.mapOfCachedFieldDefs[fieldDefinitionClassName];\r\n\r\n if (fieldDefinition.customLogicHandler == null)\r\n fieldDefinition.customLogicHandler = this.getFieldClientLogicHandler(fieldDefinitionClassName);\r\n }\r\n\r\n if ((fieldDefinition == null) && throwExceptionOnFailure)\r\n throw `FieldDefinitionService.getFieldDefinition(): could not get a field definition for field class '${fieldDefinitionClassName}'.`;\r\n\r\n return fieldDefinition;\r\n }\r\n\r\n /*\r\n public getFieldClientLogicHandler(fieldDefinitionClassName: string): IFieldDefinitionLogic {\r\n let fieldDefinition: FieldDefinition = this.getFieldDefinition(fieldDefinitionClassName);\r\n\r\n return fieldDefinition.customLogicHandler;\r\n }\r\n */\r\n\r\n public getFieldClientLogicHandler(fieldDefinitionClassName: string): IFieldDefinitionLogic {\r\n let customLogicHandler: IFieldDefinitionLogic = this.mapOfCustomLogicHandlers[fieldDefinitionClassName];\r\n\r\n if (customLogicHandler == null)\r\n customLogicHandler = new DefaultFieldDefinitionClientLogic();\r\n\r\n return customLogicHandler;\r\n }\r\n\r\n // Helper methods.\r\n private cacheFieldDefinitions(responseFieldDefs: FieldDefinition[]): void {\r\n this.cachedFieldDefs = responseFieldDefs;\r\n\r\n this.mapOfCachedFieldDefs = {};\r\n\r\n if (responseFieldDefs != null){\r\n for (let index: number = 0; index < responseFieldDefs.length; index++){\r\n let responseFieldDef: FieldDefinition = responseFieldDefs[index];\r\n\r\n this.mapOfCachedFieldDefs[responseFieldDef.className] = responseFieldDef;\r\n }\r\n }\r\n }\r\n\r\n private loadCustomLogicHandlers(): void {\r\n this.mapOfCustomLogicHandlers[AddRowAboveFieldType] = new AddRowAboveFieldDefinitionCustomLogic();\r\n this.mapOfCustomLogicHandlers[AddRowBelowFieldType] = new AddRowBelowFieldDefinitionCustomLogic();\r\n this.mapOfCustomLogicHandlers[ShowToFieldType] = new ShowToFieldDefinitionCustomLogic();\r\n this.mapOfCustomLogicHandlers[HideFromFieldType] = new HideFromFieldDefinitionCustomLogic();\r\n this.mapOfCustomLogicHandlers[CascadingDropDownFieldType] = new CascadingDropdownFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[CascadingDropDownVirtualFieldType] = new CascadingDropdownVirtualFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[GridCascadingDropDownFieldType] = new GridCascadingDropdownFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[CheckboxFieldType] = new CheckboxFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[DropDownFieldType] = new DropdownFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[MultiDropDownFieldType] = new MultiDropdownFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[MultiCheckboxFieldType] = new MultiCheckboxFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[RadioButtonsFieldType] = new RadioButtonsFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[DecimalFieldType] = new DecimalFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[CurrencyFieldType] = new CurrencyFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[IntegerFieldType] = new IntegerFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[DateFieldType] = new DateFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[ShortTextFieldType] = new ShortTextFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[RichTextFieldType] = new RichTextFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[ParagraphFieldType] = new ParagraphFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[FormulaFieldType] = new FormulaFieldDefLogic(this);\r\n this.mapOfCustomLogicHandlers[UrlBuilderFieldType] = new UrlBuilderFieldDefLogic(this); \r\n //TEAMS-835: KLW - Needed for the HTML Link form field\r\n this.mapOfCustomLogicHandlers[HTMLLinkFieldType] = new HtmlLinkFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[MarkDataReadOnlyFieldType] = new MarkDataAsReadOnlyFieldDefinitionCustomLogic();\r\n this.mapOfCustomLogicHandlers[GridFieldType] = new GridFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[FlexibleSelectionFieldType] = new FlexibleSelectionFieldDefLogic();\r\n\r\n // Metadata field definition logic classes:\r\n this.mapOfCustomLogicHandlers[UserRolesFieldType] = new UserRolesFieldDefinitionLogic();\r\n this.mapOfCustomLogicHandlers[WorkflowStateFieldType] = new WorkflowStateFieldDefinitionLogic();\r\n this.mapOfCustomLogicHandlers[FolderNameFieldType] = new FolderNameFieldDefinitionLogic();\r\n this.mapOfCustomLogicHandlers[FolderPathFieldType] = new FolderPathFieldDefinitionLogic();\r\n this.mapOfCustomLogicHandlers[FormInstanceNameFieldType] = new FormInstanceNameFieldDefinitionLogic();\r\n this.mapOfCustomLogicHandlers[IdFieldType] = new IdMetadataFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[FavoriteFieldType] = new FavoriteFieldDefLogic();\r\n\r\n this.mapOfCustomLogicHandlers[FormTemplateInstancesFieldType] = new FormTemplateInstancesFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[EditorNameFieldType] = new EditorNameFieldDefLogic();\r\n this.mapOfCustomLogicHandlers[LastEditedDateFieldType] = new LastEditedDateFieldDefLogic();\r\n\r\n }\r\n}\r\n","import { FormInstanceElement } from \"../form-builder/form-instance-element.model\"\r\nimport { ChangedSelectionFieldValues } from \"./changed-selection-field-values.model\";\r\n\r\nexport class SelectionFieldValueChangeInstructions {\r\n public fieldNames: any;\r\n public sourceFieldDisplayName: string;\r\n public sourceFieldName: string;\r\n public sourceFieldValue: string[];\r\n public fieldIdsToSelectedValues: any;\r\n\r\n public id: number;\r\n public formInstanceElement: FormInstanceElement;\r\n public fieldSelectableValues: ChangedSelectionFieldValues[] = [];\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormRendererComponent } from '../components/form-renderer/form-renderer.component';\r\nimport { FormField } from '../models/form-builder/form-field.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { ChangedSelectionFieldValues } from '../models/flexible-selection-fields/changed-selection-field-values.model';\r\nimport { ListConstraintColumn } from '../models/flexible-selection-fields/list-constraint-column.model';\r\nimport { SelectionFieldValueChangeInstructions } from '../models/flexible-selection-fields/selection-field-value-change-instructions.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormInstanceElement } from '../models/form-builder/form-instance-element.model';\r\nimport { environment } from '../../../environments/environment';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { FieldIdToSelectedValues, FlexibleSelectionFieldInstructionsRequest } from '../models/flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\nimport { FlexibleSelectionFieldType } from '../models/form-builder/form-field-types';\r\nimport { Subject, Observable } from \"rxjs\";\r\nimport { GridRowViewModel } from '../models/form-builder/grid-row.model';\r\nimport { FormFieldValidationResult } from '../models/flexible-selection-fields/form-field-validation-result.model';\r\n\r\nexport interface FieldIdToSingleOption { [key: number]: string }\r\n\r\n@Injectable()\r\nexport class FlexibleSelectionFieldService extends CollectApiServiceBase {\r\n\r\n private formRenderer: FormRendererComponent;\r\n private cachedGridFieldOptions: ChangedSelectionFieldValues[];\r\n private autoSelectFieldValuesSubject: Subject = new Subject(); // allows changes to be pushed to subscribers\r\n private autoSelectFieldValues: FieldIdToSingleOption = null; // allows proactive look ups\r\n\r\n // Pharvey - 11/25/2024 - selectedValuesByFieldId was introduced to provide a mechanism for GridRows' selected values to be set.\r\n // Form-level flex fields' selected values can be obtained by calling this.formInstance.getSelectedValuesByFieldId() but this doesn't\r\n // work for flex fields in grids -- there is no mechanism for one field in a grid row to get the value of another. And so selectedValuesByFieldId\r\n // was introduced. Each time a selection change is made in a grid, a mapping is added to this property and the whole mapping is sent to the server\r\n // so that the server can know the whole chain of selected values which it needs for correct behavior.\r\n // SIMPLIFY?: It might be worth converting form-level flex fields to use this same approach for consistency sake, and to enable the server\r\n // code to be simplified so it doesn't have multiple ways of find selected values\r\n private selectedValuesByFieldId: FieldIdToSelectedValues = {};\r\n\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'flexibleSelectionField', SelectionFieldValueChangeInstructions)\r\n }\r\n\r\n // Gets flex field instructions for an entire form instance\r\n public requestFlexibleFieldInstructionsForFormInstance(formInstanceId: number) {\r\n this.selectedValuesByFieldId = {};\r\n let url = `${this.url}/${this.endpoint}/getFlexibleFieldInstructionsForFormInstance/${formInstanceId}`;\r\n this.http.get(url)\r\n .toPromise()\r\n .then(instructions => {\r\n this.updateTargetFields(instructions);\r\n });\r\n }\r\n\r\n // Called when the value of a flex field changes. Get instructions for the updating the options of other flex fields\r\n // which depend on the one whose selection was changed\r\n public selectionFieldValueChanged(\r\n formField: FormField,\r\n formInstance: FormInstance,\r\n formInstanceElement: FormInstanceElement,\r\n parentValues: FormInstanceElement[],\r\n gridRowId: number = 0,\r\n gridColumnDefs: FormField[] = null): Promise {\r\n\r\n // SIMPLIFY? Since we have the FormInstance do we need this reference to formRenderer? Couldn't the form instance answer this?\r\n if (this.formRenderer.hasDependentFields(formField)) {\r\n\r\n // Whenever a flex field's value is changed, we add a mapping of the field's Id to its new selected value so that the whole chain of selected values can be passed to the server\r\n // (This is for the benefit of flex fields in grids but could be used for regular fields also)\r\n this.updateSelectedValuesToFieldIds(formField, formInstance, formInstanceElement);\r\n //console.log('formField.dependsOnParentFormFieldId=' + formField.dependsOnParentFormFieldId);\r\n if (this.selectedValuesByFieldId[formField.dependsOnParentFormFieldId] === null) {\r\n //console.log(`Adding ${formInstance.getSelectedValuesByFieldId()[formField.dependsOnParentFormFieldId]}`);\r\n this.selectedValuesByFieldId[formField.dependsOnParentFormFieldId] = formInstance.getSelectedValuesByFieldId()[formField.dependsOnParentFormFieldId];\r\n }\r\n\r\n let payload = new FlexibleSelectionFieldInstructionsRequest(formInstance, formInstanceElement, this.selectedValuesByFieldId, null, gridRowId, gridColumnDefs);\r\n let url = `${this.url}/${this.endpoint}/GetFlexibleFieldInstructionsForField`;\r\n return this.http.post(url, payload)\r\n .toPromise()\r\n .then(instructions => {\r\n this.updateTargetFields(instructions, gridColumnDefs);\r\n let hasDependentGridFields = this.cachedGridFieldOptions?.length > 0;\r\n\r\n let iAmNotAGridField = this.cachedGridFieldOptions?.filter(x => { return x.formFieldId == formField.id }).length == 0;\r\n return iAmNotAGridField && hasDependentGridFields;\r\n });\r\n }\r\n }\r\n\r\n public validateGridRow(gridRow: GridRowViewModel, valuesToFieldIds: FieldIdToSelectedValues): Promise {\r\n let url = `${this.url}/${this.endpoint}/ValidateGridRow`;\r\n let payload = new FlexibleSelectionFieldInstructionsRequest(null, null, valuesToFieldIds, gridRow, gridRow.id, null);\r\n\r\n return this.http.post(url, payload)\r\n .toPromise()\r\n .then(validationResults => {\r\n var failures = validationResults.filter(x => x.validationFailureMessage);\r\n return failures;\r\n });\r\n }\r\n\r\n // updates this.selectedValuesByFieldId and this.FormRenderer.SelectedValuesByFieldId\r\n // SIMPLIFY? this.FormInstance could have the one and only selectedValuesByFieldId which this component and form renderer could use as needed\r\n // whereas right now it's spread around and ripe to cause confusion\r\n private updateSelectedValuesToFieldIds(formField: FormField, formInstance: FormInstance, formInstanceElement: FormInstanceElement): void {\r\n // first, remove any fields that depend on formField (their values will no longer be relevant since their parent has changed)\r\n const formFieldsToRemove = this.findFieldsThatDependOnThisField(formField);\r\n for (let id of formFieldsToRemove) {\r\n delete this.selectedValuesByFieldId[id];\r\n }\r\n \r\n // next add the new value to the local hash and to FormRender's hash\r\n let value: string[] = null;\r\n if (formInstanceElement.childFormInstanceElements) {\r\n value = formInstanceElement.childFormInstanceElements.map(x => { return x.textValue; });\r\n } else {\r\n value = formInstanceElement.getValueAsStringArray();\r\n }\r\n this.selectedValuesByFieldId[formInstanceElement.formFieldId] = value;\r\n this.FormRenderer.SelectedValuesByFieldId[formInstanceElement.formFieldId] = value;\r\n }\r\n\r\n // Finds any form-level or grid-level fields which depend on formField\r\n private findFieldsThatDependOnThisField(formField: FormField): number[] {\r\n let formFields = this.FormRenderer.form.formFields;\r\n let fieldsThatDependOnThisField = [];\r\n let formLevelDependentFields = formFields.filter(x => { return x.dependsOnParentFormFieldId == formField.id; });\r\n let gridLevelDependentFields = formFields.map(x => { return x.childFormFields.filter(c => { return c.dependsOnParentFormFieldId == formField.id; }); });\r\n if (formLevelDependentFields.length > 0) {\r\n fieldsThatDependOnThisField.concat(formLevelDependentFields);\r\n }\r\n if (gridLevelDependentFields.length > 0) {\r\n fieldsThatDependOnThisField.concat(gridLevelDependentFields);\r\n }\r\n const formFieldsToRemove = gridLevelDependentFields.reduce((acc, val) => acc.concat(val), []);\r\n return formFieldsToRemove.map(x => { return x.id });\r\n }\r\n\r\n // This method is called when a grid row is opened for editing (it is NOT called when flex fields in a row have their selections changed - selectionFieldValueChanged() is always called for that)\r\n // If gridsUseCachedInstructions is true, the method does NOT make a call to the server but rather uses instructions returned by a previous call to get instructions\r\n public getFlexibleSelectFieldInstructionsForGridRow(formInstanceId: number, rowData: any, gridColFieldDefs: FormField[], formInstance: FormInstance = null) {\r\n this.autoSelectFieldValues = {};\r\n let flexFields = gridColFieldDefs.filter(x => { return x.fieldDefinitionClassName == FlexibleSelectionFieldType })\r\n if (flexFields.length == 0) return;\r\n\r\n if (flexFields && rowData) {\r\n // When opening a gridrow for editing, need to build a mapping of that row's fields to their selected values in that row\r\n // That's what initializeSelectedValuesMappingForGridRow() does\r\n this.initializeSelectedValuesMappingForGridRow(flexFields, rowData);\r\n let payload = new FlexibleSelectionFieldInstructionsRequest(formInstance, null, this.selectedValuesByFieldId, null /*gridRow*/, 0, gridColFieldDefs, true);\r\n\r\n let url = `${this.url}/${this.endpoint}/GetFlexibleFieldInstructionsForField`;\r\n this.http.post(url, payload)\r\n .toPromise()\r\n .then(instructions => {\r\n this.updateTargetFields(instructions);\r\n for (let newFieldValues of this.cachedGridFieldOptions) {\r\n let formFieldId = newFieldValues.formFieldId;\r\n let targetFormField: FormField = gridColFieldDefs.filter(x => { return x.id == formFieldId; })[0];\r\n let options = newFieldValues.constraintValues.map(x => { return x.textValue; });\r\n if (targetFormField) {\r\n targetFormField.setSelectOptions(options.join('|'));\r\n this.updateAutoSelectFieldValues(options, targetFormField);\r\n }\r\n }\r\n });\r\n } else {\r\n for (let newFieldValues of this.cachedGridFieldOptions) {\r\n let formFieldId = newFieldValues.formFieldId;\r\n let targetFormField: FormField = gridColFieldDefs.filter(x => { return x.id == formFieldId; })[0];\r\n if (targetFormField) {\r\n let options = newFieldValues.constraintValues.map(x => { return x.textValue; });\r\n targetFormField.setSelectOptions(options.join('|'));\r\n //console.log('setting options for ' + targetFormField.name + ' to ' + options.join('|'));\r\n this.updateAutoSelectFieldValues(options, targetFormField);\r\n }\r\n }\r\n }\r\n\r\n this.autoSelectFieldValuesSubject.next(this.autoSelectFieldValues);\r\n }\r\n\r\n // empties selectedValuesByFieldId and re-populates it from values in rowData\r\n private initializeSelectedValuesMappingForGridRow(flexFields: FormField[], rowData: any) {\r\n this.selectedValuesByFieldId = {};\r\n for (let flexField of flexFields) {\r\n this.selectedValuesByFieldId[flexField.id] = rowData[flexField.name]?.split(\",\");\r\n }\r\n }\r\n\r\n // Takes a SelectionFieldValueChangeInstructions object and uses the formRenderer to update the options of all fields referenced in it\r\n // When the optional gridColumnDefs is passed and if a form-level target field cannot be found, it's searched for in gridColumnDefs\r\n // If no target field can be found and gridColumnDefs is not passed in, then the assumption is made that the selectable values are\r\n // are for a grid field and as added to this.cachedGridFieldOptions which can be accessed by Grids in a later call\r\n private updateTargetFields(\r\n instructions: SelectionFieldValueChangeInstructions,\r\n gridColumnDefs: FormField[] = null) {\r\n\r\n this.autoSelectFieldValues = {};\r\n for (let newFieldValues of instructions.fieldSelectableValues) {\r\n let formFieldId = newFieldValues.formFieldId;\r\n let targetFormField: FormField = this.formRenderer.form.formFields.find(x => { return x.id == formFieldId; });\r\n //let targetElement = this.formRenderer.formInstance.formInstanceElements.find(x => { return x.formFieldId = formFieldId });\r\n let options = newFieldValues.constraintValues.map(x => { return x.textValue; });\r\n if (targetFormField) {\r\n targetFormField.setSelectOptions(options.join('|'));\r\n this.updateAutoSelectFieldValues(options, targetFormField);\r\n } else if (gridColumnDefs) {\r\n let targetGridField = gridColumnDefs.filter(x => { return x.id == formFieldId; })[0];\r\n if (targetGridField) {\r\n targetGridField.setSelectOptions(options.join('|'));\r\n this.updateAutoSelectFieldValues(options, targetGridField);\r\n }\r\n } else {\r\n if (this.cachedGridFieldOptions == null) {\r\n this.cachedGridFieldOptions = [];\r\n }\r\n // if the field wasn't found it means its a field in a grid which is not exposed to formRenderer, so here we cache them ready for when a user\r\n // clicks on a grid row to edit it, at which point it will use these cached values to populate the options of any flex fields in it\r\n if (this.cachedGridFieldOptions.indexOf(newFieldValues) == -1) {\r\n this.cachedGridFieldOptions.push(newFieldValues);\r\n }\r\n }\r\n }\r\n this.autoSelectFieldValuesSubject.next(this.autoSelectFieldValues);\r\n }\r\n\r\n private updateAutoSelectFieldValues(options: string[], targetFormField: FormField) {\r\n if (options.length == 1) {\r\n this.autoSelectFieldValues[targetFormField.id] = options[0];\r\n }\r\n }\r\n\r\n // TODO - disambiguate this so it's clear there are two SelectedValuesByFieldId - one local to this service, and one for the whole FormInstance in FormRenderer\r\n public get SelectedValuesByFieldId(): FieldIdToSelectedValues {\r\n return this.formRenderer.SelectedValuesByFieldId;\r\n }\r\n\r\n // Allows Flex Field components to subscribe in case any need to auto-select a single value\r\n public get AutoSelectFieldValuesSubject(): Observable {\r\n return this.autoSelectFieldValuesSubject.asObservable();\r\n }\r\n // Also provide a way to get values, not just subscribe to them\r\n // This is needed for fields in grids which don't get intialized\r\n // the same way as form level fields\r\n public get AutoSelectFieldValues(): any {\r\n return this.autoSelectFieldValues;\r\n }\r\n\r\n // For the identifield ListValue constraint, returns its available columns\r\n public GetColumns(formFieldConstraintId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetColumns/${formFieldConstraintId}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(cols => {\r\n return cols;\r\n });\r\n }\r\n\r\n public SetDependsOnParentFormFieldId(formFieldId, dependsOnParentFormFieldId): Promise {\r\n let url = `${this.url}/${this.endpoint}/SetDependsOnParentFormFieldId/${formFieldId}/${dependsOnParentFormFieldId}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(ffs => {\r\n return ffs;\r\n });\r\n }\r\n\r\n public get FormRenderer(): FormRendererComponent {\r\n return this.formRenderer;\r\n }\r\n\r\n public set FormRenderer(value: FormRendererComponent) {\r\n this.formRenderer = value;\r\n }\r\n}\r\n","import { plainToClass } from 'class-transformer';\r\nimport { Injectable } from '@angular/core';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Folder } from '../models/site-content/folder.model';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { Logging } from '../logging';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { AsyncJobService } from './async-job.service';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { BrowserStorageService } from './browserstorage.service';\r\nimport { ListViewEnum, ListViewHelper } from '../components/list-view/list-view.helper';\r\nimport { Form } from '../models/form-builder/form.model';\r\n\r\n@Injectable()\r\nexport class FolderService extends CollectApiServiceBase {\r\n\r\n constructor(\r\n http: HttpClient,\r\n progressIndicatorService: ProgressIndicatorService,\r\n private jobService: AsyncJobService,\r\n private localStorageService: BrowserStorageService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'folder', Folder)\r\n }\r\n\r\n public formatResponse(data: Folder): Folder {\r\n let obj = plainToClass(Folder, data);\r\n return (obj);\r\n }\r\n\r\n public create(item: Folder): Promise {\r\n let result = super.create(item);\r\n return result;\r\n }\r\n\r\n public getForFolderResolver(folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getForFolderResolver/${folderId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let folder = this.formatResponse(response);\r\n return folder;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // pharv - 7/29/2022 for VNEXT-303\r\n public getAvailableForms(folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${folderId}/AvailableForms/`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n // 07-26-2024 note: updating this code to return an array of Form instances, not instances of\r\n // zombie objects with only the data properites of an instance of class Form.\r\n let resultForms: Form[] = [];\r\n if (res != null) {\r\n for (let index: number = 0; index < res.length; index++) {\r\n let zombieObject: Object = res[index];\r\n let formObject: Form = plainToClass(Form, zombieObject);\r\n resultForms.push(formObject);\r\n }\r\n }\r\n //return res;\r\n return resultForms;\r\n });\r\n }\r\n\r\n // Array of Folder Ids the user has permission to add Forms to\r\n public getWriteableFolderIds(dataCollectionId: number): Promise {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/GetWriteableFolders/${dataCollectionId}`;\r\n\r\n return this.http.get(url).toPromise().then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n // Returns a Folder whose collections of Folders and FormIstances honor the offset, maxToReturn and sortConfig an filter params\r\n public getWithPagination(folderId: number, showProgress = true, offset: number = 0, maxToReturn: number = ListViewHelper.PAGE_SIZE, filterTerm: string = null): Promise {\r\n\r\n let sortObj = ListViewHelper.getSortObjFor(ListViewEnum.STRUCTURE) || ListViewHelper.DEFAULT_SORT;\r\n if (sortObj?.active == null || sortObj.active == 'position' || sortObj.active == ListViewHelper.NO_SORT) {\r\n sortObj.active = 'DEFAULT_SORT';\r\n sortObj.direction = 'asc';\r\n }\r\n\r\n let url: string = `${this.url}/${this.endpoint}/getWithPagination/${folderId}/${offset}/${maxToReturn}/${sortObj.active}/${sortObj.direction}`;\r\n if (showProgress) this.updateProgress(25, 75, \"Loading folder contents...\");\r\n if (filterTerm != null) {\r\n url = `${url}?q=${filterTerm}`;\r\n }\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let folder = this.formatResponse(res);\r\n if (showProgress) this.hideProgressIndicator();\r\n return folder;\r\n });\r\n }\r\n\r\n public getRootFolderForSite(siteId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getRootFolderForSite/${siteId}`;\r\n this.updateProgress(25, 50, \"Loading site structure...\");\r\n\r\n let lStartTime: number = performance.now();\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let lResponseReceivedTime: number = performance.now();;\r\n this.reportResponseTime(lStartTime, lResponseReceivedTime, url);\r\n\r\n let folder = this.formatResponse(response);\r\n\r\n let lResponseFormattedTime: number = performance.now();\r\n this.reportFormatTime(lResponseReceivedTime, lResponseFormattedTime, url);\r\n this.hideProgressIndicator();\r\n return folder;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public createRoleGroup(folderId: number, members: any[]): Promise {\r\n let url = `${this.url}/${this.endpoint}/${folderId}/CreateRoleGroup`;\r\n return this.http.post(url, members)\r\n .toPromise()\r\n .then(members => {\r\n return members;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateRoleGroup(folderId: number, roleId: number, members: any[]): Promise {\r\n let url = `${this.url}/${this.endpoint}/${folderId}/UpdateRoleGroup/${roleId}`;\r\n return this.http.put(url, members)\r\n .toPromise()\r\n .then(members => {\r\n return members;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public deleteRoleGroup(folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${folderId}/DeleteRoleGroup`;\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public reorderChildFolders(orderObj: any, idOfParentFolder: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/repositionChildren/${idOfParentFolder}`;\r\n\r\n return this.http.put(url, orderObj)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public rename(item: Folder): Promise {\r\n let url = `${this.url}/${this.endpoint}/rename/`;\r\n\r\n this.updateProgress(50, 75, `Renaming folder ...`);\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, `Renamed folder`);\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public reorderFormInstances(orderObj: any, idOfParentFolder): Promise {\r\n let url = `${this.url}/${this.endpoint}/reorderFormInstances/${idOfParentFolder}`;\r\n\r\n return this.http.put(url, orderObj)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public moveFolder(idOfMovedFolder: number, idOfNewParent: number, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Moving', 'Folder');\r\n this.updateProgress(50, 75, msg);\r\n let url = `${this.url}/${this.endpoint}/move/${idOfMovedFolder}/into/${idOfNewParent}`;\r\n return this.http.put(url, {})\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Moved', 'Folder');\r\n this.updateProgress(100, 100, msg);\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public moveFolders(folderIds: number[], idOfNewParent: number, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Moving', 'Folder(s)');\r\n this.updateProgress(50, 75, msg);\r\n let url = `${this.url}/${this.endpoint}/MoveFoldersTo/${idOfNewParent}`;\r\n return this.http.put(url, folderIds)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Moved', 'Folders');\r\n this.updateProgress(100, 100, msg);\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // NOTE: the endpoint is prefixed with \"async\" to hit AsyncFolderController\r\n // and the expected response is an AsyncJob which contains the jobKey required to\r\n // poll for a result\r\n public copyFolders(idOfNewParent: number, folderIds: number[]): Promise {\r\n let url = `${this.url}/async${this.endpoint}/CopyFoldersTo/${idOfNewParent}`;\r\n return this.http.post(url, folderIds)\r\n .toPromise()\r\n .catch(this.handleError);\r\n }\r\n\r\n public moveFormInstances(formInstanceIds: number[], idOfNewParent: number, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Moving', 'Form Instance');\r\n this.updateProgress(50, 75, msg);\r\n let url = `${this.url}/${this.endpoint}/MoveFormInstancesTo/${idOfNewParent}`;\r\n return this.http.put(url, formInstanceIds)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Moved', 'Form Instance(s)');\r\n this.updateProgress(100, 100, msg);\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public moveFormInstance(formInstanceId: number, idOfNewParent: number, progressConfig: ProgressConfig = ProgressConfig.default()) {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Moving', 'Form Instance');\r\n this.updateProgress(50, 75, msg);\r\n let url = `${this.url}/${this.endpoint}/Move/FormInstance/${formInstanceId}/to/${idOfNewParent}`;\r\n return this.http.put(url, {})\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Moved', 'Form Instance');\r\n this.updateProgress(100, 100, msg);\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public copyFormInstances(folderId: number, formInstances: FormInstance[], createReferences: boolean): Promise {\r\n let url = createReferences ?\r\n `${this.url}/${this.endpoint}/Copy/FormInstanceRefs/To/${folderId}` :\r\n `${this.url}/${this.endpoint}/Copy/FormInstances/To/${folderId}`;\r\n\r\n this.progressIndicatorService.completed50Percent(\"Pasting Form Instance(s)...\");\r\n return this.http.post(url, formInstances)\r\n .toPromise()\r\n .then(fis => {\r\n this.progressIndicatorService.completed100Percent(\"Pasted Form Instance(s)\");\r\n let list = [];\r\n for (let fi of fis) {\r\n list.push(Object.assign(new FormInstance(), fi));\r\n }\r\n return list;\r\n })\r\n .catch(this.handleError)\r\n }\r\n\r\n public transitionFolder(folder: Folder, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/${folder.id}/Transition`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Updating');\r\n this.updateProgress(50, 75, msg);\r\n return this.http.put(url, folder)\r\n .toPromise()\r\n .then(res => {\r\n let obj = this.formatResponse(res);\r\n msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Protected methods.\r\n protected operationCompleted(operationName: string): void {\r\n // Notify any registered callbacks that the save operation has completed.\r\n this.notifyAnyCallbacksOperationCompleted(operationName);\r\n }\r\n}\r\n","export class ImportFormatExamples {\r\n public xmlFormatExample: string;\r\n public jsonFormatExample: string;\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { UntypedFormControl } from '@angular/forms'; // Used for Reactive Forms\r\nimport { plainToClass } from \"class-transformer\";\r\nimport { environment } from '../../../environments/environment';\r\nimport { IModelEventHandler, ModelEventEnum } from '../interfaces/imodel-event-handler.interface';\r\nimport { IRegisterOperationCompletedCallback } from '../interfaces/ioperation-completed.intefaces';\r\nimport { Scriptable } from '../models/component-scripting/scriptable-function.annotation';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { ImportFormatExamples } from '../models/site-metadata/import-format-examples.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormBuilderService extends CollectApiServiceBase implements IRegisterOperationCompletedCallback {\r\n // Properties.\r\n private tempFormEventHandler: IModelEventHandler = null;\r\n private tempTransient_suggestedFormNamePrefix_formControl: UntypedFormControl = null;\r\n\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'form', Form)\r\n }\n\r\n // Methods.\n public formatResponse(data: Form): Form {\n let obj = plainToClass(Form, data);\n return obj;\r\n }\r\n\r\n @Scriptable()\r\n public get(id: number): Promise {\r\n this.updateProgress(25, 75, 'Loading form template..')\r\n return super.get(id).then(result => {\r\n this.hideProgressIndicator();\r\n return result;\r\n });\r\n }\n\n public save(data: Form): Promise {\r\n let result: Promise = null;\r\n\n // 05-25-2022: tell the form to notify any 'listening' event handlers, if any.\r\n //\r\n // Note: this logic is a bit messy at this juncture so I will absolutely have\r\n // to rework it to be much, much clearner.\r\n data.notifyEventHandler(ModelEventEnum.MODEL_WILL_SAVE);\r\n // Save and set to null any properties that will cause a circular dependency error during JSON serialization.\r\n this.saveFormEventHandlerIfAny(data);\r\n this.saveTransient_suggestedFormNamePrefix_formControlIfAny(data);\n if (data.id > 0) {\n result = this.update(data);\r\n } else {\n result = this.create(data);\r\n }\r\n // Restore any properties that were saved to prevent a circular dependency error during JSON serialization.\r\n this.restoreFormEventHandlerIfAny(data);\r\n this.restoreTransient_suggestedFormNamePrefix_formControlIfAny(data);\r\n data.notifyEventHandler(ModelEventEnum.MODEL_SAVED);\r\n return result;\r\n }\r\n\r\n // Wrap update (can simplify debugging).\r\n @Scriptable()\r\n public update(item: Form, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let result = super.update(item, progressConfig);\r\n return result;\r\n }\r\n\r\n // Added 3/9/21 for VNEXT-19\r\n @Scriptable()\r\n public newForm(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/new/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\n let obj = this.formatResponse(response);\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public deleteFromUI(id: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Deleting');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.delete(`${this.url}/${this.endpoint}/fromui/${id}`)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Deleted');\r\n this.updateProgress(100, 100, msg);\r\n return id;\r\n }).catch(this.handleError);\r\n }\r\n\r\n @Scriptable()\r\n public copyAs(formId: number, copyName: string, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Copying');\r\n this.updateProgress(50, 75, msg);\r\n\r\n let url = `${this.url}/${this.endpoint}/copy/${formId}/as/${copyName}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\n let obj = this.formatResponse(response);\n\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Copied');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n @Scriptable()\r\n public getImportFormatExample(formId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getImportFormatExample/${formId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(responseData => {\r\n let response: ImportFormatExamples = plainToClass(ImportFormatExamples, responseData);\n return (response);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n protected operationCompleted(operationName: string): void {\r\n // Notify any registered callbacks that the save operation has completed.\r\n this.notifyAnyCallbacksOperationCompleted(operationName);\r\n }\r\n\r\n // Helper methods.\r\n // The following two methods are related to saving/updating a form while\r\n // not causing a circular depenency in serializing the form to JSON notation.\r\n \r\n private saveFormEventHandlerIfAny(form: Form): void {\r\n this.tempFormEventHandler = form.eventHandler;\r\n form.eventHandler = null;\r\n }\r\n private restoreFormEventHandlerIfAny(form: Form): void {\r\n if (this.tempFormEventHandler != null) {\r\n form.eventHandler = this.tempFormEventHandler;\r\n this.tempFormEventHandler = null;\r\n }\r\n }\r\n private saveTransient_suggestedFormNamePrefix_formControlIfAny(form: Form): void {\r\n this.tempTransient_suggestedFormNamePrefix_formControl = form.transient_suggestedFormNamePrefix_formControl;\r\n form.transient_suggestedFormNamePrefix_formControl = null;\r\n }\r\n private restoreTransient_suggestedFormNamePrefix_formControlIfAny(form: Form): void {\r\n if (this.tempTransient_suggestedFormNamePrefix_formControl != null) {\r\n form.transient_suggestedFormNamePrefix_formControl = this.tempTransient_suggestedFormNamePrefix_formControl;\r\n this.tempTransient_suggestedFormNamePrefix_formControl = null;\r\n }\r\n }\r\n}\n","import { Type as AngularCoreType } from '@angular/core';\r\n\r\nimport { Injectable, Renderer2 } from '@angular/core';\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormFieldBaseComponent } from '../components/form-fields/form-field-base/form-field-base.component';\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport {\r\n ShortTextFieldType,\r\n ParagraphFieldType,\r\n RichTextFieldType,\r\n DateFieldType,\r\n CheckboxFieldType,\r\n RadioButtonsFieldType,\r\n IntegerFieldType,\r\n DecimalFieldType,\r\n CurrencyFieldType,\r\n LabelFieldType,\r\n DropDownFieldType,\r\n CascadingDropDownFieldType,\r\n AttachmentFieldType,\r\n RawHTMLFieldType,\r\n InlineContentFieldType,\r\n FormulaFieldType,\r\n GridCascadingDropDownFieldType,\r\n MultiCheckboxFieldType,\r\n MultiDropDownFieldType,\r\n GridFieldType,\r\n InstructionsFieldType,\r\n FootnoteFieldType,\r\n ShowToFieldType,\r\n HideFromFieldType,\r\n ContactsFieldType,\r\n CommentsFieldType,\r\n DevOnlyFieldType,\r\n HTMLLinkFieldType,\r\n UrlBuilderFieldType,\r\n FlexibleSelectionFieldType,\r\n FormTemplateInstancesFieldType,\r\n EditorNameFieldType,\r\n LastEditedDateFieldType\r\n} from '../models/form-builder/form-field-types';\r\n// Note: import primitive form field classes.\r\nimport { ShortTextFormFieldComponent } from '../components/form-fields/short-text-form-field/short-text-form-field.component';\r\nimport { ParagraphFormFieldComponent } from '../components/form-fields/paragraph-form-field/paragraph-form-field.component';\r\nimport { CheckboxFormFieldComponent } from '../components/form-fields/checkbox-form-field/checkbox-form-field.component';\r\nimport { RadioButtonsFormFieldComponent } from '../components/form-fields/radio-buttons-form-field/radio-buttons-form-field.component';\r\nimport { DateFormFieldComponent } from '../components/form-fields/date-form-field/date-form-field.component';\r\nimport { IntegerFormFieldComponent } from '../components/form-fields/integer-form-field/integer-form-field.component';\r\nimport { DecimalFormFieldComponent } from '../components/form-fields/decimal-form-field/decimal-form-field.component';\r\nimport { CurrencyFormFieldComponent } from '../components/form-fields/currency-form-field/currency-form-field.component';\r\nimport { LabelFormFieldComponent } from '../components/form-fields/label-form-field/label-form-field.component';\r\nimport { DropDownFormFieldComponent } from '../components/form-fields/drop-down-form-field/drop-down-form-field.component';\r\nimport { CascadingDropDownFormFieldComponent } from '../components/form-fields/cascading-drop-down-form-field/cascading-drop-down-form-field.component';\r\nimport { GridCascadingDropDownFormFieldComponent } from '../components/form-fields/grid-cascading-dropdown/grid-cascading-dropdown.component';\r\nimport { AttachmentFormFieldComponent } from '../components/form-fields/attachment-form-field/attachment-form-field.component';\r\nimport { FormulaFormFieldComponent } from '../components/form-fields/formula-form-field/formula-form-field.component';\r\nimport { RawHtmlFormFieldComponent } from '../components/form-fields/raw-html-form-field/raw-html-form-field.component';\r\nimport { RichTextFormFieldComponent } from '../components/form-fields/rich-text-form-field/rich-text-form-field.component';\r\n//import { DevOnlyFormFieldComponent } from '../dev-only-form-field/dev-only-form-field.component';\r\nimport { MultiCheckboxFormFieldComponent } from '../components/form-fields/multi-checkbox-form-field/multi-checkbox-form-field.component';\r\nimport { MultiDropDownFormFieldComponent } from '../components/form-fields/multi-drop-down-form-field/multi-drop-down-form-field.component';\r\nimport { InlineContentFormFieldComponent } from '../components/form-fields/inline-content-form-field/inline-content-form-field.component';\r\nimport { GridFormFieldComponent } from '../components/form-fields/grid-form-field/grid-form-field.component';\r\nimport { InstructionsFormFieldComponent } from '../components/form-fields/instructions-form-field/instructions-form-field.component';\r\nimport { FootnoteFormFieldComponent } from '../components/form-fields/footnote-form-field/footnote-form-field.component';\r\nimport { ContactsFormFieldComponent } from '../components/form-fields/contacts-form-field/contacts-form-field.component';\r\nimport { CommentsFormFieldComponent } from '../components/form-fields/comments-form-field/comments-form-field.component';\r\nimport { ShowToHideFromComponent } from '../components/form-fields/show-to-hide-from/show-to-hide-from.component';\r\nimport { AttachmentService } from './attachment.service';\r\nimport { CurrentUserService } from '../../security/current-user.service';\r\nimport { FieldDefinition } from '../models/form-builder/field-definition.model';\r\n//import { IFieldDefinitionLogic } from '../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinitionService } from './field-definition.service';\r\nimport { IconFormatEnum } from '../enums/icon-format.enum';\r\nimport { HtmlLinkFieldComponent } from '../components/form-fields/html-link-field/html-link-field.component';\r\nimport { FlexibleSelectionFormFieldComponent } from '../components/form-fields/flexible-selection-form-field/flexible-selection-form-field.component';\r\nimport { UrlBuilderFormFieldComponent } from '../components/form-fields/url-builder-form-field/url-builder-form-field.component';\r\nimport { FormFieldService } from './form-field.service';\r\nimport { FlexibleSelectionFieldService } from './flexible-selection-field.service';\r\nimport { CurrentSiteService } from './current-site.service';\r\nimport { EditorNameFormFieldComponent } from '../components/form-fields/editor-name-form-field/editor-name-form-field.component';\r\nimport { LastEditedDateFormFieldComponent } from '../components/form-fields/last-edited-date-form-field/last-edited-date-form-field.component';\r\n\r\nexport class FieldTypeAndName implements IViewModel {\r\n public id: number = -1;\r\n\r\n public fieldType: string;\r\n public fieldName: string;\r\n\r\n public IconName: string;\r\n public iconType: IconFormatEnum;\r\n\r\n public canAddToNewGrids: boolean;\r\n\r\n public componentRepresentative: FormFieldBaseComponent; // One instance of the component to represent others.\r\n public formFieldClass: AngularCoreType;\r\n\r\n // 05-16-2023 note: we want to replace the use of property 'componentRepresentative' with uses of new property 'fieldDefinition'.\r\n public fieldDefinition: FieldDefinition; \r\n}\r\n\r\nexport interface IFieldTypeToFieldInfo {\r\n [fieldType: string]: FieldTypeAndName;\r\n}\r\n\r\n// Implement this file's service class.\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormFieldTypeAndNameService extends CollectApiServiceBase {\r\n // Properties.\r\n private readonly arrFieldTypesAndNames: FieldTypeAndName[] =\r\n [\r\n {\r\n fieldType: ShortTextFieldType,\r\n fieldName: 'Short Text',\r\n\r\n IconName: 'short_text',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: ShortTextFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: ParagraphFieldType,\r\n fieldName: 'Paragraph',\r\n\r\n IconName: 'subject',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n componentRepresentative: null,\r\n formFieldClass: ParagraphFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1\r\n },\r\n {\r\n fieldType: RichTextFieldType,\r\n fieldName: 'Rich Text',\r\n\r\n IconName: 'font_download',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: false,\r\n\r\n componentRepresentative: new RichTextFormFieldComponent(),\r\n formFieldClass: RichTextFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: DateFieldType, \r\n fieldName: 'Date',\r\n\r\n IconName: 'calendar_today',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: DateFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: CheckboxFieldType, \r\n fieldName: 'Check Box',\r\n\r\n IconName: 'check_box',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: CheckboxFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: RadioButtonsFieldType, \r\n fieldName: 'Radio Buttons',\r\n\r\n IconName: 'radio_button_checked',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: RadioButtonsFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: IntegerFieldType, \r\n fieldName: 'Integer',\r\n\r\n IconName: 'looks_one',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: IntegerFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: DecimalFieldType, \r\n fieldName: 'Decimal',\r\n\r\n IconName: 'material-decimal-increase-24x24',\r\n iconType: IconFormatEnum.SVG_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: DecimalFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: CurrencyFieldType,\r\n fieldName: 'Currency',\r\n\r\n IconName: 'attach_money',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: CurrencyFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: LabelFieldType, \r\n fieldName: 'Label',\r\n\r\n IconName: 'font_download',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: LabelFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: DropDownFieldType, \r\n fieldName: 'Drop-down',\r\n\r\n IconName: 'arrow_drop_down_circle',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: DropDownFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: CascadingDropDownFieldType, \r\n fieldName: 'Cascading Drop-down',\r\n\r\n IconName: 'dynamic_feed',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: false,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: CascadingDropDownFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: GridCascadingDropDownFieldType,\r\n fieldName: 'Grid Cascading Drop-down',\r\n\r\n IconName: 'dynamic_feed',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: GridCascadingDropDownFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: FlexibleSelectionFieldType,\r\n fieldName: 'Flexible Selection Field',\r\n\r\n IconName: 'arrow_drop_down_circle',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: FlexibleSelectionFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: FormulaFieldType, \r\n fieldName: 'Formula',\r\n\r\n IconName: 'functions',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: FormulaFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: UrlBuilderFieldType,\r\n fieldName: 'Url Builder',\r\n\r\n IconName: 'bolt',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: UrlBuilderFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: MultiCheckboxFieldType, \r\n fieldName: 'Multi-select Check Box',\r\n\r\n IconName: 'check_box', // Need to change this?\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: MultiCheckboxFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: MultiDropDownFieldType, \r\n fieldName: 'Multi-select Drop-down',\r\n\r\n IconName: 'arrow_drop_down_circle',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: MultiDropDownFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: HTMLLinkFieldType, \r\n fieldName: 'HTML Link',\r\n\r\n IconName: 'link',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: true,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: HtmlLinkFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: RawHTMLFieldType,\r\n fieldName: 'HTML',\r\n\r\n IconName: 'code',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: false,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: RawHtmlFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n\r\n // NOTE: need to test adding an attachment to a grid, if this is a requirement.\r\n //KLW - Adding attachment type so the form field loads correctly \r\n {\r\n fieldType: AttachmentFieldType, \r\n fieldName: 'Attachment',\r\n IconName: 'attach_file',\r\n\r\n iconType: IconFormatEnum.MAT_ICON,\r\n\r\n canAddToNewGrids: false,\r\n\r\n componentRepresentative: null,\r\n formFieldClass: AttachmentFormFieldComponent,\r\n\r\n fieldDefinition: null,\r\n\r\n id: -1 // NA\r\n },\r\n {\r\n fieldType: InlineContentFieldType,\r\n fieldName: 'Inline Content',\r\n IconName: 'open_in_browser',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n canAddToNewGrids: false,\r\n componentRepresentative: null,\r\n formFieldClass: InlineContentFormFieldComponent,\r\n fieldDefinition: null,\r\n id: -1\r\n },\r\n {\r\n fieldType: EditorNameFieldType,\r\n fieldName: 'Editor Name',\r\n IconName: 'face',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n canAddToNewGrids: true,\r\n componentRepresentative: null,\r\n formFieldClass: EditorNameFormFieldComponent,\r\n fieldDefinition: null,\r\n id: -1\r\n },\r\n {\r\n fieldType: LastEditedDateFieldType,\r\n fieldName: 'Last Edited Date',\r\n IconName: 'edit_calendar',\r\n iconType: IconFormatEnum.MAT_ICON,\r\n canAddToNewGrids: true,\r\n componentRepresentative: null,\r\n formFieldClass: LastEditedDateFormFieldComponent,\r\n fieldDefinition: null,\r\n id: -1\r\n }\r\n \r\n ];\r\n private hshFieldTypeToFieldInfo: IFieldTypeToFieldInfo = {};\r\n\r\n private mapFormFieldTypesToClasses = {};\r\n\r\n // Constructor.\r\n public constructor(http: HttpClient,\r\n private currentUserService: CurrentUserService,\r\n private currentSiteService: CurrentSiteService,\r\n private fieldDefinitionService: FieldDefinitionService,\r\n private formFieldService: FormFieldService\r\n //,\r\n //private flexibleSelectionService: FlexibleSelectionFieldService\r\n )\r\n {\r\n super(http, null, environment.apiUrl, 'gridFieldTypeAndName', FieldTypeAndName);\r\n\r\n this.initFormFieldTypesToClassNames();\r\n //this.initializeFieldTypesAndNames(this.renderer, dateAdapter, attachmentService, dialog);\r\n }\r\n\r\n public formatResponse(data: FieldTypeAndName): FieldTypeAndName {\r\n let obj = plainToClass(FieldTypeAndName, data);\r\n\r\n return (obj);\r\n }\r\n\r\n // Intialize method.\r\n // Note: when we remove property 'componentRepresentative', we will be able to remove all of the parameters to the following method.\r\n public initializeFieldTypesAndNames(renderer: Renderer2, dateAdapter: DateAdapter, attachmentService: AttachmentService, dialog: MatDialog): void {\r\n let keys: string[] = Object.keys(this.hshFieldTypeToFieldInfo);\r\n if (keys.length == 0)\r\n this.loadFieldTypesAndNames(renderer, dateAdapter, attachmentService, dialog);\r\n }\r\n\r\n // getFieldTypeAndName() method.\r\n public getFieldTypeAndField(fieldDefinitionClassName): FieldTypeAndName {\r\n let fieldTypeAndName: FieldTypeAndName = this.hshFieldTypeToFieldInfo[fieldDefinitionClassName];\r\n\r\n if (fieldTypeAndName == null) {\r\n let errorMsg = `FormFieldTypeAndNameService.getFieldTypeAndName(): cannot find a value for field definition class '${fieldDefinitionClassName}'.`;\r\n throw errorMsg;\r\n }\r\n\r\n fieldTypeAndName.fieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType);\r\n\r\n return fieldTypeAndName;\r\n }\r\n\r\n public getAllFieldTypesAndNameFields(): FieldTypeAndName[] {\r\n for (let index: number = 0; index < this.arrFieldTypesAndNames.length; index++) {\r\n let fieldTypeAndName: FieldTypeAndName = this.arrFieldTypesAndNames[index];\r\n fieldTypeAndName.fieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType);\r\n }\r\n\r\n return this.arrFieldTypesAndNames;\r\n }\r\n public getAllGridFieldTypesAndNameFields(): FieldTypeAndName[] {\r\n let result: FieldTypeAndName[] = this.arrFieldTypesAndNames.filter(ft => ft.canAddToNewGrids);\r\n for (let index: number = 0; index < result.length; index++) {\r\n let fieldTypeAndName: FieldTypeAndName = result[index];\r\n fieldTypeAndName.fieldDefinition = this.fieldDefinitionService.getFieldDefinition(fieldTypeAndName.fieldType);\r\n }\r\n return result;\r\n }\r\n\r\n public getFormFieldClassNamesFrom(fieldDefinitionClassName: string): string {\r\n return this.mapFormFieldTypesToClasses[fieldDefinitionClassName];\r\n }\r\n\r\n public getFieldNameFromFieldType(fieldDefinitionClassName: string): string { \r\n\r\n let retVal: string = '';\r\n\r\n let found = this.arrFieldTypesAndNames.find(ft => ft.fieldDefinition.fieldDefinitionClassName == fieldDefinitionClassName);\r\n\r\n if (found) {\r\n retVal = found.fieldName;\r\n }\r\n else{\r\n console.log(\"Kevin \" + fieldDefinitionClassName);\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n // Helper methods.\r\n private loadFieldTypesAndNames(renderer: Renderer2,\r\n dateAdapter: DateAdapter,\r\n attachmentService: AttachmentService,\r\n dialog: MatDialog): void {\r\n for (let iCompRep: number = 0; iCompRep < this.arrFieldTypesAndNames.length; iCompRep++) {\r\n let fieldTypeAndName: FieldTypeAndName = this.arrFieldTypesAndNames[iCompRep];\r\n\r\n switch (fieldTypeAndName.fieldType) {\r\n case ShortTextFieldType:\r\n fieldTypeAndName.componentRepresentative = new ShortTextFormFieldComponent(renderer); \r\n break;\r\n // Note: Per VNEXT-193: do not allow the user to add a paragraph field to a grid.\r\n // 03-01-2023 note: enabling the paragraph form field again.\r\n case ParagraphFieldType:\r\n fieldTypeAndName.componentRepresentative = new ParagraphFormFieldComponent(renderer);\r\n break;\r\n case RichTextFieldType:\r\n break;\r\n case DateFieldType:\r\n fieldTypeAndName.componentRepresentative = new DateFormFieldComponent(renderer, dateAdapter);\r\n break;\r\n case CheckboxFieldType:\r\n fieldTypeAndName.componentRepresentative = new CheckboxFormFieldComponent(renderer);\r\n break;\r\n case RadioButtonsFieldType:\r\n fieldTypeAndName.componentRepresentative = new RadioButtonsFormFieldComponent(renderer);\r\n break;\r\n case IntegerFieldType:\r\n fieldTypeAndName.componentRepresentative = new IntegerFormFieldComponent(renderer);\r\n break;\r\n case DecimalFieldType:\r\n fieldTypeAndName.componentRepresentative = new DecimalFormFieldComponent(renderer);\r\n break;\r\n case CurrencyFieldType:\r\n fieldTypeAndName.componentRepresentative = new CurrencyFormFieldComponent(renderer);\r\n break;\r\n case LabelFieldType:\r\n fieldTypeAndName.componentRepresentative = new LabelFormFieldComponent(renderer);\r\n break;\r\n case DropDownFieldType:\r\n fieldTypeAndName.componentRepresentative = new DropDownFormFieldComponent(renderer);\r\n break;\r\n case CascadingDropDownFieldType:\r\n fieldTypeAndName.componentRepresentative = new CascadingDropDownFormFieldComponent(renderer, this.currentUserService);\r\n break;\r\n case GridCascadingDropDownFieldType:\r\n fieldTypeAndName.componentRepresentative = new GridCascadingDropDownFormFieldComponent(renderer, this.currentUserService);\r\n break;\r\n case FlexibleSelectionFieldType:\r\n fieldTypeAndName.componentRepresentative = new FlexibleSelectionFormFieldComponent(null, this.formFieldService, this.currentSiteService);\r\n break;\r\n case FormulaFieldType:\r\n fieldTypeAndName.componentRepresentative = new FormulaFormFieldComponent(renderer, this.fieldDefinitionService);\r\n break;\r\n case UrlBuilderFieldType:\r\n fieldTypeAndName.componentRepresentative = new UrlBuilderFormFieldComponent();\r\n break;\r\n case MultiCheckboxFieldType:\r\n fieldTypeAndName.componentRepresentative = new MultiCheckboxFormFieldComponent(renderer);\r\n break;\r\n case MultiDropDownFieldType:\r\n fieldTypeAndName.componentRepresentative = new MultiDropDownFormFieldComponent(renderer);\r\n break;\r\n case AttachmentFieldType:\r\n // it doesn't seem we actually need an object (unless it blows up in form instance mode...)\r\n fieldTypeAndName.componentRepresentative = null;\r\n //new AttachmentFormFieldComponent(null, null, renderer, attachmentService, dialog, null, null, null, null, null, null); //TEAMS-424: KLW - Need to pass in reference for new constructor for Attachment component\r\n break;\r\n case RawHTMLFieldType:\r\n fieldTypeAndName.componentRepresentative = new RawHtmlFormFieldComponent(renderer);\r\n break;\r\n case InlineContentFieldType:\r\n fieldTypeAndName.componentRepresentative = new InlineContentFormFieldComponent(renderer, null);\r\n break;\r\n case HTMLLinkFieldType: //TEAMS-835: KLW - Needed for the HTML Link form field\r\n fieldTypeAndName.componentRepresentative = new HtmlLinkFieldComponent(renderer);\r\n break;\r\n case DevOnlyFieldType:\r\n break;\r\n case EditorNameFieldType:\r\n fieldTypeAndName.componentRepresentative = new EditorNameFormFieldComponent(renderer, this.currentUserService);\r\n break;\r\n case LastEditedDateFieldType:\r\n fieldTypeAndName.componentRepresentative = new LastEditedDateFormFieldComponent(renderer);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n // Initialize a field type to field info hash.\r\n for (let iFieldType: number = 0; iFieldType < this.arrFieldTypesAndNames.length; iFieldType++) {\r\n let fieldInfo: FieldTypeAndName = this.arrFieldTypesAndNames[iFieldType];\r\n\r\n this.hshFieldTypeToFieldInfo[fieldInfo.fieldType] = fieldInfo;\r\n }\r\n }\r\n\r\n private initFormFieldTypesToClassNames(): void {\r\n this.mapFormFieldTypesToClasses[ShortTextFieldType] = ShortTextFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[CheckboxFieldType] = CheckboxFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[RadioButtonsFieldType] = RadioButtonsFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[DateFieldType] = DateFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[IntegerFieldType] = IntegerFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[DecimalFieldType] = DecimalFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[CurrencyFieldType] = CurrencyFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[LabelFieldType] = LabelFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[DropDownFieldType] = DropDownFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[GridFieldType] = GridFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[CascadingDropDownFieldType] = CascadingDropDownFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[GridCascadingDropDownFieldType] = GridCascadingDropDownFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[AttachmentFieldType] = AttachmentFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[InstructionsFieldType] = InstructionsFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[RawHTMLFieldType] = RawHtmlFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[FormulaFieldType] = FormulaFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[UrlBuilderFieldType] = UrlBuilderFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[RichTextFieldType] = RichTextFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[FootnoteFieldType] = FootnoteFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[MultiCheckboxFieldType] = MultiCheckboxFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[MultiDropDownFieldType] = MultiDropDownFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[ShowToFieldType] = ShowToHideFromComponent; // Note: two field type names map to a single component. Reconsider this???\r\n this.mapFormFieldTypesToClasses[HideFromFieldType] = ShowToHideFromComponent; \r\n this.mapFormFieldTypesToClasses[ContactsFieldType] = ContactsFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[CommentsFieldType] = CommentsFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[HTMLLinkFieldType] = HtmlLinkFieldComponent;\r\n this.mapFormFieldTypesToClasses[EditorNameFieldType] = EditorNameFormFieldComponent;\r\n this.mapFormFieldTypesToClasses[LastEditedDateFieldType] = LastEditedDateFormFieldComponent;\r\n\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n//import { plainToClass } from \"class-transformer\";\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormField } from '../models/form-builder/form-field.model';\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { FormFieldSelectOptionsConstraint } from '../models/form-builder/field-constraints/field-select-options-constraint.model';\r\nimport { FormFieldRegularExpressionConstraint } from '../models/form-builder/field-constraints/field-regular-expression-constraint.model';\r\nimport { FormFieldCascadingDropdownConstraint } from '../models/form-builder/field-constraints/field-cascading-dropdown-constraint.model';\r\nimport { FormFieldDateRangeConstraint } from '../models/form-builder/field-constraints/field-date-range-constraint.model';\r\nimport { FormFieldNumericRangeConstraint } from '../models/form-builder/field-constraints/field-numeric-range-constraint.model';\r\nimport { FormFieldService } from './form-field.service';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { ModelEventEnum, IModelEventHandler } from '../interfaces/imodel-event-handler.interface';\r\nimport { IFormFieldConstraint } from '../interfaces/iform-field-constraint.interface';\r\nimport { CascadingDropdownConfigRow } from '../models/site-metadata/cascading-drop-down-config-row.model';\r\n//import { FormFieldSimpleListValuesConstraint } from '../models/form-builder/field-constraints/field-simple-list-values-constraint.model';\r\n//import { FormFieldCascadingListValuesConstraint } from '../models/form-builder/field-constraints/field-cascading-list-value-constraint.model';\r\nimport { FormFieldListValuesConstraint } from '../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\n\r\n// Define a helper class that flushes this service's cache when a form is saved.\r\nexport class FlushCachedServiceUponFormSave implements IModelEventHandler {\r\n public constructor(private cachedService: CachedFormFieldService, private form: Form) {\r\n form.eventHandler = this;\r\n }\r\n\r\n public eventCompleted(event: ModelEventEnum, modelObject: any): void {\r\n if (event == ModelEventEnum.MODEL_WILL_SAVE) {\r\n let form: Form = modelObject;\r\n this.cachedService.setUnsavedConstraintIdValuesToZero(form);\r\n } else if (event == ModelEventEnum.MODEL_SAVED) {\r\n this.cachedService.clearCache();\r\n } \r\n }\r\n}\r\n\r\n// Define a class used to track cached data.\r\nclass FormFieldConstraintsCache {\r\n // Properties.\r\n public selectOptionsConstraints: FormFieldSelectOptionsConstraint[] = null;\r\n public regularExpressionConstraints: FormFieldRegularExpressionConstraint[] = null;\r\n public cascadingDropdownConstraints: FormFieldCascadingDropdownConstraint[] = null;\r\n public dateRangeConstraints: FormFieldDateRangeConstraint[] = null;\r\n public numericRangeConstraints: FormFieldNumericRangeConstraint[] = null;\r\n // New list value-based constraints:\r\n public simpleListValueConstraints: FormFieldListValuesConstraint[] = null;\r\n public cascadingListValueConstraints: FormFieldListValuesConstraint[] = null; \r\n\r\n public numUnsavedSelectOptionsConstraints: number = 0;\r\n public numUnsavedRegularExpressionConstraints: number = 0;\r\n public numUnsavedCascadingDropdownConstraints: number = 0;\r\n public numUnsavedDateRangeConstraints: number = 0;\r\n public numUnsavedNumericRangeConstraints: number = 0;\r\n // New list value-based constraints:\r\n public numUnsavedSimpleListValueConstraints: number = 0;\r\n public numUnsavedCascadingListValueConstraints: number = 0;\r\n\r\n // Method(s).\r\n public setUnsavedConstraintIdValuesToZero(): void {\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.selectOptionsConstraints);\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.regularExpressionConstraints);\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.cascadingDropdownConstraints);\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.dateRangeConstraints);\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.numericRangeConstraints);\r\n // New list value-based constraints:\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.simpleListValueConstraints);\r\n FormFieldConstraintsCache.doSetUnsavedConstraintIdValuesToZero(this.cascadingListValueConstraints);\r\n }\r\n\r\n // Helper methods.\r\n private static doSetUnsavedConstraintIdValuesToZero(listOfConstraints: IFormFieldConstraint[]): void {\r\n if ((listOfConstraints != null) && (listOfConstraints.length > 0)) {\r\n for (let index: number = 0; index < listOfConstraints.length; index++) {\r\n let constraint: IFormFieldConstraint = listOfConstraints[index];\r\n if (constraint.id < 0)\r\n constraint.id = 0;\r\n }\r\n }\r\n }\r\n}\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CachedFormFieldService extends CollectApiServiceBase{ \r\n // Properties.\r\n private constraintsCache: FormFieldConstraintsCache = new FormFieldConstraintsCache();\r\n private formFieldService: FormFieldService = null;\r\n private cacheEnabled: boolean = true; //false;\r\n\r\n public constructor(http: HttpClient,\r\n formFieldService: FormFieldService,\r\n progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'formField', FormField)\r\n\r\n this.formFieldService = formFieldService;\r\n }\r\n\r\n // Cache-related methods.\r\n // Enable/disable the cache.\r\n public enableCache(): void {\r\n this.cacheEnabled = true;\r\n }\r\n public disableCache(): void {\r\n this.cacheEnabled = false;\r\n }\r\n public get cacheIsEnabled(): boolean {\r\n return this.cacheEnabled;\r\n }\r\n\r\n // Clear the entire cache.\r\n public clearCache(): void {\r\n this.constraintsCache = new FormFieldConstraintsCache();\r\n }\r\n\r\n // Set unsaved constraint id values to zero.\r\n public setUnsavedConstraintIdValuesToZero(form: Form): void {\r\n if (this.cacheEnabled) {\r\n this.constraintsCache.setUnsavedConstraintIdValuesToZero();\r\n\r\n if ((form.formFields != null) && (form.formFields.length > 0)) {\r\n for (let index: number = 0; index < form.formFields.length; index++) {\r\n let formField: FormField = form.formFields[index];\r\n\r\n CachedFormFieldService.setNewConstraintIdValuesToZero(formField);\r\n\r\n if ((formField.childFormFields != null) && (formField.childFormFields.length > 0)) {\r\n for (let childIndex: number = 0; childIndex < formField.childFormFields.length; childIndex++) {\r\n let childFormField: FormField = formField.childFormFields[childIndex];\r\n\r\n CachedFormFieldService.setNewConstraintIdValuesToZero(childFormField);\r\n }\r\n }\r\n }\r\n }\r\n } \r\n }\r\n\r\n // Manage the five types of form field constraints.\r\n // Manage select options constraints.\n public getSiteNamedSelectOptions(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.selectOptionsConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedSelectOptions(dataCollectionId).then(response => {\r\n this.constraintsCache.selectOptionsConstraints = response;\r\n\r\n resolve(this.constraintsCache.selectOptionsConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.selectOptionsConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateSelectOptionsConstraint(updatedConstraint: FormFieldSelectOptionsConstraint): boolean {\r\n let existingConstraint: FormFieldSelectOptionsConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.selectOptionsConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.selectOptionsConstraints == null)\r\n this.constraintsCache.selectOptionsConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedSelectOptionsConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.selectOptionsConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // Manage regular expression constraints.\r\n public getSiteNamedRegularExpressions(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.regularExpressionConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedRegularExpressions(dataCollectionId).then(response => {\r\n this.constraintsCache.regularExpressionConstraints = response;\r\n\r\n resolve(this.constraintsCache.regularExpressionConstraints);\r\n });\r\n });\r\n } else { \r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.regularExpressionConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateRegularExpressionConstraint(updatedConstraint: FormFieldRegularExpressionConstraint): boolean {\r\n let existingConstraint: FormFieldRegularExpressionConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.regularExpressionConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.regularExpressionConstraints == null)\r\n this.constraintsCache.regularExpressionConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedRegularExpressionConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.regularExpressionConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // Manage named cascading dropdown constraints.\r\n public getSiteNamedCascadingDropdowns(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.cascadingDropdownConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedCascadingDropdowns(dataCollectionId).then(response => {\r\n this.constraintsCache.cascadingDropdownConstraints = response;\r\n\r\n resolve(this.constraintsCache.cascadingDropdownConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.cascadingDropdownConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateCascadingDropdownConstraint(updatedConstraint: FormFieldCascadingDropdownConstraint): boolean {\r\n let existingConstraint: FormFieldCascadingDropdownConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.cascadingDropdownConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.cascadingDropdownConstraints == null)\r\n this.constraintsCache.cascadingDropdownConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedCascadingDropdownConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.cascadingDropdownConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // Manage named date range constraints.\r\n public getSiteNamedDateRanges(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.dateRangeConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedDateRanges(dataCollectionId).then(response => {\r\n this.constraintsCache.dateRangeConstraints = response;\r\n\r\n resolve(this.constraintsCache.dateRangeConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.dateRangeConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateDateRangeConstraint(updatedConstraint: FormFieldDateRangeConstraint): boolean {\r\n let existingConstraint: FormFieldDateRangeConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.dateRangeConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.dateRangeConstraints == null)\r\n this.constraintsCache.dateRangeConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedDateRangeConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.dateRangeConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // Manage named numeric range constraints.\r\n public getSiteNamedNumericRanges(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.numericRangeConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedNumericRanges(dataCollectionId).then(response => {\r\n this.constraintsCache.numericRangeConstraints = response;\r\n\r\n resolve(this.constraintsCache.numericRangeConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.numericRangeConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateNumericRangeConstraint(updatedConstraint: FormFieldNumericRangeConstraint): boolean {\r\n let existingConstraint: FormFieldNumericRangeConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.numericRangeConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.numericRangeConstraints == null)\r\n this.constraintsCache.numericRangeConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedNumericRangeConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.numericRangeConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // Define methods for managing the two new types of list value constraints: simple list value constraints and cascading list value constraints.\r\n public getSiteNamedSimpleListValuesConstraints(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.simpleListValueConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedSimpleListValueConstraints(dataCollectionId).then(response => {\r\n this.constraintsCache.simpleListValueConstraints = response;\r\n\r\n resolve(this.constraintsCache.simpleListValueConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.simpleListValueConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateSimpleListValuesConstraint(updatedConstraint: FormFieldListValuesConstraint): boolean {\r\n let existingConstraint: FormFieldListValuesConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.simpleListValueConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.simpleListValueConstraints == null)\r\n this.constraintsCache.simpleListValueConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedSimpleListValueConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.simpleListValueConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n public getSiteNamedCascadingListValuesConstraints(dataCollectionId: number): Promise {\r\n let result: Promise = null;\r\n\r\n if ((!this.cacheEnabled) || (this.constraintsCache.cascadingListValueConstraints == null)) {\r\n result = new Promise((resolve, reject) => {\r\n this.formFieldService.getSiteNamedCascadingListValueConstraints(dataCollectionId).then(response => {\r\n this.constraintsCache.cascadingListValueConstraints = response;\r\n\r\n resolve(this.constraintsCache.cascadingListValueConstraints);\r\n });\r\n });\r\n } else {\r\n result = new Promise((resolve, reject) => {\r\n resolve(this.constraintsCache.cascadingListValueConstraints);\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public updateOrCreateCascadingListValuesConstraint(updatedConstraint: FormFieldListValuesConstraint): boolean {\r\n let existingConstraint: FormFieldListValuesConstraint =\r\n CachedFormFieldService.findExistingConstraint(updatedConstraint, this.constraintsCache.cascadingListValueConstraints);\r\n if (existingConstraint != null)\r\n existingConstraint.copy(updatedConstraint);\r\n else {\r\n if (this.constraintsCache.cascadingListValueConstraints == null)\r\n this.constraintsCache.cascadingListValueConstraints = [];\r\n\r\n let notYetSavedId: number = -(++this.constraintsCache.numUnsavedCascadingListValueConstraints);\r\n updatedConstraint.id = notYetSavedId;\r\n this.constraintsCache.cascadingListValueConstraints.push(updatedConstraint);\r\n }\r\n\r\n return (existingConstraint != null ? true : false);\r\n }\r\n\r\n // A method for getting a cascading drop-down configuration.\r\n public getCascadingDropdownConstraintConfiguration(constraintId: number, wrapFieldDataInDoubleQuotes: boolean, fieldDelimiter: string = ','): Promise {\r\n if (constraintId == 0 || constraintId == null) {\r\n console.log('constraintId not passed to getCascadingDropdownConstraintConfiguration');\r\n return;\r\n }\r\n return this.formFieldService.getCascadingDropdownConstraintConfiguration(constraintId, wrapFieldDataInDoubleQuotes, fieldDelimiter);\r\n }\r\n\r\n public getListValueConstraintCsv(listValuesConstraintId: number) {\r\n return this.formFieldService.getListValueConstraintCsv(listValuesConstraintId);\r\n }\r\n\r\n public getUrlForListValueConstraintCsv(listValuesConstraintId: number) {\r\n return this.formFieldService.getUrlForListValueConstraintCsv(listValuesConstraintId);\r\n }\r\n\r\n // Helper methods.\r\n private static setNewConstraintIdValuesToZero(formField: FormField): void {\r\n if (formField.selectOptionsConstraintId < 0)\r\n formField.selectOptionsConstraintId = 0;\r\n if (formField.regularExpressionConstraintId < 0)\r\n formField.regularExpressionConstraintId = 0;\r\n if (formField.cascadingDropdownConstraintId < 0)\r\n formField.cascadingDropdownConstraintId = 0;\r\n if (formField.dateRangeConstraintId < 0)\r\n formField.dateRangeConstraintId = 0;\r\n if (formField.numericRangeConstraintId < 0)\r\n formField.numericRangeConstraintId = 0;\r\n }\n\r\n private static findExistingConstraint(updatedConstraint: IFormFieldConstraint, constraintsList: IFormFieldConstraint[]): IFormFieldConstraint {\r\n let existingConstraint: IFormFieldConstraint = null;\r\n\r\n if (constraintsList != null) {\r\n // Look for an existing constraint in two steps to keep things simple:\r\n //\r\n // 1. Look for a saved constraint, with an 'id' value great than zero; and\r\n // 2. If necessary, look for an unsaved constraint, with an 'id' value less than zero.\r\n existingConstraint = constraintsList.find(c => (updatedConstraint.id > 0) && (c.id == updatedConstraint.id));\r\n if (!existingConstraint) {\r\n //existingConstraint = constraintsList.find(c => (c.name == updatedConstraint.name));\r\n existingConstraint = constraintsList.find(c => (updatedConstraint.id < 0) && (c.id == updatedConstraint.id));\r\n } \r\n }\r\n\r\n return existingConstraint;\r\n }\r\n\r\n}\r\n","\r\nexport class SiteFormFieldConstraintProperties {\r\n // General constraint properties.\r\n public constraintId: number;\r\n\r\n public constraintType: string;\r\n public constraintName: string;\r\n public constraintValue: string; // This value is constraint-type-specific.\r\n\r\n // 'UseCount' indicates the number of times this constraint has been used in its site.\r\n public useCount: number;\r\n\r\n // Constraint-type-specific constraint properties.\r\n public selectOptionsValue: string; // Used by both the original select options constraint and the new the simple list values constraint.\r\n //public selectOptionsConstarintValue: string; // Use by the simple list values constraint.\r\n public regularExpressionValue: string;\r\n public regularExpressionMessage: string;\r\n public jsonConfig: string; // Used by both the original cascading drop-down constraint and the new cascading list values constraint.\r\n public minValue: number;\r\n public maxValue: number;\r\n public minDate: string;\r\n public maxDate: string;\r\n\r\n public editable: boolean;\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { plainToClass } from \"class-transformer\";\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormField } from '../models/form-builder/form-field.model';\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\nimport { FormFieldSelectOptionsConstraint } from '../models/form-builder/field-constraints/field-select-options-constraint.model';\r\nimport { FormFieldRegularExpressionConstraint } from '../models/form-builder/field-constraints/field-regular-expression-constraint.model';\r\nimport { FormFieldCascadingDropdownConstraint } from '../models/form-builder/field-constraints/field-cascading-dropdown-constraint.model';\r\nimport { FormFieldDateRangeConstraint } from '../models/form-builder/field-constraints/field-date-range-constraint.model';\r\nimport { FormFieldNumericRangeConstraint } from '../models/form-builder/field-constraints/field-numeric-range-constraint.model';\r\nimport { FormFieldConstraintBase, FormFieldConstraintViewModel } from '../models/form-builder/field-constraints/form-field-constraint-base.model';\r\nimport { SiteFormFieldConstraintProperties } from '../models/form-builder/field-constraints/site-form-field-constraint-props.model';\r\nimport { CascadingDropdownConfigRow } from '../models/site-metadata/cascading-drop-down-config-row.model';\r\n//import { FormFieldSimpleListValuesConstraint } from '../models/form-builder/field-constraints/field-simple-list-values-constraint.model';\r\n//import { FormFieldCascadingListValuesConstraint } from '../models/form-builder/field-constraints/field-cascading-list-value-constraint.model';\r\nimport { FormFieldListValuesConstraint } from '../models/form-builder/field-constraints/form-field-list-values-constraint.model';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormFieldService extends CollectApiServiceBase{\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'formField', FormField)\r\n }\n\n public formatResponse(data: FormField): FormField {\n let obj = plainToClass(FormField, data);\n\n return obj;\r\n }\r\n\r\n // Services methods.\r\n public getOrCreateMetaDataField(field: FormField): Promise {\r\n let url = `${this.url}/${this.endpoint}/getOrCreateMetaDataField`;\r\n\r\n return this.http.post(url, field)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n });\r\n }\r\n\r\n // Create constraints.\r\n public createSelectOptionsConstraint(constraint: FormFieldSelectOptionsConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createSelectOptionsConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldSelectOptionsConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateSelectOptionsConstraint(constraint: FormFieldSelectOptionsConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateSelectOptionsConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldSelectOptionsConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\n public createRegularExpressionConstraint(constraint: FormFieldRegularExpressionConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createRegularExpressionConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldRegularExpressionConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateRegularExpressionConstraint(constraint: FormFieldRegularExpressionConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateRegularExpressionConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldRegularExpressionConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public createCascadingDropdownConstraint(constraint: FormFieldCascadingDropdownConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createCascadingDropdownConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldCascadingDropdownConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateCascadingDropdownConstraint(constraint: FormFieldCascadingDropdownConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateCascadingDropdownConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n let result = plainToClass(FormFieldCascadingDropdownConstraint, serverResult);\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public createDateRangeConstraint(constraint: FormFieldDateRangeConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createDateRangeConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // Note: the following 'plainToClass()' call is not working,\r\n // presumably due to the class's constructor. Will\r\n // plan on using 'plainToClass()' again once the issue\r\n // with the constructor is resolved.\r\n //let result = plainToClass(FormFieldDateRangeConstraint, serverResult);\r\n /*\r\n let result = FormFieldDateRangeConstraint.createConstraint(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result.minDate = serverResult['minDate'];\r\n result.maxDate = serverResult['maxDate'];\r\n */\r\n let result = FormFieldService.constructDateRangeConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateDateRangeConstraint(constraint: FormFieldDateRangeConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateDateRangeConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // See note in the prior method.\r\n //let result = plainToClass(FormFieldDateRangeConstraint, serverResult);\r\n let result = FormFieldService.constructDateRangeConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public createNumericRangeConstraint(constraint: FormFieldNumericRangeConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createNumericRangeConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // Note: the following 'plainToClass()' call is not working,\r\n // presumably due to the class's constructor. Will\r\n // plan on using 'plainToClass()' again once the issue\r\n // with the constructor is resolved.\r\n //let result = plainToClass(FormFieldNumericRangeConstraint, serverResult);\r\n let result = FormFieldService.constructNumericRangeConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateNumericRangeConstraint(constraint: FormFieldNumericRangeConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateNumericRangeConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // See note in prior method.\r\n //let result = plainToClass(FormFieldNumericRangeConstraint, serverResult);\r\n let result = FormFieldService.constructNumericRangeConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Define create and update methods for the two new types of list value constraints: simple list value constraints and cascading list value constraints.\r\n public createSimpleListValuesConstraint(constraint: FormFieldListValuesConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createSimpleListValuesConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // Note: the following 'plainToClass()' call is not working,\r\n // presumably due to the class's constructor. Will\r\n // plan on using 'plainToClass()' again once the issue\r\n // with the constructor is resolved.\r\n let result = FormFieldService.constructSimpleListValuesConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateSimpleListValuesConstraint(constraint: FormFieldListValuesConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateSimpleListValueConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // See note in prior method.\r\n let result = FormFieldService.constructSimpleListValuesConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public createCascadingListValuesConstraint(constraint: FormFieldListValuesConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/createCascadingListValuesConstraint`;\r\n this.updateProgress(50, 75, `Creating constraint ...`);\r\n\r\n return this.http.post(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // Note: the following 'plainToClass()' call is not working,\r\n // presumably due to the class's constructor. Will\r\n // plan on using 'plainToClass()' again once the issue\r\n // with the constructor is resolved.\r\n let result = FormFieldService.constructCascadingListValuesConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint created`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateCascadingListValuesConstraint(constraint: FormFieldListValuesConstraint): Promise {\r\n let url = `${this.url}/${this.endpoint}/updateCascadingListValueConstraint`;\r\n this.updateProgress(50, 75, `Updating constraint ...`);\r\n\r\n return this.http.put(url, constraint)\n .toPromise()\n .then(serverResult => {\r\n // See note in prior method.\r\n let result = FormFieldService.constructCascadingListValuesConstraintFrom(serverResult);\r\n\r\n this.updateProgress(100, 100, `Constraint updated`);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Get constraints of various types.\r\n public getSiteNamedSelectOptions(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedSelectOptions/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(selectOptionsList => {\r\n let resultList: FormFieldSelectOptionsConstraint[] = [];\r\n if ((selectOptionsList != null) && (selectOptionsList.length > 0)) {\r\n for (let index: number = 0; index < selectOptionsList.length; index++) {\r\n let selectOptionsData: Object = selectOptionsList[index];\r\n let constraint: FormFieldSelectOptionsConstraint = plainToClass(FormFieldSelectOptionsConstraint, selectOptionsData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedRegularExpressions(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedRegularExpressions/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(regexList => {\r\n let resultList: FormFieldRegularExpressionConstraint[] = [];\r\n if ((regexList != null) && (regexList.length > 0)) {\r\n for (let index: number = 0; index < regexList.length; index++) {\r\n let regexData: Object = regexList[index];\r\n let constraint: FormFieldRegularExpressionConstraint = plainToClass(FormFieldRegularExpressionConstraint, regexData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedCascadingDropdowns(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedCascadingDropdowns/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(regexList => {\r\n let resultList: FormFieldCascadingDropdownConstraint[] = [];\r\n if ((regexList != null) && (regexList.length > 0)) {\r\n for (let index: number = 0; index < regexList.length; index++) {\r\n let regexData: Object = regexList[index];\r\n let constraint: FormFieldCascadingDropdownConstraint = plainToClass(FormFieldCascadingDropdownConstraint, regexData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedDateRanges(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedDateRanges/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: FormFieldDateRangeConstraint[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n // pharv - 11/9/2022 -- per notes elsewhere in this Service, plainToClass was not working and was resulting in nulls for minDate\r\n let constraint: FormFieldDateRangeConstraint = FormFieldService.constructDateRangeConstraintFrom(constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedNumericRanges(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedNumericRanges/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: FormFieldNumericRangeConstraint[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n // pharv - 11/9/2022 -- per notes elsewhere in this Service, plainToClass was not working and was resulting in nulls for minValue and maxValue\r\n let constraint: FormFieldNumericRangeConstraint = FormFieldService.constructNumericRangeConstraintFrom(constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedListValueConstraints(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedListValueConstraints/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: FormFieldListValuesConstraint[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n let constraint: FormFieldListValuesConstraint = FormFieldService.constructListValuesConstraintFrom(constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedSimpleListValueConstraints(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedSimpleListValueConstraints/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: FormFieldListValuesConstraint[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n // pharv - 11/9/2022 -- per notes elsewhere in this Service, plainToClass was not working and was resulting in nulls for minValue and maxValue\r\n let constraint: FormFieldListValuesConstraint = FormFieldService.constructSimpleListValuesConstraintFrom(constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteNamedCascadingListValueConstraints(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteNamedCascadingListValueConstraints/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: FormFieldListValuesConstraint[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n // pharv - 11/9/2022 -- per notes elsewhere in this Service, plainToClass was not working and was resulting in nulls for minValue and maxValue\r\n let constraint: FormFieldListValuesConstraint = FormFieldService.constructCascadingListValuesConstraintFrom(constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getAllSiteNamedConstraints(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getAllSiteNamedConstraints/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintsList => {\r\n let resultList: SiteFormFieldConstraintProperties[] = [];\r\n if ((constraintsList != null) && (constraintsList.length > 0)) {\r\n for (let index: number = 0; index < constraintsList.length; index++) {\r\n let constraintData: Object = constraintsList[index];\r\n let constraint: SiteFormFieldConstraintProperties = plainToClass(SiteFormFieldConstraintProperties, constraintData);\r\n resultList.push(constraint);\r\n }\r\n }\r\n return resultList;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Export a cascading dropdown constraint's configuration.\r\n public getCascadingDropdownConstraintConfiguration(constraintId: number, wrapFieldDataInDoubleQuotes: boolean, fieldDelimiter: string = ','): Promise {\r\n let url = `${this.url}/${this.endpoint}/getCascadingDropdownConstraintConfiguration/${constraintId}/wrapFields/${wrapFieldDataInDoubleQuotes}/fieldDelimiter/${fieldDelimiter}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(configRows => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n //return this.formatAsyncJobResponse(res);\r\n return configRows;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getListValueConstraintCsv(listValuesConstraintId: number) {\r\n let url = this.getUrlForListValueConstraintCsv(listValuesConstraintId);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(csv => {\r\n return csv;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getUrlForListValueConstraintCsv(listValuesConstraintId: number) {\r\n return `${this.url}/${this.endpoint}/getListValuesConstraintCsv/${listValuesConstraintId}`;\r\n }\r\n\r\n public getNamedConstraint(constraintId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getConstraint/${constraintId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(constraintVM => {\r\n let constraint: FormFieldConstraintViewModel = plainToClass(FormFieldConstraintViewModel, constraintVM);\r\n return constraint;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Delete a constraint.\r\n public deleteNamedConstraint(constraintId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/deleteNamedConstraint/${constraintId}`;\r\n this.updateProgress(50, 75, `Deletomg constraint ...`);\r\n\r\n return this.http.delete(url)\n .toPromise()\n .then(res => {\r\n this.updateProgress(100, 100, `Constraint deleted`);\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Helper methods.\r\n private static constructDateRangeConstraintFrom(serverResult: any): FormFieldDateRangeConstraint {\r\n let result = FormFieldDateRangeConstraint.constructConstraint(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result.minDate = serverResult['minDate'];\r\n result.maxDate = serverResult['maxDate'];\r\n\r\n return result;\r\n }\r\n\r\n private static constructNumericRangeConstraintFrom(serverResult: any): FormFieldNumericRangeConstraint {\r\n let result = FormFieldNumericRangeConstraint.constructConstraint(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result.minValue = serverResult['minValue'];\r\n result.maxValue = serverResult['maxValue'];\r\n\r\n return result;\r\n }\r\n\r\n private static constructListValuesConstraintFrom(serverResult: any): FormFieldListValuesConstraint {\r\n let result: FormFieldListValuesConstraint = null;\r\n\r\n if (serverResult != null) {\r\n if (serverResult['selectOptionsValue'] != null) {\r\n result = this.constructSimpleListValuesConstraintFrom(serverResult);\r\n } else {\r\n result = this.constructCascadingListValuesConstraintFrom(serverResult);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private static constructSimpleListValuesConstraintFrom(serverResult: any): FormFieldListValuesConstraint {\r\n let result: FormFieldListValuesConstraint = null;\r\n\r\n if (serverResult != null) {\r\n //result = FormFieldListValuesConstraint.constructConstraint(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result = FormFieldListValuesConstraint.createSimpleListValuesConstraintFrom(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result.constraintExpression = serverResult['selectOptionsValue'];\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private static constructCascadingListValuesConstraintFrom(serverResult: any): FormFieldListValuesConstraint {\r\n let result: FormFieldListValuesConstraint = null;\r\n\r\n result = FormFieldListValuesConstraint.createCascadingListValuesConstraintFrom(serverResult['dataCollectionId'], serverResult['constraintId'], serverResult['constraintName']);\r\n result.constraintExpression = serverResult['jsonConfig'];\r\n\r\n return result;\r\n }\r\n\r\n}\r\n","import { IViewModel } from '../interfaces/view-model.interface';\r\nimport { FormInstanceElement } from './form-builder/form-instance-element.model';\r\nimport { Form } from './form-builder/form.model';\r\n//import { FolderInstance } from './folder-instance.model'; // 03-04-2020 note: per below, this needs to be phased out.\r\nimport { Folder } from './site-content/folder.model';\r\nimport { WorkflowTransition } from './workflow-transition.model';\r\n// 02-02-2021 note: at some point, making class Folder\r\n// implement interface IListItem.\r\nimport { IListItem } from '../interfaces/ilist-item.interface';\r\nimport { Workflow } from './site-content/workflow.model'; //TEAMS-424: KLW - Import workflow model\r\nimport { ItemTypeEnum } from '../enums/item-type.enum';\r\nimport { IHasIdAndNameAndWorkflowId } from '../interfaces/has-id-and-name.interface';\r\nimport { IListItemBase } from './ilist-item-base.model';\r\nimport { IconFormatEnum } from '../enums/icon-format.enum';\r\n\r\nexport class LogMessage extends IListItemBase implements IViewModel, IListItem, IHasIdAndNameAndWorkflowId{\r\n public message: string;\r\n\r\n // Constructor.\r\n public constructor(_id: number = 0) {\r\n super();\r\n\r\n this.id = _id;\r\n }\r\n public findAndUpdateFrom(items: any, obj: any): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public userCanDelete(): boolean {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getStatus(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getOriginalVersionId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n // Define properties.\r\n // Key field.\r\n public id: number = 0;\r\n public explicitType: string = 'log-message';\r\n\r\n public modifiedBy: string;\r\n public modifiedDate: Date;\r\n\r\n public createdBy: string;\r\n public createdDate: Date;\r\n\r\n // Implement assignFrom.\r\n public assignFrom(cloneObj: any): any {\r\n for (var attribut in cloneObj) {\r\n this[attribut] = cloneObj[attribut];\r\n }\r\n\r\n return (this);\r\n }\r\n\r\n // IListItem methods.\r\n public getId(): number {\r\n return (this.id);\r\n }\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n\r\n return;\r\n }\r\n\r\n public getTitle(): string {\r\n let title: string = \"Log Message\";\r\n\r\n return (title);\r\n }\r\n\r\n public isMagicStructure(): boolean {\r\n return false;\r\n }\r\n\r\n public getExtraInfo(): string {\r\n return this.message;\r\n }\r\n\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n\r\n //TEAMS-424: KLW - set the object type\r\n public static readonly TypeName: string = ItemTypeEnum.FORM_INSTANCE;\r\n public getType(): string {\r\n return 'log-message';\r\n }\r\n\r\n public getPosition(): number {\r\n return 0;\r\n }\r\n\r\n public canBeDeleted(): boolean { // Note: this will have to be fixed to use\r\n // a value returned by the server.\r\n return false;\r\n }\r\n\r\n public getIconType(): IconFormatEnum {\r\n // Note: will enable the following conditional line after reviewing the new magic form icon with others.\r\n //return (this.magicStructureDefinitionId != null ? IconFormatEnum.SVG_ICON : IconFormatEnum.MAT_ICON);\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n let icon: string = 'article';\r\n \r\n return icon;\r\n }\r\n\r\n public getUniqueId(): string { // For interface IListItem\r\n var uniqueId: string = `${this.id}-${this.getType()}`;\r\n\r\n return (uniqueId);\r\n }\r\n\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n // If modifiedByUserName is set, return that\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n \r\n }\r\n\r\n // Implement interface IHasIdAndName methods.\r\n public getName(): string {\r\n return (this.name);\r\n }\r\n public setName(nameParam: string): void {\r\n this.name = nameParam;\r\n }\r\n\r\n public typeName(): string {\r\n return 'log-message';\r\n }\r\n\r\n hasDescriptionField(): boolean {\r\n return true;\r\n }\r\n getDescription(): string {\r\n return this.message;\r\n }\r\n setDescription(val: string) {\r\n this.message = val;\r\n }\r\n\r\n // Define HasIdAndName interface methods that have no meaning for this class.\r\n public getChangeWorkflowStateDialogTitle(): string { return null; }\r\n public setChangeWorkflowStateDialogTitle(value: string): void { }\r\n\r\n public getTransitionConfirmationDialogMessage(): string { return null; }\r\n public setTransitionConfirmationDialogMessage(value: string): void { }\r\n\r\n public getTakeUserToSiteHomePageAfterTransitionApplied(): boolean { return false; }\r\n public setTakeUserToSiteHomePageAfterTransitionApplied(value: boolean): void { }\r\n\r\n public getPropertiesDrawerTitle(): string {\r\n return null;\r\n }\r\n // End HasIdAndName interface methods that have no meaning for this class.\r\n\r\n public getParentId(): number {\r\n return -1;\r\n }\r\n\r\n public getWorkflowId(): number {\r\n return -1;\r\n }\r\n}\r\n","import { FormInstance } from \"./site-content/form-instance.model\";\r\nimport { LogMessage } from \"./log-message.model\";\r\n\r\nexport class FormInstanceHistory {\r\n public versions: FormInstance[];\r\n public logMessages: LogMessage[];\r\n\r\n // pharvey - Added for VNEXT-1056\r\n public formInstanceName: string;\r\n public formInstanceVersion: string;\r\n public formFieldName: string;\r\n public value: string;\r\n public modifiedDate: Date;\r\n public modifiedBy: string\r\n\r\n public get Versions(): FormInstance[] {\r\n let versions = this.versions.map(x => Object.assign(new FormInstance(), x));\r\n return versions;\r\n }\r\n\r\n public get LogMessages(): LogMessage[] {\r\n let messages: LogMessage[] = [];\r\n for (let msg of this.logMessages) {\r\n let logMsg = Object.assign(new LogMessage(), msg);\r\n logMsg.modifiedBy = logMsg.createdBy;\r\n logMsg.modifiedDate = logMsg.createdDate\r\n messages.push(logMsg)\r\n }\r\n return messages;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\n//import { Form } from '../models/form-builder/form.model';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { FormInstanceHistory } from '../models/form-instance-history.model';\r\nimport { Diff } from '../models/diff.model';\r\n\r\n//import { plainToClass } from \"class-transformer\";\r\n//import { Logging } from '../logging';\r\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\nimport { FormInstanceElementRequest } from '../models/form-instance-element-request.model';\r\nimport { FindByMechanism } from '../enums/find-by-mechanism.enum';\r\n//import { FormInstanceElement } from '../models/form-builder/form-instance-element.model';\r\nimport { FormInstanceElementForHistory } from '../models/form-builder/form-instance-element-for-history.model';\r\n//import { ListViewEnum } from '../components/list-view/list-view.helper';\r\nimport { ItemTypeEnum } from '../enums/item-type.enum';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { FormInstancesAndFoldersUsingWorkflows } from '../../shared/models/site-content/form-instance-using-workflowstate.model';\r\nimport { Logging } from '../logging';\r\nimport { CrossSiteUserNotificationsData } from '../models/site-content/cross-site-user-notifications.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormInstanceService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'formInstance', FormInstance)\r\n }\r\n\r\n public toggleIsFavorite(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/ToggleIsFavorite/${id}`;\r\n return this.http.put(url, {}).toPromise().then(x => {\r\n return x;\r\n });\r\n }\r\n\r\n public toggleIsSubscribedToWorkflowChanges(formInstanceId: number, isSubscribedToWorkflowChanges): Promise {\r\n //let isSubscribedValue: string = isSubscribedToWorkflowChanges ? 'true' : 'false';\r\n //let url = `${this.url}/${this.endpoint}/ToggleIsSubscribedToWorkflowChanges/${formInstanceId}/isSubscribed/${isSubscribedValue}`;\r\n let url = `${this.url}/${this.endpoint}/ToggleIsSubscribedToWorkflowChanges/${formInstanceId}`;\r\n let payload: CrossSiteUserNotificationsData = new CrossSiteUserNotificationsData();\r\n payload.formId = formInstanceId;\r\n payload.isSuscribedToWorkflowChanges = isSubscribedToWorkflowChanges;\r\n return this.http.put(url, payload).toPromise().then(x => {\r\n return x;\r\n });\r\n }\r\n\r\n public toggleIsLinkedFormInstance(sourceFormInstanceId: number, targetFormInstanceId: number): Promise {\r\n if (sourceFormInstanceId <= 0 || targetFormInstanceId <= 0) {\r\n return null;\r\n }\r\n\r\n let url = `${this.url}/${this.endpoint}/ToggleIsLinkedFormInstance/${sourceFormInstanceId}/${targetFormInstanceId}`;\r\n return this.http.put(url, {}).toPromise().then(x => {\r\n return x;\r\n });\r\n }\r\n\r\n public updateFormInstanceElementVersionComment(item: FormInstanceElementForHistory) {\r\n let url = `${this.url}/${this.endpoint}/updateFormInstanceElementVersionComment`;\r\n return this.http.put(url, item).toPromise().then(x => {\r\n return x;\r\n });\r\n }\r\n\r\n formatResponse(data: FormInstance): FormInstance {\r\n let obj: FormInstance = FormInstance.loadFromDeserializedNetworkData(data);\r\n\r\n return (obj);\r\n }\r\n\r\n public deleteAll(formInstanceIds: string) {\r\n let url = `${this.url}/${this.endpoint}/delete/${formInstanceIds}`;\r\n return this.http.delete(url).toPromise();\r\n }\r\n\r\n // pharv - 1/31/2023 - VNEXT-562 - need to pass the id of the form instance currently being viewed\r\n // to the server in case it's a FormINstane ref in which case its Id cannot be inferred\r\n public compareVersions(entity: string, formInstanceId: number, id1: number, entityOneIsVersion: boolean, id2: number, entityTwoIsVersion: boolean): Promise {\r\n let path = entity == ItemTypeEnum.FORM_INSTANCE_ELEMENT_FOR_HISTORY ? `compareVersions/${formInstanceId}/elements` : `compareVersions/${formInstanceId}`;\r\n let url = `${this.url}/${this.endpoint}/${path}/${id1}/${entityOneIsVersion}/${id2}/${entityTwoIsVersion}`;\r\n return this.http.get(url).toPromise();\r\n }\r\n\r\n // note that this doesn't respond to or handle an editing conflict itself,\r\n // but if someone is currently editing the form, they'll get a conflict.\r\n public restoreVersion(entity: string, id: number): Promise {\r\n this.updateProgress(50, 75, `Restoring ...`);\r\n let path = entity == ItemTypeEnum.FORM_INSTANCE_ELEMENT_FOR_HISTORY ? 'restoreVersion/element' : 'restoreVersion';\r\n let url = `${this.url}/${this.endpoint}/${path}/${id}`;\r\n return this.http.put(url, {}).toPromise().then(x => {\r\n\r\n this.updateProgress(100, 100, `Restored form instance`);\r\n return x;\r\n });\r\n }\r\n\r\n public getHistory(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/gethistory/${id}`;\r\n this.updateProgress(25, 75, 'Loading history...');\r\n let hist: FormInstanceHistory;\r\n return this.http.get(url)\r\n .toPromise().then(res => {\r\n this.hideProgressIndicator();\r\n return Object.assign(new FormInstanceHistory(), res);\r\n });\r\n }\r\n\r\n public getFormInstanceElementHistory(id: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getFormInstanceElementHistory/${id}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let result: FormInstanceElementForHistory[] = [];\r\n for (let el of res) {\r\n result.push(Object.assign(new FormInstanceElementForHistory(), el));\r\n }\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public rename(item: FormInstance): Promise {\r\n let url = `${this.url}/${this.endpoint}/rename/${item.id}`;\r\n\r\n this.updateProgress(50, 75, `Renaming form instance ...`);\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, `Renamed form instance`);\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public reloadFormContents(id: number, messageWhileLoading: string = \"Reloading Form...\"): Promise {\r\n let url = `${this.url}/${this.endpoint}/discardEdits/${id}`;\r\n\r\n this.updateProgress(50, 75, messageWhileLoading);\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, messageWhileLoading);\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Returns a string of HTML representing the given FormInstance, which can then be embedded\r\n // in a page\r\n public getPrintableHtml(id: number, messageWhileLoading: string = \"Loading Printable Version of Form\"): Promise {\r\n let url = `${this.url}/${this.endpoint}/printable/${id}`;\r\n return this.http.get(url, { responseType: 'text' }).toPromise().then(html => {\r\n return html;\r\n });\r\n }\r\n\r\n public getContent(id: number, isVersion: boolean = false, messageWhileLoading: string = \"Loading Form...\"): Promise {\r\n let url = `${this.url}/${this.endpoint}`;\r\n if (isVersion) {\r\n url = `${url}/version/${id}`;\r\n } else {\r\n url = `${url}/getcontent/${id}`;\r\n }\r\n\r\n this.updateProgress(50, 75, messageWhileLoading);\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, messageWhileLoading);\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public updateContent(item: FormInstance): Promise {\r\n let url = `${this.url}/${this.endpoint}/content/${item.id}`;\r\n this.updateProgress(50, 75, this.progressMsg('Updating'));\r\n\r\n // VNEXT-407 - attempting a fix by nulling out cascading dropdown json which, when large, causes a 413\r\n for (let ff of item.form.formFields) {\r\n ff.cascadingDropdownConstraintValue = null;\r\n ff.jsonConfig = null;\r\n for (let cff of ff.childFormFields) {\r\n cff.cascadingDropdownConstraintValue = null;\r\n cff.jsonConfig = null;\r\n }\r\n }\r\n let startTime = performance.now();\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let endTime = performance.now();\r\n console.log(`Update form instance content completed in ${endTime - startTime} milliseconds`);\r\n\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, this.progressMsg('Updated'));\r\n return obj;\r\n })\r\n .catch(this.handleErrorWithConflict);\r\n }\r\n\r\n\r\n private handleErrorWithConflict(error: Response | any): Promise {\r\n Logging.log(error);\r\n if (this != null) {\r\n this.hideProgressIndicator();\r\n }\r\n if (error.status == 409) {\r\n // Editing Conflict\r\n // The caller is expecting the full error object, not just the message.\r\n // The error object contains the updated form instance, to be used\r\n // for conflict resolution.\r\n return Promise.reject(error);\r\n }\r\n else {\r\n return Promise.reject(error.message || error);\r\n }\r\n }\r\n\r\n public transitionWorkflowState(item: FormInstance): Promise {\r\n let url = `${this.url}/${this.endpoint}/transition/${item.id}`;\r\n this.updateProgress(50, 75, 'Updating Workflow Action...');\r\n\r\n return this.http.put(url, item)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n this.updateProgress(100, 100, 'Updated Workflow Action.');\r\n return obj;\r\n })\r\n .catch(this.handleErrorWithConflict);\r\n }\r\n\r\n public notifySubscribers(formInstance: FormInstance) {\r\n let url = `${this.url}/${this.endpoint}/notifySubscribers/${formInstance.id}`;\r\n this.updateProgress(50, 75, 'Scheduling Notifications to Subscribers of this Form...');\r\n\r\n return this.http.get(url).toPromise()\r\n .then(res => {\r\n // The operation is quick, so delay closing the progress bar a bit\r\n setTimeout(() => {\r\n this.updateProgress(100, 100, 'Done.');\r\n }, 1000);\r\n });\r\n }\r\n\r\n public save(data: FormInstance): Promise {\r\n //console.log(data.id);\r\n if (data.id > 0) {\r\n return (this.update(data));\r\n } else\r\n return (this.create(data));\r\n }\r\n\r\n public create(item: FormInstance): Promise {\r\n let result = super.create(item);\r\n return result;\r\n }\r\n\r\n // Note: though the following method is not presently being used, it will be in the future (so please do not delete it).\r\n public getFormInstanceElement(request: FormInstanceElementRequest): Promise {\r\n let url: string =\r\n `${this.url}/${this.endpoint}/GetFormInstanceElement/` +\r\n `${request.formInstanceElementId}/For/${request.formInstanceId}/` +\r\n `Page/${request.pageIndex}/PageSize/${request.pageSize}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response)\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public findFormFormInstances(formId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/findFormInstances/${formId}`;\r\n \r\n this.updateProgress(50, 75, this.progressMsg('Updating'));\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let formInstances: FormInstance[] = [];\r\n if (response != null) {\r\n for (let iFormInstance: number = 0; iFormInstance < response.length; iFormInstance++) {\r\n let formInstance = this.formatResponse(response[iFormInstance]);\r\n formInstances.push(formInstance);\r\n }\r\n }\r\n\r\n this.updateProgress(100, 100, this.progressMsg('Updated'));\r\n return formInstances;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public findBy(dataCollectionId: number, findByMechanism: FindByMechanism, findByValue: string): Promise {\r\n this.updateProgress(50, 75, this.progressMsg('Finding'));\r\n \r\n let url = `${this.url}/${this.endpoint}/findBy/${dataCollectionId}/using/${findByMechanism}/value/${findByValue}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n\r\n this.updateProgress(100, 100, this.progressMsg('Found'));\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n //VNEXT-372: KLW - Web service call to get forms and folders using a workflow state\r\n public getFormInstancesUsingWorkflowState(currentWorkflowStateId: number): Promise {\r\n this.updateProgress(50, 75, this.progressMsg('Finding Form and Folder Instances Using Workflow State'));\r\n\r\n let url = `${this.url}/${this.endpoint}/fiusingws/${currentWorkflowStateId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n this.updateProgress(100, 100, this.progressMsg('Done'));\r\n\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormInstancesUsingWorkflows(workflowIds: number[]): Promise {\r\n this.updateProgress(50, 75, this.progressMsg('Finding Form Instances and Folder Instances Using Workflow'));\r\n\r\n let url = `${this.url}/${this.endpoint}/fiusingworkflows`;\r\n\r\n return this.http.post(url, workflowIds)\r\n .toPromise()\r\n .then(response => {\r\n this.updateProgress(100, 100, this.progressMsg('Done'));\r\n\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getFormInstancesUsingForm(formId: number): Promise {\r\n var url = `${this.url}/${this.endpoint}/fiusingform/${formId}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n\r\n // 07-29-2022 note: commenting out the following method that, while surely useful, is not presently being used.\r\n /*\r\n public copyAs(formId: number, copyName: string, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Copying');\r\n this.updateProgress(50, 75, msg);\r\n\r\n let url = `${this.url}/${this.endpoint}/copy/${formId}/as/${copyName}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let obj = this.formatResponse(response);\r\n\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Copied');\r\n this.updateProgress(100, 100, msg);\r\n\r\n return obj;\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n // Protected methods.\r\n protected progressMsg(verb: string): string {\r\n return super.progressMsg(verb, 'form');\r\n }\r\n\r\n protected operationCompleted(operationName: string): void {\r\n // Notify any registered callbacks that the save operation has completed.\r\n this.notifyAnyCallbacksOperationCompleted(operationName);\r\n }\r\n}\r\n","import { RemoveTagEvent } from '@progress/kendo-angular-dropdowns';\r\nimport { IFieldDefinitionLogic } from '../../interfaces/ifield-definition-logic.interface';\r\nimport { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { FieldDefinitionService } from '../../services/field-definition.service';\r\nimport { FormField } from '../form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../form-builder/form-instance-element.model';\r\nimport { CustomDateFormatDirective } from '../../directives/custom-date-format.directive';\r\n\r\nexport class FormInstanceGridRow implements IViewModel {\r\n // meta data\r\n public id: number;\r\n\r\n //VNEXT-1099 - KLW: Adding fields to Site Homepage\r\n public createdBy: string;\r\n public createdByDisplayName: string; // Added 06-05-2024\r\n public createdDate: Date;\r\n public modifiedBy: string;\r\n public modifiedByDisplayName: string; // Added 06-05-2024\r\n public modifiedDate: Date;\r\n\r\n public name: string;\r\n public formTemplateName: string;\r\n public linkedFormInstance: boolean;\r\n // chose to name this favorite instead of isFavorite (same in server view model)\r\n // to keep the display of the Home Page Grid column name simple and not require aliasing\r\n // (The favorite column being a special case)\r\n public favorite: boolean;\r\n public isReference: boolean;\r\n public isReferenced: boolean;\r\n public dataCollectionId: number;\r\n public folderId: number;\r\n public folderName: string;\r\n public folderPath: string;\r\n public workflowState: string;\r\n public isFirstGridRow: boolean;\r\n\r\n // pharvey - added for VNEXT-983 - home page actions\r\n public canMoveFormInstance: boolean;\r\n public canCopyFormInstance: boolean;\r\n public canDeleteFormInstance: boolean;\r\n public canRenameFormInstance: boolean;\r\n public canCreateFolder: number;\r\n public canDeleteFolder: number;\r\n public canCreateForm: number;\r\n public canDeleteForm: number;\r\n\r\n public rowData: FormInstanceElement[];\r\n private static columnDefinitions: FormField[];\r\n\r\n //VNEXT-1099 - KLW: Used for custom date format strings\r\n private getMetaDataValuePropertyNames_DateFormatting: string[] = [\"createdDate\", \"modifiedDate\"];\r\n\r\n public static getAsPlainObject(fiGridRow: FormInstanceGridRow, columnDefinitions: FormField[], fieldDefinitionService: FieldDefinitionService): object {\r\n FormInstanceGridRow.columnDefinitions = columnDefinitions;\r\n\r\n let obj = {};\r\n let formName = fiGridRow.isReference ? `${fiGridRow.name} (Ref)` : fiGridRow.name;\r\n\r\n obj[FormInstanceGridRow.getFieldName('Id')] = fiGridRow.getMetaDataValue('id');\r\n\r\n //VNEXT-1099 - KLW: Adding fields to Site Homepage\r\n obj[FormInstanceGridRow.getFieldName('CreatedBy')] = fiGridRow.getMetaDataValue('createdByUserName');\r\n obj[FormInstanceGridRow.getFieldName('CreatedByDisplayName')] = fiGridRow.getMetaDataValue('createdByDisplayName');\r\n obj[FormInstanceGridRow.getFieldName('CreatedDate')] = fiGridRow.getMetaDataValue('createdDate');\r\n obj[FormInstanceGridRow.getFieldName('ModifiedBy')] = fiGridRow.getMetaDataValue('modifiedByUserName');\r\n obj[FormInstanceGridRow.getFieldName('ModifiedByDisplayName')] = fiGridRow.getMetaDataValue('modifiedByDisplayName');\r\n obj[FormInstanceGridRow.getFieldName('ModifiedDate')] = fiGridRow.getMetaDataValue('modifiedDate'); \r\n \r\n obj[FormInstanceGridRow.getFieldName('Name')] = formName;\r\n obj[FormInstanceGridRow.getFieldName('FormTemplateName')] = fiGridRow.getMetaDataValue('formTemplateName');\r\n obj[FormInstanceGridRow.getFieldName('LinkedFormInstance')] = fiGridRow.getMetaDataValue('linkedFormInstance');\r\n obj[FormInstanceGridRow.getFieldName('Favorite')] = fiGridRow.getMetaDataValue('favorite');\r\n obj[FormInstanceGridRow.getFieldName('Subscription')] = fiGridRow.getMetaDataValue('subscription');\r\n obj[FormInstanceGridRow.getFieldName('IsReference')] = fiGridRow.getMetaDataValue('isReference');\r\n obj[FormInstanceGridRow.getFieldName('IsReferenced')] = fiGridRow.getMetaDataValue('isReferenced');\r\n obj[FormInstanceGridRow.getFieldName('FolderId')] = fiGridRow.getMetaDataValue('folderId');\r\n obj[FormInstanceGridRow.getFieldName('FolderName')] = fiGridRow.getMetaDataValue('folderName');\r\n obj[FormInstanceGridRow.getFieldName('FolderPath')] = fiGridRow.getMetaDataValue('folderPath');\r\n obj[FormInstanceGridRow.getFieldName('WorkflowState')] = fiGridRow.getMetaDataValue('workflowState');\r\n obj[FormInstanceGridRow.getFieldName('FormOpenUrl')] = `site/${fiGridRow.dataCollectionId}/structure/folder/${fiGridRow.folderId}/form/${fiGridRow.id}`;\r\n\r\n obj['canCopy'] = fiGridRow.canCopyFormInstance;\r\n obj['canMove'] = fiGridRow.canMoveFormInstance;\r\n obj['canDelete'] = fiGridRow.canDeleteFormInstance;\r\n obj['isFirstGridRow'] = fiGridRow.isFirstGridRow;\r\n\r\n obj['Key'] = fiGridRow['key'];\r\n obj['Member'] = fiGridRow['member'];\r\n obj['ItemCount'] = fiGridRow['itemCount'];\r\n obj['HasSubgroups'] = fiGridRow['hasSubgroups'];\r\n obj['Items'] = fiGridRow['items'];\r\n obj['Aggregates'] = {};\r\n obj['SubgroupCount'] = 0;\r\n obj['Subgroups'] = [];\r\n\r\n // pharvey - 11/29/2023 - new approach for populating the object - it handles the case where a column does not have a matching formInstanceElement\r\n // in fiGridRow.rowData\r\n let nonMetaDataFields = columnDefinitions.filter(x => { return x.id > 0 });\r\n\r\n // IMPORTANT: One of the complexities of Home Page Grids is that the columns have to be\r\n // carefully managed. Maybe there's a better way. For now the columnDefinitions for the\r\n // Home Page Grid are passed into this method, and are used to determine which properties to set\r\n // on the plain JS object that will be returned.\r\n // The columnDefinitions gets passed in a chain of FormTemplateINstancesComponent --> FormTemplateInstancesGridRemoteBindingDirective\r\n // --> FormTemplateINstancesService --> this method. (They are built on the server in FormTemplateInstanceService.GetFormFields())\r\n // It does seem that the server should be able to handle more/all of this and so reduce the complexity of\r\n // the client code.\r\n for (let colField of nonMetaDataFields) {\r\n // try and get a FormInstanceElement...\r\n let fieldName = colField.displayName || colField.name;\r\n let fiElement = fiGridRow.rowData != null ? fiGridRow.rowData.filter(x => { return x.formField.name == fieldName || x.formField.displayName == fieldName })[0] : null;\r\n let field = null;\r\n if (fiElement) {\r\n field = fiElement.formField;\r\n } else {\r\n field = colField;\r\n fiElement = new FormInstanceElement();\r\n }\r\n\r\n field.readOnly = true;\r\n let fieldDefClientLogic: IFieldDefinitionLogic = fieldDefinitionService.getFieldClientLogicHandler(field.fieldDefinitionClassName);\r\n let displayVal = fieldDefClientLogic.getDisplayValue(field, fiElement, null, null);\r\n let name = FormInstanceGridRow.getFieldName((field.displayName || field.name));\r\n obj[name] = displayVal;\r\n }\r\n\r\n //Keeping this for now -- the old way was to loop over the rowData returned from the server BUT that did not include anything for empty\r\n //Grids, and so non-selected checkboxes were displaying as blank cells. \r\n //for (let fiElement of fiGridRow.rowData) {\r\n // //VNEXT-981 - KLW: Changes to display a checkbox on the Site Homepage as disabled, set the readonly of formfield to true, the site home page should be the only component using this method\r\n // fiElement.formField.readOnly = true;\r\n\r\n // let fieldDefClientLogic: IFieldDefinitionLogic = fieldDefinitionService.getFieldClientLogicHandler(fiElement.formField.fieldDefinitionClassName);\r\n // let displayVal = fieldDefClientLogic.getDisplayValue(fiElement.formField, fiElement, null, null);\r\n // let name = FormInstanceGridRow.getFieldName((fiElement.formField.displayName || fiElement.formField.name));\r\n\r\n // obj[name] = displayVal;\r\n //}\r\n\r\n return obj;\r\n }\r\n\r\n public getMetaDataValue(property: string): string {\r\n //if (this.isFirstGridRow) {\r\n // return this[property];\r\n //} else {\r\n // return \"\";\r\n //}\r\n\r\n //VNEXT-1099 - KLW: Change how the getting the value for the meta fields to account for date types with a custom string format\r\n let retVal = this[property];\r\n\r\n if (this.getMetaDataValuePropertyNames_DateFormatting.includes(property))\r\n {\r\n //https://www.w3schools.com/angular/ng_filter_date.asp\r\n retVal = CustomDateFormatDirective.applyDateFormattingUsing(\"yyyy-MM-dd HH:mm:ss\", retVal); \r\n } \r\n\r\n return retVal; \r\n }\r\n\r\n // Accounts for the fact that a column name may have been aliased and if so we need to use that as the property name instead of displayName or name\r\n private static getFieldName(name: string): string {\r\n let column = FormInstanceGridRow.columnDefinitions.filter(x => { return x.displayName == name || x.name == name })[0];\r\n if (column) {\r\n return column.alias?.trim().length > 0 ? column.alias : name;\r\n } else {\r\n return name;\r\n }\r\n }\r\n}\r\n","import { FormInstanceGridRow } from \"./form-instance-grid-row.model\";\r\n\r\nexport class FormTemplateInstancesGridData {\r\n public canMoveAtLeastOneForm: boolean; \r\n public canCopyAtLeastOneForm: boolean;\r\n public canDeleteAtLeastOneForm: boolean;\r\n public canDeleteAtLeastOneFolder: boolean;\r\n public canCreateSubFolderInAtLeastOneFolder: boolean;\r\n public canCreateForm: boolean;\r\n\r\n public results: FormInstanceGridRow[]; // from server\r\n public data: FormInstanceGridRow[];\r\n public Data: FormInstanceGridRow[]; // from server\r\n\r\n // Note: the following property, 'resultsAsPlainObjects', must contain the data to be displayed by a template instance grid.\r\n public resultsAsPlainObjects: object[] = []; // results translated into plain JS objects needed by Kendo Grid by service code\r\n\r\n public canPerformAtLeastOneAction() {\r\n return this.canCopyAtLeastOneForm || this.canMoveAtLeastOneForm || this.canDeleteAtLeastOneForm || this.canCreateSubFolderInAtLeastOneFolder || this.canCreateForm;\r\n }\r\n}\r\n","\r\n// Note: while this is a trivially simple view model class, trying to merely post a string\r\n// as a view model did not work.Hence the creation of this simple class.\r\nexport class FormsGridRowOrderData {\r\n public constructor(public mapOfFormsGridOrdersJson: string) { }\r\n}\r\n","import { P } from '@angular/cdk/keycodes';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { State } from \"@progress/kendo-data-query\";\r\nimport { groupBy, GroupResult, GroupDescriptor, AggregateDescriptor } from \"@progress/kendo-data-query\";\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map, tap } from \"rxjs/operators\";\r\nimport { environment } from '../../../environments/environment';\r\nimport { FormField } from '../models/form-builder/form-field.model';\r\nimport { FormInstanceGridRow } from '../models/site-content/form-instance-grid-row.model';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { FormTemplateInstancesGridData } from '../models/site-content/form-template-instances-grid-data.model';\r\nimport { FieldDefinitionService } from './field-definition.service';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { FormInstanceElement } from '../models/form-builder/form-instance-element.model';\r\nimport { FieldDefinition } from '../models/form-builder/field-definition.model';\r\nimport { IFieldDefinitionLogic } from '../interfaces/ifield-definition-logic.interface';\r\nimport { GroupedFormInstanceGridRowData } from '../models/site-content/grouped-form-instance-grid-row-data';\r\nimport { Logging } from '../logging';\r\nimport { FormsGridRowOrderData } from '../models/site-content/forms-grid-row-order-data.model';\r\n\r\nexport class OrderFormsGridRowsData {\r\n public constructor(public formInstanceId: number, public formsGridOrder: number) { }\r\n}\r\nexport interface MapOfFormsGridOrders {\r\n [formInstanceId: number]: number;\r\n}\r\n\r\nconst CREATE_ACTION = \"create\";\r\nconst UPDATE_ACTION = \"update\";\r\nconst REMOVE_ACTION = \"destroy\";\r\n\r\n// Question: why is this class being defined when class FormInstanceService already exists?\r\n// Answer: this service class is dedicated to communicating between a client Kendo grid\r\n// and a corresponding server service class. Class FormInstanceService has a\r\n// broader set of responsibilities.\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormTemplateInstancesService extends BehaviorSubject {\r\n // Properties.\r\n private url = environment.apiUrl;\r\n private endpoint: string = 'api/formTemplateInstances';\r\n private data: object[] = [];\r\n private gridData: FormTemplateInstancesGridData;\r\n private loading = false;\r\n\r\n // New: save configuration data.\r\n private gridState: State = null;\r\n private columnDefinitions: FormField[] = null;\r\n\r\n // Hard wired aggregates (for now).\r\n /*\r\n private aggregates: AggregateDescriptor[] = [\r\n { field: \"UnitPrice\", aggregate: \"sum\" },\r\n ];\r\n */\r\n\r\n // Constructor.\r\n public constructor(private http: HttpClient, progressIndicatorService: ProgressIndicatorService, private fieldDefinitionService: FieldDefinitionService) {\r\n super(new FormTemplateInstancesGridData());\r\n }\r\n\r\n public formatResponse(data: FormInstance): FormInstance {\r\n let obj: FormInstance = FormInstance.loadFromDeserializedNetworkData(data);\r\n\r\n return (obj);\r\n }\r\n\r\n // Service methods.\r\n public read(formTemplateId: number, columnDefinitions: FormField[], selectedGridId: number, formFieldId: number, gridState: State, aggregatesParam: AggregateDescriptor[] = null): void {\r\n this.loading = true;\r\n this.gridState = gridState;\r\n\r\n // If we have grouping, request all records from the server.\r\n // Additionally, add any specified aggregates/aggregations.\r\n if ((this.gridState.group != null) && (this.gridState.group.length > 0)) {\r\n this.gridState.skip = 0;\r\n this.gridState.take = 1000000;\r\n }\r\n this.columnDefinitions = columnDefinitions;\r\n\r\n this.fetch(formTemplateId, columnDefinitions, selectedGridId, formFieldId, gridState)\r\n .pipe(\r\n tap((data) => {\r\n this.gridData = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n public getFields(formTemplateId: number, gridFieldId: number = 0): Promise {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/GetFormFields/${formTemplateId}/${gridFieldId}`;\r\n\r\n return this.http.get(url).toPromise().then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n public resetItem(dataItem: object): void {\r\n if (!dataItem) {\r\n return;\r\n }\r\n\r\n // find orignal data item\r\n const originalDataItem = this.data.find(\r\n (item) => item['id'] === dataItem['id']\r\n );\r\n\r\n // revert changes\r\n Object.assign(originalDataItem, dataItem);\r\n\r\n super.next(this.gridData);\r\n }\r\n\r\n private reset() {\r\n //console.log('KendoGridService.reset()');\r\n this.data = [];\r\n }\r\n\r\n public get Loading() {\r\n return this.loading;\r\n }\r\n\r\n public setFormsGridOrderValues(formFieldId: number, mapOfFormsGridOrdersJson: string): Promise {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/SetFormsGridOrderValues/${formFieldId}`;\r\n\r\n let reorderData: FormsGridRowOrderData = new FormsGridRowOrderData(mapOfFormsGridOrdersJson);\r\n\r\n return this.http.post(url, reorderData)\r\n .toPromise()\r\n .then(response => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Helper methods.\r\n private fetch(formTemplateId: number, columnDefinitions: FormField[], selectedGridId: number, formFieldId: number, gridState: State, action = \"\", data?: object[]): Observable {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/Get/${formTemplateId}`;\r\n\r\n let payload = {\r\n configuredColumns: columnDefinitions,\r\n gridState: gridState,\r\n selectedGridId: selectedGridId,\r\n formFieldId: formFieldId\r\n }\r\n\r\n return >this.http.post(url, payload)\r\n .pipe(\r\n map((gridData) => {\r\n let formInstanceRows: object[] = [];\r\n let gridDataObject = Object.assign(new FormTemplateInstancesGridData(), gridData); // converts to a fully-fledged FormTemplateInstancesGridData\r\n if ((this.gridState.group == null) || (this.gridState.group.length == 0)) {\r\n if (gridDataObject?.results?.length > 0) {\r\n for (let row of gridDataObject.results) {\r\n let fiGridRow: FormInstanceGridRow = Object.assign(new FormInstanceGridRow(), row);\r\n let formInstanceRow = FormInstanceGridRow.getAsPlainObject(fiGridRow, columnDefinitions, this.fieldDefinitionService);\r\n formInstanceRows.push(formInstanceRow);\r\n gridDataObject.resultsAsPlainObjects.push(formInstanceRow);\r\n }\r\n }\r\n return gridDataObject;\r\n }\r\n else {\r\n // Note: the server is now returning the grouped data and also the original, ungrouped data.\r\n let groupedGridData: FormTemplateInstancesGridData = Object.assign(new FormTemplateInstancesGridData(), gridData);\r\n\r\n let untypedGridData: any = gridData;\r\n let serverResult: GroupedFormInstanceGridRowData = untypedGridData;\r\n\r\n let ungroupedData: object[] = [];\r\n\r\n //let result = gridData.results;\r\n //if ((gridData.results != null) && (gridData.results.length > 0)) {\r\n let results = serverResult.ungroupedRowData.results;\r\n if ((results != null) && (results.length > 0)) {\r\n for (let index: number = 0; index < results.length; index++) {\r\n let row: FormInstanceGridRow = results[index];\r\n let ungroupedRow: object = {};\r\n\r\n for (let iCol: number = 0; iCol < this.columnDefinitions.length; iCol++) {\r\n let colDef: FormField = this.columnDefinitions[iCol];\r\n let fieldDef: FieldDefinition = this.fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n let fieldName: string = (colDef.displayName != null) && (colDef.displayName.trim() != '') ? colDef.displayName : colDef.name;\r\n let fieldValue: any = null;\r\n\r\n if ((row.rowData != null) && (row.rowData.length > 0)) {\r\n let colValue: FormInstanceElement = row.rowData.find(ff => (ff.formField.displayName == colDef.displayName) || (ff.formField.name == colDef.name));\r\n // 04-03-2024 note: will enable the following line to replace the block below it when I have more time to test.\r\n fieldValue = fieldDef.customLogicHandler.unpackTemplateInstancesRow(colDef, colValue, row);\r\n }\r\n\r\n ungroupedRow[fieldName] = fieldValue;\r\n }\r\n\r\n ungroupedData.push(ungroupedRow);\r\n }\r\n }\r\n\r\n // Calculate the client-side group for comparison with the server-side group (debugging only).\r\n let clientGroupedDataForReference = groupBy(ungroupedData, this.gridState.group);\r\n\r\n FormTemplateInstancesService.fixCaseOfAggregates(serverResult.groupedRowData, this.gridState.group[0].aggregates);\r\n FormTemplateInstancesService.fixCaseOfFieldNames(serverResult.groupedRowData);\r\n\r\n groupedGridData.resultsAsPlainObjects = serverResult.groupedRowData;\r\n\r\n return groupedGridData;\r\n }\r\n })\r\n );\r\n }\r\n\r\n private static fixCaseOfAggregates(groupedRowData: object[], aggregates: AggregateDescriptor[]): void {\r\n // What's the deal with this method?\r\n //\r\n // Answer: as we generally do, capitialized property names in server data structures get serialized to the client as lowercase names,\r\n // the casing only affecting the first letter of each property, not any embedded/internal capital letters.\r\n //\r\n // This can affect aggregate names where aggregate values are indexed by a field's name which can start with a capital letter.\r\n // For such aggregates, e.g. 'Count' or \"Ounces per Serving\", they will be returned by the server indexed by property names\r\n // 'count' and \"ounces per Serving\", respectively. As a result of this, the Telerik/Kendo grid will not 'see' the aggregates.\r\n // The following code compensates by adding an index for each original aggregate property name if the casing has been changed\r\n // in the result coming from the server. Using the 'Count' and \"Ounces per Serving\" example, whereas each hash/map of\r\n // aggregates would be returned as { 'count': { COUNT_AGGREGATES }, 'ounces per Serving': { OUNCES_PER_SERVING_AGGREGATES }},\r\n // this code will update such a hash to look like the following:\r\n //\r\n // {\r\n // 'count': { COUNT_AGGREGATES }, 'Count': { COUNT_AGGREGATES },\r\n // 'ounces per Serving': { OUNCES_PER_SERVING_AGGREGATES }, 'Ounces per Serving': { OUNCES_PER_SERVING_AGGREGATES }\r\n // }\r\n if ((groupedRowData != null) && (groupedRowData.length > 0) && (aggregates != null) && (aggregates.length > 0)) {\r\n for (let index: number = 0; index < groupedRowData.length; index++) {\r\n let groupedRow: object = groupedRowData[index];\r\n let rowAggregates = groupedRow['aggregates'];\r\n if (rowAggregates != null) {\r\n let keys: string[] = Object.keys(rowAggregates);\r\n for (let keyIndex: number = 0; keyIndex < keys.length; keyIndex++) {\r\n let key: string = keys[keyIndex];\r\n\r\n let matchingAggregate: AggregateDescriptor = aggregates.find(ag => ag.field.toLowerCase() == key.toLowerCase());\r\n if ((matchingAggregate != null) && (matchingAggregate.field != key)) {\r\n let fieldAggregates = rowAggregates[key];\r\n rowAggregates[matchingAggregate.field] = fieldAggregates;\r\n }\r\n }\r\n }\r\n\r\n let items: object[] = groupedRow['items'];\r\n if ((items != null) && (items.length > 0)) {\r\n // Fix any case problems with the subgrouped rows.\r\n FormTemplateInstancesService.fixCaseOfAggregates(items, aggregates);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private static fixCaseOfFieldNames(groupedRowData: object[]): void {\r\n // What's the deal with this method?\r\n //\r\n // Answer: Similar to grouping aggregates, item property names are returned with\r\n // lowercase initial letter, which may not match the field name:\r\n //\r\n // \"groupedRowData\": [\r\n // {\r\n // \"field\": \"WorkflowState\", <-- capitalized field name\r\n // \"value\": \"Start\",\r\n // \"items\": [\r\n // {\r\n // \"favorite\": false,\r\n // \"subscription\": 0,\r\n // \"id\": 4535,\r\n // \"name\": \"Destination\",\r\n // \"folderName\": \"Travel Plans\",\r\n // \"workflowState\": \"Start\", <-- mismatched field name\r\n // \"integer0\": 22034,\r\n // \"shortText0\": \"Baltimore\",\r\n // },\r\n\r\n if ((groupedRowData != null) && (groupedRowData.length > 0)) {\r\n //iterate through grouped rows\r\n for (let index: number = 0; index < groupedRowData.length; index++) {\r\n let groupedRow: object = groupedRowData[index];\r\n let rowItems = groupedRow['items'];\r\n if (rowItems != null) {\r\n //iterate through items in this group\r\n for (let itemIndex: number = 0; itemIndex < rowItems.length; itemIndex++) {\r\n let keys: string[] = Object.keys(rowItems[itemIndex]);\r\n //iterate through properties of this item\r\n for (let keyIndex: number = 0; keyIndex < keys.length; keyIndex++) {\r\n let itemKey = keys[keyIndex];\r\n let fixedKey = itemKey[0].toUpperCase() + itemKey.substring(1);\r\n //if keys mismatch, add capitalized property with same value\r\n if (itemKey != fixedKey) {\r\n rowItems[itemIndex][fixedKey] = rowItems[itemIndex][itemKey];\r\n }\r\n }\r\n }\r\n }\r\n\r\n let items: object[] = groupedRow['items'];\r\n if ((items != null) && (items.length > 0)) {\r\n // Fix child groupings by recursion\r\n FormTemplateInstancesService.fixCaseOfFieldNames(items);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private handleError(error: Response | any): Promise {\r\n Logging.log(error);\r\n return Promise.reject(error.message || error);\r\n }\r\n\r\n /*\r\n private static addExampleAggregatesToGroup(groupDescriptor: GroupDescriptor): void {\r\n let aggregates: AggregateDescriptor[] =\r\n [\r\n { field: 'Count', aggregate: \"sum\" },\r\n { field: 'Count', aggregate: \"count\" },\r\n //{ field: 'Count', aggregate: \"average\" },\r\n //{ field: 'Count', aggregate: \"min\" },\r\n //{ field: 'Count', aggregate: \"max\" },\r\n\r\n { field: 'Ounces per Serving', aggregate: \"sum\" },\r\n { field: 'Ounces per Serving', aggregate: \"count\" },\r\n //{ field: 'Ounces per Serving', aggregate: \"average\" },\r\n //{ field: 'Ounces per Serving', aggregate: \"min\" },\r\n //{ field: 'Ounces per Serving', aggregate: \"max\" },\r\n ];\r\n //this.gridState.group.map((group) => (group.aggregates = this.aggregates));\r\n groupDescriptor.aggregates = aggregates;\r\n }\r\n */\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\nimport { ExcelSiteFormDataExportRequest } from '../models/export-import/excelSiteFormDataExportRequest';\r\nimport { ExcelFolderFormDataExportRequest } from '../models/export-import/excelFolderFormDataExportRequest';\r\n\r\n@Injectable()\r\nexport class GeocodeService {\r\n private serviceUrl = '';\r\n\r\n public constructor(private http: HttpClient) {\r\n this.serviceUrl = environment.apiUrl + \"/api/geocode/\";\r\n }\r\n\r\n public Geocode2010Address(address): Promise {\r\n let url = this.serviceUrl + 'Geocode2010Address';\r\n return this.http.post(url, {}, { params: { address: address } })\r\n .toPromise()\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public Geocode2020Address(address): Promise {\r\n let url = this.serviceUrl + 'Geocode2020Address';\r\n return this.http.post(url, {}, { params: { address: address } })\r\n .toPromise()\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public GeocodeGrid(formInstanceId, gridId, settings = null): Promise {\r\n let url = this.serviceUrl + 'GeocodeGrid';\r\n\r\n return this.http.post(url, {}, { params: { formInstanceId: formInstanceId, gridId: gridId, options: 'vintage=Census2010_Census2020' } })\r\n .toPromise()\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n private handleError(error: any): Promise {\r\n return Promise.reject(error.message || error);\r\n }\r\n}\r\n","import { ElementCountExpected } from './element-count-expected.enum';\r\nimport { StringUtil } from '../../utility-classes/string.util';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ComponentMethodMetadata } from './component-methods-metadata.model';\r\nimport { HtmlInputValue } from './html-input-value.model';\r\nimport { HtmlPropertyValue } from './html-property-value.model';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { AdditionalElementInfo, INameToPrettyNameMap } from './additional-element-info.model';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\nimport { IElementTypeMetadata } from '../../interfaces/component-scripting/ielement-type-metadata';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\nexport class ElementTypeMetadata implements IElementTypeMetadata {\r\n // Properties.\r\n public prettyElementTypeTitle: string = null;\r\n\r\n // Constructor.\r\n public constructor(public htmlElementSelector: string,\r\n public metadataKey: string,\r\n public elementCountExpected: ElementCountExpected)\r\n {\r\n }\r\n\r\n // Compute callback method names.\r\n public get elementsFlagName(): string {\r\n return 'has' + StringUtil.capitalize(this.metadataKey);\r\n }\r\n public get elementsPropertyName(): string {\r\n return this.metadataKey;\r\n }\r\n public get elementsInitializedCallback(): string {\r\n return this.metadataKey + 'Initialized';\r\n }\r\n\r\n // Metadata function default implementations.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n return \"\";\r\n }\r\n\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n return false;\r\n }\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n return [];\r\n }\r\n\r\n public hasActions = (driver: IBrowserDriver, element: object): boolean => {\r\n return false;\r\n }\r\n public getActions = (driver: IBrowserDriver, element: object): string[] => {\r\n return [];\r\n }\r\n //public click(driver: IBrowserDriver, component: ITestableComponent, element: object, getClickableElementFunction: (element: object) => object): void {\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n // NOOP BY DESIGN.\r\n }\r\n //public performAction(driver: IBrowserDriver, component: ITestableComponent, element: object, getClickableElementFunction: (element: object) => object): void {\r\n public performAction(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n //this.click(driver, component, element, getClickableElementFunction);\r\n this.click(driver, recorderService, component, htmlElementInfo, element, getClickableElementFunction);\r\n }\r\n public doubleClick(driver: IBrowserDriver, component: ITestableComponent, element: object, getClickableElementFunction: (element: object) => object): void {\r\n // NOOP BY DESIGN.\r\n }\r\n public recordActionClick(recorderService: ITestActionRecorderService, htmlElementInfo: HtmlElementInfo): void {\r\n // NOOP BY DESIGN.\r\n }\r\n\r\n public hasMethods(driver: IBrowserDriver, element: object): boolean {\r\n return false;\r\n }\r\n public getMethods(driver: IBrowserDriver, element: object): ComponentMethodMetadata[] {\r\n return [];\r\n }\r\n\r\n public hasInputs = (driver: IBrowserDriver, element: object): boolean => {\r\n return false;\r\n }\r\n public getInputs = (driver: IBrowserDriver, element: object): HtmlInputValue[] => {\r\n return [];\r\n }\r\n //public setValue(driver: IBrowserDriver, component: ITestableComponent, element: object, value: string): void {\r\n public setValue(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, value: string): void {\r\n // NOOP BY DESIGN.\r\n }\r\n\r\n // Protected methods.\r\n protected mapNameWithExactMatch(name: string, namesMap: INameToPrettyNameMap): string {\r\n let result: string = namesMap[name] != null ? namesMap[name] : name;\r\n return result;\r\n }\r\n protected mapNameWithPartialMatch(name: string, namesMap: INameToPrettyNameMap): string {\r\n let result: string = name;\r\n for (let nameKey in namesMap) {\r\n if (name.includes(nameKey)) {\r\n let prettyName: string = namesMap[nameKey];\r\n result = prettyName;\r\n break;\r\n } \r\n }\r\n return result;\r\n }\r\n}\r\n","import { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\nimport { OperationCompletedServiceInfo } from './additional-element-info.model';\r\n\r\nexport abstract class ClickableElementTypeMetadata extends ElementTypeMetadata {\r\n protected constructor(htmlElementSelector: string, metadataKey: string, elementCountExpected: ElementCountExpected) {\r\n super(htmlElementSelector, metadataKey, elementCountExpected);\r\n }\r\n\r\n // Override metadata methods.\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n\r\n public hasActions = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getActions = (driver: IBrowserDriver, element: object): string[] => {\r\n let actions: string[] = [];\r\n\r\n let title: string = this.getTitle(driver, element);\r\n actions.push(title);\r\n\r\n return actions;\r\n }\r\n\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n let operationCompletedServiceInfo: OperationCompletedServiceInfo = this.getAnyOperationCompletedServiceInfoFor(htmlElementInfo);\r\n recorderService.clickButton(htmlElementInfo.elementTitle, htmlElementInfo.elementTypeMetadata.metadataKey, htmlElementInfo.elementSubtype, operationCompletedServiceInfo != null ? operationCompletedServiceInfo.serviceName : null, operationCompletedServiceInfo != null ? operationCompletedServiceInfo.operationName : null);\r\n\r\n let elementToClick = getClickableElementFunction != null ? getClickableElementFunction(element) : element;\r\n driver.clickButton(component, elementToClick);\r\n }\r\n public doubleClick(driver: IBrowserDriver, component: ITestableComponent, element: object, getClickableElementFunction: (element: object) => object): void {\r\n let elementToClick = getClickableElementFunction != null ? getClickableElementFunction(element) : element;\r\n driver.doubleClickButton(component, elementToClick);\r\n }\r\n /*\r\n public recordActionClick(recorderService: ITestActionRecorderService, htmlElementInfo: HtmlElementInfo): void {\r\n recorderService.elementActionClicked(htmlElementInfo.elementTitle, htmlElementInfo.elementTypeMetadata.metadataKey, htmlElementInfo.elementSubtype);\r\n }\r\n */\r\n\r\n // Protected methods.\r\n protected getAnyOperationCompletedServiceInfoFor(htmlElementInfo: HtmlElementInfo): OperationCompletedServiceInfo {\r\n let operationCompletedServiceInfo: OperationCompletedServiceInfo = null;\r\n if ((htmlElementInfo.additionalElementInfo != null) && (htmlElementInfo.additionalElementInfo.operationCompletedServiceMap != null) && (htmlElementInfo.additionalElementInfo.operationCompletedServiceMap[htmlElementInfo.elementTitle] != null)) \r\n operationCompletedServiceInfo = htmlElementInfo.additionalElementInfo.operationCompletedServiceMap[htmlElementInfo.elementTitle];\r\n\r\n return operationCompletedServiceInfo;\r\n }\r\n}\r\n","\r\nexport class HtmlPropertyValue {\r\n public constructor(public propertyName: string, public propertyValue: string) { }\r\n}\r\n","import { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\nimport { HtmlPropertyValue } from './html-property-value.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo, OperationCompletedServiceInfo } from './additional-element-info.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\n\r\nexport class LinksElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n //super('a', 'links', ElementCountExpected.Singular_or_Plural);\r\n super('a', HtmlElementTypeNames.links_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n }\r\n\r\n // Override metadata methods.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n //return $(element).text();\r\n let title: string = driver.getTextFor(element);\r\n return title;\r\n }\r\n\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n //let hrefValue: string = $(element).attr('href');\r\n let hrefValue: string = driver.getAttributeValueFor(element, 'href');\r\n let propertyValue: HtmlPropertyValue = new HtmlPropertyValue('href', hrefValue);\r\n properties.push(propertyValue);\r\n\r\n return properties;\r\n }\r\n\r\n //public click(driver: IBrowserDriver, component: ITestableComponent, element: object): void {\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n let operationCompletedServiceInfo: OperationCompletedServiceInfo = this.getAnyOperationCompletedServiceInfoFor(htmlElementInfo);\r\n recorderService.clickLink(htmlElementInfo.elementTitle, htmlElementInfo.elementTypeMetadata.metadataKey, htmlElementInfo.elementSubtype, operationCompletedServiceInfo != null ? operationCompletedServiceInfo.serviceName : null, operationCompletedServiceInfo != null ? operationCompletedServiceInfo.operationName : null);\r\n\r\n driver.clickLink(component, element);\r\n }\r\n}\r\n","import { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\nimport { HtmlPropertyValue } from './html-property-value.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\nexport class ButtonsElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n super('button', HtmlElementTypeNames.buttons_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n this.prettyElementTypeTitle = 'Buttons';\r\n }\r\n\r\n // Override metadata methods.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = driver.getButtonTitle(element);\r\n if ((additionalElementInfo != null) && (additionalElementInfo.nameToPrettyNameMap != null))\r\n title = super.mapNameWithPartialMatch(title, additionalElementInfo.nameToPrettyNameMap);\r\n return title;\r\n }\r\n // Note: no properties for buttons so far ...\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n return properties;\r\n }\r\n}\r\n\r\nexport class ButtonsWithMatIconsElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n super('button', HtmlElementTypeNames.buttonsWithMatIcons_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n this.prettyElementTypeTitle = 'Buttons with Icons';\r\n }\r\n\r\n // Override metadata methods.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = driver.getButtonTitle(element);\r\n\r\n if (element['firstChild'] != null) {\r\n let firstChild: object = element['firstChild'];\r\n if ((firstChild['children'] != null) && (firstChild['children'].length > 0)) {\r\n let child: object = firstChild['children'][0];\r\n if ($(child).data('matIconName') != null)\r\n title = $(child).data('matIconName');\r\n else if (child['innerText'] != null)\r\n title = child['innerText'];\r\n }\r\n }\r\n \r\n return title;\r\n }\r\n // Note: no properties for buttons so far ...\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n return properties;\r\n }\r\n}\r\n","import { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo, IAdditionalElementInfo } from './additional-element-info.model';\r\n\r\nexport class MatListItemsElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n super('mat-list-item', HtmlElementTypeNames.matListItems_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n this.prettyElementTypeTitle = 'Material List Items';\r\n }\r\n\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n //let title: string = additionalElementInfo != null ? driver.getTextFor(element, additionalElementInfo.optionalInnerTextSelector) : driver.getTextFor(element);\r\n let title: string = additionalElementInfo != null ? driver.getTextFor(element, additionalElementInfo.innerTextSelector) : driver.getTextFor(element);\r\n if ((additionalElementInfo != null) && (additionalElementInfo.customGetTextForFunction != null))\r\n title = additionalElementInfo.customGetTextForFunction(driver, element, title, additionalElementInfo);\r\n //if ((title != null) && (additionalElementInfo != null) && (a))\r\n return title;\r\n }\r\n}\r\n","import { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\n\r\nexport class MatIconsElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n super('mat-icon', HtmlElementTypeNames.matIcons_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n this.prettyElementTypeTitle = 'Material Icons';\r\n }\r\n\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = driver.getMatIconTitle(element);\r\n return title;\r\n }\r\n\r\n //public click(driver: IBrowserDriver, component: ITestableComponent, element: object, getClickableElementFunction: (element: object) => object): void {\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n //super.click(driver, component, element, getClickableElementFunction);\r\n super.click(driver, recorderService, component, htmlElementInfo, element, getClickableElementFunction);\r\n\r\n /* \r\n if ((element['parentNode'] != null) && (element['parentNode']['parentNode'] != null))\r\n driver.clickButton(component, element['parentNode']['parentNode']);\r\n */\r\n }\r\n\r\n}\r\n","declare let $: any; // jQuery\r\n\r\nexport class HtmlInputValue {\r\n public constructor(public element: object, public inputTitle: string, private _inputValue: string) {\r\n }\r\n\r\n // Getters/setters.\r\n public get inputValue(): string {\r\n return this._inputValue;\r\n }\r\n public set inputValue(value: string) {\r\n this._inputValue = value;\r\n\r\n $(this.element).val(value);\r\n }\r\n}\r\n","import { MatInput } from '@angular/material/input';\r\nimport { ElementRef } from '@angular/core';\r\nimport { ControlValueAccessor } from '@angular/forms';\r\n\r\nimport { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { HtmlPropertyValue } from './html-property-value.model';\r\nimport { HtmlInputValue } from './html-input-value.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ScriptableBaseComponent } from '../../components/scriptable-base/scriptable-base.component';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\n\r\nexport class InputElementTypeMetadataBase extends ElementTypeMetadata {\r\n protected constructor(metadataKey: string, elementCountExpected: ElementCountExpected) {\r\n super('input:text', metadataKey, elementCountExpected);\r\n }\r\n\r\n // Override metadata methods.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = driver.getInputTitle(element);\r\n\r\n if (additionalElementInfo != null) {\r\n if ((additionalElementInfo.nameToPrettyNameMap != null) && (additionalElementInfo.nameToPrettyNameMap[title] != null))\r\n title = additionalElementInfo.nameToPrettyNameMap[title];\r\n }\r\n\r\n return title;\r\n }\r\n\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n return properties;\r\n }\r\n\r\n public hasInputs = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getInputs = (driver: IBrowserDriver, element: object): HtmlInputValue[] => {\r\n let inputs: HtmlInputValue[] = [];\r\n\r\n let inputTitle: string = this.getTitle(driver, element);\r\n //let inputValue: string = $(element).val();\r\n let inputValue: string = driver.getValueFor(element);\r\n let input: HtmlInputValue = new HtmlInputValue(element, inputTitle, inputValue);\r\n inputs.push(input);\r\n\r\n return inputs;\r\n }\r\n //public setValue(driver: IBrowserDriver, component: ITestableComponent, element: object, value: string): void {\r\n public setValue(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, value: string): void { \r\n if (component != null) {\r\n //let baseComponent: ScriptableBaseComponent = component; // Need to use the interface instead!!!\r\n\r\n /*\r\n if ((baseComponent.matInputs != null) && (baseComponent.matInputElementRefs != null) &&\r\n (baseComponent.matInputs.length == baseComponent.matInputElementRefs.length)) {\r\n let matInputsArray: MatInput[] = baseComponent.matInputs.toArray();\r\n let matInputElementRefsArray: ElementRef[] = baseComponent.matInputElementRefs.toArray();\r\n\r\n if ((matInputsArray != null) && (matInputsArray.length > 0)) {\r\n for (let index: number = 0; index < matInputsArray.length; index++) {\r\n let matInput: MatInput = matInputsArray[index];\r\n let matInputElementRef: ElementRef = matInputElementRefsArray[index];\r\n\r\n if (element == matInputElementRef.nativeElement) {\r\n //matInput.ngControl.control.setValue(value);\r\n driver.sendKeysTo(element, matInput, value);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n */\r\n let matInput: MatInput = component.getMatInputWithElement(htmlElementInfo.element);\r\n if (matInput != null) {\r\n driver.sendKeysTo(htmlElementInfo.element, matInput, value);\r\n //recorderService.setInputValue(htmlElementInfo.elementTitle, htmlElementInfo.elementTypeMetadata.metadataKey, value, false);\r\n recorderService.setInputValue(htmlElementInfo.elementTitle, htmlElementInfo.elementTypeMetadata.metadataKey, htmlElementInfo.elementSubtype, value, false);\r\n } \r\n }\r\n }\r\n}\r\n\r\nexport class InputElementTypeMetadata extends InputElementTypeMetadataBase {\r\n public constructor() {\r\n super(HtmlElementTypeNames.input_metadataKey, ElementCountExpected.Singular);\r\n this.prettyElementTypeTitle = 'Input Field';\r\n }\r\n}\r\nexport class InputsElementTypeMetadata extends InputElementTypeMetadataBase {\r\n public constructor() {\r\n super(HtmlElementTypeNames.inputs_metadataKey, ElementCountExpected.Singular_or_Plural);\r\n this.prettyElementTypeTitle = 'Input Fields';\r\n }\r\n}\r\n","export class SelectOptionValue {\r\n public id: number = 0;\r\n public displayName: string;\r\n}\r\nexport class TextSelectOptionValue {\r\n public constructor(public value: string, public displayName: string) { }\r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\r\nimport { UntypedFormControl } from '@angular/forms'; // Used for Reactive Forms\r\n\r\nimport { ComponentMethodMetadata, ComponentMethodsMetadata, IComponentNameToMethodsMetadata } from '../../models/component-scripting/component-methods-metadata.model';\r\nimport { ComponentMethodsService, EnumMetadata, IEnumMetadataByName } from '../../models/component-scripting/component-methods.service';\r\nimport { Scriptable } from '../../models/component-scripting/scriptable-function.annotation';\r\nimport { TextSelectOptionValue } from '../../models/selection-fields/select-option-value.model';\r\n\r\nclass ParameterTypeToSetupMethodName {\r\n public constructor(public parameterType: string, public setupMethodName: string) {\r\n }\r\n}\r\n\r\nenum ParameterFormControlTypeEnum {\r\n TextInput = 'TextInput',\r\n NumericInput = 'NumericInput',\r\n Select = 'Select'\r\n}\r\n\r\nexport class ParameterFormControlInfo {\r\n // Properties.\r\n // Parameter metadata.\r\n public selectOptionValues: TextSelectOptionValue[] = null;\r\n\r\n // Control data.\r\n public formControl: UntypedFormControl = null;\r\n public enteredValue: any = null;\r\n\r\n public hasDateTimeSuffixFormControl: UntypedFormControl = null;\r\n\r\n // Constructor.\r\n public constructor(public parameterName: string, public controlType: ParameterFormControlTypeEnum) {\r\n }\r\n}\r\n\r\nexport class EditInputParametersDialogManager {\r\n public constructor(private dialog: MatDialog, private methodMetadata: ComponentMethodMetadata) {\r\n }\r\n\r\n public openDialog(): MatDialogRef {\r\n let dialogHeight: string = `${150 * this.methodMetadata.parameterNames.length + 100}px`;\r\n\r\n // Open an EditInputParametersComponent dialogue.\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '400px';\r\n dialogConfig.height = dialogHeight; // '500px';\r\n dialogConfig.data = this.methodMetadata;\r\n\r\n const dialogRef: MatDialogRef = this.dialog.open(EditInputParametersDialog, dialogConfig);\r\n\r\n return dialogRef;\r\n }\r\n}\r\n\r\n@Component({\n selector: 'app-edit-input-parameters',\n templateUrl: './edit-input-parameters.dialog.html',\n styleUrls: ['./edit-input-parameters.dialog.scss'],\n standalone: false\n})\nexport class EditInputParametersDialog implements OnInit {\r\n // Static data.\r\n private static parameterTypesToMethodNames: ParameterTypeToSetupMethodName[] =\r\n [\r\n new ParameterTypeToSetupMethodName('string', 'setupStringControl'),\r\n new ParameterTypeToSetupMethodName('number', 'setupNumericControl')\r\n ];\r\n\r\n // Properties.\r\n public title: string = null;\r\n public readonly parametersControlInfo: ParameterFormControlInfo[] = [];\r\n\n // Constructor.\n public constructor(@Inject(MAT_DIALOG_DATA) public methodMetadata: ComponentMethodMetadata,\r\n private dialogRef: MatDialogRef) {\r\n this.setupParameterControls();\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n //this.setupParameterControls();\n }\n\r\n // Method called by my HTML code.\r\n /*\r\n public get Title(): string {\r\n let title: string = 'Edit Input Parameter';\r\n\r\n if ((this.methodMetadata != null) && (this.methodMetadata.argumentTypeNames != null) && (this.methodMetadata.argumentTypeNames.length > 1))\r\n title += 's';\r\n\r\n return title;\r\n }\r\n\r\n public get ParametersControlInfo(): ParameterFormControlInfo[] {\r\n return this.parametersControlInfo;\r\n }\r\n\r\n public get TextInputControlType(): string {\r\n return ParameterFormControlTypeEnum.TextInput;\r\n }\r\n public get NumericInputControlType(): string {\r\n return ParameterFormControlTypeEnum.NumericInput;\r\n }\r\n public get SelectControlType(): string {\r\n return ParameterFormControlTypeEnum.Select;\r\n }\r\n\r\n public getParameterFormControlFor(parameterControlInfo: ParameterFormControlInfo): FormControl {\r\n return parameterControlInfo.formControl;\r\n }\r\n public getParameterNameFor(parameterControlInfo: ParameterFormControlInfo): string {\r\n return parameterControlInfo.parameterName;\r\n }\r\n public getFieldLabelFor(parameterControlInfo: ParameterFormControlInfo): string {\r\n return this.getParameterNameFor(parameterControlInfo);\r\n }\r\n public getSelectOptionsFor(parameterControlInfo: ParameterFormControlInfo): TextSelectOptionValue[] {\r\n return parameterControlInfo.selectOptionValues;\r\n }\r\n\r\n public getHasAddedDateTimeSuffixFormControlFor(parameterControlInfo: ParameterFormControlInfo): FormControl {\r\n return parameterControlInfo.hasDateTimeSuffixFormControl;\r\n }\r\n */\r\n\r\n // Control events.\r\n public returnParameterValues(): void {\r\n this.prepareResultValues();\r\n this.dialogRef.close(this.parametersControlInfo);\r\n }\r\n\r\n // Helper methods.\r\n private setupParameterControls(): void {\r\n // Set my title.\r\n this.title = 'Edit Input Parameter';\r\n if ((this.methodMetadata != null) && (this.methodMetadata.argumentTypeNames != null) && (this.methodMetadata.argumentTypeNames.length > 1))\r\n this.title += 's';\r\n\r\n // Setup my form controls.\r\n if ((this.methodMetadata != null) && (this.methodMetadata.argumentTypeNames != null)) {\r\n for (let index: number = 0; index < this.methodMetadata.argumentTypeNames.length; index++) {\r\n let parameterType: string = this.methodMetadata.argumentTypeNames[index].toLowerCase();\r\n let parameterTypeToSetup: ParameterTypeToSetupMethodName = EditInputParametersDialog.parameterTypesToMethodNames.find(p => p.parameterType == parameterType);\r\n if (parameterTypeToSetup == null)\r\n throw `EditInputParametersComponent.setupParameterControls(): cannot find a setup method for parameter type '${parameterType}'`;\r\n\r\n let parameterName: string = (this.methodMetadata.parameterNames != null) && (this.methodMetadata.parameterNames.length > index) ? this.methodMetadata.parameterNames[index] : parameterType;\r\n let additionalTypeInfo = (this.methodMetadata.parametersTypeInfo != null) && (this.methodMetadata.parametersTypeInfo.length > index) ? this.methodMetadata.parametersTypeInfo[index] : null;\r\n let controlInfo: ParameterFormControlInfo = this[parameterTypeToSetup.setupMethodName](parameterName, additionalTypeInfo);\r\n this.parametersControlInfo.push(controlInfo);\r\n }\r\n }\r\n }\r\n\r\n // Note: the following two methods are called indirectly, by method name passed as a variable, so they look to be unused.\r\n //\r\n // Please do not comment out or remove the following two methods.\r\n private setupStringControl(parameterName: string, additionalTypeInfo: string = null): ParameterFormControlInfo {\r\n let parameterInfo: ParameterFormControlInfo = null;\r\n\r\n let controlProperties = { \r\n value: '',\r\n disabled: false\r\n };\r\n\r\n if (additionalTypeInfo != null) {\r\n // Lookup the enumeration.\r\n let enumMetadata: EnumMetadata = ComponentMethodsService.getEnumMetadata(additionalTypeInfo);\r\n\r\n if ((enumMetadata != null) && (enumMetadata.values != null)) {\r\n parameterInfo = new ParameterFormControlInfo(parameterName, ParameterFormControlTypeEnum.Select);\r\n parameterInfo.selectOptionValues = [];\r\n\r\n for (let index: number = 0; index < enumMetadata.values.length; index++) {\r\n let value: string = enumMetadata.values[index];\r\n let displayName: string = ((enumMetadata.prettyNames != null) && (enumMetadata.prettyNames.length > index) ? enumMetadata.prettyNames[index] : enumMetadata.values[index]);\r\n let selectOption: TextSelectOptionValue = new TextSelectOptionValue(value, displayName);\r\n\r\n parameterInfo.selectOptionValues.push(selectOption);\r\n }\r\n\r\n controlProperties.value = enumMetadata.values[0];\r\n parameterInfo.formControl = new UntypedFormControl(controlProperties);\r\n } else {\r\n parameterInfo = this.setupTextControlWithDateTimeSuffixCheckbox(parameterName, controlProperties);\r\n }\r\n } else {\r\n parameterInfo = this.setupTextControlWithDateTimeSuffixCheckbox(parameterName, controlProperties);\r\n } \r\n\r\n return parameterInfo;\r\n }\r\n private setupNumericControl(parameterName: string, additionalTypeInfo: string = null): ParameterFormControlInfo {\r\n let parameterInfo = new ParameterFormControlInfo(parameterName, ParameterFormControlTypeEnum.NumericInput);\r\n return parameterInfo;\r\n }\r\n\r\n private setupTextControlWithDateTimeSuffixCheckbox(parameterName: string, controlProperties: any): ParameterFormControlInfo {\r\n let parameterInfo: ParameterFormControlInfo = new ParameterFormControlInfo(parameterName, ParameterFormControlTypeEnum.TextInput);\r\n parameterInfo.formControl = new UntypedFormControl(controlProperties);\r\n\r\n parameterInfo.hasDateTimeSuffixFormControl = new UntypedFormControl({ value: false, disabled: false});\r\n\r\n return parameterInfo;\r\n }\r\n private prepareResultValues(): void {\r\n for (let index: number = 0; index < this.parametersControlInfo.length; index++) {\r\n let parameterControlInfo: ParameterFormControlInfo = this.parametersControlInfo[index];\r\n parameterControlInfo.enteredValue = parameterControlInfo.formControl.value;\r\n }\r\n }\n}\n","

\r\n {{this.title}}\r\n

\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{parameterControlInfo.parameterName}}\r\n \r\n \r\n\r\n \r\n \r\n Add Date/Time Suffix\r\n \r\n \r\n \r\n\r\n \r\n \r\n {{parameterControlInfo.parameterName}}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {{parameterControlInfo.parameterName}}\r\n \r\n \r\n {{selectOption.displayName}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n","import { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\r\n\r\nimport { ElementTypeMetadata } from './element-type-metadata.model';\r\nimport { HtmlPropertyValue } from './html-property-value.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\n//import { HtmlElementTypeService } from '../../services/html-element-type.service';\r\nimport { ComponentMethodMetadata } from './component-methods-metadata.model';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { EditInputParametersDialog, EditInputParametersDialogManager, ParameterFormControlInfo } from '../../dialogs/edit-input-parameters/edit-input-parameters.dialog';\r\n//import { AdditionalElementInfo } from './additional-element-info.model';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\n\r\n// Note: class methods are not HTML element types but they are scriptable,\r\n// so we are going to treat them like HTML element types. We\r\n// should probably change the naming convention to refer to\r\n// scriptable element types rather than HTML element types.\r\nexport class ComponentMethodElementTypeMetadata extends ElementTypeMetadata {\r\n public constructor(private dialog: MatDialog) {\r\n super(HtmlElementTypeNames.componentMethods_metadataKey, HtmlElementTypeNames.componentMethods_metadataKey, ElementCountExpected.None);\r\n\r\n this.prettyElementTypeTitle = 'Actions';//' with Inputs';\r\n }\r\n\r\n public getTitle = (driver: IBrowserDriver, element: object): string => {\r\n let methodMetadata: ComponentMethodMetadata = element;\r\n return methodMetadata.userFriendlyName != null ? methodMetadata.userFriendlyName : methodMetadata.methodName;\r\n }\r\n\r\n public hasActions = (driver: IBrowserDriver, element: object): boolean => {\r\n return true;\r\n }\r\n public getActions = (driver: IBrowserDriver, element: object): string[] => {\r\n let methodMetadata: ComponentMethodMetadata = element;\r\n return methodMetadata.userFriendlyName != null ? [methodMetadata.userFriendlyName] : [methodMetadata.methodName];\r\n }\r\n\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n let methodMetadata: ComponentMethodMetadata = element;\r\n if ((methodMetadata.argumentTypeNames == null) || (methodMetadata.argumentTypeNames.length == 0)) {\r\n //recorderService.callMethod(htmlElementInfo.elementTitle, methodMetadata, null);\r\n //recorderService.callMethod(component, methodMetadata.methodName, []);\r\n recorderService.callMethod(methodMetadata.methodName, []);\r\n\r\n component[methodMetadata.methodName]();\r\n } else {\r\n // Open an EditInputParametersComponent dialogue.\r\n let dialogManager: EditInputParametersDialogManager = new EditInputParametersDialogManager(this.dialog, methodMetadata);\r\n const dialogRef: MatDialogRef = dialogManager.openDialog();\r\n dialogRef.afterClosed().subscribe(parameterValueInfo => {\r\n if (parameterValueInfo != null) {\r\n let parameters: any[] = this.prepareArrayOfCallParams(parameterValueInfo, 5);\r\n\r\n let paramsAsStrings: string[] = [];\r\n for (let index: number = 0; index < parameters.length; index++) {\r\n let paramAsString: string = parameters[index] != null ? parameters[index].toString() : null;\r\n if (paramAsString != null)\r\n paramsAsStrings.push(paramAsString);\r\n else\r\n break;\r\n }\r\n //recorderService.callMethod(htmlElementInfo.elementTitle, methodMetadata, paramsAsStrings);\r\n //recorderService.callMethod(component, methodMetadata.methodName, paramsAsStrings);\r\n recorderService.callMethod(methodMetadata.methodName, paramsAsStrings);\r\n\r\n component[methodMetadata.methodName](parameters[0], parameters[1], parameters[2], parameters[3], parameters[4]);\r\n }\r\n });\r\n }\r\n }\r\n /*\r\n public recordActionClick(recorderService: ITestActionRecorderService, htmlElementInfo: HtmlElementInfo): void {\r\n //recorderService.elementActionClicked(htmlElementInfo.elementTitle);\r\n let methodMetadata: ComponentMethodMetadata = htmlElementInfo.element;\r\n recorderService.callMethod(htmlElementInfo.elementTitle, methodMetadata, null);\r\n }\r\n */\r\n\r\n public hasMethods(driver: IBrowserDriver, element: object): boolean {\r\n return true;\r\n }\r\n public getMethods(driver: IBrowserDriver, element: object): ComponentMethodMetadata[] {\r\n // TO DO: CODE THIS METHOD.\r\n\r\n return [];\r\n }\r\n\r\n public hasProperties = (driver: IBrowserDriver, element: object): boolean => {\r\n let methodMetadata: ComponentMethodMetadata = element;\r\n let hasProperties: boolean = (methodMetadata.argumentTypeNames != null) && (methodMetadata.argumentTypeNames.length > 0);\r\n return hasProperties;\r\n }\r\n public getProperties = (driver: IBrowserDriver, element: object): HtmlPropertyValue[] => {\r\n let properties: HtmlPropertyValue[] = [];\r\n\r\n let methodMetadata: ComponentMethodMetadata = element;\r\n for (let index: number = 0; index < methodMetadata.argumentTypeNames.length; index++) {\r\n let propertyValue: HtmlPropertyValue = new HtmlPropertyValue('paramType', methodMetadata.argumentTypeNames[index]);\r\n properties.push(propertyValue);\r\n }\r\n\r\n return properties;\r\n }\r\n\r\n private prepareArrayOfCallParams(parameterValues: ParameterFormControlInfo[], expectedArraySize: number): any[] {\r\n let parameters: any[] = [];\r\n\r\n let index: number = 0;\r\n for (; index < parameterValues.length; index++) {\r\n let value: any = parameterValues[index].enteredValue;\r\n parameters.push(value);\r\n }\r\n if (index < expectedArraySize) {\r\n for (; index < expectedArraySize; index++) {\r\n //parameters.push('');\r\n parameters.push(null);\r\n } \r\n }\r\n\r\n return parameters;\r\n }\r\n}\r\n","import { ElementRef } from '@angular/core';\r\nimport { MatCheckbox } from '@angular/material/checkbox';\r\n\r\nimport { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\n//import { HtmlPropertyValue } from './html-property-value.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo } from './additional-element-info.model';\r\nimport { ITestableComponent } from '../../interfaces/itestable-component.interface';\r\nimport { ScriptableBaseComponent } from '../../components/scriptable-base/scriptable-base.component';\r\nimport { ITestActionRecorderService } from '../../interfaces/itest-action-recorder-service.interface';\r\nimport { HtmlElementInfo } from './html-element-info.model';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\nexport class MatCheckBoxElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n //super('input.mat-checkbox-input', HtmlElementTypeNames.checkBox_metadataKey, ElementCountExpected.Singular);\r\n super('mat-checkbox', HtmlElementTypeNames.matCheckBox_metadataKey, ElementCountExpected.Singular);\r\n }\r\n\r\n // Override metadata methods.\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = driver.getTextFor(element);\r\n title = title.trim();\r\n return title;\r\n }\r\n\r\n //public click(driver: IBrowserDriver, component: ITestableComponent, element: object): void {\r\n public click(driver: IBrowserDriver, recorderService: ITestActionRecorderService, component: ITestableComponent, htmlElementInfo: HtmlElementInfo, element: object, getClickableElementFunction: (element: object) => object): void {\r\n let input = $(element).find('input');\r\n input.prop('checked', true);\r\n let value = input.prop('checked');\r\n $(element).trigger('input');\r\n\r\n if (component != null) {\r\n let baseComponent: ScriptableBaseComponent = component; // Need to use the interface instead!!!\r\n\r\n if ((baseComponent.matCheckboxes != null) && (baseComponent.matCheckboxElementRefs != null) && (baseComponent.matCheckboxes.length == baseComponent.matCheckboxElementRefs.length)) {\r\n let matCheckboxesArray: MatCheckbox[] = baseComponent.matCheckboxes.toArray();\r\n let matCheckboxElementRefsArray: ElementRef[] = baseComponent.matCheckboxElementRefs.toArray();\r\n\r\n for (let index: number = 0; index < matCheckboxesArray.length; index++) {\r\n let matCheckbox: MatCheckbox = matCheckboxesArray[index];\r\n let matInputElementRef: ElementRef = matCheckboxElementRefsArray[index];\r\n\r\n if (element == matInputElementRef.nativeElement) {\r\n //matInput.ngControl.control.setValue(value);\r\n //driver.sendKeysTo(element, matCheckbox, value);\r\n //matCheckbox.checked = !matCheckbox.checked;\r\n matCheckbox.toggle();\r\n matCheckbox.change.emit();\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { ClickableElementTypeMetadata } from './clickable-element-type-metadata.model';\r\nimport { ElementCountExpected } from './element-count-expected.enum';\r\nimport { IBrowserDriver } from '../../interfaces/ibrowser-driver.interface';\r\nimport { HtmlElementTypeNames } from './html-element-type-names.model';\r\nimport { AdditionalElementInfo, IAdditionalElementInfo } from './additional-element-info.model';\r\n\r\nexport class MatSelectElementTypeMetadata extends ClickableElementTypeMetadata {\r\n public constructor() {\r\n super('mat-select', HtmlElementTypeNames.matSelect_metadataKey, ElementCountExpected.Singular);\r\n this.prettyElementTypeTitle = 'Material Select';\r\n }\r\n\r\n public getTitle = (driver: IBrowserDriver, element: object, additionalElementInfo: AdditionalElementInfo = null): string => {\r\n let title: string = additionalElementInfo != null ? driver.getTextFor(element, additionalElementInfo.innerTextSelector) : driver.getTextFor(element);\r\n if ((additionalElementInfo != null) && (additionalElementInfo.customGetTextForFunction != null))\r\n title = additionalElementInfo.customGetTextForFunction(driver, element, title, additionalElementInfo);\r\n return title;\r\n }\r\n}\r\n","import { Injectable, ElementRef } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog } from '@angular/material/dialog';\r\n\r\n//declare let $: any; // jQuery\r\n\r\nimport { ElementTypeMetadata } from '../models/component-scripting/element-type-metadata.model';\r\nimport { LinksElementTypeMetadata } from '../models/component-scripting/links-element-type-metadata.model';\r\nimport { ButtonsElementTypeMetadata, ButtonsWithMatIconsElementTypeMetadata } from '../models/component-scripting/buttons-element-type-metadata.model';\r\nimport { MatListItemsElementTypeMetadata } from '../models/component-scripting/matlistitems-element-type-metadata.model';\r\nimport { MatIconsElementTypeMetadata } from '../models/component-scripting/maticons-element-type-metadata.model';\r\nimport { InputElementTypeMetadata, InputsElementTypeMetadata } from '../models/component-scripting/input-element-type-metadata.model';\r\nimport { ComponentMethodElementTypeMetadata } from '../models/component-scripting/comp-method-element-type-metadata.model';\r\nimport { MatCheckBoxElementTypeMetadata } from '../models/component-scripting/matcheckbox-element-type-metadata.model';\r\nimport { MatSelectElementTypeMetadata } from '../models/component-scripting/matselect-element-type-metadata.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HtmlElementTypeService {\r\n // Static data.\r\n private readonly elementTypeMetadata: ElementTypeMetadata[] =\r\n [\r\n new LinksElementTypeMetadata(),\r\n new ButtonsElementTypeMetadata(),\r\n new ButtonsWithMatIconsElementTypeMetadata(),\r\n new MatListItemsElementTypeMetadata(),\r\n new MatIconsElementTypeMetadata(),\r\n new InputElementTypeMetadata(),\r\n new InputsElementTypeMetadata(),\r\n new MatCheckBoxElementTypeMetadata(),\r\n new MatSelectElementTypeMetadata(),\r\n\r\n new ComponentMethodElementTypeMetadata(this.dialog) // Treating class methods like HTML element types.\r\n ];\r\n\r\n // Constructor.\r\n public constructor(private dialog: MatDialog) { }\r\n\r\n // Service methods.\r\n public getElementTypeMetadata(): ElementTypeMetadata[] {\r\n return this.elementTypeMetadata;\r\n }\r\n public getMetadataForElementType(elementType: string, throwExceptionOnError: boolean = true): ElementTypeMetadata {\r\n let metadata: ElementTypeMetadata = this.elementTypeMetadata.find(md => md.metadataKey == elementType);\r\n if ((metadata == null) && throwExceptionOnError)\r\n throw `getMetadataForElementType(): cannot find metadata for element type '${elementType}'.`;\r\n return metadata;\r\n }\r\n}\r\n","\r\nexport class ExcelPasteData {\r\n public constructor(public pasteData: string) {\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\nimport { ExcelPasteData } from '../models/grid/excel-paste-data.model';\r\n\r\n@Injectable()\r\nexport class ImportDataService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'importData', FormInstance)\r\n }\r\n\r\n // Service methods.\r\n public importFormInstanceFiles(formInstanceDataFiles: File[], folderId: number): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/importSimplifiedFormInstanceFilesInto/${folderId}`\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = this.packageDataFiles(formInstanceDataFiles);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Implement service methods that could well be phased out.\r\n public importFormInstances(formInstanceDataZipFile: File, xmlFileFormat: XmlFileFormatEnum, folderId: number, optionalFormId: number = 0): Promise {\r\n // Determine the target URL.\r\n let url: string = null;\r\n\r\n if (optionalFormId > 0) {\r\n url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/importFormInstancesInto/${folderId}/usingForm/${optionalFormId}` :\r\n `${this.url}/${this.endpoint}/importSimplifiedFormInstancesInto/${folderId}/usingForm/${optionalFormId}`);\r\n } else {\r\n url = (xmlFileFormat == XmlFileFormatEnum.VERBOSE_FORMAT ?\r\n `${this.url}/${this.endpoint}/importFormInstancesInto/${folderId}` :\r\n `${this.url}/${this.endpoint}/importSimplifiedFormInstancesInto/${folderId}`);\r\n }\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = new FormData();\r\n formData.append('file', formInstanceDataZipFile, formInstanceDataZipFile.name);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public importExcelFileIntoGrid(excelFile: File, gridFormInstanceElementId: number, truncateExistingGridRows: boolean = false): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/importExcelFileIntoGrid/${gridFormInstanceElementId}/${truncateExistingGridRows}`;\r\n\r\n const formData: FormData = new FormData();\r\n formData.append('file', excelFile, excelFile.name);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public importExcelPasteDataIntoGrid(pasteData: string, gridFormInstanceElementId: number, truncateExistingGridRows: boolean = false): Promise {\r\n let url: string = `${this.url}/${this.endpoint}/importExcelPasteDataIntoGrid/${gridFormInstanceElementId}/${truncateExistingGridRows}`;\r\n\r\n let pasteDataObject: ExcelPasteData = new ExcelPasteData(pasteData);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, pasteDataObject, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, pasteDataObject)\r\n .toPromise()\r\n .then(res => {\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n var obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n\r\n private packageDataFiles(dataFiles: File[]): FormData {\r\n const formData: FormData = new FormData();\r\n for (var iFile: number = 0; iFile < dataFiles.length; iFile++) {\r\n let dataFile: File = dataFiles[iFile];\r\n formData.append('file', dataFile, dataFile.name);\r\n }\r\n\r\n return (formData);\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Form } from '../models/form-builder/form.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { XmlFileFormatEnum } from '../enums/xml-file-format.enum';\r\n\r\n@Injectable()\r\nexport class ImportMetadataService extends CollectApiServiceBase
{\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'importMetadata', Form)\r\n }\r\n\r\n // Service methods.\r\n public importFormDefinitions(formDefinitionFiles: File[],\r\n targetDataCollectionId: number,\r\n xmlFileFormat: XmlFileFormatEnum) {\r\n let url: string = `${this.url}/${this.endpoint}/importFormDefinitionsInto/${targetDataCollectionId}`;\r\n\r\n // Package file data and create an HTTP POST request.\r\n const formData: FormData = this.packageDataFiles(formDefinitionFiles);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(res => {\r\n //msg = progressConfig.msgOnComplete || this.progressMsg('Updated');\r\n //this.updateProgress(100, 100, msg);\r\n\r\n return this.formatAsyncJobResponse(res);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // Helper methods.\r\n private formatAsyncJobResponse(data: AsyncJob): AsyncJob {\r\n var obj = plainToClass(AsyncJob, data);\r\n\r\n return (obj);\r\n }\r\n\r\n private packageDataFiles(dataFiles: File[]): FormData {\r\n const formData: FormData = new FormData();\r\n for (var iFile: number = 0; iFile < dataFiles.length; iFile++) {\r\n let dataFile: File = dataFiles[iFile];\r\n formData.append('file', dataFile, dataFile.name);\r\n }\r\n\r\n return (formData);\r\n }\r\n}\r\n","import { IViewModel } from \"../../interfaces/view-model.interface\";\r\n\r\nexport class InlineContent implements IViewModel {\r\n public id = 0;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { InlineContent } from '../models/site-content/inline-content.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { FormInstance } from '../models/site-content/form-instance.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class InlineContentService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'inlinecontent', InlineContent)\r\n }\r\n\r\n public getContent(formInstanceId: number, formFieldId: number): Promise {\r\n const options = {\r\n responseType: 'text' as const,\r\n };\r\n let url = `${this.url}/${this.endpoint}/getContent/${formInstanceId}/${formFieldId}`;\r\n return this.http.get(url, options)\r\n .toPromise()\r\n .then(content => {\r\n return content.replace('Downloaded Account', '');\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n\r\n public getUrl(formInstance: FormInstance, formFieldId: number): Promise {\r\n const options = {\r\n responseType: 'text' as const,\r\n };\r\n\r\n let url = `${this.url}/${this.endpoint}/getUrl/${formInstance.id}/${formFieldId}`;\r\n return this.http.post(url, formInstance, options)\r\n .toPromise()\r\n .then(url => {\r\n return url;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public OLD_getUrl(formInstanceId: number, formFieldId: number): Promise {\r\n const options = {\r\n responseType: 'text' as const,\r\n };\r\n \r\n let url = `${this.url}/${this.endpoint}/getUrl/${formInstanceId}/${formFieldId}`;\r\n return this.http.get(url, options)\r\n .toPromise()\r\n .then(url => {\r\n return url;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n // THIS IS TEMPORARY JUST FOR DEVELOMENT - THROW IT AWAY\r\n public getUrlFromGridRow(formInstanceId: number, formFieldId: number): Promise {\r\n const options = {\r\n responseType: 'text' as const,\r\n };\r\n let url = `${this.url}/${this.endpoint}/getUrlFromGridRow/${formInstanceId}/${formFieldId}`;\r\n return this.http.get(url, options)\r\n .toPromise()\r\n .then(url => {\r\n return url;\r\n })\r\n .catch(this.handleError);\r\n }\r\n}\r\n","import { Injectable, ElementRef } from '@angular/core';\r\nimport { MatInput } from '@angular/material/input';\r\n\r\nimport { IBrowserDriver } from '../interfaces/ibrowser-driver.interface';\r\nimport { ITestableComponent } from '../interfaces/itestable-component.interface';\r\n\r\ndeclare let $: any; // jQuery\r\n//require('jquery-sendkeys');\r\n\r\nclass CharacterToAsciiCode {\r\n private static numericBaseCode: number = 48;\r\n private static alphaBaseCode: number = 65;\r\n private static spaceCode: number = 32;\r\n\r\n private static numbericCharacters: string = '0123456789';\r\n private static alphaCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\r\n public static charToAsciiCode(char: string): number {\r\n let asciiCode: number = -1;\r\n\r\n if (CharacterToAsciiCode.alphaCharacters.indexOf(char) >= 0) {\r\n asciiCode = CharacterToAsciiCode.alphaBaseCode + CharacterToAsciiCode.alphaCharacters.indexOf(char);\r\n } else if (CharacterToAsciiCode.numbericCharacters.indexOf(char) >= 0) {\r\n asciiCode = CharacterToAsciiCode.numericBaseCode + CharacterToAsciiCode.numbericCharacters.indexOf(char)\r\n } else if (char == ' ') {\r\n asciiCode = CharacterToAsciiCode.spaceCode;\r\n } else {\r\n // TO DO: CODE THIS METHOD.\r\n }\r\n\r\n return asciiCode;\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class JQueryBrowserDriverService implements IBrowserDriver {\r\n // Properties.\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Service methods.\r\n // Find elements.\r\n public findElementsIn(containingElementSelector: string, elementsToFindSelector: string): object {\r\n try {\r\n let elementsToFind: object = $(containingElementSelector).find(elementsToFindSelector);\r\n return elementsToFind;\r\n } catch (error) {\r\n //console.log(error);\r\n return null;\r\n } \r\n }\r\n\r\n public findElementIn(element: object, elementToFindSelector: string): object {\r\n let elementsToFind: object = $(element).find(elementToFindSelector);\r\n let elementToFind: object = (elementsToFind['length'] != null) && (elementsToFind['length'] > 0) ? elementsToFind[0] : null;\r\n return elementToFind;\r\n }\r\n\r\n // Methods used for multiple types of elements.\r\n public getTextFor(element: object, optionalTextElementSelector: string = null): string {\r\n let text: string = optionalTextElementSelector != null ? $(element).find(optionalTextElementSelector).text() : $(element).text();\r\n return text;\r\n }\r\n public getValueFor(element: object): string {\r\n let value: string = $(element).val();\r\n return value;\r\n }\r\n public getAttributeValueFor(element: object, attributeName: string): string {\r\n let value: string = $(element).attr(attributeName);\r\n return value;\r\n }\r\n\r\n // Method(s) used for tags/links.\r\n public clickLink(component: ITestableComponent, element: object): void {\r\n $(element).get(0).click();\r\n }\r\n\r\n // Methods for button input controls.\r\n public getButtonTitle(element: object): string {\r\n let title: string = $(element).text();\r\n\r\n if ((title == null) || (title.trim() == '')) {\r\n let scriptName: string = $(element).data('scriptname');\r\n if (scriptName != null)\r\n title = scriptName;\r\n }\r\n\r\n return title;\r\n }\r\n public clickButton(component: ITestableComponent, element: object): void {\r\n $(element).click();\r\n }\r\n public doubleClickButton(component: ITestableComponent, element: object): void {\r\n $(element).dblclick();\r\n }\r\n\r\n // Method(s) for elements.\r\n public getMatIconTitle(element: object): string {\r\n let title: string = $(element).text();\r\n\r\n if ((title == null) || (title.trim() == '')) {\r\n //let scriptName: string = $(element).data('scriptname');\r\n let scriptName: string = $(element).data('matIconName');\r\n if (scriptName != null)\r\n title = scriptName;\r\n }\r\n\r\n return title;\r\n }\r\n\r\n // Methods used for text input controls.\r\n public getInputTitle(element: object): string {\r\n let title: string = $(element).attr('id');\r\n\r\n let scriptName: string = $(element).data('scriptname');\r\n if (scriptName != null)\r\n title = scriptName;\r\n else {\r\n scriptName = $(element).attr('name');\r\n if (scriptName != null)\r\n title = scriptName;\r\n }\r\n\r\n return title;\r\n }\r\n\r\n public sendKeysTo(element: object, matInput: MatInput, value: string): void {\r\n //$(element).sendkeys(value);\r\n\r\n matInput.ngControl.control.setValue(value);\r\n\r\n // TO DO: TEST, RECODE THIS METHOD.\r\n if (value != null) {\r\n for (let index: number = 0; index < value.length; index++) {\r\n let char = value.charAt(index);\r\n let charCode: number = CharacterToAsciiCode.charToAsciiCode(char);\r\n $(element).trigger({ type: 'keypress', which: charCode, keyCode: charCode });\r\n }\r\n } else {\r\n let charCode: number = CharacterToAsciiCode.charToAsciiCode(' ');\r\n $(element).trigger({ type: 'keypress', which: charCode, keyCode: charCode });\r\n }\r\n $(element).val(value).trigger('input');\r\n $(element).val(value).triggerHandler('change');\r\n //angular.trigger\r\n }\r\n\r\n // Methods for managing data attributes.\r\n public setDataAttributeValue(element: object, key: string, value: string) {\r\n $(element).data(key, value);\r\n }\r\n public getDataAttributeValue(element: object, key: string) {\r\n let value: string = $(element).data(key);\r\n return value;\r\n }\r\n\r\n public getAncestor(element: object, numLevelsUp: number): object {\r\n let ancestor: object = element;\r\n\r\n let index: number = 0;\r\n for (; index < numLevelsUp; index++) {\r\n ancestor = $(ancestor).parent();\r\n if (ancestor == null)\r\n break;\r\n }\r\n\r\n if (index < numLevelsUp)\r\n ancestor = null;\r\n\r\n return ancestor;\r\n }\r\n public getParent(element: object): object {\r\n return this.getAncestor(element, 1);\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\n\n@Injectable()\nexport class KeepAliveService {\n private url;\n\n constructor(private http: HttpClient) {\n // doesn't matter what this is so long as it's lightweight\r\n let apiUrl = environment.apiUrl.endsWith('/') ? environment.apiUrl.slice(0, -1) : environment.apiUrl; // remove trailing slash if present\n this.url = `${apiUrl}/frameworkapi/BuildInfo/BuildInfo?ForKeepAlive=true`;\r\n console.log(apiUrl);\n }\n\n public pingTheBackend(): void {\n this.http.get(this.url).subscribe(o => {});\r\n }\n\r\n}\n","import { State } from \"@progress/kendo-data-query\";\r\nimport { GridFlavorEnum, GridFlavorModifiersEnum } from '../../enums/grid.enums';\r\nexport class GridParams {\r\n public kendoGridState: State;\r\n public gridFlavor: GridFlavorEnum;\r\n public gridFlavorModifier: GridFlavorModifiersEnum;\r\n\r\n constructor(kendoGridState: State, gridFlavor: GridFlavorEnum, gridFlavorModifier: GridFlavorModifiersEnum) {\r\n this.kendoGridState = kendoGridState;\r\n this.gridFlavor = gridFlavor;\r\n this.gridFlavorModifier = gridFlavorModifier;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { ColumnComponent, GridDataResult } from '@progress/kendo-angular-grid';\r\nimport { State, toODataString } from \"@progress/kendo-data-query\";\r\nimport { plainToClass } from 'class-transformer';\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map, tap } from \"rxjs/operators\";\r\nimport { environment } from '../../../environments/environment';\r\nimport { FormFieldProcessingPhaseEnum } from '../enums/form-field-processing-phase.enum';\r\nimport { GridFlavorEnum } from '../enums/grid.enums';\r\nimport { IGridRow } from '../interfaces/grid-row.interface';\r\nimport { IFieldDefinitionLogic } from '../interfaces/ifield-definition-logic.interface';\r\nimport { FieldDefinition } from '../models/form-builder/field-definition.model';\r\nimport { FormField } from '../models/form-builder/form-field.model';\r\nimport { FormInstanceElement } from '../models/form-builder/form-instance-element.model';\r\nimport { GridRowViewModel } from '../models/form-builder/grid-row.model';\r\nimport { GridConfig } from '../models/grid/grid-config.model';\r\nimport { GridAllModesDataSource } from '../models/grid/grid-data-source.model';\r\nimport { GridFormInstanceElementWrapper } from '../models/grid/grid-form-instance-element-wrapper.model';\r\nimport { IGetCellDisplayValue } from '../models/grid/grid-interfaces';\r\nimport { GridRowDef } from '../models/grid/grid-row.model';\r\nimport { GridParams } from '../models/grid/grid-params.model';\r\nimport { FieldDefinitionService } from './field-definition.service';\r\nimport { FlexibleSelectionFieldService } from './flexible-selection-field.service';\r\nimport { PickerItem } from '../models/picker-item.model';\r\nimport { ContactInfo } from '../models/contacts/contacts-form-field.model';\r\nimport { FieldIdToSelectedValues } from '../models/flexible-selection-fields/flexible-selection-field-instructions-request.model';\r\n\r\nexport const KENDO_DATA_GRID_ROW_KEY: string = '__gridRow';\r\nexport const GRID_COLUMN_ID_KEY: string = 'gridColumnId';\r\n\r\n/*\r\n ============================================ IMPORTANT NOTE: ============================================ \r\n This service propagates changes made in the UI to a user's _pending_ grid data on the server\r\n It does _not_ make changes to the saved, \"live\" data -- that is done when a FormInstance is saved, same as it has always been done \r\n*/\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class KendoGridService extends BehaviorSubject{\r\n // Properties.\r\n private url = environment.apiUrl;\r\n private endpoint: string = 'api/kendoGrid';\r\n private dataResult: GridDataResult;\r\n\r\n private loading = false;\r\n public get Loading() {\r\n return this.loading;\r\n }\r\n\r\n public constructor(private http: HttpClient, private fieldDefinitionService: FieldDefinitionService, private flexibleSelectionFieldService: FlexibleSelectionFieldService) {\r\n super({ data: [], total: 0 })\r\n }\r\n\r\n public read(gridConfig: GridConfig, fieldDefinitionService: FieldDefinitionService, getCellDisplayValue: IGetCellDisplayValue, formInstanceElementId: number, gridState: State): void {\r\n this.loading = true;\r\n this.fetch(\"Get\", gridConfig, fieldDefinitionService, getCellDisplayValue, formInstanceElementId, gridState)\r\n .pipe(\r\n tap((data) => {\r\n this.dataResult = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n // PJH - added for VNEXT-1371 to allow the \"Import Excel Data into Grid\" dialog to get the pending edits it just created\r\n public readPending(gridConfig: GridConfig, fieldDefinitionService: FieldDefinitionService, getCellDisplayValue: IGetCellDisplayValue, formInstanceElementId: number, gridState: State): void {\r\n this.loading = true;\r\n this.fetch(\"GetPending\", gridConfig, fieldDefinitionService, getCellDisplayValue, formInstanceElementId, gridState)\r\n .pipe(\r\n tap((data) => {\r\n this.dataResult = data;\r\n this.loading = false;\r\n })\r\n )\r\n .subscribe((data) => {\r\n super.next(data);\r\n });\r\n }\r\n\r\n public addContactAsGridRow(formInstanceElementId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n user: ContactInfo) {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/createContactAsGridRow/${formInstanceElementId}`;\r\n\r\n return this.http.post(url, user).toPromise().then(x => {});\r\n }\r\n\r\n // TODO: Use a param object rather than all these params...\r\n public addOrUpdateRow(\r\n formInstanceElementId: number,\r\n formInstanceId: number,\r\n formFieldId: number,\r\n selectedGridRow: GridRowDef,\r\n valuesToFieldIds: FieldIdToSelectedValues,\r\n rowIndex: number,\r\n cols: any,\r\n dataItem: any,\r\n isNew: boolean,\r\n gridConfig: GridConfig,\r\n getCellDisplayValue: IGetCellDisplayValue,\r\n currentRowCount: number = 0)\r\n {\r\n let gridRowViewModel = this.BuildGridRowViewModel(formInstanceId, formInstanceElementId, formFieldId, selectedGridRow, rowIndex, cols, currentRowCount);\r\n return this.flexibleSelectionFieldService.validateGridRow(gridRowViewModel, valuesToFieldIds).then(validationFailures => {\r\n if (validationFailures.length > 0) {\r\n let msg = validationFailures.map(x => x.validationFailureMessage).join(\", \");\r\n alert(msg);\r\n } else {\r\n if (isNew || selectedGridRow.DatabaseId == 0) {\r\n return this.addRow(gridRowViewModel, gridConfig, getCellDisplayValue);\r\n } else {\r\n return this.updateRow(gridRowViewModel, selectedGridRow, dataItem);\r\n }\r\n }\r\n });\r\n \r\n }\r\n /**\r\n * Submits a server request to remove a row from a grid.\r\n * @param gridRowDatabaseId - The id for the target row to be removed\r\n * @param gridFlavor - The type of grid being used\r\n */\r\n public removeRow(gridRowDatabaseId: number, gridFlavor: GridFlavorEnum) {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${gridRowDatabaseId}/${gridFlavor}`;\r\n\r\n const findIndex = (dataItem) => { return dataItem.__gridRow.databaseId === gridRowDatabaseId };\r\n let indexToDelete = this.dataResult.data.findIndex(findIndex);\r\n\r\n return this.http.delete(url).toPromise().then(x => {\r\n this.dataResult.data.splice(indexToDelete, 1); // remove from the UI\r\n });\r\n }\r\n\r\n public addRow(gridRow: GridRowViewModel, gridConfig: GridConfig, getCellDisplayValue: IGetCellDisplayValue) {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}`;\r\n if (!this.dataResult) this.reset();\r\n\r\n return this.http.post(url, gridRow).toPromise().then(x => {\r\n let wrappedGridRow: object = this.getWrappedGridRow(x, gridConfig, this.fieldDefinitionService, getCellDisplayValue, [x])\r\n this.dataResult.data.push(wrappedGridRow);\r\n super.next(this.dataResult);\r\n });\r\n\r\n }\r\n\r\n public updateRow(gridRow: GridRowViewModel, selectedGridRow: GridRowDef, dataItem: any) {\r\n if (dataItem) {\r\n let row = dataItem['__gridRow'];\r\n \r\n if (row) {\r\n let id = dataItem['__gridRow'].databaseId;\r\n gridRow.id = id;\r\n let col = 0;\r\n // update the dataItem which is the object Kendo Grid is using to display the row\r\n for (let prop in gridRow.cellDataHash) {\r\n dataItem[prop] = this.getElementValue(\r\n gridRow.cellDataHash[prop] as FormInstanceElement,\r\n selectedGridRow.GridConfig.ColumnDefs[col++],\r\n row,\r\n selectedGridRow.GridConfig.ColumnDefs\r\n );\r\n }\r\n\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${gridRow.id}`;\r\n return this.http.put(url, gridRow).toPromise().then(x => { });\r\n }\r\n }\r\n else {\r\n console.log(\"dataItem is null for updateRow in the kendo grid service\");\r\n }\r\n }\r\n\r\n public repositionRow(gridFlavor: GridFlavorEnum, formInstanceElementId: number, originalIndexOfMovedRow: number, movedRowId: number, originalIndexOfTargetRow: number, targetRowId: number, position: string) {\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${formInstanceElementId}/reorderRows`;\r\n let payload = {\r\n originalIndexOfMovedRow: originalIndexOfMovedRow,\r\n movedRowId: movedRowId,\r\n originalIndexOfTargetRow: originalIndexOfTargetRow,\r\n targetRowId: targetRowId,\r\n position: position,\r\n gridFlavor: gridFlavor\r\n }\r\n\r\n return this.http.post(url, payload).toPromise().then(x => {\r\n // now update the data for the UI\r\n let uiIndexOfMovedRow = this.dataResult.data.findIndex((dataItem) => { return dataItem.__gridRow.databaseId === movedRowId });\r\n let uiIndexOfTargetRow = this.dataResult.data.findIndex((dataItem) => { return dataItem.__gridRow.databaseId === targetRowId });\r\n\r\n let newIndex = uiIndexOfTargetRow;\r\n let direction = uiIndexOfMovedRow > uiIndexOfTargetRow ? \"up\" : \"down\";\r\n if (direction == \"down\" && position == \"before\") newIndex--;\r\n else if (direction == \"up\" && position == \"after\") newIndex++;\r\n\r\n this.reorderRowsInKendoGridData(uiIndexOfMovedRow, newIndex);\r\n\r\n super.next(this.dataResult);\r\n });\r\n }\r\n\r\n private reorderRowsInKendoGridData(uiIndexOfMovedRow: number, newIndex: number) {\r\n let movedRow = this.dataResult.data.splice(uiIndexOfMovedRow, 1)[0]; // first remove the moved Row\r\n let before = this.dataResult.data.slice(0, newIndex); // grab everything before its new location in the array\r\n let after = this.dataResult.data.slice(newIndex); // grab everything after its new location in the array\r\n\r\n this.dataResult.data = [\r\n ...before,\r\n movedRow,\r\n ...after\r\n ];\r\n }\r\n\r\n public resetItem(dataItem: object): void {\r\n if (!dataItem) {\r\n return;\r\n }\r\n\r\n // find orignal data item\r\n const originalDataItem = this.dataResult.data.find(\r\n (item) => item['id'] === dataItem['id']\r\n );\r\n\r\n // revert changes\r\n Object.assign(originalDataItem, dataItem);\r\n\r\n super.next(this.dataResult);\r\n }\r\n\r\n private getElementValue(el: FormInstanceElement, formField, gridRow: IGridRow, gridRowColumnDefs: FormField[]): any {\r\n let fieldDefClientLogic: IFieldDefinitionLogic = this.fieldDefinitionService.getFieldClientLogicHandler(formField.fieldDefinitionClassName);\r\n return fieldDefClientLogic.getDisplayValue(formField, el, gridRow, null, gridRowColumnDefs);\r\n }\r\n\r\n private BuildGridRowViewModel(formInstanceId: number, formInstanceElementId: number, formFieldId: number, selectedGridRow: GridRowDef, rowIndex: number, cols: ColumnComponent[], currentRowCount: number): GridRowViewModel {\r\n let gridRowViewModel = new GridRowViewModel();\r\n gridRowViewModel.formInstanceElementId = formInstanceElementId;\r\n gridRowViewModel.formInstanceId = formInstanceId;\r\n gridRowViewModel.formFieldId = formFieldId;\r\n gridRowViewModel.id = selectedGridRow.DatabaseId;\r\n gridRowViewModel.rowIndex = currentRowCount > 0 ? currentRowCount : rowIndex; // for VNEXT-1371, new rows need to set their rowIndex based on count of rows already in the grid\r\n gridRowViewModel.cellDataHash = {};\r\n gridRowViewModel.gridFlavor = selectedGridRow.GridFlavor;\r\n\r\n let columnHeaders = [];\r\n for (const col of cols) {\r\n if (col.field)\r\n columnHeaders.push(col.field);\r\n }\r\n let wrappers: GridFormInstanceElementWrapper[] = selectedGridRow.FormInstanceElementWrappers;\r\n for (let i = 0; i < wrappers.length; i++) {\r\n let wrapper = wrappers[i];\r\n let el = wrappers[i].formInstanceElement;\r\n gridRowViewModel.cellDataHash[wrapper.fieldName] = el;\r\n }\r\n return gridRowViewModel;\r\n }\r\n\r\n private reset() {\r\n this.dataResult = { data: [], total: 0 };\r\n }\r\n\r\n public get DataResult(): GridDataResult {\r\n return this.dataResult;\r\n }\r\n\r\n private fetch(\r\n method: string, // Get or GetPending -- this is the api endpoint method\r\n gridConfig: GridConfig,\r\n fieldDefinitionService: FieldDefinitionService,\r\n getCellDisplayValue: IGetCellDisplayValue,\r\n formInstanceElementId: number,\r\n gridState: State,\r\n action = \"\",\r\n data?: object[]): Observable\r\n {\r\n let qs = toODataString(gridState);\r\n qs = qs.replace(/\\$/g, '');\r\n let baseUrl = this.url.endsWith('/') ? this.url : `${this.url}/`;\r\n let url = `${baseUrl}${this.endpoint}/${method}/${formInstanceElementId}`;\r\n let paramObj = new GridParams(gridState, gridConfig.Flavor, gridConfig.FlavorModifier);\r\n\r\n return >this.http.post(url, paramObj)\r\n .pipe(\r\n map((res) => {\r\n let wrappedGridRows: object[] = [];\r\n if ((res != null) && (res.data.length > 0)) {\r\n for (let index: number = 0; index < res.data.length; index++) {\r\n let untypedViewModel: object = res.data[index];\r\n let wrappedGridRow: object = this.getWrappedGridRow(untypedViewModel, gridConfig, fieldDefinitionService, getCellDisplayValue, res.data);\r\n wrappedGridRows.push(wrappedGridRow);\r\n }\r\n }\r\n return {\r\n data: wrappedGridRows,\r\n total: res.total\r\n }\r\n })\r\n );\r\n }\r\n\r\n private getWrappedGridRow(untypedViewModel: object, gridConfig: GridConfig, fieldDefinitionService: FieldDefinitionService, getCellDisplayValue: IGetCellDisplayValue, res: object[]) {\r\n let typedViewModel: GridRowViewModel = plainToClass(GridRowViewModel, untypedViewModel);\r\n let gridRow: GridRowDef = this.unpackGridRowFromViewModel(gridConfig, fieldDefinitionService, getCellDisplayValue, typedViewModel, res.length);\r\n let wrappedGridRow: object = this.wrapGridRowAsObject(gridConfig, gridRow, fieldDefinitionService);\r\n return wrappedGridRow;\r\n }\r\n\r\n private serializeModels(data?: object[]): string {\r\n return data ? `&models=${JSON.stringify([data])}` : \"\";\r\n }\r\n\r\n private unpackGridRowFromViewModel(gridConfig: GridConfig, fieldDefinitionService: FieldDefinitionService, getCellDisplayValue: IGetCellDisplayValue, gridRowVM: GridRowViewModel, totalGridRows: number): GridRowDef {\r\n let gridRow: GridRowDef = GridAllModesDataSource.createGridRowFromGridViewModelObect(gridConfig, fieldDefinitionService, getCellDisplayValue, gridRowVM, 0, totalGridRows);\r\n\r\n return gridRow;\r\n }\r\n\r\n private wrapGridRowAsObject(gridConfig: GridConfig, gridRow: GridRowDef, fieldDefinitionService: FieldDefinitionService): object {\r\n let resultObject: object = {};\r\n\r\n resultObject[KENDO_DATA_GRID_ROW_KEY] = gridRow;\r\n\r\n let colDefs: FormField[] = gridConfig.ColumnDefs;\r\n for (let index: number = 0; index < colDefs.length; index++) {\r\n let colDef: FormField = colDefs[index];\r\n\r\n let cellValue: string = ''; // Default for now.\r\n let formInstanceElement: FormInstanceElement = gridRow.getFormInstanceElement(colDef);\r\n if (formInstanceElement != null) {\r\n let fieldDefinition: FieldDefinition = fieldDefinitionService.getFieldDefinition(colDef.fieldDefinitionClassName);\r\n let fieldLogic: IFieldDefinitionLogic = fieldDefinition.customLogicHandler;\r\n cellValue = fieldLogic.getDisplayValue(colDef, formInstanceElement, gridRow, FormFieldProcessingPhaseEnum.LOADING_DATA, colDefs);\r\n // EXPERIMENTAL\r\n //console.log('==== DONE WITH getDisplayValue()');\r\n //console.log(formInstanceElement);\r\n //if (colDef.fieldDefinitionClassName == FormulaFieldType) {\r\n // console.log(\" ==> SETTING formInstanceElement\");\r\n // formInstanceElement.valueType = FormInstanceElementValueTypeEnum.TypeDouble;\r\n // formInstanceElement.doubleValue = parseFloat(cellValue);\r\n // console.log(formInstanceElement);\r\n //}\r\n }\r\n let name = colDef.name;\r\n resultObject[name] = cellValue;\r\n }\r\n return resultObject;\r\n }\r\n}\r\n\r\n/*\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class KendoGridServiceV1 extends BehaviorSubject {\r\n // Properties.\r\n private endpoint: string = 'kendoGrid';\r\n private url = environment.apiUrl;\r\n\r\n constructor(private http: HttpClient, private progressIndicatorService: ProgressIndicatorService) {\r\n //super(http, progressIndicatorService, environment.apiUrl, 'formInstance', FormInstance)\r\n super(null);\r\n }\r\n\r\n \r\n public query(state: State, formInstanceElementId: number): Observable {\r\n let url = `${this.url}/${this.endpoint}/${formInstanceElementId}`;\r\n\r\n return >this.http.get(url).pipe(\r\n map(\r\n (response) => {\r\n let gridRows = response;\r\n\r\n return {\r\n data: gridRows,\r\n total: gridRows != null ? gridRows.length : 0\r\n }\r\n }\r\n ),\r\n tap(() => { })\r\n );\r\n } \r\n\r\n // Protected methods.\r\n public handleError(error: Response | any): Promise {\r\n Logging.log(error);\r\n if (this != null) {\r\n //this.hideProgressIndicator();\r\n }\r\n return Promise.reject(error.message || error);\r\n }\r\n\r\n}\r\n*/\r\n","//loader.service.ts\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LoaderService {\r\n\r\n public isLoading = new BehaviorSubject(false);\n public isPolling = new BehaviorSubject(false);\r\n constructor() { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\nimport { Logging } from '../logging';\r\nimport { PickerItem } from '../models/picker-item.model';\r\nimport { BehaviorSubject, EMPTY } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class MaxPickerService {\n public isSearching = new BehaviorSubject(false);\n \n constructor(private http: HttpClient) { }\n\n search(query: string, max: number = 100, scope: string = 'usersAndGroups'): Promise {\r\n if ((!query) || (query.length == 0)) { return EMPTY.toPromise(); }\r\n\n this.isSearching.next(true);\n\n var url = `${environment.apiUrl}/frameworkapi/maxpicker/search?searchstring=${query}&maxcount=${max}&scope=${scope}`;\n\n return this.http\r\n .get(url)\r\n .toPromise()\r\n .then(response => {\r\n var data: PickerItem[] = [];\n\n response.forEach(x => {\n data.push(new PickerItem(x));\n });\r\n this.isSearching.next(false);\r\n\r\n \r\n // Uncomment this to work around the picker server service not working on dev\r\n // this.addFakeUsers(data);\r\n\r\n return data;\r\n })\r\n .catch(this.handleError);\r\n }\n\n private addFakeUsers(data: PickerItem[]) {\r\n var pi = new PickerItem({\r\n key: 'O001154',\r\n displayName: 'P J. Harvey',\r\n secondaryDisplayName: 'pharvey@omb.eop.gov',\r\n isUser: true,\r\n isActive: true,\r\n fullDisplay: `P J. Harvey (OMB,Ctr) - pharvey@omb.eop.gov`,\r\n phone: '240-357-6564',\r\n phoneExt: '',\r\n agencyShortName: 'OMB'\r\n });\r\n\r\n data.push(pi);\r\n var pi2 = new PickerItem({\r\n key: 'O001154',\r\n displayName: 'John J. Jarvey',\r\n secondaryDisplayName: 'jjarvey@omb.eop.gov',\r\n isUser: true,\r\n isActive: true,\r\n fullDisplay: `J J. Jarvey (OMB,Ctr) - jjarvey@omb.eop.gov`,\r\n phone: '240-357-6564',\r\n phoneExt: '',\r\n agencyShortName: 'OMB'\r\n });\r\n data.push(pi2);\r\n\r\n var pi3 = new PickerItem({\r\n key: 'O001154',\r\n displayName: 'Kal J. Karvey',\r\n secondaryDisplayName: 'kkarvey@omb.eop.gov',\r\n isUser: true,\r\n isActive: true,\r\n fullDisplay: `K J. Karvey (OMB,Ctr) - kkarvey@omb.eop.gov`,\r\n phone: '240-357-6564',\r\n phoneExt: '',\r\n agencyShortName: 'OMB'\r\n });\r\n data.push(pi3);\r\n }\r\n\r\n handleError(error: Response | any): Promise {\r\n Logging.log(error);\r\n return Promise.reject(error.message || error);\r\n }\n}\n","import { Injectable } from '@angular/core';\n\r\n// This service contains the logic to handle use of the Go Back button.\r\n// Could have simply injected Location service and called its back() method, but that would not be specific to vNext, and would allow the Go Back\r\n// button to navigate a user out of the application, so this implements app-specific navigation.\r\n@Injectable({\n providedIn: 'root'\n})\nexport class NavigationService {\r\n private navigationHistoryStack: string[] = [];\r\n // we need to know if back button was clicked so that we don't go and add a page to the stack\r\n private backButtonWasClicked: boolean = false;\r\n\r\n public pushOnUrl(url: string) {\r\n //console.log('push ' + url);\r\n if (this.backButtonWasClicked) {\r\n //console.log(' previous nav was Go Back, so do not push this on');\r\n this.backButtonWasClicked = false; // reset it and do not push url onto the stack\r\n } else {\r\n //console.log(' previous nav was NOT Go Back, so push it on...')\r\n this.navigationHistoryStack.push(url);\r\n //console.log(this.navigationHistoryStack);\r\n }\r\n }\r\n\r\n public popOffPreviousUrl(): string {\r\n this.backButtonWasClicked = true;\r\n let url = this.navigationHistoryStack.pop();\r\n //console.log('popOffPreviousUrl');\r\n //console.log(this.navigationHistoryStack);\r\n\r\n return url;\r\n }\r\n}\r\n\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport class NotificationRecipient implements IViewModel {\r\n // Define primitive properties.\r\n // Key.\r\n public id: number = 0;\r\n\r\n public recipientType: string;\r\n public recipient: string;\r\n\r\n public recipientFirstName: string;\r\n public recipientLastName: string;\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\nimport { Type, plainToClass } from 'class-transformer';\r\n\r\nimport { NotificationRecipient } from './notification-recipient.model';\r\nimport { IListItem } from '../../interfaces/ilist-item.interface';\r\nimport { IconFormatEnum } from '../../enums/icon-format.enum';\r\nimport { ItemTypeEnum } from '../../enums/item-type.enum';\r\nimport { IListItemBase } from '../ilist-item-base.model';\r\n\r\nexport class NotificationInstance extends IListItemBase implements IViewModel, IListItem {\r\n // Define primitive properties.\r\n // Key.\r\n public id: number = 0;\r\n\r\n public notificationTemplateId: number;\r\n public notificationTemplateName: string;\r\n\r\n public notificationText: string;\r\n\r\n public notificationSentFlag: boolean;\r\n public notificationSentDate: Date;\r\n\r\n @Type(() => NotificationRecipient)\r\n public recipients: NotificationRecipient[];\r\n\r\n ///////////////////////////// IListItem Implementation ///////////////////////////////\r\n public setId(idParam: number): void {\r\n this.id = idParam;\r\n }\r\n public getExtraInfo(): string {\r\n return this.notificationText;\r\n }\r\n public getValue(property: string): string {\r\n return \"\";\r\n }\r\n public userCanDelete(): boolean {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getPosition(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public modifiedDate: Date;\r\n public modifiedBy: string;\r\n public getStatus(): string {\r\n return 'N/A';\r\n }\r\n public getIconType(): IconFormatEnum {\r\n return IconFormatEnum.MAT_ICON;\r\n }\r\n public getIcon(): string {\r\n return 'notifications';\r\n }\r\n public canBeDeleted(): boolean {\r\n throw new Error('Method not implemented.');\r\n }\r\n public update(obj: any, type: string, icon?: string, position?: number): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getUniqueId(): string {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getOriginalVersionId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public findAndUpdateFrom(items: any, obj: any): void {\r\n throw new Error('Method not implemented.');\r\n }\r\n public isMagicStructure(): boolean {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getChildCount(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n public getModifiedBy(): string {\r\n return this.modifiedBy;\r\n }\r\n public getModifiedDate(): Date {\r\n return this.modifiedDate;\r\n }\r\n public name: string;\r\n public getName(): string {\r\n return this.notificationText;\r\n }\r\n public getId(): number {\r\n return this.id;\r\n }\r\n public getType(): string {\r\n return ItemTypeEnum.NOTIFICATION;\r\n }\r\n public getParentId(): number {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { NotificationTemplate } from '../models/notifications/notification-template.model';\r\nimport { NotificationInstance } from '../models/notifications/notification-instance.model';\r\nimport { DataCollectionMilestone } from '../models/milestones/data-collection-milestone.model';\r\n\r\n@Injectable()\r\nexport class NotificationService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'notification', NotificationTemplate)\r\n }\r\n\r\n // Overrides.\r\n formatResponse(data: NotificationTemplate): NotificationTemplate {\r\n var obj = plainToClass(NotificationTemplate, data);\r\n\r\n return (obj);\r\n }\r\n\r\n // Service methods.\r\n public findAllForCategory(category: string): Promise {\r\n let url = `${this.url}/${this.endpoint}/findAllForCategory/${category}`;\r\n\r\n //this.updateProgress(50, 75, `Getting notification templates ...`);\r\n\r\n let observable: Observable = this.http.get(url);\r\n\r\n return observable.toPromise()\r\n .then(response => {\r\n let templates: NotificationTemplate[] = [];\r\n\r\n if (response != null) {\r\n for (let iTemplate: number = 0; iTemplate < response.length; iTemplate++) {\r\n let oTemplate = response[iTemplate];\r\n let template: NotificationTemplate = plainToClass(NotificationTemplate, oTemplate);\r\n\r\n templates.push(template);\r\n }\r\n }\r\n\r\n //this.updateProgress(100, 100, `Completed`);\r\n\r\n return (templates);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteMilestoneTemplatePreview(milestone: DataCollectionMilestone): Promise {\r\n let url = `${this.url}/${this.endpoint}/getSiteMilestoneTemplatePreview`;\r\n\r\n //this.updateProgress(50, 75, `Requestion notification preview ...`);\r\n\r\n //return this.http.get(url)\r\n return this.http.post(url, milestone)\r\n .toPromise()\r\n .then(response => {\r\n let notification: NotificationInstance = null;\r\n\r\n if (response != null) {\r\n notification = plainToClass(NotificationInstance, response);\r\n }\r\n\r\n //this.updateProgress(100, 100, `Completed`);\r\n\r\n return (notification);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getUserNotifications(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/getUserNotifications/${dataCollectionId}`;\r\n\r\n this.updateProgress(50, 75, `Getting notification templates ...`);\r\n\r\n let observable: Observable = this.http.get(url);\r\n\r\n return observable.toPromise()\r\n .then(response => {\r\n let notifications: NotificationInstance[] = [];\r\n\r\n if (response != null) {\r\n for (let iNotification: number = 0; iNotification < response.length; iNotification++) {\r\n let oNotification = response[iNotification];\r\n let notification: NotificationInstance = plainToClass(NotificationInstance, oNotification);\r\n\r\n notifications.push(notification);\r\n }\r\n }\r\n\r\n this.updateProgress(100, 100, `Completed`);\r\n\r\n return (notifications);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { plainToClass } from \"class-transformer\";\r\nimport { Observable, of } from 'rxjs';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { PermissionsPreview } from '../models/permissions-preview-models/permissions-preview.model';\r\nimport { PermissionsPreviewVirtualFolderHierarchyRequest } from '../models/permissions-preview-models/perPreVirtualFolderHierarchyRequest.model';\r\nimport { PermissionsPreviewAllVirtualFoldersHierarchyRequest } from '../models/permissions-preview-models/per-pre-all-virtual-folders-hierarchy-request.model';\r\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class PermissionsPreviewService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'permissionsPreview', PermissionsPreview)\r\n }\r\n\r\n public formatResponse(data: PermissionsPreview): PermissionsPreview {\r\n var obj = plainToClass(PermissionsPreview, data);\r\n\r\n return (obj);\r\n }\r\n\r\n public generatePermissionsPreview(permissionsPreview: PermissionsPreview,\r\n progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Generating preview');\r\n this.updateProgress(50, 75, msg);\r\n\r\n var url = `${this.url}/${this.endpoint}`;\r\n\r\n return this.http.post(url, permissionsPreview)\r\n .toPromise()\r\n .then(response => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Generated');\r\n this.updateProgress(100, 100, msg);\r\n\r\n //let result: PermissionsPreview = plainToClass(PermissionsPreview, response);\r\n let result = new PermissionsPreview(response);\r\n return result;\r\n }).catch(this.handleError);\r\n }\r\n\r\n public generateVirtualFolderHierarchyRecords(request: PermissionsPreviewVirtualFolderHierarchyRequest): Promise {\r\n var url = `${this.url}/${this.endpoint}/requestVirtualFolderHierarchyRecords`;\r\n\r\n return this.http.post(url, request)\r\n .toPromise()\r\n .then(response => {\r\n //let result = plainToClass(PermissionsPreviewVirtualFolderHierarchyRequest, response);\r\n let result = new PermissionsPreviewVirtualFolderHierarchyRequest(response);\r\n return result;\r\n }).catch(this.handleError);\r\n }\r\n\r\n public generateAllVirtualFoldersHierarchyRecords(request: PermissionsPreviewAllVirtualFoldersHierarchyRequest): Promise {\r\n var url = `${this.url}/${this.endpoint}/requestAllVirtualFoldersHierarchyRecords`;\r\n\r\n return this.http.post(url, request)\r\n .toPromise()\r\n .then(response => {\r\n let result = new PermissionsPreviewAllVirtualFoldersHierarchyRequest(response);\r\n return result;\r\n }).catch(this.handleError);\r\n }\r\n\r\n /*\r\n public generateAllVirtualFoldersHierarchyRecordsAsObservable(request: PermissionsPreviewAllVirtualFoldersHierarchyRequest): Observable {\r\n var url = `${this.url}/${this.endpoint}/requestAllVirtualFoldersHierarchyRecords`;\r\n\r\n let result: Observable = this.http.post(url, request);\r\n result.subscribe(response => {\r\n let result = new PermissionsPreviewAllVirtualFoldersHierarchyRequest(response);\r\n return result;\r\n }); //.catch(this.handleError);\r\n\r\n return result;\r\n }\r\n */\r\n}\r\n","import { Injectable } from '@angular/core';\n\n// Define an enumeration of status updates.\nexport enum ProgressStatusUpdateEnum {\n PROGRESS_UPDATED = 1,\n PROGRESS_COMPLETED = 2\r\n}\n\n// Define a progress update class.\nexport class ProgressUpdateInfo {\n public statusValue: number;\n public bufferValue: number;\r\n\r\n constructor(statusValue: number, bufferValue: number) {\r\n this.statusValue = statusValue;\r\n this.bufferValue = bufferValue;\r\n }\r\n\r\n public completed(): boolean {\r\n return this.statusValue == 100 && this.bufferValue == 100;\r\n }\r\n\r\n public canHide(): boolean {\r\n return this.statusValue == null && this.bufferValue == null;\r\n }\r\n}\r\n\r\n// This could be expanded to include settings for status and buffer\r\nexport class ProgressConfig {\r\n public msgDuring: string;\r\n public msgOnComplete: string;\r\n\r\n constructor(msgDuring: string, msgOnComplete: string) {\r\n this.msgDuring = msgDuring;\r\n this.msgOnComplete = msgOnComplete;\r\n }\r\n\r\n // Returns aProgressConfig instance with defaults set\r\n // Could be expanded to include defaults for status and buffer\r\n public static default(): ProgressConfig {\r\n return new ProgressConfig(null, null);\r\n }\r\n}\n\n// Define a notification interface (a component\n// can implement this to get notifications).\nexport interface IProgressStatusUpdateListener {\n //set ProgressListenerId(idParam: number);\n //setProgressListenerId(idParam: number): void;\n //getProgressListenerId(): number;\n progressListenerId: number;\n\n progressUpdated(statusMessage: ProgressStatusUpdateEnum,\n statusText: string,\n status: ProgressUpdateInfo): void;\r\n}\r\n\n// Define/implement the service.\r\n@Injectable()\r\nexport class ProgressIndicatorService {\n // Instance data.\n private iNextListenerId: number = 1;\n private listeners: IProgressStatusUpdateListener[] = [];\n\n // Service methods.\n public registerListener(listener: IProgressStatusUpdateListener): void {\n listener.progressListenerId = this.iNextListenerId;\n this.iNextListenerId++;\n\n this.listeners.push(listener);\n\n return;\r\n }\n\n public removeListener(listener: IProgressStatusUpdateListener): void {\n this.listeners =\n this.listeners.filter(l => l.progressListenerId !== listener.progressListenerId);\n\n return;\r\n }\r\n\r\n // Could create more of these helpers if warranted\r\n public completed50Percent(statusText: string): void {\r\n this.updateProgress(50, 75, statusText);\r\n }\r\n\r\n public completed100Percent(statusText: string): void {\r\n this.updateProgress(100, 100, statusText);\r\n }\r\n\r\n public updateProgress(statusValue: number, bufferValue: number, statusText: string): void {\r\n let progressInfo = new ProgressUpdateInfo(statusValue, bufferValue);\r\n\r\n if (progressInfo.completed()) {\r\n // Nested setTimeouts aim for a smooth, simulated completion \r\n // This can be revisited and perhaps involve checking http Event\r\n setTimeout(() => {\r\n this.update(statusText, progressInfo);\r\n setTimeout(() => {\r\n this.hideProgress();\r\n }, 0);\r\n }, 0);\r\n } else if (progressInfo.canHide()) {\r\n this.hideProgress();\r\n } else {\r\n this.update(statusText, progressInfo);\r\n }\r\n }\r\n\r\n private update(statusText: string, progressInfo: ProgressUpdateInfo): void {\n // Notify listeners of progress changes.\r\n for (var iListener: number = 0; iListener < this.listeners.length; iListener++) {\n var listener: IProgressStatusUpdateListener = this.listeners[iListener];\r\n\n if (progressInfo) {\n listener.progressUpdated(ProgressStatusUpdateEnum.PROGRESS_UPDATED, statusText, progressInfo);\r\n } else {\n listener.progressUpdated(ProgressStatusUpdateEnum.PROGRESS_COMPLETED, statusText, null);\r\n }\r\n }\n\n return;\r\n }\r\n\r\n // hides the progress indicator\r\n public hideProgress(): void {\r\n this.update(null, null);\r\n }\r\n\r\n // Using the progress indicator as a message center - it's not actually\r\n // displaying progress, just a message which expires after a few seconds\r\n public message(msg: string, timer?: number): void {\r\n let showFor = timer || 2000;\r\n for (var iListener: number = 0; iListener < this.listeners.length; iListener++) {\n var listener: IProgressStatusUpdateListener = this.listeners[iListener];\n\r\n var info = new ProgressUpdateInfo(100, 100);\n listener.progressUpdated(ProgressStatusUpdateEnum.PROGRESS_UPDATED, msg, info);\n setTimeout(() => {\n this.hideProgress();\r\n }, showFor);\r\n\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRoute, Params } from '@angular/router';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\n// Note: despite the name of this service, it is used to interpret the meaning of query parameters, not get the raw query parameters themselves.\r\nexport class QueryParamsService {\r\n // Constants.\r\n public static readonly SHOW_APP_CHROME_PARAM: string = 'action';\r\n\r\n // Properties.\r\n private parsedQueryParams: Params = null;\r\n\r\n // Constructor.\r\n public constructor(private route: ActivatedRoute) {\r\n this.route.queryParams.subscribe(params => {\r\n this.parsedQueryParams = params;\r\n });\r\n }\r\n\r\n // Getter method(s).\r\n public get HideAppChrome(): boolean {\r\n let hideAppChrome: boolean = false;\r\n let showChromeParamValue = this.parsedQueryParams[QueryParamsService.SHOW_APP_CHROME_PARAM];\r\n if ((this.parsedQueryParams != null) && (showChromeParamValue == 'edit' || showChromeParamValue == 'print'))\r\n hideAppChrome = true;\r\n\r\n return hideAppChrome;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\nimport { plainToClass } from \"class-transformer\";\n\nimport { Role } from '../models/role.model';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { environment } from '../../../environments/environment';\r\nimport { RoleGroupMember } from '../models/role-group-member.model';\r\nimport { RolesWrapper } from '../models/roles-wrapper.model';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\n\r\n@Injectable()\r\nexport class RoleService extends CollectApiServiceBase {\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'role', Role);\r\n }\r\n\r\n public formatResponse(data: Role): Role {\n let obj = plainToClass(Role, data);\n\n return (obj);\r\n }\n\r\n // Note: the following method is commented out as the server implementation is presently disabled.\r\n /*\r\n public getRolesForSite(siteId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetRolesForSite/${siteId}`;\r\n\r\n return this.getSiteRoles(url);\r\n }\r\n */\r\n\r\n public getFolderRoles(folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetRolesForFolder/${folderId}`;\r\n return this.getRoles(url);\r\n }\n\n public getFolderRoleGroupMembers(folderId: number): Promise {\n let url = `${this.url}/${this.endpoint}/GetFolderRoleGroupMembers/${folderId}`;\n return this.http.get(url)\n .toPromise()\n .then(members => {\n return (members);\r\n })\r\n .catch(this.handleError); \r\n }\n\n\n public addMember(roleId: number, folderId: number, member: RoleGroupMember): Promise{\n let url = `${this.url}/${this.endpoint}/${roleId}/${folderId}/AddRoleMember`;\n \n return this.http.post(url, member)\n .toPromise()\n .then(member => {\r\n return member;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public deleteMember(roleGroupMemberId: number, folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/DeleteRoleGroupMember/${roleGroupMemberId}/${folderId}`;\r\n\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(member => {\r\n return member;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public deleteAllRoleMembers(roleId: number, folderId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/DeleteRoleMembers/${roleId}/${folderId}`;\r\n\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(member => {\r\n return member;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getSiteRoles(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetSiteRoles/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let roles: Role[] = [];\r\n if ((response != null) && (response.length > 0)) {\r\n for (let index: number = 0; index < response.length; index++) {\r\n let role: Role = this.formatResponse(response[index]);\r\n roles.push(role);\r\n }\r\n }\r\n return roles;\r\n });\r\n }\r\n\r\n public getRolesUsedInSite(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetRolesUsedInSite/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(roleNames => {\r\n return roleNames;\r\n });\r\n }\r\n\r\n public getUserSiteRoleNames(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/GetUserSiteRoleNames/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(roleNames => {\r\n return roleNames;\r\n });\r\n }\n\r\n // Helpers\r\n /*\r\n private getSiteRoles(url: string): Promise {\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(roleObjects => {\r\n // make sure Roles are fully fledged objects with helper methods and not just data\n let roles: Role[] = [];\n\n if (roleObjects && roleObjects.length > 0) {\n for (let iRole: number = 0; iRole < roleObjects.length; iRole++) {\n let roleObject: object = roleObjects[iRole];\n\n let role: Role = plainToClass(Role, roleObject);\n\n roles.push(role);\r\n }\r\n }\n\r\n return (roles);\r\n })\r\n .catch(this.handleError);\r\n }\r\n */\r\n\r\n private getRoles(url: string): Promise {\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(roleWrapper => {\r\n // make sure Roles are fully fledged objects with helper methods and not just data\r\n roleWrapper.roles = roleWrapper.roles.map(r => { return Object.assign(new Role(), r) });\r\n return roleWrapper;\r\n })\r\n .catch(this.handleError.bind(this)); // .bind added so handleError() has access to this\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Settings } from '../models/settings.model';\r\n\r\n@Injectable()\r\nexport class SettingsService {\r\n\r\n constructor(private http: HttpClient) {\n \r\n }\n\r\n private get(): Promise {\n var url = 'assets/data/settings.json';\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\n return response;\r\n })\r\n .catch(this.handleError);\r\n } \n\r\n private handleError(error: any): Promise {\r\n return Promise.reject(error.message || error);\r\n }\n\r\n public loadSettings(): Promise {\r\n return this.get();\r\n }\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\n// Note: this class is presently a dummy class used to trigger ETL logic that is under development.\r\n\r\nexport class SiteETLRequest implements IViewModel {\r\n public constructor() { }\r\n\r\n public id: number; // This value is not presently used.\r\n}\r\n","import { plainToClass } from 'class-transformer';\r\nimport { Injectable } from '@angular/core';\r\n\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressIndicatorService } from './progress-indicator.service';\r\nimport { FolderPermissionExpression } from '../models/site-metadata/folder-permission-expression.model';\r\nimport { SiteETLRequest } from '../models/site-etl/site-etl-request.model';\r\nimport { AsyncJob } from '../models/async-job.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SiteETLService extends CollectApiServiceBase {\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'siteETL', SiteETLRequest)\r\n }\r\n\r\n public formatResponse(data: SiteETLRequest): SiteETLRequest {\r\n let obj = plainToClass(SiteETLRequest, data);\r\n return (obj);\r\n }\r\n\r\n // Implement service methods.\r\n public generateSiteETLJob(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/generateSiteETLJob/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n //let asyncJob: AsyncJob = response;\r\n let result = plainToClass(AsyncJob, response);\r\n return result;\r\n\r\n })\r\n .catch(this.handleError); \r\n }\r\n\r\n public runSiteETLJob(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/runSiteETLJob/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n //let asyncJob: AsyncJob = response;\r\n let result = plainToClass(AsyncJob, response);\r\n return result;\r\n\r\n })\r\n .catch(this.handleError); \r\n }\r\n\r\n // Method for getting an async job's result URL.\r\n public getResultFileDownloadUrl(asyncJob: AsyncJob, expectedDownloadFileName: string): string {\r\n let url = `${this.url}/${this.endpoint}/JobKey/${asyncJob.jobKey}/FileDownloadName/${expectedDownloadFileName}`;\r\n\r\n return (url);\r\n }\r\n\r\n}\r\n","import { IViewModel } from '../../interfaces/view-model.interface';\r\n\r\nexport class SiteIcon implements IViewModel {\r\n public id: number;\r\n\r\n public dataCollectionId; number;\r\n\r\n public name: string;\r\n public description: string;\r\n\r\n public originalFileName: string;\r\n public iconMimeType: string;\r\n\r\n public iconUrl: string; // The URL that can be used to serve this icon.\r\n public iconImgTag: string; // The icon's complete tag.\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { plainToClass } from 'class-transformer';\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { ProgressConfig, ProgressIndicatorService } from './progress-indicator.service';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { AsyncJob } from '../models/async-job.model';\r\nimport { SiteIcon } from '../models/site-icons/site-icon.model';\r\n\r\n@Injectable()\r\nexport class SiteIconService extends CollectApiServiceBase {\r\n // Constructor.\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'siteIcon', SiteIcon)\r\n }\r\n\r\n // Implement formatResponse()\r\n public formatResponse(data: SiteIcon): SiteIcon {\r\n let obj = plainToClass(SiteIcon, data);\r\n return (obj);\r\n }\r\n\r\n // Implement service methods.\r\n public addSiteIcon(dataCollectionId: number, iconName: string, iconFile: File): Promise {\r\n let url = `${this.url}/${this.endpoint}/addSiteIcon/${dataCollectionId}/named/${iconName}`;\r\n\r\n const formData: FormData = new FormData();\r\n formData.append('file', iconFile, iconFile.name);\r\n\r\n var httpHeaders: HttpHeaders = new HttpHeaders();\r\n const req = new HttpRequest('POST', url, formData, {\r\n reportProgress: true,\r\n\r\n headers: httpHeaders\r\n });\r\n\r\n return this.http.post(url, formData)\r\n .toPromise()\r\n .then(response => {\r\n let asyncJob: AsyncJob = response['value']; // Not sure why this has to be done, but perhaps it's because the server is return IActionResult.\r\n let result = plainToClass(AsyncJob, asyncJob);\r\n return result;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public deleteSiteIcon(siteIconId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/${siteIconId}`;\r\n\r\n return this.http.delete(url)\r\n .toPromise()\r\n .then(res => {\r\n return res;\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public listSiteIcons(dataCollectionId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/listSiteIcons/${dataCollectionId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let result: SiteIcon[] = [];\r\n if ((response != null) && (response.length > 0)) {\r\n for (let index: number = 0; index < response.length; index++) {\r\n let siteIcon: SiteIcon = this.formatResponse(response[index]);\r\n result.push(siteIcon);\r\n }\r\n }\r\n return result;\r\n });\r\n }\r\n\r\n public getSiteIcon(siteIconId: number): Promise {\r\n let url = `${this.url}/${this.endpoint}/get/${siteIconId}`;\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let result = this.formatResponse(response);\r\n return result;\r\n });\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\n\n// Define classes used for the site response management page.\nexport class SiteResponseManagementMetrics {\n public distinctRecipientCount: number;\n public distinctEditorsCount: number;\n public totalSubmissionsCount: number;\n public averageResponseTimeInHours: number;\n}\n\nexport class SiteSubmissionForReview {\n public submissionId: number = -1;\n public submissionUserId: string;\n public submissionDate: string;\n}\n\nexport class SiteResponseManagementData {\n id: number; // Note: this value is not used by is required by interface IViewModel.\n\n @Type(() => SiteResponseManagementMetrics)\n public siteManagementMetrics: SiteResponseManagementMetrics;\n\n @Type(() => SiteSubmissionForReview)\n public submissionsForReview: SiteSubmissionForReview[] = [];\r\n}\n","export class WorkflowCountData {\r\n public workflowId: number;\r\n public workflowName: string;\r\n\r\n public formInstanceTotalCount: number;\r\n public folderTotalCount: number;\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { WorkflowCountData } from './workflow-count-data.model';\r\n\r\nexport class WorkflowResponseData {\r\n public dataCollectionId: number;\r\n\r\n public includeFormInstances: boolean;\r\n public includeFolders: boolean;\r\n\r\n // Response data.\r\n @Type(() => WorkflowCountData)\r\n public workflowCountData: WorkflowCountData[];\r\n}\r\n","export class WorkflowStateCountData {\r\n public workflowStateId: number;\r\n public workflowStateName: string;\r\n\r\n public formInstanceCount: number; // The count of form instances in this state.\r\n public folderCount: number; // The count of folders in this state.\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { WorkflowStateCountData } from './workflow-state-count-data.model';\r\n\r\nexport class WorkflowStateResponseData {\r\n public workflowId: number;\r\n\r\n public includeFormInstances: boolean;\r\n public includeFolders: boolean;\r\n\r\n // Results.\r\n @Type(() => WorkflowStateCountData)\r\n public workflowStateCounts: WorkflowStateCountData[];\r\n}\r\n","export class MagicStructureResponseData {\r\n public numMemberships: number;\r\n\r\n public fulfilledMembershipCount: number;\r\n public unfulfilledMembershipCount: number;\r\n}\r\n","import { MagicStructureResponseData } from './magic-structure-response-data.model';\r\n\r\nexport class MagicFolderResponseData extends MagicStructureResponseData {\r\n public folderId: number;\r\n}\r\n","import { MagicStructureResponseData } from './magic-structure-response-data.model';\r\n\r\nexport class MagicFormInstanceResponseData extends MagicStructureResponseData {\r\n public formInstanceId: number;\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\r\nimport { plainToClass } from \"class-transformer\";\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { SiteResponseManagementData } from '../models/site-response-management.model';\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\nimport { WorkflowResponseData } from '../models/site-response-management/workflow-response-data.model';\r\nimport { WorkflowStateResponseData } from '../models/site-response-management/workflow-state-response-data.model';\r\nimport { MagicFolderResponseData } from '../models/site-response-management/magic-folder-response-data.model';\r\nimport { MagicFormInstanceResponseData } from '../models/site-response-management/magic-form-instance-response-data.model';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SiteResponseManagementService extends CollectApiServiceBase {\r\n public constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'siteResponseManagement', SiteResponseManagementData)\r\n }\n\r\n /*\n public formatResponse(data: SiteResponseManagementData): SiteResponseManagementData {\n let obj = plainToClass(SiteResponseManagementData, data);\n\n return (obj);\r\n }\r\n */\r\n\r\n // Service methods.\r\n public getWorkflowMetrics(dataCollectionId: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/getWorkflowMetrics/${dataCollectionId}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Querying workflow metrics');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Queried');\r\n this.updateProgress(100, 100, msg);\r\n\r\n let result = plainToClass(WorkflowResponseData, res);\r\n return (result);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getWorkflowStateMetrics(workflowId: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/getWorkflowStateMetrics/${workflowId}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Querying workflow state metrics');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Queried');\r\n this.updateProgress(100, 100, msg);\r\n\r\n let result = plainToClass(WorkflowStateResponseData, res);\r\n return (result);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getMagicFolderMetrics(magicFolderId: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/getMagicFolderMetrics/${magicFolderId}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Querying magic folder metrics');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Queried');\r\n this.updateProgress(100, 100, msg);\r\n\r\n let result = plainToClass(MagicFolderResponseData, res);\r\n return (result);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public getMagicFormInstanceMetrics(magicFormInstanceId: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise {\r\n let url = `${this.url}/${this.endpoint}/getMagicFormInstanceMetrics/${magicFormInstanceId}`;\r\n\r\n let msg = progressConfig.msgDuring || this.progressMsg('Querying magic form metrics');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Queried');\r\n this.updateProgress(100, 100, msg);\r\n\r\n let result = plainToClass(MagicFormInstanceResponseData, res);\r\n return (result);\r\n })\r\n .catch(this.handleError);\r\n }\n}\n","import { Injectable } from '@angular/core';\r\n\r\nimport { ITestableComponent } from '../interfaces/itestable-component.interface';\r\nimport { StringUtil } from '../utility-classes/string.util';\r\nimport { IElementTypeMetadata } from '../interfaces/component-scripting/ielement-type-metadata';\r\nimport { HtmlElementInfo } from '../models/component-scripting/html-element-info.model';\r\n//import { ComponentMethodMetadata } from '../models/component-scripting/component-methods-metadata.model';\r\nimport { ITestActionRecorderService } from '../interfaces/itest-action-recorder-service.interface';\r\nimport { ComponentHierarchyService } from './component-hierarchy.service';\r\nimport { IRegisterOperationCompletedCallback } from '../interfaces/ioperation-completed.intefaces';\r\n\r\nimport { AppInjector } from '../../app.module';\r\n\r\n// Define a class for log-related data.\r\nclass TestActionLogData {\r\n public logToConsole: boolean = true;\r\n public testActionLog: string[] = [];\r\n\r\n public clearTestActions(): void {\r\n this.testActionLog = [];\r\n }\r\n}\r\n\r\nenum TestableAction {\r\n None = 'None',\r\n SelectComponent = 'SelectComponent',\r\n SetInputValue = 'SetInputValue',\r\n ClickButton = 'ClickButton',\r\n ClickLink = 'ClickLink',\r\n CallMethod = 'CallMethod'\r\n}\r\nclass TestActionInfo {\r\n public constructor(public currentAction: TestableAction = TestableAction.None, public lastActionPerformed: TestableAction = TestableAction.None) {\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UITestActionRecorderService implements ITestActionRecorderService { //ISelectsComponent, IClicksButton, IClicksLink, IInputsValue, ICallsMethod, \r\n // Properties.\r\n private logData: TestActionLogData = new TestActionLogData();\r\n //private previousActionIsSelectComponent: boolean = false;\r\n private testActionInfo: TestActionInfo = new TestActionInfo();\r\n\r\n // Constructor.\r\n public constructor() {\r\n }\r\n\r\n // Getter method(s).\r\n public get TestActionLog(): string[] {\r\n return this.logData.testActionLog;\r\n }\r\n public get TestActionLogText(): string {\r\n return StringUtil.arrayToString(this.logData.testActionLog);\r\n }\r\n public get LogIsEmpty(): boolean {\r\n return this.logData.testActionLog.length == 0;\r\n }\r\n\r\n public clearLog(): void {\r\n this.logData.testActionLog = [];\r\n }\r\n\r\n public setLogText(testActions: string[]): void {\r\n this.logData.testActionLog = testActions;\r\n }\r\n\r\n // Begin ITestActionRecorderService method.\r\n // Resources\r\n public get componentHierarchyService(): ComponentHierarchyService {\r\n let service: ComponentHierarchyService = AppInjector.get(ComponentHierarchyService);\r\n return service;\r\n }\r\n\r\n public getRegisterOperationCompletedCallbackFor(serviceName: string): IRegisterOperationCompletedCallback {\r\n // Note: this method presently returns null by design.\r\n return null;\r\n }\r\n\r\n // Methods for recording test actions.\r\n public selectComponent(component: ITestableComponent): void {\r\n this.beginAction(TestableAction.SelectComponent);\r\n\r\n let message: string = `selectComponent('${component.tagName.toLowerCase()}');`;\r\n this.saveLogMessage(message);\r\n\r\n //this.previousActionIsSelectComponent = true;\r\n this.actionCompleted();\r\n }\r\n\r\n public selectElement(elementType: string, elementInfo: HtmlElementInfo): void {\r\n let message: string = `selectElement('${elementType}', '${elementInfo.elementTitle}');`;\r\n this.saveLogMessage(message);\r\n }\r\n public clickButton(elementTitle: string, elementMetadataKey: string, elementSubtype: string, operationCompletedServiceName: string, operationName: string): void {\r\n this.beginAction(TestableAction.ClickButton);\r\n\r\n let elementSubtypeText: string = elementSubtype != null ? `'${elementSubtype}'` : 'null';\r\n let operationCompletedServiceText: string = operationCompletedServiceName != null ? `'${operationCompletedServiceName}'` : 'null';\r\n let operationNameText: string = operationName != null ? `'${operationName}'` : 'null';\r\n let message: string = `clickButton('${elementTitle}', '${elementMetadataKey}', ${elementSubtypeText}, ${operationCompletedServiceText}, ${operationNameText});`;\r\n this.saveLogMessage(message);\r\n\r\n this.actionCompleted();\r\n }\r\n public clickLink(elementTitle: string, elementMetadataKey: string, elementSubtype: string, operationCompletedServiceName: string, operationName: string): void {\r\n this.beginAction(TestableAction.ClickLink);\r\n\r\n let elementSubtypeText: string = elementSubtype != null ? `'${elementSubtype}'` : 'null';\r\n let operationCompletedServiceText: string = operationCompletedServiceName != null ? `'${operationCompletedServiceName}'` : 'null';\r\n let operationNameText: string = operationName != null ? `'${operationName}'` : 'null';\r\n let message: string = `clickLink('${elementTitle}', '${elementMetadataKey}', ${elementSubtypeText}, ${operationCompletedServiceText}, ${operationNameText});`;\r\n this.saveLogMessage(message);\r\n\r\n this.actionCompleted();\r\n }\r\n //public callMethod(methodName: string, componentMethodMetadata: ComponentMethodMetadata, parameters: string[]): void {\r\n //public callMethod(component: ITestableComponent, methodName: string, parameters: string[]): void {\r\n public callMethod(methodName: string, parameters: string[]): void {\r\n this.beginAction(TestableAction.CallMethod);\r\n\r\n let message: string = `callMethod('${methodName}'`;\r\n // Process any parameters.\r\n if ((parameters != null) && (parameters.length > 0)) {\r\n for (let index: number = 0; index < parameters.length; index++) {\r\n let parameter: string = parameters[index];\r\n\r\n /*\r\n let parameterIsString: boolean = false;\r\n if ((componentMethodMetadata.argumentTypeNames != null) && (componentMethodMetadata.argumentTypeNames.length > index) && (componentMethodMetadata.argumentTypeNames[index].toLowerCase() == 'string'))\r\n parameterIsString = true;\r\n */\r\n let parameterIsString: boolean = true;\r\n\r\n let passParameterText: string = parameterIsString ? `, '${parameter}'` : `, ${parameter}`;\r\n message += passParameterText;\r\n }\r\n }\r\n\r\n message += ');';\r\n this.saveLogMessage(message);\r\n\r\n this.actionCompleted();\r\n }\r\n\r\n //public setInputValue(elementInfo: HtmlElementInfo, elementTypeMetadata: IElementTypeMetadata, value: string, addDateTimeSuffix: boolean = false): void {\r\n //public setInputValue(elementTitle: string, elementMetadataKey: string, value: string, addDateTimeSuffix: boolean): void {\r\n public setInputValue(elementTitle: string, elementMetadataKey: string, elementSubtype: string, value: string, addDateTimeSuffix: boolean): void {\r\n this.beginAction(TestableAction.SetInputValue);\r\n\r\n let addDateTimeSuffixText: string = addDateTimeSuffix ? 'true' : 'false';\r\n //let message: string = `setInputValue('${elementInfo.elementTitle}', '${value}', ${addDateTimeSuffixText});`;\r\n //let message: string = `setInputValue('${elementTitle}', '${elementMetadataKey}', '${value}', ${addDateTimeSuffixText});`;\r\n let message: string = elementSubtype != null ?\r\n `setInputValue('${elementTitle}', '${elementMetadataKey}', '${elementSubtype}', '${value}', ${addDateTimeSuffixText});` :\r\n `setInputValue('${elementTitle}', '${elementMetadataKey}', null, '${value}', ${addDateTimeSuffixText});`;\r\n this.saveLogMessage(message);\r\n\r\n this.actionCompleted();\r\n }\r\n public getInputValue(element: object, elementTypeMetadata: IElementTypeMetadata): string {\r\n let value: string = null;\r\n // TO DO: CODE THIS METOHD.\r\n return value;\r\n }\r\n\r\n // Helper methods.\r\n private beginAction(action: TestableAction): void {\r\n this.testActionInfo.currentAction = action;\r\n\r\n if (action == TestableAction.SelectComponent) {\r\n if (this.testActionInfo.lastActionPerformed == TestableAction.SelectComponent)\r\n this.popLogMessage();\r\n } else if (action == TestableAction.SetInputValue) {\r\n if (this.testActionInfo.lastActionPerformed == TestableAction.SetInputValue)\r\n this.popLogMessage();\r\n }\r\n }\r\n private actionCompleted(): void {\r\n this.testActionInfo.lastActionPerformed = this.testActionInfo.currentAction;\r\n this.testActionInfo.currentAction = TestableAction.None;\r\n }\r\n private saveLogMessage(message: string): void {\r\n // Check for a duplicate log message.\r\n let dupMessage: boolean = false;\r\n\r\n if (this.logData.testActionLog.length > 0) {\r\n if (message == this.logData.testActionLog[this.logData.testActionLog.length - 1])\r\n dupMessage = true;\r\n }\r\n\r\n if (!dupMessage)\r\n this.logData.testActionLog.push(message);\r\n }\r\n private popLogMessage(): string {\r\n let poppedMessage: string = this.logData.testActionLog.length > 0 ? this.logData.testActionLog.pop() : null;\r\n return poppedMessage;\r\n }\r\n}\r\n","import { Type } from 'class-transformer';\r\n\r\nimport { IViewModel } from '../interfaces/view-model.interface';\r\n\r\nexport class VnextReleaseFeatures implements IViewModel {\r\n public id: number = 0;\r\n\r\n public newFeatures: string;\r\n public comingSoonFeatures: string;\r\n}\r\n"," import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { plainToClass } from \"class-transformer\";\r\n\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\nimport { VnextReleaseFeatures } from '../models/vnext-release-features.model';\r\n\n@Injectable({\n providedIn: 'root'\n})\nexport class VnextReleaseFeaturesService extends CollectApiServiceBase{\r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\n super(http, progressIndicatorService, environment.apiUrl, 'vnextReleaseFeatures', VnextReleaseFeatures)\r\n }\n\n public formatResponse(data: VnextReleaseFeatures): VnextReleaseFeatures {\n var obj = plainToClass(VnextReleaseFeatures, data);\n\n return obj;\r\n }\r\n\r\n // Note: define a method to get the current release features record.\r\n public getCurrentReleaseFeatures(): Promise {\r\n let url = `${this.url}/${this.endpoint}/getCurrentReleaseFeatures`;\r\n\r\n //this.updateProgress(50, 75, `Getting release features ...`);\r\n\r\n return this.http.get(url)\r\n .toPromise()\r\n .then(response => {\r\n let result: VnextReleaseFeatures = plainToClass(VnextReleaseFeatures, response);\r\n\r\n //this.updateProgress(100, 100, `Completed`);\r\n\r\n return (result);\r\n })\r\n .catch(this.handleError);\r\n }\r\n\r\n public saveCurrentReleaseFeatures(releaseFeatures: VnextReleaseFeatures): Promise {\r\n let result = super.create(releaseFeatures);\r\n return result;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { environment } from '../../../environments/environment';\r\nimport { CollectApiServiceBase } from './collect-api-base.service';\r\nimport { Workflow } from '../models/site-content/workflow.model';\r\nimport { FormsGridBulkWorkflowStateUpdate } from '../models/site-metadata/forms-grid-bulk-workflow-state-update.model';\r\n\r\nimport { plainToClass } from \"class-transformer\";\r\nimport { ProgressIndicatorService, ProgressConfig } from './progress-indicator.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class WorkflowService extends CollectApiServiceBase { \r\n constructor(http: HttpClient, progressIndicatorService: ProgressIndicatorService) {\r\n super(http, progressIndicatorService, environment.apiUrl, 'workflow', Workflow)\r\n }\r\n\r\n formatResponse(data: Workflow): Workflow {\r\n var obj = plainToClass(Workflow, data);\r\n\r\n return (obj);\r\n }\r\n\r\n save(data: Workflow): Promise {\r\n //console.log(data.id);\r\n if (data.id > 0) {\r\n return (this.update(data));\r\n } else\r\n return (this.create(data));\r\n }\r\n\r\n public folderBulkWorkflowStateUpdate(folderId: number, selectedWorkflowStateId: number, cascade: boolean): Promise {\r\n let msg = \"Setting Forms' workflow state...\";\r\n this.updateProgress(50, 75, msg);\r\n let url: string = `${this.url}/${this.endpoint}/folderBulkWorkflowStateUpdate/${folderId}/${selectedWorkflowStateId}?cascade=${cascade}`;\r\n return this.http.post(url, {})\r\n .toPromise()\r\n .then(res => {\r\n this.updateProgress(100, 100, \"Done\");\r\n return res;\r\n }).catch(this.handleError);\r\n }\r\n\r\n public formsGridBulkWorkflowStateUpdate(formGridBulkWorkflowStateUpdate: FormsGridBulkWorkflowStateUpdate): Promise {\r\n let msg = \"Setting Forms' workflow state...\";\r\n this.updateProgress(50, 75, msg);\r\n let url: string = `${this.url}/${this.endpoint}/formsGridBulkWorkflowStateUpdate`;\r\n return this.http.post(url, formGridBulkWorkflowStateUpdate)\r\n .toPromise()\r\n .then(res => {\r\n this.updateProgress(100, 100, \"Done\");\r\n return res;\r\n }).catch(this.handleError);\r\n }\r\n\r\n public deleteFromUI(id: number, progressConfig: ProgressConfig = ProgressConfig.default()): Promise\r\n {\r\n let msg = progressConfig.msgDuring || this.progressMsg('Deleting');\r\n this.updateProgress(50, 75, msg);\r\n\r\n return this.http.delete(`${this.url}/${this.endpoint}/fromui/${id}`)\r\n .toPromise()\r\n .then(res => {\r\n let msg = progressConfig.msgOnComplete || this.progressMsg('Deleted');\r\n this.updateProgress(100, 100, msg);\r\n return id;\r\n }).catch(this.handleError);\r\n }\r\n}\r\n","// Note: this class provides date-related static methods.\r\nexport class DateUtil {\r\n // Static data.\r\n private static shortDaysOfWeek: string[] =\r\n ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];\r\n private static shortMonthsOfYear: string[] =\r\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n\r\n // UTC Date Methods.\r\n public static DateToUTCDate(strDate: string, dayOffset: number = 0, hourOffset: number = 0): Date {\r\n let iTimeSince_Jan01_1970: number = Date.parse(strDate);\r\n let dateValue: Date = new Date(iTimeSince_Jan01_1970);\r\n\r\n if (dayOffset != 0)\r\n dateValue.setDate(dateValue.getDate() + dayOffset);\r\n dateValue.setHours(hourOffset);\r\n dateValue.setMinutes(0);\r\n dateValue.setSeconds(0);\r\n\r\n return dateValue;\r\n }\r\n\r\n public static DateToSecondsSinceJan1_1970(strDate: string): number {\r\n let iTimeSince_Jan01_1970: number = Date.parse(strDate);\r\n return iTimeSince_Jan01_1970;\r\n }\r\n\r\n public static DateToUTCDateString(strDate: string, dayOffset: number = 0, hourOffset: number = 0): string {\r\n let dateValue: Date = this.DateToUTCDate(strDate, dayOffset, hourOffset);\r\n\r\n let strUTCDate: string = dateValue.toISOString();\r\n\r\n return strUTCDate;\r\n }\r\n\r\n public static TodayToUTCDate(dayOffset: number = 0, hourOffset: number = 0): Date {\r\n let dateValue: Date = new Date();\r\n\r\n if (dayOffset != 0)\r\n dateValue.setDate(dateValue.getDate() + dayOffset);\r\n dateValue.setHours(dateValue.getDate() + hourOffset);\r\n dateValue.setMinutes(0);\r\n dateValue.setSeconds(0);\r\n\r\n return dateValue;\r\n }\r\n\r\n public static TodayToUTCDateString(dayOffset: number = 0, hourOffset: number = 0): string {\r\n let dateValue: Date = this.TodayToUTCDate(dayOffset, hourOffset);\r\n\r\n let strUTCDate: string = dateValue.toISOString();\r\n\r\n return strUTCDate;\r\n }\r\n\r\n public static AsMMDDYYYY(date: Date): string {\r\n let month: string = (date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : `${date.getMonth() + 1}`);\r\n // Note: use date.getDate() to get the day of the month. Use date.getDay() to get the day of the week.\r\n let day: string = (date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate()}`)\r\n let dateText: string = `${month}-${day}-${date.getFullYear()}`;\r\n\r\n return dateText;\r\n }\r\n\r\n // Methods related to dates formatted as the following example:\r\n //\r\n // 'Mon Jan 01 1900 00:00:00 GMT-0500 (Eastern Standard Time)'\r\n //\r\n // For our purposes, we will refer to the above format as the 'Long' format.\r\n public static longFormatTodayString(dayOffset: number = 0): string {\r\n let today: Date = new Date();\r\n //let dateWithOffset: Date = (dayOffset == 0 ? today : today.setDate(today.getDate() + dayOffset));\r\n if (dayOffset != 0)\r\n today.setDate(today.getDate() + dayOffset);\r\n\r\n let day: string = this.shortDaysOfWeek[today.getDay()];\r\n let month: string = this.shortMonthsOfYear[today.getMonth()];\r\n\r\n let dateText: string = DateUtil.getLongDate(day, month, today.getHours());\r\n\r\n return dateText;\r\n }\r\n\r\n public static convertDateToLocalTime(dateToConvert: Date): void {\r\n // Convert the date to local time.\r\n let local_date: Date = new Date();\r\n let iTimeOffsetInMinutes: number = local_date.getTimezoneOffset();\r\n\r\n dateToConvert.setHours(dateToConvert.getHours() - (iTimeOffsetInMinutes / 60));\r\n\r\n return;\r\n }\r\n\r\n private static getLongDate(day: string,\r\n month: string,\r\n hour: number,\r\n gmtOffset: string = 'GMT-0500',\r\n timeZone: string = 'Eastern Standard Time'): string {\r\n let longDate: string = `${day} ${month} ${hour}00 00:00:00 ${gmtOffset} (${timeZone})`;\r\n\r\n return longDate;\r\n }\r\n\r\n\r\n}\r\n","import { ElementRef } from '@angular/core';\r\nexport class FileInputUtil {\r\n public static clearFileSelection(filesField: ElementRef): void {\r\n const dt = new DataTransfer();\r\n filesField.nativeElement.files = dt.files;\r\n }\r\n}\r\n","// Note: this class provides string-related static methods.\r\nexport class StringUtil {\r\n public static isEmptyString(value: string): boolean {\r\n return ((value == null) || (value.toString().trim() == ''));\r\n }\r\n\r\n public static arrayToDelimitedList(array: string[], delimiter: string = ','): string {\r\n let list: string = '';\r\n\r\n if (array != null) {\r\n for (let index: number = 0; index < array.length; index++) {\r\n let value: string = array[index];\r\n\r\n if (index > 0)\r\n list += delimiter;\r\n list += value;\r\n }\r\n }\r\n\r\n return list;\r\n }\r\n public static delimitedListToArray(list: string, delimiter: string = ','): string[] {\r\n let array: string[] = list.split(delimiter);\r\n return array;\r\n }\r\n\r\n public static capitalize(value: string): string {\r\n return value.charAt(0).toUpperCase() + value.slice(1);\r\n }\r\n\r\n public static singular(value: string): string {\r\n let result: string = value;\r\n\r\n if ((value != null) && (value.length >= 1)) {\r\n let length: number = value.length;\r\n let lastChar: string = value.charAt(length - 1);\r\n if (lastChar.toLowerCase() == 's')\r\n result = value.slice(0, length - 1);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public static arrayToString(array: string[]): string {\r\n let concatenatedValues: string = '';\r\n\r\n for (let index: number = 0; index < array.length; index++) {\r\n let value: string = array[index];\r\n\r\n if ((index > 0) && (concatenatedValues != ''))\r\n concatenatedValues += '\\r\\n';\r\n if (value != null)\r\n concatenatedValues += value;\r\n }\r\n\r\n return concatenatedValues;\r\n }\r\n\r\n // Constructor cannot be called.\r\n private constructor() { }\r\n}\r\n","import { ItemTypeEnum } from './enums/item-type.enum';\r\nimport { IItem } from './interfaces/iitem.interface';\r\n\r\nexport class UtilityHelper {\r\n\r\n public static findAndAssignFrom(array: any[], cloneObj: any) {\r\n for (let f of array) {\r\n if (f.id === cloneObj.id) {\r\n var target = f;\r\n UtilityHelper.assignFrom(target, cloneObj);\r\n }\r\n }\r\n }\r\n\r\n public static assignFrom(targetObj: any, cloneObj: any): void {\r\n for (var attr in cloneObj) {\r\n targetObj[attr] = cloneObj[attr];\r\n }\r\n }\r\n\r\n public static tryParseJson(str): string {\r\n try {\r\n let parsed = JSON.parse(str);\r\n return parsed;\r\n } catch (e) {\r\n return null;\r\n }\r\n }\r\n\r\n // Safely peer down nested properties of an object\r\n // Example Usage...\r\n // var currentSite = UtilityHelper.getNestedProperty(activatedRoute.snapshot.parent, 'data', 'currentSite');\r\n // ... when you're not sure data and currentSite will exist\r\n public static getNestedProperty(obj, ...propertyChain): any {\r\n return propertyChain.reduce((obj, level) => obj && obj[level], obj)\r\n }\r\n\r\n public static runWhenStackClear(callback) {\r\n setTimeout(callback, 0);\r\n }\r\n\r\n public static blockDrop(ev: DragEvent) {\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n }\r\n\r\n public static allowDrop(ev: DragEvent) {\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n }\r\n\r\n //Kevin\r\n public static isTypeWorkflow(item: IItem): boolean {\r\n if (item)\r\n return (item.getType().localeCompare(ItemTypeEnum.WORKFLOW, undefined, { sensitivity: 'base' })) == 0;\r\n }\r\n\r\n public static isTypeFormInstance(item: IItem): boolean {\r\n if (item)\r\n return (item.getType().localeCompare(ItemTypeEnum.FORM_INSTANCE, undefined, { sensitivity: 'base' })) == 0;\r\n }\r\n\r\n public static isTypeFolder(item: IItem): boolean {\r\n if (item)\r\n return (item.getType().localeCompare(ItemTypeEnum.FOLDER, undefined, { sensitivity: 'base' })) == 0;\r\n }\r\n\r\n public static isTypeAttachment(item: IItem): boolean {\r\n if (item)\r\n return (item.getType().localeCompare(ItemTypeEnum.ATTACH_W_URLS, undefined, { sensitivity: 'base' })) == 0;\r\n }\r\n\r\n public static isTypeBreadcrumb(item: IItem): boolean {\r\n if (item)\r\n return (item.getType().localeCompare(ItemTypeEnum.BREADCRUMB, undefined, { sensitivity: 'base' })) == 0;\r\n }\r\n}\r\n","import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\r\n\r\nexport class RouterLinkData {\r\n public relativeURL: string = '';\r\n public title: string = '';\r\n}\n\n@Component({\n selector: 'app-router-link',\n templateUrl: './router-link.component.html',\n styleUrls: ['./router-link.component.scss'],\n standalone: false\n})\nexport class RouterLinkComponent implements OnInit {\r\n // Properties.\r\n // Inputs.\r\n //@Input() relativeURL: string;\r\n //@Input() title: string;\r\n @Input() linkData: RouterLinkData = new RouterLinkData();\r\n\r\n // Outputs.\r\n //@Output() linkClicked: EventEmitter = new EventEmitter();\n\r\n // Constructor.\n constructor() { }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\n }\r\n\r\n // Methods called by my HTML.\r\n public get LinkData(): RouterLinkData {\r\n return this.linkData;\r\n }\n}\n","{{this.LinkData.title}}\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntypedFormControl } from '@angular/forms';\r\n\r\nimport { VnextReleaseFeatures } from '../../models/vnext-release-features.model';\r\nimport { VnextReleaseFeaturesService } from '../../services/vnext-release-features.service';\r\n\r\n// Export a mode enum for this dialog.\r\nexport enum VnextReleaseFeaturesDialogMode {\r\n EditReleaseFeatures = 'EditReleaseFeatures',\r\n ViewReleaseFeatures = 'ViewReleaseFeatures'\r\n}\r\n\r\n@Component({\n selector: 'app-vnext-release-features',\n templateUrl: './vnext-release-features.dialog.html',\n styleUrls: ['./vnext-release-features.dialog.scss'],\n standalone: false\n})\nexport class VnextReleaseFeaturesDialog implements OnInit {\r\n // Properties.\r\n private readonly mode: VnextReleaseFeaturesDialogMode = VnextReleaseFeaturesDialogMode.EditReleaseFeatures;\r\n\r\n private releaseFeatures: VnextReleaseFeatures = null;\r\n private editFormControl: UntypedFormControl = new UntypedFormControl('');\r\n private savingReleaseFeaturesFlag: boolean = false;\n\r\n // Constructor.\n public constructor(private dialogRef: MatDialogRef,\r\n //private dialog: MatDialog,\r\n private releaseFeaturesService: VnextReleaseFeaturesService) {\r\n return;\r\n }\n\r\n // Life cycle methods.\n public ngOnInit(): void {\r\n this.editFormControl.disable();\r\n this.releaseFeaturesService.getCurrentReleaseFeatures().then(response => {\r\n this.releaseFeatures = response;\r\n\r\n this.editFormControl = new UntypedFormControl(this.releaseFeatures.newFeatures != null ? this.releaseFeatures.newFeatures : '');\r\n this.editFormControl.enable();\r\n this.editFormControl.valueChanges.subscribe(value => {\r\n this.releaseFeatures.newFeatures = value;\r\n });\r\n\r\n });\r\n\r\n return;\n }\n\r\n // Methods called by my .html code.\r\n public get ReleaseFeaturesRetrieved(): boolean {\r\n return this.releaseFeatures != null;\r\n }\r\n\r\n public get Title(): string {\r\n return (this.mode == VnextReleaseFeaturesDialogMode.ViewReleaseFeatures ? 'View Release Features' : 'Edit Release Features');\r\n }\r\n\r\n public get ReleaseFeatures(): VnextReleaseFeatures {\r\n return this.releaseFeatures;\r\n }\r\n public get NewReleaseFeaturesHtml(): string {\r\n let enteredHtml: string = (this.releaseFeatures != null ? this.releaseFeatures.newFeatures : null);\r\n let html: string =\r\n '' +\r\n ' ' +\r\n (enteredHtml != null ? enteredHtml : '

Enter HTML in the left text area.

') +\r\n ' ' +\r\n '';\r\n return html;\r\n }\r\n\r\n public get EditFormControl(): UntypedFormControl {\r\n return this.editFormControl;\r\n }\r\n public get NumNewFeaturesTextAreaRows(): number {\r\n return 20;\r\n }\r\n public get NumNewFeaturesTextAreaCols(): number {\r\n return 100;\r\n }\r\n\r\n public get SaveButtonText(): string {\r\n return (this.savingReleaseFeaturesFlag ? 'Saving' : 'Save');\r\n }\r\n public get SavingReleaseFeaturesFlag(): boolean {\r\n return this.savingReleaseFeaturesFlag;\r\n }\r\n\r\n // Handle control action events.\r\n public saveReleaseFeatures(): void {\r\n this.savingReleaseFeaturesFlag = true;\r\n this.releaseFeaturesService.saveCurrentReleaseFeatures(this.releaseFeatures).then(updatedReleaseFeatures => {\r\n this.savingReleaseFeaturesFlag = false;\r\n });\r\n }\r\n\r\n public cancelOrCloseClicked(): void {\r\n this.dialogRef.close(null);\r\n }\r\n\n}\n","

\r\n {{this.Title}}\r\n

\r\n\r\n
\r\n
\r\n \r\n Enter New Release Features\r\n\r\n \r\n \r\n\r\n
\r\n\r\n
\r\n\r\n
\r\n Preview\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n
\r\n","
\r\n
\r\n
\r\n
Welcome to {{this.SiteName}}
\r\n
\r\n {{this.SiteName}} is an application for all offices across OMB to gather data from the entire Federal\r\n Government.\r\n Anyone at OMB can request a data collection site, and the OMB Collect team will work with them to\r\n develop forms, workflows, reporting,\r\n and overall design to meet their needs. For more information, OMB users should contact\r\n \r\n to request more information\r\n about the system and/or a demo.\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n
help
\r\n
Log in Trouble?
\r\n\r\n
\r\n

\r\n Email: \r\n

\r\n

\r\n Phone: 202-395-6860\r\n

\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n Edit Release Features:\r\n \r\n \r\n \r\n\r\n Release Info:\r\n
\r\n
\r\n
\r\n\r\n
\r\n API\r\n
\r\n
\r\n Build Time: {{this.AppBuildInfoApiBuildInfoBuildTime}}\r\n
\r\n
\r\n Changeset: {{this.AppBuildInfoApiBuildInfoChangeSet}}\r\n
\r\n
\r\n Build Number: {{this.AppBuildInfoApiBuildInfobuildNumber}}\r\n
\r\n\r\n
\r\n Web UI\r\n
\r\n
\r\n Build Time: {{this.AppBuildInfoWebBuildInfoBuildTime}}\r\n
\r\n
\r\n Changeset: {{this.AppBuildInfoWebBuildInfoChangeSet}}\r\n
\r\n
\r\n Build Number: {{this.AppBuildInfoWebBuildInfobuildNumber}}\r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n","import { AfterContentInit, AfterViewInit, Component, ElementRef, EventEmitter, OnInit, Output, QueryList, ViewChildren } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Title } from '@angular/platform-browser'; \r\nimport { environment } from '../../../environments/environment';\r\nimport { CurrentUserService } from '../../security/current-user.service';\r\nimport { LogInOutComponent } from '../../security/loginout/loginout.component';\r\nimport { ScriptableBaseComponent } from '../../shared/components/scriptable-base/scriptable-base.component';\r\nimport { RouterLinkComponent, RouterLinkData } from '../../shared/components/wrappers/router-link/router-link.component';\r\nimport { ConfirmationDialogComponent, ConfirmationDialogModel } from '../../shared/dialogs/confirmation/confirmation-dialog.component';\r\nimport { VnextReleaseFeaturesDialog } from '../../shared/dialogs/vnext-release-features/vnext-release-features.dialog';\r\nimport { ConfirmationDialogEnums } from '../../shared/enums/confirmation-dialog.enum';\r\nimport { AppBuildInfo } from '../../shared/models/admin/app-build-info.model';\r\nimport { AdminService } from '../../shared/services/admin.service';\r\nimport { ClaimService } from '../../shared/services/claim.service';\r\nimport { VnextReleaseFeaturesService } from '../../shared/services/vnext-release-features.service';\r\n\r\ndeclare let $: any; // jQuery\r\n\r\n\r\n// Define a class used by the landing page component.\r\nclass LandingPageLinkData extends RouterLinkData {\r\n public constructor(relativeURL: string, title: string, public requiresSystemAdminFlag: boolean = false, public callbackMethod: string = null) {\r\n super();\r\n\r\n this.relativeURL = relativeURL;\r\n this.title = title;\r\n }\r\n\r\n public get hasCallbackMethod(): boolean {\r\n return this.callbackMethod != null;\r\n }\r\n}\r\n\r\n@Component({\n selector: 'app-landing-page',\n templateUrl: './landing-page.component.html',\n styleUrls: ['./landing-page.component.scss']\n //providers: [{ provide: ParentComponentFinder, useExisting: forwardRef(() => ScriptableBaseComponent) }]\n ,\n standalone: false\n})\r\nexport class LandingPageComponent extends ScriptableBaseComponent implements OnInit, AfterContentInit, AfterViewInit {\r\n // Properties.\r\n private readonly landingPageLinkData: LandingPageLinkData[] =\r\n [\r\n new LandingPageLinkData('/home/recentlyAccessedSites', 'View My Recently Accessed Sites'),\r\n new LandingPageLinkData('/home/favoriteSites', 'View Favorite Sites'),\r\n new LandingPageLinkData('/home/sites', 'View All My Sites'),\r\n new LandingPageLinkData('/home/adminAllSites', 'All Sites (Admin View)', true)\r\n ];\r\n\r\n @ViewChildren(RouterLinkComponent, { read: RouterLinkComponent }) myRouterLinks: QueryList;\r\n @Output() loginEmitter: EventEmitter = new EventEmitter();\r\n\r\n //VNEXT-1054: KLW - Changes for the interim homepage\r\n public appBuildInfo: AppBuildInfo;\r\n private selectedTabIndex: number = 0;\r\n\r\n // Constructor.\r\n public constructor(\r\n public dialog: MatDialog,\r\n public currentUserService: CurrentUserService,\r\n public claimService: ClaimService,\r\n private vnextReleaseFeaturesService: VnextReleaseFeaturesService, \r\n elForBaseClass: ElementRef,\r\n private AdminAboutSvc: AdminService, //VNEXT-1054: KLW - Changes for the interim homepage\r\n private readonly titleService: Title,\r\n private activatedRoute: ActivatedRoute\r\n ) {\r\n super(elForBaseClass);\r\n this.element('#landingPageLinksDiv').hasLinks();\r\n\r\n // PJH - VNEXT-591 - added isForcedLogout check to prevent call to\r\n // backend when the user has been logged out\r\n if (!this.currentUserService.isForcedLogout) {\r\n this.AdminAboutSvc.appBuildInfo.then(result => {\r\n this.appBuildInfo = result;\r\n });\r\n }\r\n\r\n }\r\n\r\n // Life cycle methods.\r\n public ngAfterContentInit(): void {\r\n if (this.currentUserService.isIdleLogout) {\r\n\r\n // PJH - 6/28/2024 - commenting out the dialog below as part of VNEXT-591\r\n // The immediate concern of VNEXT-591 is to send users back to the last page they were on when they login after being logged out\r\n // but I'm taking the opportunity to rationalize the whole logout thing as it was overly complicated and had different paths\r\n // of execution resulting in different screens. The goal now is to always go to the login page for any logout however it was triggered\r\n // The addition of the below dialog didn't add anything, since the user only sees it on the login screen, in which case it's obvious\r\n // they got logged out\r\n\r\n //let dialogRef = this.dialog.open(ConfirmationDialogComponent, {\r\n // data: new ConfirmationDialogModel(`Session Expired`, `Your previous session timed out, please log back in`, { hideNo: true, showOk: true, dialogType: ConfirmationDialogEnums.ERROR })\r\n //});\r\n\r\n //dialogRef.disableClose = true;\r\n\r\n //dialogRef.afterClosed().subscribe(Ok => {\r\n // if (Ok) {\r\n // this.currentUserService.setForcedLogout(true);\r\n // this.logInOutComponent.logOut();\r\n // }\r\n //});\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n super.ngOnInit();\r\n\r\n //Kevin\r\n // this.matomoTracker.trackPageView(`Landing Page`);\r\n\r\n this.titleService.setTitle(environment.sitename);\r\n\r\n // Do we have a special route? In particular, does the route specify the \"My Notifications\" tab?\r\n if ((this.activatedRoute.snapshot != null) && (this.activatedRoute.snapshot.url != null) && (this.activatedRoute.snapshot.url.length > 0)) {\r\n if (this.activatedRoute.snapshot.url[0].path == 'manageUserNotifications') {\r\n this.selectedTabIndex = 2; // This is the index for the \"My Notifications\" tab.\r\n }\r\n }\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n super.ngAfterViewInit();\r\n }\r\n\r\n // Define methods called by my HTML code.\r\n public get UserIsSystemAdmin(): boolean {\r\n let retVal: boolean = false;\r\n\r\n if (this.currentUserService.user)\r\n if (this.currentUserService.user.isSystemAdmin)\r\n retVal = true;\r\n\r\n return retVal;\r\n }\r\n\r\n public get LandingPageLinkData(): LandingPageLinkData[] {\r\n return this.landingPageLinkData;\r\n }\r\n\r\n public get WelcomeClass(): string {\r\n return this.currentUserService.user ? 'col-md-12' : 'col-md-8';\r\n }\r\n\r\n public get SelectedTabIndex(): number {\r\n return this.selectedTabIndex;\r\n }\r\n public set SelectedTabIndex(value: number) {\r\n this.selectedTabIndex = value;\r\n }\r\n\r\n //VNEXT-1054: KLW - Changes for the interim homepage\r\n public get AppBuildInfoApiBuildInfoBuildTime(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo.buildTime)\r\n retVal = this.appBuildInfo.apiBuildInfo.buildTime;\r\n\r\n return retVal;\r\n }\r\n\r\n public get AppBuildInfoApiBuildInfoChangeSet(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo.changeSet)\r\n retVal = this.appBuildInfo.apiBuildInfo.changeSet;\r\n\r\n return retVal;\r\n }\r\n\r\n public get AppBuildInfoApiBuildInfobuildNumber(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo)\r\n if (this.appBuildInfo.apiBuildInfo.buildNumber)\r\n retVal = this.appBuildInfo.apiBuildInfo.buildNumber;\r\n\r\n return retVal;\r\n }\r\n\r\n public get AppBuildInfoWebBuildInfoBuildTime(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo.buildTime)\r\n retVal = this.appBuildInfo.webBuildInfo.buildTime;\r\n\r\n return retVal;\r\n }\r\n\r\n public get AppBuildInfoWebBuildInfoChangeSet(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo.changeSet)\r\n retVal = this.appBuildInfo.webBuildInfo.changeSet;\r\n\r\n return retVal;\r\n }\r\n\r\n public get AppBuildInfoWebBuildInfobuildNumber(): string {\r\n let retVal: string = '';\r\n\r\n if (this.appBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo)\r\n if (this.appBuildInfo.webBuildInfo.buildNumber)\r\n retVal = this.appBuildInfo.webBuildInfo.buildNumber;\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n\r\n public IsNotLastLink(index: number): boolean {\r\n return (index < this.landingPageLinkData.length - 1);\r\n }\r\n\r\n //VNEXT-1054: KLW - Changes for the interim homepage\r\n public loginFromLandingPage() {\r\n this.loginEmitter.emit();\r\n }\r\n\r\n public emailHtml(subject: string, body: string): string {\r\n return `maxsupport@max.gov`;\r\n\r\n }\r\n\r\n // Handle control events.\r\n public editNewComingSoonFeatures(): void {\r\n let dialogConfig: MatDialogConfig = new MatDialogConfig();\r\n dialogConfig.hasBackdrop = true;\r\n dialogConfig.width = '800px';\r\n dialogConfig.data = null; // No data yet.\r\n\r\n const dialogRef = this.dialog.open(VnextReleaseFeaturesDialog, dialogConfig);\r\n\r\n dialogRef.afterClosed().subscribe(updatedReleaseFeatures => {\r\n if (updatedReleaseFeatures != null) {\r\n\r\n }\r\n });\r\n }\r\n\r\n // Methods related to UI testing.\r\n public onLinkWithCallbackClick(linkData: LandingPageLinkData): void {\r\n this[linkData.callbackMethod]();\r\n }\r\n\r\n //VNEXT-1066: KLW - Property to get site name\r\n public get SiteName() {\r\n return environment.sitename;\r\n }\r\n\r\n /*\r\n public openUITestCenter(): void {\r\n let manager: UITestCenterDialogManager = new UITestCenterDialogManager();\r\n\r\n const dialogRef = manager.openDialogUsing(this.dialog);\r\n }\r\n */\r\n}\r\n","

\r\n {{this.title}}\r\n

\r\n\r\n
Loading...
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n Name\r\n \r\n \r\n
\r\n
\r\n \r\n Type\r\n \r\n {{type.name}}\r\n \r\n \r\n
\r\n
\r\n
\r\n Viewable by:\r\n \r\n All\r\n Site Admins Only\r\n No one\r\n Members of MAX Group...\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n {{this.ngFormGroup.value.viewableByMaxGroup}} (Change)\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{XsltLabel}}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { DocumentPublishingSettings } from '../../models/document-publishing-settings.model';\r\nimport { DocumentPublishingService } from '../../services/document-publishing.service';\r\nimport { PickerItem } from '../../models/picker-item.model';\r\n\n@Component({\n selector: 'app-document-publish-settings',\n templateUrl: './document-publishing-settings-editor.dialog.html',\n styleUrls: ['./document-publishing-settings-editor.dialog.scss'],\n standalone: false\n})\nexport class DocumentPublishingSettingsEditorDialog implements OnInit {\r\n private readonly XSLT_LABELS = Object.freeze({\r\n PASTE_XSLT: \"Paste XSLT Here\",\r\n REPORT_NAME: \"Report Name\"\r\n });\r\n\r\n public readonly VIEWABLE_BY_ALL: string = \"ALL\";\r\n public readonly VIEWABLE_BY_NONE: string = \"NONE\";\r\n public readonly VIEWABLE_BY_SITE_ADMINS: string = \"SITE_ADMIN\";\r\n public readonly VIEWABLE_BY_GROUP: string = \"GROUP\";\r\n private xsltLabel: string = this.XSLT_LABELS.PASTE_XSLT;\r\n\r\n public title: string;\n public outputTypes: any[] = [\r\n { name: 'PDF' },\r\n { name: 'Word' },\r\n { name: 'Excel' },\r\n { name: 'HTML' },\r\n { name: 'Email' }\r\n ];\r\n public settings: DocumentPublishingSettings;\r\n public ngFormGroup: UntypedFormGroup;\r\n\r\n private viewableByGroup: string;\r\n\n constructor(private fb: UntypedFormBuilder, @Inject(MAT_DIALOG_DATA) data, private documentPublishingService: DocumentPublishingService) {\r\n if (data) {\r\n this.settings = data;\r\n this.title = `Edit ${data.name}`\r\n } else {\r\n this.title = 'New Document Publish Settings';\r\n }\r\n\r\n if (this.settings) {\r\n this.documentPublishingService.getDocumentPublishingSettings(this.settings.id).then(settings => {\r\n this.ngFormGroup = this.fb.group({\r\n id:[settings.id],\r\n name: [settings.name, Validators.required],\r\n outputType: [settings.outputType, Validators.required],\r\n viewableBy: settings.viewableBy || this.VIEWABLE_BY_SITE_ADMINS,\r\n viewableByMaxGroup: settings.viewableByMaxGroup,\r\n xslt: [settings.xslt, Validators.required]\r\n });\r\n });\r\n } else {\r\n this.ngFormGroup = this.fb.group({\r\n name: [],\r\n outputType: [],\r\n viewableBy: this.VIEWABLE_BY_SITE_ADMINS,\r\n xslt: []\r\n });\r\n }\r\n }\n\n ngOnInit(): void {\n }\r\n\r\n public get ShowGroupPicker() {\r\n return this.ngFormGroup.value.viewableBy == this.VIEWABLE_BY_GROUP && !this.ngFormGroup.value.viewableByMaxGroup;\r\n }\r\n\r\n public get ShowSelectedMaxGroup() {\r\n return this.ngFormGroup.value.viewableBy == this.VIEWABLE_BY_GROUP && this.ngFormGroup.value.viewableByMaxGroup;\r\n }\r\n\r\n public onGroupSet(pickerItem: PickerItem): void {\r\n this.ngFormGroup.value.viewableByMaxGroup = pickerItem.displayName;\r\n this.ngFormGroup.markAsDirty();\r\n }\n\r\n public get XsltLabel(): string {\r\n return this.xsltLabel;\r\n }\r\n\r\n public onTypeChange(settingConfigType: string): void {\r\n //***Change the display type for the xslt label\r\n if (settingConfigType == 'Email')\r\n this.xsltLabel = this.XSLT_LABELS.REPORT_NAME;\r\n else\r\n this.xsltLabel = this.XSLT_LABELS.PASTE_XSLT;\r\n }\n}\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatMenuTrigger } from '@angular/material/menu';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { ButtonConfig } from '../../../shared/components/list-view/list-view-button-config.model';\r\nimport { TrashConfig } from '../../../shared/components/list-view/list-view-trash-config.model';\r\nimport { DocumentPublishingSettingsEditorDialog } from '../../../shared/dialogs/document-publishing/document-publishing-settings-editor.dialog';\r\nimport { IListItem } from '../../../shared/interfaces/ilist-item.interface';\r\nimport { DocumentPublishingSettings } from '../../../shared/models/document-publishing-settings.model';\r\nimport { DataCollection } from '../../../shared/models/site-content/data-collection.model';\r\nimport { DeleteOnConfirmDialogService } from '../../../shared/services/delete-on-confirm-dialog.service';\r\nimport { DocumentPublishingService } from '../../../shared/services/document-publishing.service';\r\n\r\n@Component({\n selector: 'app-document-publishing',\n templateUrl: './document-publishing.component.html',\n styleUrls: ['./document-publishing.component.scss'],\n standalone: false\n})\nexport class DocumentPublishingComponent implements OnInit {\r\n\r\n private settings: DocumentPublishingSettings[] = [];\r\n private site: DataCollection;\r\n\n private buttonConfig: any;\n private contextMenuPosition: any = { x: '0px', y: '0px' };\r\n @ViewChild(MatMenuTrigger) contextMenu: MatMenuTrigger;\r\n\n constructor(\r\n private route: ActivatedRoute,\r\n public dialog: MatDialog,\r\n private exportService: DocumentPublishingService,\r\n private deleteOnConfirmDialogService: DeleteOnConfirmDialogService,\r\n private readonly titleService: Title\r\n\r\n ) { }\n\n ngOnInit(): void {\r\n this.settings = this.route.snapshot.data['documentPublishing'];\r\n this.site = this.route.parent.snapshot.data['currentSite'];\r\n\r\n this.buttonConfig = {\r\n right: [new ButtonConfig('New', 'new_settings')]\r\n //,item_actions: [new ButtonConfig('Edit', 'info', 'info')]\r\n };\r\n\r\n if (this.site.siteIsAdministerable) {\r\n this.buttonConfig['trash'] = new TrashConfig(true)\r\n }\r\n\r\n this.titleService.setTitle(this.route.snapshot.data['title']);\n }\r\n\r\n public get ListItems(): IListItem[] {\r\n return (this.settings);\r\n }\r\n\r\n public get ButtonConfig(): any {\r\n return (this.buttonConfig);\r\n }\r\n\r\n public doOnEdit(event: any, origin = 'drag') {\r\n let item;\r\n if (origin == 'context_menu') {\r\n item = this.contextMenu.menuData.item;\r\n } else {\r\n item = event.item;\r\n }\r\n this.createOrUpdateSettings(item);\r\n }\r\n\r\n public doOnButtonClick(event: any) {\r\n if (event.button == 'new_settings') {\r\n this.createOrUpdateSettings();\r\n }\r\n }\r\n\r\n private createOrUpdateSettings(data: DocumentPublishingSettings = null) {\r\n const dialogRef = this.dialog.open(DocumentPublishingSettingsEditorDialog, {\r\n width: '60%',\r\n data: data\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(submittedSettings => {\r\n if (submittedSettings) {\r\n let exportSettings = new DocumentPublishingSettings();\r\n exportSettings.id = submittedSettings.id;\r\n exportSettings.name = submittedSettings.name;\r\n exportSettings.outputType = submittedSettings.outputType;\r\n exportSettings.xslt = submittedSettings.xslt;\r\n exportSettings.viewableBy = submittedSettings.viewableBy;\r\n exportSettings.viewableByMaxGroup = submittedSettings.viewableBy == 'GROUP' ? submittedSettings.viewableByMaxGroup : null;\r\n exportSettings.siteId = this.site.id;\r\n\r\n this.exportService.saveDocumentPublishingSettings(exportSettings).then(x => {\r\n let clonedSettings = Object.assign([], this.settings);\r\n if (submittedSettings.id > 0) {\r\n clonedSettings = clonedSettings.filter(x => { return x.id != submittedSettings.id });\r\n } \r\n clonedSettings.push(x);\r\n this.settings = clonedSettings;\r\n });\r\n }\r\n });\r\n }\r\n\r\n public doOnItemAction(event: any) { }\r\n\r\n\r\n public doOnItemDelete(event: any, origin: string = 'drag') {\r\n let items = [];\r\n if (origin == 'context_menu') {\r\n items.push(this.contextMenu.menuData.item);\r\n } else {\r\n items = event.items;\r\n }\r\n this.deleteOnConfirmDialogService.deleteOnConfirm(this.dialog, \"Document Publishing Settings\", () => {\r\n for (let i of items) {\r\n this.exportService.deleteDocumentPublishingSettings(i.id).then(x => {\r\n this.settings = this.settings.filter(x => x.getId() != i.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n public doOnItemContextMenu(event: any) {\r\n // Set the context menu position.\r\n this.contextMenuPosition.x = event.originalEvent.clientX + 'px';\r\n this.contextMenuPosition.y = event.originalEvent.clientY + 'px';\r\n\r\n // Set menu data.\r\n this.contextMenu.menuData = { 'item': event.item };\r\n this.contextMenu.openMenu();\r\n }\r\n\r\n public get ContextMenuPositionX(): string {\r\n return (this.contextMenuPosition.x);\r\n }\r\n public get ContextMenuPositionY(): string {\r\n return (this.contextMenuPosition.y);\r\n }\n\n}\n","\r\n\r\n\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n","import { Component, OnInit, AfterViewInit, ViewEncapsulation, HostListener } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { CurrentUserService } from '../../../security/current-user.service';\r\n\n@Component({\n selector: 'app-form',\n templateUrl: './printable-form.component.html',\n styleUrls: ['./printable-form.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false\n})\nexport class PrintableFormComponent implements OnInit, AfterViewInit {\n // Instance data.\n formInstanceHtml: string = null;\r\n\n // Constructor.\n constructor(private route: ActivatedRoute,\r\n private currentUserService: CurrentUserService,\r\n private router: Router) { }\r\n\r\n\n public ngOnInit(): void {\r\n this.route.data\r\n .subscribe((data: { formInstanceHtml: string }) => {\r\n this.formInstanceHtml = data.formInstanceHtml;\r\n });\n }\r\n\n public ngAfterViewInit(): void {\r\n window.print();\r\n }\r\n\r\n public get FormInstanceHtml() {\r\n return this.formInstanceHtml;\r\n }\r\n\r\n @HostListener(\"window:afterprint\", [])\r\n onWindowAfterPrint() {\r\n console.log('... afterprint');\r\n window.close();\r\n }\n}\n","
\r\n","import { DragDropEnum } from \"../../../../../src/app/shared/enums/drag-drop.enum\"\r\n\r\nexport interface IFilesDroppedOnStructure {\r\n Files: File[];\r\n FolderId: number;\r\n Reload: boolean;\r\n}\r\n\r\nexport class FilesDroppedOnStructureEvent {\r\n private files;\r\n private toDropFolderId: number;\r\n private toDropSiteId: number;\r\n private reload: boolean;\r\n private folderName: string;\r\n private objectType: string;\r\n\r\n public constructor(passedFiles) {\r\n this.files = passedFiles;\r\n }\r\n\r\n public getFiles() {\r\n return this.files;\r\n }\r\n\r\n\r\n public setToDropFolderId(id: number) {\r\n this.toDropFolderId = id;\r\n }\r\n\r\n public getToDropFolderId(): number {\r\n return this.toDropFolderId;\r\n }\r\n\r\n\r\n public setToDropSiteId(id: number) {\r\n this.toDropSiteId = id;\r\n }\r\n\r\n public getToDropSiteId(): number {\r\n return this.toDropSiteId;\r\n }\r\n\r\n\r\n public setReload(value: boolean) {\r\n this.reload = value;\r\n }\r\n\r\n public getReload(): boolean {\r\n return this.reload;\r\n }\r\n\r\n\r\n public setFolderName(name: string) {\r\n this.folderName = name;\r\n }\r\n\r\n public getFolderName(): string {\r\n return this.folderName;\r\n }\r\n\r\n\r\n public setObjectType(objectType: DragDropEnum) {\r\n this.objectType = objectType;\r\n }\r\n\r\n public getObjectType(): string {\r\n return this.objectType;\r\n }\r\n\r\n public getSiteOrFolder(): DragDropEnum {\r\n let retVal: DragDropEnum;\r\n\r\n if (this.objectType == DragDropEnum.FORM)\r\n retVal = DragDropEnum.FOLDER;\r\n else if (this.objectType == DragDropEnum.FORM_TEMPLATE)\r\n retVal = DragDropEnum.FORM_TEMPLATE_CATALOG;\r\n\r\n return retVal;\r\n }\r\n}\r\n\r\n","declare var ExecutionTimeEnvironment: any;\n\nexport const environment = {\n debug: false,\n production: false,\n apiUrl: ExecutionTimeEnvironment.WEBAPIURL,\n loginSiteUrl: ExecutionTimeEnvironment.WEBAPIURL,\n loginPage: \"login\",\n logoutPage: \"logout\",\n userGrantedAllClaims: false, // THIS IS TEMPORARY!\n suppressUnsavedChangesWarning: false,\n matomoConfig: {\n url: 'https://webmetrics.max.gov/',\n id: 51\n },\n sitename: 'OMB Collect', //VNEXT-1066: KLW - Variable to set site name\n bannerColor: ExecutionTimeEnvironment.BANNER_COLOR //VNEXT-1181: KLW - For Banner Color based on environment implementation\n};\n","/// \n\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport \"reflect-metadata\";\n//import \"es6-shim\";\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"],"x_google_ignoreList":[]}