@tager/admin-blog 0.3.28 → 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/menu.d.ts +5 -0
- package/dist/constants/paths.d.ts +14 -0
- package/dist/constants/routes.d.ts +5 -0
- package/dist/constants/scopes.d.ts +11 -0
- package/dist/dev.d.ts +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/useFetchCategories.d.ts +6 -0
- package/dist/hooks/useFetchCategory.d.ts +8 -0
- package/dist/hooks/useFetchModuleConfig.d.ts +6 -0
- package/dist/hooks/useFetchPosts.d.ts +6 -0
- 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 +73 -76
- package/dist/index.umd.js +73 -76
- package/dist/locales/en.d.ts +75 -0
- package/dist/locales/ru.d.ts +3 -0
- package/dist/main.d.ts +4 -0
- package/dist/router/index.d.ts +4 -0
- package/dist/services/requests.d.ts +58 -0
- 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 +117 -0
- package/dist/utils/common.d.ts +4 -0
- package/dist/views/Categories/CategoryForm/CategoryForm.helpers.d.ts +5 -0
- package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +109 -0
- package/dist/views/Categories/CategoryForm/index.d.ts +1 -0
- package/dist/views/Categories/CategoryList/CategoryList.helpers.d.ts +7 -0
- package/dist/views/Categories/CategoryList/CategoryList.vue.d.ts +59 -0
- package/dist/views/Categories/CategoryList/hooks/index.d.ts +1 -0
- package/dist/views/Categories/CategoryList/hooks/useAdvancedSearch.d.ts +16 -0
- package/dist/views/Categories/CategoryList/index.d.ts +1 -0
- package/dist/views/Posts/PostForm/PostForm.helpers.d.ts +27 -0
- package/dist/views/Posts/PostForm/PostForm.vue.d.ts +9382 -0
- package/dist/views/Posts/PostForm/components/TabList/TabList.types.d.ts +5 -0
- package/dist/views/Posts/PostForm/components/TabList/index.d.ts +2 -0
- package/dist/views/Posts/PostForm/index.d.ts +1 -0
- package/dist/views/Posts/PostList/PostList.helpers.d.ts +6 -0
- package/dist/views/Posts/PostList/PostList.vue.d.ts +69 -0
- package/dist/views/Posts/PostList/hooks/index.d.ts +1 -0
- package/dist/views/Posts/PostList/hooks/useAdvancedSearch.d.ts +22 -0
- package/dist/views/Posts/PostList/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Nullable, FileType } from '@tager/admin-services';
|
|
2
|
+
import { FieldConfigUnion, FieldShortType, IncomingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
+
import { OptionType, ShortCodeItemType, SingleFileInputValueType } from '@tager/admin-ui';
|
|
4
|
+
import { Values } from '@/typings/common';
|
|
5
|
+
import { Scope } from '@/constants/scopes';
|
|
6
|
+
export declare type ScopeType = Values<typeof Scope>;
|
|
7
|
+
export interface RoleModel {
|
|
8
|
+
readonly id: number;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly scopes: Array<ScopeType>;
|
|
11
|
+
}
|
|
12
|
+
export interface UserModel {
|
|
13
|
+
readonly id: number;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly email: string;
|
|
16
|
+
readonly roles: Array<RoleModel>;
|
|
17
|
+
}
|
|
18
|
+
export interface SeoInfo {
|
|
19
|
+
readonly pageTitle: Nullable<string>;
|
|
20
|
+
readonly pageDescription: Nullable<string>;
|
|
21
|
+
readonly pageKeywords: Nullable<string>;
|
|
22
|
+
readonly openGraphTitle: Nullable<string>;
|
|
23
|
+
readonly openGraphDescription: Nullable<string>;
|
|
24
|
+
readonly openGraphImage: Nullable<FileType>;
|
|
25
|
+
}
|
|
26
|
+
export interface Category extends SeoInfo {
|
|
27
|
+
readonly id: number;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly isDefault: boolean;
|
|
30
|
+
readonly language: string;
|
|
31
|
+
readonly url: string;
|
|
32
|
+
readonly urlTemplate: string;
|
|
33
|
+
readonly urlAlias: string;
|
|
34
|
+
readonly postsCount: string;
|
|
35
|
+
readonly parent: Nullable<{
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
}>;
|
|
39
|
+
readonly depth: number;
|
|
40
|
+
}
|
|
41
|
+
export interface PostShort {
|
|
42
|
+
readonly id: number;
|
|
43
|
+
readonly title: string;
|
|
44
|
+
readonly url: string;
|
|
45
|
+
readonly excerpt: string;
|
|
46
|
+
readonly status: string;
|
|
47
|
+
readonly language: string;
|
|
48
|
+
readonly categories: Category[];
|
|
49
|
+
readonly date: string;
|
|
50
|
+
readonly image: Nullable<FileType>;
|
|
51
|
+
}
|
|
52
|
+
export interface PostFull extends SeoInfo {
|
|
53
|
+
readonly id: number;
|
|
54
|
+
readonly language: string;
|
|
55
|
+
readonly title: string;
|
|
56
|
+
readonly url: string;
|
|
57
|
+
readonly urlTemplate: string;
|
|
58
|
+
readonly urlAlias: string;
|
|
59
|
+
readonly date: string;
|
|
60
|
+
readonly status: string;
|
|
61
|
+
readonly excerpt: string;
|
|
62
|
+
readonly image: Nullable<FileType>;
|
|
63
|
+
readonly imageMobile: Nullable<FileType>;
|
|
64
|
+
readonly categories: Category[];
|
|
65
|
+
readonly body: string;
|
|
66
|
+
readonly coverImage: Nullable<FileType>;
|
|
67
|
+
readonly relatedPosts: Pick<PostShort, 'id' | 'title'>[];
|
|
68
|
+
readonly tags: string[];
|
|
69
|
+
readonly additionalFields: FieldShortType<IncomingValueUnion>[];
|
|
70
|
+
}
|
|
71
|
+
export interface Language {
|
|
72
|
+
readonly id: string;
|
|
73
|
+
readonly name: string;
|
|
74
|
+
}
|
|
75
|
+
export interface DefaultCategory {
|
|
76
|
+
readonly id: number;
|
|
77
|
+
readonly name: string;
|
|
78
|
+
readonly language: string;
|
|
79
|
+
}
|
|
80
|
+
export interface FileScenarios {
|
|
81
|
+
readonly cover: Nullable<string>;
|
|
82
|
+
readonly image: Nullable<string>;
|
|
83
|
+
readonly imageMobile: Nullable<string>;
|
|
84
|
+
readonly content: Nullable<string>;
|
|
85
|
+
readonly openGraph: Nullable<string>;
|
|
86
|
+
}
|
|
87
|
+
export interface ModuleConfig {
|
|
88
|
+
readonly urlPostTemplate: Nullable<string>;
|
|
89
|
+
readonly urlCategoryTemplate: Nullable<string>;
|
|
90
|
+
readonly languages: Language[];
|
|
91
|
+
readonly defaultCategories: DefaultCategory[];
|
|
92
|
+
readonly fields: FieldConfigUnion[];
|
|
93
|
+
readonly shortcodes: ShortCodeItemType[];
|
|
94
|
+
readonly fileScenarios: FileScenarios;
|
|
95
|
+
}
|
|
96
|
+
export interface CategoryFormValues {
|
|
97
|
+
language: Nullable<OptionType>;
|
|
98
|
+
name: string;
|
|
99
|
+
parent: Nullable<OptionType<number>>;
|
|
100
|
+
urlAlias: string;
|
|
101
|
+
pageTitle: Nullable<string>;
|
|
102
|
+
pageDescription: Nullable<string>;
|
|
103
|
+
pageKeywords: Nullable<string>;
|
|
104
|
+
openGraphTitle: Nullable<string>;
|
|
105
|
+
openGraphDescription: Nullable<string>;
|
|
106
|
+
openGraphImage: Nullable<SingleFileInputValueType>;
|
|
107
|
+
}
|
|
108
|
+
export interface CategoryPayload {
|
|
109
|
+
language: Nullable<string>;
|
|
110
|
+
name: string;
|
|
111
|
+
parent: Nullable<number>;
|
|
112
|
+
urlAlias: Nullable<string>;
|
|
113
|
+
isDefault: boolean;
|
|
114
|
+
pageTitle: Nullable<string>;
|
|
115
|
+
pageDescription: Nullable<string>;
|
|
116
|
+
openGraphImage: Nullable<string>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function namespace(namespace: string, name: string): string;
|
|
2
|
+
export declare function userNamespace(name: string): string;
|
|
3
|
+
export declare function generateNumberArray(length: number): Array<number>;
|
|
4
|
+
export declare function getNameWithDepth(name: string, depth: number): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Nullable } from '@tager/admin-services';
|
|
2
|
+
import { OptionType } from '@tager/admin-ui';
|
|
3
|
+
import { Category, CategoryFormValues, CategoryPayload } from '@/typings/model';
|
|
4
|
+
export declare function convertCategoryToFormValues(category: Nullable<Category>, languageOptionList: OptionType[]): CategoryFormValues;
|
|
5
|
+
export declare function convertCategoryFormValuesToPayload(values: CategoryFormValues): CategoryPayload;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { OptionType, TagerFormSubmitEvent, SeoChangeEvent, TabType } from '@tager/admin-ui';
|
|
2
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
3
|
+
isCreation: import("@vue/composition-api").ComputedRef<boolean>;
|
|
4
|
+
isContentLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
5
|
+
values: import("@vue/composition-api").Ref<{
|
|
6
|
+
language: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
} | null;
|
|
11
|
+
name: string;
|
|
12
|
+
parent: {
|
|
13
|
+
value: number;
|
|
14
|
+
label: string;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
} | null;
|
|
17
|
+
urlAlias: string;
|
|
18
|
+
pageTitle: import("@tager/admin-services").Nullable<string>;
|
|
19
|
+
pageDescription: import("@tager/admin-services").Nullable<string>;
|
|
20
|
+
pageKeywords: import("@tager/admin-services").Nullable<string>;
|
|
21
|
+
openGraphTitle: import("@tager/admin-services").Nullable<string>;
|
|
22
|
+
openGraphDescription: import("@tager/admin-services").Nullable<string>;
|
|
23
|
+
openGraphImage: {
|
|
24
|
+
id: string;
|
|
25
|
+
file: {
|
|
26
|
+
id: string;
|
|
27
|
+
mime: string;
|
|
28
|
+
name: string;
|
|
29
|
+
size: number;
|
|
30
|
+
url: string;
|
|
31
|
+
};
|
|
32
|
+
caption?: string | null | undefined;
|
|
33
|
+
} | null;
|
|
34
|
+
}>;
|
|
35
|
+
errors: import("@vue/composition-api").Ref<{
|
|
36
|
+
[x: string]: string;
|
|
37
|
+
}>;
|
|
38
|
+
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
39
|
+
languageOptionList: import("@vue/composition-api").ComputedRef<OptionType<string>[]>;
|
|
40
|
+
pagePath: import("@vue/composition-api").ComputedRef<string>;
|
|
41
|
+
categoryListUrl: "/blog/categories";
|
|
42
|
+
submitForm: (event: TagerFormSubmitEvent) => void;
|
|
43
|
+
isSubmitting: import("@vue/composition-api").Ref<boolean>;
|
|
44
|
+
moduleConfig: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<import("../../../typings/model").ModuleConfig>>;
|
|
45
|
+
categoryOptionList: import("@vue/composition-api").ComputedRef<OptionType<number>[]>;
|
|
46
|
+
imageScenario: import("@vue/composition-api").ComputedRef<import("@tager/admin-services").Nullable<string>>;
|
|
47
|
+
handleSeoFieldGroupChange: ({ title, description, keywords, image, }: SeoChangeEvent) => void;
|
|
48
|
+
tabList: import("@vue/composition-api").ComputedRef<TabType[]>;
|
|
49
|
+
selectedTabId: import("@vue/composition-api").Ref<string>;
|
|
50
|
+
}> & {
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}, {}, {}, unknown, {
|
|
53
|
+
[x: string]: any;
|
|
54
|
+
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
57
|
+
isCreation: import("@vue/composition-api").ComputedRef<boolean>;
|
|
58
|
+
isContentLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
59
|
+
values: import("@vue/composition-api").Ref<{
|
|
60
|
+
language: {
|
|
61
|
+
value: string;
|
|
62
|
+
label: string;
|
|
63
|
+
disabled?: boolean | undefined;
|
|
64
|
+
} | null;
|
|
65
|
+
name: string;
|
|
66
|
+
parent: {
|
|
67
|
+
value: number;
|
|
68
|
+
label: string;
|
|
69
|
+
disabled?: boolean | undefined;
|
|
70
|
+
} | null;
|
|
71
|
+
urlAlias: string;
|
|
72
|
+
pageTitle: import("@tager/admin-services").Nullable<string>;
|
|
73
|
+
pageDescription: import("@tager/admin-services").Nullable<string>;
|
|
74
|
+
pageKeywords: import("@tager/admin-services").Nullable<string>;
|
|
75
|
+
openGraphTitle: import("@tager/admin-services").Nullable<string>;
|
|
76
|
+
openGraphDescription: import("@tager/admin-services").Nullable<string>;
|
|
77
|
+
openGraphImage: {
|
|
78
|
+
id: string;
|
|
79
|
+
file: {
|
|
80
|
+
id: string;
|
|
81
|
+
mime: string;
|
|
82
|
+
name: string;
|
|
83
|
+
size: number;
|
|
84
|
+
url: string;
|
|
85
|
+
};
|
|
86
|
+
caption?: string | null | undefined;
|
|
87
|
+
} | null;
|
|
88
|
+
}>;
|
|
89
|
+
errors: import("@vue/composition-api").Ref<{
|
|
90
|
+
[x: string]: string;
|
|
91
|
+
}>;
|
|
92
|
+
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
93
|
+
languageOptionList: import("@vue/composition-api").ComputedRef<OptionType<string>[]>;
|
|
94
|
+
pagePath: import("@vue/composition-api").ComputedRef<string>;
|
|
95
|
+
categoryListUrl: "/blog/categories";
|
|
96
|
+
submitForm: (event: TagerFormSubmitEvent) => void;
|
|
97
|
+
isSubmitting: import("@vue/composition-api").Ref<boolean>;
|
|
98
|
+
moduleConfig: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<import("../../../typings/model").ModuleConfig>>;
|
|
99
|
+
categoryOptionList: import("@vue/composition-api").ComputedRef<OptionType<number>[]>;
|
|
100
|
+
imageScenario: import("@vue/composition-api").ComputedRef<import("@tager/admin-services").Nullable<string>>;
|
|
101
|
+
handleSeoFieldGroupChange: ({ title, description, keywords, image, }: SeoChangeEvent) => void;
|
|
102
|
+
tabList: import("@vue/composition-api").ComputedRef<TabType[]>;
|
|
103
|
+
selectedTabId: import("@vue/composition-api").Ref<string>;
|
|
104
|
+
}>, {
|
|
105
|
+
[x: string]: any;
|
|
106
|
+
}, {}, {}, {
|
|
107
|
+
[x: string]: any;
|
|
108
|
+
}>);
|
|
109
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CategoryForm.vue';
|
|
@@ -0,0 +1,7 @@
|
|
|
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, canViewAdministrators: boolean): ColumnDefinition<Category>[];
|
|
7
|
+
export declare function getLinkToPostsByCategory(categoryId: number): string;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
startMoveCategory: (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
|
+
canViewAdministrators: import("@vue/composition-api").ComputedRef<boolean>;
|
|
26
|
+
}> & {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}, {}, {}, unknown, {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
33
|
+
columnDefs: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").ColumnDefinition<Category>[]>;
|
|
34
|
+
rowData: import("@vue/composition-api").ComputedRef<Category[]>;
|
|
35
|
+
isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
|
|
36
|
+
errorMessage: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<string>>;
|
|
37
|
+
isLangSpecific: import("@vue/composition-api").ComputedRef<boolean>;
|
|
38
|
+
handleCategoryDelete: (entityId: string | number) => void;
|
|
39
|
+
isDeleting: (entityId: string | number) => boolean;
|
|
40
|
+
getBlogCategoryFormUrl: typeof getBlogCategoryFormUrl;
|
|
41
|
+
getLinkToPostsByCategory: typeof getLinkToPostsByCategory;
|
|
42
|
+
startMoveCategory: (categoryId: number, direction: 'up' | 'down') => void;
|
|
43
|
+
isCategoryMoving: import("@vue/composition-api").Ref<boolean>;
|
|
44
|
+
searchQuery: import("@vue/composition-api").Ref<string>;
|
|
45
|
+
handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
|
|
46
|
+
pageNumber: import("@vue/composition-api").Ref<number>;
|
|
47
|
+
pageCount: import("@vue/composition-api").ComputedRef<number>;
|
|
48
|
+
pageSize: import("@vue/composition-api").Ref<number>;
|
|
49
|
+
languageFilter: import("@vue/composition-api").Ref<import("@tager/admin-ui").OptionType<string>[]>;
|
|
50
|
+
languageOptionList: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").OptionType<string>[]>;
|
|
51
|
+
tags: import("@vue/composition-api").ComputedRef<import("@tager/admin-ui").FilterTagType[]>;
|
|
52
|
+
tagRemovalHandler: (event: import("@tager/admin-ui").FilterTagType) => void;
|
|
53
|
+
canViewAdministrators: import("@vue/composition-api").ComputedRef<boolean>;
|
|
54
|
+
}>, {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
}, {}, {}, {
|
|
57
|
+
[x: string]: any;
|
|
58
|
+
}>);
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAdvancedSearch } from './useAdvancedSearch';
|
|
@@ -0,0 +1,16 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CategoryList.vue';
|
|
@@ -0,0 +1,27 @@
|
|
|
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>[];
|