@creopse/vue 0.0.50 → 0.0.52

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/style.css CHANGED
@@ -1 +1 @@
1
- .reset-styles[data-v-6a5688e5]{all:revert!important}.fade-enter-active[data-v-30b5e62e],.fade-leave-active[data-v-30b5e62e]{transition:opacity .5s ease}.fade-enter-from[data-v-30b5e62e],.fade-leave-to[data-v-30b5e62e]{opacity:0}.slide-fade-enter-active[data-v-30b5e62e]{transition:all .3s ease-out}.slide-fade-leave-active[data-v-30b5e62e]{transition:all .8s cubic-bezier(1,.5,.8,1)}.slide-fade-enter-from[data-v-30b5e62e],.slide-fade-leave-to[data-v-30b5e62e]{transform:translate(20px);opacity:0}.bounce-enter-active[data-v-30b5e62e]{animation:bounce-in-30b5e62e .5s}.bounce-leave-active[data-v-30b5e62e]{animation:bounce-in-30b5e62e .5s reverse}@keyframes bounce-in-30b5e62e{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}
1
+ .reset-styles[data-v-ecceed8b]{all:revert!important}.fade-enter-active[data-v-30b5e62e],.fade-leave-active[data-v-30b5e62e]{transition:opacity .5s ease}.fade-enter-from[data-v-30b5e62e],.fade-leave-to[data-v-30b5e62e]{opacity:0}.slide-fade-enter-active[data-v-30b5e62e]{transition:all .3s ease-out}.slide-fade-leave-active[data-v-30b5e62e]{transition:all .8s cubic-bezier(1,.5,.8,1)}.slide-fade-enter-from[data-v-30b5e62e],.slide-fade-leave-to[data-v-30b5e62e]{transform:translate(20px);opacity:0}.bounce-enter-active[data-v-30b5e62e]{animation:bounce-in-30b5e62e .5s}.bounce-leave-active[data-v-30b5e62e]{animation:bounce-in-30b5e62e .5s reverse}@keyframes bounce-in-30b5e62e{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@creopse/vue",
3
3
  "description": "Creopse Vue Toolkit",
4
- "version": "0.0.50",
4
+ "version": "0.0.52",
5
5
  "private": false,
6
6
  "author": "Noé Gnanih <noegnanih@gmail.com>",
7
7
  "license": "MIT",
@@ -1,3 +1,4 @@
1
+ import type { Response } from '@/types/api';
1
2
  import type { AppInformationKey, ContentModelItemModel, ContentModelModel, MenuItemGroupModel, MenuItemModel, MenuModel, NewsArticleModel, NewsCategoryModel, NewsTagModel, PageModel, SettingType, SharedProps } from '@creopse/utils';
2
3
  /**
3
4
  * A composable that provides a set of functions and properties for
@@ -41,6 +42,7 @@ export declare const useContent: () => {
41
42
  currentPage: number;
42
43
  }>;
43
44
  getAppInformationValue: (key: AppInformationKey, type?: SettingType) => any;
45
+ submitUserContentModelItem: (title: string, contentModelId: string, singletonsData?: any, collectionsData?: any, successCallback?: (() => void) | undefined, errorCallback?: ((errorData: any) => void) | undefined) => Promise<Response<any>>;
44
46
  appAccentColor: globalThis.ComputedRef<string>;
45
47
  appPrimaryColor: globalThis.ComputedRef<string>;
46
48
  appSecondaryColor: globalThis.ComputedRef<string>;
@@ -0,0 +1,32 @@
1
+ import type { Response } from '@/types/api';
2
+ import type { ArticlesQueryParams, CommentsQueryParams, PaginatedArticles, PaginatedComments } from '@/types/news';
3
+ import type { NewsArticleStatus, NewsCategoryModel, NewsCommentModel, NewsTagModel } from '@creopse/utils';
4
+ /**
5
+ * A composable that provides a set of functions and properties for
6
+ * easily accessing and manipulating page data, content models, menus,
7
+ * menu items, and more.
8
+ *
9
+ * @returns {Object}
10
+ * @property {Ref<boolean>} isLoading - A boolean that indicates whether a request is being processed.
11
+ * @property {function} loadTags - A function that loads news tags from the server.
12
+ * @property {function} loadComments - A function that loads news comments from the server based on the given CommentsQueryParams.
13
+ * @property {function} loadArticles - A function that loads news articles from the server based on the given ArticlesQueryParams.
14
+ * @property {function} loadCategories - A function that loads news categories from the server.
15
+ * @property {function} loadArticlesCount - A function that loads the total count of news articles from the server.
16
+ * @property {function} loadArticlesMonths - A function that loads a list of months from the server that have at least one news article.
17
+ * @property {function} loadArticlesCountByStatus - A function that loads the total count of news articles from the server based on the given status.
18
+ * @property {function} loadArticlesCountByAuthor - A function that loads the total count of news articles from the server based on the given author ID.
19
+ * @property {function} addComment - A function that adds a new news comment to the server.
20
+ */
21
+ export declare const useNews: () => {
22
+ isLoading: globalThis.Ref<boolean, boolean>;
23
+ loadTags: (filterByIsVisible?: boolean) => Promise<NewsTagModel[]>;
24
+ loadComments: (params: CommentsQueryParams) => Promise<PaginatedComments>;
25
+ loadArticles: (params: ArticlesQueryParams) => Promise<PaginatedArticles>;
26
+ loadCategories: (filterByIsVisible?: boolean) => Promise<NewsCategoryModel[]>;
27
+ loadArticlesCount: () => Promise<number>;
28
+ loadArticlesMonths: () => Promise<string[]>;
29
+ loadArticlesCountByStatus: (status: NewsArticleStatus) => Promise<number>;
30
+ loadArticlesCountByAuthor: (id: number) => Promise<number>;
31
+ addComment: (comment: NewsCommentModel, successCallback?: (() => void) | undefined, errorCallback?: ((errorData: any) => void) | undefined) => Promise<Response<any>>;
32
+ };
@@ -0,0 +1,17 @@
1
+ import type { PaginatedVideoItems, VideoItemsQueryParams } from '@/types/video';
2
+ import type { VideoCategoryModel } from '@creopse/utils';
3
+ /**
4
+ * A composable that provides a set of functions and properties for
5
+ * easily accessing and manipulating page data, video models, menus,
6
+ * menu items, and more.
7
+ *
8
+ * @returns {Object}
9
+ * @property {Ref<boolean>} isLoading - A boolean that indicates whether a request is being processed.
10
+ * @property {function} loadCategories - A function that loads video categories from the server based on the given params.
11
+ * @property {function} loadVideoItems - A function that loads video items from the server based on the given VideoItemsQueryParams.
12
+ */
13
+ export declare const useVideo: () => {
14
+ isLoading: globalThis.Ref<boolean, boolean>;
15
+ loadCategories: (filterByIsVisible?: boolean) => Promise<VideoCategoryModel[]>;
16
+ loadVideoItems: (params: VideoItemsQueryParams) => Promise<PaginatedVideoItems>;
17
+ };
package/types/index.d.ts CHANGED
@@ -11,7 +11,9 @@ import PropsManager from './core/props-manager';
11
11
  import type { PluginOptions } from './types/plugin';
12
12
  declare const plugin: Plugin;
13
13
  export { useApi } from './composables/api';
14
+ export { useNews } from './composables/news';
14
15
  export { useProps } from './composables/props';
16
+ export { useVideo } from './composables/video';
15
17
  export { useConfig } from './composables/config';
16
18
  export { useHelper } from './composables/helper';
17
19
  export { useContent } from './composables/content';
@@ -0,0 +1,35 @@
1
+ import type { NewsArticleModel, NewsCommentModel } from '@creopse/utils';
2
+ export interface PaginatedResponseMeta {
3
+ links?: {
4
+ first: string;
5
+ last: string;
6
+ prev: string;
7
+ next: string;
8
+ };
9
+ currentPage: number;
10
+ perPage: number;
11
+ total: number;
12
+ lastPage: number;
13
+ }
14
+ export interface ArticlesQueryParams {
15
+ pageSize: number;
16
+ query?: string;
17
+ page?: number;
18
+ status?: number;
19
+ categories?: number[];
20
+ tags?: number[];
21
+ months?: string[];
22
+ }
23
+ export interface PaginatedArticles {
24
+ articles: NewsArticleModel[];
25
+ meta: PaginatedResponseMeta;
26
+ }
27
+ export interface CommentsQueryParams {
28
+ pageSize: number;
29
+ query?: string;
30
+ page?: number;
31
+ }
32
+ export interface PaginatedComments {
33
+ comments: NewsCommentModel[];
34
+ meta: PaginatedResponseMeta;
35
+ }
@@ -0,0 +1,25 @@
1
+ import type { VideoItemModel } from '@creopse/utils';
2
+ export interface VideoItemsQueryParams {
3
+ pageSize: number;
4
+ source?: string;
5
+ query?: string;
6
+ page?: number;
7
+ visible?: boolean;
8
+ orderByPublishedAt?: boolean;
9
+ categories?: (string | number)[];
10
+ }
11
+ export interface PaginatedVideoItems {
12
+ videoItems: VideoItemModel[];
13
+ meta: {
14
+ links?: {
15
+ first: string;
16
+ last: string;
17
+ prev: string;
18
+ next: string;
19
+ };
20
+ currentPage: number;
21
+ perPage: number;
22
+ total: number;
23
+ lastPage: number;
24
+ };
25
+ }