@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.
Files changed (64) hide show
  1. package/dist/constants/scopes.d.ts +11 -0
  2. package/dist/dev.d.ts +0 -2
  3. package/dist/hooks/index.d.ts +7 -3
  4. package/dist/hooks/{useBlogCategoryList.d.ts → useFetchCategories.d.ts} +2 -2
  5. package/dist/hooks/useFetchCategory.d.ts +8 -0
  6. package/dist/hooks/{useModuleConfig.d.ts → useFetchModuleConfig.d.ts} +2 -2
  7. package/dist/hooks/{useBlogPostList.d.ts → useFetchPosts.d.ts} +2 -2
  8. package/dist/hooks/useStore.d.ts +4 -0
  9. package/dist/hooks/useUserPermission.d.ts +3 -0
  10. package/dist/hooks/useUserProfile.d.ts +3 -0
  11. package/dist/index.esm.js +1245 -432
  12. package/dist/index.umd.js +1253 -438
  13. package/dist/locales/en.d.ts +10 -1
  14. package/dist/router/index.d.ts +4 -0
  15. package/dist/services/requests.d.ts +13 -22
  16. package/dist/store/index.d.ts +6 -0
  17. package/dist/store/user.d.ts +14 -0
  18. package/dist/typings/common.d.ts +1 -0
  19. package/dist/typings/model.d.ts +45 -1
  20. package/dist/utils/common.d.ts +4 -0
  21. package/dist/views/Categories/CategoryForm/CategoryForm.helpers.d.ts +3 -14
  22. package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +45 -22
  23. package/dist/views/Categories/CategoryList/CategoryList.helpers.d.ts +2 -2
  24. package/dist/views/Categories/CategoryList/CategoryList.vue.d.ts +6 -4
  25. package/dist/views/Categories/CategoryList/hooks/useAdvancedSearch.d.ts +1 -1
  26. package/dist/views/Posts/PostForm/PostForm.helpers.d.ts +2 -2
  27. package/dist/views/Posts/PostForm/PostForm.vue.d.ts +2 -0
  28. package/dist/views/Posts/PostList/PostList.helpers.d.ts +2 -2
  29. package/dist/views/Posts/PostList/PostList.vue.d.ts +8 -2
  30. package/dist/views/Posts/PostList/hooks/useAdvancedSearch.d.ts +1 -1
  31. package/package.json +9 -5
  32. package/src/constants/scopes.ts +11 -0
  33. package/src/dev.ts +11 -42
  34. package/src/hooks/index.ts +7 -3
  35. package/src/hooks/useFetchCategories.ts +25 -0
  36. package/src/hooks/useFetchCategory.ts +41 -0
  37. package/src/hooks/{useModuleConfig.ts → useFetchModuleConfig.ts} +7 -5
  38. package/src/hooks/useFetchPosts.ts +23 -0
  39. package/src/hooks/useStore.ts +8 -0
  40. package/src/hooks/useUserPermission.ts +16 -0
  41. package/src/hooks/useUserProfile.ts +13 -0
  42. package/src/locales/en.ts +13 -1
  43. package/src/locales/ru.ts +14 -2
  44. package/src/router/index.ts +39 -0
  45. package/src/services/requests.ts +30 -26
  46. package/src/store/index.ts +21 -0
  47. package/src/store/user.ts +109 -0
  48. package/src/typings/common.ts +1 -0
  49. package/src/typings/model.ts +54 -1
  50. package/src/utils/common.ts +23 -0
  51. package/src/views/App.vue +10 -2
  52. package/src/views/Categories/CategoryForm/CategoryForm.helpers.ts +26 -35
  53. package/src/views/Categories/CategoryForm/CategoryForm.vue +180 -113
  54. package/src/views/Categories/CategoryList/CategoryList.helpers.ts +41 -36
  55. package/src/views/Categories/CategoryList/CategoryList.vue +42 -25
  56. package/src/views/Categories/CategoryList/hooks/useAdvancedSearch.ts +1 -1
  57. package/src/views/Home.vue +1 -1
  58. package/src/views/Posts/PostForm/PostForm.helpers.ts +7 -6
  59. package/src/views/Posts/PostForm/PostForm.vue +57 -22
  60. package/src/views/Posts/PostList/PostList.helpers.ts +13 -15
  61. package/src/views/Posts/PostList/PostList.vue +96 -34
  62. package/src/views/Posts/PostList/hooks/useAdvancedSearch.ts +6 -5
  63. package/src/hooks/useBlogCategoryList.ts +0 -23
  64. package/src/hooks/useBlogPostList.ts +0 -23
