@tager/admin-blog 0.3.21 → 0.3.25

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 (86) hide show
  1. package/dist/index.esm.js +3452 -612
  2. package/dist/index.umd.js +3454 -619
  3. package/package.json +13 -7
  4. package/src/constants/menu.ts +0 -2
  5. package/src/constants/paths.ts +0 -5
  6. package/src/constants/routes.ts +5 -18
  7. package/src/constants/scopes.ts +11 -0
  8. package/src/dev.ts +11 -44
  9. package/src/hooks/index.ts +6 -0
  10. package/src/hooks/useBlogCategoryList.ts +3 -5
  11. package/src/hooks/useBlogPostList.ts +2 -4
  12. package/src/hooks/useModuleConfig.ts +4 -8
  13. package/src/hooks/useStore.ts +8 -0
  14. package/src/hooks/useUserPermission.ts +16 -0
  15. package/src/hooks/useUserProfile.ts +13 -0
  16. package/src/locales/en.ts +17 -5
  17. package/src/locales/ru.ts +17 -4
  18. package/src/router/index.ts +39 -0
  19. package/src/services/requests.ts +33 -43
  20. package/src/store/index.ts +21 -0
  21. package/src/store/user.ts +109 -0
  22. package/src/typings/common.ts +1 -0
  23. package/src/typings/model.ts +62 -38
  24. package/src/utils/common.ts +23 -0
  25. package/src/views/App.vue +10 -4
  26. package/src/views/{BlogCategoryForm/BlogCategoryForm.helpers.ts → Categories/CategoryForm/CategoryForm.helpers.ts} +22 -7
  27. package/src/views/{BlogCategoryForm/BlogCategoryForm.vue → Categories/CategoryForm/CategoryForm.vue} +140 -63
  28. package/src/views/Categories/CategoryForm/index.ts +1 -0
  29. package/src/views/Categories/CategoryList/CategoryList.helpers.ts +91 -0
  30. package/src/views/Categories/CategoryList/CategoryList.vue +269 -0
  31. package/src/views/Categories/CategoryList/hooks/index.ts +1 -0
  32. package/src/views/Categories/CategoryList/hooks/useAdvancedSearch.ts +95 -0
  33. package/src/views/Categories/CategoryList/index.ts +1 -0
  34. package/src/views/Home.vue +2 -9
  35. package/src/views/Posts/PostForm/PostForm.helpers.ts +150 -0
  36. package/src/views/Posts/PostForm/PostForm.vue +550 -0
  37. package/src/views/{BlogPostForm → Posts/PostForm}/components/TabList/TabList.types.ts +0 -0
  38. package/src/views/{BlogPostForm → Posts/PostForm}/components/TabList/TabList.vue +1 -1
  39. package/src/views/{BlogPostForm → Posts/PostForm}/components/TabList/index.ts +0 -0
  40. package/src/views/Posts/PostForm/index.ts +1 -0
  41. package/src/views/{BlogPostList/BlogPostList.helpers.ts → Posts/PostList/PostList.helpers.ts} +10 -18
  42. package/src/views/Posts/PostList/PostList.vue +361 -0
  43. package/src/views/Posts/PostList/hooks/index.ts +1 -0
  44. package/src/views/Posts/PostList/hooks/useAdvancedSearch.ts +250 -0
  45. package/src/views/Posts/PostList/index.ts +1 -0
  46. package/dist/constants/menu.d.ts +0 -5
  47. package/dist/constants/paths.d.ts +0 -16
  48. package/dist/constants/routes.d.ts +0 -6
  49. package/dist/dev.d.ts +0 -3
  50. package/dist/hooks/useBlogCategoryList.d.ts +0 -7
  51. package/dist/hooks/useBlogPostList.d.ts +0 -7
  52. package/dist/hooks/useModuleConfig.d.ts +0 -7
  53. package/dist/locales/en.d.ts +0 -63
  54. package/dist/locales/ru.d.ts +0 -3
  55. package/dist/main.d.ts +0 -4
  56. package/dist/services/requests.d.ts +0 -68
  57. package/dist/typings/model.d.ts +0 -74
  58. package/dist/views/BlogCategoryForm/BlogCategoryForm.helpers.d.ts +0 -16
  59. package/dist/views/BlogCategoryForm/BlogCategoryForm.vue.d.ts +0 -86
  60. package/dist/views/BlogCategoryForm/index.d.ts +0 -1
  61. package/dist/views/BlogCategoryList/BlogCategoryList.helpers.d.ts +0 -6
  62. package/dist/views/BlogCategoryList/BlogCategoryList.vue.d.ts +0 -3
  63. package/dist/views/BlogCategoryList/index.d.ts +0 -1
  64. package/dist/views/BlogPostForm/BlogPostForm.helpers.d.ts +0 -27
  65. package/dist/views/BlogPostForm/BlogPostForm.vue.d.ts +0 -9320
  66. package/dist/views/BlogPostForm/components/TabList/TabList.types.d.ts +0 -5
  67. package/dist/views/BlogPostForm/components/TabList/index.d.ts +0 -2
  68. package/dist/views/BlogPostForm/index.d.ts +0 -1
  69. package/dist/views/BlogPostList/BlogPostList.helpers.d.ts +0 -6
  70. package/dist/views/BlogPostList/BlogPostList.vue.d.ts +0 -45
  71. package/dist/views/BlogPostList/index.d.ts +0 -1
  72. package/dist/views/BlogSettings/BlogSettings.helpers.d.ts +0 -6
  73. package/dist/views/BlogSettings/BlogSettings.vue.d.ts +0 -9132
  74. package/dist/views/BlogSettings/index.d.ts +0 -1
  75. package/src/views/BlogCategoryForm/index.ts +0 -1
  76. package/src/views/BlogCategoryList/BlogCategoryList.helpers.ts +0 -82
  77. package/src/views/BlogCategoryList/BlogCategoryList.vue +0 -196
  78. package/src/views/BlogCategoryList/index.ts +0 -1
  79. package/src/views/BlogPostForm/BlogPostForm.helpers.ts +0 -152
  80. package/src/views/BlogPostForm/BlogPostForm.vue +0 -534
  81. package/src/views/BlogPostForm/index.ts +0 -1
  82. package/src/views/BlogPostList/BlogPostList.vue +0 -174
  83. package/src/views/BlogPostList/index.ts +0 -1
  84. package/src/views/BlogSettings/BlogSettings.helpers.ts +0 -25
  85. package/src/views/BlogSettings/BlogSettings.vue +0 -110
  86. package/src/views/BlogSettings/index.ts +0 -1
