aq-fe-framework 0.1.911 → 0.1.912
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/{chunk-676KCV4P.mjs → chunk-ETPFA63U.mjs} +1 -1
- package/dist/{chunk-PNMAEZJM.mjs → chunk-W4J5WIHB.mjs} +13 -2
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.mjs +2 -2
- package/dist/hooks/index.d.mts +2 -0
- package/dist/hooks/index.mjs +1 -1
- package/dist/modules-features/index.mjs +2 -2
- package/dist/shared/index.mjs +6 -6
- package/package.json +1 -1
|
@@ -343,6 +343,7 @@ function useMyReactQuery({
|
|
|
343
343
|
isPrototype
|
|
344
344
|
}) {
|
|
345
345
|
const [dataCount, setDataCount] = useState2(0);
|
|
346
|
+
const [rawData, setRawData] = useState2(null);
|
|
346
347
|
const queryResult = useQuery2(__spreadValues({
|
|
347
348
|
queryKey: queryKey != null ? queryKey : [],
|
|
348
349
|
enabled: !!queryKey,
|
|
@@ -350,6 +351,14 @@ function useMyReactQuery({
|
|
|
350
351
|
const useMock = isPrototype != null ? isPrototype : process.env.NEXT_PUBLIC_APP_PROTOTYPE === "1";
|
|
351
352
|
if (useMock) {
|
|
352
353
|
if (mockData !== void 0) {
|
|
354
|
+
const fakeResponse = {
|
|
355
|
+
isSuccess: 1,
|
|
356
|
+
message: "Mock success",
|
|
357
|
+
data: mockData,
|
|
358
|
+
dataCount: Array.isArray(mockData) ? mockData.length : 0
|
|
359
|
+
};
|
|
360
|
+
setRawData(fakeResponse);
|
|
361
|
+
setDataCount(fakeResponse.dataCount || 0);
|
|
353
362
|
return mockData;
|
|
354
363
|
}
|
|
355
364
|
throw new Error("Prototype mode is on but no mockData provided.");
|
|
@@ -361,13 +370,15 @@ function useMyReactQuery({
|
|
|
361
370
|
if (res.data.isSuccess === 0) {
|
|
362
371
|
throw new Error(res.data.message || "API returned isSuccess = 0");
|
|
363
372
|
}
|
|
373
|
+
setRawData(res.data);
|
|
364
374
|
setDataCount(res.data.dataCount || 0);
|
|
365
375
|
return res.data.data;
|
|
366
376
|
}
|
|
367
377
|
}, options));
|
|
368
378
|
return __spreadProps(__spreadValues({}, queryResult), {
|
|
369
|
-
dataCount
|
|
370
|
-
|
|
379
|
+
dataCount,
|
|
380
|
+
rawData
|
|
381
|
+
// expose raw API response
|
|
371
382
|
});
|
|
372
383
|
}
|
|
373
384
|
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
useHeaderMegaMenuStore,
|
|
71
71
|
useS_ButtonImport,
|
|
72
72
|
useStore_BasicAppShell
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-ETPFA63U.mjs";
|
|
74
74
|
import "../chunk-QWHUDAPC.mjs";
|
|
75
75
|
import "../chunk-ZDINCHBS.mjs";
|
|
76
76
|
import "../chunk-E4JVWPXS.mjs";
|
|
@@ -78,7 +78,7 @@ import "../chunk-O7YCQQO5.mjs";
|
|
|
78
78
|
import "../chunk-QSWIVDXC.mjs";
|
|
79
79
|
import "../chunk-SPG47QW7.mjs";
|
|
80
80
|
import "../chunk-K6S7R6LU.mjs";
|
|
81
|
-
import "../chunk-
|
|
81
|
+
import "../chunk-W4J5WIHB.mjs";
|
|
82
82
|
import "../chunk-WZ6PXGGC.mjs";
|
|
83
83
|
import "../chunk-7ZCOFATU.mjs";
|
|
84
84
|
import "../chunk-JD6AELXS.mjs";
|
package/dist/core/index.mjs
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
MyStatsCard,
|
|
31
31
|
MyTextInput2 as MyTextInput,
|
|
32
32
|
MyWeeklySessionSchedulerPicker
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-ETPFA63U.mjs";
|
|
34
34
|
import "../chunk-QWHUDAPC.mjs";
|
|
35
35
|
import "../chunk-ZDINCHBS.mjs";
|
|
36
36
|
import "../chunk-E4JVWPXS.mjs";
|
|
@@ -38,7 +38,7 @@ import "../chunk-O7YCQQO5.mjs";
|
|
|
38
38
|
import "../chunk-QSWIVDXC.mjs";
|
|
39
39
|
import "../chunk-SPG47QW7.mjs";
|
|
40
40
|
import "../chunk-K6S7R6LU.mjs";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-W4J5WIHB.mjs";
|
|
42
42
|
import "../chunk-WZ6PXGGC.mjs";
|
|
43
43
|
import "../chunk-7ZCOFATU.mjs";
|
|
44
44
|
import "../chunk-JD6AELXS.mjs";
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -94,6 +94,7 @@ declare function useConfig<T>({ configPath, key }: {
|
|
|
94
94
|
declare function useCrudService<T>(service: BaseApiType<T>, queryKey: QueryKey): {
|
|
95
95
|
query: _tanstack_react_query.UseQueryResult<T[], Error> & {
|
|
96
96
|
dataCount: number;
|
|
97
|
+
rawData: MyApiResponse<T[]> | null;
|
|
97
98
|
};
|
|
98
99
|
create: _tanstack_react_query.UseMutationResult<T, Error, T, unknown>;
|
|
99
100
|
update: _tanstack_react_query.UseMutationResult<T, Error, T, unknown>;
|
|
@@ -119,6 +120,7 @@ interface MyReactQueryProps<IRes, IBody, TData = IRes> {
|
|
|
119
120
|
}
|
|
120
121
|
declare function useMyReactQuery<IRes, IBody, TData = IRes>({ queryKey, axiosFn, options, mockData, isPrototype, }: MyReactQueryProps<IRes, IBody, TData>): UseQueryResult<TData, Error> & {
|
|
121
122
|
dataCount: number;
|
|
123
|
+
rawData: MyApiResponse<IRes> | null;
|
|
122
124
|
};
|
|
123
125
|
|
|
124
126
|
declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
MailTemplateDeleteButton,
|
|
114
114
|
useS_moduleConfig,
|
|
115
115
|
useStore_Authenticate
|
|
116
|
-
} from "../chunk-
|
|
116
|
+
} from "../chunk-ETPFA63U.mjs";
|
|
117
117
|
import "../chunk-QWHUDAPC.mjs";
|
|
118
118
|
import "../chunk-ZDINCHBS.mjs";
|
|
119
119
|
import "../chunk-E4JVWPXS.mjs";
|
|
@@ -121,7 +121,7 @@ import "../chunk-O7YCQQO5.mjs";
|
|
|
121
121
|
import "../chunk-QSWIVDXC.mjs";
|
|
122
122
|
import "../chunk-SPG47QW7.mjs";
|
|
123
123
|
import "../chunk-K6S7R6LU.mjs";
|
|
124
|
-
import "../chunk-
|
|
124
|
+
import "../chunk-W4J5WIHB.mjs";
|
|
125
125
|
import "../chunk-WZ6PXGGC.mjs";
|
|
126
126
|
import "../chunk-7ZCOFATU.mjs";
|
|
127
127
|
import "../chunk-JD6AELXS.mjs";
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
enumLabel_gender,
|
|
3
|
+
enum_gender
|
|
4
|
+
} from "../chunk-RGUQWALX.mjs";
|
|
1
5
|
import {
|
|
2
6
|
MySelect
|
|
3
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-ETPFA63U.mjs";
|
|
4
8
|
import "../chunk-QWHUDAPC.mjs";
|
|
5
9
|
import {
|
|
6
10
|
utils_converter
|
|
@@ -9,12 +13,8 @@ import "../chunk-E4JVWPXS.mjs";
|
|
|
9
13
|
import "../chunk-O7YCQQO5.mjs";
|
|
10
14
|
import "../chunk-QSWIVDXC.mjs";
|
|
11
15
|
import "../chunk-SPG47QW7.mjs";
|
|
12
|
-
import {
|
|
13
|
-
enumLabel_gender,
|
|
14
|
-
enum_gender
|
|
15
|
-
} from "../chunk-RGUQWALX.mjs";
|
|
16
16
|
import "../chunk-K6S7R6LU.mjs";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-W4J5WIHB.mjs";
|
|
18
18
|
import "../chunk-WZ6PXGGC.mjs";
|
|
19
19
|
import "../chunk-7ZCOFATU.mjs";
|
|
20
20
|
import {
|