@arcote.tech/arc-react 0.1.6 → 0.1.8
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/index.js +4 -4
- package/dist/reactModel.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -376,7 +376,7 @@ var reactModel = (arcContext, options) => {
|
|
|
376
376
|
if (unsubscribeRef.current) {
|
|
377
377
|
unsubscribeRef.current();
|
|
378
378
|
}
|
|
379
|
-
const defaultAuthContext = { userId: "react-user"
|
|
379
|
+
const defaultAuthContext = { userId: "react-user" };
|
|
380
380
|
const { unsubscribe, result: result2 } = model.subscribe(queryBuilderFn, (newResult) => {
|
|
381
381
|
setResult(newResult);
|
|
382
382
|
setLoading(false);
|
|
@@ -411,7 +411,7 @@ var reactModel = (arcContext, options) => {
|
|
|
411
411
|
if (!model) {
|
|
412
412
|
throw new Error("useCommands must be used within a ModelProvider");
|
|
413
413
|
}
|
|
414
|
-
const defaultAuthContext = { userId: "react-user"
|
|
414
|
+
const defaultAuthContext = { userId: "react-user" };
|
|
415
415
|
return model.commands(defaultAuthContext);
|
|
416
416
|
},
|
|
417
417
|
async function query(queryBuilderFn, model) {
|
|
@@ -419,7 +419,7 @@ var reactModel = (arcContext, options) => {
|
|
|
419
419
|
model = masterModel;
|
|
420
420
|
if (!model)
|
|
421
421
|
throw new Error("Model not found");
|
|
422
|
-
const defaultAuthContext = { userId: "react-user"
|
|
422
|
+
const defaultAuthContext = { userId: "react-user" };
|
|
423
423
|
return model.query(queryBuilderFn, defaultAuthContext);
|
|
424
424
|
},
|
|
425
425
|
function useLocalModel() {
|
|
@@ -452,4 +452,4 @@ export {
|
|
|
452
452
|
Form
|
|
453
453
|
};
|
|
454
454
|
|
|
455
|
-
//# debugId=
|
|
455
|
+
//# debugId=5CF15300E5CC460C64756E2164756E21
|
package/dist/reactModel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model, type ArcContextAny, type IArcQueryBuilder, type ModelBase, type QueryBuilderFunctionResult, type QueryFactoryFunction, type UnaryFunction } from "@arcote.tech/arc";
|
|
2
|
-
import type { ArcContextElementMethodReturnType, SQLiteDatabase } from "@arcote.tech/arc";
|
|
2
|
+
import type { ArcContextElementMethodReturnType, objectUtil, SQLiteDatabase } from "@arcote.tech/arc";
|
|
3
3
|
export declare const reactModel: <C extends ArcContextAny>(arcContext: C, options: {
|
|
4
4
|
sqliteAdapter: SQLiteDatabase;
|
|
5
5
|
} | {
|
|
@@ -17,5 +17,5 @@ export declare const reactModel: <C extends ArcContextAny>(arcContext: C, option
|
|
|
17
17
|
catchErrorCallback: (error: any) => void;
|
|
18
18
|
}) => import("react/jsx-dev-runtime").JSX.Element | null, ({ children }: {
|
|
19
19
|
children: React.ReactNode;
|
|
20
|
-
}) => import("react/jsx-dev-runtime").JSX.Element, <Q extends IArcQueryBuilder>(queryBuilderFn: UnaryFunction<ReturnType<C["queryBuilder"]>, Q>, dependencies?: any[], cacheKey?: string) => [ReturnType<Q["toQuery"]>["lastResult"]
|
|
20
|
+
}) => import("react/jsx-dev-runtime").JSX.Element, <Q extends IArcQueryBuilder>(queryBuilderFn: UnaryFunction<ReturnType<C["queryBuilder"]>, Q>, dependencies?: any[], cacheKey?: string) => [objectUtil.simplify<ReturnType<Q["toQuery"]>["lastResult"]>, false] | [undefined, true], () => (cacheKey: string) => void, () => ArcContextElementMethodReturnType<C["elements"], "commandClient">, <QueryBuilderFn extends QueryFactoryFunction<C>>(queryBuilderFn: QueryBuilderFn, model?: ModelBase<C> | null) => Promise<QueryBuilderFunctionResult<QueryBuilderFn>>, () => Model<C> | null, (token: string) => ModelBase<C>];
|
|
21
21
|
//# sourceMappingURL=reactModel.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Przemysław Krasiński [arcote.tech]",
|
|
7
7
|
"description": "React client for the Arc framework, providing utilities for querying data and executing commands, enhancing the development of reactive and efficient user interfaces.",
|