@@ -0,0 +1,11 @@
1
+ export declare const Scope: {
2
+ readonly All: "*";
3
+ readonly OrdersCreate: "orders.create";
4
+ readonly OrdersView: "orders.view";
5
+ readonly OrdersDelete: "orders.delete";
6
+ readonly RbacViewRoles: "rbac.view-roles";
7
+ readonly RbacEditRoles: "rbac.edit-roles";
8
+ readonly AdministratorsView: "administrators.view";
9
+ readonly AdministratorsEdit: "administrators.edit";
10
+ readonly AdministratorsDelete: "administrators.delete";
11
+ };
package/dist/dev.d.ts CHANGED
@@ -1,3 +1 @@
1
- import { CustomRouteConfig } from '@tager/admin-layout';
2
1
  import '@tager/admin-ui/dist/admin-ui.css';
3
- export declare const HOME_ROUTE: CustomRouteConfig;
@@ -1,3 +1,7 @@
1
- export { useModuleConfig } from './useModuleConfig';
2
- export { useBlogPostList } from './useBlogPostList';
3
- export { useBlogCategoryList } from './useBlogCategoryList';
1
+ export { useFetchPosts } from './useFetchPosts';
2
+ export { useFetchCategory } from './useFetchCategory';
3
+ export { useFetchCategories } from './useFetchCategories';
4
+ export { useFetchModuleConfig } from './useFetchModuleConfig';
5
+ export { useStore } from './useStore';
6
+ export { useUserProfile } from './useUserProfile';
7
+ export { useUserPermission } from './useUserPermission';
@@ -1,6 +1,6 @@
1
1
  import { SetupContext } from '@vue/composition-api';
2
2
  import { ResourceRef } from '@tager/admin-services';
3
- import { Category } from '../typings/model';
4
- export declare function useBlogCategoryList(params: {
3
+ import { Category } from '@/typings/model';
4
+ export declare function useFetchCategories({ context, }: {
5
5
  context: SetupContext;
6
6
  }): ResourceRef<Category[]>;
@@ -0,0 +1,8 @@
1
+ import { Ref, SetupContext } from '@vue/composition-api';
2
+ import { Nullable, ResourceRef } from '@tager/admin-services';
3
+ import { Category } from '@/typings/model';
4
+ export declare function useFetchCategory({ context, categoryId, isCreation, }: {
5
+ context: SetupContext;
6
+ categoryId: Ref<string>;
7
+ isCreation: Ref<boolean>;
8
+ }): ResourceRef<Nullable<Category>>;
@@ -1,6 +1,6 @@
1
1
  import { SetupContext } from '@vue/composition-api';
2
2
  import { Nullable, ResourceRef } from '@tager/admin-services';
3
- import { ModuleConfig } from '../typings/model';
4
- export declare function useModuleConfig(params: {
3
+ import { ModuleConfig } from '@/typings/model';
4
+ export declare function useFetchModuleConfig({ context, }: {
5
5
  context: SetupContext;
6
6
  }): ResourceRef<Nullable<ModuleConfig>>;
@@ -1,6 +1,6 @@
1
1
  import { SetupContext } from '@vue/composition-api';
2
2
  import { ResourceRef } from '@tager/admin-services';
3
- import { PostShort } from '../typings/model';
4
- export declare function useBlogPostList(params: {
3
+ import { PostShort } from '@/typings/model';
4
+ export declare function useFetchPosts(params: {
5
5
  context: SetupContext;
6
6
  }): ResourceRef<PostShort[]>;
@@ -0,0 +1,4 @@
1
+ import { Store } from 'vuex';
2
+ import { SetupContext } from '@vue/composition-api';
3
+ import { RootState } from '@/store';
4
+ export declare function useStore(context: SetupContext): Store<RootState>;
@@ -0,0 +1,3 @@
1
+ import { ComputedRef, SetupContext } from '@vue/composition-api';
2
+ import { ScopeType } from '@/typings/model';
3
+ export declare function useUserPermission(context: SetupContext, scope: ScopeType): ComputedRef<boolean>;
@@ -0,0 +1,3 @@
1
+ import { ComputedRef, SetupContext } from '@vue/composition-api';
2
+ import { UserModel } from '@/typings/model';
3
+ export declare function useUserProfile(context: SetupContext): ComputedRef<UserModel>;