@finema/core 3.13.0 → 3.14.0
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
package/dist/module.mjs
CHANGED
|
@@ -101,6 +101,34 @@ export const usePageLoader = (loaderOptions) => {
|
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
};
|
|
104
|
+
const fetchAll = async (query = "", opts = {}) => {
|
|
105
|
+
opts.params = {
|
|
106
|
+
...opts.params,
|
|
107
|
+
limit: 99999
|
|
108
|
+
};
|
|
109
|
+
await apiFetchHelper(
|
|
110
|
+
() => ({
|
|
111
|
+
status: fetch.status,
|
|
112
|
+
items: fetch.items,
|
|
113
|
+
options: fetch.options
|
|
114
|
+
}),
|
|
115
|
+
(data) => {
|
|
116
|
+
fetch.status = data;
|
|
117
|
+
},
|
|
118
|
+
(data) => {
|
|
119
|
+
fetch.options = data;
|
|
120
|
+
},
|
|
121
|
+
(data) => {
|
|
122
|
+
fetch.items = data;
|
|
123
|
+
},
|
|
124
|
+
1,
|
|
125
|
+
query,
|
|
126
|
+
{
|
|
127
|
+
...loaderOptions,
|
|
128
|
+
...opts
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
};
|
|
104
132
|
const findRun = async (id, opts) => {
|
|
105
133
|
await apiFindHelper(
|
|
106
134
|
() => ({
|
|
@@ -261,6 +289,7 @@ export const usePageLoader = (loaderOptions) => {
|
|
|
261
289
|
delete: del,
|
|
262
290
|
// Rename del to delete in the return object
|
|
263
291
|
fetchPage,
|
|
292
|
+
fetchAll,
|
|
264
293
|
fetchSearch,
|
|
265
294
|
fetchPageChange,
|
|
266
295
|
fetchNextPage,
|
|
@@ -72,6 +72,7 @@ export interface IUsePageLoader<T> {
|
|
|
72
72
|
options: IAPIOptions;
|
|
73
73
|
};
|
|
74
74
|
fetchPage: (page?: number, query?: string, opts?: IPageFetchLoaderOptions) => Promise<void>;
|
|
75
|
+
fetchAll: (query?: string, opts?: IPageFetchLoaderOptions) => Promise<void>;
|
|
75
76
|
fetchPageChange: (page: number, opts?: IPageFetchLoaderOptions) => Promise<void>;
|
|
76
77
|
fetchNextPage: (opts?: IPageFetchLoaderOptions) => Promise<void>;
|
|
77
78
|
fetchSearch: (query: string, opts?: IPageFetchLoaderOptions) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@iconify-json/ph": "^1.2.2",
|
|
45
45
|
"@iconify-json/svg-spinners": "^1.2.2",
|
|
46
46
|
"@nuxt/kit": "^4.1.3",
|
|
47
|
-
"@nuxt/ui": "^4.
|
|
47
|
+
"@nuxt/ui": "^4.5.0",
|
|
48
48
|
"@pinia/nuxt": "^0.11.0",
|
|
49
49
|
"@tailwindcss/typography": "^0.5.0-alpha.3",
|
|
50
50
|
"@tiptap/extension-text-align": "^3.18.0",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"lint-staged": {
|
|
84
84
|
"*": "eslint"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|