@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,135 @@
|
|
|
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { fetchActiveUser, generateInifiniteScrollCases, handlerApiCall, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { addToFavorites as _addToFavorites, createDocument as _createDocument, deleteDocument as _deleteDocument, removeFromFavorites as _removeFromFavorites, searchDirectory as _searchDirectory, searchDocument as _searchDocument, updateDocument as _updateDocument, } from '../api/document-api';
|
|
21
|
+
export const searchDocument = createAsyncThunk('dms_document/searchDocument', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: _searchDocument,
|
|
24
|
+
data,
|
|
25
|
+
action: 'Dms_SliceAction_SearchDocument',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export const searchDirectory = createAsyncThunk('dms_document/searchDirectory', async function (data, { getState }) {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: _searchDirectory,
|
|
33
|
+
data,
|
|
34
|
+
action: 'Dms_SliceAction_SearchDirectory',
|
|
35
|
+
getState,
|
|
36
|
+
responseOptions: { isArrayResponse: true },
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export const searchFavoriteDocument = createAsyncThunk('dms_document/searchFavoriteDocument', async function (data, { getState }) {
|
|
40
|
+
return handlerApiCall({
|
|
41
|
+
fetchFunction: _searchDocument,
|
|
42
|
+
data,
|
|
43
|
+
action: 'Dms_SliceAction_SearchFavoriteDocument',
|
|
44
|
+
getState,
|
|
45
|
+
responseOptions: { isArrayResponse: true },
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
export const createDocument = createAsyncThunk('dms_document/createDocument', async function (data, { getState }) {
|
|
49
|
+
return handlerApiCall({
|
|
50
|
+
fetchFunction: _createDocument,
|
|
51
|
+
data,
|
|
52
|
+
action: 'Dms_SliceAction_CreateDocument',
|
|
53
|
+
getState,
|
|
54
|
+
responseOptions: { isArrayResponse: false },
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
export const updateDocument = createAsyncThunk('dms_document/updateDocument', async function (data, { getState }) {
|
|
58
|
+
return handlerApiCall({
|
|
59
|
+
fetchFunction: _updateDocument,
|
|
60
|
+
data,
|
|
61
|
+
action: 'Dms_SliceAction_UpdateDocument',
|
|
62
|
+
getState,
|
|
63
|
+
responseOptions: { isArrayResponse: false },
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
export const addToFavorites = createAsyncThunk('dms_document/addToFavorites', async function (data, { getState, dispatch }) {
|
|
67
|
+
return handlerApiCall({
|
|
68
|
+
fetchFunction: _addToFavorites,
|
|
69
|
+
data,
|
|
70
|
+
action: 'Dms_SliceAction_AddToFavorites',
|
|
71
|
+
getState,
|
|
72
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
73
|
+
}).then(() => dispatch(fetchActiveUser(data.userId)));
|
|
74
|
+
});
|
|
75
|
+
export const removeFromFavorites = createAsyncThunk('dms_document/removeFromFavorites', async function (data, { getState, dispatch }) {
|
|
76
|
+
return handlerApiCall({
|
|
77
|
+
fetchFunction: _removeFromFavorites,
|
|
78
|
+
data,
|
|
79
|
+
action: 'Dms_SliceAction_RemoveFromFavorites',
|
|
80
|
+
getState,
|
|
81
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
82
|
+
}).then(() => dispatch(fetchActiveUser(data.userId)));
|
|
83
|
+
});
|
|
84
|
+
export const deleteDocument = createAsyncThunk('dms_document/deleteDocument', async function (data, { getState }) {
|
|
85
|
+
return handlerApiCall({
|
|
86
|
+
fetchFunction: _deleteDocument,
|
|
87
|
+
data,
|
|
88
|
+
action: 'Dms_SliceAction_DeleteDocument',
|
|
89
|
+
getState,
|
|
90
|
+
responseOptions: { isArrayResponse: false, showToast: true },
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
export const deleteFavoriteDocument = createAsyncThunk('dms_document/deleteFavoriteDocument', async function (data, { dispatch }) {
|
|
94
|
+
dispatch(removeFromFavorites(data)).then(() => dispatch(deleteDocument(data)));
|
|
95
|
+
});
|
|
96
|
+
const initialState = {
|
|
97
|
+
loadingDocuments: false,
|
|
98
|
+
moreLoadingDocument: false,
|
|
99
|
+
isListEndDocument: false,
|
|
100
|
+
documentList: [],
|
|
101
|
+
loadingDirectory: false,
|
|
102
|
+
moreLoadingDirectory: false,
|
|
103
|
+
isListEndDirectory: false,
|
|
104
|
+
directoryList: [],
|
|
105
|
+
loadingFavoriteDocument: false,
|
|
106
|
+
moreLoadingFavoriteDocument: false,
|
|
107
|
+
isListEndFavoriteDocument: false,
|
|
108
|
+
favoriteDocumentList: [],
|
|
109
|
+
};
|
|
110
|
+
const documentSlice = createSlice({
|
|
111
|
+
name: 'dms_document',
|
|
112
|
+
initialState,
|
|
113
|
+
extraReducers: builder => {
|
|
114
|
+
generateInifiniteScrollCases(builder, searchDocument, {
|
|
115
|
+
loading: 'loadingDocument',
|
|
116
|
+
moreLoading: 'moreLoadingDocument',
|
|
117
|
+
isListEnd: 'isListEndDocument',
|
|
118
|
+
list: 'documentList',
|
|
119
|
+
});
|
|
120
|
+
generateInifiniteScrollCases(builder, searchDirectory, {
|
|
121
|
+
loading: 'loadingDirectory',
|
|
122
|
+
moreLoading: 'moreLoadingDirectory',
|
|
123
|
+
isListEnd: 'isListEndDirectory',
|
|
124
|
+
list: 'directoryList',
|
|
125
|
+
});
|
|
126
|
+
generateInifiniteScrollCases(builder, searchFavoriteDocument, {
|
|
127
|
+
loading: 'loadingFavoriteDocument',
|
|
128
|
+
moreLoading: 'moreLoadingFavoriteDocument',
|
|
129
|
+
isListEnd: 'isListEndFavoriteDocument',
|
|
130
|
+
list: 'favoriteDocumentList',
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
export const documentReducer = documentSlice.reducer;
|
|
135
|
+
//# sourceMappingURL=documentSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentSlice.js","sourceRoot":"","sources":["../../src/features/documentSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,IAAI,eAAe,EACjC,cAAc,IAAI,eAAe,EACjC,cAAc,IAAI,eAAe,EACjC,mBAAmB,IAAI,oBAAoB,EAC3C,eAAe,IAAI,gBAAgB,EACnC,cAAc,IAAI,eAAe,EACjC,cAAc,IAAI,eAAe,GAClC,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAC5C,6BAA6B,EAC7B,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,eAAe;QAC9B,IAAI;QACJ,MAAM,EAAE,gCAAgC;QACxC,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAC7C,8BAA8B,EAC9B,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,gBAAgB;QAC/B,IAAI;QACJ,MAAM,EAAE,iCAAiC;QACzC,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,C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BAAmB,EAAE,KAAK;IAC1B,iBAAiB,EAAE,KAAK;IACxB,YAAY,EAAE,EAAE;IAEhB,gBAAgB,EAAE,KAAK;IACvB,oBAAoB,EAAE,KAAK;IAC3B,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,EAAE;IAEjB,uBAAuB,EAAE,KAAK;IAC9B,2BAA2B,EAAE,KAAK;IAClC,yBAAyB,EAAE,KAAK;IAChC,oBAAoB,EAAE,EAAE;CACzB,CAAC;AAEF,MAAM,aAAa,GAAG,WAAW,CAAC;IAChC,IAAI,EAAE,cAAc;IACpB,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,4BAA4B,CAAC,OAAO,EAAE,cAAc,EAAE;YACpD,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,qBAAqB;YAClC,SAAS,EAAE,mBAAmB;YAC9B,IAAI,EAAE,cAAc;SACrB,CAAC,CAAC;QACH,4BAA4B,CAAC,OAAO,EAAE,eAAe,EAAE;YACrD,OAAO,EAAE,kBAAkB;YAC3B,WAAW,EAAE,sBAAsB;YACnC,SAAS,EAAE,oBAAoB;YAC/B,IAAI,EAAE,eAAe;SACtB,CAAC,CAAC;QACH,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,EAAE;YAC5D,OAAO,EAAE,yBAAyB;YAClC,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,2BAA2B;YACtC,IAAI,EAAE,sBAAsB;SAC7B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { documentReducer as dms_document } 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 { documentReducer as dms_document } from './documentSlice';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,eAAe,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDMSHeaders: () => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { useEffect } from 'react';
|
|
19
|
+
import { headerActionsProvider, useNavigation, usePermitted, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { getAction } from '../utils';
|
|
21
|
+
export const useDMSHeaders = () => {
|
|
22
|
+
useAttachedFilesGenericAction();
|
|
23
|
+
};
|
|
24
|
+
const useAttachedFilesGenericAction = () => {
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const navigation = useNavigation();
|
|
27
|
+
const { canCreate } = usePermitted({
|
|
28
|
+
modelName: 'com.axelor.dms.db.DMSFile',
|
|
29
|
+
});
|
|
30
|
+
const { mobileSettings } = useSelector((state) => state.appConfig);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
headerActionsProvider.registerGenericAction('dms_attachedFiles', async ({ model, modelId, options }) => await getAction({
|
|
33
|
+
model,
|
|
34
|
+
modelId,
|
|
35
|
+
options,
|
|
36
|
+
canCreateObject: canCreate &&
|
|
37
|
+
mobileSettings?.isFolderCreationAllowed &&
|
|
38
|
+
mobileSettings?.isFileCreationAllowed,
|
|
39
|
+
navigation,
|
|
40
|
+
translator: I18n.t,
|
|
41
|
+
}));
|
|
42
|
+
}, [canCreate, I18n.t, mobileSettings, navigation]);
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=use-dms-header-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-dms-header-actions.js","sourceRoot":"","sources":["../../src/hooks/use-dms-header-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,6BAA6B,EAAE,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,GAAG,EAAE;IACzC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAC,SAAS,EAAC,GAAG,YAAY,CAAC;QAC/B,SAAS,EAAE,2BAA2B;KACvC,CAAC,CAAC;IAEH,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtE,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC,qBAAqB,CACzC,mBAAmB,EACnB,KAAK,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAC,EAAE,EAAE,CAClC,MAAM,SAAS,CAAC;YACd,KAAK;YACL,OAAO;YACP,OAAO;YACP,eAAe,EACb,SAAS;gBACT,cAAc,EAAE,uBAAuB;gBACvC,cAAc,EAAE,qBAAqB;YACvC,UAAU;YACV,UAAU,EAAE,IAAI,CAAC,CAAC;SACnB,CAAC,CACL,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC"}
|
package/lib/i18n/en.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Dms_Dms": "DMS",
|
|
3
|
+
"Dms_AllDocuments": "All documents",
|
|
4
|
+
"Dms_ParentFolder": "Parent folder",
|
|
5
|
+
"Dms_Download": "Download",
|
|
6
|
+
"Dms_AddToFavorites": "Add to favorites",
|
|
7
|
+
"Dms_Details": "Details",
|
|
8
|
+
"Dms_Rename": "Rename",
|
|
9
|
+
"Dms_Delete": "Delete",
|
|
10
|
+
"Dms_MyFavoriteDocuments": "My favorite documents",
|
|
11
|
+
"Dms_NewDocument": "New document",
|
|
12
|
+
"Dms_Document": "Document",
|
|
13
|
+
"Dms_Name": "Name",
|
|
14
|
+
"Dms_Folder": "Folder",
|
|
15
|
+
"Dms_File": "File",
|
|
16
|
+
"Dms_AttachedFiles": "Attached files",
|
|
17
|
+
"Dms_NoAttachedFiles": "No attached files",
|
|
18
|
+
"Dms_DoYouWantToAddFile": "Do you want to add a file?",
|
|
19
|
+
"Dms_SearchBarRootInfo": "If the parent folder stays empty then the file will be saved on your root folder",
|
|
20
|
+
"Dms_SliceAction_SearchDocument": "search document",
|
|
21
|
+
"Dms_SliceAction_SearchDirectory": "search directory",
|
|
22
|
+
"Dms_SliceAction_SearchFavoriteDocument": "search favorite document",
|
|
23
|
+
"Dms_SliceAction_CreateDocument": "create document",
|
|
24
|
+
"Dms_SliceAction_UpdateDocument": "update document",
|
|
25
|
+
"Dms_SliceAction_FetchDirectory": "fetch directory",
|
|
26
|
+
"Dms_SliceAction_CountAttachedFiles": "count attached files",
|
|
27
|
+
"Dms_SliceAction_AddToFavorites": "add to favorites",
|
|
28
|
+
"Dms_SliceAction_RemoveFromFavorites": "remove from favorites",
|
|
29
|
+
"Dms_SliceAction_DeleteDocument": "delete document"
|
|
30
|
+
}
|
package/lib/i18n/fr.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Dms_Dms": "GED",
|
|
3
|
+
"Dms_AllDocuments": "Tous les documents",
|
|
4
|
+
"Dms_ParentFolder": "Dossier parent",
|
|
5
|
+
"Dms_Download": "Télécharger",
|
|
6
|
+
"Dms_AddToFavorites": "Ajouter aux favoris",
|
|
7
|
+
"Dms_Details": "Détails",
|
|
8
|
+
"Dms_Rename": "Renommer",
|
|
9
|
+
"Dms_Delete": "Supprimer",
|
|
10
|
+
"Dms_MyFavoriteDocuments": "Mes fichiers favoris",
|
|
11
|
+
"Dms_NewDocument": "Nouveau document",
|
|
12
|
+
"Dms_Document": "Document",
|
|
13
|
+
"Dms_Name": "Nom",
|
|
14
|
+
"Dms_Folder": "Dossier",
|
|
15
|
+
"Dms_File": "Fichier",
|
|
16
|
+
"Dms_AttachedFiles": "Fichiers joints",
|
|
17
|
+
"Dms_NoAttachedFiles": "Pas de fichiers joints",
|
|
18
|
+
"Dms_DoYouWantToAddFile": "Voulez-vous ajouter un fichier ?",
|
|
19
|
+
"Dms_SearchBarRootInfo": "Si le dossier parent reste vide alors le document sera enregistré à votre dossier racine",
|
|
20
|
+
"Dms_SliceAction_SearchDocument": "recherche sur les documents",
|
|
21
|
+
"Dms_SliceAction_SearchDirectory": "recherche sur les dossiers",
|
|
22
|
+
"Dms_SliceAction_SearchFavoriteDocument": "recherche sur les documents favoris",
|
|
23
|
+
"Dms_SliceAction_CreateDocument": "création d'un document",
|
|
24
|
+
"Dms_SliceAction_UpdateDocument": "mise à jour d'un document",
|
|
25
|
+
"Dms_SliceAction_FetchDirectory": "récupération d'un dossier",
|
|
26
|
+
"Dms_SliceAction_CountAttachedFiles": "comptage des fichiers joints",
|
|
27
|
+
"Dms_SliceAction_AddToFavorites": "ajout aux favoris",
|
|
28
|
+
"Dms_SliceAction_RemoveFromFavorites": "suppression des favoris",
|
|
29
|
+
"Dms_SliceAction_DeleteDocument": "suppression d'un document"
|
|
30
|
+
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Module } from '@axelor/aos-mobile-core';
|
|
2
|
+
export declare const DmsModule: Module;
|
|
3
|
+
export * from './api';
|
|
4
|
+
export * from './components';
|
|
5
|
+
export * from './features/asyncFunctions-index';
|
|
6
|
+
export * from './screens';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './utils';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
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 { getLoggedUser, modulesProvider } from '@axelor/aos-mobile-core';
|
|
19
|
+
import enTranslations from './i18n/en.json';
|
|
20
|
+
import frTranslations from './i18n/fr.json';
|
|
21
|
+
import DmsScreens from './screens';
|
|
22
|
+
import * as dmsReducers from './features';
|
|
23
|
+
import { dms_formsRegister, dms_modelAPI, dms_searchFields, dms_sortFields, } from './models';
|
|
24
|
+
import { useDMSHeaders } from './hooks/use-dms-header-actions';
|
|
25
|
+
import { createMenusScreen } from './utils';
|
|
26
|
+
export const DmsModule = {
|
|
27
|
+
name: 'app-dms',
|
|
28
|
+
title: 'Dms_Dms',
|
|
29
|
+
subtitle: 'Dms_Dms',
|
|
30
|
+
icon: 'inboxes-fill',
|
|
31
|
+
translations: {
|
|
32
|
+
en: enTranslations,
|
|
33
|
+
fr: frTranslations,
|
|
34
|
+
},
|
|
35
|
+
menus: {
|
|
36
|
+
dms_menu_allDocuments: {
|
|
37
|
+
title: 'Dms_AllDocuments',
|
|
38
|
+
icon: 'folder',
|
|
39
|
+
screen: 'AllDocumentsScreen',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
screens: {
|
|
43
|
+
...DmsScreens,
|
|
44
|
+
},
|
|
45
|
+
reducers: {
|
|
46
|
+
...dmsReducers,
|
|
47
|
+
},
|
|
48
|
+
models: {
|
|
49
|
+
objectFields: { ...dms_modelAPI },
|
|
50
|
+
searchFields: { ...dms_searchFields },
|
|
51
|
+
sortFields: { ...dms_sortFields },
|
|
52
|
+
formsRegister: { ...dms_formsRegister },
|
|
53
|
+
headerRegisters: useDMSHeaders,
|
|
54
|
+
},
|
|
55
|
+
moduleRegister: async (userId) => {
|
|
56
|
+
const user = await getLoggedUser(userId)
|
|
57
|
+
.then(res => res?.data?.data?.[0])
|
|
58
|
+
.catch(() => ({}));
|
|
59
|
+
const { menus, screens } = createMenusScreen({
|
|
60
|
+
favouriteFolderSet: user?.favouriteFolderSet,
|
|
61
|
+
favouriteFileSet: user?.favouriteFileSet,
|
|
62
|
+
});
|
|
63
|
+
modulesProvider.registerModule({
|
|
64
|
+
name: 'app-dms-favorites',
|
|
65
|
+
menus,
|
|
66
|
+
screens,
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
export * from './api';
|
|
71
|
+
export * from './components';
|
|
72
|
+
export * from './features/asyncFunctions-index';
|
|
73
|
+
export * from './screens';
|
|
74
|
+
export * from './types';
|
|
75
|
+
export * from './utils';
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAU,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAC/E,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAE1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7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { checkNullString } from '@axelor/aos-mobile-ui';
|
|
19
|
+
import { ParentDirectorySearchBar, SwitchDocumentType } from '../components';
|
|
20
|
+
export const dms_formsRegister = {
|
|
21
|
+
dms_document: {
|
|
22
|
+
modelName: 'com.axelor.dms.db.DMSFile',
|
|
23
|
+
fields: {
|
|
24
|
+
isDirectory: {
|
|
25
|
+
titleKey: 'Dms_Folder',
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
widget: 'custom',
|
|
28
|
+
customComponent: SwitchDocumentType,
|
|
29
|
+
hideIf: ({ objectState }) => objectState.id,
|
|
30
|
+
},
|
|
31
|
+
parent: {
|
|
32
|
+
titleKey: 'Dms_ParentFolder',
|
|
33
|
+
type: 'object',
|
|
34
|
+
widget: 'custom',
|
|
35
|
+
customComponent: ParentDirectorySearchBar,
|
|
36
|
+
options: { displayRootInfo: true },
|
|
37
|
+
hideIf: ({ objectState }) => objectState.isAttachedFileCreation,
|
|
38
|
+
},
|
|
39
|
+
fileName: {
|
|
40
|
+
titleKey: 'Dms_Name',
|
|
41
|
+
type: 'string',
|
|
42
|
+
dependsOn: {
|
|
43
|
+
metaFile: ({ newValue, objectState }) => {
|
|
44
|
+
if (checkNullString(objectState.fileName)) {
|
|
45
|
+
return newValue?.fileName;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return objectState.fileName;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
metaFile: {
|
|
55
|
+
titleKey: 'Dms_File',
|
|
56
|
+
type: 'object',
|
|
57
|
+
widget: 'file',
|
|
58
|
+
hideIf: ({ objectState }) => objectState.isDirectory,
|
|
59
|
+
requiredIf: ({ objectState }) => !objectState.isDirectory,
|
|
60
|
+
options: {
|
|
61
|
+
displayPreview: true,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=forms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/models/forms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,wBAAwB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAE3E,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,YAAY,EAAE;QACZ,SAAS,EAAE,2BAA2B;QACtC,MAAM,EAAE;YACN,WAAW,EAAE;gBACX,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,QAAQ;gBAChB,eAAe,EAAE,kBAAkB;gBACnC,MAAM,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE;aAC1C;YACD,MAAM,EAAE;gBACN,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,QAAQ;gBAChB,eAAe,EAAE,wBAAwB;gBACzC,OAAO,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;gBAChC,MAAM,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,WAAW,CAAC,sBAAsB;aAC9D;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE,UAAU;gBACpB,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE;oBACT,QAAQ,EAAE,CAAC,EAAC,QAAQ,EAAE,WAAW,EAAC,EAAE,EAAE;wBACpC,IAAI,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;4BACzC,OAAO,QAAQ,EAAE,QAAQ,CAAC;yBAC3B;6BAAM;4BACL,OAAO,WAAW,CAAC,QAAQ,CAAC;yBAC7B;oBACH,CAAC;iBACF;gBACD,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE,UAAU;gBACpB,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,WAAW,CAAC,WAAW;gBAClD,UAAU,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW;gBACvD,OAAO,EAAE;oBACP,cAAc,EAAE,IAAI;iBACrB;aACF;SACF;KACF;CACF,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 { dms_formsRegister } from './forms';
|
|
19
|
+
export { dms_modelAPI } from './objectFields';
|
|
20
|
+
export { dms_searchFields } from './searchFields';
|
|
21
|
+
export { dms_sortFields } from './sortFields';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { schemaContructor } from '@axelor/aos-mobile-core';
|
|
19
|
+
export const dms_modelAPI = {
|
|
20
|
+
dms_document: schemaContructor.object({
|
|
21
|
+
fileName: schemaContructor.string(),
|
|
22
|
+
isDirectory: schemaContructor.boolean(),
|
|
23
|
+
parent: schemaContructor.subObject(),
|
|
24
|
+
createdBy: schemaContructor.subObject(),
|
|
25
|
+
createdOn: schemaContructor.string(),
|
|
26
|
+
metaFile: schemaContructor.subObject('fileName'),
|
|
27
|
+
}),
|
|
28
|
+
auth_user: schemaContructor.object({
|
|
29
|
+
favouriteFolderSet: schemaContructor
|
|
30
|
+
.array()
|
|
31
|
+
.of(schemaContructor.subObject()),
|
|
32
|
+
favouriteFileSet: schemaContructor.array().of(schemaContructor.subObject()),
|
|
33
|
+
dmsRoot: schemaContructor.subObject('fileName'),
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=objectFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectFields.js","sourceRoot":"","sources":["../../src/models/objectFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAe,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEvE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,YAAY,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACpC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACnC,WAAW,EAAE,gBAAgB,CAAC,OAAO,EAAE;QACvC,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE;QACpC,SAAS,EAAE,gBAAgB,CAAC,SAAS,EAAE;QACvC,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACpC,QAAQ,EAAE,gBAAgB,CAAC,SAAS,CAAC,UAAU,CAAC;KACjD,CAAC;IACF,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACjC,kBAAkB,EAAE,gBAAgB;aACjC,KAAK,EAAE;aACP,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;QACnC,gBAAgB,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;QAC3E,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,UAAU,CAAC;KAChD,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 const dms_searchFields = {
|
|
19
|
+
dms_document: ['fileName'],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=searchFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchFields.js","sourceRoot":"","sources":["../../src/models/searchFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,YAAY,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 const dms_sortFields = {
|
|
19
|
+
dms_document: ['fileName'],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=sortFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortFields.js","sourceRoot":"","sources":["../../src/models/sortFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,YAAY,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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, { useMemo } from 'react';
|
|
19
|
+
import { useSelector } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { DocumentList } from '../components';
|
|
21
|
+
const AllDocumentsScreen = ({ defaultParent }) => {
|
|
22
|
+
const { user } = useSelector(state => state.user);
|
|
23
|
+
const { mobileSettings } = useSelector(state => state.appConfig);
|
|
24
|
+
const _parent = useMemo(() => defaultParent ?? user.dmsRoot ?? mobileSettings?.defaultDmsRoot, [defaultParent, mobileSettings?.defaultDmsRoot, user.dmsRoot]);
|
|
25
|
+
return <DocumentList defaultParent={_parent}/>;
|
|
26
|
+
};
|
|
27
|
+
export default AllDocumentsScreen;
|
|
28
|
+
//# sourceMappingURL=AllDocumentsScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllDocumentsScreen.js","sourceRoot":"","sources":["../../src/screens/AllDocumentsScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAE3C,MAAM,kBAAkB,GAAG,CAAC,EAAC,aAAa,EAAC,EAAE,EAAE;IAC7C,MAAM,EAAC,IAAI,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,OAAO,CACrB,GAAG,EAAE,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,IAAI,cAAc,EAAE,cAAc,EACrE,CAAC,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,CAC9D,CAAC;IAEF,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAG,CAAC;AAClD,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|