@finema/core 3.13.1 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "3.13.1",
3
+ "version": "3.14.0",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import * as lodash from 'lodash-es';
4
4
  import * as theme from '../dist/runtime/theme/index.js';
5
5
 
6
6
  const name = "@finema/core";
7
- const version = "3.13.1";
7
+ const version = "3.14.0";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -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.13.1",
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",