@finema/core 1.1.5 → 1.2.1

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.
Files changed (67) hide show
  1. package/README.md +87 -11
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.mts +15 -0
  4. package/dist/module.d.ts +15 -0
  5. package/dist/module.json +8 -0
  6. package/dist/module.mjs +28 -0
  7. package/dist/runtime/composables/useLibs.d.ts +24 -0
  8. package/dist/runtime/composables/useLibs.mjs +4 -0
  9. package/dist/runtime/composables/useUtils.d.ts +10 -0
  10. package/dist/runtime/composables/useUtils.mjs +12 -0
  11. package/dist/{lib → runtime/lib}/Requester.d.ts +1 -1
  12. package/dist/runtime/lib/Requester.mjs +37 -0
  13. package/dist/{lib → runtime/lib}/api/apiListHelper.d.ts +2 -2
  14. package/dist/runtime/lib/api/apiListHelper.mjs +44 -0
  15. package/dist/{lib → runtime/lib}/api/apiObjectHelper.d.ts +2 -2
  16. package/dist/runtime/lib/api/apiObjectHelper.mjs +46 -0
  17. package/dist/{lib → runtime/lib}/api/apiPageHelper.d.ts +2 -2
  18. package/dist/runtime/lib/api/apiPageHelper.mjs +265 -0
  19. package/dist/runtime/lib/api/config.mjs +4 -0
  20. package/dist/{lib → runtime/lib}/api/loaderList.d.ts +1 -1
  21. package/dist/runtime/lib/api/loaderList.mjs +49 -0
  22. package/dist/{lib → runtime/lib}/api/loaderObject.d.ts +1 -1
  23. package/dist/runtime/lib/api/loaderObject.mjs +50 -0
  24. package/dist/{lib → runtime/lib}/api/loaderPage.d.ts +1 -1
  25. package/dist/runtime/lib/api/loaderPage.mjs +219 -0
  26. package/dist/{lib → runtime/lib}/api/loaderTypes.d.ts +3 -3
  27. package/dist/runtime/lib/api/loaderTypes.mjs +0 -0
  28. package/dist/{lib → runtime/lib}/index.d.ts +0 -2
  29. package/dist/runtime/lib/index.mjs +8 -0
  30. package/dist/runtime/plugin.d.ts +2 -0
  31. package/dist/runtime/plugin.mjs +4 -0
  32. package/dist/runtime/types/common.d.ts +13 -0
  33. package/dist/runtime/types/lib.d.ts +102 -0
  34. package/dist/runtime/utils/FileHelper.mjs +29 -0
  35. package/dist/{utils → runtime/utils}/ObjectHelper.d.ts +3 -3
  36. package/dist/runtime/utils/ObjectHelper.mjs +108 -0
  37. package/dist/{utils → runtime/utils}/ParamHelper.d.ts +2 -1
  38. package/dist/runtime/utils/ParamHelper.mjs +39 -0
  39. package/dist/runtime/utils/StringHelper.mjs +41 -0
  40. package/dist/runtime/utils/TimeHelper.mjs +83 -0
  41. package/dist/runtime/utils/lodash.mjs +38 -0
  42. package/dist/types.d.mts +15 -0
  43. package/dist/types.d.ts +15 -0
  44. package/package.json +64 -31
  45. package/dist/composables/index.d.ts +0 -1
  46. package/dist/composables/useCookie.d.ts +0 -5
  47. package/dist/composables/useWatch.d.ts +0 -3
  48. package/dist/core.js +0 -10031
  49. package/dist/core.umd.cjs +0 -49
  50. package/dist/index.d.ts +0 -3
  51. package/dist/lib/api/types.d.ts +0 -89
  52. package/dist/lib/api/utils.d.ts +0 -9
  53. package/dist/utils/ArrayHelper.d.ts +0 -7
  54. package/dist/utils/ArrayHelper.spec.d.ts +0 -1
  55. package/dist/utils/CookieHelper.d.ts +0 -9
  56. package/dist/utils/ObjectHelper.spec.d.ts +0 -1
  57. package/dist/utils/ParamHelper.spec.d.ts +0 -1
  58. package/dist/utils/StringHelper.spec.d.ts +0 -1
  59. package/dist/utils/TimeHelper.spec.d.ts +0 -1
  60. package/dist/utils/faker.d.ts +0 -2
  61. package/dist/utils/index.d.ts +0 -9
  62. package/dist/utils/types.d.ts +0 -8
  63. /package/dist/{lib → runtime/lib}/api/config.d.ts +0 -0
  64. /package/dist/{utils → runtime/utils}/FileHelper.d.ts +0 -0
  65. /package/dist/{utils → runtime/utils}/StringHelper.d.ts +0 -0
  66. /package/dist/{utils → runtime/utils}/TimeHelper.d.ts +0 -0
  67. /package/dist/{utils → runtime/utils}/lodash.d.ts +0 -0
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './utils';
2
- export * from './lib';
3
- export * from './composables';
@@ -1,89 +0,0 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- export interface IAPIOptions {
3
- _status?: number;
4
- _timestamp?: number;
5
- request?: Partial<AxiosRequestConfig>;
6
- [key: string]: any;
7
- }
8
- export interface IPageOptions extends IAPIOptions {
9
- currentPageCount: number;
10
- currentPage: number;
11
- totalPage: number;
12
- totalCount: number;
13
- limit: number;
14
- search?: string;
15
- primary?: string;
16
- }
17
- export interface IStatus {
18
- isError: boolean;
19
- isSuccess: boolean;
20
- isLoading: boolean;
21
- isLoaded: boolean;
22
- errorData: any | null;
23
- }
24
- export interface IAPIFetchState<T> {
25
- items: T[];
26
- status: IStatus;
27
- options: IPageOptions;
28
- }
29
- export interface IAPIFindState<T> {
30
- data: T;
31
- status: IStatus;
32
- options: IAPIOptions;
33
- }
34
- export interface IAPIAddState<T> {
35
- data: T;
36
- items: T[];
37
- status: IStatus;
38
- options: IAPIOptions;
39
- }
40
- export interface IAPIObjectState<T> {
41
- data: T | null;
42
- status: IStatus;
43
- options: IAPIOptions;
44
- }
45
- export interface IAPIListState<T> {
46
- items: T[];
47
- status: IStatus;
48
- options: IAPIOptions;
49
- }
50
- export interface IAPIDeleteState<T> {
51
- data: T;
52
- items: T[];
53
- status: IStatus;
54
- options: IAPIOptions;
55
- }
56
- export interface IAPIUpdateState<T> {
57
- data: T;
58
- oldData: T;
59
- items: T[] | undefined | null;
60
- status: IStatus;
61
- options: IAPIOptions;
62
- }
63
- export interface IPageState<T> {
64
- deleteStatus: IStatus;
65
- updateStatus: IStatus;
66
- addStatus: IStatus;
67
- findStatus: IStatus;
68
- fetchStatus: IStatus;
69
- fetchItems: T[];
70
- findItem: null | T;
71
- addItem: null | T;
72
- updateItem: null | T;
73
- deleteItem: null | T | any;
74
- findOptions: object;
75
- addOptions: object;
76
- deleteOptions: object;
77
- updateOptions: object;
78
- fetchOptions: IPageOptions;
79
- }
80
- export interface IObjectState<T> {
81
- data: T | null;
82
- status: IStatus;
83
- options: IAPIOptions;
84
- }
85
- export interface IListState<T> {
86
- items: T[];
87
- status: IStatus;
88
- options: IAPIOptions;
89
- }
@@ -1,9 +0,0 @@
1
- interface IGetParams {
2
- params?: {
3
- [key: string]: any;
4
- };
5
- }
6
- export declare const getParams: (opts: IGetParams, reqOptions: IGetParams) => {
7
- [key: string]: any;
8
- } | undefined;
9
- export {};
@@ -1,7 +0,0 @@
1
- import { IOption } from './types';
2
- export declare class ArrayHelper {
3
- static toOptions(data: any[], valueAttr?: string, labelAttr?: string): IOption[];
4
- static toArray<T>(value: any): Array<T | any>;
5
- static isEmpty(value: any): boolean;
6
- static create: (length: number) => any[];
7
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { CookieSerializeOptions } from 'cookie';
2
- export declare class CookieHelper {
3
- static set(name: string, data: any, options?: CookieSerializeOptions): void;
4
- static get(name: string, options?: {
5
- fromRes?: boolean;
6
- parseJSON?: boolean;
7
- }): any;
8
- static remove(name: string, opts?: CookieSerializeOptions): void;
9
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import * as fake from '@faker-js/faker';
2
- export declare const faker: typeof fake;
@@ -1,9 +0,0 @@
1
- export * from './ObjectHelper';
2
- export * from './ParamHelper';
3
- export * from './TimeHelper';
4
- export * from './ArrayHelper';
5
- export * from './FileHelper';
6
- export * from './StringHelper';
7
- export * from './CookieHelper';
8
- export * from './faker';
9
- export * from './lodash';
@@ -1,8 +0,0 @@
1
- export interface IOption {
2
- value: any;
3
- label: string;
4
- }
5
- export interface IError {
6
- code: string;
7
- message: string;
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes