@fctc/widget-logic 1.9.7 → 1.9.9
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 +119 -100
- package/dist/index.mjs +108 -84
- package/dist/types.d.mts +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/widget.d.mts +9 -20
- package/dist/widget.d.ts +9 -20
- package/dist/widget.js +119 -100
- package/dist/widget.mjs +108 -84
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5276,7 +5276,6 @@ var many2oneFieldController = (props) => {
|
|
|
5276
5276
|
options: fieldOptions,
|
|
5277
5277
|
showDetail
|
|
5278
5278
|
} = props;
|
|
5279
|
-
const { env } = (0, provider_exports.useEnv)();
|
|
5280
5279
|
const [options, setOptions] = useState7([]);
|
|
5281
5280
|
const [inputValue, setInputValue] = useState7("");
|
|
5282
5281
|
const [debouncedInputValue] = useDebounce(inputValue, 1e3);
|
|
@@ -5286,14 +5285,15 @@ var many2oneFieldController = (props) => {
|
|
|
5286
5285
|
const [domainObject, setDomainObject] = useState7(null);
|
|
5287
5286
|
const actionData = sessionStorageUtils.getActionData();
|
|
5288
5287
|
const { menuList } = (0, store_exports.useAppSelector)(store_exports.selectNavbar);
|
|
5288
|
+
const { context } = (0, store_exports.useAppSelector)(store_exports.selectEnv);
|
|
5289
5289
|
const initValue = methods?.getValues(name);
|
|
5290
5290
|
const optionsObject = (0, utils_exports.evalJSONContext)(fieldOptions) || {};
|
|
5291
5291
|
const contextObject = {
|
|
5292
5292
|
...(0, utils_exports.evalJSONContext)(actionData?.context) || {},
|
|
5293
5293
|
...fieldContext,
|
|
5294
|
-
...
|
|
5294
|
+
...context
|
|
5295
5295
|
};
|
|
5296
|
-
const { useGetSelection:
|
|
5296
|
+
const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
|
|
5297
5297
|
const data = {
|
|
5298
5298
|
model: relation,
|
|
5299
5299
|
domain: domainObject,
|
|
@@ -5309,7 +5309,7 @@ var many2oneFieldController = (props) => {
|
|
|
5309
5309
|
data: dataOfSelection,
|
|
5310
5310
|
refetch,
|
|
5311
5311
|
isFetching
|
|
5312
|
-
} =
|
|
5312
|
+
} = useGetSelection2({
|
|
5313
5313
|
data,
|
|
5314
5314
|
queryKey,
|
|
5315
5315
|
enabled: false
|
|
@@ -5463,9 +5463,15 @@ var many2oneButtonController = (props) => {
|
|
|
5463
5463
|
|
|
5464
5464
|
// src/widget/basic/many2many-field/controller.ts
|
|
5465
5465
|
import { useEffect as useEffect11, useMemo as useMemo10, useState as useState8 } from "react";
|
|
5466
|
+
import {
|
|
5467
|
+
useAppDispatch as useAppDispatch5,
|
|
5468
|
+
setFirstDomain,
|
|
5469
|
+
setViewDataStore,
|
|
5470
|
+
setPage,
|
|
5471
|
+
setGroupByDomain
|
|
5472
|
+
} from "@fctc/interface-logic/store";
|
|
5466
5473
|
import {
|
|
5467
5474
|
evalJSONContext as evalJSONContext4,
|
|
5468
|
-
evalJSONDomain as evalJSONDomain4,
|
|
5469
5475
|
formatSortingString as formatSortingString2
|
|
5470
5476
|
} from "@fctc/interface-logic/utils";
|
|
5471
5477
|
var many2manyFieldController = (props) => {
|
|
@@ -5473,43 +5479,45 @@ var many2manyFieldController = (props) => {
|
|
|
5473
5479
|
relation,
|
|
5474
5480
|
domain,
|
|
5475
5481
|
context,
|
|
5476
|
-
options,
|
|
5477
5482
|
tab,
|
|
5483
|
+
model,
|
|
5484
|
+
aid,
|
|
5478
5485
|
setSelectedRowKeys: setSelectedRowKeys4,
|
|
5486
|
+
fields,
|
|
5487
|
+
setFields,
|
|
5479
5488
|
groupByDomain,
|
|
5480
|
-
|
|
5489
|
+
page,
|
|
5490
|
+
options,
|
|
5491
|
+
sessionStorageUtils
|
|
5481
5492
|
} = props;
|
|
5482
|
-
const
|
|
5483
|
-
const
|
|
5493
|
+
const appDispatch = useAppDispatch5();
|
|
5494
|
+
const actionData = sessionStorageUtils.getActionData();
|
|
5495
|
+
const [debouncedPage] = useDebounce(page, 500);
|
|
5484
5496
|
const [order, setOrder] = useState8();
|
|
5485
5497
|
const [isLoadedData, setIsLoadedData] = useState8(false);
|
|
5486
|
-
const [
|
|
5487
|
-
const
|
|
5488
|
-
const
|
|
5489
|
-
const contextObject = {
|
|
5490
|
-
...env.context,
|
|
5491
|
-
...context || {}
|
|
5492
|
-
};
|
|
5498
|
+
const [domainMany2Many, setDomainMany2Many] = useState8(domain);
|
|
5499
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
5500
|
+
const { useGetView: useGetView2, useGetListData: useGetListData3, useGetFormView } = (0, provider_exports.useService)();
|
|
5493
5501
|
const viewParams = {
|
|
5494
5502
|
model: relation,
|
|
5495
5503
|
views: [
|
|
5496
5504
|
[false, "list"],
|
|
5497
5505
|
[false, "search"]
|
|
5498
5506
|
],
|
|
5499
|
-
context
|
|
5507
|
+
context
|
|
5500
5508
|
};
|
|
5501
|
-
const { data: viewResponse } = useGetView2(viewParams,
|
|
5509
|
+
const { data: viewResponse } = useGetView2(viewParams, actionData);
|
|
5502
5510
|
const baseModel = useMemo10(
|
|
5503
5511
|
() => ({
|
|
5504
5512
|
name: String(relation),
|
|
5505
5513
|
view: viewResponse || {},
|
|
5506
|
-
actContext:
|
|
5514
|
+
actContext: context,
|
|
5507
5515
|
fields: [
|
|
5508
5516
|
...Object.values(viewResponse?.views?.list?.fields ?? {}),
|
|
5509
5517
|
...tab?.fields ? tab.fields : []
|
|
5510
5518
|
]
|
|
5511
5519
|
}),
|
|
5512
|
-
[
|
|
5520
|
+
[model, viewResponse]
|
|
5513
5521
|
);
|
|
5514
5522
|
const initModel = (0, hooks_exports.useModel)();
|
|
5515
5523
|
const modelInstance = useMemo10(() => {
|
|
@@ -5528,15 +5536,26 @@ var many2manyFieldController = (props) => {
|
|
|
5528
5536
|
const optionsObject = tab?.options ? evalJSONContext4(tab?.options) : (options ? evalJSONContext4(options) : {}) || {};
|
|
5529
5537
|
const fetchData = async () => {
|
|
5530
5538
|
try {
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5539
|
+
setDomainMany2Many(domain);
|
|
5540
|
+
appDispatch(setFirstDomain(domain));
|
|
5541
|
+
appDispatch(setViewDataStore(viewResponse));
|
|
5542
|
+
const modalData = viewResponse?.views?.list?.fields.map((field) => ({
|
|
5543
|
+
...viewResponse?.models?.[String(model)]?.[field?.name],
|
|
5544
|
+
...field
|
|
5545
|
+
}));
|
|
5546
|
+
if (!fields?.[`${aid}_${relation}_popupmany2many`] && modalData) {
|
|
5547
|
+
setFields({
|
|
5548
|
+
...fields,
|
|
5549
|
+
[`${aid}_${relation}_popupmany2many`]: modalData
|
|
5550
|
+
});
|
|
5551
|
+
}
|
|
5552
|
+
appDispatch(setPage(0));
|
|
5534
5553
|
} catch (err) {
|
|
5535
5554
|
console.log(err);
|
|
5536
5555
|
}
|
|
5537
5556
|
};
|
|
5538
5557
|
const queryKey = [
|
|
5539
|
-
`view-${relation}`,
|
|
5558
|
+
`view-${relation}-${aid}`,
|
|
5540
5559
|
specification,
|
|
5541
5560
|
domainMany2Many,
|
|
5542
5561
|
debouncedPage,
|
|
@@ -5549,16 +5568,16 @@ var many2manyFieldController = (props) => {
|
|
|
5549
5568
|
domain: domainMany2Many,
|
|
5550
5569
|
offset: debouncedPage * 10,
|
|
5551
5570
|
limit: 10,
|
|
5552
|
-
context
|
|
5571
|
+
context,
|
|
5553
5572
|
fields: groupByDomain?.fields,
|
|
5554
5573
|
groupby: [groupByDomain?.contexts[0]?.group_by],
|
|
5555
5574
|
sort: order ? order : default_order ? formatSortingString2(default_order) : ""
|
|
5556
5575
|
};
|
|
5557
|
-
const enabled =
|
|
5576
|
+
const enabled = isLoadedData && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
|
|
5558
5577
|
const {
|
|
5559
5578
|
data: dataResponse,
|
|
5560
|
-
isLoading,
|
|
5561
|
-
isFetched,
|
|
5579
|
+
isLoading: isDataLoading,
|
|
5580
|
+
isFetched: isDataResponseFetched,
|
|
5562
5581
|
isPlaceholderData
|
|
5563
5582
|
} = useGetListData3(data, queryKey, enabled);
|
|
5564
5583
|
useEffect11(() => {
|
|
@@ -5566,52 +5585,74 @@ var many2manyFieldController = (props) => {
|
|
|
5566
5585
|
fetchData();
|
|
5567
5586
|
}
|
|
5568
5587
|
return () => {
|
|
5569
|
-
|
|
5588
|
+
appDispatch(setGroupByDomain(null));
|
|
5589
|
+
setFields((prevFields) => ({
|
|
5590
|
+
...prevFields,
|
|
5591
|
+
[`${aid}_${relation}_popupmany2many`]: null
|
|
5592
|
+
}));
|
|
5593
|
+
appDispatch(setPage(0));
|
|
5570
5594
|
setSelectedRowKeys4([]);
|
|
5571
5595
|
setDomainMany2Many(null);
|
|
5572
5596
|
setIsLoadedData(false);
|
|
5573
5597
|
};
|
|
5574
5598
|
}, [viewResponse]);
|
|
5575
|
-
const { rows, columns, typeTable
|
|
5599
|
+
const { rows, columns, typeTable } = tableController({
|
|
5576
5600
|
data: {
|
|
5577
|
-
fields: viewResponse?.views?.list?.fields,
|
|
5601
|
+
fields: fields?.[`${aid}_${relation}_popupmany2many`] || viewResponse?.views?.list?.fields,
|
|
5578
5602
|
records: dataResponse?.records ?? dataResponse?.groups,
|
|
5579
5603
|
dataModel: viewResponse?.models?.[String(relation)],
|
|
5580
|
-
context:
|
|
5604
|
+
context: { ...env.context, ...context },
|
|
5581
5605
|
typeTable: dataResponse?.groups ? "group" : "list"
|
|
5582
5606
|
}
|
|
5583
5607
|
});
|
|
5608
|
+
const dataFormView = {
|
|
5609
|
+
id: null,
|
|
5610
|
+
model: relation,
|
|
5611
|
+
context
|
|
5612
|
+
};
|
|
5613
|
+
const {
|
|
5614
|
+
refetch,
|
|
5615
|
+
data: dataFormViewResponse,
|
|
5616
|
+
isSuccess
|
|
5617
|
+
} = useGetFormView({
|
|
5618
|
+
data: dataFormView,
|
|
5619
|
+
queryKey: [`form-view-action-${relation}`],
|
|
5620
|
+
enabled: false
|
|
5621
|
+
});
|
|
5622
|
+
useEffect11(() => {
|
|
5623
|
+
if (isSuccess && dataFormViewResponse) {
|
|
5624
|
+
sessionStorage.setItem("actionData", JSON.stringify(dataFormViewResponse));
|
|
5625
|
+
window.location.href = `/form/menu?model=${relation}`;
|
|
5626
|
+
}
|
|
5627
|
+
}, [isSuccess]);
|
|
5584
5628
|
useEffect11(() => {
|
|
5585
5629
|
if (domainMany2Many && !isLoadedData) {
|
|
5586
5630
|
setIsLoadedData(true);
|
|
5587
5631
|
}
|
|
5588
5632
|
}, [domainMany2Many]);
|
|
5589
5633
|
const handleCreateNewOnPage = async () => {
|
|
5634
|
+
try {
|
|
5635
|
+
refetch();
|
|
5636
|
+
} catch (error) {
|
|
5637
|
+
console.log(error);
|
|
5638
|
+
}
|
|
5590
5639
|
};
|
|
5591
5640
|
return {
|
|
5592
5641
|
handleCreateNewOnPage,
|
|
5593
5642
|
optionsObject,
|
|
5594
|
-
totalRows: dataResponse?.length ?? 0,
|
|
5595
5643
|
rows,
|
|
5596
5644
|
columns,
|
|
5597
|
-
onToggleColumnOptional,
|
|
5598
5645
|
typeTable,
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
isPlaceholderData
|
|
5602
|
-
setPage,
|
|
5603
|
-
page,
|
|
5604
|
-
domain: domainMany2Many,
|
|
5605
|
-
setDomain: setDomainMany2Many
|
|
5646
|
+
isDataLoading,
|
|
5647
|
+
isDataResponseFetched,
|
|
5648
|
+
isPlaceholderData
|
|
5606
5649
|
};
|
|
5607
5650
|
};
|
|
5608
5651
|
|
|
5609
5652
|
// src/widget/basic/many2many-tags-field/controller.ts
|
|
5610
5653
|
import { useMemo as useMemo11 } from "react";
|
|
5611
5654
|
import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
|
|
5612
|
-
import {
|
|
5613
|
-
import { useGetSelection as useGetSelection2 } from "@fctc/interface-logic/hooks";
|
|
5614
|
-
import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
|
|
5655
|
+
import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
|
|
5615
5656
|
var many2manyTagsController = (props) => {
|
|
5616
5657
|
const {
|
|
5617
5658
|
relation,
|
|
@@ -5622,10 +5663,11 @@ var many2manyTagsController = (props) => {
|
|
|
5622
5663
|
placeholderNoOption
|
|
5623
5664
|
} = props;
|
|
5624
5665
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
5625
|
-
const env =
|
|
5666
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
5667
|
+
const { useGetSelection: useGetSelection2 } = (0, provider_exports.useService)();
|
|
5626
5668
|
const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
|
|
5627
5669
|
const domainObject = useMemo11(
|
|
5628
|
-
() =>
|
|
5670
|
+
() => evalJSONDomain4(domain, JSON.parse(JSON.stringify(formValues || {}))),
|
|
5629
5671
|
[domain, formValues]
|
|
5630
5672
|
);
|
|
5631
5673
|
const data = {
|
|
@@ -5661,16 +5703,15 @@ var many2manyTagsController = (props) => {
|
|
|
5661
5703
|
options,
|
|
5662
5704
|
customNoOptionsMessage,
|
|
5663
5705
|
tranfer,
|
|
5664
|
-
dataOfSelection,
|
|
5665
5706
|
isUser
|
|
5666
5707
|
};
|
|
5667
5708
|
};
|
|
5668
5709
|
|
|
5669
5710
|
// src/widget/basic/status-bar-field/controller.ts
|
|
5670
5711
|
import { useState as useState9 } from "react";
|
|
5671
|
-
import { evalJSONDomain as
|
|
5712
|
+
import { evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
|
|
5672
5713
|
var durationController = (props) => {
|
|
5673
|
-
const { relation, domain, formValues, name, id, model, onRefetch } = props;
|
|
5714
|
+
const { relation, domain, formValues, name, id, model, onRefetch, enabled } = props;
|
|
5674
5715
|
const specification = {
|
|
5675
5716
|
id: 0,
|
|
5676
5717
|
name: "",
|
|
@@ -5684,7 +5725,7 @@ var durationController = (props) => {
|
|
|
5684
5725
|
const listDataProps = {
|
|
5685
5726
|
model: relation,
|
|
5686
5727
|
specification,
|
|
5687
|
-
domain:
|
|
5728
|
+
domain: evalJSONDomain5(domain, JSON.parse(JSON.stringify(formValues))),
|
|
5688
5729
|
limit: 10,
|
|
5689
5730
|
offset: 0,
|
|
5690
5731
|
fields: "",
|
|
@@ -5694,7 +5735,11 @@ var durationController = (props) => {
|
|
|
5694
5735
|
},
|
|
5695
5736
|
sort: ""
|
|
5696
5737
|
};
|
|
5697
|
-
const { data: dataResponse } = useGetListData3(
|
|
5738
|
+
const { data: dataResponse } = useGetListData3(
|
|
5739
|
+
listDataProps,
|
|
5740
|
+
queryKey,
|
|
5741
|
+
enabled
|
|
5742
|
+
);
|
|
5698
5743
|
const { mutate: fetchChangeStatus } = useChangeStatus();
|
|
5699
5744
|
const handleClick = async (stage_id) => {
|
|
5700
5745
|
setDisabled(true);
|
|
@@ -5733,29 +5778,15 @@ var durationController = (props) => {
|
|
|
5733
5778
|
import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
|
|
5734
5779
|
import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
|
|
5735
5780
|
var priorityFieldController = (props) => {
|
|
5736
|
-
const {
|
|
5737
|
-
value,
|
|
5738
|
-
isForm,
|
|
5739
|
-
name,
|
|
5740
|
-
methods,
|
|
5741
|
-
onChange,
|
|
5742
|
-
model,
|
|
5743
|
-
selection,
|
|
5744
|
-
id,
|
|
5745
|
-
actionData,
|
|
5746
|
-
viewData,
|
|
5747
|
-
context
|
|
5748
|
-
} = props;
|
|
5781
|
+
const { name, model, id, actionData, context, onChange } = props;
|
|
5749
5782
|
const _context = { ...evalJSONContext6(actionData?.context) };
|
|
5750
5783
|
const contextObject = { ...context, ..._context };
|
|
5751
|
-
const defaultPriority = parseInt(value) + 1;
|
|
5752
|
-
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
5753
5784
|
const { mutateAsync: fetchSave } = useSave2();
|
|
5754
5785
|
const savePriorities = async ({
|
|
5755
|
-
value
|
|
5786
|
+
value,
|
|
5756
5787
|
resetPriority
|
|
5757
5788
|
}) => {
|
|
5758
|
-
const priorityValue =
|
|
5789
|
+
const priorityValue = value <= 0 ? 0 : value - 1;
|
|
5759
5790
|
try {
|
|
5760
5791
|
fetchSave({
|
|
5761
5792
|
ids: id ? [id] : [],
|
|
@@ -5773,14 +5804,7 @@ var priorityFieldController = (props) => {
|
|
|
5773
5804
|
}
|
|
5774
5805
|
};
|
|
5775
5806
|
return {
|
|
5776
|
-
|
|
5777
|
-
isForm,
|
|
5778
|
-
methods,
|
|
5779
|
-
defaultPriority,
|
|
5780
|
-
savePriorities,
|
|
5781
|
-
label,
|
|
5782
|
-
id,
|
|
5783
|
-
onChange
|
|
5807
|
+
savePriorities
|
|
5784
5808
|
};
|
|
5785
5809
|
};
|
|
5786
5810
|
|
|
@@ -6870,7 +6894,7 @@ var binaryFieldController = (props) => {
|
|
|
6870
6894
|
};
|
|
6871
6895
|
|
|
6872
6896
|
// src/widget/advance/table/table-body/controller.ts
|
|
6873
|
-
import { useAppDispatch as
|
|
6897
|
+
import { useAppDispatch as useAppDispatch6, setSelectedRowKeys } from "@fctc/interface-logic/store";
|
|
6874
6898
|
import { useEffect as useEffect13, useMemo as useMemo12 } from "react";
|
|
6875
6899
|
var tableBodyController = (props) => {
|
|
6876
6900
|
const {
|
|
@@ -6883,7 +6907,7 @@ var tableBodyController = (props) => {
|
|
|
6883
6907
|
selectedRowKeysRef,
|
|
6884
6908
|
onClickRow
|
|
6885
6909
|
} = props;
|
|
6886
|
-
const appDispatch =
|
|
6910
|
+
const appDispatch = useAppDispatch6();
|
|
6887
6911
|
const checked = useMemo12(() => {
|
|
6888
6912
|
if (!row?.id) return false;
|
|
6889
6913
|
if (selectedRowKeys?.includes(row.id)) {
|
|
@@ -6938,14 +6962,14 @@ var tableBodyController = (props) => {
|
|
|
6938
6962
|
|
|
6939
6963
|
// src/widget/advance/table/table-head/controller.ts
|
|
6940
6964
|
import {
|
|
6941
|
-
useAppDispatch as
|
|
6965
|
+
useAppDispatch as useAppDispatch7,
|
|
6942
6966
|
useAppSelector as useAppSelector4,
|
|
6943
6967
|
selectSearch as selectSearch3,
|
|
6944
6968
|
setSelectedRowKeys as setSelectedRowKeys2
|
|
6945
6969
|
} from "@fctc/interface-logic/store";
|
|
6946
6970
|
var tableHeadController = (props) => {
|
|
6947
6971
|
const { typeTable, rows, selectedRowKeysRef } = props;
|
|
6948
|
-
const appDispatch =
|
|
6972
|
+
const appDispatch = useAppDispatch7();
|
|
6949
6973
|
const { groupByDomain } = useAppSelector4(selectSearch3);
|
|
6950
6974
|
const handleCheckBoxAll = (event) => {
|
|
6951
6975
|
if (event?.target?.checked && typeTable === "list") {
|
|
@@ -7071,7 +7095,7 @@ import {
|
|
|
7071
7095
|
useAppSelector as useAppSelector6,
|
|
7072
7096
|
selectSearch as selectSearch5,
|
|
7073
7097
|
selectList as selectList4,
|
|
7074
|
-
useAppDispatch as
|
|
7098
|
+
useAppDispatch as useAppDispatch8,
|
|
7075
7099
|
setSelectedRowKeys as setSelectedRowKeys3
|
|
7076
7100
|
} from "@fctc/interface-logic/store";
|
|
7077
7101
|
|
|
@@ -7104,7 +7128,7 @@ var tableGroupController = (props) => {
|
|
|
7104
7128
|
const [pageGroup, setPageGroup] = useState14(0);
|
|
7105
7129
|
const { groupByDomain, selectedTags } = useAppSelector6(selectSearch5);
|
|
7106
7130
|
const { selectedRowKeys } = useAppSelector6(selectList4);
|
|
7107
|
-
const appDispatch =
|
|
7131
|
+
const appDispatch = useAppDispatch8();
|
|
7108
7132
|
const { toDataJS } = useOdooDataTransform();
|
|
7109
7133
|
const initVal = toDataJS(row, viewData, model);
|
|
7110
7134
|
const [isShowGroup, setIsShowGroup] = useState14(false);
|
|
@@ -7245,7 +7269,7 @@ var import_moment2 = __toESM(require_moment());
|
|
|
7245
7269
|
import { SearchType } from "@fctc/interface-logic/constants";
|
|
7246
7270
|
import {
|
|
7247
7271
|
domainHelper as domainHelper2,
|
|
7248
|
-
evalJSONDomain as
|
|
7272
|
+
evalJSONDomain as evalJSONDomain6,
|
|
7249
7273
|
validateAndParseDate
|
|
7250
7274
|
} from "@fctc/interface-logic/utils";
|
|
7251
7275
|
import { useCallback as useCallback3, useEffect as useEffect16, useState as useState15 } from "react";
|
|
@@ -7262,7 +7286,7 @@ var searchController = ({
|
|
|
7262
7286
|
const [groupBy, setGroupBy] = useState15(null);
|
|
7263
7287
|
const [selectedTags, setSelectedTags] = useState15(null);
|
|
7264
7288
|
const [searchString, setSearchString] = useState15("");
|
|
7265
|
-
const domainAction = actionData?.domain ? Array.isArray(actionData?.domain) ? [...actionData?.domain] :
|
|
7289
|
+
const domainAction = actionData?.domain ? Array.isArray(actionData?.domain) ? [...actionData?.domain] : evalJSONDomain6(actionData?.domain, contextSearch) : [];
|
|
7266
7290
|
const aid = actionData?.id;
|
|
7267
7291
|
const model = actionData?.res_model;
|
|
7268
7292
|
const clearSearch = () => {
|
package/dist/types.d.mts
CHANGED
package/dist/types.d.ts
CHANGED
package/dist/widget.d.mts
CHANGED
|
@@ -59,33 +59,31 @@ declare const many2oneButtonController: (props: any) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
62
|
+
context: any;
|
|
62
63
|
tab: any;
|
|
64
|
+
aid: number;
|
|
63
65
|
setSelectedRowKeys: any;
|
|
66
|
+
fields: any;
|
|
67
|
+
setFields: any;
|
|
64
68
|
groupByDomain: any;
|
|
69
|
+
page: number;
|
|
65
70
|
options: any;
|
|
66
|
-
|
|
71
|
+
sessionStorageUtils: any;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {
|
|
70
75
|
handleCreateNewOnPage: () => Promise<void>;
|
|
71
76
|
optionsObject: any;
|
|
72
|
-
totalRows: any;
|
|
73
77
|
rows: any[];
|
|
74
78
|
columns: any;
|
|
75
|
-
onToggleColumnOptional: (item: any) => void;
|
|
76
79
|
typeTable: "list" | "group" | "calendar" | undefined;
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
isDataLoading: boolean;
|
|
81
|
+
isDataResponseFetched: boolean;
|
|
79
82
|
isPlaceholderData: boolean;
|
|
80
|
-
setPage: react.Dispatch<react.SetStateAction<number>>;
|
|
81
|
-
page: number;
|
|
82
|
-
domain: any;
|
|
83
|
-
setDomain: react.Dispatch<any>;
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
87
86
|
options: any;
|
|
88
|
-
widget: string;
|
|
89
87
|
placeholderNoOption: string;
|
|
90
88
|
}
|
|
91
89
|
|
|
@@ -93,12 +91,12 @@ declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
|
|
|
93
91
|
options: any;
|
|
94
92
|
customNoOptionsMessage: () => string;
|
|
95
93
|
tranfer: (data: any) => any;
|
|
96
|
-
dataOfSelection: any;
|
|
97
94
|
isUser: boolean;
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
interface IDurationFieldProps extends IInputFieldProps {
|
|
101
98
|
id: any;
|
|
99
|
+
enabled?: any;
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
declare const durationController: (props: IDurationFieldProps) => {
|
|
@@ -110,25 +108,16 @@ declare const durationController: (props: IDurationFieldProps) => {
|
|
|
110
108
|
};
|
|
111
109
|
|
|
112
110
|
interface IPriorityFieldProps extends IInputFieldProps {
|
|
113
|
-
selection: any;
|
|
114
111
|
id: any;
|
|
115
112
|
actionData: any;
|
|
116
|
-
viewData: any;
|
|
117
113
|
context: any;
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
declare const priorityFieldController: (props: IPriorityFieldProps) => {
|
|
121
|
-
selection: any;
|
|
122
|
-
isForm: boolean | undefined;
|
|
123
|
-
methods: any;
|
|
124
|
-
defaultPriority: number;
|
|
125
117
|
savePriorities: ({ value, resetPriority, }: {
|
|
126
118
|
value: number;
|
|
127
119
|
resetPriority?: () => void;
|
|
128
120
|
}) => Promise<void>;
|
|
129
|
-
label: any;
|
|
130
|
-
id: any;
|
|
131
|
-
onChange: ((name: string, value: any) => void) | undefined;
|
|
132
121
|
};
|
|
133
122
|
|
|
134
123
|
declare const downloadFileController: () => {
|
package/dist/widget.d.ts
CHANGED
|
@@ -59,33 +59,31 @@ declare const many2oneButtonController: (props: any) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
interface IMany2ManyControllerProps extends IInputFieldProps {
|
|
62
|
+
context: any;
|
|
62
63
|
tab: any;
|
|
64
|
+
aid: number;
|
|
63
65
|
setSelectedRowKeys: any;
|
|
66
|
+
fields: any;
|
|
67
|
+
setFields: any;
|
|
64
68
|
groupByDomain: any;
|
|
69
|
+
page: number;
|
|
65
70
|
options: any;
|
|
66
|
-
|
|
71
|
+
sessionStorageUtils: any;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
declare const many2manyFieldController: (props: IMany2ManyControllerProps) => {
|
|
70
75
|
handleCreateNewOnPage: () => Promise<void>;
|
|
71
76
|
optionsObject: any;
|
|
72
|
-
totalRows: any;
|
|
73
77
|
rows: any[];
|
|
74
78
|
columns: any;
|
|
75
|
-
onToggleColumnOptional: (item: any) => void;
|
|
76
79
|
typeTable: "list" | "group" | "calendar" | undefined;
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
isDataLoading: boolean;
|
|
81
|
+
isDataResponseFetched: boolean;
|
|
79
82
|
isPlaceholderData: boolean;
|
|
80
|
-
setPage: react.Dispatch<react.SetStateAction<number>>;
|
|
81
|
-
page: number;
|
|
82
|
-
domain: any;
|
|
83
|
-
setDomain: react.Dispatch<any>;
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
interface IMany2ManyTagFieldProps extends IInputFieldProps {
|
|
87
86
|
options: any;
|
|
88
|
-
widget: string;
|
|
89
87
|
placeholderNoOption: string;
|
|
90
88
|
}
|
|
91
89
|
|
|
@@ -93,12 +91,12 @@ declare const many2manyTagsController: (props: IMany2ManyTagFieldProps) => {
|
|
|
93
91
|
options: any;
|
|
94
92
|
customNoOptionsMessage: () => string;
|
|
95
93
|
tranfer: (data: any) => any;
|
|
96
|
-
dataOfSelection: any;
|
|
97
94
|
isUser: boolean;
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
interface IDurationFieldProps extends IInputFieldProps {
|
|
101
98
|
id: any;
|
|
99
|
+
enabled?: any;
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
declare const durationController: (props: IDurationFieldProps) => {
|
|
@@ -110,25 +108,16 @@ declare const durationController: (props: IDurationFieldProps) => {
|
|
|
110
108
|
};
|
|
111
109
|
|
|
112
110
|
interface IPriorityFieldProps extends IInputFieldProps {
|
|
113
|
-
selection: any;
|
|
114
111
|
id: any;
|
|
115
112
|
actionData: any;
|
|
116
|
-
viewData: any;
|
|
117
113
|
context: any;
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
declare const priorityFieldController: (props: IPriorityFieldProps) => {
|
|
121
|
-
selection: any;
|
|
122
|
-
isForm: boolean | undefined;
|
|
123
|
-
methods: any;
|
|
124
|
-
defaultPriority: number;
|
|
125
117
|
savePriorities: ({ value, resetPriority, }: {
|
|
126
118
|
value: number;
|
|
127
119
|
resetPriority?: () => void;
|
|
128
120
|
}) => Promise<void>;
|
|
129
|
-
label: any;
|
|
130
|
-
id: any;
|
|
131
|
-
onChange: ((name: string, value: any) => void) | undefined;
|
|
132
121
|
};
|
|
133
122
|
|
|
134
123
|
declare const downloadFileController: () => {
|