@fctc/widget-logic 2.5.1 → 2.5.3
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/hooks.d.mts +220 -3
- package/dist/hooks.d.ts +220 -3
- package/dist/hooks.js +3 -6
- package/dist/hooks.mjs +3 -6
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +70 -44
- package/dist/index.mjs +85 -55
- package/dist/widget.d.mts +1 -3
- package/dist/widget.d.ts +1 -3
- package/dist/widget.js +67 -190
- package/dist/widget.mjs +82 -201
- package/package.json +1 -1
- package/dist/use-view-v2-BWHqxo3S.d.mts +0 -222
- package/dist/use-view-v2-BWHqxo3S.d.ts +0 -222
package/dist/hooks.d.mts
CHANGED
|
@@ -1,11 +1,43 @@
|
|
|
1
1
|
export { useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp } from '@fctc/interface-logic/hooks';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { A as ActionResultType, c as useViewV2Type, V as ViewResponse } from './use-view-v2-BWHqxo3S.mjs';
|
|
4
|
-
export { u as useCallAction, a as useCallActionType, b as useViewV2 } from './use-view-v2-BWHqxo3S.mjs';
|
|
5
3
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
6
4
|
import * as react from 'react';
|
|
7
5
|
import react__default, { RefObject } from 'react';
|
|
8
6
|
|
|
7
|
+
declare const useCallAction: () => readonly [ActionResult | undefined, ({ aid, }: {
|
|
8
|
+
aid: number;
|
|
9
|
+
actionType?: string;
|
|
10
|
+
}) => Promise<ActionResult | undefined>];
|
|
11
|
+
type useCallActionType = ReturnType<typeof useCallAction>;
|
|
12
|
+
type ActionResultType = useCallActionType[0];
|
|
13
|
+
interface ActionResult {
|
|
14
|
+
id?: number;
|
|
15
|
+
name?: string;
|
|
16
|
+
type?: 'ir.actions.act_window' | string;
|
|
17
|
+
xml_id?: string;
|
|
18
|
+
path?: false | string;
|
|
19
|
+
help?: string;
|
|
20
|
+
binding_model_id?: false | number;
|
|
21
|
+
binding_type?: 'action' | string;
|
|
22
|
+
binding_view_types?: string;
|
|
23
|
+
display_name?: string;
|
|
24
|
+
view_id?: false | number;
|
|
25
|
+
domain?: false | any[];
|
|
26
|
+
context?: string;
|
|
27
|
+
res_id?: number;
|
|
28
|
+
res_model?: string;
|
|
29
|
+
target?: 'current' | 'new' | string;
|
|
30
|
+
view_mode?: string;
|
|
31
|
+
mobile_view_mode?: string;
|
|
32
|
+
views?: [number, string][];
|
|
33
|
+
limit?: number;
|
|
34
|
+
groups_id?: number[];
|
|
35
|
+
search_view_id?: [number, string];
|
|
36
|
+
embedded_action_ids?: number[];
|
|
37
|
+
filter?: false | any;
|
|
38
|
+
url?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
9
41
|
declare const useMenu: ({ context, specification, }: {
|
|
10
42
|
context?: any;
|
|
11
43
|
specification?: any;
|
|
@@ -57,6 +89,191 @@ interface UseMenuReturn {
|
|
|
57
89
|
declare const useUser: () => any;
|
|
58
90
|
type useUserType = ReturnType<typeof useUser>;
|
|
59
91
|
|
|
92
|
+
declare const useViewV2: ({ action, context, aid, views, model, }: {
|
|
93
|
+
action?: ActionResultType;
|
|
94
|
+
context: any;
|
|
95
|
+
aid?: any;
|
|
96
|
+
views?: any;
|
|
97
|
+
model?: string;
|
|
98
|
+
}) => {
|
|
99
|
+
context: any;
|
|
100
|
+
data: ViewResponse;
|
|
101
|
+
error: Error;
|
|
102
|
+
isError: true;
|
|
103
|
+
isPending: false;
|
|
104
|
+
isLoading: false;
|
|
105
|
+
isLoadingError: false;
|
|
106
|
+
isRefetchError: true;
|
|
107
|
+
isSuccess: false;
|
|
108
|
+
isPlaceholderData: false;
|
|
109
|
+
status: "error";
|
|
110
|
+
dataUpdatedAt: number;
|
|
111
|
+
errorUpdatedAt: number;
|
|
112
|
+
failureCount: number;
|
|
113
|
+
failureReason: Error | null;
|
|
114
|
+
errorUpdateCount: number;
|
|
115
|
+
isFetched: boolean;
|
|
116
|
+
isFetchedAfterMount: boolean;
|
|
117
|
+
isFetching: boolean;
|
|
118
|
+
isInitialLoading: boolean;
|
|
119
|
+
isPaused: boolean;
|
|
120
|
+
isRefetching: boolean;
|
|
121
|
+
isStale: boolean;
|
|
122
|
+
isEnabled: boolean;
|
|
123
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
124
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
125
|
+
promise: Promise<ViewResponse>;
|
|
126
|
+
} | {
|
|
127
|
+
context: any;
|
|
128
|
+
data: ViewResponse;
|
|
129
|
+
error: null;
|
|
130
|
+
isError: false;
|
|
131
|
+
isPending: false;
|
|
132
|
+
isLoading: false;
|
|
133
|
+
isLoadingError: false;
|
|
134
|
+
isRefetchError: false;
|
|
135
|
+
isSuccess: true;
|
|
136
|
+
isPlaceholderData: false;
|
|
137
|
+
status: "success";
|
|
138
|
+
dataUpdatedAt: number;
|
|
139
|
+
errorUpdatedAt: number;
|
|
140
|
+
failureCount: number;
|
|
141
|
+
failureReason: Error | null;
|
|
142
|
+
errorUpdateCount: number;
|
|
143
|
+
isFetched: boolean;
|
|
144
|
+
isFetchedAfterMount: boolean;
|
|
145
|
+
isFetching: boolean;
|
|
146
|
+
isInitialLoading: boolean;
|
|
147
|
+
isPaused: boolean;
|
|
148
|
+
isRefetching: boolean;
|
|
149
|
+
isStale: boolean;
|
|
150
|
+
isEnabled: boolean;
|
|
151
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
152
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
153
|
+
promise: Promise<ViewResponse>;
|
|
154
|
+
} | {
|
|
155
|
+
context: any;
|
|
156
|
+
data: undefined;
|
|
157
|
+
error: Error;
|
|
158
|
+
isError: true;
|
|
159
|
+
isPending: false;
|
|
160
|
+
isLoading: false;
|
|
161
|
+
isLoadingError: true;
|
|
162
|
+
isRefetchError: false;
|
|
163
|
+
isSuccess: false;
|
|
164
|
+
isPlaceholderData: false;
|
|
165
|
+
status: "error";
|
|
166
|
+
dataUpdatedAt: number;
|
|
167
|
+
errorUpdatedAt: number;
|
|
168
|
+
failureCount: number;
|
|
169
|
+
failureReason: Error | null;
|
|
170
|
+
errorUpdateCount: number;
|
|
171
|
+
isFetched: boolean;
|
|
172
|
+
isFetchedAfterMount: boolean;
|
|
173
|
+
isFetching: boolean;
|
|
174
|
+
isInitialLoading: boolean;
|
|
175
|
+
isPaused: boolean;
|
|
176
|
+
isRefetching: boolean;
|
|
177
|
+
isStale: boolean;
|
|
178
|
+
isEnabled: boolean;
|
|
179
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
180
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
181
|
+
promise: Promise<ViewResponse>;
|
|
182
|
+
} | {
|
|
183
|
+
context: any;
|
|
184
|
+
data: undefined;
|
|
185
|
+
error: null;
|
|
186
|
+
isError: false;
|
|
187
|
+
isPending: true;
|
|
188
|
+
isLoading: true;
|
|
189
|
+
isLoadingError: false;
|
|
190
|
+
isRefetchError: false;
|
|
191
|
+
isSuccess: false;
|
|
192
|
+
isPlaceholderData: false;
|
|
193
|
+
status: "pending";
|
|
194
|
+
dataUpdatedAt: number;
|
|
195
|
+
errorUpdatedAt: number;
|
|
196
|
+
failureCount: number;
|
|
197
|
+
failureReason: Error | null;
|
|
198
|
+
errorUpdateCount: number;
|
|
199
|
+
isFetched: boolean;
|
|
200
|
+
isFetchedAfterMount: boolean;
|
|
201
|
+
isFetching: boolean;
|
|
202
|
+
isInitialLoading: boolean;
|
|
203
|
+
isPaused: boolean;
|
|
204
|
+
isRefetching: boolean;
|
|
205
|
+
isStale: boolean;
|
|
206
|
+
isEnabled: boolean;
|
|
207
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
208
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
209
|
+
promise: Promise<ViewResponse>;
|
|
210
|
+
} | {
|
|
211
|
+
context: any;
|
|
212
|
+
data: undefined;
|
|
213
|
+
error: null;
|
|
214
|
+
isError: false;
|
|
215
|
+
isPending: true;
|
|
216
|
+
isLoadingError: false;
|
|
217
|
+
isRefetchError: false;
|
|
218
|
+
isSuccess: false;
|
|
219
|
+
isPlaceholderData: false;
|
|
220
|
+
status: "pending";
|
|
221
|
+
dataUpdatedAt: number;
|
|
222
|
+
errorUpdatedAt: number;
|
|
223
|
+
failureCount: number;
|
|
224
|
+
failureReason: Error | null;
|
|
225
|
+
errorUpdateCount: number;
|
|
226
|
+
isFetched: boolean;
|
|
227
|
+
isFetchedAfterMount: boolean;
|
|
228
|
+
isFetching: boolean;
|
|
229
|
+
isLoading: boolean;
|
|
230
|
+
isInitialLoading: boolean;
|
|
231
|
+
isPaused: boolean;
|
|
232
|
+
isRefetching: boolean;
|
|
233
|
+
isStale: boolean;
|
|
234
|
+
isEnabled: boolean;
|
|
235
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
236
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
237
|
+
promise: Promise<ViewResponse>;
|
|
238
|
+
} | {
|
|
239
|
+
context: any;
|
|
240
|
+
data: ViewResponse;
|
|
241
|
+
isError: false;
|
|
242
|
+
error: null;
|
|
243
|
+
isPending: false;
|
|
244
|
+
isLoading: false;
|
|
245
|
+
isLoadingError: false;
|
|
246
|
+
isRefetchError: false;
|
|
247
|
+
isSuccess: true;
|
|
248
|
+
isPlaceholderData: true;
|
|
249
|
+
status: "success";
|
|
250
|
+
dataUpdatedAt: number;
|
|
251
|
+
errorUpdatedAt: number;
|
|
252
|
+
failureCount: number;
|
|
253
|
+
failureReason: Error | null;
|
|
254
|
+
errorUpdateCount: number;
|
|
255
|
+
isFetched: boolean;
|
|
256
|
+
isFetchedAfterMount: boolean;
|
|
257
|
+
isFetching: boolean;
|
|
258
|
+
isInitialLoading: boolean;
|
|
259
|
+
isPaused: boolean;
|
|
260
|
+
isRefetching: boolean;
|
|
261
|
+
isStale: boolean;
|
|
262
|
+
isEnabled: boolean;
|
|
263
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
264
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
265
|
+
promise: Promise<ViewResponse>;
|
|
266
|
+
};
|
|
267
|
+
type useViewV2Type = ReturnType<typeof useViewV2>;
|
|
268
|
+
type ViewResponse = {
|
|
269
|
+
models: {
|
|
270
|
+
[key: string]: any;
|
|
271
|
+
};
|
|
272
|
+
views: {
|
|
273
|
+
[key: string]: any;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
60
277
|
declare const useCompany: () => {
|
|
61
278
|
currentCompany: {
|
|
62
279
|
data: CurrentCompany | undefined;
|
|
@@ -979,4 +1196,4 @@ declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement
|
|
|
979
1196
|
refresh: () => void;
|
|
980
1197
|
};
|
|
981
1198
|
|
|
982
|
-
export { ActionResultType, AppProvider, type CompanyTuple, type ContextProfile, type CurrentCompany, type RecordMenu, type UseMenuReturn, ViewResponse, useAppProvider, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, type useListDataType, useMenu, type useMenuType, useProfile, useUser, type useUserType, useViewV2Type };
|
|
1199
|
+
export { type ActionResultType, AppProvider, type CompanyTuple, type ContextProfile, type CurrentCompany, type RecordMenu, type UseMenuReturn, type ViewResponse, useAppProvider, useCallAction, type useCallActionType, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, type useListDataType, useMenu, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,11 +1,43 @@
|
|
|
1
1
|
export { useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp } from '@fctc/interface-logic/hooks';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { A as ActionResultType, c as useViewV2Type, V as ViewResponse } from './use-view-v2-BWHqxo3S.js';
|
|
4
|
-
export { u as useCallAction, a as useCallActionType, b as useViewV2 } from './use-view-v2-BWHqxo3S.js';
|
|
5
3
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
6
4
|
import * as react from 'react';
|
|
7
5
|
import react__default, { RefObject } from 'react';
|
|
8
6
|
|
|
7
|
+
declare const useCallAction: () => readonly [ActionResult | undefined, ({ aid, }: {
|
|
8
|
+
aid: number;
|
|
9
|
+
actionType?: string;
|
|
10
|
+
}) => Promise<ActionResult | undefined>];
|
|
11
|
+
type useCallActionType = ReturnType<typeof useCallAction>;
|
|
12
|
+
type ActionResultType = useCallActionType[0];
|
|
13
|
+
interface ActionResult {
|
|
14
|
+
id?: number;
|
|
15
|
+
name?: string;
|
|
16
|
+
type?: 'ir.actions.act_window' | string;
|
|
17
|
+
xml_id?: string;
|
|
18
|
+
path?: false | string;
|
|
19
|
+
help?: string;
|
|
20
|
+
binding_model_id?: false | number;
|
|
21
|
+
binding_type?: 'action' | string;
|
|
22
|
+
binding_view_types?: string;
|
|
23
|
+
display_name?: string;
|
|
24
|
+
view_id?: false | number;
|
|
25
|
+
domain?: false | any[];
|
|
26
|
+
context?: string;
|
|
27
|
+
res_id?: number;
|
|
28
|
+
res_model?: string;
|
|
29
|
+
target?: 'current' | 'new' | string;
|
|
30
|
+
view_mode?: string;
|
|
31
|
+
mobile_view_mode?: string;
|
|
32
|
+
views?: [number, string][];
|
|
33
|
+
limit?: number;
|
|
34
|
+
groups_id?: number[];
|
|
35
|
+
search_view_id?: [number, string];
|
|
36
|
+
embedded_action_ids?: number[];
|
|
37
|
+
filter?: false | any;
|
|
38
|
+
url?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
9
41
|
declare const useMenu: ({ context, specification, }: {
|
|
10
42
|
context?: any;
|
|
11
43
|
specification?: any;
|
|
@@ -57,6 +89,191 @@ interface UseMenuReturn {
|
|
|
57
89
|
declare const useUser: () => any;
|
|
58
90
|
type useUserType = ReturnType<typeof useUser>;
|
|
59
91
|
|
|
92
|
+
declare const useViewV2: ({ action, context, aid, views, model, }: {
|
|
93
|
+
action?: ActionResultType;
|
|
94
|
+
context: any;
|
|
95
|
+
aid?: any;
|
|
96
|
+
views?: any;
|
|
97
|
+
model?: string;
|
|
98
|
+
}) => {
|
|
99
|
+
context: any;
|
|
100
|
+
data: ViewResponse;
|
|
101
|
+
error: Error;
|
|
102
|
+
isError: true;
|
|
103
|
+
isPending: false;
|
|
104
|
+
isLoading: false;
|
|
105
|
+
isLoadingError: false;
|
|
106
|
+
isRefetchError: true;
|
|
107
|
+
isSuccess: false;
|
|
108
|
+
isPlaceholderData: false;
|
|
109
|
+
status: "error";
|
|
110
|
+
dataUpdatedAt: number;
|
|
111
|
+
errorUpdatedAt: number;
|
|
112
|
+
failureCount: number;
|
|
113
|
+
failureReason: Error | null;
|
|
114
|
+
errorUpdateCount: number;
|
|
115
|
+
isFetched: boolean;
|
|
116
|
+
isFetchedAfterMount: boolean;
|
|
117
|
+
isFetching: boolean;
|
|
118
|
+
isInitialLoading: boolean;
|
|
119
|
+
isPaused: boolean;
|
|
120
|
+
isRefetching: boolean;
|
|
121
|
+
isStale: boolean;
|
|
122
|
+
isEnabled: boolean;
|
|
123
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
124
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
125
|
+
promise: Promise<ViewResponse>;
|
|
126
|
+
} | {
|
|
127
|
+
context: any;
|
|
128
|
+
data: ViewResponse;
|
|
129
|
+
error: null;
|
|
130
|
+
isError: false;
|
|
131
|
+
isPending: false;
|
|
132
|
+
isLoading: false;
|
|
133
|
+
isLoadingError: false;
|
|
134
|
+
isRefetchError: false;
|
|
135
|
+
isSuccess: true;
|
|
136
|
+
isPlaceholderData: false;
|
|
137
|
+
status: "success";
|
|
138
|
+
dataUpdatedAt: number;
|
|
139
|
+
errorUpdatedAt: number;
|
|
140
|
+
failureCount: number;
|
|
141
|
+
failureReason: Error | null;
|
|
142
|
+
errorUpdateCount: number;
|
|
143
|
+
isFetched: boolean;
|
|
144
|
+
isFetchedAfterMount: boolean;
|
|
145
|
+
isFetching: boolean;
|
|
146
|
+
isInitialLoading: boolean;
|
|
147
|
+
isPaused: boolean;
|
|
148
|
+
isRefetching: boolean;
|
|
149
|
+
isStale: boolean;
|
|
150
|
+
isEnabled: boolean;
|
|
151
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
152
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
153
|
+
promise: Promise<ViewResponse>;
|
|
154
|
+
} | {
|
|
155
|
+
context: any;
|
|
156
|
+
data: undefined;
|
|
157
|
+
error: Error;
|
|
158
|
+
isError: true;
|
|
159
|
+
isPending: false;
|
|
160
|
+
isLoading: false;
|
|
161
|
+
isLoadingError: true;
|
|
162
|
+
isRefetchError: false;
|
|
163
|
+
isSuccess: false;
|
|
164
|
+
isPlaceholderData: false;
|
|
165
|
+
status: "error";
|
|
166
|
+
dataUpdatedAt: number;
|
|
167
|
+
errorUpdatedAt: number;
|
|
168
|
+
failureCount: number;
|
|
169
|
+
failureReason: Error | null;
|
|
170
|
+
errorUpdateCount: number;
|
|
171
|
+
isFetched: boolean;
|
|
172
|
+
isFetchedAfterMount: boolean;
|
|
173
|
+
isFetching: boolean;
|
|
174
|
+
isInitialLoading: boolean;
|
|
175
|
+
isPaused: boolean;
|
|
176
|
+
isRefetching: boolean;
|
|
177
|
+
isStale: boolean;
|
|
178
|
+
isEnabled: boolean;
|
|
179
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
180
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
181
|
+
promise: Promise<ViewResponse>;
|
|
182
|
+
} | {
|
|
183
|
+
context: any;
|
|
184
|
+
data: undefined;
|
|
185
|
+
error: null;
|
|
186
|
+
isError: false;
|
|
187
|
+
isPending: true;
|
|
188
|
+
isLoading: true;
|
|
189
|
+
isLoadingError: false;
|
|
190
|
+
isRefetchError: false;
|
|
191
|
+
isSuccess: false;
|
|
192
|
+
isPlaceholderData: false;
|
|
193
|
+
status: "pending";
|
|
194
|
+
dataUpdatedAt: number;
|
|
195
|
+
errorUpdatedAt: number;
|
|
196
|
+
failureCount: number;
|
|
197
|
+
failureReason: Error | null;
|
|
198
|
+
errorUpdateCount: number;
|
|
199
|
+
isFetched: boolean;
|
|
200
|
+
isFetchedAfterMount: boolean;
|
|
201
|
+
isFetching: boolean;
|
|
202
|
+
isInitialLoading: boolean;
|
|
203
|
+
isPaused: boolean;
|
|
204
|
+
isRefetching: boolean;
|
|
205
|
+
isStale: boolean;
|
|
206
|
+
isEnabled: boolean;
|
|
207
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
208
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
209
|
+
promise: Promise<ViewResponse>;
|
|
210
|
+
} | {
|
|
211
|
+
context: any;
|
|
212
|
+
data: undefined;
|
|
213
|
+
error: null;
|
|
214
|
+
isError: false;
|
|
215
|
+
isPending: true;
|
|
216
|
+
isLoadingError: false;
|
|
217
|
+
isRefetchError: false;
|
|
218
|
+
isSuccess: false;
|
|
219
|
+
isPlaceholderData: false;
|
|
220
|
+
status: "pending";
|
|
221
|
+
dataUpdatedAt: number;
|
|
222
|
+
errorUpdatedAt: number;
|
|
223
|
+
failureCount: number;
|
|
224
|
+
failureReason: Error | null;
|
|
225
|
+
errorUpdateCount: number;
|
|
226
|
+
isFetched: boolean;
|
|
227
|
+
isFetchedAfterMount: boolean;
|
|
228
|
+
isFetching: boolean;
|
|
229
|
+
isLoading: boolean;
|
|
230
|
+
isInitialLoading: boolean;
|
|
231
|
+
isPaused: boolean;
|
|
232
|
+
isRefetching: boolean;
|
|
233
|
+
isStale: boolean;
|
|
234
|
+
isEnabled: boolean;
|
|
235
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
236
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
237
|
+
promise: Promise<ViewResponse>;
|
|
238
|
+
} | {
|
|
239
|
+
context: any;
|
|
240
|
+
data: ViewResponse;
|
|
241
|
+
isError: false;
|
|
242
|
+
error: null;
|
|
243
|
+
isPending: false;
|
|
244
|
+
isLoading: false;
|
|
245
|
+
isLoadingError: false;
|
|
246
|
+
isRefetchError: false;
|
|
247
|
+
isSuccess: true;
|
|
248
|
+
isPlaceholderData: true;
|
|
249
|
+
status: "success";
|
|
250
|
+
dataUpdatedAt: number;
|
|
251
|
+
errorUpdatedAt: number;
|
|
252
|
+
failureCount: number;
|
|
253
|
+
failureReason: Error | null;
|
|
254
|
+
errorUpdateCount: number;
|
|
255
|
+
isFetched: boolean;
|
|
256
|
+
isFetchedAfterMount: boolean;
|
|
257
|
+
isFetching: boolean;
|
|
258
|
+
isInitialLoading: boolean;
|
|
259
|
+
isPaused: boolean;
|
|
260
|
+
isRefetching: boolean;
|
|
261
|
+
isStale: boolean;
|
|
262
|
+
isEnabled: boolean;
|
|
263
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
|
|
264
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
265
|
+
promise: Promise<ViewResponse>;
|
|
266
|
+
};
|
|
267
|
+
type useViewV2Type = ReturnType<typeof useViewV2>;
|
|
268
|
+
type ViewResponse = {
|
|
269
|
+
models: {
|
|
270
|
+
[key: string]: any;
|
|
271
|
+
};
|
|
272
|
+
views: {
|
|
273
|
+
[key: string]: any;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
60
277
|
declare const useCompany: () => {
|
|
61
278
|
currentCompany: {
|
|
62
279
|
data: CurrentCompany | undefined;
|
|
@@ -979,4 +1196,4 @@ declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement
|
|
|
979
1196
|
refresh: () => void;
|
|
980
1197
|
};
|
|
981
1198
|
|
|
982
|
-
export { ActionResultType, AppProvider, type CompanyTuple, type ContextProfile, type CurrentCompany, type RecordMenu, type UseMenuReturn, ViewResponse, useAppProvider, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, type useListDataType, useMenu, type useMenuType, useProfile, useUser, type useUserType, useViewV2Type };
|
|
1199
|
+
export { type ActionResultType, AppProvider, type CompanyTuple, type ContextProfile, type CurrentCompany, type RecordMenu, type UseMenuReturn, type ViewResponse, useAppProvider, useCallAction, type useCallActionType, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, type useListDataType, useMenu, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
|
package/dist/hooks.js
CHANGED
|
@@ -485,19 +485,16 @@ var useViewV2 = ({
|
|
|
485
485
|
}) => {
|
|
486
486
|
const { useGetView: useGetView2 } = (0, provider_exports.useService)();
|
|
487
487
|
const viewParams = (0, import_react6.useMemo)(() => {
|
|
488
|
-
if (!action) {
|
|
489
|
-
return void 0;
|
|
490
|
-
}
|
|
491
488
|
return {
|
|
492
489
|
model,
|
|
493
490
|
views,
|
|
494
491
|
context,
|
|
495
492
|
id: isNaN(Number(aid)) ? action?.id : aid
|
|
496
493
|
};
|
|
497
|
-
}, [action, context, aid]);
|
|
494
|
+
}, [action, context, aid, model, views]);
|
|
498
495
|
const view = useGetView2(
|
|
499
|
-
viewParams
|
|
500
|
-
!!
|
|
496
|
+
viewParams,
|
|
497
|
+
!!model
|
|
501
498
|
);
|
|
502
499
|
return {
|
|
503
500
|
...view,
|
package/dist/hooks.mjs
CHANGED
|
@@ -466,19 +466,16 @@ var useViewV2 = ({
|
|
|
466
466
|
}) => {
|
|
467
467
|
const { useGetView: useGetView2 } = (0, provider_exports.useService)();
|
|
468
468
|
const viewParams = useMemo3(() => {
|
|
469
|
-
if (!action) {
|
|
470
|
-
return void 0;
|
|
471
|
-
}
|
|
472
469
|
return {
|
|
473
470
|
model,
|
|
474
471
|
views,
|
|
475
472
|
context,
|
|
476
473
|
id: isNaN(Number(aid)) ? action?.id : aid
|
|
477
474
|
};
|
|
478
|
-
}, [action, context, aid]);
|
|
475
|
+
}, [action, context, aid, model, views]);
|
|
479
476
|
const view = useGetView2(
|
|
480
|
-
viewParams
|
|
481
|
-
!!
|
|
477
|
+
viewParams,
|
|
478
|
+
!!model
|
|
482
479
|
);
|
|
483
480
|
return {
|
|
484
481
|
...view,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp } from '@fctc/interface-logic/hooks';
|
|
2
|
-
export { AppProvider, CompanyTuple, ContextProfile, CurrentCompany, RecordMenu, UseMenuReturn, useAppProvider, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType } from './hooks.mjs';
|
|
3
|
-
export { A as ActionResultType, V as ViewResponse, u as useCallAction, a as useCallActionType, b as useViewV2, c as useViewV2Type } from './use-view-v2-BWHqxo3S.mjs';
|
|
2
|
+
export { ActionResultType, AppProvider, CompanyTuple, ContextProfile, CurrentCompany, RecordMenu, UseMenuReturn, ViewResponse, useAppProvider, useCallAction, useCallActionType, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
|
|
4
3
|
export * from '@fctc/interface-logic/configs';
|
|
5
4
|
export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.mjs';
|
|
6
5
|
export { ISelctionStateProps, ITableHeadProps, ITableProps, binaryFieldController, colorFieldController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, searchController, statusDropdownController, tableController, tableGroupController, tableHeadController } from './widget.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp } from '@fctc/interface-logic/hooks';
|
|
2
|
-
export { AppProvider, CompanyTuple, ContextProfile, CurrentCompany, RecordMenu, UseMenuReturn, useAppProvider, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType } from './hooks.js';
|
|
3
|
-
export { A as ActionResultType, V as ViewResponse, u as useCallAction, a as useCallActionType, b as useViewV2, c as useViewV2Type } from './use-view-v2-BWHqxo3S.js';
|
|
2
|
+
export { ActionResultType, AppProvider, CompanyTuple, ContextProfile, CurrentCompany, RecordMenu, UseMenuReturn, ViewResponse, useAppProvider, useCallAction, useCallActionType, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetAction, useGetRowIds, useGetSpecification, useListData, useListDataType, useMenu, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
|
|
4
3
|
export * from '@fctc/interface-logic/configs';
|
|
5
4
|
export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.js';
|
|
6
5
|
export { ISelctionStateProps, ITableHeadProps, ITableProps, binaryFieldController, colorFieldController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, searchController, statusDropdownController, tableController, tableGroupController, tableHeadController } from './widget.js';
|