@tager/admin-blog 0.3.23 → 0.3.29
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/constants/scopes.d.ts +11 -0
- package/dist/dev.d.ts +0 -2
- package/dist/hooks/index.d.ts +7 -3
- package/dist/hooks/{useBlogCategoryList.d.ts → useFetchCategories.d.ts} +2 -2
- package/dist/hooks/useFetchCategory.d.ts +8 -0
- package/dist/hooks/{useModuleConfig.d.ts → useFetchModuleConfig.d.ts} +2 -2
- package/dist/hooks/{useBlogPostList.d.ts → useFetchPosts.d.ts} +2 -2
- package/dist/hooks/useStore.d.ts +4 -0
- package/dist/hooks/useUserPermission.d.ts +3 -0
- package/dist/hooks/useUserProfile.d.ts +3 -0
- package/dist/index.esm.js +1245 -432
- package/dist/index.umd.js +1253 -438
- package/dist/locales/en.d.ts +10 -1
- package/dist/router/index.d.ts +4 -0
- package/dist/services/requests.d.ts +13 -22
- package/dist/store/index.d.ts +6 -0
- package/dist/store/user.d.ts +14 -0
- package/dist/typings/common.d.ts +1 -0
- package/dist/typings/model.d.ts +45 -1
- package/dist/utils/common.d.ts +4 -0
- package/dist/views/Categories/CategoryForm/CategoryForm.helpers.d.ts +3 -14
- package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +45 -22
- package/dist/views/Categories/CategoryList/CategoryList.helpers.d.ts +2 -2
- package/dist/views/Categories/CategoryList/CategoryList.vue.d.ts +6 -4
- package/dist/views/Categories/CategoryList/hooks/useAdvancedSearch.d.ts +1 -1
- package/dist/views/Posts/PostForm/PostForm.helpers.d.ts +2 -2
- package/dist/views/Posts/PostForm/PostForm.vue.d.ts +2 -0
- package/dist/views/Posts/PostList/PostList.helpers.d.ts +2 -2
- package/dist/views/Posts/PostList/PostList.vue.d.ts +8 -2
- package/dist/views/Posts/PostList/hooks/useAdvancedSearch.d.ts +1 -1
- package/package.json +9 -5
- package/src/constants/scopes.ts +11 -0
- package/src/dev.ts +11 -42
- package/src/hooks/index.ts +7 -3
- package/src/hooks/useFetchCategories.ts +25 -0
- package/src/hooks/useFetchCategory.ts +41 -0
- package/src/hooks/{useModuleConfig.ts → useFetchModuleConfig.ts} +7 -5
- package/src/hooks/useFetchPosts.ts +23 -0
- package/src/hooks/useStore.ts +8 -0
- package/src/hooks/useUserPermission.ts +16 -0
- package/src/hooks/useUserProfile.ts +13 -0
- package/src/locales/en.ts +13 -1
- package/src/locales/ru.ts +14 -2
- package/src/router/index.ts +39 -0
- package/src/services/requests.ts +30 -26
- package/src/store/index.ts +21 -0
- package/src/store/user.ts +109 -0
- package/src/typings/common.ts +1 -0
- package/src/typings/model.ts +54 -1
- package/src/utils/common.ts +23 -0
- package/src/views/App.vue +10 -2
- package/src/views/Categories/CategoryForm/CategoryForm.helpers.ts +26 -35
- package/src/views/Categories/CategoryForm/CategoryForm.vue +180 -113
- package/src/views/Categories/CategoryList/CategoryList.helpers.ts +41 -36
- package/src/views/Categories/CategoryList/CategoryList.vue +42 -25
- package/src/views/Categories/CategoryList/hooks/useAdvancedSearch.ts +1 -1
- package/src/views/Home.vue +1 -1
- package/src/views/Posts/PostForm/PostForm.helpers.ts +7 -6
- package/src/views/Posts/PostForm/PostForm.vue +57 -22
- package/src/views/Posts/PostList/PostList.helpers.ts +13 -15
- package/src/views/Posts/PostList/PostList.vue +96 -34
- package/src/views/Posts/PostList/hooks/useAdvancedSearch.ts +6 -5
- package/src/hooks/useBlogCategoryList.ts +0 -23
- package/src/hooks/useBlogPostList.ts +0 -23
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { onMounted, SetupContext } from '@vue/composition-api';
|
|
2
|
-
|
|
3
|
-
import { ResourceRef, useResource } from '@tager/admin-services';
|
|
4
|
-
|
|
5
|
-
import { Category } from '../typings/model';
|
|
6
|
-
import { getBlogCategoryList } from '../services/requests';
|
|
7
|
-
|
|
8
|
-
export function useBlogCategoryList(params: {
|
|
9
|
-
context: SetupContext;
|
|
10
|
-
}): ResourceRef<Category[]> {
|
|
11
|
-
const [fetchBlogCategoryList, resource] = useResource<Category[]>({
|
|
12
|
-
fetchResource: getBlogCategoryList,
|
|
13
|
-
initialValue: [],
|
|
14
|
-
context: params.context,
|
|
15
|
-
resourceName: 'Blog category list',
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
onMounted(() => {
|
|
19
|
-
fetchBlogCategoryList();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return resource;
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { onMounted, SetupContext } from '@vue/composition-api';
|
|
2
|
-
|
|
3
|
-
import { ResourceRef, useResource } from '@tager/admin-services';
|
|
4
|
-
|
|
5
|
-
import { PostShort } from '../typings/model';
|
|
6
|
-
import { getBlogPostList } from '../services/requests';
|
|
7
|
-
|
|
8
|
-
export function useBlogPostList(params: {
|
|
9
|
-
context: SetupContext;
|
|
10
|
-
}): ResourceRef<PostShort[]> {
|
|
11
|
-
const [fetchBlogPostList, resource] = useResource<PostShort[]>({
|
|
12
|
-
fetchResource: () => getBlogPostList({ pageNumber: 1, pageSize: 99999 }),
|
|
13
|
-
initialValue: [],
|
|
14
|
-
context: params.context,
|
|
15
|
-
resourceName: 'Blog post list',
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
onMounted(() => {
|
|
19
|
-
fetchBlogPostList();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return resource;
|
|
23
|
-
}
|