@fctc/widget-logic 2.4.9 → 2.5.0
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 +3 -220
- package/dist/hooks.d.ts +3 -220
- package/dist/hooks.js +5 -1
- package/dist/hooks.mjs +5 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +43 -69
- package/dist/index.mjs +54 -84
- package/dist/use-view-v2-BWHqxo3S.d.mts +222 -0
- package/dist/use-view-v2-BWHqxo3S.d.ts +222 -0
- package/dist/widget.d.mts +3 -1
- package/dist/widget.d.ts +3 -1
- package/dist/widget.js +190 -68
- package/dist/widget.mjs +201 -83
- package/package.json +96 -96
package/dist/hooks.d.mts
CHANGED
|
@@ -1,43 +1,11 @@
|
|
|
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';
|
|
3
5
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
4
6
|
import * as react from 'react';
|
|
5
7
|
import react__default, { RefObject } from 'react';
|
|
6
8
|
|
|
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
|
-
|
|
41
9
|
declare const useMenu: ({ context, specification, }: {
|
|
42
10
|
context?: any;
|
|
43
11
|
specification?: any;
|
|
@@ -89,191 +57,6 @@ interface UseMenuReturn {
|
|
|
89
57
|
declare const useUser: () => any;
|
|
90
58
|
type useUserType = ReturnType<typeof useUser>;
|
|
91
59
|
|
|
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
|
-
|
|
277
60
|
declare const useCompany: () => {
|
|
278
61
|
currentCompany: {
|
|
279
62
|
data: CurrentCompany | undefined;
|
|
@@ -1196,4 +979,4 @@ declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement
|
|
|
1196
979
|
refresh: () => void;
|
|
1197
980
|
};
|
|
1198
981
|
|
|
1199
|
-
export {
|
|
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 };
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,43 +1,11 @@
|
|
|
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';
|
|
3
5
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
4
6
|
import * as react from 'react';
|
|
5
7
|
import react__default, { RefObject } from 'react';
|
|
6
8
|
|
|
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
|
-
|
|
41
9
|
declare const useMenu: ({ context, specification, }: {
|
|
42
10
|
context?: any;
|
|
43
11
|
specification?: any;
|
|
@@ -89,191 +57,6 @@ interface UseMenuReturn {
|
|
|
89
57
|
declare const useUser: () => any;
|
|
90
58
|
type useUserType = ReturnType<typeof useUser>;
|
|
91
59
|
|
|
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
|
-
|
|
277
60
|
declare const useCompany: () => {
|
|
278
61
|
currentCompany: {
|
|
279
62
|
data: CurrentCompany | undefined;
|
|
@@ -1196,4 +979,4 @@ declare const useGetRowIds: (tableRef: react__default.RefObject<HTMLTableElement
|
|
|
1196
979
|
refresh: () => void;
|
|
1197
980
|
};
|
|
1198
981
|
|
|
1199
|
-
export {
|
|
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 };
|
package/dist/hooks.js
CHANGED
|
@@ -170,7 +170,11 @@ var useMenu = ({
|
|
|
170
170
|
const { env } = (0, provider_exports.useEnv)();
|
|
171
171
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
172
172
|
const [action, callAction] = useCallAction();
|
|
173
|
-
const menuData = useGetMenu2(
|
|
173
|
+
const menuData = useGetMenu2(
|
|
174
|
+
context,
|
|
175
|
+
specification,
|
|
176
|
+
!!context && Object.keys(context).length > 0
|
|
177
|
+
);
|
|
174
178
|
const [menuId, setMenuId] = (0, import_react2.useState)(void 0);
|
|
175
179
|
const configedIconData = (0, import_react2.useMemo)(() => {
|
|
176
180
|
const data = menuData.data;
|
package/dist/hooks.mjs
CHANGED
|
@@ -150,7 +150,11 @@ var useMenu = ({
|
|
|
150
150
|
const { env } = (0, provider_exports.useEnv)();
|
|
151
151
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
152
152
|
const [action, callAction] = useCallAction();
|
|
153
|
-
const menuData = useGetMenu2(
|
|
153
|
+
const menuData = useGetMenu2(
|
|
154
|
+
context,
|
|
155
|
+
specification,
|
|
156
|
+
!!context && Object.keys(context).length > 0
|
|
157
|
+
);
|
|
154
158
|
const [menuId, setMenuId] = useState2(void 0);
|
|
155
159
|
const configedIconData = useMemo(() => {
|
|
156
160
|
const data = menuData.data;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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 {
|
|
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';
|
|
3
4
|
export * from '@fctc/interface-logic/configs';
|
|
4
5
|
export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.mjs';
|
|
5
6
|
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,5 +1,6 @@
|
|
|
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 {
|
|
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';
|
|
3
4
|
export * from '@fctc/interface-logic/configs';
|
|
4
5
|
export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.js';
|
|
5
6
|
export { ISelctionStateProps, ITableHeadProps, ITableProps, binaryFieldController, colorFieldController, copyLinkButtonController, dateFieldController, downLoadBinaryController, downloadFileController, durationController, many2manyFieldController, many2manyTagsController, many2oneButtonController, many2oneFieldController, priorityFieldController, searchController, statusDropdownController, tableController, tableGroupController, tableHeadController } from './widget.js';
|