@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/index.js CHANGED
@@ -4220,7 +4220,11 @@ var useMenu = ({
4220
4220
  const { env } = (0, provider_exports.useEnv)();
4221
4221
  const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
4222
4222
  const [action, callAction] = useCallAction();
4223
- const menuData = useGetMenu2(context, specification, !!context);
4223
+ const menuData = useGetMenu2(
4224
+ context,
4225
+ specification,
4226
+ !!context && Object.keys(context).length > 0
4227
+ );
4224
4228
  const [menuId, setMenuId] = (0, import_react2.useState)(void 0);
4225
4229
  const configedIconData = (0, import_react2.useMemo)(() => {
4226
4230
  const data = menuData.data;
@@ -5490,62 +5494,24 @@ var many2oneButtonController = (props) => {
5490
5494
  var import_react17 = require("react");
5491
5495
  var import_utils8 = require("@fctc/interface-logic/utils");
5492
5496
  var many2manyFieldController = (props) => {
5493
- const {
5494
- relation,
5495
- domain,
5496
- context,
5497
- options,
5498
- tab,
5499
- setSelectedRowKeys: setSelectedRowKeys2,
5500
- groupByDomain,
5501
- enabled: enabledCallAPI,
5502
- actionData
5503
- } = props;
5497
+ const { relation, domain, context, options, tab, setSelectedRowKeys: setSelectedRowKeys2 } = props;
5504
5498
  const { env } = (0, provider_exports.useEnv)();
5505
- const { useGetView: useGetView2, useGetListData: useGetListData2, useGetFormView: useGetFormView2 } = (0, provider_exports.useService)();
5506
- const [order, setOrder] = (0, import_react17.useState)();
5499
+ const { useGetFormView: useGetFormView2 } = (0, provider_exports.useService)();
5507
5500
  const [page, setPage] = (0, import_react17.useState)(0);
5508
5501
  const [domainMany2Many, setDomainMany2Many] = (0, import_react17.useState)(null);
5509
- const [debouncedPage] = useDebounce(page, 500);
5502
+ const { action } = useAppProvider();
5510
5503
  const contextObject = {
5511
5504
  ...env.context,
5512
5505
  ...context || {}
5513
5506
  };
5514
- const viewParams = {
5515
- model: relation,
5507
+ const { data: viewResponse } = useViewV2({
5508
+ model: String(relation),
5516
5509
  views: [
5517
5510
  [false, "list"],
5518
5511
  [false, "search"]
5519
5512
  ],
5520
5513
  context: contextObject
5521
- };
5522
- const { data: viewResponse } = useGetView2(viewParams, enabledCallAPI);
5523
- const baseModel = (0, import_react17.useMemo)(
5524
- () => ({
5525
- name: String(relation),
5526
- view: viewResponse || {},
5527
- actContext: contextObject,
5528
- fields: [
5529
- ...Object.values(viewResponse?.views?.list?.fields ?? {}),
5530
- ...tab?.fields ? tab.fields : []
5531
- ]
5532
- }),
5533
- [relation, viewResponse]
5534
- );
5535
- const initModel = (0, import_hooks2.useModel)();
5536
- const modelInstance = (0, import_react17.useMemo)(() => {
5537
- if (viewResponse) {
5538
- return initModel.initModel(baseModel);
5539
- }
5540
- return null;
5541
- }, [baseModel, viewResponse]);
5542
- const specification = (0, import_react17.useMemo)(() => {
5543
- if (modelInstance) {
5544
- return modelInstance.getSpecification();
5545
- }
5546
- return null;
5547
- }, [modelInstance]);
5548
- const default_order = viewResponse && viewResponse?.views?.list?.default_order;
5514
+ });
5549
5515
  const optionsObject = tab?.options ? (0, import_utils8.evalJSONContext)(tab?.options) : (options ? (0, import_utils8.evalJSONContext)(options) : {}) || {};
5550
5516
  const fetchData = async () => {
5551
5517
  try {
@@ -5556,32 +5522,17 @@ var many2manyFieldController = (props) => {
5556
5522
  console.log(err);
5557
5523
  }
5558
5524
  };
5559
- const queryKey = [
5560
- `view-${relation}`,
5561
- specification,
5562
- domainMany2Many,
5563
- debouncedPage,
5564
- groupByDomain,
5565
- order
5566
- ];
5567
- const data = {
5568
- model: relation,
5569
- specification,
5570
- domain: domainMany2Many,
5571
- offset: debouncedPage * 10,
5572
- limit: 10,
5573
- context: contextObject,
5574
- fields: groupByDomain?.fields,
5575
- groupby: [groupByDomain?.contexts[0]?.group_by],
5576
- sort: order ? order : default_order ? (0, import_utils8.formatSortingString)(default_order) : ""
5577
- };
5578
- const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
5579
5525
  const {
5580
5526
  data: dataResponse,
5581
- isLoading,
5582
5527
  isFetched,
5583
- isPlaceholderData
5584
- } = useGetListData2(data, queryKey, enabled);
5528
+ isPlaceholderData,
5529
+ isLoading
5530
+ } = useListData({
5531
+ action,
5532
+ context,
5533
+ model: String(relation),
5534
+ viewData: viewResponse
5535
+ });
5585
5536
  (0, import_react17.useEffect)(() => {
5586
5537
  if (viewResponse) {
5587
5538
  fetchData();
@@ -5612,7 +5563,31 @@ var many2manyFieldController = (props) => {
5612
5563
  )?.map((col) => ({ ...col.field })) ?? []
5613
5564
  ]
5614
5565
  });
5566
+ const {
5567
+ refetch,
5568
+ data: dataFormViewResponse,
5569
+ isSuccess
5570
+ } = useGetFormView2({
5571
+ data: {
5572
+ id: null,
5573
+ model: relation ?? "",
5574
+ context: contextObject
5575
+ },
5576
+ queryKey: [`form-view-action-${relation}`],
5577
+ enabled: false
5578
+ });
5579
+ (0, import_react17.useEffect)(() => {
5580
+ if (isSuccess && dataFormViewResponse) {
5581
+ sessionStorage.setItem("actionData", JSON.stringify(dataFormViewResponse));
5582
+ window.location.href = `/form/menu?model=${relation}`;
5583
+ }
5584
+ }, [isSuccess]);
5615
5585
  const handleCreateNewOnPage = async () => {
5586
+ try {
5587
+ refetch();
5588
+ } catch (error) {
5589
+ console.log(error);
5590
+ }
5616
5591
  };
5617
5592
  return {
5618
5593
  handleCreateNewOnPage,
@@ -7143,7 +7118,6 @@ var tableGroupController = (props) => {
7143
7118
  setSelectedRowKeys2([...clonedKeys, -1]);
7144
7119
  setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
7145
7120
  } else if (isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && !checkedAll && !allIdsNull) {
7146
- console.log("abc");
7147
7121
  const filteredKeys = selectedRowKeys.filter((id) => id > -1);
7148
7122
  setSelectedRowKeys2(filteredKeys);
7149
7123
  }
package/dist/index.mjs CHANGED
@@ -4294,7 +4294,11 @@ var useMenu = ({
4294
4294
  const { env } = (0, provider_exports.useEnv)();
4295
4295
  const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
4296
4296
  const [action, callAction] = useCallAction();
4297
- const menuData = useGetMenu2(context, specification, !!context);
4297
+ const menuData = useGetMenu2(
4298
+ context,
4299
+ specification,
4300
+ !!context && Object.keys(context).length > 0
4301
+ );
4298
4302
  const [menuId, setMenuId] = useState2(void 0);
4299
4303
  const configedIconData = useMemo(() => {
4300
4304
  const data = menuData.data;
@@ -5568,69 +5572,27 @@ var many2oneButtonController = (props) => {
5568
5572
  };
5569
5573
 
5570
5574
  // src/widget/basic/many2many-field/controller.ts
5571
- import { useEffect as useEffect11, useMemo as useMemo9, useState as useState8 } from "react";
5572
- import {
5573
- evalJSONContext as evalJSONContext4,
5574
- evalJSONDomain as evalJSONDomain4,
5575
- formatSortingString as formatSortingString2
5576
- } from "@fctc/interface-logic/utils";
5575
+ import { useEffect as useEffect11, useState as useState8 } from "react";
5576
+ import { evalJSONContext as evalJSONContext4, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
5577
5577
  var many2manyFieldController = (props) => {
5578
- const {
5579
- relation,
5580
- domain,
5581
- context,
5582
- options,
5583
- tab,
5584
- setSelectedRowKeys: setSelectedRowKeys2,
5585
- groupByDomain,
5586
- enabled: enabledCallAPI,
5587
- actionData
5588
- } = props;
5578
+ const { relation, domain, context, options, tab, setSelectedRowKeys: setSelectedRowKeys2 } = props;
5589
5579
  const { env } = (0, provider_exports.useEnv)();
5590
- const { useGetView: useGetView2, useGetListData: useGetListData2, useGetFormView: useGetFormView2 } = (0, provider_exports.useService)();
5591
- const [order, setOrder] = useState8();
5580
+ const { useGetFormView: useGetFormView2 } = (0, provider_exports.useService)();
5592
5581
  const [page, setPage] = useState8(0);
5593
5582
  const [domainMany2Many, setDomainMany2Many] = useState8(null);
5594
- const [debouncedPage] = useDebounce(page, 500);
5583
+ const { action } = useAppProvider();
5595
5584
  const contextObject = {
5596
5585
  ...env.context,
5597
5586
  ...context || {}
5598
5587
  };
5599
- const viewParams = {
5600
- model: relation,
5588
+ const { data: viewResponse } = useViewV2({
5589
+ model: String(relation),
5601
5590
  views: [
5602
5591
  [false, "list"],
5603
5592
  [false, "search"]
5604
5593
  ],
5605
5594
  context: contextObject
5606
- };
5607
- const { data: viewResponse } = useGetView2(viewParams, enabledCallAPI);
5608
- const baseModel = useMemo9(
5609
- () => ({
5610
- name: String(relation),
5611
- view: viewResponse || {},
5612
- actContext: contextObject,
5613
- fields: [
5614
- ...Object.values(viewResponse?.views?.list?.fields ?? {}),
5615
- ...tab?.fields ? tab.fields : []
5616
- ]
5617
- }),
5618
- [relation, viewResponse]
5619
- );
5620
- const initModel = useModel();
5621
- const modelInstance = useMemo9(() => {
5622
- if (viewResponse) {
5623
- return initModel.initModel(baseModel);
5624
- }
5625
- return null;
5626
- }, [baseModel, viewResponse]);
5627
- const specification = useMemo9(() => {
5628
- if (modelInstance) {
5629
- return modelInstance.getSpecification();
5630
- }
5631
- return null;
5632
- }, [modelInstance]);
5633
- const default_order = viewResponse && viewResponse?.views?.list?.default_order;
5595
+ });
5634
5596
  const optionsObject = tab?.options ? evalJSONContext4(tab?.options) : (options ? evalJSONContext4(options) : {}) || {};
5635
5597
  const fetchData = async () => {
5636
5598
  try {
@@ -5641,32 +5603,17 @@ var many2manyFieldController = (props) => {
5641
5603
  console.log(err);
5642
5604
  }
5643
5605
  };
5644
- const queryKey = [
5645
- `view-${relation}`,
5646
- specification,
5647
- domainMany2Many,
5648
- debouncedPage,
5649
- groupByDomain,
5650
- order
5651
- ];
5652
- const data = {
5653
- model: relation,
5654
- specification,
5655
- domain: domainMany2Many,
5656
- offset: debouncedPage * 10,
5657
- limit: 10,
5658
- context: contextObject,
5659
- fields: groupByDomain?.fields,
5660
- groupby: [groupByDomain?.contexts[0]?.group_by],
5661
- sort: order ? order : default_order ? formatSortingString2(default_order) : ""
5662
- };
5663
- const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
5664
5606
  const {
5665
5607
  data: dataResponse,
5666
- isLoading,
5667
5608
  isFetched,
5668
- isPlaceholderData
5669
- } = useGetListData2(data, queryKey, enabled);
5609
+ isPlaceholderData,
5610
+ isLoading
5611
+ } = useListData({
5612
+ action,
5613
+ context,
5614
+ model: String(relation),
5615
+ viewData: viewResponse
5616
+ });
5670
5617
  useEffect11(() => {
5671
5618
  if (viewResponse) {
5672
5619
  fetchData();
@@ -5697,7 +5644,31 @@ var many2manyFieldController = (props) => {
5697
5644
  )?.map((col) => ({ ...col.field })) ?? []
5698
5645
  ]
5699
5646
  });
5647
+ const {
5648
+ refetch,
5649
+ data: dataFormViewResponse,
5650
+ isSuccess
5651
+ } = useGetFormView2({
5652
+ data: {
5653
+ id: null,
5654
+ model: relation ?? "",
5655
+ context: contextObject
5656
+ },
5657
+ queryKey: [`form-view-action-${relation}`],
5658
+ enabled: false
5659
+ });
5660
+ useEffect11(() => {
5661
+ if (isSuccess && dataFormViewResponse) {
5662
+ sessionStorage.setItem("actionData", JSON.stringify(dataFormViewResponse));
5663
+ window.location.href = `/form/menu?model=${relation}`;
5664
+ }
5665
+ }, [isSuccess]);
5700
5666
  const handleCreateNewOnPage = async () => {
5667
+ try {
5668
+ refetch();
5669
+ } catch (error) {
5670
+ console.log(error);
5671
+ }
5701
5672
  };
5702
5673
  return {
5703
5674
  handleCreateNewOnPage,
@@ -5720,7 +5691,7 @@ var many2manyFieldController = (props) => {
5720
5691
  };
5721
5692
 
5722
5693
  // src/widget/basic/many2many-tags-field/controller.ts
5723
- import { useMemo as useMemo10 } from "react";
5694
+ import { useMemo as useMemo9 } from "react";
5724
5695
  import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
5725
5696
  import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
5726
5697
  var many2manyTagsController = (props) => {
@@ -5738,7 +5709,7 @@ var many2manyTagsController = (props) => {
5738
5709
  const { env } = (0, provider_exports.useEnv)();
5739
5710
  const { useGetSelection: useGetSelection3 } = (0, provider_exports.useService)();
5740
5711
  const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
5741
- const domainObject = useMemo10(
5712
+ const domainObject = useMemo9(
5742
5713
  () => evalJSONDomain5(domain, JSON.parse(JSON.stringify(formValues || {}))),
5743
5714
  [domain, formValues]
5744
5715
  );
@@ -6970,7 +6941,7 @@ var binaryFieldController = (props) => {
6970
6941
  };
6971
6942
 
6972
6943
  // src/widget/advance/table/table-head/controller.ts
6973
- import { useMemo as useMemo11, useRef as useRef5 } from "react";
6944
+ import { useMemo as useMemo10, useRef as useRef5 } from "react";
6974
6945
  var tableHeadController = (props) => {
6975
6946
  const {
6976
6947
  typeTable,
@@ -6983,19 +6954,19 @@ var tableHeadController = (props) => {
6983
6954
  const { rowIds: recordIds } = useGetRowIds(tableRef);
6984
6955
  const selectedRowKeysRef = useRef5(recordIds);
6985
6956
  const isGroupTable = typeTable === "group";
6986
- const recordsCheckedGroup = useMemo11(() => {
6957
+ const recordsCheckedGroup = useMemo10(() => {
6987
6958
  if (!rows || !groupByList) return 0;
6988
6959
  const groupBy = typeof groupByList === "object" ? groupByList?.contexts?.[0]?.group_by : void 0;
6989
6960
  return countSum(rows, groupBy);
6990
6961
  }, [rows, groupByList]);
6991
- const isAllGroupChecked = useMemo11(() => {
6962
+ const isAllGroupChecked = useMemo10(() => {
6992
6963
  if (!isGroupTable || !selectedRowKeys?.length) return false;
6993
6964
  const selectedLength = selectedRowKeys.filter((id) => id !== -1).length;
6994
6965
  const allRecordsSelected = recordIds.length === selectedRowKeys.length ? recordIds.length === selectedLength : false;
6995
6966
  const allGroupsSelected = recordsCheckedGroup === selectedRowKeys.length;
6996
6967
  return allGroupsSelected || allRecordsSelected;
6997
6968
  }, [isGroupTable, selectedRowKeys, recordIds, recordsCheckedGroup]);
6998
- const isAllNormalChecked = useMemo11(() => {
6969
+ const isAllNormalChecked = useMemo10(() => {
6999
6970
  if (isGroupTable || !selectedRowKeys?.length || !rows?.length) return false;
7000
6971
  return selectedRowKeys.length === rows.length && selectedRowKeys.every(
7001
6972
  (id) => rows.some((record) => record.id === id)
@@ -7125,7 +7096,7 @@ var tableController = ({ data }) => {
7125
7096
  };
7126
7097
 
7127
7098
  // src/widget/advance/table/table-group/controller.ts
7128
- import { useEffect as useEffect14, useMemo as useMemo12, useState as useState14 } from "react";
7099
+ import { useEffect as useEffect14, useMemo as useMemo11, useState as useState14 } from "react";
7129
7100
  import {
7130
7101
  useAppSelector as useAppSelector2,
7131
7102
  selectList
@@ -7153,7 +7124,7 @@ var tableGroupController = (props) => {
7153
7124
  fromEnd: 1
7154
7125
  });
7155
7126
  const domain = row?.__domain;
7156
- const processedData = useMemo12(() => {
7127
+ const processedData = useMemo11(() => {
7157
7128
  const calculateColSpanEmpty = () => {
7158
7129
  const startIndex = columns.findIndex(
7159
7130
  (col) => col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum"
@@ -7168,7 +7139,7 @@ var tableGroupController = (props) => {
7168
7139
  };
7169
7140
  return calculateColSpanEmpty();
7170
7141
  }, [columns, row]);
7171
- const shouldFetchData = useMemo12(() => {
7142
+ const shouldFetchData = useMemo11(() => {
7172
7143
  return !!isShowGroup;
7173
7144
  }, [isShowGroup]);
7174
7145
  const enabled = shouldFetchData && !!processedData;
@@ -7231,7 +7202,6 @@ var tableGroupController = (props) => {
7231
7202
  setSelectedRowKeys2([...clonedKeys, -1]);
7232
7203
  setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
7233
7204
  } else if (isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && !checkedAll && !allIdsNull) {
7234
- console.log("abc");
7235
7205
  const filteredKeys = selectedRowKeys.filter((id) => id > -1);
7236
7206
  setSelectedRowKeys2(filteredKeys);
7237
7207
  }
@@ -0,0 +1,222 @@
1
+ import * as _tanstack_query_core from '@tanstack/query-core';
2
+
3
+ declare const useCallAction: () => readonly [ActionResult | undefined, ({ aid, }: {
4
+ aid: number;
5
+ actionType?: string;
6
+ }) => Promise<ActionResult | undefined>];
7
+ type useCallActionType = ReturnType<typeof useCallAction>;
8
+ type ActionResultType = useCallActionType[0];
9
+ interface ActionResult {
10
+ id?: number;
11
+ name?: string;
12
+ type?: 'ir.actions.act_window' | string;
13
+ xml_id?: string;
14
+ path?: false | string;
15
+ help?: string;
16
+ binding_model_id?: false | number;
17
+ binding_type?: 'action' | string;
18
+ binding_view_types?: string;
19
+ display_name?: string;
20
+ view_id?: false | number;
21
+ domain?: false | any[];
22
+ context?: string;
23
+ res_id?: number;
24
+ res_model?: string;
25
+ target?: 'current' | 'new' | string;
26
+ view_mode?: string;
27
+ mobile_view_mode?: string;
28
+ views?: [number, string][];
29
+ limit?: number;
30
+ groups_id?: number[];
31
+ search_view_id?: [number, string];
32
+ embedded_action_ids?: number[];
33
+ filter?: false | any;
34
+ url?: string;
35
+ }
36
+
37
+ declare const useViewV2: ({ action, context, aid, views, model, }: {
38
+ action?: ActionResultType;
39
+ context: any;
40
+ aid?: any;
41
+ views?: any;
42
+ model?: string;
43
+ }) => {
44
+ context: any;
45
+ data: ViewResponse;
46
+ error: Error;
47
+ isError: true;
48
+ isPending: false;
49
+ isLoading: false;
50
+ isLoadingError: false;
51
+ isRefetchError: true;
52
+ isSuccess: false;
53
+ isPlaceholderData: false;
54
+ status: "error";
55
+ dataUpdatedAt: number;
56
+ errorUpdatedAt: number;
57
+ failureCount: number;
58
+ failureReason: Error | null;
59
+ errorUpdateCount: number;
60
+ isFetched: boolean;
61
+ isFetchedAfterMount: boolean;
62
+ isFetching: boolean;
63
+ isInitialLoading: boolean;
64
+ isPaused: boolean;
65
+ isRefetching: boolean;
66
+ isStale: boolean;
67
+ isEnabled: boolean;
68
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
69
+ fetchStatus: _tanstack_query_core.FetchStatus;
70
+ promise: Promise<ViewResponse>;
71
+ } | {
72
+ context: any;
73
+ data: ViewResponse;
74
+ error: null;
75
+ isError: false;
76
+ isPending: false;
77
+ isLoading: false;
78
+ isLoadingError: false;
79
+ isRefetchError: false;
80
+ isSuccess: true;
81
+ isPlaceholderData: false;
82
+ status: "success";
83
+ dataUpdatedAt: number;
84
+ errorUpdatedAt: number;
85
+ failureCount: number;
86
+ failureReason: Error | null;
87
+ errorUpdateCount: number;
88
+ isFetched: boolean;
89
+ isFetchedAfterMount: boolean;
90
+ isFetching: boolean;
91
+ isInitialLoading: boolean;
92
+ isPaused: boolean;
93
+ isRefetching: boolean;
94
+ isStale: boolean;
95
+ isEnabled: boolean;
96
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
97
+ fetchStatus: _tanstack_query_core.FetchStatus;
98
+ promise: Promise<ViewResponse>;
99
+ } | {
100
+ context: any;
101
+ data: undefined;
102
+ error: Error;
103
+ isError: true;
104
+ isPending: false;
105
+ isLoading: false;
106
+ isLoadingError: true;
107
+ isRefetchError: false;
108
+ isSuccess: false;
109
+ isPlaceholderData: false;
110
+ status: "error";
111
+ dataUpdatedAt: number;
112
+ errorUpdatedAt: number;
113
+ failureCount: number;
114
+ failureReason: Error | null;
115
+ errorUpdateCount: number;
116
+ isFetched: boolean;
117
+ isFetchedAfterMount: boolean;
118
+ isFetching: boolean;
119
+ isInitialLoading: boolean;
120
+ isPaused: boolean;
121
+ isRefetching: boolean;
122
+ isStale: boolean;
123
+ isEnabled: boolean;
124
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
125
+ fetchStatus: _tanstack_query_core.FetchStatus;
126
+ promise: Promise<ViewResponse>;
127
+ } | {
128
+ context: any;
129
+ data: undefined;
130
+ error: null;
131
+ isError: false;
132
+ isPending: true;
133
+ isLoading: true;
134
+ isLoadingError: false;
135
+ isRefetchError: false;
136
+ isSuccess: false;
137
+ isPlaceholderData: false;
138
+ status: "pending";
139
+ dataUpdatedAt: number;
140
+ errorUpdatedAt: number;
141
+ failureCount: number;
142
+ failureReason: Error | null;
143
+ errorUpdateCount: number;
144
+ isFetched: boolean;
145
+ isFetchedAfterMount: boolean;
146
+ isFetching: boolean;
147
+ isInitialLoading: boolean;
148
+ isPaused: boolean;
149
+ isRefetching: boolean;
150
+ isStale: boolean;
151
+ isEnabled: boolean;
152
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
153
+ fetchStatus: _tanstack_query_core.FetchStatus;
154
+ promise: Promise<ViewResponse>;
155
+ } | {
156
+ context: any;
157
+ data: undefined;
158
+ error: null;
159
+ isError: false;
160
+ isPending: true;
161
+ isLoadingError: false;
162
+ isRefetchError: false;
163
+ isSuccess: false;
164
+ isPlaceholderData: false;
165
+ status: "pending";
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
+ isLoading: boolean;
175
+ isInitialLoading: boolean;
176
+ isPaused: boolean;
177
+ isRefetching: boolean;
178
+ isStale: boolean;
179
+ isEnabled: boolean;
180
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
181
+ fetchStatus: _tanstack_query_core.FetchStatus;
182
+ promise: Promise<ViewResponse>;
183
+ } | {
184
+ context: any;
185
+ data: ViewResponse;
186
+ isError: false;
187
+ error: null;
188
+ isPending: false;
189
+ isLoading: false;
190
+ isLoadingError: false;
191
+ isRefetchError: false;
192
+ isSuccess: true;
193
+ isPlaceholderData: true;
194
+ status: "success";
195
+ dataUpdatedAt: number;
196
+ errorUpdatedAt: number;
197
+ failureCount: number;
198
+ failureReason: Error | null;
199
+ errorUpdateCount: number;
200
+ isFetched: boolean;
201
+ isFetchedAfterMount: boolean;
202
+ isFetching: boolean;
203
+ isInitialLoading: boolean;
204
+ isPaused: boolean;
205
+ isRefetching: boolean;
206
+ isStale: boolean;
207
+ isEnabled: boolean;
208
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<ViewResponse, Error>>;
209
+ fetchStatus: _tanstack_query_core.FetchStatus;
210
+ promise: Promise<ViewResponse>;
211
+ };
212
+ type useViewV2Type = ReturnType<typeof useViewV2>;
213
+ type ViewResponse = {
214
+ models: {
215
+ [key: string]: any;
216
+ };
217
+ views: {
218
+ [key: string]: any;
219
+ };
220
+ };
221
+
222
+ export { type ActionResultType as A, type ViewResponse as V, type useCallActionType as a, useViewV2 as b, type useViewV2Type as c, useCallAction as u };