@fctc/widget-logic 1.10.6 → 1.10.7
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 +3 -10
- package/dist/index.mjs +3 -10
- package/dist/widget.js +3 -10
- package/dist/widget.mjs +3 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5449,7 +5449,6 @@ var many2manyFieldController = (props) => {
|
|
|
5449
5449
|
const { env } = (0, provider_exports.useEnv)();
|
|
5450
5450
|
const { useGetView: useGetView2, useGetListData: useGetListData3, useGetFormView } = (0, provider_exports.useService)();
|
|
5451
5451
|
const [order, setOrder] = (0, import_react15.useState)();
|
|
5452
|
-
const [isLoadedData, setIsLoadedData] = (0, import_react15.useState)(false);
|
|
5453
5452
|
const [page, setPage] = (0, import_react15.useState)(0);
|
|
5454
5453
|
const [domainMany2Many, setDomainMany2Many] = (0, import_react15.useState)(null);
|
|
5455
5454
|
const [debouncedPage] = useDebounce(page, 500);
|
|
@@ -5521,7 +5520,7 @@ var many2manyFieldController = (props) => {
|
|
|
5521
5520
|
groupby: [groupByDomain?.contexts[0]?.group_by],
|
|
5522
5521
|
sort: order ? order : default_order ? (0, import_utils6.formatSortingString)(default_order) : ""
|
|
5523
5522
|
};
|
|
5524
|
-
const enabled = enabledCallAPI &&
|
|
5523
|
+
const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
|
|
5525
5524
|
const {
|
|
5526
5525
|
data: dataResponse,
|
|
5527
5526
|
isLoading,
|
|
@@ -5536,7 +5535,6 @@ var many2manyFieldController = (props) => {
|
|
|
5536
5535
|
setPage(0);
|
|
5537
5536
|
setSelectedRowKeys4([]);
|
|
5538
5537
|
setDomainMany2Many(null);
|
|
5539
|
-
setIsLoadedData(false);
|
|
5540
5538
|
};
|
|
5541
5539
|
}, [viewResponse]);
|
|
5542
5540
|
const { rows, columns, typeTable, onToggleColumnOptional } = tableController({
|
|
@@ -5552,18 +5550,13 @@ var many2manyFieldController = (props) => {
|
|
|
5552
5550
|
viewData: viewResponse,
|
|
5553
5551
|
model: relation ?? "",
|
|
5554
5552
|
context: contextObject,
|
|
5555
|
-
domain
|
|
5553
|
+
domain,
|
|
5556
5554
|
fieldsList: [
|
|
5557
5555
|
...columns?.filter(
|
|
5558
5556
|
(col) => col?.field?.type_co === "field" && col?.optional !== "hide"
|
|
5559
5557
|
)?.map((col) => ({ ...col.field })) ?? []
|
|
5560
5558
|
]
|
|
5561
5559
|
});
|
|
5562
|
-
(0, import_react15.useEffect)(() => {
|
|
5563
|
-
if (domainMany2Many && !isLoadedData) {
|
|
5564
|
-
setIsLoadedData(true);
|
|
5565
|
-
}
|
|
5566
|
-
}, [domainMany2Many]);
|
|
5567
5560
|
const handleCreateNewOnPage = async () => {
|
|
5568
5561
|
};
|
|
5569
5562
|
return {
|
|
@@ -7305,6 +7298,7 @@ var searchController = ({
|
|
|
7305
7298
|
};
|
|
7306
7299
|
const formatDomain = () => {
|
|
7307
7300
|
if (domainAction) {
|
|
7301
|
+
console.log("domainAction", domainAction);
|
|
7308
7302
|
const domain2 = [];
|
|
7309
7303
|
if (domainAction?.length > 0) {
|
|
7310
7304
|
if (Object.keys(searchMap).length > 0) {
|
|
@@ -7412,7 +7406,6 @@ var searchController = ({
|
|
|
7412
7406
|
[searchMap]
|
|
7413
7407
|
);
|
|
7414
7408
|
(0, import_react24.useEffect)(() => {
|
|
7415
|
-
setSelectedTags(null);
|
|
7416
7409
|
setTagSearch(searchMap);
|
|
7417
7410
|
}, [searchMap]);
|
|
7418
7411
|
const handleAddTagSearch = (tag) => {
|
package/dist/index.mjs
CHANGED
|
@@ -5483,7 +5483,6 @@ var many2manyFieldController = (props) => {
|
|
|
5483
5483
|
const { env } = (0, provider_exports.useEnv)();
|
|
5484
5484
|
const { useGetView: useGetView2, useGetListData: useGetListData3, useGetFormView } = (0, provider_exports.useService)();
|
|
5485
5485
|
const [order, setOrder] = useState8();
|
|
5486
|
-
const [isLoadedData, setIsLoadedData] = useState8(false);
|
|
5487
5486
|
const [page, setPage] = useState8(0);
|
|
5488
5487
|
const [domainMany2Many, setDomainMany2Many] = useState8(null);
|
|
5489
5488
|
const [debouncedPage] = useDebounce(page, 500);
|
|
@@ -5555,7 +5554,7 @@ var many2manyFieldController = (props) => {
|
|
|
5555
5554
|
groupby: [groupByDomain?.contexts[0]?.group_by],
|
|
5556
5555
|
sort: order ? order : default_order ? formatSortingString2(default_order) : ""
|
|
5557
5556
|
};
|
|
5558
|
-
const enabled = enabledCallAPI &&
|
|
5557
|
+
const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
|
|
5559
5558
|
const {
|
|
5560
5559
|
data: dataResponse,
|
|
5561
5560
|
isLoading,
|
|
@@ -5570,7 +5569,6 @@ var many2manyFieldController = (props) => {
|
|
|
5570
5569
|
setPage(0);
|
|
5571
5570
|
setSelectedRowKeys4([]);
|
|
5572
5571
|
setDomainMany2Many(null);
|
|
5573
|
-
setIsLoadedData(false);
|
|
5574
5572
|
};
|
|
5575
5573
|
}, [viewResponse]);
|
|
5576
5574
|
const { rows, columns, typeTable, onToggleColumnOptional } = tableController({
|
|
@@ -5586,18 +5584,13 @@ var many2manyFieldController = (props) => {
|
|
|
5586
5584
|
viewData: viewResponse,
|
|
5587
5585
|
model: relation ?? "",
|
|
5588
5586
|
context: contextObject,
|
|
5589
|
-
domain
|
|
5587
|
+
domain,
|
|
5590
5588
|
fieldsList: [
|
|
5591
5589
|
...columns?.filter(
|
|
5592
5590
|
(col) => col?.field?.type_co === "field" && col?.optional !== "hide"
|
|
5593
5591
|
)?.map((col) => ({ ...col.field })) ?? []
|
|
5594
5592
|
]
|
|
5595
5593
|
});
|
|
5596
|
-
useEffect11(() => {
|
|
5597
|
-
if (domainMany2Many && !isLoadedData) {
|
|
5598
|
-
setIsLoadedData(true);
|
|
5599
|
-
}
|
|
5600
|
-
}, [domainMany2Many]);
|
|
5601
5594
|
const handleCreateNewOnPage = async () => {
|
|
5602
5595
|
};
|
|
5603
5596
|
return {
|
|
@@ -7363,6 +7356,7 @@ var searchController = ({
|
|
|
7363
7356
|
};
|
|
7364
7357
|
const formatDomain = () => {
|
|
7365
7358
|
if (domainAction) {
|
|
7359
|
+
console.log("domainAction", domainAction);
|
|
7366
7360
|
const domain2 = [];
|
|
7367
7361
|
if (domainAction?.length > 0) {
|
|
7368
7362
|
if (Object.keys(searchMap).length > 0) {
|
|
@@ -7470,7 +7464,6 @@ var searchController = ({
|
|
|
7470
7464
|
[searchMap]
|
|
7471
7465
|
);
|
|
7472
7466
|
useEffect16(() => {
|
|
7473
|
-
setSelectedTags(null);
|
|
7474
7467
|
setTagSearch(searchMap);
|
|
7475
7468
|
}, [searchMap]);
|
|
7476
7469
|
const handleAddTagSearch = (tag) => {
|
package/dist/widget.js
CHANGED
|
@@ -5175,7 +5175,6 @@ var many2manyFieldController = (props) => {
|
|
|
5175
5175
|
const { env } = (0, provider_exports.useEnv)();
|
|
5176
5176
|
const { useGetView: useGetView2, useGetListData: useGetListData3, useGetFormView } = (0, provider_exports.useService)();
|
|
5177
5177
|
const [order, setOrder] = (0, import_react15.useState)();
|
|
5178
|
-
const [isLoadedData, setIsLoadedData] = (0, import_react15.useState)(false);
|
|
5179
5178
|
const [page, setPage] = (0, import_react15.useState)(0);
|
|
5180
5179
|
const [domainMany2Many, setDomainMany2Many] = (0, import_react15.useState)(null);
|
|
5181
5180
|
const [debouncedPage] = useDebounce(page, 500);
|
|
@@ -5247,7 +5246,7 @@ var many2manyFieldController = (props) => {
|
|
|
5247
5246
|
groupby: [groupByDomain?.contexts[0]?.group_by],
|
|
5248
5247
|
sort: order ? order : default_order ? (0, import_utils6.formatSortingString)(default_order) : ""
|
|
5249
5248
|
};
|
|
5250
|
-
const enabled = enabledCallAPI &&
|
|
5249
|
+
const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
|
|
5251
5250
|
const {
|
|
5252
5251
|
data: dataResponse,
|
|
5253
5252
|
isLoading,
|
|
@@ -5262,7 +5261,6 @@ var many2manyFieldController = (props) => {
|
|
|
5262
5261
|
setPage(0);
|
|
5263
5262
|
setSelectedRowKeys4([]);
|
|
5264
5263
|
setDomainMany2Many(null);
|
|
5265
|
-
setIsLoadedData(false);
|
|
5266
5264
|
};
|
|
5267
5265
|
}, [viewResponse]);
|
|
5268
5266
|
const { rows, columns, typeTable, onToggleColumnOptional } = tableController({
|
|
@@ -5278,18 +5276,13 @@ var many2manyFieldController = (props) => {
|
|
|
5278
5276
|
viewData: viewResponse,
|
|
5279
5277
|
model: relation ?? "",
|
|
5280
5278
|
context: contextObject,
|
|
5281
|
-
domain
|
|
5279
|
+
domain,
|
|
5282
5280
|
fieldsList: [
|
|
5283
5281
|
...columns?.filter(
|
|
5284
5282
|
(col) => col?.field?.type_co === "field" && col?.optional !== "hide"
|
|
5285
5283
|
)?.map((col) => ({ ...col.field })) ?? []
|
|
5286
5284
|
]
|
|
5287
5285
|
});
|
|
5288
|
-
(0, import_react15.useEffect)(() => {
|
|
5289
|
-
if (domainMany2Many && !isLoadedData) {
|
|
5290
|
-
setIsLoadedData(true);
|
|
5291
|
-
}
|
|
5292
|
-
}, [domainMany2Many]);
|
|
5293
5286
|
const handleCreateNewOnPage = async () => {
|
|
5294
5287
|
};
|
|
5295
5288
|
return {
|
|
@@ -7031,6 +7024,7 @@ var searchController = ({
|
|
|
7031
7024
|
};
|
|
7032
7025
|
const formatDomain = () => {
|
|
7033
7026
|
if (domainAction) {
|
|
7027
|
+
console.log("domainAction", domainAction);
|
|
7034
7028
|
const domain2 = [];
|
|
7035
7029
|
if (domainAction?.length > 0) {
|
|
7036
7030
|
if (Object.keys(searchMap).length > 0) {
|
|
@@ -7138,7 +7132,6 @@ var searchController = ({
|
|
|
7138
7132
|
[searchMap]
|
|
7139
7133
|
);
|
|
7140
7134
|
(0, import_react24.useEffect)(() => {
|
|
7141
|
-
setSelectedTags(null);
|
|
7142
7135
|
setTagSearch(searchMap);
|
|
7143
7136
|
}, [searchMap]);
|
|
7144
7137
|
const handleAddTagSearch = (tag) => {
|
package/dist/widget.mjs
CHANGED
|
@@ -5185,7 +5185,6 @@ var many2manyFieldController = (props) => {
|
|
|
5185
5185
|
const { env } = (0, provider_exports.useEnv)();
|
|
5186
5186
|
const { useGetView: useGetView2, useGetListData: useGetListData3, useGetFormView } = (0, provider_exports.useService)();
|
|
5187
5187
|
const [order, setOrder] = useState8();
|
|
5188
|
-
const [isLoadedData, setIsLoadedData] = useState8(false);
|
|
5189
5188
|
const [page, setPage] = useState8(0);
|
|
5190
5189
|
const [domainMany2Many, setDomainMany2Many] = useState8(null);
|
|
5191
5190
|
const [debouncedPage] = useDebounce(page, 500);
|
|
@@ -5257,7 +5256,7 @@ var many2manyFieldController = (props) => {
|
|
|
5257
5256
|
groupby: [groupByDomain?.contexts[0]?.group_by],
|
|
5258
5257
|
sort: order ? order : default_order ? formatSortingString2(default_order) : ""
|
|
5259
5258
|
};
|
|
5260
|
-
const enabled = enabledCallAPI &&
|
|
5259
|
+
const enabled = enabledCallAPI && !!specification && !!relation && !!domainMany2Many && !!viewResponse;
|
|
5261
5260
|
const {
|
|
5262
5261
|
data: dataResponse,
|
|
5263
5262
|
isLoading,
|
|
@@ -5272,7 +5271,6 @@ var many2manyFieldController = (props) => {
|
|
|
5272
5271
|
setPage(0);
|
|
5273
5272
|
setSelectedRowKeys4([]);
|
|
5274
5273
|
setDomainMany2Many(null);
|
|
5275
|
-
setIsLoadedData(false);
|
|
5276
5274
|
};
|
|
5277
5275
|
}, [viewResponse]);
|
|
5278
5276
|
const { rows, columns, typeTable, onToggleColumnOptional } = tableController({
|
|
@@ -5288,18 +5286,13 @@ var many2manyFieldController = (props) => {
|
|
|
5288
5286
|
viewData: viewResponse,
|
|
5289
5287
|
model: relation ?? "",
|
|
5290
5288
|
context: contextObject,
|
|
5291
|
-
domain
|
|
5289
|
+
domain,
|
|
5292
5290
|
fieldsList: [
|
|
5293
5291
|
...columns?.filter(
|
|
5294
5292
|
(col) => col?.field?.type_co === "field" && col?.optional !== "hide"
|
|
5295
5293
|
)?.map((col) => ({ ...col.field })) ?? []
|
|
5296
5294
|
]
|
|
5297
5295
|
});
|
|
5298
|
-
useEffect11(() => {
|
|
5299
|
-
if (domainMany2Many && !isLoadedData) {
|
|
5300
|
-
setIsLoadedData(true);
|
|
5301
|
-
}
|
|
5302
|
-
}, [domainMany2Many]);
|
|
5303
5296
|
const handleCreateNewOnPage = async () => {
|
|
5304
5297
|
};
|
|
5305
5298
|
return {
|
|
@@ -7065,6 +7058,7 @@ var searchController = ({
|
|
|
7065
7058
|
};
|
|
7066
7059
|
const formatDomain = () => {
|
|
7067
7060
|
if (domainAction) {
|
|
7061
|
+
console.log("domainAction", domainAction);
|
|
7068
7062
|
const domain2 = [];
|
|
7069
7063
|
if (domainAction?.length > 0) {
|
|
7070
7064
|
if (Object.keys(searchMap).length > 0) {
|
|
@@ -7172,7 +7166,6 @@ var searchController = ({
|
|
|
7172
7166
|
[searchMap]
|
|
7173
7167
|
);
|
|
7174
7168
|
useEffect16(() => {
|
|
7175
|
-
setSelectedTags(null);
|
|
7176
7169
|
setTagSearch(searchMap);
|
|
7177
7170
|
}, [searchMap]);
|
|
7178
7171
|
const handleAddTagSearch = (tag) => {
|