@@ -1,5 +0,0 @@
1
- export declare type TabType = {
2
- id: string;
3
- label: string;
4
- hasErrors?: boolean;
5
- };
@@ -1,2 +0,0 @@
1
- export { default } from './TabList.vue';
2
- export * from './TabList.types';
@@ -1 +0,0 @@
1
- export { default } from './BlogPostForm.vue';
@@ -1,6 +0,0 @@
1
- import { TFunction } from 'i18next';
2
- import { Nullable } from '@tager/admin-services';
3
- import { ColumnDefinition } from '@tager/admin-ui';
4
- import { BlogCategory, BlogModuleConfigType, PostShort } from '../../typings/model';
5
- export declare function convertPostList(postList: Array<PostShort>, selectedCategory: Nullable<BlogCategory>, languages: BlogModuleConfigType['languages']): Array<PostShort>;
6
- export declare function getPostTableColumnDefs(moduleConfig: Nullable<BlogModuleConfigType>, t: TFunction): Array<ColumnDefinition<PostShort>>;
@@ -1,45 +0,0 @@
1
- import { ColumnDefinition } from '@tager/admin-ui';
2
- import { BlogCategory, PostShort } from '../../typings/model';
3
- import { getBlogPostFormUrl } from '../../constants/paths';
4
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
5
- columnDefs: import("@vue/composition-api").ComputedRef<ColumnDefinition<PostShort>[]>;
6
- rowData: import("@vue/composition-api").ComputedRef<PostShort[]>;
7
- handleResourceDelete: (entityId: string | number) => void;
8
- isDeleting: (entityId: string | number) => boolean;
9
- categoryList: import("@vue/composition-api").Ref<BlogCategory[]>;
10
- isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
11
- errorMessage: import("@vue/composition-api").Ref<string | null>;
12
- getBlogPostFormUrl: typeof getBlogPostFormUrl;
13
- pageTitle: import("@vue/composition-api").ComputedRef<string>;
14
- searchQuery: import("@vue/composition-api").Ref<string>;
15
- handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
16
- pageNumber: import("@vue/composition-api").Ref<number>;
17
- pageCount: import("@vue/composition-api").ComputedRef<number>;
18
- pageSize: import("@vue/composition-api").Ref<number>;
19
- }> & {
20
- [key: string]: unknown;
21
- }, {}, {}, unknown, {
22
- [x: string]: any;
23
- }> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
24
- [x: string]: any;
25
- }, import("@vue/composition-api").ShallowUnwrapRef<{
26
- columnDefs: import("@vue/composition-api").ComputedRef<ColumnDefinition<PostShort>[]>;
27
- rowData: import("@vue/composition-api").ComputedRef<PostShort[]>;
28
- handleResourceDelete: (entityId: string | number) => void;
29
- isDeleting: (entityId: string | number) => boolean;
30
- categoryList: import("@vue/composition-api").Ref<BlogCategory[]>;
31
- isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
32
- errorMessage: import("@vue/composition-api").Ref<string | null>;
33
- getBlogPostFormUrl: typeof getBlogPostFormUrl;
34
- pageTitle: import("@vue/composition-api").ComputedRef<string>;
35
- searchQuery: import("@vue/composition-api").Ref<string>;
36
- handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
37
- pageNumber: import("@vue/composition-api").Ref<number>;
38
- pageCount: import("@vue/composition-api").ComputedRef<number>;
39
- pageSize: import("@vue/composition-api").Ref<number>;
40
- }>, {
41
- [x: string]: any;
42
- }, {}, {}, {
43
- [x: string]: any;
44
- }>);
45
- export default _default;
@@ -1 +0,0 @@
1
- export { default } from './BlogPostList.vue';
@@ -1,6 +0,0 @@
1
- import { FieldUnion } from '@tager/admin-dynamic-field';
2
- import { SettingItemType } from '../../typings/model';
3
- import { SettingsUpdatePayload } from '../../services/requests';
4
- export declare type SettingsFormValues = Array<FieldUnion>;
5
- export declare function convertBlogSettingsToFormValues(settingItemList: Array<SettingItemType>): SettingsFormValues;
6
- export declare function convertSettingValuesToRequestPayload(values: SettingsFormValues): SettingsUpdatePayload;