UNPKG

@docsvision/webclient

Version:

Type definitions for DocsVision WebClient scripts and extensions.

350 lines (349 loc) 12 kB
/// <reference types="react" /> import { IEmployeeResponseParser } from "@docsvision/webclient/BackOffice/IEmployeeResponseParser"; import { StaffDirectoryParams } from "@docsvision/webclient/BackOffice/StaffDirectory"; import { GenModels } from "@docsvision/webclient/Generated/DocsVision.WebClient.Models"; import { ModalHost } from "@docsvision/webclient/Helpers/ModalHost"; import { ShowSecurityDescriptorDialogProps } from "@docsvision/webclient/Platform/SecurityDescriptorDialog"; import { $MessageBox } from "@docsvision/webclient/System/$MessageBox"; import { IRow, ITableData, ITableDataLoadRequest } from "@docsvision/web/components/table/interfaces"; import { ComponentLogic } from "@docsvision/web/core/component"; import { IStaffTreeRow } from "@docsvision/webclient/BackOffice/IStaffTreeRow"; import { IFolderDataLoadingPlugin } from "@docsvision/webclient/Platform/IFolderDataLoadingPlugin"; import { IButtonDescription } from "@docsvision/webclient/BackOffice/StaffDirectoryTreeAddButton"; import { LoadingStatus } from "@docsvision/webclient/System/LoadingState"; import { SearchFilters } from "@docsvision/webclient/BackOffice/$WebFrameDirectorySearchInfoStorageService"; export declare const sectionTabs: string[]; export declare type StaffDirectorySearchResponseT = { items: GenModels.SearchItemModel[]; hasMore: boolean; totalCount: number; directoryTimestamp?: number; }; export interface IStaffDirectoryLogicOptions extends StaffDirectoryParams { showDeleteConfirmationDialog: (entityName: string, services: $MessageBox, isSection: boolean, dataType: GenModels.DirectoryDataType) => Promise<void>; showSecurityDescriptorDialog: (props: ShowSecurityDescriptorDialogProps) => ModalHost; showCreateSectionDialog: (addSection: (value?: string) => Promise<void>, loadCreateSectionLayout: any, services: any, rootSection?: any) => Promise<any>; showEditSectionDialog: (editSection: (value?: string) => Promise<void>, loadEditSectionLayout: any, services: any, rootSection?: any) => Promise<any>; showEditEmployeeDialog: (editEmployee: (value?: string) => Promise<void>, loadEditEmployeeLayout: any, services: any, EmployeeRow?: any) => Promise<any>; showInsufficientAccessRightsMessage: (services: $MessageBox) => Promise<void>; } export declare class StaffDirectoryLogic extends ComponentLogic<IStaffDirectoryLogicOptions> { protected domain: import("effector").Domain; $tree: import("effector").Store<IStaffTreeRow[]>; $rootSectionId: import("effector").Store<string>; sectionSelected: import("effector").Event<IStaffTreeRow>; $selectedSection: import("effector").Store<IStaffTreeRow>; initSelection(): void; $activeRightTab: import("effector").Store<string>; activeRightTabChange: import("effector").Event<string>; $activeLeftTab: import("effector").Store<string>; activeLeftTabChange: import("effector").Event<string>; openLeftTab: import("effector").Event<{ tabId: string; }>; rootSectionChange: import("effector").Event<string>; getPlaceholderEmployeesText: import("effector").Event<void>; getPlaceholderInfoText: import("effector").Event<void>; initActiveTab(): void; $showAddRowButtons: import("effector").Store<boolean>; clickAddRowOrganizationButton: import("effector").Event<{}>; clickAddRowDepartmentButton: import("effector").Event<{}>; showAddRowButtonsToggle: import("effector").Event<void>; $addRowButtons: import("effector").Store<IButtonDescription[]>; initAddRowButtons(): void; contextMenu: import("effector").Event< import("react").MouseEvent<Element, MouseEvent>>; contextMenuFx: import("effector").Effect< import("react").MouseEvent<Element, MouseEvent>, void, Error>; $contextMenuName: import("effector").Store<string>; getPaste: any; initContextMenu(): void; componentDidMount: import("effector").Event<void>; loadRootSectionsFx: import("effector").Effect<void, IStaffTreeRow[], Error>; loadSubsectionsFx: import("effector").Effect<{ parentSectionId: string; }, IStaffTreeRow[], Error>; reloadSubsectionsFx: import("effector").Effect<{ parentSectionId: string; rootSectionId: string; }, IStaffTreeRow[], Error>; loadSectionsFx: import("effector").Effect<{ parentSectionId: string; rootSectionId: string; }, any, Error>; initTreeLoading(options: StaffDirectoryParams): void; $positionEmployeesData: import("effector").Store<ITableData>; loadPositionEmployeesFx: import("effector").Effect<{ currentData?: ITableData; request?: ITableDataLoadRequest; }, ITableData, Error>; reloadPositionEmployees: import("effector").Event<void>; $rootEmployeesLoading: import("effector").Store<boolean>; $placeholderEmployeesText: import("effector").Store<string>; $placeholderInfoText: import("effector").Store<string>; responseParser: IEmployeeResponseParser; initPositionEmployeesLoad(options: StaffDirectoryParams): void; $employeesGridData: import("effector").Store<ITableData>; reloadEmployeesGridData: import("effector").Event<void>; lastGridModel: GenModels.GridViewModel; lastRequestSection: any; loadEmployeesGridDataFx: import("effector").Effect<{ currentData?: ITableData; request?: ITableDataLoadRequest; }, ITableData, Error>; employeesGridResponseResolvers: IFolderDataLoadingPlugin[]; addToGroupFx: import("effector").Effect<{ groupId: string; employeeIds: Array<string>; unitIds: Array<string>; positionIds: Array<string>; groupIds: Array<string>; }, Promise<void>, Error>; removeFromGroupFx: import("effector").Effect<{ groupId: string; employeeId: string; }, Promise<void>, Error>; initEmployeesGrid(): void; showSectionInfoDialog: import("effector").Event<{ section: IStaffTreeRow; }>; loadSectionInfoLayoutFx: import("effector").Effect<{ section: IStaffTreeRow; }, GenModels.LayoutViewModel, Error>; loadSectionSummaryLayoutFx: import("effector").Effect<{ section: IStaffTreeRow; }, GenModels.LayoutViewModel, Error>; canShowSectionEditDialog: import("effector").Event<{ section: IStaffTreeRow; }>; showSectionEditDialog: import("effector").Event<{ section: IStaffTreeRow; }>; loadSectionEditLayoutFx: import("effector").Effect<{ section: IStaffTreeRow; }, GenModels.LayoutViewModel, Error>; sectionEditDialogAccepted: import("effector").Event<{ section: IStaffTreeRow; }>; canShowSectionCreateDialog: import("effector").Event<{ parentSection: IStaffTreeRow; type: GenModels.DirectoryDataType; }>; showSectionCreateDialog: import("effector").Event<{ parentSection: IStaffTreeRow; type: GenModels.DirectoryDataType; }>; loadSectionCreateLayoutFx: import("effector").Effect<{ parentSection: IStaffTreeRow; type?: GenModels.DirectoryDataType; }, GenModels.LayoutViewModel, Error>; sectionCreateDialogAccepted: import("effector").Event<{ parentSection: IStaffTreeRow; }>; initSectionModals(options: IStaffDirectoryLogicOptions): void; showEmployeeInfoDialog: import("effector").Event<{ employeeId: string; }>; loadEmployeeInfoLayoutFx: import("effector").Effect<{ employeeId: string; }, GenModels.LayoutViewModel, Error>; canShowEmployeeEditDialog: import("effector").Event<{ employeeId: string; }>; showEmployeeEditDialog: import("effector").Event<{ employeeId: string; }>; loadEmployeeEditLayoutFx: import("effector").Effect<{ employeeId: string; }, GenModels.LayoutViewModel, Error>; canShowEmployeeCreateDialog: import("effector").Event<{ parentSection: IStaffTreeRow; }>; showEmployeeCreateDialog: import("effector").Event<{ parentSection: IStaffTreeRow; }>; loadEmployeeCreateLayoutFx: import("effector").Effect<{ parentSection: IStaffTreeRow; }, GenModels.LayoutViewModel, Error>; initEmployeeModals(): void; showStaffSecuritySettings: import("effector").Event<{ staffSectionId?: string; descriptorTargetType?: number; }>; canDeleteStaff: import("effector").Event<{ staffSectionId?: string; }>; deleteStaff: import("effector").Event<{ staffSectionId?: string; }>; deleteStaffFx: import("effector").Effect<{ staff?: IStaffTreeRow; }, void, Error>; $deletingStaff: import("effector").Store<IStaffTreeRow[]>; confirmDeleteFx: import("effector").Effect<{ entityName: string; isSection: boolean; dataType: GenModels.DirectoryDataType; }, void, Error>; $loadingStaff: import("effector").Store<IStaffTreeRow[]>; copyStaff: import("effector").Event<{ copyStaff: IStaffTreeRow; }>; cancelCopied: import("effector").Event<void>; $copiedStaffTabId: import("effector").Store<string>; $copiedStaffId: import("effector").Store<string>; $cutFlag: import("effector").Store<boolean>; $copyFlag: import("effector").Store<boolean>; $isEmployeeTabFlag: import("effector").Store<boolean>; $copiedDirectory: import("effector").Store<string>; $pasteVisibilityFlag: import("effector").Store<boolean>; cutStaff: import("effector").Event<{ cutStaff: IStaffTreeRow; }>; cutStaffItem: import("effector").Event<{ cutStaff: IStaffTreeRow; parentStaffId?: string; }>; copyStaffItem: import("effector").Event<{ copyStaff: IStaffTreeRow; }>; pasteStaff: import("effector").Effect<{ parentStaffId: string; }, void, Error>; getStaffPasteMenuItemVisible(rowId: string): boolean; getTargetId(parentId: string): string; isStaffCutButtonVisible(): boolean; initStaffContextMenu(options: IStaffDirectoryLogicOptions): void; canDeleteEmployee: import("effector").Event<{ employee: IRow; }>; deleteEmployee: import("effector").Event<{ employee: IRow; }>; deleteEmployeeFx: import("effector").Effect<{ employee: IRow; }, void, Error>; $deletingEmployees: import("effector").Store<IRow[]>; $loadingEmployees: import("effector").Store<IRow[]>; initEmployeesContextMenu(options: IStaffDirectoryLogicOptions): void; $showAll: import("effector").Store<boolean>; showAllToggle: import("effector").Event<boolean>; initShowAllToggler(): void; $searchResult: import("effector").Store< import("@docsvision/webclient/DirectoryEdit/DirectorySearchResult").StaffResponse>; $searchLoading: import("effector").Store<LoadingStatus>; startSearch: import("effector").Event<{ searchFilterKey: SearchFilters; searchText: string; }>; startSearchFx: import("effector").Effect<{ searchFilterKey: SearchFilters; searchText: string; }, import("@docsvision/webclient/DirectoryEdit/DirectorySearchResult").StaffResponse, Error>; loadStaffDirectoryResultFx: import("effector").Effect<{}, import("@docsvision/webclient/DirectoryEdit/DirectorySearchResult").StaffResponse, Error>; $selectedSearchItem: import("effector").Store<GenModels.SearchItemModel>; searchItemSelect: import("effector").Event<GenModels.SearchItemModel>; $searchResultsExpanded: import("effector").Store<boolean>; onSearchResultsExpanded: import("effector").Event<boolean>; clearSearch: import("effector").Event<void>; $searchItemEmployeeId: import("effector").Store<string>; initSearch(): void; getSearchItemPath(item: GenModels.SearchItemModel): GenModels.SearchItemModel[]; init(options: IStaffDirectoryLogicOptions): void; }