@creopse/vue 0.0.16 → 0.0.18

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.16",
4
+ "version": "0.0.18",
5
5
  "private": false,
6
6
  "author": "Noé Gnanih <noegnanih@gmail.com>",
7
7
  "license": "MIT",
@@ -13,7 +13,7 @@ import type { Payload } from '@/types/api';
13
13
  * - `handleError`: Handles an error from the API.
14
14
  */
15
15
  export declare const useApi: () => {
16
- request: (payload: Payload) => Promise<any>;
16
+ request: (payload: Payload, accessToken?: string, accessForbiddenCallback?: () => void) => Promise<any>;
17
17
  getItem: (payload: Payload) => Promise<{
18
18
  success: boolean;
19
19
  failure: boolean;
@@ -10,7 +10,7 @@ import type { ErrorBag, Errors, PageProps } from '@inertiajs/core';
10
10
  export declare const useContent: () => {
11
11
  logo: globalThis.ComputedRef<string>;
12
12
  icon: globalThis.ComputedRef<string>;
13
- page: import("@inertiajs/core").Page<SharedProps & PageProps>;
13
+ page: import("@inertiajs/core").Page<SharedProps>;
14
14
  pageData: PageModel | null;
15
15
  newsArticle: NewsArticleModel | undefined;
16
16
  newsCategory: NewsCategoryModel | undefined;
@@ -10,14 +10,13 @@ export declare const useHelper: () => {
10
10
  isLgScreen: globalThis.ComputedRef<boolean>;
11
11
  isMdScreen: globalThis.ComputedRef<boolean>;
12
12
  isSmScreen: globalThis.ComputedRef<boolean>;
13
- getTranslation: (data: any) => string;
13
+ getTranslation: (data: any, lang: string) => string;
14
14
  getLangageLabel: (value: string) => string | undefined;
15
15
  getLanguageValue: (label: string) => string | undefined;
16
16
  getLinkCursorClass: (url: string) => "tw:cursor-default" | "tw:cursor-pointer";
17
17
  ckEditorToolbarItems: string[];
18
18
  displayFormErrors: (errors: any, displayError: (message: string) => void) => void;
19
- resolveHtmlLinks: (data: string | null | undefined) => string;
20
- pickByTheme: (lightVal: string | number | null, darkVal: string | number | null) => string | number | null;
19
+ resolveHtmlLinks: (data: string | null | undefined, lang: string) => string;
21
20
  resolveUrl: (path: string) => string;
22
21
  updateLang: (val: string, reload?: boolean, updateUserPrefs?: boolean) => Promise<void>;
23
22
  languages: Language[];
@@ -27,6 +26,6 @@ export declare const useHelper: () => {
27
26
  openLink: (str: string) => void;
28
27
  openMenu: (menu?: MenuItemModel) => void;
29
28
  getMenuHref: (menu: MenuItemModel) => string;
30
- rHtml: (data: string | null | undefined) => string;
31
- tr: (data: any) => string;
29
+ rHtml: (data: string | null | undefined, lang: string) => string;
30
+ tr: (data: any, lang: string) => string;
32
31
  };
@@ -1,4 +1,5 @@
1
1
  declare const PropsSymbol: unique symbol;
2
2
  declare const ConfigSymbol: unique symbol;
3
+ declare const RouterSymbol: unique symbol;
3
4
  declare const ResolveSectionsSymbol: unique symbol;
4
- export { PropsSymbol, ConfigSymbol, ResolveSectionsSymbol };
5
+ export { PropsSymbol, ConfigSymbol, RouterSymbol, ResolveSectionsSymbol };
@@ -1,3 +1,4 @@
1
+ import type { Router } from '@inertiajs/core';
1
2
  export interface PluginConfig {
2
3
  debug: boolean;
3
4
  appUrl: string;
@@ -7,9 +8,7 @@ export interface PluginConfig {
7
8
  }
8
9
  export interface PluginOptions {
9
10
  initialProps: Record<string, any>;
10
- router?: {
11
- on: (event: string, callback: (e: any) => void) => void;
12
- };
11
+ router?: Router;
13
12
  resolveSections: () => Record<string, unknown>;
14
13
  config: PluginConfig;
15
14
  }