@soroka282/rm.ui-kit 0.0.5 → 0.0.7
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/dist/{DeleteDocumentModal-1QPqs2qy.js → DeleteDocumentModal-D4vr7Tmk.js} +1 -1
- package/dist/{List-Bho5A0PE.js → List-BknCn7FC.js} +1 -1
- package/dist/{UIBlockViewDetailImageListModalType1-BqQrQgK1.js → UIBlockViewDetailImageListModalType1-DzD6F0-w.js} +1 -1
- package/dist/{index-DX4wwUrG.js → index-C9di9rt_.js} +2736 -2717
- package/dist/rm.ui-kit.es.js +2 -2
- package/dist/rm.ui-kit.umd.js +20 -20
- package/dist/src/modules/documents/ModuleDocumentsList.vue.d.ts +3 -0
- package/package.json +1 -1
- package/src/modules/documents/ModuleDocumentsList.vue +4 -1
- package/src/modules/documents/composables/useModuleDocumentConnector.ts +4 -4
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DocumentsType, IApiDocumentModule, IApiResponse } from './type';
|
|
2
2
|
import { ELanguageLocale, valueof } from '../../UI-kit/types';
|
|
3
3
|
type TApi = Pick<IApiDocumentModule, 'getDocuments'>;
|
|
4
|
+
type TAvailableDoc = Exclude<valueof<typeof DocumentsType>, 'CUSTOM'>;
|
|
4
5
|
type __VLS_Props = {
|
|
5
6
|
authToken: string;
|
|
6
7
|
currentLang?: ELanguageLocale;
|
|
7
8
|
api?: TApi;
|
|
9
|
+
whiteDocTypeList?: TAvailableDoc[];
|
|
8
10
|
};
|
|
9
11
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
12
|
click: (args_0: {
|
|
@@ -19,5 +21,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
19
21
|
}>, {
|
|
20
22
|
api: TApi;
|
|
21
23
|
currentLang: ELanguageLocale;
|
|
24
|
+
whiteDocTypeList: TAvailableDoc[];
|
|
22
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
26
|
export default _default;
|
package/package.json
CHANGED
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
authToken: string;
|
|
17
17
|
currentLang?: ELanguageLocale;
|
|
18
18
|
api?: TApi;
|
|
19
|
+
whiteDocTypeList?: TAvailableDoc[];
|
|
19
20
|
}>(),
|
|
20
21
|
{
|
|
21
22
|
currentLang: ELanguageLocale.RU,
|
|
22
23
|
api: () => ({}) as TApi,
|
|
24
|
+
whiteDocTypeList: () => [],
|
|
23
25
|
},
|
|
24
26
|
);
|
|
25
27
|
|
|
@@ -35,7 +37,8 @@
|
|
|
35
37
|
|
|
36
38
|
const availableDocumentTypeList = computed<TAvailableDoc[]>(() =>
|
|
37
39
|
Object.values(DocumentsType).filter(
|
|
38
|
-
(item): item is TAvailableDoc =>
|
|
40
|
+
(item): item is TAvailableDoc =>
|
|
41
|
+
item !== DocumentsType.CUSTOM && !props.whiteDocTypeList.includes(item),
|
|
39
42
|
),
|
|
40
43
|
);
|
|
41
44
|
|
|
@@ -5,19 +5,19 @@ export default function (authToken = '') {
|
|
|
5
5
|
const baseConnector = useBaseConnector(authToken);
|
|
6
6
|
|
|
7
7
|
const getDocuments = async () => {
|
|
8
|
-
return baseConnector.get<IApiResponse>('/document');
|
|
8
|
+
return baseConnector.get<IApiResponse>('/api/document');
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
const saveDocument = async (formData?: IApiRequest): Promise<IApiResponse> => {
|
|
12
|
-
return baseConnector.post<IApiResponse>('/document', formData);
|
|
12
|
+
return baseConnector.post<IApiResponse>('/api/document', formData);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const updateDocument = async (formData?: IApiRequest): Promise<IApiResponse> => {
|
|
16
|
-
return baseConnector.patch<IApiResponse>('/document/', formData);
|
|
16
|
+
return baseConnector.patch<IApiResponse>('/api/document/', formData);
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const deleteDocument = async (id: number) => {
|
|
20
|
-
return baseConnector.remove(`/document/${id}`);
|
|
20
|
+
return baseConnector.remove(`/api/document/${id}`);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
return {
|