@fctc/widget-logic 1.8.10 → 1.9.1
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 +6 -7
- package/dist/index.mjs +2 -3
- package/dist/types.d.mts +3 -1
- package/dist/types.d.ts +3 -1
- package/dist/widget.d.mts +0 -1
- package/dist/widget.d.ts +0 -1
- package/dist/widget.js +6 -7
- package/dist/widget.mjs +2 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6954,16 +6954,15 @@ var copyLinkButtonController = (props) => {
|
|
|
6954
6954
|
};
|
|
6955
6955
|
|
|
6956
6956
|
// src/widget/basic/color-field/color-controller.ts
|
|
6957
|
-
var import_environment8 = require("@fctc/interface-logic/environment");
|
|
6958
|
-
var import_hooks16 = require("@fctc/interface-logic/hooks");
|
|
6959
6957
|
var import_utils12 = require("@fctc/interface-logic/utils");
|
|
6960
6958
|
var colorFieldController = (props) => {
|
|
6961
6959
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
6962
|
-
const env = (0,
|
|
6960
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6961
|
+
const { useSave: useSave3 } = (0, provider_exports.useService)();
|
|
6963
6962
|
const _context = { ...(0, import_utils12.evalJSONContext)(actionData?.context) || {} };
|
|
6964
6963
|
const contextObject = { ...env.context, ..._context };
|
|
6965
6964
|
const idDefault = isForm ? idForm : formValues?.id;
|
|
6966
|
-
const { mutate: onSave } = (
|
|
6965
|
+
const { mutate: onSave } = useSave3();
|
|
6967
6966
|
const savePickColor = async (colorObject) => {
|
|
6968
6967
|
const { id } = colorObject;
|
|
6969
6968
|
if (value === id) return;
|
|
@@ -7270,7 +7269,7 @@ var tableController = ({ data }) => {
|
|
|
7270
7269
|
|
|
7271
7270
|
// src/widget/advance/table/table-group/controller.ts
|
|
7272
7271
|
var import_react25 = require("react");
|
|
7273
|
-
var
|
|
7272
|
+
var import_hooks16 = require("@fctc/interface-logic/hooks");
|
|
7274
7273
|
var import_store12 = require("@fctc/interface-logic/store");
|
|
7275
7274
|
|
|
7276
7275
|
// src/environment.ts
|
|
@@ -7302,7 +7301,7 @@ var tableGroupController = (props) => {
|
|
|
7302
7301
|
const { groupByDomain, selectedTags } = (0, import_store12.useAppSelector)(import_store12.selectSearch);
|
|
7303
7302
|
const { selectedRowKeys } = (0, import_store12.useAppSelector)(import_store12.selectList);
|
|
7304
7303
|
const appDispatch = (0, import_store12.useAppDispatch)();
|
|
7305
|
-
const { toDataJS } = (0,
|
|
7304
|
+
const { toDataJS } = (0, import_hooks16.useOdooDataTransform)();
|
|
7306
7305
|
const initVal = toDataJS(row, viewData, model);
|
|
7307
7306
|
const [isShowGroup, setIsShowGroup] = (0, import_react25.useState)(false);
|
|
7308
7307
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react25.useState)({
|
|
@@ -7349,7 +7348,7 @@ var tableGroupController = (props) => {
|
|
|
7349
7348
|
isPlaceholderData,
|
|
7350
7349
|
isLoading,
|
|
7351
7350
|
isFetching
|
|
7352
|
-
} = (0,
|
|
7351
|
+
} = (0, import_hooks16.useGetListData)(listDataProps, queryKey, enabled);
|
|
7353
7352
|
const {
|
|
7354
7353
|
columns: columnsGroup,
|
|
7355
7354
|
rows: rowsGroup,
|
package/dist/index.mjs
CHANGED
|
@@ -6996,12 +6996,11 @@ var copyLinkButtonController = (props) => {
|
|
|
6996
6996
|
};
|
|
6997
6997
|
|
|
6998
6998
|
// src/widget/basic/color-field/color-controller.ts
|
|
6999
|
-
import { getEnv as getEnv8 } from "@fctc/interface-logic/environment";
|
|
7000
|
-
import { useSave as useSave3 } from "@fctc/interface-logic/hooks";
|
|
7001
6999
|
import { evalJSONContext as evalJSONContext7 } from "@fctc/interface-logic/utils";
|
|
7002
7000
|
var colorFieldController = (props) => {
|
|
7003
7001
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
7004
|
-
const env =
|
|
7002
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
7003
|
+
const { useSave: useSave3 } = (0, provider_exports.useService)();
|
|
7005
7004
|
const _context = { ...evalJSONContext7(actionData?.context) || {} };
|
|
7006
7005
|
const contextObject = { ...env.context, ..._context };
|
|
7007
7006
|
const idDefault = isForm ? idForm : formValues?.id;
|
package/dist/types.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ interface IInputFieldProps {
|
|
|
11
11
|
readonly?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
placeholder?: string;
|
|
14
|
-
defaultValue?: string | number | ValuePropsType;
|
|
14
|
+
defaultValue?: string | number | ValuePropsType | any;
|
|
15
15
|
invisible?: boolean;
|
|
16
16
|
methods?: any;
|
|
17
17
|
onChange?: (name: string, value: any) => void;
|
|
@@ -26,6 +26,8 @@ interface IInputFieldProps {
|
|
|
26
26
|
model?: string;
|
|
27
27
|
relation?: string;
|
|
28
28
|
domain?: any;
|
|
29
|
+
idForm?: boolean;
|
|
30
|
+
widget?: string;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export type { IInputFieldProps, ValuePropsType };
|
package/dist/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface IInputFieldProps {
|
|
|
11
11
|
readonly?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
placeholder?: string;
|
|
14
|
-
defaultValue?: string | number | ValuePropsType;
|
|
14
|
+
defaultValue?: string | number | ValuePropsType | any;
|
|
15
15
|
invisible?: boolean;
|
|
16
16
|
methods?: any;
|
|
17
17
|
onChange?: (name: string, value: any) => void;
|
|
@@ -26,6 +26,8 @@ interface IInputFieldProps {
|
|
|
26
26
|
model?: string;
|
|
27
27
|
relation?: string;
|
|
28
28
|
domain?: any;
|
|
29
|
+
idForm?: boolean;
|
|
30
|
+
widget?: string;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export type { IInputFieldProps, ValuePropsType };
|
package/dist/widget.d.mts
CHANGED
|
@@ -196,7 +196,6 @@ declare const copyLinkButtonController: (props: IInputFieldProps) => {
|
|
|
196
196
|
|
|
197
197
|
interface IColorFieldProps extends IInputFieldProps {
|
|
198
198
|
actionData: any;
|
|
199
|
-
idForm: number | string;
|
|
200
199
|
}
|
|
201
200
|
|
|
202
201
|
declare const colorFieldController: (props: IColorFieldProps) => {
|
package/dist/widget.d.ts
CHANGED
|
@@ -196,7 +196,6 @@ declare const copyLinkButtonController: (props: IInputFieldProps) => {
|
|
|
196
196
|
|
|
197
197
|
interface IColorFieldProps extends IInputFieldProps {
|
|
198
198
|
actionData: any;
|
|
199
|
-
idForm: number | string;
|
|
200
199
|
}
|
|
201
200
|
|
|
202
201
|
declare const colorFieldController: (props: IColorFieldProps) => {
|
package/dist/widget.js
CHANGED
|
@@ -6680,16 +6680,15 @@ var copyLinkButtonController = (props) => {
|
|
|
6680
6680
|
};
|
|
6681
6681
|
|
|
6682
6682
|
// src/widget/basic/color-field/color-controller.ts
|
|
6683
|
-
var import_environment8 = require("@fctc/interface-logic/environment");
|
|
6684
|
-
var import_hooks16 = require("@fctc/interface-logic/hooks");
|
|
6685
6683
|
var import_utils12 = require("@fctc/interface-logic/utils");
|
|
6686
6684
|
var colorFieldController = (props) => {
|
|
6687
6685
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
6688
|
-
const env = (0,
|
|
6686
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6687
|
+
const { useSave: useSave3 } = (0, provider_exports.useService)();
|
|
6689
6688
|
const _context = { ...(0, import_utils12.evalJSONContext)(actionData?.context) || {} };
|
|
6690
6689
|
const contextObject = { ...env.context, ..._context };
|
|
6691
6690
|
const idDefault = isForm ? idForm : formValues?.id;
|
|
6692
|
-
const { mutate: onSave } = (
|
|
6691
|
+
const { mutate: onSave } = useSave3();
|
|
6693
6692
|
const savePickColor = async (colorObject) => {
|
|
6694
6693
|
const { id } = colorObject;
|
|
6695
6694
|
if (value === id) return;
|
|
@@ -6996,7 +6995,7 @@ var tableController = ({ data }) => {
|
|
|
6996
6995
|
|
|
6997
6996
|
// src/widget/advance/table/table-group/controller.ts
|
|
6998
6997
|
var import_react25 = require("react");
|
|
6999
|
-
var
|
|
6998
|
+
var import_hooks16 = require("@fctc/interface-logic/hooks");
|
|
7000
6999
|
var import_store12 = require("@fctc/interface-logic/store");
|
|
7001
7000
|
|
|
7002
7001
|
// src/environment.ts
|
|
@@ -7028,7 +7027,7 @@ var tableGroupController = (props) => {
|
|
|
7028
7027
|
const { groupByDomain, selectedTags } = (0, import_store12.useAppSelector)(import_store12.selectSearch);
|
|
7029
7028
|
const { selectedRowKeys } = (0, import_store12.useAppSelector)(import_store12.selectList);
|
|
7030
7029
|
const appDispatch = (0, import_store12.useAppDispatch)();
|
|
7031
|
-
const { toDataJS } = (0,
|
|
7030
|
+
const { toDataJS } = (0, import_hooks16.useOdooDataTransform)();
|
|
7032
7031
|
const initVal = toDataJS(row, viewData, model);
|
|
7033
7032
|
const [isShowGroup, setIsShowGroup] = (0, import_react25.useState)(false);
|
|
7034
7033
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react25.useState)({
|
|
@@ -7075,7 +7074,7 @@ var tableGroupController = (props) => {
|
|
|
7075
7074
|
isPlaceholderData,
|
|
7076
7075
|
isLoading,
|
|
7077
7076
|
isFetching
|
|
7078
|
-
} = (0,
|
|
7077
|
+
} = (0, import_hooks16.useGetListData)(listDataProps, queryKey, enabled);
|
|
7079
7078
|
const {
|
|
7080
7079
|
columns: columnsGroup,
|
|
7081
7080
|
rows: rowsGroup,
|
package/dist/widget.mjs
CHANGED
|
@@ -6696,12 +6696,11 @@ var copyLinkButtonController = (props) => {
|
|
|
6696
6696
|
};
|
|
6697
6697
|
|
|
6698
6698
|
// src/widget/basic/color-field/color-controller.ts
|
|
6699
|
-
import { getEnv as getEnv8 } from "@fctc/interface-logic/environment";
|
|
6700
|
-
import { useSave as useSave3 } from "@fctc/interface-logic/hooks";
|
|
6701
6699
|
import { evalJSONContext as evalJSONContext7 } from "@fctc/interface-logic/utils";
|
|
6702
6700
|
var colorFieldController = (props) => {
|
|
6703
6701
|
const { value, isForm, name, formValues, idForm, model, actionData } = props;
|
|
6704
|
-
const env =
|
|
6702
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6703
|
+
const { useSave: useSave3 } = (0, provider_exports.useService)();
|
|
6705
6704
|
const _context = { ...evalJSONContext7(actionData?.context) || {} };
|
|
6706
6705
|
const contextObject = { ...env.context, ..._context };
|
|
6707
6706
|
const idDefault = isForm ? idForm : formValues?.id;
|