@creopse/vue 0.0.22 → 0.0.24
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.cjs +12 -18
- package/dist/index.js +12 -18
- package/dist/index.mjs +3484 -8312
- package/dist/style.css +1 -1
- package/package.json +2 -3
- package/types/composables/api.d.ts +6 -31
- package/types/composables/content.d.ts +0 -4
- package/types/composables/helper.d.ts +4 -4
- package/types/composables/props.d.ts +3 -4
- package/types/core/props-manager.d.ts +4652 -4
- package/types/types/api.d.ts +6 -0
- package/types/types/plugin.d.ts +7 -2
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.reset-styles[data-v-
|
|
1
|
+
.reset-styles[data-v-8173c491]{all:unset!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.
|
|
4
|
+
"version": "0.0.24",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Noé Gnanih <noegnanih@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"@creopse/utils": "^0.0.11",
|
|
41
41
|
"@vueuse/core": "^14.1.0",
|
|
42
42
|
"axios": "^1.13.2",
|
|
43
|
-
"lodash.clonedeep": "^4.5.0"
|
|
44
|
-
"validator": "^13.15.23"
|
|
43
|
+
"lodash.clonedeep": "^4.5.0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@inertiajs/core": "^2.1.6",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Payload } from '@/types/api';
|
|
1
|
+
import type { ApiResponse, Payload } from '@/types/api';
|
|
2
2
|
/**
|
|
3
3
|
* This composable is used to make API requests.
|
|
4
4
|
*
|
|
@@ -14,35 +14,10 @@ import type { Payload } from '@/types/api';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useApi: () => {
|
|
16
16
|
request: (payload: Payload, accessToken?: string, accessForbiddenCallback?: () => void) => Promise<any>;
|
|
17
|
-
getItem: (payload: Payload) => Promise<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}>;
|
|
23
|
-
addItem: (payload: Payload) => Promise<{
|
|
24
|
-
success: boolean;
|
|
25
|
-
failure: boolean;
|
|
26
|
-
result: any;
|
|
27
|
-
error: any;
|
|
28
|
-
}>;
|
|
29
|
-
updateItem: (payload: Payload) => Promise<{
|
|
30
|
-
success: boolean;
|
|
31
|
-
failure: boolean;
|
|
32
|
-
result: any;
|
|
33
|
-
error: any;
|
|
34
|
-
}>;
|
|
35
|
-
deleteItem: (payload: Payload) => Promise<{
|
|
36
|
-
success: boolean;
|
|
37
|
-
failure: boolean;
|
|
38
|
-
result: any;
|
|
39
|
-
error: any;
|
|
40
|
-
}>;
|
|
41
|
-
getAllItems: (payload: Payload) => Promise<{
|
|
42
|
-
success: boolean;
|
|
43
|
-
failure: boolean;
|
|
44
|
-
result: any;
|
|
45
|
-
error: any;
|
|
46
|
-
}>;
|
|
17
|
+
getItem: (payload: Payload) => Promise<ApiResponse>;
|
|
18
|
+
addItem: (payload: Payload) => Promise<ApiResponse>;
|
|
19
|
+
updateItem: (payload: Payload) => Promise<ApiResponse>;
|
|
20
|
+
deleteItem: (payload: Payload) => Promise<ApiResponse>;
|
|
21
|
+
getAllItems: (payload: Payload) => Promise<ApiResponse>;
|
|
47
22
|
handleError: (error: any) => void;
|
|
48
23
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AppInformationKey, ContentModelItemModel, ContentModelModel, MenuItemGroupModel, MenuItemModel, MenuModel, NewsArticleModel, NewsCategoryModel, NewsTagModel, PageModel, SectionModel, SettingType, SharedProps } from '@creopse/utils';
|
|
2
|
-
import type { ErrorBag, Errors, PageProps } from '@inertiajs/core';
|
|
3
2
|
/**
|
|
4
3
|
* A composable that provides a set of functions and properties for
|
|
5
4
|
* easily accessing and manipulating page data, content models, menus,
|
|
@@ -16,9 +15,6 @@ export declare const useContent: () => {
|
|
|
16
15
|
newsCategory: NewsCategoryModel | undefined;
|
|
17
16
|
newsTag: NewsTagModel | undefined;
|
|
18
17
|
contentModelItem: ContentModelItemModel | undefined;
|
|
19
|
-
getProps: () => PageProps & SharedProps & {
|
|
20
|
-
errors: Errors & ErrorBag;
|
|
21
|
-
};
|
|
22
18
|
getMenu: (name: string, filterByIsActive?: boolean) => MenuModel | undefined;
|
|
23
19
|
getMenuByLocation: (name: string, filterByIsActive?: boolean) => MenuModel | undefined;
|
|
24
20
|
getMenuItems: (name: string, filterByIsVisible?: boolean) => MenuItemModel[] | undefined;
|
|
@@ -10,12 +10,12 @@ 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, lang
|
|
13
|
+
getTranslation: (data: any, lang?: string) => string;
|
|
14
14
|
getLangageLabel: (value: string) => string | undefined;
|
|
15
15
|
getLanguageValue: (label: string) => string | undefined;
|
|
16
16
|
ckEditorToolbarItems: string[];
|
|
17
17
|
displayFormErrors: (errors: any, displayError: (message: string) => void) => void;
|
|
18
|
-
resolveHtmlLinks: (data: string | null | undefined, lang
|
|
18
|
+
resolveHtmlLinks: (data: string | null | undefined, lang?: string) => string;
|
|
19
19
|
resolveUrl: (path: string) => string;
|
|
20
20
|
updateLang: (val: string, reload?: boolean, updateUserPrefs?: boolean) => Promise<void>;
|
|
21
21
|
languages: Language[];
|
|
@@ -25,6 +25,6 @@ export declare const useHelper: () => {
|
|
|
25
25
|
openLink: (str: string) => void;
|
|
26
26
|
openMenu: (menu?: MenuItemModel) => void;
|
|
27
27
|
getMenuHref: (menu: MenuItemModel) => string;
|
|
28
|
-
rHtml: (data: string | null | undefined, lang
|
|
29
|
-
tr: (data: any, lang
|
|
28
|
+
rHtml: (data: string | null | undefined, lang?: string) => string;
|
|
29
|
+
tr: (data: any, lang?: string) => string;
|
|
30
30
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import type { Props } from '@/types/plugin';
|
|
1
2
|
/**
|
|
2
3
|
* A composable that returns the props of the page.
|
|
3
4
|
*
|
|
4
5
|
* It injects the PropsManager symbol and returns the props of the page.
|
|
5
6
|
*
|
|
6
7
|
* @throws {Error} if the plugin is not installed
|
|
7
|
-
* @returns {
|
|
8
|
+
* @returns {T} the props of the page
|
|
8
9
|
*/
|
|
9
|
-
export declare const useProps: () =>
|
|
10
|
-
readonly [x: string]: any;
|
|
11
|
-
};
|
|
10
|
+
export declare const useProps: <T extends Props = Props>() => T;
|