@fctc/interface-logic 3.0.5 → 3.0.6

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 CHANGED
@@ -278,7 +278,7 @@ declare const useGetGroups: ({ model, width_context, }: {
278
278
 
279
279
  declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string, xNode?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
280
280
 
281
- declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
281
+ declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any, service?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
282
282
 
283
283
  declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
284
284
  id: number;
package/dist/hooks.d.ts CHANGED
@@ -278,7 +278,7 @@ declare const useGetGroups: ({ model, width_context, }: {
278
278
 
279
279
  declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string, xNode?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
280
280
 
281
- declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
281
+ declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any, service?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
282
282
 
283
283
  declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
284
284
  id: number;
package/dist/hooks.js CHANGED
@@ -4384,7 +4384,7 @@ function useViewService() {
4384
4384
  [env]
4385
4385
  );
4386
4386
  const getMenu = (0, import_react14.useCallback)(
4387
- async (context, specification, domain) => {
4387
+ async (context, specification, domain, service) => {
4388
4388
  const jsonData = {
4389
4389
  model: "ir.ui.menu" /* MENU */,
4390
4390
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4401,11 +4401,16 @@ function useViewService() {
4401
4401
  ]
4402
4402
  }
4403
4403
  };
4404
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4405
- headers: {
4406
- "Content-Type": "application/json"
4407
- }
4408
- });
4404
+ return env?.requests?.post(
4405
+ "/call" /* CALL_PATH */,
4406
+ jsonData,
4407
+ {
4408
+ headers: {
4409
+ "Content-Type": "application/json"
4410
+ }
4411
+ },
4412
+ service
4413
+ );
4409
4414
  },
4410
4415
  [env]
4411
4416
  );
@@ -6317,11 +6322,11 @@ var use_get_list_data_default = useGetListData;
6317
6322
 
6318
6323
  // src/hooks/view/use-get-menu.ts
6319
6324
  var import_react_query51 = require("@tanstack/react-query");
6320
- var useGetMenu = (context, specification, enabled, domain) => {
6325
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6321
6326
  const { getMenu } = useViewService();
6322
6327
  return (0, import_react_query51.useQuery)({
6323
6328
  queryKey: ["menus" /* MENU */, context],
6324
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6329
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6325
6330
  if (res && res?.records && res?.records?.length > 0) {
6326
6331
  return res?.records;
6327
6332
  }
package/dist/hooks.mjs CHANGED
@@ -4261,7 +4261,7 @@ function useViewService() {
4261
4261
  [env]
4262
4262
  );
4263
4263
  const getMenu = useCallback10(
4264
- async (context, specification, domain) => {
4264
+ async (context, specification, domain, service) => {
4265
4265
  const jsonData = {
4266
4266
  model: "ir.ui.menu" /* MENU */,
4267
4267
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4278,11 +4278,16 @@ function useViewService() {
4278
4278
  ]
4279
4279
  }
4280
4280
  };
4281
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4282
- headers: {
4283
- "Content-Type": "application/json"
4284
- }
4285
- });
4281
+ return env?.requests?.post(
4282
+ "/call" /* CALL_PATH */,
4283
+ jsonData,
4284
+ {
4285
+ headers: {
4286
+ "Content-Type": "application/json"
4287
+ }
4288
+ },
4289
+ service
4290
+ );
4286
4291
  },
4287
4292
  [env]
4288
4293
  );
@@ -6194,11 +6199,11 @@ var use_get_list_data_default = useGetListData;
6194
6199
 
6195
6200
  // src/hooks/view/use-get-menu.ts
6196
6201
  import { useQuery as useQuery15 } from "@tanstack/react-query";
6197
- var useGetMenu = (context, specification, enabled, domain) => {
6202
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6198
6203
  const { getMenu } = useViewService();
6199
6204
  return useQuery15({
6200
6205
  queryKey: ["menus" /* MENU */, context],
6201
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6206
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6202
6207
  if (res && res?.records && res?.records?.length > 0) {
6203
6208
  return res?.records;
6204
6209
  }
package/dist/provider.js CHANGED
@@ -4381,7 +4381,7 @@ function useViewService() {
4381
4381
  [env]
4382
4382
  );
4383
4383
  const getMenu = (0, import_react10.useCallback)(
4384
- async (context, specification, domain) => {
4384
+ async (context, specification, domain, service) => {
4385
4385
  const jsonData = {
4386
4386
  model: "ir.ui.menu" /* MENU */,
4387
4387
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4398,11 +4398,16 @@ function useViewService() {
4398
4398
  ]
4399
4399
  }
4400
4400
  };
4401
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4402
- headers: {
4403
- "Content-Type": "application/json"
4404
- }
4405
- });
4401
+ return env?.requests?.post(
4402
+ "/call" /* CALL_PATH */,
4403
+ jsonData,
4404
+ {
4405
+ headers: {
4406
+ "Content-Type": "application/json"
4407
+ }
4408
+ },
4409
+ service
4410
+ );
4406
4411
  },
4407
4412
  [env]
4408
4413
  );
@@ -6696,11 +6701,11 @@ var use_get_list_data_default = useGetListData;
6696
6701
 
6697
6702
  // src/hooks/view/use-get-menu.ts
6698
6703
  var import_react_query51 = require("@tanstack/react-query");
6699
- var useGetMenu = (context, specification, enabled, domain) => {
6704
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6700
6705
  const { getMenu } = useViewService();
6701
6706
  return (0, import_react_query51.useQuery)({
6702
6707
  queryKey: ["menus" /* MENU */, context],
6703
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6708
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6704
6709
  if (res && res?.records && res?.records?.length > 0) {
6705
6710
  return res?.records;
6706
6711
  }
package/dist/provider.mjs CHANGED
@@ -4338,7 +4338,7 @@ function useViewService() {
4338
4338
  [env]
4339
4339
  );
4340
4340
  const getMenu = useCallback9(
4341
- async (context, specification, domain) => {
4341
+ async (context, specification, domain, service) => {
4342
4342
  const jsonData = {
4343
4343
  model: "ir.ui.menu" /* MENU */,
4344
4344
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4355,11 +4355,16 @@ function useViewService() {
4355
4355
  ]
4356
4356
  }
4357
4357
  };
4358
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4359
- headers: {
4360
- "Content-Type": "application/json"
4361
- }
4362
- });
4358
+ return env?.requests?.post(
4359
+ "/call" /* CALL_PATH */,
4360
+ jsonData,
4361
+ {
4362
+ headers: {
4363
+ "Content-Type": "application/json"
4364
+ }
4365
+ },
4366
+ service
4367
+ );
4363
4368
  },
4364
4369
  [env]
4365
4370
  );
@@ -6653,11 +6658,11 @@ var use_get_list_data_default = useGetListData;
6653
6658
 
6654
6659
  // src/hooks/view/use-get-menu.ts
6655
6660
  import { useQuery as useQuery15 } from "@tanstack/react-query";
6656
- var useGetMenu = (context, specification, enabled, domain) => {
6661
+ var useGetMenu = (context, specification, enabled, domain, service) => {
6657
6662
  const { getMenu } = useViewService();
6658
6663
  return useQuery15({
6659
6664
  queryKey: ["menus" /* MENU */, context],
6660
- queryFn: () => getMenu(context, specification, domain).then((res) => {
6665
+ queryFn: () => getMenu(context, specification, domain, service).then((res) => {
6661
6666
  if (res && res?.records && res?.records?.length > 0) {
6662
6667
  return res?.records;
6663
6668
  }
@@ -233,7 +233,7 @@ declare function useUserService(): {
233
233
 
234
234
  declare function useViewService(): {
235
235
  getView: ({ model, views, context, options, aid, service, xNode, }: GetViewParams) => Promise<any>;
236
- getMenu: (context: any, specification: any, domain: any) => Promise<any>;
236
+ getMenu: (context: any, specification: any, domain: any, service?: string) => Promise<any>;
237
237
  getActionDetail: (aid: number, context: any) => Promise<any>;
238
238
  getResequence: ({ model, ids, context, offset, }: {
239
239
  model: string;
@@ -233,7 +233,7 @@ declare function useUserService(): {
233
233
 
234
234
  declare function useViewService(): {
235
235
  getView: ({ model, views, context, options, aid, service, xNode, }: GetViewParams) => Promise<any>;
236
- getMenu: (context: any, specification: any, domain: any) => Promise<any>;
236
+ getMenu: (context: any, specification: any, domain: any, service?: string) => Promise<any>;
237
237
  getActionDetail: (aid: number, context: any) => Promise<any>;
238
238
  getResequence: ({ model, ids, context, offset, }: {
239
239
  model: string;
package/dist/services.js CHANGED
@@ -4540,7 +4540,7 @@ function useViewService() {
4540
4540
  [env]
4541
4541
  );
4542
4542
  const getMenu = (0, import_react14.useCallback)(
4543
- async (context, specification, domain) => {
4543
+ async (context, specification, domain, service) => {
4544
4544
  const jsonData = {
4545
4545
  model: "ir.ui.menu" /* MENU */,
4546
4546
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4557,11 +4557,16 @@ function useViewService() {
4557
4557
  ]
4558
4558
  }
4559
4559
  };
4560
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4561
- headers: {
4562
- "Content-Type": "application/json"
4563
- }
4564
- });
4560
+ return env?.requests?.post(
4561
+ "/call" /* CALL_PATH */,
4562
+ jsonData,
4563
+ {
4564
+ headers: {
4565
+ "Content-Type": "application/json"
4566
+ }
4567
+ },
4568
+ service
4569
+ );
4565
4570
  },
4566
4571
  [env]
4567
4572
  );
package/dist/services.mjs CHANGED
@@ -4496,7 +4496,7 @@ function useViewService() {
4496
4496
  [env]
4497
4497
  );
4498
4498
  const getMenu = useCallback10(
4499
- async (context, specification, domain) => {
4499
+ async (context, specification, domain, service) => {
4500
4500
  const jsonData = {
4501
4501
  model: "ir.ui.menu" /* MENU */,
4502
4502
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -4513,11 +4513,16 @@ function useViewService() {
4513
4513
  ]
4514
4514
  }
4515
4515
  };
4516
- return env?.requests?.post("/call" /* CALL_PATH */, jsonData, {
4517
- headers: {
4518
- "Content-Type": "application/json"
4519
- }
4520
- });
4516
+ return env?.requests?.post(
4517
+ "/call" /* CALL_PATH */,
4518
+ jsonData,
4519
+ {
4520
+ headers: {
4521
+ "Content-Type": "application/json"
4522
+ }
4523
+ },
4524
+ service
4525
+ );
4521
4526
  },
4522
4527
  [env]
4523
4528
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",