@arrai-innovations/reactive-helpers 18.0.0 → 18.0.2
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/package.json +20 -6
- package/types/config/listCrud.d.ts +153 -0
- package/types/config/listCrud.d.ts.map +1 -0
- package/types/config/objectCrud.d.ts +171 -0
- package/types/config/objectCrud.d.ts.map +1 -0
- package/types/index.d.ts +37 -0
- package/types/index.d.ts.map +1 -0
- package/types/tests/unit/config/listCrud.spec.d.ts +2 -0
- package/types/tests/unit/config/listCrud.spec.d.ts.map +1 -0
- package/types/tests/unit/config/objectCrud.spec.d.ts +2 -0
- package/types/tests/unit/config/objectCrud.spec.d.ts.map +1 -0
- package/types/tests/unit/crudPromise.d.ts +25 -0
- package/types/tests/unit/crudPromise.d.ts.map +1 -0
- package/types/tests/unit/expectHelpers.d.ts +2 -0
- package/types/tests/unit/expectHelpers.d.ts.map +1 -0
- package/types/tests/unit/mockOnUnmounted.d.ts +2 -0
- package/types/tests/unit/mockOnUnmounted.d.ts.map +1 -0
- package/types/tests/unit/poll.d.ts +2 -0
- package/types/tests/unit/poll.d.ts.map +1 -0
- package/types/tests/unit/use/cancellableIntent.spec.d.ts +2 -0
- package/types/tests/unit/use/cancellableIntent.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listCalculated.spec.d.ts +2 -0
- package/types/tests/unit/use/listCalculated.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listFilter.spec.d.ts +2 -0
- package/types/tests/unit/use/listFilter.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listInstance.spec.d.ts +2 -0
- package/types/tests/unit/use/listInstance.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listRelated.spec.d.ts +2 -0
- package/types/tests/unit/use/listRelated.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSearch.spec.d.ts +2 -0
- package/types/tests/unit/use/listSearch.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSort.spec.d.ts +2 -0
- package/types/tests/unit/use/listSort.spec.d.ts.map +1 -0
- package/types/tests/unit/use/listSubscription.spec.d.ts +2 -0
- package/types/tests/unit/use/listSubscription.spec.d.ts.map +1 -0
- package/types/tests/unit/use/loadingError.spec.d.ts +2 -0
- package/types/tests/unit/use/loadingError.spec.d.ts.map +1 -0
- package/types/tests/unit/use/objectInstance.spec.d.ts +2 -0
- package/types/tests/unit/use/objectInstance.spec.d.ts.map +1 -0
- package/types/tests/unit/use/objectSubscription.spec.d.ts +2 -0
- package/types/tests/unit/use/objectSubscription.spec.d.ts.map +1 -0
- package/types/tests/unit/use/proxyLoadingError.spec.d.ts +2 -0
- package/types/tests/unit/use/proxyLoadingError.spec.d.ts.map +1 -0
- package/types/tests/unit/use/search.spec.d.ts +2 -0
- package/types/tests/unit/use/search.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/assignReactiveObject.spec.d.ts +2 -0
- package/types/tests/unit/utils/assignReactiveObject.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/classes.spec.d.ts +2 -0
- package/types/tests/unit/utils/classes.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/deleteKey.spec.d.ts +2 -0
- package/types/tests/unit/utils/deleteKey.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/flattenPaths.spec.d.ts +2 -0
- package/types/tests/unit/utils/flattenPaths.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/keyDiff.spec.d.ts +2 -0
- package/types/tests/unit/utils/keyDiff.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/set.spec.d.ts +2 -0
- package/types/tests/unit/utils/set.spec.d.ts.map +1 -0
- package/types/tests/unit/utils/watches.spec.d.ts +2 -0
- package/types/tests/unit/utils/watches.spec.d.ts.map +1 -0
- package/types/use/cancellableIntent.d.ts +129 -0
- package/types/use/cancellableIntent.d.ts.map +1 -0
- package/types/use/combineClasses.d.ts +43 -0
- package/types/use/combineClasses.d.ts.map +1 -0
- package/types/use/list.d.ts +176 -0
- package/types/use/list.d.ts.map +1 -0
- package/types/use/listCalculated.d.ts +192 -0
- package/types/use/listCalculated.d.ts.map +1 -0
- package/types/use/listFilter.d.ts +203 -0
- package/types/use/listFilter.d.ts.map +1 -0
- package/types/use/listInstance.d.ts +357 -0
- package/types/use/listInstance.d.ts.map +1 -0
- package/types/use/listKeys.d.ts +15 -0
- package/types/use/listKeys.d.ts.map +1 -0
- package/types/use/listRelated.d.ts +239 -0
- package/types/use/listRelated.d.ts.map +1 -0
- package/types/use/listSearch.d.ts +298 -0
- package/types/use/listSearch.d.ts.map +1 -0
- package/types/use/listSort.d.ts +235 -0
- package/types/use/listSort.d.ts.map +1 -0
- package/types/use/listSubscription.d.ts +218 -0
- package/types/use/listSubscription.d.ts.map +1 -0
- package/types/use/loadingError.d.ts +81 -0
- package/types/use/loadingError.d.ts.map +1 -0
- package/types/use/object.d.ts +67 -0
- package/types/use/object.d.ts.map +1 -0
- package/types/use/objectCalculated.d.ts +215 -0
- package/types/use/objectCalculated.d.ts.map +1 -0
- package/types/use/objectInstance.d.ts +289 -0
- package/types/use/objectInstance.d.ts.map +1 -0
- package/types/use/objectRelated.d.ts +264 -0
- package/types/use/objectRelated.d.ts.map +1 -0
- package/types/use/objectSubscription.d.ts +249 -0
- package/types/use/objectSubscription.d.ts.map +1 -0
- package/types/use/paginatedListInstance.d.ts +51 -0
- package/types/use/paginatedListInstance.d.ts.map +1 -0
- package/types/use/proxyLoadingError.d.ts +36 -0
- package/types/use/proxyLoadingError.d.ts.map +1 -0
- package/types/use/search.d.ts +144 -0
- package/types/use/search.d.ts.map +1 -0
- package/types/use/watchesRunning.d.ts +63 -0
- package/types/use/watchesRunning.d.ts.map +1 -0
- package/types/utils/assignReactiveObject.d.ts +115 -0
- package/types/utils/assignReactiveObject.d.ts.map +1 -0
- package/types/utils/classes.d.ts +22 -0
- package/types/utils/classes.d.ts.map +1 -0
- package/types/utils/compact.d.ts +4 -0
- package/types/utils/compact.d.ts.map +1 -0
- package/types/utils/deleteKey.d.ts +16 -0
- package/types/utils/deleteKey.d.ts.map +1 -0
- package/types/utils/flattenPaths.d.ts +23 -0
- package/types/utils/flattenPaths.d.ts.map +1 -0
- package/types/utils/getFakePk.d.ts +13 -0
- package/types/utils/getFakePk.d.ts.map +1 -0
- package/types/utils/keepAliveTry.d.ts +15 -0
- package/types/utils/keepAliveTry.d.ts.map +1 -0
- package/types/utils/keyDiff.d.ts +63 -0
- package/types/utils/keyDiff.d.ts.map +1 -0
- package/types/utils/loadingCombine.d.ts +9 -0
- package/types/utils/loadingCombine.d.ts.map +1 -0
- package/types/utils/proxyRunning.d.ts +9 -0
- package/types/utils/proxyRunning.d.ts.map +1 -0
- package/types/utils/relatedCalculatedHelpers.d.ts +5 -0
- package/types/utils/relatedCalculatedHelpers.d.ts.map +1 -0
- package/types/utils/set.d.ts +7 -0
- package/types/utils/set.d.ts.map +1 -0
- package/types/utils/transformWalk.d.ts +2 -0
- package/types/utils/transformWalk.d.ts.map +1 -0
- package/types/utils/watches.d.ts +155 -0
- package/types/utils/watches.d.ts.map +1 -0
- package/use/loadingError.js +1 -1
- package/.circleci/config.yml +0 -88
- package/.commitlintrc.json +0 -25
- package/.editorconfig +0 -5
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/encodings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -8
- package/.idea/reactive-helpers.iml +0 -15
- package/.prettierignore +0 -5
- package/.prettierrc.cjs +0 -5
- package/.vscode/extensions.json +0 -3
- package/docs/README.md +0 -45
- package/docs/config/listCrud.md +0 -422
- package/docs/config/objectCrud.md +0 -427
- package/docs/use/cancellableIntent.md +0 -165
- package/docs/use/combineClasses.md +0 -62
- package/docs/use/list.md +0 -361
- package/docs/use/listCalculated.md +0 -794
- package/docs/use/listFilter.md +0 -897
- package/docs/use/listInstance.md +0 -559
- package/docs/use/listKeys.md +0 -91
- package/docs/use/listRelated.md +0 -706
- package/docs/use/listSearch.md +0 -903
- package/docs/use/listSort.md +0 -1171
- package/docs/use/listSubscription.md +0 -393
- package/docs/use/loadingError.md +0 -115
- package/docs/use/object.md +0 -668
- package/docs/use/objectCalculated.md +0 -741
- package/docs/use/objectInstance.md +0 -685
- package/docs/use/objectRelated.md +0 -723
- package/docs/use/objectSubscription.md +0 -538
- package/docs/use/paginatedListInstance.md +0 -155
- package/docs/use/proxyLoadingError.md +0 -51
- package/docs/use/search.md +0 -321
- package/docs/use/watchesRunning.md +0 -84
- package/docs/utils/assignReactiveObject.md +0 -413
- package/docs/utils/classes.md +0 -139
- package/docs/utils/compact.md +0 -67
- package/docs/utils/deleteKey.md +0 -61
- package/docs/utils/flattenPaths.md +0 -53
- package/docs/utils/getFakePk.md +0 -39
- package/docs/utils/keepAliveTry.md +0 -59
- package/docs/utils/keyDiff.md +0 -117
- package/docs/utils/loadingCombine.md +0 -30
- package/docs/utils/proxyRunning.md +0 -39
- package/docs/utils/relatedCalculatedHelpers.md +0 -93
- package/docs/utils/set.md +0 -223
- package/docs/utils/transformWalk.md +0 -68
- package/docs/utils/watches.md +0 -489
- package/eslint.config.js +0 -125
- package/lint-staged.config.js +0 -10
- package/makeTypeDoc.sh +0 -25
- package/make_type_doc.js +0 -59
- package/tests/unit/config/listCrud.spec.js +0 -114
- package/tests/unit/config/objectCrud.spec.js +0 -160
- package/tests/unit/crudPromise.js +0 -40
- package/tests/unit/expectHelpers.js +0 -6
- package/tests/unit/mockOnUnmounted.js +0 -9
- package/tests/unit/poll.js +0 -50
- package/tests/unit/use/cancellableIntent.spec.js +0 -152
- package/tests/unit/use/listCalculated.spec.js +0 -135
- package/tests/unit/use/listFilter.spec.js +0 -484
- package/tests/unit/use/listInstance.spec.js +0 -1166
- package/tests/unit/use/listRelated.spec.js +0 -260
- package/tests/unit/use/listSearch.spec.js +0 -586
- package/tests/unit/use/listSort.spec.js +0 -418
- package/tests/unit/use/listSubscription.spec.js +0 -845
- package/tests/unit/use/loadingError.spec.js +0 -43
- package/tests/unit/use/objectInstance.spec.js +0 -1525
- package/tests/unit/use/objectSubscription.spec.js +0 -849
- package/tests/unit/use/proxyLoadingError.spec.js +0 -64
- package/tests/unit/use/search.spec.js +0 -248
- package/tests/unit/utils/assignReactiveObject.spec.js +0 -593
- package/tests/unit/utils/classes.spec.js +0 -427
- package/tests/unit/utils/deleteKey.spec.js +0 -265
- package/tests/unit/utils/flattenPaths.spec.js +0 -126
- package/tests/unit/utils/keyDiff.spec.js +0 -110
- package/tests/unit/utils/set.spec.js +0 -81
- package/tests/unit/utils/watches.spec.js +0 -276
- package/tsconfig.json +0 -19
- package/typedoc-local-plugins/customize-output.js +0 -13
- package/typedoc.json +0 -11
- package/vitest.config.js +0 -11
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper function to get the resulting promise from an AwaitTimeout instance.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} timeout - The timeout in milliseconds.
|
|
5
|
+
* @returns {Promise} A promise that resolves after the specified timeout.
|
|
6
|
+
*/
|
|
7
|
+
export function doAwaitTimeout(timeout: number): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to get the resulting promise from an AwaitNot instance.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} options - Configuration options for AwaitNot.
|
|
12
|
+
* @param {object} options.obj - The object containing the property to watch.
|
|
13
|
+
* @param {string} options.prop - The property name to watch within the object.
|
|
14
|
+
* @param {import("vue").Ref} [options.ref] - A Vue ref to directly watch if provided.
|
|
15
|
+
* @param {boolean} [options.couldAlreadyBeFalse=false] - Indicates if the property could already be in the false state at initialization.
|
|
16
|
+
* @param {number} [options.timeout=1000] - The timeout in milliseconds before the promise is rejected.
|
|
17
|
+
* @returns {Promise} A promise that resolves when the property toggles from true to false.
|
|
18
|
+
*/
|
|
19
|
+
export function doAwaitNot({ obj, prop, ref, couldAlreadyBeFalse, timeout }: {
|
|
20
|
+
obj: object;
|
|
21
|
+
prop: string;
|
|
22
|
+
ref?: import("vue").Ref;
|
|
23
|
+
couldAlreadyBeFalse?: boolean;
|
|
24
|
+
timeout?: number;
|
|
25
|
+
}): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* @module utils/watches.js
|
|
28
|
+
* @description
|
|
29
|
+
*
|
|
30
|
+
* A collection of utility classes and functions for managing Vue.js watchers.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Provides a mechanism for immediately starting and potentially stopping a Vue.js watcher
|
|
35
|
+
* during its first invocation. This is useful when the need arises to terminate the watch
|
|
36
|
+
* based on conditions encountered during the initial execution of the watch function.
|
|
37
|
+
*/
|
|
38
|
+
export class ImmediateStopWatch {
|
|
39
|
+
/**
|
|
40
|
+
* Starts the watch.
|
|
41
|
+
*
|
|
42
|
+
* @param {import("vue").WatchSource | import("vue").WatchSource[]} watchSources - The source(s) to watch.
|
|
43
|
+
* @param {import("vue").WatchCallback} watchFunc - The callback to execute when the source changes.
|
|
44
|
+
* @param {any[]} [watchFuncArgs=[]] - Optional arguments to pass to the watch function.
|
|
45
|
+
* @param {import("vue").WatchOptions} [watchOptions={}] - Optional watch options.
|
|
46
|
+
* @returns {void}
|
|
47
|
+
*/
|
|
48
|
+
start(watchSources: import("vue").WatchSource | import("vue").WatchSource[], watchFunc: import("vue").WatchCallback, watchFuncArgs?: any[], watchOptions?: import("vue").WatchOptions): void;
|
|
49
|
+
stopWatch: import("vue").WatchHandle;
|
|
50
|
+
/**
|
|
51
|
+
* Stops the watch.
|
|
52
|
+
*
|
|
53
|
+
* @returns {void}
|
|
54
|
+
*/
|
|
55
|
+
stop(): void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The error thrown when an AwaitTimeout operation times out.
|
|
59
|
+
*
|
|
60
|
+
* @property {string} code - The error code.
|
|
61
|
+
*/
|
|
62
|
+
export class AwaitTimeoutError extends Error {
|
|
63
|
+
constructor(message: any, code: any);
|
|
64
|
+
code: any;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The error thrown when an AwaitNot operation times out.
|
|
68
|
+
*
|
|
69
|
+
* @property {string} code - The error code.
|
|
70
|
+
* @property {string} name - The error name.
|
|
71
|
+
*/
|
|
72
|
+
export class AwaitNotError extends Error {
|
|
73
|
+
constructor(message: any, code: any);
|
|
74
|
+
code: any;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A utility class for managing a promise that resolves or rejects based on a set timeout or an explicit stop action.
|
|
78
|
+
* This class is useful for implementing timeouts in asynchronous operations, where you might need to reject a promise
|
|
79
|
+
* if an operation takes too long or cancel the timeout based on certain conditions.
|
|
80
|
+
*/
|
|
81
|
+
export class AwaitTimeout {
|
|
82
|
+
/**
|
|
83
|
+
* Creates an instance of AwaitTimeout with a specified timeout duration.
|
|
84
|
+
*
|
|
85
|
+
* @param {object} options - The options for the AwaitTimeout.
|
|
86
|
+
* @param {number} [options.timeout=1000] - The timeout in milliseconds.
|
|
87
|
+
*/
|
|
88
|
+
constructor({ timeout }: {
|
|
89
|
+
timeout?: number;
|
|
90
|
+
});
|
|
91
|
+
promise: Promise<any>;
|
|
92
|
+
resolve: (value: any) => void;
|
|
93
|
+
reject: (reason?: any) => void;
|
|
94
|
+
timeout: number;
|
|
95
|
+
timeoutId: NodeJS.Timeout;
|
|
96
|
+
cancelledError: AwaitTimeoutError;
|
|
97
|
+
/**
|
|
98
|
+
* Starts the timeout process. If the timeout duration is reached without being stopped, the promise resolves.
|
|
99
|
+
*
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
|
+
start(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Stops the timeout if it is active, rejecting the promise with a "Cancelled" error. Clears all pending actions.
|
|
105
|
+
*
|
|
106
|
+
* @returns {void}
|
|
107
|
+
*/
|
|
108
|
+
stop(): void;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Manages an asynchronous watch on a property, waiting for it to toggle between true and false states.
|
|
112
|
+
* This class uses immediate watchers to react to changes and supports a timeout to limit waiting duration.
|
|
113
|
+
*/
|
|
114
|
+
export class AwaitNot {
|
|
115
|
+
/**
|
|
116
|
+
* Initializes the AwaitNot with specified options for reactive property watching and timeout settings.
|
|
117
|
+
*
|
|
118
|
+
* @param {object} options - Configuration options for AwaitNot.
|
|
119
|
+
* @param {object} [options.obj] - The object containing the property to watch.
|
|
120
|
+
* @param {string} [options.prop] - The property name to watch within the object.
|
|
121
|
+
* @param {import("vue").Ref} [options.ref] - A Vue ref to directly watch if provided.
|
|
122
|
+
* @param {boolean} [options.couldAlreadyBeFalse=false] - Indicates if the property could already be in the false state at initialization.
|
|
123
|
+
* @param {number} [options.timeout=1000] - The timeout in milliseconds before the promise is rejected.
|
|
124
|
+
*/
|
|
125
|
+
constructor({ obj, prop, ref, couldAlreadyBeFalse, timeout }: {
|
|
126
|
+
obj?: object;
|
|
127
|
+
prop?: string;
|
|
128
|
+
ref?: import("vue").Ref;
|
|
129
|
+
couldAlreadyBeFalse?: boolean;
|
|
130
|
+
timeout?: number;
|
|
131
|
+
});
|
|
132
|
+
timeout: AwaitTimeout;
|
|
133
|
+
promise: Promise<any>;
|
|
134
|
+
resolve: (value: any) => void;
|
|
135
|
+
reject: (reason?: any) => void;
|
|
136
|
+
couldAlreadyBeFalse: boolean;
|
|
137
|
+
ref: Readonly<import("vue").Ref<any, any>>;
|
|
138
|
+
trueISW: ImmediateStopWatch;
|
|
139
|
+
falseISW: ImmediateStopWatch;
|
|
140
|
+
timeoutError: AwaitNotError;
|
|
141
|
+
/**
|
|
142
|
+
* Starts the process of watching the property for changes between true and false.
|
|
143
|
+
* It sets up the necessary watchers and a timeout if specified.
|
|
144
|
+
*
|
|
145
|
+
* @returns {void}
|
|
146
|
+
*/
|
|
147
|
+
start(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Stops all watchers and the timeout, cleaning up resources.
|
|
150
|
+
*
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
153
|
+
stop(): void;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=watches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watches.d.ts","sourceRoot":"","sources":["../../utils/watches.js"],"names":[],"mappings":"AAiJA;;;;;GAKG;AACH,wCAHW,MAAM,gBAOhB;AAyKD;;;;;;;;;;GAUG;AACH,6EAPG;IAAwB,GAAG,EAAnB,MAAM;IACU,IAAI,EAApB,MAAM;IACsB,GAAG,GAA/B,OAAO,KAAK,EAAE,GAAG;IACC,mBAAmB,GAArC,OAAO;IACU,OAAO,GAAxB,MAAM;CACd,gBAMF;AAjVD;;;;;;GAMG;AAEH;;;;GAIG;AACH;IAGI;;;;;;;;OAQG;IACH,oBANW,OAAO,KAAK,EAAE,WAAW,GAAG,OAAO,KAAK,EAAE,WAAW,EAAE,aACvD,OAAO,KAAK,EAAE,aAAa,kBAC3B,GAAG,EAAE,iBACL,OAAO,KAAK,EAAE,YAAY,GACxB,IAAI,CAShB;IAHG,qCAA6D;IAKjE;;;;OAIG;IACH,QAFa,IAAI,CAOhB;CACJ;AAED;;;;GAIG;AACH;IACI,qCAIC;IADG,UAAgB;CAEvB;AAED;;;;;GAKG;AACH;IACI,qCAIC;IADG,UAAgB;CAEvB;AAeD;;;;GAIG;AACH;IACI;;;;;OAKG;IACH,yBAFG;QAAyB,OAAO,GAAxB,MAAM;KAChB,EAUA;IARG,sBAGE;IAFE,8BAAsB;IACtB,+BAAoB;IAExB,gBAAsB;IACtB,0BAAqB;IAErB,kCAA6E;IAGjF;;;;OAIG;IACH,SAFa,IAAI,CAQhB;IAED;;;;OAIG;IACH,QAFa,IAAI,CAchB;CACJ;AAgGD;;;GAGG;AACH;IACI;;;;;;;;;OASG;IACH,8DANG;QAAyB,GAAG,GAApB,MAAM;QACW,IAAI,GAArB,MAAM;QACsB,GAAG,GAA/B,OAAO,KAAK,EAAE,GAAG;QACC,mBAAmB,GAArC,OAAO;QACU,OAAO,GAAxB,MAAM;KAChB,EAqBA;IAlBO,sBAA4C;IAEhD,sBAGE;IAFE,8BAAsB;IACtB,+BAAoB;IAExB,6BAA8C;IAE1C,2CAAc;IAIlB,4BAAuC;IACvC,6BAAwC;IAGpC,4BAA2D;IAInE;;;;;OAKG;IACH,SAFa,IAAI,CA4BhB;IAED;;;;OAIG;IACH,QAFa,IAAI,CAQhB;CACJ"}
|
package/use/loadingError.js
CHANGED
|
@@ -24,7 +24,7 @@ import { readonly, ref } from "vue";
|
|
|
24
24
|
* @typedef {object} LoadingErrorMutations
|
|
25
25
|
* @property {() => void} setLoading - Set the loading state.
|
|
26
26
|
* @property {() => void} clearLoading - Clear the loading state.
|
|
27
|
-
* @property {(error) => void} setError - Set the error state.
|
|
27
|
+
* @property {(error: Error) => void} setError - Set the error state.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
/**
|
package/.circleci/config.yml
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
orbs:
|
|
3
|
-
eslint: arrai/eslint@8.1.0
|
|
4
|
-
prettier: arrai/prettier@5.10.0
|
|
5
|
-
npm: arrai/npm@3.1.0
|
|
6
|
-
github: arrai/github@5.0.0
|
|
7
|
-
workflows:
|
|
8
|
-
test:
|
|
9
|
-
jobs:
|
|
10
|
-
- npm/coverage:
|
|
11
|
-
name: tests
|
|
12
|
-
context: arrai-global
|
|
13
|
-
filters:
|
|
14
|
-
branches:
|
|
15
|
-
only:
|
|
16
|
-
- main
|
|
17
|
-
- npm/coverage:
|
|
18
|
-
name: tests-no-badge
|
|
19
|
-
context: arrai-global
|
|
20
|
-
create_badges: false
|
|
21
|
-
filters:
|
|
22
|
-
tags:
|
|
23
|
-
only: /.*/
|
|
24
|
-
branches:
|
|
25
|
-
ignore:
|
|
26
|
-
- main
|
|
27
|
-
- npm/publish:
|
|
28
|
-
name: publish
|
|
29
|
-
context: arrai-private-package-publishing
|
|
30
|
-
requires:
|
|
31
|
-
- tests-no-badge
|
|
32
|
-
filters:
|
|
33
|
-
tags:
|
|
34
|
-
only: /.*/
|
|
35
|
-
branches:
|
|
36
|
-
ignore: /.*/
|
|
37
|
-
- github/create_release:
|
|
38
|
-
name: release_on_github
|
|
39
|
-
context: arrai-global
|
|
40
|
-
requires:
|
|
41
|
-
- tests-no-badge
|
|
42
|
-
filters:
|
|
43
|
-
tags:
|
|
44
|
-
only: /.*/
|
|
45
|
-
branches:
|
|
46
|
-
ignore: /.*/
|
|
47
|
-
lint:
|
|
48
|
-
jobs:
|
|
49
|
-
- eslint/eslint_fixed_ip:
|
|
50
|
-
name: eslint
|
|
51
|
-
context: arrai-global
|
|
52
|
-
files: "."
|
|
53
|
-
wd: "."
|
|
54
|
-
config:
|
|
55
|
-
- run:
|
|
56
|
-
name: NPM
|
|
57
|
-
command: npm ci
|
|
58
|
-
filters:
|
|
59
|
-
branches:
|
|
60
|
-
only:
|
|
61
|
-
- main
|
|
62
|
-
- eslint/eslint:
|
|
63
|
-
name: eslint-no-badge
|
|
64
|
-
files: "."
|
|
65
|
-
wd: "."
|
|
66
|
-
config:
|
|
67
|
-
- run:
|
|
68
|
-
name: NPM
|
|
69
|
-
command: npm ci
|
|
70
|
-
create_badges: false
|
|
71
|
-
filters:
|
|
72
|
-
branches:
|
|
73
|
-
ignore:
|
|
74
|
-
- main
|
|
75
|
-
- prettier/code_style_fixed_ip:
|
|
76
|
-
name: prettier
|
|
77
|
-
context: arrai-global
|
|
78
|
-
filters:
|
|
79
|
-
branches:
|
|
80
|
-
only:
|
|
81
|
-
- main
|
|
82
|
-
- prettier/code_style:
|
|
83
|
-
name: prettier-no-badge
|
|
84
|
-
create_badges: false
|
|
85
|
-
filters:
|
|
86
|
-
branches:
|
|
87
|
-
ignore:
|
|
88
|
-
- main
|
package/.commitlintrc.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["@commitlint/config-conventional"],
|
|
3
|
-
"rules": {
|
|
4
|
-
"type-enum": [
|
|
5
|
-
2,
|
|
6
|
-
"always",
|
|
7
|
-
[
|
|
8
|
-
"build",
|
|
9
|
-
"ci",
|
|
10
|
-
"chore",
|
|
11
|
-
"content",
|
|
12
|
-
"docs",
|
|
13
|
-
"feat",
|
|
14
|
-
"fix",
|
|
15
|
-
"perf",
|
|
16
|
-
"refactor",
|
|
17
|
-
"remove",
|
|
18
|
-
"revert",
|
|
19
|
-
"style",
|
|
20
|
-
"test",
|
|
21
|
-
"wip"
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
package/.editorconfig
DELETED
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
package/.idea/encodings.xml
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="ES6PreferShortImport" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" />
|
|
5
|
-
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
6
|
-
</profile>
|
|
7
|
-
</component>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/reactive-helpers.iml" filepath="$PROJECT_DIR$/.idea/reactive-helpers.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="PrettierConfiguration">
|
|
4
|
-
<option name="myRunOnSave" value="true" />
|
|
5
|
-
<option name="myRunOnReformat" value="true" />
|
|
6
|
-
<option name="myFilesPattern" value="{**/*,*}.{js,ts,jsx,tsx,less,scss,css,vue,markdown,md,json,yml,yaml,html}" />
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
8
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
9
|
-
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
|
10
|
-
<excludeFolder url="file://$MODULE_DIR$/coverage" />
|
|
11
|
-
</content>
|
|
12
|
-
<orderEntry type="inheritedJdk" />
|
|
13
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
14
|
-
</component>
|
|
15
|
-
</module>
|
package/.prettierignore
DELETED
package/.prettierrc.cjs
DELETED
package/.vscode/extensions.json
DELETED
package/docs/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
**@arrai-innovations/reactive-helpers**
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
# @arrai-innovations/reactive-helpers
|
|
6
|
-
|
|
7
|
-
## Modules
|
|
8
|
-
|
|
9
|
-
- [config/listCrud](config/listCrud.md)
|
|
10
|
-
- [config/objectCrud](config/objectCrud.md)
|
|
11
|
-
- [use/cancellableIntent](use/cancellableIntent.md)
|
|
12
|
-
- [use/combineClasses](use/combineClasses.md)
|
|
13
|
-
- [use/list](use/list.md)
|
|
14
|
-
- [use/listCalculated](use/listCalculated.md)
|
|
15
|
-
- [use/listFilter](use/listFilter.md)
|
|
16
|
-
- [use/listInstance](use/listInstance.md)
|
|
17
|
-
- [use/listKeys](use/listKeys.md)
|
|
18
|
-
- [use/listRelated](use/listRelated.md)
|
|
19
|
-
- [use/listSearch](use/listSearch.md)
|
|
20
|
-
- [use/listSort](use/listSort.md)
|
|
21
|
-
- [use/listSubscription](use/listSubscription.md)
|
|
22
|
-
- [use/loadingError](use/loadingError.md)
|
|
23
|
-
- [use/object](use/object.md)
|
|
24
|
-
- [use/objectCalculated](use/objectCalculated.md)
|
|
25
|
-
- [use/objectInstance](use/objectInstance.md)
|
|
26
|
-
- [use/objectRelated](use/objectRelated.md)
|
|
27
|
-
- [use/objectSubscription](use/objectSubscription.md)
|
|
28
|
-
- [use/paginatedListInstance](use/paginatedListInstance.md)
|
|
29
|
-
- [use/proxyLoadingError](use/proxyLoadingError.md)
|
|
30
|
-
- [use/search](use/search.md)
|
|
31
|
-
- [use/watchesRunning](use/watchesRunning.md)
|
|
32
|
-
- [utils/assignReactiveObject](utils/assignReactiveObject.md)
|
|
33
|
-
- [utils/classes](utils/classes.md)
|
|
34
|
-
- [utils/compact](utils/compact.md)
|
|
35
|
-
- [utils/deleteKey](utils/deleteKey.md)
|
|
36
|
-
- [utils/flattenPaths](utils/flattenPaths.md)
|
|
37
|
-
- [utils/getFakePk](utils/getFakePk.md)
|
|
38
|
-
- [utils/keepAliveTry](utils/keepAliveTry.md)
|
|
39
|
-
- [utils/keyDiff](utils/keyDiff.md)
|
|
40
|
-
- [utils/loadingCombine](utils/loadingCombine.md)
|
|
41
|
-
- [utils/proxyRunning](utils/proxyRunning.md)
|
|
42
|
-
- [utils/relatedCalculatedHelpers](utils/relatedCalculatedHelpers.md)
|
|
43
|
-
- [utils/set](utils/set.md)
|
|
44
|
-
- [utils/transformWalk](utils/transformWalk.md)
|
|
45
|
-
- [utils/watches](utils/watches.md)
|