@finema/core 2.7.4 → 2.7.6

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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
package/dist/module.mjs CHANGED
@@ -3,7 +3,7 @@ import defu from 'defu';
3
3
  import * as theme from '../dist/runtime/theme/index.js';
4
4
 
5
5
  const name = "@finema/core";
6
- const version = "2.7.4";
6
+ const version = "2.7.6";
7
7
 
8
8
  const nuxtAppOptions = {
9
9
  head: {
@@ -15,7 +15,7 @@ export const useListLoader = (loaderOptions) => {
15
15
  result.options = {};
16
16
  };
17
17
  const run = async (payload) => {
18
- return apiListHelper(
18
+ await apiListHelper(
19
19
  () => result,
20
20
  (_data) => {
21
21
  result.status = _data;
@@ -5,20 +5,14 @@ import {
5
5
  } from "../helpers/apiObjectHelper.js";
6
6
  export const useObjectLoader = (loaderOptions) => {
7
7
  const data = ref(null);
8
- const status = ref({
9
- isLoaded: false,
10
- isLoading: false,
11
- isError: false,
12
- isSuccess: false,
13
- errorData: null
14
- });
8
+ const status = ref(ObjectHelper.createStatus());
15
9
  const options = ref({});
16
10
  const clear = () => {
17
11
  status.value = ObjectHelper.createStatus();
18
12
  data.value = null;
19
13
  };
20
14
  const run = async (payload = {}) => {
21
- return await apiObjectHelper(
15
+ await apiObjectHelper(
22
16
  () => ({
23
17
  data: data.value,
24
18
  status: status.value,
@@ -76,7 +76,7 @@ export const usePageLoader = (loaderOptions) => {
76
76
  find.status = ObjectHelper.toLoadingStatus(find.status);
77
77
  };
78
78
  const fetchPage = async (page = 1, query = "", opts) => {
79
- return await apiFetchHelper(
79
+ await apiFetchHelper(
80
80
  () => ({
81
81
  status: fetch.status,
82
82
  items: fetch.items,
@@ -100,7 +100,7 @@ export const usePageLoader = (loaderOptions) => {
100
100
  );
101
101
  };
102
102
  const findRun = async (id, opts) => {
103
- return await apiFindHelper(
103
+ await apiFindHelper(
104
104
  () => ({
105
105
  status: find.status,
106
106
  data: find.item,
@@ -123,7 +123,7 @@ export const usePageLoader = (loaderOptions) => {
123
123
  );
124
124
  };
125
125
  const addRun = async (payload) => {
126
- return await apiAddHelper(
126
+ await apiAddHelper(
127
127
  () => ({
128
128
  items: fetch.items,
129
129
  status: add.status,
@@ -150,7 +150,7 @@ export const usePageLoader = (loaderOptions) => {
150
150
  );
151
151
  };
152
152
  const updateRun = async (id, payload) => {
153
- return await updateHelper(
153
+ await updateHelper(
154
154
  () => ({
155
155
  items: fetch.items,
156
156
  status: update.status,
@@ -182,20 +182,20 @@ export const usePageLoader = (loaderOptions) => {
182
182
  );
183
183
  };
184
184
  const fetchSearch = async (query = "", opts) => {
185
- return fetchPage(1, query, opts);
185
+ await fetchPage(1, query, opts);
186
186
  };
187
187
  const fetchPageChange = async (page, opts) => {
188
188
  const {
189
189
  page: _page,
190
190
  ...params
191
191
  } = fetch.options?.request?.params || {};
192
- return fetchPage(page, "", {
192
+ await fetchPage(page, "", {
193
193
  params,
194
194
  ...opts
195
195
  });
196
196
  };
197
197
  const deleteRun = async (id, opts) => {
198
- return await apiDeleteHelper(
198
+ await apiDeleteHelper(
199
199
  () => ({
200
200
  status: del.status,
201
201
  data: del.item,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@nuxt/kit": "^3.17.4",
41
41
  "@nuxt/ui": "^3.1.3",
42
- "@pinia/nuxt": "^0.11.0",
42
+ "@pinia/nuxt": "0.7.0",
43
43
  "@tiptap/extension-image": "^2.8.0",
44
44
  "@tiptap/extension-link": "^2.8.0",
45
45
  "@tiptap/extension-text-align": "^2.8.0",