@tager/admin-blog 0.3.24 → 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.
- package/dist/index.esm.js +546 -278
- package/dist/index.umd.js +545 -275
- package/package.json +7 -5
- package/src/constants/scopes.ts +11 -0
- package/src/dev.ts +11 -42
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useModuleConfig.ts +2 -2
- 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 +10 -0
- package/src/locales/ru.ts +10 -0
- package/src/router/index.ts +39 -0
- package/src/services/requests.ts +17 -1
- 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 +23 -0
- package/src/utils/common.ts +23 -0
- package/src/views/App.vue +10 -2
- package/src/views/Categories/CategoryForm/CategoryForm.helpers.ts +19 -4
- package/src/views/Categories/CategoryForm/CategoryForm.vue +139 -66
- package/src/views/Categories/CategoryList/CategoryList.helpers.ts +30 -28
- package/src/views/Categories/CategoryList/CategoryList.vue +26 -11
- 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 +2 -5
- package/src/views/Posts/PostForm/PostForm.vue +4 -6
- package/src/views/Posts/PostList/PostList.helpers.ts +2 -7
- package/src/views/Posts/PostList/PostList.vue +84 -24
- package/src/views/Posts/PostList/hooks/useAdvancedSearch.ts +6 -5
- package/dist/constants/menu.d.ts +0 -5
- package/dist/constants/paths.d.ts +0 -14
- package/dist/constants/routes.d.ts +0 -5
- package/dist/dev.d.ts +0 -3
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/useBlogCategoryList.d.ts +0 -6
- package/dist/hooks/useBlogPostList.d.ts +0 -6
- package/dist/hooks/useModuleConfig.d.ts +0 -6
- package/dist/locales/en.d.ts +0 -66
- package/dist/locales/ru.d.ts +0 -3
- package/dist/main.d.ts +0 -4
- package/dist/services/requests.d.ts +0 -67
- package/dist/typings/model.d.ts +0 -73
- package/dist/views/Categories/CategoryForm/CategoryForm.helpers.d.ts +0 -16
- package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +0 -86
- package/dist/views/Categories/CategoryForm/index.d.ts +0 -1
- package/dist/views/Categories/CategoryList/CategoryList.helpers.d.ts +0 -7
- package/dist/views/Categories/CategoryList/CategoryList.vue.d.ts +0 -57
- package/dist/views/Categories/CategoryList/hooks/index.d.ts +0 -1
- package/dist/views/Categories/CategoryList/hooks/useAdvancedSearch.d.ts +0 -16
- package/dist/views/Categories/CategoryList/index.d.ts +0 -1
- package/dist/views/Posts/PostForm/PostForm.helpers.d.ts +0 -27
- package/dist/views/Posts/PostForm/PostForm.vue.d.ts +0 -9380
- package/dist/views/Posts/PostForm/components/TabList/TabList.types.d.ts +0 -5
- package/dist/views/Posts/PostForm/components/TabList/index.d.ts +0 -2
- package/dist/views/Posts/PostForm/index.d.ts +0 -1
- package/dist/views/Posts/PostList/PostList.helpers.d.ts +0 -6
- package/dist/views/Posts/PostList/PostList.vue.d.ts +0 -63
- package/dist/views/Posts/PostList/hooks/index.d.ts +0 -1
- package/dist/views/Posts/PostList/hooks/useAdvancedSearch.d.ts +0 -22
- package/dist/views/Posts/PostList/index.d.ts +0 -1
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
} from '@tager/admin-ui';
|
|
17
17
|
import { isNotNullish } from '@tager/admin-services';
|
|
18
18
|
|
|
19
|
-
import { Category, Language } from '
|
|
19
|
+
import { Category, Language } from '@/typings/model';
|
|
20
|
+
import { getNameWithDepth } from '@/utils/common';
|
|
20
21
|
|
|
21
22
|
interface Params {
|
|
22
23
|
context: SetupContext;
|
|
@@ -53,9 +54,9 @@ export function useAdvancedSearch({
|
|
|
53
54
|
/** Category **/
|
|
54
55
|
|
|
55
56
|
const categoryOptionList = computed<OptionType[]>(() =>
|
|
56
|
-
categoryList.value.map(({ id, name }) => ({
|
|
57
|
+
categoryList.value.map(({ id, name, depth }) => ({
|
|
57
58
|
value: String(id),
|
|
58
|
-
label: name,
|
|
59
|
+
label: getNameWithDepth(name, depth),
|
|
59
60
|
}))
|
|
60
61
|
);
|
|
61
62
|
|
|
@@ -229,9 +230,9 @@ export function useAdvancedSearch({
|
|
|
229
230
|
languageFilter.value.some(({ value }) => value === language)
|
|
230
231
|
);
|
|
231
232
|
|
|
232
|
-
return selectedList.map(({ id, name }) => ({
|
|
233
|
+
return selectedList.map(({ id, name, depth }) => ({
|
|
233
234
|
value: String(id),
|
|
234
|
-
label: name,
|
|
235
|
+
label: getNameWithDepth(name, depth),
|
|
235
236
|
}));
|
|
236
237
|
});
|
|
237
238
|
|
package/dist/constants/menu.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const BLOG_ROUTE_PATHS: {
|
|
2
|
-
readonly POST_LIST: "/blog/posts";
|
|
3
|
-
readonly POST_FORM: "/blog/posts/:postId";
|
|
4
|
-
readonly CATEGORY_LIST: "/blog/categories";
|
|
5
|
-
readonly CATEGORY_FORM: "/blog/categories/:categoryId";
|
|
6
|
-
};
|
|
7
|
-
export declare function getBlogPostListUrl(): "/blog/posts";
|
|
8
|
-
export declare function getBlogPostFormUrl(params: {
|
|
9
|
-
postId: number | string;
|
|
10
|
-
}): string;
|
|
11
|
-
export declare function getBlogCategoryListUrl(): "/blog/categories";
|
|
12
|
-
export declare function getBlogCategoryFormUrl(params: {
|
|
13
|
-
categoryId: number | string;
|
|
14
|
-
}): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CustomRouteConfig } from '@tager/admin-layout';
|
|
2
|
-
export declare const BLOG_POST_LIST_ROUTE: CustomRouteConfig;
|
|
3
|
-
export declare const BLOG_POST_FORM_ROUTE: CustomRouteConfig;
|
|
4
|
-
export declare const BLOG_CATEGORY_LIST_ROUTE: CustomRouteConfig;
|
|
5
|
-
export declare const BLOG_CATEGORY_FORM_ROUTE: CustomRouteConfig;
|
package/dist/dev.d.ts
DELETED
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SetupContext } from '@vue/composition-api';
|
|
2
|
-
import { Nullable, ResourceRef } from '@tager/admin-services';
|
|
3
|
-
import { ModuleConfig } from '../typings/model';
|
|
4
|
-
export declare function useModuleConfig(params: {
|
|
5
|
-
context: SetupContext;
|
|
6
|
-
}): ResourceRef<Nullable<ModuleConfig>>;
|
package/dist/locales/en.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
declare const EN: {
|
|
2
|
-
yes: string;
|
|
3
|
-
no: string;
|
|
4
|
-
blog: string;
|
|
5
|
-
posts: string;
|
|
6
|
-
categories: string;
|
|
7
|
-
createPost: string;
|
|
8
|
-
createCategory: string;
|
|
9
|
-
home: string;
|
|
10
|
-
allPosts: string;
|
|
11
|
-
postForm: string;
|
|
12
|
-
allCategories: string;
|
|
13
|
-
categoryForm: string;
|
|
14
|
-
success: string;
|
|
15
|
-
error: string;
|
|
16
|
-
newPost: string;
|
|
17
|
-
edit: string;
|
|
18
|
-
remove: string;
|
|
19
|
-
postsByCategory: string;
|
|
20
|
-
name: string;
|
|
21
|
-
image: string;
|
|
22
|
-
language: string;
|
|
23
|
-
languages: string;
|
|
24
|
-
date: string;
|
|
25
|
-
dateOfPublication: string;
|
|
26
|
-
from: string;
|
|
27
|
-
to: string;
|
|
28
|
-
From: string;
|
|
29
|
-
To: string;
|
|
30
|
-
category: string;
|
|
31
|
-
actions: string;
|
|
32
|
-
updatePost: string;
|
|
33
|
-
title: string;
|
|
34
|
-
URLAlias: string;
|
|
35
|
-
excerpt: string;
|
|
36
|
-
body: string;
|
|
37
|
-
defaultCategory: string;
|
|
38
|
-
coverImage: string;
|
|
39
|
-
innerImage: string;
|
|
40
|
-
innerImageMobile: string;
|
|
41
|
-
tags: string;
|
|
42
|
-
relatedPosts: string;
|
|
43
|
-
blogPostWasSuccessfullyCreated: string;
|
|
44
|
-
blogPostWasSuccessfullyUpdated: string;
|
|
45
|
-
blogPostCreationWasFailed: string;
|
|
46
|
-
blogPostUpdateWasFailed: string;
|
|
47
|
-
common: string;
|
|
48
|
-
images: string;
|
|
49
|
-
relations: string;
|
|
50
|
-
additionalFields: string;
|
|
51
|
-
viewPost: string;
|
|
52
|
-
blogCategories: string;
|
|
53
|
-
newCategory: string;
|
|
54
|
-
moveUp: string;
|
|
55
|
-
moveDown: string;
|
|
56
|
-
createBlogCategory: string;
|
|
57
|
-
updateBlogCategory: string;
|
|
58
|
-
pageTitle: string;
|
|
59
|
-
pageDescription: string;
|
|
60
|
-
openGraphImage: string;
|
|
61
|
-
blogCategoryWasSuccessfullyCreated: string;
|
|
62
|
-
blogCategoryWasSuccessfullyUpdated: string;
|
|
63
|
-
blogCategoryCreationWasFailed: string;
|
|
64
|
-
blogCategoryUpdateWasFailed: string;
|
|
65
|
-
};
|
|
66
|
-
export default EN;
|
package/dist/locales/ru.d.ts
DELETED
package/dist/main.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Nullable, ResponseBody } from '@tager/admin-services';
|
|
2
|
-
import { FieldShortType, OutgoingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
-
import { Category, ModuleConfig, PostShort, PostFull } from '../typings/model';
|
|
4
|
-
/** Blog Posts */
|
|
5
|
-
export declare function getBlogPostList(params?: {
|
|
6
|
-
query?: string;
|
|
7
|
-
pageNumber?: number;
|
|
8
|
-
pageSize?: number;
|
|
9
|
-
}): Promise<ResponseBody<PostShort[]>>;
|
|
10
|
-
export declare function getBlogPostCount(): Promise<ResponseBody<{
|
|
11
|
-
count: number;
|
|
12
|
-
}>>;
|
|
13
|
-
export declare function getBlogPost(postId: number | string): Promise<ResponseBody<PostFull>>;
|
|
14
|
-
export interface PostCreationPayload {
|
|
15
|
-
title: string;
|
|
16
|
-
urlAlias: string;
|
|
17
|
-
excerpt: string;
|
|
18
|
-
body: string;
|
|
19
|
-
date: string;
|
|
20
|
-
coverImage: Nullable<string>;
|
|
21
|
-
image: Nullable<string>;
|
|
22
|
-
imageMobile: Nullable<string>;
|
|
23
|
-
status: string;
|
|
24
|
-
pageTitle: string;
|
|
25
|
-
pageDescription: string;
|
|
26
|
-
openGraphImage: Nullable<string>;
|
|
27
|
-
categories: number[];
|
|
28
|
-
language: Nullable<string>;
|
|
29
|
-
relatedPosts: number[];
|
|
30
|
-
tags: string[];
|
|
31
|
-
additionalFields: FieldShortType<OutgoingValueUnion>[];
|
|
32
|
-
}
|
|
33
|
-
export declare function createBlogPost(payload: PostCreationPayload): Promise<ResponseBody<PostFull>>;
|
|
34
|
-
export declare type PostUpdatePayload = PostCreationPayload & {
|
|
35
|
-
urlAlias: string;
|
|
36
|
-
};
|
|
37
|
-
export declare function updateBlogPost(postId: number | string, payload: PostUpdatePayload): Promise<ResponseBody<PostFull>>;
|
|
38
|
-
export declare function deleteBlogPost(postId: number | string): Promise<{
|
|
39
|
-
success: boolean;
|
|
40
|
-
}>;
|
|
41
|
-
/** Blog Categories */
|
|
42
|
-
export declare function getBlogCategoryList(params?: {
|
|
43
|
-
query?: string;
|
|
44
|
-
pageNumber?: number;
|
|
45
|
-
pageSize?: number;
|
|
46
|
-
}): Promise<ResponseBody<Category[]>>;
|
|
47
|
-
export declare function getBlogCategory(categoryId: number | string): Promise<ResponseBody<Category>>;
|
|
48
|
-
export interface BlogCategoryCreationPayload {
|
|
49
|
-
name: string;
|
|
50
|
-
isDefault: boolean;
|
|
51
|
-
pageTitle: Nullable<string>;
|
|
52
|
-
language: Nullable<string>;
|
|
53
|
-
pageDescription: Nullable<string>;
|
|
54
|
-
openGraphImage: Nullable<string>;
|
|
55
|
-
}
|
|
56
|
-
export declare function createBlogCategory(payload: BlogCategoryCreationPayload): Promise<ResponseBody<Category>>;
|
|
57
|
-
export declare type BlogCategoryUpdatePayload = BlogCategoryCreationPayload & {
|
|
58
|
-
urlAlias: string;
|
|
59
|
-
};
|
|
60
|
-
export declare function updateBlogCategory(categoryId: number | string, payload: BlogCategoryUpdatePayload): Promise<ResponseBody<Category>>;
|
|
61
|
-
export declare function deleteBlogCategory(categoryId: number | string): Promise<{
|
|
62
|
-
success: boolean;
|
|
63
|
-
}>;
|
|
64
|
-
export declare function moveBlogCategory(categoryId: number | string, direction: 'up' | 'down'): Promise<{
|
|
65
|
-
success: boolean;
|
|
66
|
-
}>;
|
|
67
|
-
export declare function getBlogModuleConfig(): Promise<ResponseBody<ModuleConfig>>;
|
package/dist/typings/model.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Nullable, FileType } from '@tager/admin-services';
|
|
2
|
-
import { FieldConfigUnion, FieldShortType, IncomingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
-
import { ShortCodeItemType } from '@tager/admin-ui';
|
|
4
|
-
export interface SeoInfo {
|
|
5
|
-
readonly pageTitle: Nullable<string>;
|
|
6
|
-
readonly pageDescription: Nullable<string>;
|
|
7
|
-
readonly openGraphImage: Nullable<FileType>;
|
|
8
|
-
}
|
|
9
|
-
export interface Category extends SeoInfo {
|
|
10
|
-
readonly id: number;
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly isDefault: boolean;
|
|
13
|
-
readonly language: string;
|
|
14
|
-
readonly url: string;
|
|
15
|
-
readonly urlTemplate: string;
|
|
16
|
-
readonly urlAlias: string;
|
|
17
|
-
readonly postsCount: string;
|
|
18
|
-
}
|
|
19
|
-
export interface PostShort {
|
|
20
|
-
readonly id: number;
|
|
21
|
-
readonly title: string;
|
|
22
|
-
readonly url: string;
|
|
23
|
-
readonly excerpt: string;
|
|
24
|
-
readonly status: string;
|
|
25
|
-
readonly language: string;
|
|
26
|
-
readonly categories: Category[];
|
|
27
|
-
readonly date: string;
|
|
28
|
-
readonly image: Nullable<FileType>;
|
|
29
|
-
}
|
|
30
|
-
export interface PostFull extends SeoInfo {
|
|
31
|
-
readonly id: number;
|
|
32
|
-
readonly language: string;
|
|
33
|
-
readonly title: string;
|
|
34
|
-
readonly url: string;
|
|
35
|
-
readonly urlTemplate: string;
|
|
36
|
-
readonly urlAlias: string;
|
|
37
|
-
readonly date: string;
|
|
38
|
-
readonly status: string;
|
|
39
|
-
readonly excerpt: string;
|
|
40
|
-
readonly image: Nullable<FileType>;
|
|
41
|
-
readonly imageMobile: Nullable<FileType>;
|
|
42
|
-
readonly categories: Category[];
|
|
43
|
-
readonly body: string;
|
|
44
|
-
readonly coverImage: Nullable<FileType>;
|
|
45
|
-
readonly relatedPosts: Pick<PostShort, 'id' | 'title'>[];
|
|
46
|
-
readonly tags: string[];
|
|
47
|
-
readonly additionalFields: FieldShortType<IncomingValueUnion>[];
|
|
48
|
-
}
|
|
49
|
-
export interface Language {
|
|
50
|
-
readonly id: string;
|
|
51
|
-
readonly name: string;
|
|
52
|
-
}
|
|
53
|
-
export interface DefaultCategory {
|
|
54
|
-
readonly id: number;
|
|
55
|
-
readonly name: string;
|
|
56
|
-
readonly language: string;
|
|
57
|
-
}
|
|
58
|
-
export interface FileScenarios {
|
|
59
|
-
readonly cover: Nullable<string>;
|
|
60
|
-
readonly image: Nullable<string>;
|
|
61
|
-
readonly imageMobile: Nullable<string>;
|
|
62
|
-
readonly content: Nullable<string>;
|
|
63
|
-
readonly openGraph: Nullable<string>;
|
|
64
|
-
}
|
|
65
|
-
export interface ModuleConfig {
|
|
66
|
-
readonly urlPostTemplate: Nullable<string>;
|
|
67
|
-
readonly urlCategoryTemplate: Nullable<string>;
|
|
68
|
-
readonly languages: Language[];
|
|
69
|
-
readonly defaultCategories: DefaultCategory[];
|
|
70
|
-
readonly fields: FieldConfigUnion[];
|
|
71
|
-
readonly shortcodes: ShortCodeItemType[];
|
|
72
|
-
readonly fileScenarios: FileScenarios;
|
|
73
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType, SingleFileInputValueType } from '@tager/admin-ui';
|
|
3
|
-
import { Category } from '../../../typings/model';
|
|
4
|
-
import { BlogCategoryCreationPayload, BlogCategoryUpdatePayload } from '../../../services/requests';
|
|
5
|
-
export declare type CategoryFormValues = {
|
|
6
|
-
name: string;
|
|
7
|
-
isDefault: boolean;
|
|
8
|
-
pageTitle: string;
|
|
9
|
-
pageDescription: string;
|
|
10
|
-
openGraphImage: Nullable<SingleFileInputValueType>;
|
|
11
|
-
urlAlias: string;
|
|
12
|
-
language: Nullable<OptionType>;
|
|
13
|
-
};
|
|
14
|
-
export declare function convertCategoryToFormValues(category: Nullable<Category>, languageOptionList: OptionType[]): CategoryFormValues;
|
|
15
|
-
export declare function convertCategoryFormValuesToCreationPayload(values: CategoryFormValues): BlogCategoryCreationPayload;
|
|
16
|
-
export declare function convertCategoryFormValuesToUpdatePayload(values: CategoryFormValues): BlogCategoryUpdatePayload;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType, TagerFormSubmitEvent } from '@tager/admin-ui';
|
|
3
|
-
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
-
isCreation: import("@vue/composition-api").ComputedRef<boolean>;
|
|
5
|
-
isContentLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
6
|
-
values: import("@vue/composition-api").Ref<{
|
|
7
|
-
name: string;
|
|
8
|
-
isDefault: boolean;
|
|
9
|
-
pageTitle: string;
|
|
10
|
-
pageDescription: string;
|
|
11
|
-
openGraphImage: {
|
|
12
|
-
id: string;
|
|
13
|
-
file: {
|
|
14
|
-
id: string;
|
|
15
|
-
mime: string;
|
|
16
|
-
name: string;
|
|
17
|
-
size: number;
|
|
18
|
-
url: string;
|
|
19
|
-
};
|
|
20
|
-
caption?: string | null | undefined;
|
|
21
|
-
} | null;
|
|
22
|
-
urlAlias: string;
|
|
23
|
-
language: {
|
|
24
|
-
value: string;
|
|
25
|
-
label: string;
|
|
26
|
-
disabled?: boolean | undefined;
|
|
27
|
-
} | null;
|
|
28
|
-
}>;
|
|
29
|
-
errors: import("@vue/composition-api").Ref<{
|
|
30
|
-
[x: string]: string;
|
|
31
|
-
}>;
|
|
32
|
-
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
33
|
-
languageOptionList: import("@vue/composition-api").ComputedRef<OptionType<string>[]>;
|
|
34
|
-
pagePath: import("@vue/composition-api").ComputedRef<string>;
|
|
35
|
-
categoryListUrl: "/blog/categories";
|
|
36
|
-
submitForm: (event: TagerFormSubmitEvent) => void;
|
|
37
|
-
isSubmitting: import("@vue/composition-api").Ref<boolean>;
|
|
38
|
-
moduleConfig: import("@vue/composition-api").Ref<Nullable<import("../../../typings/model").ModuleConfig>>;
|
|
39
|
-
}> & {
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}, {}, {}, unknown, {
|
|
42
|
-
[x: string]: any;
|
|
43
|
-
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
44
|
-
[x: string]: any;
|
|
45
|
-
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
46
|
-
isCreation: import("@vue/composition-api").ComputedRef<boolean>;
|
|
47
|
-
isContentLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
48
|
-
values: import("@vue/composition-api").Ref<{
|
|
49
|
-
name: string;
|
|
50
|
-
isDefault: boolean;
|
|
51
|
-
pageTitle: string;
|
|
52
|
-
pageDescription: string;
|
|
53
|
-
openGraphImage: {
|
|
54
|
-
id: string;
|
|
55
|
-
file: {
|
|
56
|
-
id: string;
|
|
57
|
-
mime: string;
|
|
58
|
-
name: string;
|
|
59
|
-
size: number;
|
|
60
|
-
url: string;
|
|
61
|
-
};
|
|
62
|
-
caption?: string | null | undefined;
|
|
63
|
-
} | null;
|
|
64
|
-
urlAlias: string;
|
|
65
|
-
language: {
|
|
66
|
-
value: string;
|
|
67
|
-
label: string;
|
|
68
|
-
disabled?: boolean | undefined;
|
|
69
|
-
} | null;
|
|
70
|
-
}>;
|
|
71
|
-
errors: import("@vue/composition-api").Ref<{
|
|
72
|
-
[x: string]: string;
|
|
73
|
-
}>;
|
|
74
|
-
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
75
|
-
languageOptionList: import("@vue/composition-api").ComputedRef<OptionType<string>[]>;
|
|
76
|
-
pagePath: import("@vue/composition-api").ComputedRef<string>;
|
|
77
|
-
categoryListUrl: "/blog/categories";
|
|
78
|
-
submitForm: (event: TagerFormSubmitEvent) => void;
|
|
79
|
-
isSubmitting: import("@vue/composition-api").Ref<boolean>;
|
|
80
|
-
moduleConfig: import("@vue/composition-api").Ref<Nullable<import("../../../typings/model").ModuleConfig>>;
|
|
81
|
-
}>, {
|
|
82
|
-
[x: string]: any;
|
|
83
|
-
}, {}, {}, {
|
|
84
|
-
[x: string]: any;
|
|
85
|
-
}>);
|
|
86
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CategoryForm.vue';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TFunction } from 'i18next';
|
|
2
|
-
import { Nullable } from '@tager/admin-services';
|
|
3
|
-
import { ColumnDefinition } from '@tager/admin-ui';
|
|
4
|
-
import { Category, Language, ModuleConfig } from '../../../typings/model';
|
|
5
|
-
export declare function convertCategoryList(categoryList: Category[], languages: Language[]): Category[];
|
|
6
|
-
export declare function getCategoryTableColumnDefs(moduleConfig: Nullable<ModuleConfig>, t: TFunction): ColumnDefinition<Category>[];
|
|
7
|
-
export declare function getLinkToPostsByCategory(categoryId: number): string;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Category } from '../../../typings/model';
|
|
2
|
-
import { getBlogCategoryFormUrl } from '../../../constants/paths';
|
|
3
|
-
import { getLinkToPostsByCategory } from './CategoryList.helpers';
|
|
4
|
-
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
-
columnDefs: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").ColumnDefinition<Category>[]>;
|
|
6
|
-
rowData: import("@vue/composition-api").ComputedRef<Category[]>;
|
|
7
|
-
isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
8
|
-
errorMessage: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<string>>;
|
|
9
|
-
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
10
|
-
handleCategoryDelete: (entityId: string | number) => void;
|
|
11
|
-
isDeleting: (entityId: string | number) => boolean;
|
|
12
|
-
getBlogCategoryFormUrl: typeof getBlogCategoryFormUrl;
|
|
13
|
-
getLinkToPostsByCategory: typeof getLinkToPostsByCategory;
|
|
14
|
-
moveCategory: (categoryId: number, direction: 'up' | 'down') => void;
|
|
15
|
-
isCategoryMoving: import("@vue/composition-api").Ref<boolean>;
|
|
16
|
-
searchQuery: import("@vue/composition-api").Ref<string>;
|
|
17
|
-
handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
|
|
18
|
-
pageNumber: import("@vue/composition-api").Ref<number>;
|
|
19
|
-
pageCount: import("@vue/composition-api").ComputedRef<number>;
|
|
20
|
-
pageSize: import("@vue/composition-api").Ref<number>;
|
|
21
|
-
languageFilter: import("@vue/composition-api").Ref<import("@tager/admin-ui").OptionType<string>[]>;
|
|
22
|
-
languageOptionList: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").OptionType<string>[]>;
|
|
23
|
-
tags: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").FilterTagType[]>;
|
|
24
|
-
tagRemovalHandler: (event: import("@tager/admin-ui").FilterTagType) => void;
|
|
25
|
-
}> & {
|
|
26
|
-
[key: string]: unknown;
|
|
27
|
-
}, {}, {}, unknown, {
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
30
|
-
[x: string]: any;
|
|
31
|
-
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
32
|
-
columnDefs: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").ColumnDefinition<Category>[]>;
|
|
33
|
-
rowData: import("@vue/composition-api").ComputedRef<Category[]>;
|
|
34
|
-
isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
35
|
-
errorMessage: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<string>>;
|
|
36
|
-
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
37
|
-
handleCategoryDelete: (entityId: string | number) => void;
|
|
38
|
-
isDeleting: (entityId: string | number) => boolean;
|
|
39
|
-
getBlogCategoryFormUrl: typeof getBlogCategoryFormUrl;
|
|
40
|
-
getLinkToPostsByCategory: typeof getLinkToPostsByCategory;
|
|
41
|
-
moveCategory: (categoryId: number, direction: 'up' | 'down') => void;
|
|
42
|
-
isCategoryMoving: import("@vue/composition-api").Ref<boolean>;
|
|
43
|
-
searchQuery: import("@vue/composition-api").Ref<string>;
|
|
44
|
-
handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
|
|
45
|
-
pageNumber: import("@vue/composition-api").Ref<number>;
|
|
46
|
-
pageCount: import("@vue/composition-api").ComputedRef<number>;
|
|
47
|
-
pageSize: import("@vue/composition-api").Ref<number>;
|
|
48
|
-
languageFilter: import("@vue/composition-api").Ref<import("@tager/admin-ui").OptionType<string>[]>;
|
|
49
|
-
languageOptionList: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").OptionType<string>[]>;
|
|
50
|
-
tags: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").FilterTagType[]>;
|
|
51
|
-
tagRemovalHandler: (event: import("@tager/admin-ui").FilterTagType) => void;
|
|
52
|
-
}>, {
|
|
53
|
-
[x: string]: any;
|
|
54
|
-
}, {}, {}, {
|
|
55
|
-
[x: string]: any;
|
|
56
|
-
}>);
|
|
57
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useAdvancedSearch } from './useAdvancedSearch';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, Ref, SetupContext } from '@vue/composition-api';
|
|
2
|
-
import { FilterTagType, OptionType } from '@tager/admin-ui';
|
|
3
|
-
import { Language } from '../../../../typings/model';
|
|
4
|
-
interface Params {
|
|
5
|
-
context: SetupContext;
|
|
6
|
-
languageList: ComputedRef<Language[]>;
|
|
7
|
-
}
|
|
8
|
-
interface State {
|
|
9
|
-
languageFilter: Ref<OptionType[]>;
|
|
10
|
-
languageOptionList: ComputedRef<OptionType[]>;
|
|
11
|
-
filterParams: ComputedRef<Record<string, string | string[]>>;
|
|
12
|
-
tags: ComputedRef<FilterTagType[]>;
|
|
13
|
-
tagRemovalHandler(event: FilterTagType): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function useAdvancedSearch({ context, languageList }: Params): State;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CategoryList.vue';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType, SingleFileInputValueType } from '@tager/admin-ui';
|
|
3
|
-
import { FieldConfigUnion, FieldUnion } from '@tager/admin-dynamic-field';
|
|
4
|
-
import { Category, PostFull } from '../../../typings/model';
|
|
5
|
-
import { PostCreationPayload, PostUpdatePayload } from '../../../services/requests';
|
|
6
|
-
export interface FormValues {
|
|
7
|
-
title: string;
|
|
8
|
-
excerpt: string;
|
|
9
|
-
body: string;
|
|
10
|
-
date: string;
|
|
11
|
-
coverImage: Nullable<SingleFileInputValueType>;
|
|
12
|
-
image: Nullable<SingleFileInputValueType>;
|
|
13
|
-
imageMobile: Nullable<SingleFileInputValueType>;
|
|
14
|
-
pageTitle: string;
|
|
15
|
-
pageDescription: string;
|
|
16
|
-
openGraphImage: Nullable<SingleFileInputValueType>;
|
|
17
|
-
urlAlias: string;
|
|
18
|
-
categories: OptionType<number>[];
|
|
19
|
-
language: Nullable<OptionType>;
|
|
20
|
-
relatedPosts: OptionType<number>[];
|
|
21
|
-
tags: string;
|
|
22
|
-
additionalFields: FieldUnion[];
|
|
23
|
-
}
|
|
24
|
-
export declare function convertPostToFormValues(post: Nullable<PostFull>, languageOptionList: OptionType[], postOptionList: OptionType<number>[], additionalFieldList: FieldConfigUnion[]): FormValues;
|
|
25
|
-
export declare function convertFormValuesToCreationPayload(values: FormValues): PostCreationPayload;
|
|
26
|
-
export declare function convertFormValuesToUpdatePayload(values: FormValues): PostUpdatePayload;
|
|
27
|
-
export declare function convertCategoryListToOptions(categoryList: Category[], languageId: Nullable<string>): OptionType<number>[];
|