eehitus-building-project-file-ui 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.LICENSE.txt +9 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.LICENSE.txt +9 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.LICENSE.txt +9 -0
- package/dist/l10n/eehitus-building-project-file-ui-combined_translations_en.json +1 -0
- package/dist/l10n/eehitus-building-project-file-ui-combined_translations_et.json +1 -0
- package/dist/l10n/eehitus-building-project-file-ui-combined_translations_ru.json +1 -0
- package/dist/main.css +1 -0
- package/dist/static/media/ak.dfcba293e2e8c288237a85a4f823087c.svg +6 -0
- package/dist/static/media/arrow_down.6220e5a4885b3d8220b156ba0cfe2c07.svg +3 -0
- package/dist/static/media/arrow_up.46b80f22009e4099899b4477c1b0ac49.svg +3 -0
- package/dist/static/media/check_circle.dc750a2af8aca9eb433c166883bbe99c.svg +4 -0
- package/dist/static/media/delete.47af269c4d6503daf5024d1eb416b0cb.svg +3 -0
- package/dist/static/media/download.0334e60198d3d8eed8c72e8702b0e39b.svg +3 -0
- package/dist/static/media/edit.e7f8e441b583cb9380c3048cb9296b88.svg +3 -0
- package/dist/static/media/error_circle.2603215ea0cd250f60da46bf6d2f9e3b.svg +4 -0
- package/dist/static/media/error_filled.421a0ef396d8b16437eb535e9dcd5cd7.svg +3 -0
- package/dist/static/media/lock.fc819f1420d8194c412c6e9555d30ab7.svg +3 -0
- package/dist/static/media/upload.821f5e1a467c8021af41433aa0f0ef0e.svg +3 -0
- package/dist/static/media/warning_circle.1b7b67b715cb51e77763ab8b1a86b8e1.svg +4 -0
- package/dist/types/App.d.ts +3 -0
- package/dist/types/Reducer.d.ts +4 -0
- package/dist/types/__mocks__/fileMock.d.ts +2 -0
- package/dist/types/ehr-minimal-frame/App.d.ts +5 -0
- package/dist/types/ehr-minimal-frame/NavBar/CreatePortal.d.ts +6 -0
- package/dist/types/ehr-minimal-frame/NavBar/NavBar.d.ts +8 -0
- package/dist/types/ehr-minimal-frame/NavBar/NavBarWrapper.d.ts +15 -0
- package/dist/types/ehr-minimal-frame/NavBar/components/ActiveUser.d.ts +5 -0
- package/dist/types/ehr-minimal-frame/NavBar/components/NavBarRight.d.ts +2 -0
- package/dist/types/ehr-minimal-frame/Reducer.d.ts +16 -0
- package/dist/types/ehr-minimal-frame/index.d.ts +1 -0
- package/dist/types/ehr-minimal-frame/types/common-types.d.ts +7 -0
- package/dist/types/ehr-minimal-frame/util/url-constants.d.ts +8 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/indexExport.d.ts +3 -0
- package/dist/types/library/App.d.ts +28 -0
- package/dist/types/library/actions/BaseProjectActions.d.ts +29 -0
- package/dist/types/library/actions/CodeToTextActions.d.ts +20 -0
- package/dist/types/library/actions/EditFileActions.d.ts +50 -0
- package/dist/types/library/actions/FiltersActions.d.ts +34 -0
- package/dist/types/library/actions/PermissionsActions.d.ts +12 -0
- package/dist/types/library/actions/ProjectActions.d.ts +142 -0
- package/dist/types/library/actions/ReplaceFileActions.d.ts +33 -0
- package/dist/types/library/actions/RestrictFilesActions.d.ts +33 -0
- package/dist/types/library/actions/SignActions.d.ts +24 -0
- package/dist/types/library/actions/SignPopupActions.d.ts +53 -0
- package/dist/types/library/actions/UiActions.d.ts +43 -0
- package/dist/types/library/common/Phone.d.ts +13 -0
- package/dist/types/library/components/Alert/Alert.d.ts +10 -0
- package/dist/types/library/components/Alert/AlertContainer.d.ts +7 -0
- package/dist/types/library/components/Alert/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/GrupiMarksona/GrupiMarksona.d.ts +6 -0
- package/dist/types/library/components/CodeToTexts/GrupiMarksona/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/Grupp/Grupp.d.ts +7 -0
- package/dist/types/library/components/CodeToTexts/Grupp/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/ProjektiOsa/ProjektiOsa.d.ts +6 -0
- package/dist/types/library/components/CodeToTexts/ProjektiOsa/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/ProjektiStaadium/ProjektiStaadium.d.ts +6 -0
- package/dist/types/library/components/CodeToTexts/ProjektiStaadium/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/TemplateCodeToText/TemplateCodeToText.d.ts +20 -0
- package/dist/types/library/components/CodeToTexts/TemplateCodeToText/TemplateCodeToTextContainer.d.ts +14 -0
- package/dist/types/library/components/CodeToTexts/TemplateCodeToText/index.d.ts +1 -0
- package/dist/types/library/components/CodeToTexts/index.d.ts +4 -0
- package/dist/types/library/components/Filters/Filters.d.ts +19 -0
- package/dist/types/library/components/Filters/FiltersContainer.d.ts +7 -0
- package/dist/types/library/components/Filters/index.d.ts +1 -0
- package/dist/types/library/components/Input/Input.d.ts +7 -0
- package/dist/types/library/components/Input/index.d.ts +1 -0
- package/dist/types/library/components/Main/Main.d.ts +21 -0
- package/dist/types/library/components/Main/MainContainer.d.ts +9 -0
- package/dist/types/library/components/Main/index.d.ts +1 -0
- package/dist/types/library/components/PaginatedTable/PaginatedTable.d.ts +35 -0
- package/dist/types/library/components/PaginatedTable/PaginatedTableContainer.d.ts +7 -0
- package/dist/types/library/components/PaginatedTable/RestrictedMessage/RestrictedMessage.d.ts +9 -0
- package/dist/types/library/components/PaginatedTable/RestrictedMessage/index.d.ts +1 -0
- package/dist/types/library/components/PaginatedTable/SortableRow/SortableRow.d.ts +11 -0
- package/dist/types/library/components/PaginatedTable/SortableRow/index.d.ts +1 -0
- package/dist/types/library/components/PaginatedTable/index.d.ts +1 -0
- package/dist/types/library/components/PopupEditFile/PopupEditFile.d.ts +23 -0
- package/dist/types/library/components/PopupEditFile/PopupEditFileContainer.d.ts +7 -0
- package/dist/types/library/components/PopupEditFile/PopupEditFileError.d.ts +7 -0
- package/dist/types/library/components/PopupEditFile/index.d.ts +1 -0
- package/dist/types/library/components/PopupMakeConfidential/PopupMakeConfidential.d.ts +9 -0
- package/dist/types/library/components/PopupMakeConfidential/PopupMakeConfidentialContainer.d.ts +7 -0
- package/dist/types/library/components/PopupMakeConfidential/index.d.ts +1 -0
- package/dist/types/library/components/PopupModal/PopupModal.d.ts +20 -0
- package/dist/types/library/components/PopupModal/PopupModalContainer.d.ts +9 -0
- package/dist/types/library/components/PopupModal/index.d.ts +1 -0
- package/dist/types/library/components/PopupReleaseAccess/PopupReleaseAccess.d.ts +14 -0
- package/dist/types/library/components/PopupReleaseAccess/PopupReleaseAccessContainer.d.ts +7 -0
- package/dist/types/library/components/PopupReleaseAccess/index.d.ts +1 -0
- package/dist/types/library/components/PopupReplaceFile/PopupReplaceFile.d.ts +12 -0
- package/dist/types/library/components/PopupReplaceFile/PopupReplaceFileContainer.d.ts +7 -0
- package/dist/types/library/components/PopupReplaceFile/index.d.ts +1 -0
- package/dist/types/library/components/PopupRestrictAccess/PopupRestrictAccess.d.ts +14 -0
- package/dist/types/library/components/PopupRestrictAccess/PopupRestrictAccessContainer.d.ts +7 -0
- package/dist/types/library/components/PopupRestrictAccess/index.d.ts +1 -0
- package/dist/types/library/components/PopupSignDocumentsList/PopupSignDocumentsList.d.ts +20 -0
- package/dist/types/library/components/PopupSignDocumentsList/PopupSignDocumentsListContainer.d.ts +7 -0
- package/dist/types/library/components/PopupSignDocumentsList/index.d.ts +1 -0
- package/dist/types/library/components/ProjectCreator/ProjectCreator.d.ts +26 -0
- package/dist/types/library/components/ProjectCreator/ProjectCreatorContainer.d.ts +7 -0
- package/dist/types/library/components/ProjectCreator/index.d.ts +1 -0
- package/dist/types/library/components/ProjectCreator/steps/CreationLegacy.d.ts +11 -0
- package/dist/types/library/components/ProjectCreator/steps/CreationStep1.d.ts +14 -0
- package/dist/types/library/components/ProjectTypeFilter/ProjectTypeFilter.d.ts +10 -0
- package/dist/types/library/components/ProjectTypeFilter/ProjectTypeFilterContainer.d.ts +1 -0
- package/dist/types/library/components/ProjectTypeFilter/index.d.ts +1 -0
- package/dist/types/library/components/SignPopup/SignPopup.d.ts +18 -0
- package/dist/types/library/components/SignPopup/SignPopupContainer.d.ts +7 -0
- package/dist/types/library/components/SignPopup/index.d.ts +1 -0
- package/dist/types/library/components/SimpleTable/SimpleTable.d.ts +8 -0
- package/dist/types/library/components/SimpleTable/index.d.ts +1 -0
- package/dist/types/library/components/TableFooter/TableFooter.d.ts +36 -0
- package/dist/types/library/components/TableFooter/TableFooter.test.d.ts +1 -0
- package/dist/types/library/components/TableFooter/TableFooterContainer.d.ts +8 -0
- package/dist/types/library/components/TableFooter/index.d.ts +1 -0
- package/dist/types/library/components/helpers/generateId.d.ts +1 -0
- package/dist/types/library/components/helpers/printDate.d.ts +2 -0
- package/dist/types/library/components/utils/test-utils.d.ts +9 -0
- package/dist/types/library/configureStore.d.ts +17 -0
- package/dist/types/library/featureFlags.d.ts +7 -0
- package/dist/types/library/helpers/RegString.d.ts +3 -0
- package/dist/types/library/helpers/errorHandler.d.ts +3 -0
- package/dist/types/library/helpers/fileDownload.d.ts +2 -0
- package/dist/types/library/helpers/index.d.ts +3 -0
- package/dist/types/library/hooks.d.ts +17 -0
- package/dist/types/library/reducers/baseProjectReducer.d.ts +15 -0
- package/dist/types/library/reducers/codeToTextReducer.d.ts +14 -0
- package/dist/types/library/reducers/editFileReducer.d.ts +32 -0
- package/dist/types/library/reducers/filtersReducer.d.ts +12 -0
- package/dist/types/library/reducers/index.d.ts +51 -0
- package/dist/types/library/reducers/permissionsReducer.d.ts +16 -0
- package/dist/types/library/reducers/projectReducer.d.ts +64 -0
- package/dist/types/library/reducers/replaceFileReducer.d.ts +7 -0
- package/dist/types/library/reducers/restrictFilesReducer.d.ts +7 -0
- package/dist/types/library/reducers/signPopupReducer.d.ts +16 -0
- package/dist/types/library/reducers/signReducer.d.ts +13 -0
- package/dist/types/library/reducers/uiReducer.d.ts +35 -0
- package/dist/types/mocks/storeMocks.d.ts +25 -0
- package/dist/types/rbac-rules.d.ts +57 -0
- package/dist/types/setupProxy.d.ts +2 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/package.json +219 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProjectInfo } from '../../../reducers/baseProjectReducer';
|
|
3
|
+
export interface CreationStep1Props {
|
|
4
|
+
canAddAudit: boolean;
|
|
5
|
+
canReferenceBaseProject: boolean;
|
|
6
|
+
baseProjectInfo: BaseProjectInfo | null;
|
|
7
|
+
navigateForwardNormal: () => void;
|
|
8
|
+
navigateForwardLegacy: () => void;
|
|
9
|
+
navigateForwardReferenceBase: () => void;
|
|
10
|
+
navigateForwardAudit: () => void;
|
|
11
|
+
isDisabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const CreationStep1: React.FC<CreationStep1Props>;
|
|
14
|
+
export default CreationStep1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ProjectTypeState {
|
|
3
|
+
names: string[];
|
|
4
|
+
selected: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ProjectTypeDispatch {
|
|
7
|
+
onTypeClick: (name: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const ProjectTypeFilter: React.FC<ProjectTypeState & ProjectTypeDispatch>;
|
|
10
|
+
export default ProjectTypeFilter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SignMethod } from '../../reducers/signPopupReducer';
|
|
3
|
+
export interface SignPopupState {
|
|
4
|
+
method: SignMethod;
|
|
5
|
+
challenge: string | undefined;
|
|
6
|
+
signInProgress: boolean;
|
|
7
|
+
revision: string | undefined;
|
|
8
|
+
projektiOsa: string | undefined;
|
|
9
|
+
mobileNumber: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface SignPopupDispatch {
|
|
12
|
+
onContinue: () => void;
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
setSignMethod: (method: SignMethod) => void;
|
|
15
|
+
setMobileNumber: (number: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const SignPopup: React.FC<SignPopupState & SignPopupDispatch>;
|
|
18
|
+
export default SignPopup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SignPopupDispatch, SignPopupState } from './SignPopup';
|
|
3
|
+
declare const _default: import("react-redux").ConnectedComponent<import("react").FC<SignPopupState & SignPopupDispatch>, {
|
|
4
|
+
context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
5
|
+
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SignPopupContainer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SimpleTable';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GlobalPermissions } from '../../reducers/permissionsReducer';
|
|
3
|
+
import { ButtonConfig } from '../../App';
|
|
4
|
+
export interface TableFooterState {
|
|
5
|
+
selectedFileIds: string[];
|
|
6
|
+
requestsInProgress: number;
|
|
7
|
+
deletionPending: boolean;
|
|
8
|
+
allowedExtensions: string[];
|
|
9
|
+
isLegacyProject: boolean;
|
|
10
|
+
isAudit: boolean;
|
|
11
|
+
permissions: GlobalPermissions;
|
|
12
|
+
isBlockingRequestInProgress: boolean;
|
|
13
|
+
isRestrictedFileSelected: boolean;
|
|
14
|
+
isNonRestrictedFilesSelected: boolean;
|
|
15
|
+
hasRestrictedFiles: boolean;
|
|
16
|
+
fileCount: number;
|
|
17
|
+
}
|
|
18
|
+
export interface TableFooterDispatch {
|
|
19
|
+
toggleSignRefusalPopup: (b: boolean) => void;
|
|
20
|
+
toggleSignDocumentListPopup: (b: boolean) => void;
|
|
21
|
+
toggleRestrictAccessPopupWith: (fileIds: string[]) => void;
|
|
22
|
+
toggleReleaseAccessPopupWith: (fileIds: string[]) => void;
|
|
23
|
+
requestDeleteProject: () => void;
|
|
24
|
+
uploadFiles: (files: File[]) => void;
|
|
25
|
+
requestDeleteFile: (then?: () => void) => void;
|
|
26
|
+
downloadFiles: (then?: () => void) => void;
|
|
27
|
+
downloadLegacyContainer: (then?: () => void) => void;
|
|
28
|
+
clearSelectedFiles: () => void;
|
|
29
|
+
createProject: () => void;
|
|
30
|
+
cloneReferencedForEditing: () => void;
|
|
31
|
+
}
|
|
32
|
+
export interface TableFooteProps {
|
|
33
|
+
buttonConfig?: ButtonConfig[];
|
|
34
|
+
}
|
|
35
|
+
declare const TableFooter: React.FC<TableFooterState & TableFooterDispatch & TableFooteProps>;
|
|
36
|
+
export default TableFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableFooterDispatch, TableFooterState } from './TableFooter';
|
|
3
|
+
declare const _default: import("react-redux").ConnectedComponent<import("react").FC<TableFooterState & TableFooterDispatch & import("./TableFooter").TableFooteProps>, {
|
|
4
|
+
buttonConfig?: import("../../App").ButtonConfig[] | undefined;
|
|
5
|
+
context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
6
|
+
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TableFooterContainer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function generateId(prefix?: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { RenderOptions } from '@testing-library/react';
|
|
3
|
+
export declare const AllTheProviders: ({ children, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
7
|
+
export * from '@testing-library/react';
|
|
8
|
+
export { customRender as render };
|
|
9
|
+
export declare const mockKeyCloakInfo: (mockedUserInfo: any) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Doc2State } from './reducers';
|
|
2
|
+
declare const configureStoreWithState: (initialState: Partial<Doc2State>) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
3
|
+
uiState: import("./reducers/uiReducer").UiState;
|
|
4
|
+
filtersState: import("./reducers/filtersReducer").FiltersState;
|
|
5
|
+
projectState: import("./reducers/projectReducer").ProjectState;
|
|
6
|
+
baseProjectState: import("./reducers/baseProjectReducer").BaseProjectState;
|
|
7
|
+
editFileState: import("./reducers/editFileReducer").EditFileState;
|
|
8
|
+
restrictFilesState: import("./reducers/restrictFilesReducer").RestrictFilesState;
|
|
9
|
+
signState: import("./reducers/signReducer").SignState;
|
|
10
|
+
codeToTextState: import("./reducers/codeToTextReducer").CodeToTextState;
|
|
11
|
+
replaceFileState: import("./reducers/replaceFileReducer").ReplaceFileState;
|
|
12
|
+
signPopup: import("./reducers/signPopupReducer").SignPopupState;
|
|
13
|
+
permissions: import("./reducers/permissionsReducer").PermissionsState;
|
|
14
|
+
}, import("./actions/UiActions").UiActions | import("./actions/FiltersActions").FiltersActions | import("./actions/BaseProjectActions").BaseProjectActions | import("./actions/ProjectActions").ProjectActions | import("./actions/PermissionsActions").SetPermissions | import("./actions/CodeToTextActions").SetCodeToText | import("./actions/SignActions").SignActions | import("./actions/EditFileActions").EditFileActions | import("./actions/ReplaceFileActions").ReplaceFileActions | import("./actions/SignPopupActions").SignPopupActions | import("./actions/RestrictFilesActions").RestrictFilesActions, any[]>;
|
|
15
|
+
export default configureStoreWithState;
|
|
16
|
+
export type RootState = ReturnType<ReturnType<typeof configureStoreWithState>['getState']>;
|
|
17
|
+
export type AppDispatch = ReturnType<typeof configureStoreWithState>['dispatch'];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Should the file replacement UI be shown */
|
|
2
|
+
export declare const ALLOW_REPLACING_FILES = false;
|
|
3
|
+
/** How many items to display per page */
|
|
4
|
+
export declare const PAGE_SIZE = 25;
|
|
5
|
+
export declare const IS_DEVELOPMENT: boolean;
|
|
6
|
+
/** Log redux updates to the console */
|
|
7
|
+
export declare const DEVELOPMENT_LOG_REDUX_UPDATES: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TypedUseSelectorHook } from 'react-redux';
|
|
2
|
+
import type { RootState, AppDispatch } from './configureStore';
|
|
3
|
+
export declare const useAppDispatch: () => AppDispatch;
|
|
4
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
5
|
+
export declare const useAppStore: () => import("redux").Store<import("redux").EmptyObject & {
|
|
6
|
+
uiState: import("./reducers/uiReducer").UiState;
|
|
7
|
+
filtersState: import("./reducers/filtersReducer").FiltersState;
|
|
8
|
+
projectState: import("./reducers/projectReducer").ProjectState;
|
|
9
|
+
baseProjectState: import("./reducers/baseProjectReducer").BaseProjectState;
|
|
10
|
+
editFileState: import("./reducers/editFileReducer").EditFileState;
|
|
11
|
+
restrictFilesState: import("./reducers/restrictFilesReducer").RestrictFilesState;
|
|
12
|
+
signState: import("./reducers/signReducer").SignState;
|
|
13
|
+
codeToTextState: import("./reducers/codeToTextReducer").CodeToTextState;
|
|
14
|
+
replaceFileState: import("./reducers/replaceFileReducer").ReplaceFileState;
|
|
15
|
+
signPopup: import("./reducers/signPopupReducer").SignPopupState;
|
|
16
|
+
permissions: import("./reducers/permissionsReducer").PermissionsState;
|
|
17
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseProjectActions } from '../actions/BaseProjectActions';
|
|
2
|
+
export interface BaseProjectInfo {
|
|
3
|
+
type: string;
|
|
4
|
+
nr: string;
|
|
5
|
+
signatureDate: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
documentTypeName: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BaseProjectState {
|
|
10
|
+
referenceCreating: boolean;
|
|
11
|
+
referenceCloning: boolean;
|
|
12
|
+
info: BaseProjectInfo | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const BaseProjectInitialState: BaseProjectState;
|
|
15
|
+
export declare function baseProjectReducer(state: BaseProjectState | undefined, action: BaseProjectActions): BaseProjectState;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CodeToTextActions } from '../actions/CodeToTextActions';
|
|
2
|
+
export interface CodeTextDTO {
|
|
3
|
+
code: string;
|
|
4
|
+
parentCode: string | undefined;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CodeToTextState {
|
|
8
|
+
grupiMarksona: CodeTextDTO[];
|
|
9
|
+
grupp: CodeTextDTO[];
|
|
10
|
+
projektiOsa: CodeTextDTO[];
|
|
11
|
+
projektiStaadium: CodeTextDTO[];
|
|
12
|
+
ehitised: CodeTextDTO[];
|
|
13
|
+
}
|
|
14
|
+
export declare function codeToTextReducer(state: CodeToTextState | undefined, action: CodeToTextActions): CodeToTextState;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EditFileActions } from '../actions/EditFileActions';
|
|
2
|
+
type RawEditError = {
|
|
3
|
+
field: string;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
type IntlEditError = {
|
|
7
|
+
field: string;
|
|
8
|
+
intlMessage: string;
|
|
9
|
+
};
|
|
10
|
+
export type EditErrorInput = RawEditError | IntlEditError;
|
|
11
|
+
export type EditError = (RawEditError | IntlEditError) & {
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
export interface EditBuildingFile {
|
|
15
|
+
id: string;
|
|
16
|
+
fileName?: string;
|
|
17
|
+
projektiTunnus?: string;
|
|
18
|
+
projektiStaadium?: string | null;
|
|
19
|
+
projektiOsa?: string;
|
|
20
|
+
grupp?: string | null;
|
|
21
|
+
jrkNr?: string | null;
|
|
22
|
+
selgitus?: string;
|
|
23
|
+
ehitiseSeos?: string | null;
|
|
24
|
+
uploadedAt?: Date;
|
|
25
|
+
}
|
|
26
|
+
export interface EditFileState {
|
|
27
|
+
editFile: EditBuildingFile | undefined;
|
|
28
|
+
errors: EditError[];
|
|
29
|
+
responsePending: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function editFileReducer(state: EditFileState | undefined, action: EditFileActions): EditFileState;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FiltersActions } from '../actions/FiltersActions';
|
|
2
|
+
import { BuildingFileKeys } from './projectReducer';
|
|
3
|
+
export type FileFilter = {
|
|
4
|
+
selector: BuildingFileKeys;
|
|
5
|
+
values: string[];
|
|
6
|
+
};
|
|
7
|
+
export type FileFilterValues = Partial<Record<BuildingFileKeys, string[]>>;
|
|
8
|
+
export interface FiltersState {
|
|
9
|
+
filters: readonly FileFilter[];
|
|
10
|
+
possibleValues: FileFilterValues;
|
|
11
|
+
}
|
|
12
|
+
export declare function filtersReducer(state: FiltersState | undefined, action: FiltersActions): FiltersState;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UiState, uiReducer } from './uiReducer';
|
|
2
|
+
import { filtersReducer, FiltersState } from './filtersReducer';
|
|
3
|
+
import { projectReducer, ProjectState } from './projectReducer';
|
|
4
|
+
import { baseProjectReducer, BaseProjectState } from './baseProjectReducer';
|
|
5
|
+
import { editFileReducer, EditFileState } from './editFileReducer';
|
|
6
|
+
import { signReducer, SignState } from './signReducer';
|
|
7
|
+
import { codeToTextReducer, CodeToTextState } from './codeToTextReducer';
|
|
8
|
+
import { replaceFileReducer, ReplaceFileState } from './replaceFileReducer';
|
|
9
|
+
import { signPopupReducer, SignPopupState } from './signPopupReducer';
|
|
10
|
+
import { permissionsReducer, PermissionsState } from './permissionsReducer';
|
|
11
|
+
import { restrictFilesReducer, RestrictFilesState } from './restrictFilesReducer';
|
|
12
|
+
export type Doc2State = {
|
|
13
|
+
uiState: UiState;
|
|
14
|
+
filtersState: FiltersState;
|
|
15
|
+
projectState: ProjectState;
|
|
16
|
+
baseProjectState: BaseProjectState;
|
|
17
|
+
editFileState: EditFileState;
|
|
18
|
+
restrictFilesState: RestrictFilesState;
|
|
19
|
+
signState: SignState;
|
|
20
|
+
codeToTextState: CodeToTextState;
|
|
21
|
+
replaceFileState: ReplaceFileState;
|
|
22
|
+
signPopup: SignPopupState;
|
|
23
|
+
permissions: PermissionsState;
|
|
24
|
+
};
|
|
25
|
+
export declare const reducers: {
|
|
26
|
+
uiState: typeof uiReducer;
|
|
27
|
+
filtersState: typeof filtersReducer;
|
|
28
|
+
projectState: typeof projectReducer;
|
|
29
|
+
baseProjectState: typeof baseProjectReducer;
|
|
30
|
+
editFileState: typeof editFileReducer;
|
|
31
|
+
restrictFilesState: typeof restrictFilesReducer;
|
|
32
|
+
signState: typeof signReducer;
|
|
33
|
+
codeToTextState: typeof codeToTextReducer;
|
|
34
|
+
replaceFileState: typeof replaceFileReducer;
|
|
35
|
+
signPopup: typeof signPopupReducer;
|
|
36
|
+
permissions: typeof permissionsReducer;
|
|
37
|
+
};
|
|
38
|
+
declare const _default: import("redux").Reducer<import("redux").CombinedState<{
|
|
39
|
+
uiState: UiState;
|
|
40
|
+
filtersState: FiltersState;
|
|
41
|
+
projectState: ProjectState;
|
|
42
|
+
baseProjectState: BaseProjectState;
|
|
43
|
+
editFileState: EditFileState;
|
|
44
|
+
restrictFilesState: RestrictFilesState;
|
|
45
|
+
signState: SignState;
|
|
46
|
+
codeToTextState: CodeToTextState;
|
|
47
|
+
replaceFileState: ReplaceFileState;
|
|
48
|
+
signPopup: SignPopupState;
|
|
49
|
+
permissions: PermissionsState;
|
|
50
|
+
}>, import("../actions/UiActions").UiActions | import("../actions/FiltersActions").FiltersActions | import("../actions/BaseProjectActions").BaseProjectActions | import("../actions/ProjectActions").ProjectActions | import("../actions/PermissionsActions").SetPermissions | import("../actions/CodeToTextActions").SetCodeToText | import("../actions/SignActions").SignActions | import("../actions/EditFileActions").EditFileActions | import("../actions/ReplaceFileActions").ReplaceFileActions | import("../actions/SignPopupActions").SignPopupActions | import("../actions/RestrictFilesActions").RestrictFilesActions>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PermissionsActions } from '../actions/PermissionsActions';
|
|
2
|
+
export interface GlobalPermissions {
|
|
3
|
+
canCreateNewVersion: boolean;
|
|
4
|
+
canRead: boolean;
|
|
5
|
+
canAccessFiles: boolean;
|
|
6
|
+
canWrite: boolean;
|
|
7
|
+
canDelete: boolean;
|
|
8
|
+
canSign: boolean;
|
|
9
|
+
canCreateRestrictions: boolean;
|
|
10
|
+
canAccessRestrictedFiles: boolean;
|
|
11
|
+
canCloneForEditing: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface PermissionsState {
|
|
14
|
+
permissions: GlobalPermissions;
|
|
15
|
+
}
|
|
16
|
+
export declare function permissionsReducer(state: PermissionsState | undefined, action: PermissionsActions): PermissionsState;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ProjectActions } from '../actions/ProjectActions';
|
|
2
|
+
export interface BuildingFileSigner {
|
|
3
|
+
name: string;
|
|
4
|
+
date: Date;
|
|
5
|
+
}
|
|
6
|
+
export interface BuildingFile {
|
|
7
|
+
id: string;
|
|
8
|
+
failiNimetus: string | null;
|
|
9
|
+
fileReference: string | null;
|
|
10
|
+
projTunnus: string | null;
|
|
11
|
+
projStaadium: string | null;
|
|
12
|
+
projOsa: string | null;
|
|
13
|
+
grupp: string | null;
|
|
14
|
+
jrkNr: string | null;
|
|
15
|
+
ehitiseSeos: string | null;
|
|
16
|
+
errorMessages: readonly string[];
|
|
17
|
+
locked: boolean;
|
|
18
|
+
dateCreated: string | null;
|
|
19
|
+
/** Has the file changed between the latest two revisions of the project */
|
|
20
|
+
hasChanged: boolean;
|
|
21
|
+
akPiirang: AkPiirang | null;
|
|
22
|
+
signers: readonly BuildingFileSigner[];
|
|
23
|
+
}
|
|
24
|
+
export interface AkPiirang {
|
|
25
|
+
teabeValdaja: string;
|
|
26
|
+
juriidilineAlus: string;
|
|
27
|
+
pohjendus: string;
|
|
28
|
+
piirangAlgus: string;
|
|
29
|
+
piirangLopp: string;
|
|
30
|
+
}
|
|
31
|
+
export type BuildingFileKeys = keyof BuildingFile;
|
|
32
|
+
export declare enum ProjectCreationType {
|
|
33
|
+
NORMAL = "NORMAL",
|
|
34
|
+
LEGACY = "LEGACY",
|
|
35
|
+
AUDIT = "AUDIT",
|
|
36
|
+
REFERENCE = "REFERENCE"
|
|
37
|
+
}
|
|
38
|
+
export interface ProjectState {
|
|
39
|
+
applicationId: string | undefined;
|
|
40
|
+
isProceeding: boolean;
|
|
41
|
+
isLoadingCurrentProject: boolean;
|
|
42
|
+
projectCreation: boolean;
|
|
43
|
+
projectCreationType: ProjectCreationType | undefined;
|
|
44
|
+
projectCreationStep: number;
|
|
45
|
+
canAddAudit: boolean;
|
|
46
|
+
canReferenceBaseProject: boolean;
|
|
47
|
+
projectId: string | undefined;
|
|
48
|
+
applicationType: string | undefined;
|
|
49
|
+
isReference: boolean;
|
|
50
|
+
createProjectSending: boolean;
|
|
51
|
+
legacy: boolean;
|
|
52
|
+
readOnly: boolean;
|
|
53
|
+
allowedExtensions: string[];
|
|
54
|
+
projectFiles: readonly BuildingFile[];
|
|
55
|
+
filesHaveErrors: boolean;
|
|
56
|
+
requestsInProgress: number;
|
|
57
|
+
blockingRequestsInProgress: number;
|
|
58
|
+
openPopoverId: string | undefined;
|
|
59
|
+
selectedFilesIds: string[];
|
|
60
|
+
deletionPending: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const initialProjectFiles: readonly BuildingFile[];
|
|
63
|
+
export declare const ProjectInitialState: ProjectState;
|
|
64
|
+
export declare function projectReducer(state: ProjectState | undefined, action: ProjectActions): ProjectState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReplaceFileActions } from '../actions/ReplaceFileActions';
|
|
2
|
+
export interface ReplaceFileState {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
uploadInProgress: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function replaceFileReducer(state: ReplaceFileState | undefined, action: ReplaceFileActions): ReplaceFileState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RestrictFilesActions } from '../actions/RestrictFilesActions';
|
|
2
|
+
export interface RestrictFilesState {
|
|
3
|
+
fileIds: string[] | undefined;
|
|
4
|
+
releaseFileIds: string[] | undefined;
|
|
5
|
+
requestsInProgress: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function restrictFilesReducer(state: RestrictFilesState | undefined, action: RestrictFilesActions): RestrictFilesState;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SignPopupActions } from '../actions/SignPopupActions';
|
|
2
|
+
export declare enum SignMethod {
|
|
3
|
+
ID_CARD = "ID_CARD",
|
|
4
|
+
MOBILE_ID = "MOBILE_ID",
|
|
5
|
+
SMART_ID = "SMART_ID"
|
|
6
|
+
}
|
|
7
|
+
export interface SignPopupState {
|
|
8
|
+
method: SignMethod;
|
|
9
|
+
signInProgress: boolean;
|
|
10
|
+
challenge: string | undefined;
|
|
11
|
+
sessionId: string | undefined;
|
|
12
|
+
revision: string | undefined;
|
|
13
|
+
projektiOsa: string | 'SIGN_CONTAINER' | undefined;
|
|
14
|
+
mobileNumber: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function signPopupReducer(state: SignPopupState | undefined, action: SignPopupActions): SignPopupState;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SignActions } from '../actions/SignActions';
|
|
2
|
+
import { BuildingFileSigner } from './projectReducer';
|
|
3
|
+
export interface TypeSignerTuple {
|
|
4
|
+
type: string;
|
|
5
|
+
signed: boolean;
|
|
6
|
+
revision: string;
|
|
7
|
+
signers: readonly BuildingFileSigner[];
|
|
8
|
+
}
|
|
9
|
+
export interface SignState {
|
|
10
|
+
projectTypes: readonly TypeSignerTuple[];
|
|
11
|
+
projectContainer: TypeSignerTuple;
|
|
12
|
+
}
|
|
13
|
+
export declare function signReducer(state: SignState | undefined, action: SignActions): SignState;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UiActions } from '../actions/UiActions';
|
|
2
|
+
type RawAlert = {
|
|
3
|
+
error?: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
type IntlAlert = {
|
|
8
|
+
error?: boolean;
|
|
9
|
+
intlTitle: string;
|
|
10
|
+
intlMessage?: string;
|
|
11
|
+
};
|
|
12
|
+
type TemplateAlert = {
|
|
13
|
+
error?: boolean;
|
|
14
|
+
template: AlertTemplate;
|
|
15
|
+
props?: any;
|
|
16
|
+
};
|
|
17
|
+
export declare enum AlertTemplate {
|
|
18
|
+
FileRestricted = 0
|
|
19
|
+
}
|
|
20
|
+
export type AlertInput = RawAlert | IntlAlert | TemplateAlert;
|
|
21
|
+
export type Alert = (RawAlert | IntlAlert | TemplateAlert) & {
|
|
22
|
+
id: string;
|
|
23
|
+
error: boolean;
|
|
24
|
+
};
|
|
25
|
+
export interface UiState {
|
|
26
|
+
alerts: Alert[];
|
|
27
|
+
signRefusalOpen: boolean;
|
|
28
|
+
makeConfidentialOpen: boolean;
|
|
29
|
+
signDocumentListOpen: boolean;
|
|
30
|
+
restrictAccessOpen: boolean;
|
|
31
|
+
replaceFileOpen: boolean;
|
|
32
|
+
enableFilter: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function uiReducer(state: UiState | undefined, action: UiActions): UiState;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const testStoreValue: {
|
|
2
|
+
keycloak: {
|
|
3
|
+
authenticated: boolean;
|
|
4
|
+
};
|
|
5
|
+
rules: never[];
|
|
6
|
+
profile: {
|
|
7
|
+
privileges: never[];
|
|
8
|
+
};
|
|
9
|
+
uiState: {};
|
|
10
|
+
filtersState: {};
|
|
11
|
+
projectState: {
|
|
12
|
+
projectFiles: never[];
|
|
13
|
+
};
|
|
14
|
+
editFileState: {};
|
|
15
|
+
restrictFilesState: {};
|
|
16
|
+
signState: {};
|
|
17
|
+
codeToTextState: {};
|
|
18
|
+
replaceFileState: {};
|
|
19
|
+
signPopup: {};
|
|
20
|
+
permissions: {
|
|
21
|
+
permissions: {
|
|
22
|
+
canDelete: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export namespace rules {
|
|
2
|
+
namespace menetlus {
|
|
3
|
+
namespace minu_menetlused {
|
|
4
|
+
export namespace edit_menetlus {
|
|
5
|
+
const allowed: string[];
|
|
6
|
+
}
|
|
7
|
+
const allowed_1: string[];
|
|
8
|
+
export { allowed_1 as allowed };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
namespace minu_vaated {
|
|
12
|
+
export namespace minu_dokumendid {
|
|
13
|
+
const allowed_2: string[];
|
|
14
|
+
export { allowed_2 as allowed };
|
|
15
|
+
}
|
|
16
|
+
export namespace minu_menetlused_1 {
|
|
17
|
+
const allowed_3: string[];
|
|
18
|
+
export { allowed_3 as allowed };
|
|
19
|
+
}
|
|
20
|
+
export { minu_menetlused_1 as minu_menetlused };
|
|
21
|
+
}
|
|
22
|
+
const arhiiv: {
|
|
23
|
+
main: {
|
|
24
|
+
allowed: string[];
|
|
25
|
+
};
|
|
26
|
+
document_ehr_kood: {
|
|
27
|
+
allowed: string[];
|
|
28
|
+
};
|
|
29
|
+
hr_register: {
|
|
30
|
+
allowed: string[];
|
|
31
|
+
};
|
|
32
|
+
toimik_otsing: {
|
|
33
|
+
allowed: string[];
|
|
34
|
+
};
|
|
35
|
+
ehitis_shr: {
|
|
36
|
+
allowed: string[];
|
|
37
|
+
};
|
|
38
|
+
doc_ehitis_hr: {
|
|
39
|
+
allowed: string[];
|
|
40
|
+
};
|
|
41
|
+
ehitis_hr: {
|
|
42
|
+
allowed: string[];
|
|
43
|
+
};
|
|
44
|
+
ehitis_toimik: {
|
|
45
|
+
allowed: string[];
|
|
46
|
+
};
|
|
47
|
+
toimik: {
|
|
48
|
+
allowed: string[];
|
|
49
|
+
};
|
|
50
|
+
lukus: {
|
|
51
|
+
allowed: string[];
|
|
52
|
+
};
|
|
53
|
+
404: {
|
|
54
|
+
allowed: string[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|