@fctc/widget-logic 1.8.4 → 1.8.5
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 +36 -149
- package/dist/index.mjs +42 -160
- package/dist/widget.d.mts +1 -1
- package/dist/widget.d.ts +1 -1
- package/dist/widget.js +30 -149
- package/dist/widget.mjs +35 -160
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6583,43 +6583,24 @@ var tableGroupController = (props) => {
|
|
|
6583
6583
|
};
|
|
6584
6584
|
|
|
6585
6585
|
// src/widget/advance/search/controller.ts
|
|
6586
|
-
var import_moment = __toESM(require_moment());
|
|
6587
6586
|
import { SearchType } from "@fctc/interface-logic/constants";
|
|
6588
|
-
import {
|
|
6589
|
-
domainHelper as domainHelper2,
|
|
6590
|
-
evalJSONContext as evalJSONContext4,
|
|
6591
|
-
evalJSONDomain as evalJSONDomain4,
|
|
6592
|
-
validateAndParseDate
|
|
6593
|
-
} from "@fctc/interface-logic/utils";
|
|
6587
|
+
import { domainHelper as domainHelper2 } from "@fctc/interface-logic/utils";
|
|
6594
6588
|
import { useCallback as useCallback3, useEffect as useEffect14, useState as useState10 } from "react";
|
|
6595
|
-
|
|
6596
|
-
// src/provider.ts
|
|
6597
|
-
var provider_exports = {};
|
|
6598
|
-
__reExport(provider_exports, provider_star);
|
|
6599
|
-
import * as provider_star from "@fctc/interface-logic/provider";
|
|
6600
|
-
|
|
6601
|
-
// src/widget/advance/search/controller.ts
|
|
6602
6589
|
var searchController = ({
|
|
6603
6590
|
viewData,
|
|
6604
6591
|
actionData,
|
|
6605
6592
|
fieldsList,
|
|
6606
|
-
|
|
6593
|
+
contextSearch,
|
|
6594
|
+
setSearchMap,
|
|
6595
|
+
searchMap
|
|
6607
6596
|
}) => {
|
|
6608
|
-
const { env } = (0, provider_exports.useEnv)();
|
|
6609
|
-
const { context } = actionData || {};
|
|
6610
|
-
const actionContext = typeof context === "string" ? evalJSONContext4(context) : context;
|
|
6611
|
-
const contextSearch = { ...env.context, ...actionContext };
|
|
6612
6597
|
const [filterBy, setFilterBy] = useState10(null);
|
|
6613
6598
|
const [searchBy, setSearchBy] = useState10(null);
|
|
6614
6599
|
const [groupBy, setGroupBy] = useState10(null);
|
|
6615
6600
|
const [selectedTags, setSelectedTags] = useState10(null);
|
|
6616
6601
|
const [searchString, setSearchString] = useState10("");
|
|
6617
|
-
const [searchMap, setSearchMap] = useState10({});
|
|
6618
|
-
const [isReadyFormatDomain, setIsReadyFormatDomain] = useState10(false);
|
|
6619
|
-
const [didInit, setDidInit] = useState10(false);
|
|
6620
6602
|
const aid = actionData?.id;
|
|
6621
6603
|
const model = actionData?.res_model;
|
|
6622
|
-
const domainAction = actionData?.domain ? Array.isArray(actionData?.domain) ? [...actionData?.domain] : evalJSONDomain4(actionData?.domain, contextSearch) : [];
|
|
6623
6604
|
const clearSearch = () => {
|
|
6624
6605
|
setFilterBy([]);
|
|
6625
6606
|
setGroupBy([]);
|
|
@@ -6729,16 +6710,16 @@ var searchController = ({
|
|
|
6729
6710
|
const contexts = [];
|
|
6730
6711
|
let groupValues = [];
|
|
6731
6712
|
objValues?.forEach((objValue) => {
|
|
6732
|
-
const { context
|
|
6713
|
+
const { context, value, active, groupIndex: groupIndex2, isDefault } = objValue;
|
|
6733
6714
|
const indexAppend = groupIndex2 != null ? groupIndex2 : viewData?.views?.search?.filters_by?.length ?? 0;
|
|
6734
6715
|
contexts.push(
|
|
6735
|
-
...Array.isArray(
|
|
6716
|
+
...Array.isArray(context?.group_by) ? context.group_by.map((item) => ({ group_by: item })) : [context]
|
|
6736
6717
|
);
|
|
6737
6718
|
groupValues[indexAppend] = {
|
|
6738
6719
|
contexts: [
|
|
6739
|
-
...Array.isArray(
|
|
6720
|
+
...Array.isArray(context?.group_by) ? context.group_by.map((item) => ({
|
|
6740
6721
|
group_by: item
|
|
6741
|
-
})) : [
|
|
6722
|
+
})) : [context]
|
|
6742
6723
|
],
|
|
6743
6724
|
strings: isDefault ? [value] : [...groupValues[indexAppend]?.strings ?? [], value]
|
|
6744
6725
|
};
|
|
@@ -6768,51 +6749,6 @@ var searchController = ({
|
|
|
6768
6749
|
setSelectedTags(null);
|
|
6769
6750
|
setTagSearch(searchMap);
|
|
6770
6751
|
}, [searchMap]);
|
|
6771
|
-
const formatDomain = () => {
|
|
6772
|
-
if (domainAction) {
|
|
6773
|
-
const domain = [];
|
|
6774
|
-
if (domainAction?.length > 0) {
|
|
6775
|
-
if (Object.keys(searchMap).length > 0) {
|
|
6776
|
-
domain.push("&");
|
|
6777
|
-
}
|
|
6778
|
-
domainAction.forEach((domainItem) => {
|
|
6779
|
-
domain.push(domainItem);
|
|
6780
|
-
});
|
|
6781
|
-
}
|
|
6782
|
-
Object.keys(searchMap).forEach((key, keyIndex, keys) => {
|
|
6783
|
-
if (!key?.includes(SearchType.GROUP)) {
|
|
6784
|
-
if (keys.length > 1 && keyIndex < keys.length - 1) {
|
|
6785
|
-
domain.push("&");
|
|
6786
|
-
}
|
|
6787
|
-
const valuesOfKey = searchMap[key];
|
|
6788
|
-
valuesOfKey.forEach((value, index) => {
|
|
6789
|
-
if (index < valuesOfKey.length - 1) {
|
|
6790
|
-
domain.push("|");
|
|
6791
|
-
}
|
|
6792
|
-
if (value.domain) {
|
|
6793
|
-
domain.push(...value.domain);
|
|
6794
|
-
return;
|
|
6795
|
-
}
|
|
6796
|
-
let valueDomainItem = value?.value;
|
|
6797
|
-
if (value?.modelType === "date") {
|
|
6798
|
-
valueDomainItem = validateAndParseDate(value?.value);
|
|
6799
|
-
} else if (value?.modelType === "datetime") {
|
|
6800
|
-
if (value?.operator === "<=" || value?.operator === "<") {
|
|
6801
|
-
const parsedDate = validateAndParseDate(value?.value, true);
|
|
6802
|
-
const hasTime = (0, import_moment.default)(value?.value).format("HH:mm:ss") !== "00:00:00";
|
|
6803
|
-
valueDomainItem = hasTime ? (0, import_moment.default)(parsedDate).format("YYYY-MM-DD HH:mm:ss") : (0, import_moment.default)(parsedDate).add(1, "day").subtract(1, "second").format("YYYY-MM-DD HH:mm:ss");
|
|
6804
|
-
} else {
|
|
6805
|
-
valueDomainItem = validateAndParseDate(value?.value, true);
|
|
6806
|
-
}
|
|
6807
|
-
}
|
|
6808
|
-
const operator = value?.modelType === "date" || value?.modelType === "datetime" || value?.modelType === "boolean" || value?.modelType === "integer" ? value?.operator ?? "=" : value.operator ?? "ilike";
|
|
6809
|
-
domain.push([value.name, operator, valueDomainItem]);
|
|
6810
|
-
});
|
|
6811
|
-
}
|
|
6812
|
-
});
|
|
6813
|
-
return [...domain];
|
|
6814
|
-
}
|
|
6815
|
-
};
|
|
6816
6752
|
const handleAddTagSearch = (tag) => {
|
|
6817
6753
|
const {
|
|
6818
6754
|
domain,
|
|
@@ -6820,7 +6756,7 @@ var searchController = ({
|
|
|
6820
6756
|
value,
|
|
6821
6757
|
type,
|
|
6822
6758
|
title,
|
|
6823
|
-
context
|
|
6759
|
+
context,
|
|
6824
6760
|
active,
|
|
6825
6761
|
dataIndex
|
|
6826
6762
|
} = tag;
|
|
@@ -6828,13 +6764,13 @@ var searchController = ({
|
|
|
6828
6764
|
if (type === SearchType.FILTER) {
|
|
6829
6765
|
addSearchItems(`${SearchType.FILTER}_${groupIndex}`, {
|
|
6830
6766
|
...tag,
|
|
6831
|
-
domain: domain ? domainFormat.toList(
|
|
6767
|
+
domain: domain ? domainFormat.toList(context) : null
|
|
6832
6768
|
});
|
|
6833
6769
|
} else if (type === SearchType.SEARCH) {
|
|
6834
6770
|
addSearchItems(`${SearchType.SEARCH}_${String(dataIndex)}`, {
|
|
6835
6771
|
...tag,
|
|
6836
6772
|
domain: domain ? domainFormat.toList({
|
|
6837
|
-
...
|
|
6773
|
+
...context,
|
|
6838
6774
|
self: value
|
|
6839
6775
|
}) : null
|
|
6840
6776
|
});
|
|
@@ -6842,73 +6778,12 @@ var searchController = ({
|
|
|
6842
6778
|
addSearchItems(`${SearchType.GROUP}`, {
|
|
6843
6779
|
...tag,
|
|
6844
6780
|
domain: domain ? domainFormat.toList({
|
|
6845
|
-
context
|
|
6781
|
+
context,
|
|
6846
6782
|
self: value
|
|
6847
6783
|
}) : null
|
|
6848
6784
|
});
|
|
6849
6785
|
}
|
|
6850
6786
|
};
|
|
6851
|
-
useEffect14(() => {
|
|
6852
|
-
if (isReadyFormatDomain) {
|
|
6853
|
-
(0, store_exports.setPage)(0);
|
|
6854
|
-
(0, store_exports.setSelectedRowKeys)([]);
|
|
6855
|
-
const containSearchFilter = selectedTags?.length > 0 && selectedTags?.find(
|
|
6856
|
-
(item) => item?.type === SearchType.FILTER || item?.type === SearchType.SEARCH || item?.type === SearchType.GROUP
|
|
6857
|
-
);
|
|
6858
|
-
if (containSearchFilter || Array.isArray(selectedTags) && selectedTags?.length === 0) {
|
|
6859
|
-
setDomain(formatDomain());
|
|
6860
|
-
}
|
|
6861
|
-
}
|
|
6862
|
-
return () => {
|
|
6863
|
-
setDidInit(false);
|
|
6864
|
-
setIsReadyFormatDomain(false);
|
|
6865
|
-
};
|
|
6866
|
-
}, [selectedTags, isReadyFormatDomain]);
|
|
6867
|
-
useEffect14(() => {
|
|
6868
|
-
if (didInit || selectedTags?.length > 0 || !fieldsList || fieldsList?.length === 0)
|
|
6869
|
-
return;
|
|
6870
|
-
const searchDefaults = Object.entries(actionContext || {}).filter(
|
|
6871
|
-
([key]) => key.startsWith("search_default_")
|
|
6872
|
-
);
|
|
6873
|
-
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
6874
|
-
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
6875
|
-
setIsReadyFormatDomain(true);
|
|
6876
|
-
setDidInit(true);
|
|
6877
|
-
return;
|
|
6878
|
-
}
|
|
6879
|
-
const updatedFilter = filterBy?.map((item) => {
|
|
6880
|
-
const matched = searchDefaults.find(
|
|
6881
|
-
([key]) => key.split("search_default_")[1] === item.name
|
|
6882
|
-
);
|
|
6883
|
-
if (matched && !item.active) {
|
|
6884
|
-
handleAddTagSearch?.({
|
|
6885
|
-
name: item?.name,
|
|
6886
|
-
value: item?.string ?? item?.help,
|
|
6887
|
-
domain: item?.domain,
|
|
6888
|
-
groupIndex: item?.group_index,
|
|
6889
|
-
type: SearchType.FILTER
|
|
6890
|
-
});
|
|
6891
|
-
return { ...item, active: true };
|
|
6892
|
-
}
|
|
6893
|
-
return item;
|
|
6894
|
-
});
|
|
6895
|
-
if (updatedFilter) setFilterBy(updatedFilter);
|
|
6896
|
-
if (hasGroupBy) {
|
|
6897
|
-
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
6898
|
-
const groupCtx = evalJSONContext4(item?.context);
|
|
6899
|
-
handleAddTagSearch?.({
|
|
6900
|
-
name: item?.name,
|
|
6901
|
-
value: item?.display_name,
|
|
6902
|
-
type: SearchType.GROUP,
|
|
6903
|
-
context: groupCtx,
|
|
6904
|
-
groupIndex: idx,
|
|
6905
|
-
isDefault: true
|
|
6906
|
-
});
|
|
6907
|
-
});
|
|
6908
|
-
setDidInit(true);
|
|
6909
|
-
}
|
|
6910
|
-
setIsReadyFormatDomain(true);
|
|
6911
|
-
}, [aid, fieldsList]);
|
|
6912
6787
|
return {
|
|
6913
6788
|
groupBy,
|
|
6914
6789
|
searchBy,
|
|
@@ -6934,11 +6809,11 @@ import {
|
|
|
6934
6809
|
selectSearch as selectSearch6,
|
|
6935
6810
|
setFirstDomain,
|
|
6936
6811
|
setViewDataStore,
|
|
6937
|
-
setPage
|
|
6812
|
+
setPage,
|
|
6938
6813
|
setGroupByDomain
|
|
6939
6814
|
} from "@fctc/interface-logic/store";
|
|
6940
6815
|
import {
|
|
6941
|
-
evalJSONContext as
|
|
6816
|
+
evalJSONContext as evalJSONContext4,
|
|
6942
6817
|
formatSortingString as formatSortingString2
|
|
6943
6818
|
} from "@fctc/interface-logic/utils";
|
|
6944
6819
|
var many2manyFieldController = (props) => {
|
|
@@ -6949,7 +6824,7 @@ var many2manyFieldController = (props) => {
|
|
|
6949
6824
|
tab,
|
|
6950
6825
|
model,
|
|
6951
6826
|
aid,
|
|
6952
|
-
setSelectedRowKeys:
|
|
6827
|
+
setSelectedRowKeys: setSelectedRowKeys4,
|
|
6953
6828
|
fields,
|
|
6954
6829
|
setFields,
|
|
6955
6830
|
groupByDomain,
|
|
@@ -7003,7 +6878,7 @@ var many2manyFieldController = (props) => {
|
|
|
7003
6878
|
return null;
|
|
7004
6879
|
}, [modelInstance]);
|
|
7005
6880
|
const default_order = viewResponse && viewResponse?.views?.list?.default_order;
|
|
7006
|
-
const optionsObject = tab?.options ?
|
|
6881
|
+
const optionsObject = tab?.options ? evalJSONContext4(tab?.options) : (options ? evalJSONContext4(options) : {}) || {};
|
|
7007
6882
|
const fetchData = async () => {
|
|
7008
6883
|
try {
|
|
7009
6884
|
setDomainMany2Many(domain);
|
|
@@ -7019,7 +6894,7 @@ var many2manyFieldController = (props) => {
|
|
|
7019
6894
|
[`${aid}_${relation}_popupmany2many`]: modalData
|
|
7020
6895
|
});
|
|
7021
6896
|
}
|
|
7022
|
-
appDispatch(
|
|
6897
|
+
appDispatch(setPage(0));
|
|
7023
6898
|
} catch (err) {
|
|
7024
6899
|
console.log(err);
|
|
7025
6900
|
}
|
|
@@ -7060,8 +6935,8 @@ var many2manyFieldController = (props) => {
|
|
|
7060
6935
|
...prevFields,
|
|
7061
6936
|
[`${aid}_${relation}_popupmany2many`]: null
|
|
7062
6937
|
}));
|
|
7063
|
-
appDispatch(
|
|
7064
|
-
|
|
6938
|
+
appDispatch(setPage(0));
|
|
6939
|
+
setSelectedRowKeys4([]);
|
|
7065
6940
|
setDomainMany2Many(null);
|
|
7066
6941
|
setIsLoadedData(false);
|
|
7067
6942
|
};
|
|
@@ -7115,7 +6990,7 @@ import { useMemo as useMemo14 } from "react";
|
|
|
7115
6990
|
import { WIDGETAVATAR, WIDGETCOLOR } from "@fctc/interface-logic/constants";
|
|
7116
6991
|
import { getEnv as getEnv9 } from "@fctc/interface-logic/environment";
|
|
7117
6992
|
import { useGetSelection as useGetSelection3 } from "@fctc/interface-logic/hooks";
|
|
7118
|
-
import { evalJSONContext as
|
|
6993
|
+
import { evalJSONContext as evalJSONContext5, evalJSONDomain as evalJSONDomain4 } from "@fctc/interface-logic/utils";
|
|
7119
6994
|
var many2manyTagsController = (props) => {
|
|
7120
6995
|
const {
|
|
7121
6996
|
relation,
|
|
@@ -7127,9 +7002,9 @@ var many2manyTagsController = (props) => {
|
|
|
7127
7002
|
} = props;
|
|
7128
7003
|
const isUser = relation === "res.users" || relation === "res.partner";
|
|
7129
7004
|
const env = getEnv9();
|
|
7130
|
-
const addtionalFields = optionsFields ?
|
|
7005
|
+
const addtionalFields = optionsFields ? evalJSONContext5(optionsFields) : null;
|
|
7131
7006
|
const domainObject = useMemo14(
|
|
7132
|
-
() =>
|
|
7007
|
+
() => evalJSONDomain4(domain, JSON.parse(JSON.stringify(formValues || {}))),
|
|
7133
7008
|
[domain, formValues]
|
|
7134
7009
|
);
|
|
7135
7010
|
const data = {
|
|
@@ -7174,7 +7049,7 @@ var many2manyTagsController = (props) => {
|
|
|
7174
7049
|
import { useState as useState12 } from "react";
|
|
7175
7050
|
import { useGetListData as useGetListData4, useChangeStatus } from "@fctc/interface-logic/hooks";
|
|
7176
7051
|
import { useAppSelector as useAppSelector8, selectEnv as selectEnv2 } from "@fctc/interface-logic/store";
|
|
7177
|
-
import { evalJSONDomain as
|
|
7052
|
+
import { evalJSONDomain as evalJSONDomain5 } from "@fctc/interface-logic/utils";
|
|
7178
7053
|
var durationController = (props) => {
|
|
7179
7054
|
const {
|
|
7180
7055
|
relation,
|
|
@@ -7198,7 +7073,7 @@ var durationController = (props) => {
|
|
|
7198
7073
|
const listDataProps = {
|
|
7199
7074
|
model: relation,
|
|
7200
7075
|
specification,
|
|
7201
|
-
domain:
|
|
7076
|
+
domain: evalJSONDomain5(domain, JSON.parse(JSON.stringify(formValues))),
|
|
7202
7077
|
limit: 10,
|
|
7203
7078
|
offset: 0,
|
|
7204
7079
|
fields: "",
|
|
@@ -7246,7 +7121,7 @@ var durationController = (props) => {
|
|
|
7246
7121
|
|
|
7247
7122
|
// src/widget/basic/priority-field/controller.ts
|
|
7248
7123
|
import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
|
|
7249
|
-
import { evalJSONContext as
|
|
7124
|
+
import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
|
|
7250
7125
|
var priorityFieldController = (props) => {
|
|
7251
7126
|
const {
|
|
7252
7127
|
value,
|
|
@@ -7261,7 +7136,7 @@ var priorityFieldController = (props) => {
|
|
|
7261
7136
|
viewData,
|
|
7262
7137
|
context
|
|
7263
7138
|
} = props;
|
|
7264
|
-
const _context = { ...
|
|
7139
|
+
const _context = { ...evalJSONContext6(actionData?.context) };
|
|
7265
7140
|
const contextObject = { ...context, ..._context };
|
|
7266
7141
|
const defaultPriority = parseInt(value) + 1;
|
|
7267
7142
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
@@ -7567,7 +7442,7 @@ var downLoadBinaryController = (props) => {
|
|
|
7567
7442
|
};
|
|
7568
7443
|
|
|
7569
7444
|
// src/widget/basic/date-field/controller.ts
|
|
7570
|
-
var
|
|
7445
|
+
var import_moment = __toESM(require_moment());
|
|
7571
7446
|
var DURATIONS = {
|
|
7572
7447
|
PAST: "past",
|
|
7573
7448
|
NOW: "now",
|
|
@@ -7594,8 +7469,8 @@ var dateFieldController = (props) => {
|
|
|
7594
7469
|
const formatDate = showTime ? "DD/MM/YYYY HH:mm:ss" : "DD/MM/YYYY";
|
|
7595
7470
|
const formatDateParse = showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
7596
7471
|
const fieldForCustom = widget === "datetime_custom" || widget === "date_custom";
|
|
7597
|
-
const minNowValue = fieldForCustom && (min === DURATIONS.NOW ? true : typeof min === "string" && Object.keys(formValues)?.includes(min) && formValues?.[min] ? (0,
|
|
7598
|
-
const maxNowValue = fieldForCustom && (max === DURATIONS.NOW ? true : typeof max === "string" && Object.keys(formValues)?.includes(max) && formValues?.[max] ? (0,
|
|
7472
|
+
const minNowValue = fieldForCustom && (min === DURATIONS.NOW ? true : typeof min === "string" && Object.keys(formValues)?.includes(min) && formValues?.[min] ? (0, import_moment.default)(formValues?.[min], formatDateParse).add(7, "hours") : null);
|
|
7473
|
+
const maxNowValue = fieldForCustom && (max === DURATIONS.NOW ? true : typeof max === "string" && Object.keys(formValues)?.includes(max) && formValues?.[max] ? (0, import_moment.default)(formValues?.[max], formatDateParse).add(7, "hours") : null);
|
|
7599
7474
|
const years = range(
|
|
7600
7475
|
minNowValue ? (/* @__PURE__ */ new Date()).getFullYear() : 1990,
|
|
7601
7476
|
(/* @__PURE__ */ new Date()).getFullYear() + 4,
|
|
@@ -7630,8 +7505,8 @@ var dateFieldController = (props) => {
|
|
|
7630
7505
|
"December"
|
|
7631
7506
|
];
|
|
7632
7507
|
const customValidateMinMax = (date) => {
|
|
7633
|
-
const selected = (0,
|
|
7634
|
-
const now = (0,
|
|
7508
|
+
const selected = (0, import_moment.default)(date, formatDateParse);
|
|
7509
|
+
const now = (0, import_moment.default)();
|
|
7635
7510
|
const compareSelected = showTime ? selected : selected.clone().startOf("day");
|
|
7636
7511
|
const compareNow = showTime ? now : now.clone().startOf("day");
|
|
7637
7512
|
if (minNowValue) {
|
|
@@ -7639,7 +7514,7 @@ var dateFieldController = (props) => {
|
|
|
7639
7514
|
return `${i18n_default.t("please_enter")} ${string} ${i18n_default.t(
|
|
7640
7515
|
"greater_or_equal_now"
|
|
7641
7516
|
)}`;
|
|
7642
|
-
} else if (
|
|
7517
|
+
} else if (import_moment.default.isMoment(minNowValue)) {
|
|
7643
7518
|
const compareMin = showTime ? minNowValue : minNowValue.clone().startOf("day");
|
|
7644
7519
|
if (compareSelected.isBefore(compareMin)) {
|
|
7645
7520
|
const fieldRelationDate = viewData?.models?.[model]?.[min ?? ""];
|
|
@@ -7653,7 +7528,7 @@ var dateFieldController = (props) => {
|
|
|
7653
7528
|
return `${i18n_default.t("please_enter")} ${string} ${i18n_default.t(
|
|
7654
7529
|
"less_or_equal_now"
|
|
7655
7530
|
)}`;
|
|
7656
|
-
} else if (
|
|
7531
|
+
} else if (import_moment.default.isMoment(maxNowValue)) {
|
|
7657
7532
|
const compareMax = showTime ? maxNowValue : maxNowValue.clone().startOf("day");
|
|
7658
7533
|
if (compareSelected.isAfter(compareMax)) {
|
|
7659
7534
|
const fieldRelationDate = viewData?.models?.[model]?.[max ?? ""];
|
|
@@ -7700,11 +7575,11 @@ var copyLinkButtonController = (props) => {
|
|
|
7700
7575
|
// src/widget/basic/color-field/color-controller.ts
|
|
7701
7576
|
import { getEnv as getEnv10 } from "@fctc/interface-logic/environment";
|
|
7702
7577
|
import { useSave as useSave3 } from "@fctc/interface-logic/hooks";
|
|
7703
|
-
import { evalJSONContext as
|
|
7578
|
+
import { evalJSONContext as evalJSONContext7 } from "@fctc/interface-logic/utils";
|
|
7704
7579
|
var colorFieldController = (props) => {
|
|
7705
7580
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
7706
7581
|
const env = getEnv10();
|
|
7707
|
-
const _context = { ...
|
|
7582
|
+
const _context = { ...evalJSONContext7(actionData?.context) || {} };
|
|
7708
7583
|
const contextObject = { ...env.context, ..._context };
|
|
7709
7584
|
const idDefault = isForm ? idForm : formValues?.id;
|
|
7710
7585
|
const { mutate: onSave } = useSave3();
|
|
@@ -7861,6 +7736,13 @@ import * as constants_star from "@fctc/interface-logic/constants";
|
|
|
7861
7736
|
// src/index.ts
|
|
7862
7737
|
__reExport(index_exports, constants_exports);
|
|
7863
7738
|
__reExport(index_exports, environment_exports);
|
|
7739
|
+
|
|
7740
|
+
// src/provider.ts
|
|
7741
|
+
var provider_exports = {};
|
|
7742
|
+
__reExport(provider_exports, provider_star);
|
|
7743
|
+
import * as provider_star from "@fctc/interface-logic/provider";
|
|
7744
|
+
|
|
7745
|
+
// src/index.ts
|
|
7864
7746
|
__reExport(index_exports, provider_exports);
|
|
7865
7747
|
|
|
7866
7748
|
// src/services.ts
|
package/dist/widget.d.mts
CHANGED
|
@@ -298,7 +298,7 @@ declare const tableGroupController: (props: any) => {
|
|
|
298
298
|
setPageGroup: react.Dispatch<any>;
|
|
299
299
|
};
|
|
300
300
|
|
|
301
|
-
declare const searchController: ({ viewData, actionData, fieldsList,
|
|
301
|
+
declare const searchController: ({ viewData, actionData, fieldsList, contextSearch, setSearchMap, searchMap, }: any) => {
|
|
302
302
|
groupBy: any;
|
|
303
303
|
searchBy: any;
|
|
304
304
|
filterBy: any;
|
package/dist/widget.d.ts
CHANGED
|
@@ -298,7 +298,7 @@ declare const tableGroupController: (props: any) => {
|
|
|
298
298
|
setPageGroup: react.Dispatch<any>;
|
|
299
299
|
};
|
|
300
300
|
|
|
301
|
-
declare const searchController: ({ viewData, actionData, fieldsList,
|
|
301
|
+
declare const searchController: ({ viewData, actionData, fieldsList, contextSearch, setSearchMap, searchMap, }: any) => {
|
|
302
302
|
groupBy: any;
|
|
303
303
|
searchBy: any;
|
|
304
304
|
filterBy: any;
|