@axelor/aos-mobile-dms 8.3.0
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 +44 -0
- package/lib/api/document-api.d.ts +39 -0
- package/lib/api/document-api.js +254 -0
- package/lib/api/document-api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +19 -0
- package/lib/api/index.js.map +1 -0
- package/lib/components/atoms/AuthorFilter/AuthorFilter.d.ts +7 -0
- package/lib/components/atoms/AuthorFilter/AuthorFilter.js +51 -0
- package/lib/components/atoms/AuthorFilter/AuthorFilter.js.map +1 -0
- package/lib/components/atoms/DirectoryCard/DirectoryCard.d.ts +6 -0
- package/lib/components/atoms/DirectoryCard/DirectoryCard.js +55 -0
- package/lib/components/atoms/DirectoryCard/DirectoryCard.js.map +1 -0
- package/lib/components/atoms/DocumentCard/DocumentCard.d.ts +7 -0
- package/lib/components/atoms/DocumentCard/DocumentCard.js +63 -0
- package/lib/components/atoms/DocumentCard/DocumentCard.js.map +1 -0
- package/lib/components/atoms/SwitchDocumentType/SwitchDocumentType.d.ts +7 -0
- package/lib/components/atoms/SwitchDocumentType/SwitchDocumentType.js +44 -0
- package/lib/components/atoms/SwitchDocumentType/SwitchDocumentType.js.map +1 -0
- package/lib/components/atoms/index.d.ts +4 -0
- package/lib/components/atoms/index.js +22 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/index.js +22 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/DocumentActionCard/DocumentActionCard.d.ts +7 -0
- package/lib/components/molecules/DocumentActionCard/DocumentActionCard.js +79 -0
- package/lib/components/molecules/DocumentActionCard/DocumentActionCard.js.map +1 -0
- package/lib/components/molecules/index.d.ts +1 -0
- package/lib/components/molecules/index.js +19 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.d.ts +12 -0
- package/lib/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.js +42 -0
- package/lib/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.js.map +1 -0
- package/lib/components/organisms/index.d.ts +1 -0
- package/lib/components/organisms/index.js +19 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/components/templates/DocumentList/DocumentList.d.ts +7 -0
- package/lib/components/templates/DocumentList/DocumentList.js +100 -0
- package/lib/components/templates/DocumentList/DocumentList.js.map +1 -0
- package/lib/components/templates/index.d.ts +1 -0
- package/lib/components/templates/index.js +19 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +1 -0
- package/lib/features/asyncFunctions-index.js +19 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/documentSlice.d.ts +132 -0
- package/lib/features/documentSlice.js +135 -0
- package/lib/features/documentSlice.js.map +1 -0
- package/lib/features/index.d.ts +1 -0
- package/lib/features/index.js +19 -0
- package/lib/features/index.js.map +1 -0
- package/lib/hooks/use-dms-header-actions.d.ts +1 -0
- package/lib/hooks/use-dms-header-actions.js +44 -0
- package/lib/hooks/use-dms-header-actions.js.map +1 -0
- package/lib/i18n/en.json +30 -0
- package/lib/i18n/fr.json +30 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +76 -0
- package/lib/index.js.map +1 -0
- package/lib/models/forms.d.ts +2 -0
- package/lib/models/forms.js +67 -0
- package/lib/models/forms.js.map +1 -0
- package/lib/models/index.d.ts +4 -0
- package/lib/models/index.js +22 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +36 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +21 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +21 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/screens/AllDocumentsScreen.d.ts +5 -0
- package/lib/screens/AllDocumentsScreen.js +28 -0
- package/lib/screens/AllDocumentsScreen.js.map +1 -0
- package/lib/screens/AttachedFilesScreen.d.ts +6 -0
- package/lib/screens/AttachedFilesScreen.js +77 -0
- package/lib/screens/AttachedFilesScreen.js.map +1 -0
- package/lib/screens/DocumentFormScreen.d.ts +6 -0
- package/lib/screens/DocumentFormScreen.js +64 -0
- package/lib/screens/DocumentFormScreen.js.map +1 -0
- package/lib/screens/MyFavoriteDocumentsScreen.d.ts +3 -0
- package/lib/screens/MyFavoriteDocumentsScreen.js +43 -0
- package/lib/screens/MyFavoriteDocumentsScreen.js.map +1 -0
- package/lib/screens/index.d.ts +49 -0
- package/lib/screens/index.js +57 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/types/file.d.ts +13 -0
- package/lib/types/file.js +127 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +19 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/attachedFilesGenericAction.d.ts +17 -0
- package/lib/utils/attachedFilesGenericAction.js +59 -0
- package/lib/utils/attachedFilesGenericAction.js.map +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +20 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/moduleHelper.d.ts +19 -0
- package/lib/utils/moduleHelper.js +56 -0
- package/lib/utils/moduleHelper.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as AuthorFilter } from './AuthorFilter/AuthorFilter';
|
|
19
|
+
export { default as DirectoryCard } from './DirectoryCard/DirectoryCard';
|
|
20
|
+
export { default as DocumentCard } from './DocumentCard/DocumentCard';
|
|
21
|
+
export { default as SwitchDocumentType } from './SwitchDocumentType/SwitchDocumentType';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export * from './atoms';
|
|
19
|
+
export * from './molecules';
|
|
20
|
+
export * from './organisms';
|
|
21
|
+
export * from './templates';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useMemo } from 'react';
|
|
19
|
+
import { downloadFileOnPhone, useDispatch, useNavigation, usePermitted, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { ActionCard, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { addToFavorites, deleteDocument, deleteFavoriteDocument, removeFromFavorites, } from '../../../features/documentSlice';
|
|
22
|
+
import { DocumentCard } from '../../atoms';
|
|
23
|
+
const DocumentActionCard = ({ document, handleRefresh, }) => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const Colors = useThemeColor();
|
|
26
|
+
const navigation = useNavigation();
|
|
27
|
+
const { readonly, canDelete } = usePermitted({
|
|
28
|
+
modelName: 'com.axelor.dms.db.DMSFile',
|
|
29
|
+
});
|
|
30
|
+
const dispatch = useDispatch();
|
|
31
|
+
const { mobileSettings } = useSelector(state => state.appConfig);
|
|
32
|
+
const { user } = useSelector(state => state.user);
|
|
33
|
+
const { baseUrl, token, jsessionId } = useSelector(state => state.auth);
|
|
34
|
+
const isFavorite = useMemo(() => user?.favouriteFileSet.some(({ id }) => id === document.id), [document.id, user?.favouriteFileSet]);
|
|
35
|
+
const handleDownloadFile = useCallback(async () => {
|
|
36
|
+
await downloadFileOnPhone({ fileName: document.fileName, id: document.id, isMetaFile: false }, { baseUrl, token, jsessionId }, I18n);
|
|
37
|
+
}, [I18n, baseUrl, document, jsessionId, token]);
|
|
38
|
+
return (<ActionCard actionList={[
|
|
39
|
+
{
|
|
40
|
+
iconName: isFavorite ? 'star-fill' : 'star',
|
|
41
|
+
iconColor: Colors.progressColor.background,
|
|
42
|
+
helper: I18n.t('Dms_AddToFavorites'),
|
|
43
|
+
onPress: () => dispatch((isFavorite ? removeFromFavorites : addToFavorites)({
|
|
44
|
+
documentId: document.id,
|
|
45
|
+
userId: user?.id,
|
|
46
|
+
})),
|
|
47
|
+
hidden: !mobileSettings?.isFavoritesManagementEnabled,
|
|
48
|
+
disabled: readonly,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
iconName: 'download',
|
|
52
|
+
helper: I18n.t('Dms_Download'),
|
|
53
|
+
onPress: handleDownloadFile,
|
|
54
|
+
hidden: !mobileSettings?.isDownloadAllowed,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
iconName: 'pencil-fill',
|
|
58
|
+
helper: I18n.t('Dms_Rename'),
|
|
59
|
+
onPress: () => navigation.navigate('DocumentFormScreen', {
|
|
60
|
+
document,
|
|
61
|
+
}),
|
|
62
|
+
hidden: !mobileSettings?.isRenamingAllowed || readonly,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
iconName: 'trash-fill',
|
|
66
|
+
iconColor: Colors.errorColor.background,
|
|
67
|
+
helper: I18n.t('Dms_Delete'),
|
|
68
|
+
onPress: () => dispatch((isFavorite ? deleteFavoriteDocument : deleteDocument)({
|
|
69
|
+
documentId: document.id,
|
|
70
|
+
userId: user?.id,
|
|
71
|
+
})).then(() => handleRefresh?.()),
|
|
72
|
+
hidden: !canDelete || !mobileSettings?.isFileDeletionAllowed,
|
|
73
|
+
},
|
|
74
|
+
]} translator={I18n.t}>
|
|
75
|
+
<DocumentCard document={document}/>
|
|
76
|
+
</ActionCard>);
|
|
77
|
+
};
|
|
78
|
+
export default DocumentActionCard;
|
|
79
|
+
//# sourceMappingURL=DocumentActionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentActionCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/DocumentActionCard/DocumentActionCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAOzC,MAAM,kBAAkB,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AC,CAAC,CAAC,cAAc,CAAS,CAAC;oBAC9D,UAAU,EAAE,QAAQ,CAAC,EAAE;oBACvB,MAAM,EAAE,IAAI,EAAE,EAAE;iBACjB,CAAC,CACH,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC;gBACjC,MAAM,EAAE,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,qBAAqB;aAC7D;SACF,CAAC,CACF,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB;MAAA,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACnC;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DocumentActionCard } from './DocumentActionCard/DocumentActionCard';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as DocumentActionCard } from './DocumentActionCard/DocumentActionCard';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ParentDirectorySearchBarProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
title?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onChange?: (any: any) => void;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
displayRootInfo?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const ParentDirectorySearchBar: ({ style, title, defaultValue, onChange, readonly, required, displayRootInfo, }: ParentDirectorySearchBarProps) => React.JSX.Element;
|
|
12
|
+
export default ParentDirectorySearchBar;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useDispatch, useSelector, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { AutoCompleteSearch, Label } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { searchDirectory } from '../../../features/documentSlice';
|
|
23
|
+
const ParentDirectorySearchBar = ({ style = null, title = 'Dms_ParentFolder', defaultValue = null, onChange = () => { }, readonly = false, required = false, displayRootInfo = false, }) => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const dispatch = useDispatch();
|
|
26
|
+
const { loadingDirectory, moreLoadingDirectory, isListEndDirectory, directoryList, } = useSelector(state => state.dms_document);
|
|
27
|
+
const searchParentDirectoryAPI = useCallback(({ searchValue, page = 0 }) => {
|
|
28
|
+
dispatch(searchDirectory({ searchValue, page }));
|
|
29
|
+
}, [dispatch]);
|
|
30
|
+
return (<>
|
|
31
|
+
{displayRootInfo && defaultValue == null && (<Label style={styles.label} type="info" message={I18n.t('Dms_SearchBarRootInfo')}/>)}
|
|
32
|
+
<AutoCompleteSearch style={style} title={I18n.t(title)} objectList={directoryList} value={defaultValue} required={required} readonly={readonly} onChangeValue={onChange} fetchData={searchParentDirectoryAPI} displayValue={item => item.fileName} placeholder={I18n.t(title)} showDetailsPopup={true} loadingList={loadingDirectory} moreLoading={moreLoadingDirectory} isListEnd={isListEndDirectory} navigate={false} oneFilter={false} translator={I18n.t}/>
|
|
33
|
+
</>);
|
|
34
|
+
};
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
label: {
|
|
37
|
+
width: '90%',
|
|
38
|
+
alignSelf: 'center',
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
export default ParentDirectorySearchBar;
|
|
42
|
+
//# sourceMappingURL=ParentDirectorySearchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParentDirectorySearchBar.js","sourceRoot":"","sources":["../../../../src/components/organisms/ParentDirectorySearchBar/ParentDirectorySearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CA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CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACrB,UAAU,CAAC,CAAC,aAAa,CAAC,CAC1B,KAAK,CAAC,CAAC,YAAY,CAAC,CACpB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,QAAQ,CAAC,CACxB,SAAS,CAAC,CAAC,wBAAwB,CAAC,CACpC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CACpC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAC3B,gBAAgB,CAAC,CAAC,IAAI,CAAC,CACvB,WAAW,CAAC,CAAC,gBAAgB,CAAC,CAC9B,WAAW,CAAC,CAAC,oBAAoB,CAAC,CAClC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAC9B,QAAQ,CAAC,CAAC,KAAK,CAAC,CAChB,SAAS,CAAC,CAAC,KAAK,CAAC,CACjB,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAEvB;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ParentDirectorySearchBar } from './ParentDirectorySearchBar/ParentDirectorySearchBar';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as ParentDirectorySearchBar } from './ParentDirectorySearchBar/ParentDirectorySearchBar';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,qDAAqD,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { headerActionsProvider, SearchTreeView, useNavigation, useDispatch, useSelector, useTranslator, usePermitted, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { ChipSelect, Screen, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { addToFavorites, removeFromFavorites, searchDocument, searchDirectory, } from '../../../features/documentSlice';
|
|
22
|
+
import { searchDocumentApi } from '../../../api';
|
|
23
|
+
import { AuthorFilter, DirectoryCard } from '../../atoms';
|
|
24
|
+
import { DocumentActionCard } from '../../molecules';
|
|
25
|
+
import { File } from '../../../types';
|
|
26
|
+
const DocumentList = ({ defaultParent, isAttachedFilesList = false, }) => {
|
|
27
|
+
const I18n = useTranslator();
|
|
28
|
+
const Colors = useThemeColor();
|
|
29
|
+
const navigation = useNavigation();
|
|
30
|
+
const { canCreate, readonly } = usePermitted({
|
|
31
|
+
modelName: 'com.axelor.dms.db.DMSFile',
|
|
32
|
+
});
|
|
33
|
+
const dispatch = useDispatch();
|
|
34
|
+
const [author, setAuthor] = useState(null);
|
|
35
|
+
const [selectedExtensions, setSelectedExtensions] = useState([]);
|
|
36
|
+
const [parentList, setParentList] = useState([]);
|
|
37
|
+
const { loadingDocument, moreLoadingDocument, isListEndDocument, documentList, directoryList, } = useSelector((state) => state.dms_document);
|
|
38
|
+
const { mobileSettings } = useSelector((state) => state.appConfig);
|
|
39
|
+
const { user } = useSelector(state => state.user);
|
|
40
|
+
const sliceParentFunctionData = useMemo(() => ({
|
|
41
|
+
authorId: author?.id,
|
|
42
|
+
}), [author?.id]);
|
|
43
|
+
const sliceFunctionData = useMemo(() => ({
|
|
44
|
+
authorId: author?.id,
|
|
45
|
+
extensions: selectedExtensions.map(_extension => _extension.key),
|
|
46
|
+
}), [author?.id, selectedExtensions]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
headerActionsProvider.registerModel('dms_all_documents', {
|
|
49
|
+
actions: [
|
|
50
|
+
{
|
|
51
|
+
key: 'newDocument',
|
|
52
|
+
order: 10,
|
|
53
|
+
iconName: 'plus-lg',
|
|
54
|
+
title: I18n.t('Dms_NewDocument'),
|
|
55
|
+
iconColor: Colors.primaryColor.background,
|
|
56
|
+
hideIf: !canCreate,
|
|
57
|
+
onPress: () => navigation.navigate('DocumentFormScreen', {
|
|
58
|
+
parent: parentList.at(-1),
|
|
59
|
+
}),
|
|
60
|
+
showInHeader: true,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
}, [Colors, I18n, canCreate, navigation, parentList]);
|
|
65
|
+
return (<Screen removeSpaceOnTop={true}>
|
|
66
|
+
<SearchTreeView parentList={directoryList} list={documentList} loading={loadingDocument} moreLoading={moreLoadingDocument} isListEnd={isListEndDocument} sliceParentFunction={searchDirectory} sliceParentFunctionData={sliceParentFunctionData} sliceFunction={searchDocument} sliceFunctionData={sliceFunctionData} sliceFunctionDataParentIdName="parentDirectoryId" sliceFunctionDataNoParentName="noParent" fetchBranchData={branchId => searchDocumentApi({
|
|
67
|
+
authorId: author?.id,
|
|
68
|
+
extensions: selectedExtensions.map(_extension => _extension.key),
|
|
69
|
+
parentDirectoryId: branchId,
|
|
70
|
+
})} branchCondition={item => item.isDirectory} displayParentSearchValue={item => item.fileName} searchParentPlaceholder={I18n.t('Dms_ParentFolder')} searchPlaceholder={I18n.t('Base_Search')} isHideableParentSearch={false} parentFieldName="parent" renderBranch={({ item }) => <DirectoryCard directory={item}/>} getBranchActions={branch => {
|
|
71
|
+
const isFavorite = user?.favouriteFolderSet.some(({ id }) => id === branch.item.id);
|
|
72
|
+
const sliceFunction = isFavorite
|
|
73
|
+
? removeFromFavorites
|
|
74
|
+
: addToFavorites;
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
iconName: isFavorite ? 'star-fill' : 'star',
|
|
78
|
+
iconColor: Colors.progressColor.background,
|
|
79
|
+
helper: I18n.t('Dms_AddToFavorites'),
|
|
80
|
+
onPress: () => dispatch(sliceFunction({
|
|
81
|
+
documentId: branch.item.id,
|
|
82
|
+
userId: user?.id,
|
|
83
|
+
})),
|
|
84
|
+
hidden: !mobileSettings?.isFavoritesManagementEnabled,
|
|
85
|
+
disabled: readonly,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
iconName: 'pencil-fill',
|
|
89
|
+
helper: I18n.t('Dms_Rename'),
|
|
90
|
+
onPress: () => navigation.navigate('DocumentFormScreen', {
|
|
91
|
+
document: branch.item,
|
|
92
|
+
}),
|
|
93
|
+
hidden: !mobileSettings?.isRenamingAllowed || readonly,
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
}} renderLeaf={({ item }) => (<DocumentActionCard document={item} handleRefresh={() => setSelectedExtensions(current => [...current])}/>)} headerChildren={<AuthorFilter author={author} setAuthor={setAuthor}/>} chipComponent={<ChipSelect mode="multi" selectionItems={File.getFileExtensionList(Colors)} onChangeValue={setSelectedExtensions} showClearButton/>} displayBreadcrumb defaultParent={defaultParent} manageParentFilter={!isAttachedFilesList} onParentChange={setParentList}/>
|
|
97
|
+
</Screen>);
|
|
98
|
+
};
|
|
99
|
+
export default DocumentList;
|
|
100
|
+
//# sourceMappingURL=DocumentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sourceRoot":"","sources":["../../../../src/components/templates/DocumentList/DocumentList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACxE,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,MAAM,iCAAi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AI,CAAC,OAAO,CACZ,cAAc,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAClD,aAAa,CAAC,CAAC,qBAAqB,CAAC,CACrC,eAAe,EACf,CACH,CACD,iBAAiB,CACjB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CACzC,cAAc,CAAC,CAAC,aAAa,CAAC,EAElC;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DocumentList } from './DocumentList/DocumentList';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { default as DocumentList } from './DocumentList/DocumentList';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { addToFavorites, createDocument, deleteDocument, deleteFavoriteDocument, removeFromFavorites, searchDirectory, searchDocument, searchFavoriteDocument, updateDocument, } from './documentSlice';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { addToFavorites, createDocument, deleteDocument, deleteFavoriteDocument, removeFromFavorites, searchDirectory, searchDocument, searchFavoriteDocument, updateDocument, } from './documentSlice';
|
|
19
|
+
//# sourceMappingURL=asyncFunctions-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncFunctions-index.js","sourceRoot":"","sources":["../../src/features/asyncFunctions-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export const searchDocument: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const searchDirectory: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
12
|
+
state?: unknown;
|
|
13
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
14
|
+
extra?: unknown;
|
|
15
|
+
rejectValue?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export const searchFavoriteDocument: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
22
|
+
state?: unknown;
|
|
23
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
rejectValue?: unknown;
|
|
26
|
+
serializedErrorType?: unknown;
|
|
27
|
+
pendingMeta?: unknown;
|
|
28
|
+
fulfilledMeta?: unknown;
|
|
29
|
+
rejectedMeta?: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
export const createDocument: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
32
|
+
state?: unknown;
|
|
33
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
34
|
+
extra?: unknown;
|
|
35
|
+
rejectValue?: unknown;
|
|
36
|
+
serializedErrorType?: unknown;
|
|
37
|
+
pendingMeta?: unknown;
|
|
38
|
+
fulfilledMeta?: unknown;
|
|
39
|
+
rejectedMeta?: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
export const updateDocument: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
42
|
+
state?: unknown;
|
|
43
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
44
|
+
extra?: unknown;
|
|
45
|
+
rejectValue?: unknown;
|
|
46
|
+
serializedErrorType?: unknown;
|
|
47
|
+
pendingMeta?: unknown;
|
|
48
|
+
fulfilledMeta?: unknown;
|
|
49
|
+
rejectedMeta?: unknown;
|
|
50
|
+
}>;
|
|
51
|
+
export const addToFavorites: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<any, string, {
|
|
52
|
+
arg: void;
|
|
53
|
+
requestId: string;
|
|
54
|
+
requestStatus: "fulfilled";
|
|
55
|
+
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
56
|
+
arg: void;
|
|
57
|
+
requestId: string;
|
|
58
|
+
requestStatus: "rejected";
|
|
59
|
+
aborted: boolean;
|
|
60
|
+
condition: boolean;
|
|
61
|
+
} & ({
|
|
62
|
+
rejectedWithValue: true;
|
|
63
|
+
} | ({
|
|
64
|
+
rejectedWithValue: false;
|
|
65
|
+
} & {})), import("@reduxjs/toolkit").SerializedError>, void, {
|
|
66
|
+
state?: unknown;
|
|
67
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
68
|
+
extra?: unknown;
|
|
69
|
+
rejectValue?: unknown;
|
|
70
|
+
serializedErrorType?: unknown;
|
|
71
|
+
pendingMeta?: unknown;
|
|
72
|
+
fulfilledMeta?: unknown;
|
|
73
|
+
rejectedMeta?: unknown;
|
|
74
|
+
}>;
|
|
75
|
+
export const removeFromFavorites: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<any, string, {
|
|
76
|
+
arg: void;
|
|
77
|
+
requestId: string;
|
|
78
|
+
requestStatus: "fulfilled";
|
|
79
|
+
}, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
|
|
80
|
+
arg: void;
|
|
81
|
+
requestId: string;
|
|
82
|
+
requestStatus: "rejected";
|
|
83
|
+
aborted: boolean;
|
|
84
|
+
condition: boolean;
|
|
85
|
+
} & ({
|
|
86
|
+
rejectedWithValue: true;
|
|
87
|
+
} | ({
|
|
88
|
+
rejectedWithValue: false;
|
|
89
|
+
} & {})), import("@reduxjs/toolkit").SerializedError>, void, {
|
|
90
|
+
state?: unknown;
|
|
91
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
92
|
+
extra?: unknown;
|
|
93
|
+
rejectValue?: unknown;
|
|
94
|
+
serializedErrorType?: unknown;
|
|
95
|
+
pendingMeta?: unknown;
|
|
96
|
+
fulfilledMeta?: unknown;
|
|
97
|
+
rejectedMeta?: unknown;
|
|
98
|
+
}>;
|
|
99
|
+
export const deleteDocument: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
100
|
+
state?: unknown;
|
|
101
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
102
|
+
extra?: unknown;
|
|
103
|
+
rejectValue?: unknown;
|
|
104
|
+
serializedErrorType?: unknown;
|
|
105
|
+
pendingMeta?: unknown;
|
|
106
|
+
fulfilledMeta?: unknown;
|
|
107
|
+
rejectedMeta?: unknown;
|
|
108
|
+
}>;
|
|
109
|
+
export const deleteFavoriteDocument: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
110
|
+
state?: unknown;
|
|
111
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
112
|
+
extra?: unknown;
|
|
113
|
+
rejectValue?: unknown;
|
|
114
|
+
serializedErrorType?: unknown;
|
|
115
|
+
pendingMeta?: unknown;
|
|
116
|
+
fulfilledMeta?: unknown;
|
|
117
|
+
rejectedMeta?: unknown;
|
|
118
|
+
}>;
|
|
119
|
+
export const documentReducer: import("redux").Reducer<{
|
|
120
|
+
loadingDocuments: boolean;
|
|
121
|
+
moreLoadingDocument: boolean;
|
|
122
|
+
isListEndDocument: boolean;
|
|
123
|
+
documentList: any[];
|
|
124
|
+
loadingDirectory: boolean;
|
|
125
|
+
moreLoadingDirectory: boolean;
|
|
126
|
+
isListEndDirectory: boolean;
|
|
127
|
+
directoryList: any[];
|
|
128
|
+
loadingFavoriteDocument: boolean;
|
|
129
|
+
moreLoadingFavoriteDocument: boolean;
|
|
130
|
+
isListEndFavoriteDocument: boolean;
|
|
131
|
+
favoriteDocumentList: any[];
|
|
132
|
+
}>;
|