@creopse/vue 0.0.69 → 0.0.70

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@creopse/vue",
3
3
  "description": "Creopse Vue Toolkit",
4
- "version": "0.0.69",
4
+ "version": "0.0.70",
5
5
  "private": false,
6
6
  "author": "Noé Gnanih <noegnanih@gmail.com>",
7
7
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "axios": "^1.15.0",
33
33
  "lodash.clonedeep": "^4.5.0",
34
34
  "uuid": "^13.0.0",
35
- "@creopse/utils": "0.1.12"
35
+ "@creopse/utils": "0.1.13"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@inertiajs/core": "^2.1.6",
@@ -1,6 +1,6 @@
1
1
  import type { Response } from '@/types/api';
2
2
  import type { DataFilter, PaginatedContentModelItems } from '@/types/content';
3
- import type { AppInformationKey, ContentModelItemModel, ContentModelModel, MenuItemGroupModel, MenuItemModel, MenuModel, NewsArticleModel, NewsCategoryModel, NewsTagModel, PageModel, SettingType, SharedProps } from '@creopse/utils';
3
+ import type { AppInformationKey, ContentModelItemModel, ContentModelModel, NewsArticleModel, NewsCategoryModel, NewsTagModel, PageModel, SettingType, SharedProps } from '@creopse/utils';
4
4
  /**
5
5
  * A composable that provides a set of functions and properties for
6
6
  * easily accessing and manipulating page data, content models, menus,
@@ -17,18 +17,6 @@ export declare const useContent: () => {
17
17
  newsCategory: NewsCategoryModel | undefined;
18
18
  newsTag: NewsTagModel | undefined;
19
19
  contentModelItem: ContentModelItemModel | undefined;
20
- getMenu: (name: string, filterByIsActive?: boolean) => MenuModel | undefined;
21
- getMenuByLocation: (name: string, filterByIsActive?: boolean) => MenuModel | undefined;
22
- getMenuItems: (name: string, filterByIsVisible?: boolean) => MenuItemModel[] | undefined;
23
- getMenuItemById: (id: number) => MenuItemModel | undefined;
24
- getMenuItemsByLocation: (name: string, filterByIsVisible?: boolean) => MenuItemModel[] | undefined;
25
- getMenuGroups: (name: string, byLocation?: boolean, filterByIsVisible?: boolean) => MenuItemGroupModel[];
26
- getMenuItemsByGroup: (name: string, groupId: number, byLocation?: boolean, filterByIsVisible?: boolean) => MenuItemModel[] | undefined;
27
- getMenuGroupedItems: (name: string, byLocation?: boolean, filterByIsVisible?: boolean) => {
28
- group: MenuItemGroupModel;
29
- items: MenuItemModel[] | undefined;
30
- }[];
31
- getMenuUngroupedItems: (name: string, byLocation?: boolean, filterByIsVisible?: boolean) => MenuItemModel[] | undefined;
32
20
  getSectionData: (key?: string) => object | any | null;
33
21
  getSectionSettings: (key: string | null | undefined) => object | any | null;
34
22
  getSectionSettingsGroup: (key: string | null | undefined, group: string) => object | any | null;
@@ -37,8 +25,8 @@ export declare const useContent: () => {
37
25
  getSectionRootData: (key?: string) => any;
38
26
  getContentPath: (name: "news-article" | "news-category" | "news-tag" | string, item: ContentModelItemModel | any) => string;
39
27
  getContentModel: (name: string) => ContentModelModel | undefined;
40
- getContentModelItems: (name: string, filterByIsActive?: boolean) => Promise<ContentModelItemModel[]>;
41
- getPaginatedContentModelItems: (name: string, page: number, pageSize: number, filterByIsActive?: boolean, query?: string, dataFilters?: DataFilter[]) => Promise<PaginatedContentModelItems>;
28
+ getContentModelItems: (name: string, activeOnly?: boolean) => Promise<ContentModelItemModel[]>;
29
+ getPaginatedContentModelItems: (name: string, page: number, pageSize: number, activeOnly?: boolean, query?: string, dataFilters?: DataFilter[]) => Promise<PaginatedContentModelItems>;
42
30
  getAppInformationValue: (key: AppInformationKey, type?: SettingType) => any;
43
31
  submitUserContentModelItem: (title: string, contentModelId: string, singletonsData?: any, collectionsData?: any, successCallback?: (() => void) | undefined, errorCallback?: ((errorData: any) => void) | undefined) => Promise<Response<any>>;
44
32
  formatContentModelItemData: (item: ContentModelItemModel) => object;
@@ -1,4 +1,4 @@
1
- import { type Language, MenuItemModel } from '@creopse/utils';
1
+ import { type Language } from '@creopse/utils';
2
2
  /**
3
3
  * Returns a collection of helper functions and values.
4
4
  *
@@ -13,6 +13,14 @@ export declare const useHelper: () => {
13
13
  getTranslation: (data: any, lang?: string) => string;
14
14
  getLangageLabel: (value: string) => string | undefined;
15
15
  getLanguageValue: (label: string) => string | undefined;
16
+ detectSocialNetwork: (url: string) => {
17
+ name: string;
18
+ icon: string;
19
+ } | null;
20
+ socialNetworks: {
21
+ name: string;
22
+ icon: string;
23
+ }[];
16
24
  ckEditorToolbarItems: string[];
17
25
  displayFormErrors: (errors: any, displayError: (message: string) => void) => void;
18
26
  resolveHtmlLinks: (data: string | null | undefined, lang?: string) => string;
@@ -20,11 +28,10 @@ export declare const useHelper: () => {
20
28
  updateLang: (val: string, reload?: boolean, updateUserPrefs?: boolean) => Promise<void>;
21
29
  languages: Language[];
22
30
  getImage: (path: string, size?: "small" | "medium" | "large" | "original") => Promise<string>;
31
+ getVideoThumbnail: (path: string) => string;
23
32
  fileUrl: (path: string) => string;
24
33
  currentRoutePath: globalThis.ComputedRef<string>;
25
- openLink: (str: string) => void;
26
- openMenu: (menu?: MenuItemModel) => void;
27
- getMenuHref: (menu: MenuItemModel) => string;
34
+ openLink: (entity: string | number) => void;
28
35
  rHtml: (data: string | null | undefined, lang?: string) => string;
29
36
  tr: (data: any, lang?: string) => string;
30
37
  };
@@ -0,0 +1,18 @@
1
+ import { type MenuItemGroupModel, type MenuItemModel, type MenuModel } from '@creopse/utils';
2
+ export declare const useMenu: () => {
3
+ getMenu: (name: string, activeOnly?: boolean, nested?: boolean) => MenuModel | undefined;
4
+ getMenuByLocation: (name: string, activeOnly?: boolean, nested?: boolean) => MenuModel | undefined;
5
+ getMenuItems: (name: string, visibleOnly?: boolean, nested?: boolean) => MenuItemModel[] | undefined;
6
+ getMenuItemById: (id: number) => MenuItemModel | undefined;
7
+ getMenuItemsByLocation: (name: string, visibleOnly?: boolean, nested?: boolean) => MenuItemModel[] | undefined;
8
+ getMenuGroups: (name: string, byLocation?: boolean, visibleOnly?: boolean) => MenuItemGroupModel[];
9
+ getMenuItemsByGroup: (name: string, groupId: number, byLocation?: boolean, visibleOnly?: boolean, nested?: boolean) => MenuItemModel[] | undefined;
10
+ getMenuGroupedItems: (name: string, byLocation?: boolean, visibleOnly?: boolean, nested?: boolean) => {
11
+ group: MenuItemGroupModel;
12
+ items: MenuItemModel[] | undefined;
13
+ }[];
14
+ getMenuUngroupedItems: (name: string, byLocation?: boolean, visibleOnly?: boolean, nested?: boolean) => MenuItemModel[] | undefined;
15
+ openMenu: (menu?: MenuItemModel) => void;
16
+ getLinkFromMenuItemId: (id: any) => string;
17
+ getMenuHref: (menu: MenuItemModel) => string;
18
+ };
@@ -3261,6 +3261,7 @@ declare class PropsManager<T extends Props = Props> {
3261
3261
  readonly contentId?: number | undefined;
3262
3262
  readonly createdAt?: string | undefined;
3263
3263
  readonly updatedAt?: string | undefined;
3264
+ readonly subMenuItems?: readonly /*elided*/ any[] | undefined;
3264
3265
  readonly menu?: /*elided*/ any | undefined;
3265
3266
  readonly page?: {
3266
3267
  readonly name: string;
package/types/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import type { PluginOptions } from './types/plugin';
12
12
  declare const plugin: Plugin;
13
13
  export { useApi } from './composables/api';
14
14
  export { useNews } from './composables/news';
15
+ export { useMenu } from './composables/menu';
15
16
  export { useProps } from './composables/props';
16
17
  export { useVideo } from './composables/video';
17
18
  export { useConfig } from './composables/config';
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Noé Gnanih
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.