@fctc/widget-logic 2.3.3 → 2.3.4
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 +49 -21
- package/dist/index.mjs +54 -23
- package/dist/widget.d.mts +22 -3
- package/dist/widget.d.ts +22 -3
- package/dist/widget.js +49 -15
- package/dist/widget.mjs +54 -16
- package/package.json +96 -96
package/dist/index.js
CHANGED
|
@@ -6987,28 +6987,43 @@ var tableController = ({ data }) => {
|
|
|
6987
6987
|
var import_react23 = require("react");
|
|
6988
6988
|
var import_hooks15 = require("@fctc/interface-logic/hooks");
|
|
6989
6989
|
var import_store10 = require("@fctc/interface-logic/store");
|
|
6990
|
+
|
|
6991
|
+
// src/environment.ts
|
|
6992
|
+
var environment_exports = {};
|
|
6993
|
+
__reExport(environment_exports, require("@fctc/interface-logic/environment"));
|
|
6994
|
+
|
|
6995
|
+
// src/widget/advance/table/table-group/controller.ts
|
|
6990
6996
|
var tableGroupController = (props) => {
|
|
6991
|
-
const
|
|
6997
|
+
const env = (0, environment_exports.getEnv)();
|
|
6992
6998
|
const {
|
|
6999
|
+
rows,
|
|
6993
7000
|
columns,
|
|
7001
|
+
indexRow,
|
|
6994
7002
|
row,
|
|
6995
7003
|
model,
|
|
6996
7004
|
viewData,
|
|
7005
|
+
renderField,
|
|
6997
7006
|
level,
|
|
6998
7007
|
specification,
|
|
7008
|
+
domain,
|
|
6999
7009
|
context,
|
|
7000
|
-
checkedAll
|
|
7010
|
+
checkedAll,
|
|
7011
|
+
isDisplayCheckbox,
|
|
7012
|
+
isAutoSelect,
|
|
7013
|
+
setIsAutoSelect,
|
|
7014
|
+
selectedRowKeysRef
|
|
7001
7015
|
} = props;
|
|
7002
7016
|
const [pageGroup, setPageGroup] = (0, import_react23.useState)(0);
|
|
7003
7017
|
const { groupByDomain, selectedTags } = (0, import_store10.useAppSelector)(import_store10.selectSearch);
|
|
7004
7018
|
const { selectedRowKeys } = (0, import_store10.useAppSelector)(import_store10.selectList);
|
|
7005
7019
|
const appDispatch = (0, import_store10.useAppDispatch)();
|
|
7020
|
+
const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
|
|
7021
|
+
const initVal = toDataJS(row, viewData, model);
|
|
7006
7022
|
const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
|
|
7007
7023
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
|
|
7008
7024
|
fromStart: 1,
|
|
7009
7025
|
fromEnd: 1
|
|
7010
7026
|
});
|
|
7011
|
-
const domain = row?.__domain;
|
|
7012
7027
|
const processedData = (0, import_react23.useMemo)(() => {
|
|
7013
7028
|
const calculateColSpanEmpty = () => {
|
|
7014
7029
|
const startIndex = columns.findIndex(
|
|
@@ -7038,14 +7053,15 @@ var tableGroupController = (props) => {
|
|
|
7038
7053
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
7039
7054
|
};
|
|
7040
7055
|
const queryKey = [
|
|
7041
|
-
`data-${model}
|
|
7056
|
+
`data-${model}--${level}-row${indexRow}`,
|
|
7042
7057
|
specification,
|
|
7043
7058
|
domain,
|
|
7044
7059
|
pageGroup
|
|
7045
7060
|
];
|
|
7046
7061
|
const {
|
|
7047
|
-
data:
|
|
7048
|
-
isFetched:
|
|
7062
|
+
data: dataResponse,
|
|
7063
|
+
isFetched: isQueryFetched,
|
|
7064
|
+
isPlaceholderData,
|
|
7049
7065
|
isLoading,
|
|
7050
7066
|
isFetching
|
|
7051
7067
|
} = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
|
|
@@ -7056,12 +7072,13 @@ var tableGroupController = (props) => {
|
|
|
7056
7072
|
} = tableController({
|
|
7057
7073
|
data: {
|
|
7058
7074
|
fields: viewData?.views?.list?.fields,
|
|
7059
|
-
records:
|
|
7075
|
+
records: dataResponse?.records ?? dataResponse?.groups,
|
|
7060
7076
|
dataModel: viewData?.models?.[model],
|
|
7061
7077
|
context: env.context,
|
|
7062
|
-
typeTable:
|
|
7078
|
+
typeTable: dataResponse?.groups ? "group" : "list"
|
|
7063
7079
|
}
|
|
7064
7080
|
});
|
|
7081
|
+
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
7065
7082
|
(0, import_react23.useEffect)(() => {
|
|
7066
7083
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
7067
7084
|
setIsShowGroup(false);
|
|
@@ -7073,7 +7090,7 @@ var tableGroupController = (props) => {
|
|
|
7073
7090
|
)?.[1] : row[group_by_field_name];
|
|
7074
7091
|
const nameGroupWithCount = `${typeof nameGroup === "string" ? nameGroup : typeof nameGroup === "boolean" && nameGroup ? i18n_default.t("yes") : i18n_default.t("no")} (${row[`${group_by_field_name?.split(":")?.[0]}_count`]})`;
|
|
7075
7092
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
7076
|
-
const
|
|
7093
|
+
const handleExpandChildGroup = () => {
|
|
7077
7094
|
if (isLoading || isFetching) return;
|
|
7078
7095
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
7079
7096
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -7086,7 +7103,7 @@ var tableGroupController = (props) => {
|
|
|
7086
7103
|
(id) => !ids.includes(id)
|
|
7087
7104
|
);
|
|
7088
7105
|
appDispatch((0, import_store10.setSelectedRowKeys)(filteredIds));
|
|
7089
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
7106
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isQueryFetched) {
|
|
7090
7107
|
const clonedKeys = [...selectedRowKeys];
|
|
7091
7108
|
appDispatch((0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]));
|
|
7092
7109
|
setTimeout(() => appDispatch((0, import_store10.setSelectedRowKeys)(clonedKeys)), 500);
|
|
@@ -7097,22 +7114,39 @@ var tableGroupController = (props) => {
|
|
|
7097
7114
|
toggleShowGroup();
|
|
7098
7115
|
};
|
|
7099
7116
|
(0, import_react23.useEffect)(() => {
|
|
7100
|
-
if (!
|
|
7117
|
+
if (!isQueryFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
7101
7118
|
return;
|
|
7102
7119
|
}
|
|
7103
7120
|
const clonedKeys = [...selectedRowKeys];
|
|
7104
7121
|
(0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]);
|
|
7105
7122
|
setTimeout(() => (0, import_store10.setSelectedRowKeys)(clonedKeys), 500);
|
|
7106
|
-
}, [
|
|
7123
|
+
}, [isQueryFetched]);
|
|
7107
7124
|
return {
|
|
7108
|
-
|
|
7125
|
+
handleExpandChildGroup,
|
|
7109
7126
|
colEmptyGroup,
|
|
7127
|
+
leftPadding,
|
|
7110
7128
|
isShowGroup,
|
|
7111
|
-
|
|
7129
|
+
isQueryFetched,
|
|
7112
7130
|
nameGroupWithCount,
|
|
7131
|
+
columns,
|
|
7132
|
+
row,
|
|
7133
|
+
isPlaceholderData,
|
|
7113
7134
|
columnsGroup,
|
|
7135
|
+
indexRow,
|
|
7114
7136
|
rowsGroup,
|
|
7115
|
-
|
|
7137
|
+
model,
|
|
7138
|
+
viewData,
|
|
7139
|
+
renderField,
|
|
7140
|
+
level,
|
|
7141
|
+
specification,
|
|
7142
|
+
context,
|
|
7143
|
+
checkedAll,
|
|
7144
|
+
isDisplayCheckbox,
|
|
7145
|
+
isAutoSelect,
|
|
7146
|
+
setIsAutoSelect,
|
|
7147
|
+
selectedRowKeysRef,
|
|
7148
|
+
initVal,
|
|
7149
|
+
dataResponse,
|
|
7116
7150
|
pageGroup,
|
|
7117
7151
|
setPageGroup
|
|
7118
7152
|
};
|
|
@@ -7395,12 +7429,6 @@ __reExport(constants_exports, require("@fctc/interface-logic/constants"));
|
|
|
7395
7429
|
|
|
7396
7430
|
// src/index.ts
|
|
7397
7431
|
__reExport(index_exports, constants_exports, module.exports);
|
|
7398
|
-
|
|
7399
|
-
// src/environment.ts
|
|
7400
|
-
var environment_exports = {};
|
|
7401
|
-
__reExport(environment_exports, require("@fctc/interface-logic/environment"));
|
|
7402
|
-
|
|
7403
|
-
// src/index.ts
|
|
7404
7432
|
__reExport(index_exports, environment_exports, module.exports);
|
|
7405
7433
|
__reExport(index_exports, provider_exports, module.exports);
|
|
7406
7434
|
|
package/dist/index.mjs
CHANGED
|
@@ -7028,7 +7028,10 @@ var tableController = ({ data }) => {
|
|
|
7028
7028
|
|
|
7029
7029
|
// src/widget/advance/table/table-group/controller.ts
|
|
7030
7030
|
import { useEffect as useEffect14, useMemo as useMemo13, useState as useState15 } from "react";
|
|
7031
|
-
import {
|
|
7031
|
+
import {
|
|
7032
|
+
useOdooDataTransform,
|
|
7033
|
+
useGetListData as useGetListData2
|
|
7034
|
+
} from "@fctc/interface-logic/hooks";
|
|
7032
7035
|
import {
|
|
7033
7036
|
useAppSelector as useAppSelector6,
|
|
7034
7037
|
selectSearch as selectSearch5,
|
|
@@ -7036,28 +7039,44 @@ import {
|
|
|
7036
7039
|
useAppDispatch as useAppDispatch6,
|
|
7037
7040
|
setSelectedRowKeys as setSelectedRowKeys2
|
|
7038
7041
|
} from "@fctc/interface-logic/store";
|
|
7042
|
+
|
|
7043
|
+
// src/environment.ts
|
|
7044
|
+
var environment_exports = {};
|
|
7045
|
+
__reExport(environment_exports, environment_star);
|
|
7046
|
+
import * as environment_star from "@fctc/interface-logic/environment";
|
|
7047
|
+
|
|
7048
|
+
// src/widget/advance/table/table-group/controller.ts
|
|
7039
7049
|
var tableGroupController = (props) => {
|
|
7040
|
-
const
|
|
7050
|
+
const env = (0, environment_exports.getEnv)();
|
|
7041
7051
|
const {
|
|
7052
|
+
rows,
|
|
7042
7053
|
columns,
|
|
7054
|
+
indexRow,
|
|
7043
7055
|
row,
|
|
7044
7056
|
model,
|
|
7045
7057
|
viewData,
|
|
7058
|
+
renderField,
|
|
7046
7059
|
level,
|
|
7047
7060
|
specification,
|
|
7061
|
+
domain,
|
|
7048
7062
|
context,
|
|
7049
|
-
checkedAll
|
|
7063
|
+
checkedAll,
|
|
7064
|
+
isDisplayCheckbox,
|
|
7065
|
+
isAutoSelect,
|
|
7066
|
+
setIsAutoSelect,
|
|
7067
|
+
selectedRowKeysRef
|
|
7050
7068
|
} = props;
|
|
7051
7069
|
const [pageGroup, setPageGroup] = useState15(0);
|
|
7052
7070
|
const { groupByDomain, selectedTags } = useAppSelector6(selectSearch5);
|
|
7053
7071
|
const { selectedRowKeys } = useAppSelector6(selectList4);
|
|
7054
7072
|
const appDispatch = useAppDispatch6();
|
|
7073
|
+
const { toDataJS } = useOdooDataTransform();
|
|
7074
|
+
const initVal = toDataJS(row, viewData, model);
|
|
7055
7075
|
const [isShowGroup, setIsShowGroup] = useState15(false);
|
|
7056
7076
|
const [colEmptyGroup, setColEmptyGroup] = useState15({
|
|
7057
7077
|
fromStart: 1,
|
|
7058
7078
|
fromEnd: 1
|
|
7059
7079
|
});
|
|
7060
|
-
const domain = row?.__domain;
|
|
7061
7080
|
const processedData = useMemo13(() => {
|
|
7062
7081
|
const calculateColSpanEmpty = () => {
|
|
7063
7082
|
const startIndex = columns.findIndex(
|
|
@@ -7087,14 +7106,15 @@ var tableGroupController = (props) => {
|
|
|
7087
7106
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
7088
7107
|
};
|
|
7089
7108
|
const queryKey = [
|
|
7090
|
-
`data-${model}
|
|
7109
|
+
`data-${model}--${level}-row${indexRow}`,
|
|
7091
7110
|
specification,
|
|
7092
7111
|
domain,
|
|
7093
7112
|
pageGroup
|
|
7094
7113
|
];
|
|
7095
7114
|
const {
|
|
7096
|
-
data:
|
|
7097
|
-
isFetched:
|
|
7115
|
+
data: dataResponse,
|
|
7116
|
+
isFetched: isQueryFetched,
|
|
7117
|
+
isPlaceholderData,
|
|
7098
7118
|
isLoading,
|
|
7099
7119
|
isFetching
|
|
7100
7120
|
} = useGetListData2(listDataProps, queryKey, enabled);
|
|
@@ -7105,12 +7125,13 @@ var tableGroupController = (props) => {
|
|
|
7105
7125
|
} = tableController({
|
|
7106
7126
|
data: {
|
|
7107
7127
|
fields: viewData?.views?.list?.fields,
|
|
7108
|
-
records:
|
|
7128
|
+
records: dataResponse?.records ?? dataResponse?.groups,
|
|
7109
7129
|
dataModel: viewData?.models?.[model],
|
|
7110
7130
|
context: env.context,
|
|
7111
|
-
typeTable:
|
|
7131
|
+
typeTable: dataResponse?.groups ? "group" : "list"
|
|
7112
7132
|
}
|
|
7113
7133
|
});
|
|
7134
|
+
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
7114
7135
|
useEffect14(() => {
|
|
7115
7136
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
7116
7137
|
setIsShowGroup(false);
|
|
@@ -7122,7 +7143,7 @@ var tableGroupController = (props) => {
|
|
|
7122
7143
|
)?.[1] : row[group_by_field_name];
|
|
7123
7144
|
const nameGroupWithCount = `${typeof nameGroup === "string" ? nameGroup : typeof nameGroup === "boolean" && nameGroup ? i18n_default.t("yes") : i18n_default.t("no")} (${row[`${group_by_field_name?.split(":")?.[0]}_count`]})`;
|
|
7124
7145
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
7125
|
-
const
|
|
7146
|
+
const handleExpandChildGroup = () => {
|
|
7126
7147
|
if (isLoading || isFetching) return;
|
|
7127
7148
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
7128
7149
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -7135,7 +7156,7 @@ var tableGroupController = (props) => {
|
|
|
7135
7156
|
(id) => !ids.includes(id)
|
|
7136
7157
|
);
|
|
7137
7158
|
appDispatch(setSelectedRowKeys2(filteredIds));
|
|
7138
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
7159
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isQueryFetched) {
|
|
7139
7160
|
const clonedKeys = [...selectedRowKeys];
|
|
7140
7161
|
appDispatch(setSelectedRowKeys2([...clonedKeys, -1]));
|
|
7141
7162
|
setTimeout(() => appDispatch(setSelectedRowKeys2(clonedKeys)), 500);
|
|
@@ -7146,22 +7167,39 @@ var tableGroupController = (props) => {
|
|
|
7146
7167
|
toggleShowGroup();
|
|
7147
7168
|
};
|
|
7148
7169
|
useEffect14(() => {
|
|
7149
|
-
if (!
|
|
7170
|
+
if (!isQueryFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
7150
7171
|
return;
|
|
7151
7172
|
}
|
|
7152
7173
|
const clonedKeys = [...selectedRowKeys];
|
|
7153
7174
|
setSelectedRowKeys2([...clonedKeys, -1]);
|
|
7154
7175
|
setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
|
|
7155
|
-
}, [
|
|
7176
|
+
}, [isQueryFetched]);
|
|
7156
7177
|
return {
|
|
7157
|
-
|
|
7178
|
+
handleExpandChildGroup,
|
|
7158
7179
|
colEmptyGroup,
|
|
7180
|
+
leftPadding,
|
|
7159
7181
|
isShowGroup,
|
|
7160
|
-
|
|
7182
|
+
isQueryFetched,
|
|
7161
7183
|
nameGroupWithCount,
|
|
7184
|
+
columns,
|
|
7185
|
+
row,
|
|
7186
|
+
isPlaceholderData,
|
|
7162
7187
|
columnsGroup,
|
|
7188
|
+
indexRow,
|
|
7163
7189
|
rowsGroup,
|
|
7164
|
-
|
|
7190
|
+
model,
|
|
7191
|
+
viewData,
|
|
7192
|
+
renderField,
|
|
7193
|
+
level,
|
|
7194
|
+
specification,
|
|
7195
|
+
context,
|
|
7196
|
+
checkedAll,
|
|
7197
|
+
isDisplayCheckbox,
|
|
7198
|
+
isAutoSelect,
|
|
7199
|
+
setIsAutoSelect,
|
|
7200
|
+
selectedRowKeysRef,
|
|
7201
|
+
initVal,
|
|
7202
|
+
dataResponse,
|
|
7165
7203
|
pageGroup,
|
|
7166
7204
|
setPageGroup
|
|
7167
7205
|
};
|
|
@@ -7450,13 +7488,6 @@ import * as constants_star from "@fctc/interface-logic/constants";
|
|
|
7450
7488
|
|
|
7451
7489
|
// src/index.ts
|
|
7452
7490
|
__reExport(index_exports, constants_exports);
|
|
7453
|
-
|
|
7454
|
-
// src/environment.ts
|
|
7455
|
-
var environment_exports = {};
|
|
7456
|
-
__reExport(environment_exports, environment_star);
|
|
7457
|
-
import * as environment_star from "@fctc/interface-logic/environment";
|
|
7458
|
-
|
|
7459
|
-
// src/index.ts
|
|
7460
7491
|
__reExport(index_exports, environment_exports);
|
|
7461
7492
|
__reExport(index_exports, provider_exports);
|
|
7462
7493
|
|
package/dist/widget.d.mts
CHANGED
|
@@ -238,17 +238,36 @@ declare const tableController: ({ data }: ITableProps) => {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
declare const tableGroupController: (props: any) => {
|
|
241
|
-
|
|
241
|
+
handleExpandChildGroup: () => void;
|
|
242
242
|
colEmptyGroup: {
|
|
243
243
|
fromStart: number;
|
|
244
244
|
fromEnd: number;
|
|
245
245
|
};
|
|
246
|
+
leftPadding: string;
|
|
246
247
|
isShowGroup: boolean;
|
|
247
|
-
|
|
248
|
+
isQueryFetched: boolean;
|
|
248
249
|
nameGroupWithCount: string;
|
|
250
|
+
columns: any;
|
|
251
|
+
row: any;
|
|
252
|
+
isPlaceholderData: boolean;
|
|
249
253
|
columnsGroup: any;
|
|
254
|
+
indexRow: any;
|
|
250
255
|
rowsGroup: any[];
|
|
251
|
-
|
|
256
|
+
model: any;
|
|
257
|
+
viewData: any;
|
|
258
|
+
renderField: any;
|
|
259
|
+
level: any;
|
|
260
|
+
specification: any;
|
|
261
|
+
context: any;
|
|
262
|
+
checkedAll: any;
|
|
263
|
+
isDisplayCheckbox: any;
|
|
264
|
+
isAutoSelect: any;
|
|
265
|
+
setIsAutoSelect: any;
|
|
266
|
+
selectedRowKeysRef: any;
|
|
267
|
+
initVal: {
|
|
268
|
+
[x: string]: any;
|
|
269
|
+
};
|
|
270
|
+
dataResponse: any;
|
|
252
271
|
pageGroup: any;
|
|
253
272
|
setPageGroup: react.Dispatch<any>;
|
|
254
273
|
};
|
package/dist/widget.d.ts
CHANGED
|
@@ -238,17 +238,36 @@ declare const tableController: ({ data }: ITableProps) => {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
declare const tableGroupController: (props: any) => {
|
|
241
|
-
|
|
241
|
+
handleExpandChildGroup: () => void;
|
|
242
242
|
colEmptyGroup: {
|
|
243
243
|
fromStart: number;
|
|
244
244
|
fromEnd: number;
|
|
245
245
|
};
|
|
246
|
+
leftPadding: string;
|
|
246
247
|
isShowGroup: boolean;
|
|
247
|
-
|
|
248
|
+
isQueryFetched: boolean;
|
|
248
249
|
nameGroupWithCount: string;
|
|
250
|
+
columns: any;
|
|
251
|
+
row: any;
|
|
252
|
+
isPlaceholderData: boolean;
|
|
249
253
|
columnsGroup: any;
|
|
254
|
+
indexRow: any;
|
|
250
255
|
rowsGroup: any[];
|
|
251
|
-
|
|
256
|
+
model: any;
|
|
257
|
+
viewData: any;
|
|
258
|
+
renderField: any;
|
|
259
|
+
level: any;
|
|
260
|
+
specification: any;
|
|
261
|
+
context: any;
|
|
262
|
+
checkedAll: any;
|
|
263
|
+
isDisplayCheckbox: any;
|
|
264
|
+
isAutoSelect: any;
|
|
265
|
+
setIsAutoSelect: any;
|
|
266
|
+
selectedRowKeysRef: any;
|
|
267
|
+
initVal: {
|
|
268
|
+
[x: string]: any;
|
|
269
|
+
};
|
|
270
|
+
dataResponse: any;
|
|
252
271
|
pageGroup: any;
|
|
253
272
|
setPageGroup: react.Dispatch<any>;
|
|
254
273
|
};
|
package/dist/widget.js
CHANGED
|
@@ -6712,28 +6712,43 @@ var tableController = ({ data }) => {
|
|
|
6712
6712
|
var import_react23 = require("react");
|
|
6713
6713
|
var import_hooks15 = require("@fctc/interface-logic/hooks");
|
|
6714
6714
|
var import_store10 = require("@fctc/interface-logic/store");
|
|
6715
|
+
|
|
6716
|
+
// src/environment.ts
|
|
6717
|
+
var environment_exports = {};
|
|
6718
|
+
__reExport(environment_exports, require("@fctc/interface-logic/environment"));
|
|
6719
|
+
|
|
6720
|
+
// src/widget/advance/table/table-group/controller.ts
|
|
6715
6721
|
var tableGroupController = (props) => {
|
|
6716
|
-
const
|
|
6722
|
+
const env = (0, environment_exports.getEnv)();
|
|
6717
6723
|
const {
|
|
6724
|
+
rows,
|
|
6718
6725
|
columns,
|
|
6726
|
+
indexRow,
|
|
6719
6727
|
row,
|
|
6720
6728
|
model,
|
|
6721
6729
|
viewData,
|
|
6730
|
+
renderField,
|
|
6722
6731
|
level,
|
|
6723
6732
|
specification,
|
|
6733
|
+
domain,
|
|
6724
6734
|
context,
|
|
6725
|
-
checkedAll
|
|
6735
|
+
checkedAll,
|
|
6736
|
+
isDisplayCheckbox,
|
|
6737
|
+
isAutoSelect,
|
|
6738
|
+
setIsAutoSelect,
|
|
6739
|
+
selectedRowKeysRef
|
|
6726
6740
|
} = props;
|
|
6727
6741
|
const [pageGroup, setPageGroup] = (0, import_react23.useState)(0);
|
|
6728
6742
|
const { groupByDomain, selectedTags } = (0, import_store10.useAppSelector)(import_store10.selectSearch);
|
|
6729
6743
|
const { selectedRowKeys } = (0, import_store10.useAppSelector)(import_store10.selectList);
|
|
6730
6744
|
const appDispatch = (0, import_store10.useAppDispatch)();
|
|
6745
|
+
const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
|
|
6746
|
+
const initVal = toDataJS(row, viewData, model);
|
|
6731
6747
|
const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
|
|
6732
6748
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
|
|
6733
6749
|
fromStart: 1,
|
|
6734
6750
|
fromEnd: 1
|
|
6735
6751
|
});
|
|
6736
|
-
const domain = row?.__domain;
|
|
6737
6752
|
const processedData = (0, import_react23.useMemo)(() => {
|
|
6738
6753
|
const calculateColSpanEmpty = () => {
|
|
6739
6754
|
const startIndex = columns.findIndex(
|
|
@@ -6763,14 +6778,15 @@ var tableGroupController = (props) => {
|
|
|
6763
6778
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
6764
6779
|
};
|
|
6765
6780
|
const queryKey = [
|
|
6766
|
-
`data-${model}
|
|
6781
|
+
`data-${model}--${level}-row${indexRow}`,
|
|
6767
6782
|
specification,
|
|
6768
6783
|
domain,
|
|
6769
6784
|
pageGroup
|
|
6770
6785
|
];
|
|
6771
6786
|
const {
|
|
6772
|
-
data:
|
|
6773
|
-
isFetched:
|
|
6787
|
+
data: dataResponse,
|
|
6788
|
+
isFetched: isQueryFetched,
|
|
6789
|
+
isPlaceholderData,
|
|
6774
6790
|
isLoading,
|
|
6775
6791
|
isFetching
|
|
6776
6792
|
} = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
|
|
@@ -6781,12 +6797,13 @@ var tableGroupController = (props) => {
|
|
|
6781
6797
|
} = tableController({
|
|
6782
6798
|
data: {
|
|
6783
6799
|
fields: viewData?.views?.list?.fields,
|
|
6784
|
-
records:
|
|
6800
|
+
records: dataResponse?.records ?? dataResponse?.groups,
|
|
6785
6801
|
dataModel: viewData?.models?.[model],
|
|
6786
6802
|
context: env.context,
|
|
6787
|
-
typeTable:
|
|
6803
|
+
typeTable: dataResponse?.groups ? "group" : "list"
|
|
6788
6804
|
}
|
|
6789
6805
|
});
|
|
6806
|
+
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
6790
6807
|
(0, import_react23.useEffect)(() => {
|
|
6791
6808
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
6792
6809
|
setIsShowGroup(false);
|
|
@@ -6798,7 +6815,7 @@ var tableGroupController = (props) => {
|
|
|
6798
6815
|
)?.[1] : row[group_by_field_name];
|
|
6799
6816
|
const nameGroupWithCount = `${typeof nameGroup === "string" ? nameGroup : typeof nameGroup === "boolean" && nameGroup ? i18n_default.t("yes") : i18n_default.t("no")} (${row[`${group_by_field_name?.split(":")?.[0]}_count`]})`;
|
|
6800
6817
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
6801
|
-
const
|
|
6818
|
+
const handleExpandChildGroup = () => {
|
|
6802
6819
|
if (isLoading || isFetching) return;
|
|
6803
6820
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
6804
6821
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -6811,7 +6828,7 @@ var tableGroupController = (props) => {
|
|
|
6811
6828
|
(id) => !ids.includes(id)
|
|
6812
6829
|
);
|
|
6813
6830
|
appDispatch((0, import_store10.setSelectedRowKeys)(filteredIds));
|
|
6814
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
6831
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isQueryFetched) {
|
|
6815
6832
|
const clonedKeys = [...selectedRowKeys];
|
|
6816
6833
|
appDispatch((0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]));
|
|
6817
6834
|
setTimeout(() => appDispatch((0, import_store10.setSelectedRowKeys)(clonedKeys)), 500);
|
|
@@ -6822,22 +6839,39 @@ var tableGroupController = (props) => {
|
|
|
6822
6839
|
toggleShowGroup();
|
|
6823
6840
|
};
|
|
6824
6841
|
(0, import_react23.useEffect)(() => {
|
|
6825
|
-
if (!
|
|
6842
|
+
if (!isQueryFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
6826
6843
|
return;
|
|
6827
6844
|
}
|
|
6828
6845
|
const clonedKeys = [...selectedRowKeys];
|
|
6829
6846
|
(0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]);
|
|
6830
6847
|
setTimeout(() => (0, import_store10.setSelectedRowKeys)(clonedKeys), 500);
|
|
6831
|
-
}, [
|
|
6848
|
+
}, [isQueryFetched]);
|
|
6832
6849
|
return {
|
|
6833
|
-
|
|
6850
|
+
handleExpandChildGroup,
|
|
6834
6851
|
colEmptyGroup,
|
|
6852
|
+
leftPadding,
|
|
6835
6853
|
isShowGroup,
|
|
6836
|
-
|
|
6854
|
+
isQueryFetched,
|
|
6837
6855
|
nameGroupWithCount,
|
|
6856
|
+
columns,
|
|
6857
|
+
row,
|
|
6858
|
+
isPlaceholderData,
|
|
6838
6859
|
columnsGroup,
|
|
6860
|
+
indexRow,
|
|
6839
6861
|
rowsGroup,
|
|
6840
|
-
|
|
6862
|
+
model,
|
|
6863
|
+
viewData,
|
|
6864
|
+
renderField,
|
|
6865
|
+
level,
|
|
6866
|
+
specification,
|
|
6867
|
+
context,
|
|
6868
|
+
checkedAll,
|
|
6869
|
+
isDisplayCheckbox,
|
|
6870
|
+
isAutoSelect,
|
|
6871
|
+
setIsAutoSelect,
|
|
6872
|
+
selectedRowKeysRef,
|
|
6873
|
+
initVal,
|
|
6874
|
+
dataResponse,
|
|
6841
6875
|
pageGroup,
|
|
6842
6876
|
setPageGroup
|
|
6843
6877
|
};
|
package/dist/widget.mjs
CHANGED
|
@@ -6730,7 +6730,10 @@ var tableController = ({ data }) => {
|
|
|
6730
6730
|
|
|
6731
6731
|
// src/widget/advance/table/table-group/controller.ts
|
|
6732
6732
|
import { useEffect as useEffect14, useMemo as useMemo13, useState as useState15 } from "react";
|
|
6733
|
-
import {
|
|
6733
|
+
import {
|
|
6734
|
+
useOdooDataTransform,
|
|
6735
|
+
useGetListData as useGetListData2
|
|
6736
|
+
} from "@fctc/interface-logic/hooks";
|
|
6734
6737
|
import {
|
|
6735
6738
|
useAppSelector as useAppSelector6,
|
|
6736
6739
|
selectSearch as selectSearch5,
|
|
@@ -6738,28 +6741,44 @@ import {
|
|
|
6738
6741
|
useAppDispatch as useAppDispatch6,
|
|
6739
6742
|
setSelectedRowKeys as setSelectedRowKeys2
|
|
6740
6743
|
} from "@fctc/interface-logic/store";
|
|
6744
|
+
|
|
6745
|
+
// src/environment.ts
|
|
6746
|
+
var environment_exports = {};
|
|
6747
|
+
__reExport(environment_exports, environment_star);
|
|
6748
|
+
import * as environment_star from "@fctc/interface-logic/environment";
|
|
6749
|
+
|
|
6750
|
+
// src/widget/advance/table/table-group/controller.ts
|
|
6741
6751
|
var tableGroupController = (props) => {
|
|
6742
|
-
const
|
|
6752
|
+
const env = (0, environment_exports.getEnv)();
|
|
6743
6753
|
const {
|
|
6754
|
+
rows,
|
|
6744
6755
|
columns,
|
|
6756
|
+
indexRow,
|
|
6745
6757
|
row,
|
|
6746
6758
|
model,
|
|
6747
6759
|
viewData,
|
|
6760
|
+
renderField,
|
|
6748
6761
|
level,
|
|
6749
6762
|
specification,
|
|
6763
|
+
domain,
|
|
6750
6764
|
context,
|
|
6751
|
-
checkedAll
|
|
6765
|
+
checkedAll,
|
|
6766
|
+
isDisplayCheckbox,
|
|
6767
|
+
isAutoSelect,
|
|
6768
|
+
setIsAutoSelect,
|
|
6769
|
+
selectedRowKeysRef
|
|
6752
6770
|
} = props;
|
|
6753
6771
|
const [pageGroup, setPageGroup] = useState15(0);
|
|
6754
6772
|
const { groupByDomain, selectedTags } = useAppSelector6(selectSearch5);
|
|
6755
6773
|
const { selectedRowKeys } = useAppSelector6(selectList4);
|
|
6756
6774
|
const appDispatch = useAppDispatch6();
|
|
6775
|
+
const { toDataJS } = useOdooDataTransform();
|
|
6776
|
+
const initVal = toDataJS(row, viewData, model);
|
|
6757
6777
|
const [isShowGroup, setIsShowGroup] = useState15(false);
|
|
6758
6778
|
const [colEmptyGroup, setColEmptyGroup] = useState15({
|
|
6759
6779
|
fromStart: 1,
|
|
6760
6780
|
fromEnd: 1
|
|
6761
6781
|
});
|
|
6762
|
-
const domain = row?.__domain;
|
|
6763
6782
|
const processedData = useMemo13(() => {
|
|
6764
6783
|
const calculateColSpanEmpty = () => {
|
|
6765
6784
|
const startIndex = columns.findIndex(
|
|
@@ -6789,14 +6808,15 @@ var tableGroupController = (props) => {
|
|
|
6789
6808
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
6790
6809
|
};
|
|
6791
6810
|
const queryKey = [
|
|
6792
|
-
`data-${model}
|
|
6811
|
+
`data-${model}--${level}-row${indexRow}`,
|
|
6793
6812
|
specification,
|
|
6794
6813
|
domain,
|
|
6795
6814
|
pageGroup
|
|
6796
6815
|
];
|
|
6797
6816
|
const {
|
|
6798
|
-
data:
|
|
6799
|
-
isFetched:
|
|
6817
|
+
data: dataResponse,
|
|
6818
|
+
isFetched: isQueryFetched,
|
|
6819
|
+
isPlaceholderData,
|
|
6800
6820
|
isLoading,
|
|
6801
6821
|
isFetching
|
|
6802
6822
|
} = useGetListData2(listDataProps, queryKey, enabled);
|
|
@@ -6807,12 +6827,13 @@ var tableGroupController = (props) => {
|
|
|
6807
6827
|
} = tableController({
|
|
6808
6828
|
data: {
|
|
6809
6829
|
fields: viewData?.views?.list?.fields,
|
|
6810
|
-
records:
|
|
6830
|
+
records: dataResponse?.records ?? dataResponse?.groups,
|
|
6811
6831
|
dataModel: viewData?.models?.[model],
|
|
6812
6832
|
context: env.context,
|
|
6813
|
-
typeTable:
|
|
6833
|
+
typeTable: dataResponse?.groups ? "group" : "list"
|
|
6814
6834
|
}
|
|
6815
6835
|
});
|
|
6836
|
+
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
6816
6837
|
useEffect14(() => {
|
|
6817
6838
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
6818
6839
|
setIsShowGroup(false);
|
|
@@ -6824,7 +6845,7 @@ var tableGroupController = (props) => {
|
|
|
6824
6845
|
)?.[1] : row[group_by_field_name];
|
|
6825
6846
|
const nameGroupWithCount = `${typeof nameGroup === "string" ? nameGroup : typeof nameGroup === "boolean" && nameGroup ? i18n_default.t("yes") : i18n_default.t("no")} (${row[`${group_by_field_name?.split(":")?.[0]}_count`]})`;
|
|
6826
6847
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
6827
|
-
const
|
|
6848
|
+
const handleExpandChildGroup = () => {
|
|
6828
6849
|
if (isLoading || isFetching) return;
|
|
6829
6850
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
6830
6851
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -6837,7 +6858,7 @@ var tableGroupController = (props) => {
|
|
|
6837
6858
|
(id) => !ids.includes(id)
|
|
6838
6859
|
);
|
|
6839
6860
|
appDispatch(setSelectedRowKeys2(filteredIds));
|
|
6840
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
6861
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isQueryFetched) {
|
|
6841
6862
|
const clonedKeys = [...selectedRowKeys];
|
|
6842
6863
|
appDispatch(setSelectedRowKeys2([...clonedKeys, -1]));
|
|
6843
6864
|
setTimeout(() => appDispatch(setSelectedRowKeys2(clonedKeys)), 500);
|
|
@@ -6848,22 +6869,39 @@ var tableGroupController = (props) => {
|
|
|
6848
6869
|
toggleShowGroup();
|
|
6849
6870
|
};
|
|
6850
6871
|
useEffect14(() => {
|
|
6851
|
-
if (!
|
|
6872
|
+
if (!isQueryFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
6852
6873
|
return;
|
|
6853
6874
|
}
|
|
6854
6875
|
const clonedKeys = [...selectedRowKeys];
|
|
6855
6876
|
setSelectedRowKeys2([...clonedKeys, -1]);
|
|
6856
6877
|
setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
|
|
6857
|
-
}, [
|
|
6878
|
+
}, [isQueryFetched]);
|
|
6858
6879
|
return {
|
|
6859
|
-
|
|
6880
|
+
handleExpandChildGroup,
|
|
6860
6881
|
colEmptyGroup,
|
|
6882
|
+
leftPadding,
|
|
6861
6883
|
isShowGroup,
|
|
6862
|
-
|
|
6884
|
+
isQueryFetched,
|
|
6863
6885
|
nameGroupWithCount,
|
|
6886
|
+
columns,
|
|
6887
|
+
row,
|
|
6888
|
+
isPlaceholderData,
|
|
6864
6889
|
columnsGroup,
|
|
6890
|
+
indexRow,
|
|
6865
6891
|
rowsGroup,
|
|
6866
|
-
|
|
6892
|
+
model,
|
|
6893
|
+
viewData,
|
|
6894
|
+
renderField,
|
|
6895
|
+
level,
|
|
6896
|
+
specification,
|
|
6897
|
+
context,
|
|
6898
|
+
checkedAll,
|
|
6899
|
+
isDisplayCheckbox,
|
|
6900
|
+
isAutoSelect,
|
|
6901
|
+
setIsAutoSelect,
|
|
6902
|
+
selectedRowKeysRef,
|
|
6903
|
+
initVal,
|
|
6904
|
+
dataResponse,
|
|
6867
6905
|
pageGroup,
|
|
6868
6906
|
setPageGroup
|
|
6869
6907
|
};
|
package/package.json
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./hooks": {
|
|
14
|
-
"types": "./dist/hooks.d.ts",
|
|
15
|
-
"import": "./dist/hooks.mjs",
|
|
16
|
-
"require": "./dist/hooks.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./widget": {
|
|
19
|
-
"types": "./dist/widget.d.ts",
|
|
20
|
-
"import": "./dist/widget.mjs",
|
|
21
|
-
"require": "./dist/widget.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./icons": {
|
|
24
|
-
"types": "./dist/icons.d.ts",
|
|
25
|
-
"import": "./dist/icons.mjs",
|
|
26
|
-
"require": "./dist/icons.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./utils": {
|
|
29
|
-
"types": "./dist/utils.d.ts",
|
|
30
|
-
"import": "./dist/utils.mjs",
|
|
31
|
-
"require": "./dist/utils.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./store": {
|
|
34
|
-
"types": "./dist/store.d.ts",
|
|
35
|
-
"import": "./dist/store.mjs",
|
|
36
|
-
"require": "./dist/store.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./config": {
|
|
39
|
-
"types": "./dist/config.d.ts",
|
|
40
|
-
"import": "./dist/config.mjs",
|
|
41
|
-
"require": "./dist/config.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./constants": {
|
|
44
|
-
"types": "./dist/constants.d.ts",
|
|
45
|
-
"import": "./dist/constants.mjs",
|
|
46
|
-
"require": "./dist/constants.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./environment": {
|
|
49
|
-
"types": "./dist/environment.d.ts",
|
|
50
|
-
"import": "./dist/environment.mjs",
|
|
51
|
-
"require": "./dist/environment.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./provider": {
|
|
54
|
-
"types": "./dist/provider.d.ts",
|
|
55
|
-
"import": "./dist/provider.mjs",
|
|
56
|
-
"require": "./dist/provider.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./services": {
|
|
59
|
-
"types": "./dist/services.d.ts",
|
|
60
|
-
"import": "./dist/services.mjs",
|
|
61
|
-
"require": "./dist/services.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./types": {
|
|
64
|
-
"types": "./dist/types.d.ts",
|
|
65
|
-
"import": "./dist/types.mjs",
|
|
66
|
-
"require": "./dist/types.cjs"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"files": [
|
|
70
|
-
"dist"
|
|
71
|
-
],
|
|
72
|
-
"scripts": {
|
|
73
|
-
"build": "tsup",
|
|
74
|
-
"test": "jest"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@fctc/interface-logic": "^2.3.
|
|
78
|
-
"@headlessui/react": "^2.2.6",
|
|
79
|
-
"@tanstack/react-query": "^5.84.0",
|
|
80
|
-
"i18next": "^25.3.2",
|
|
81
|
-
"i18next-browser-languagedetector": "^8.2.0",
|
|
82
|
-
"react-i18next": "^15.6.1",
|
|
83
|
-
"react-tooltip": "^5.29.1"
|
|
84
|
-
},
|
|
85
|
-
"devDependencies": {
|
|
86
|
-
"@types/react": "^18.3.1",
|
|
87
|
-
"jest": "^29.7.0",
|
|
88
|
-
"react": "18.0.0",
|
|
89
|
-
"tsup": "^8.0.0",
|
|
90
|
-
"typescript": "^5.8.2"
|
|
91
|
-
},
|
|
92
|
-
"packageManager": "yarn@1.22.0",
|
|
93
|
-
"peerDependencies": {
|
|
94
|
-
"@fctc/interface-logic": "^1.6.9"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/widget-logic",
|
|
3
|
+
"version": "2.3.4",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./hooks": {
|
|
14
|
+
"types": "./dist/hooks.d.ts",
|
|
15
|
+
"import": "./dist/hooks.mjs",
|
|
16
|
+
"require": "./dist/hooks.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./widget": {
|
|
19
|
+
"types": "./dist/widget.d.ts",
|
|
20
|
+
"import": "./dist/widget.mjs",
|
|
21
|
+
"require": "./dist/widget.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./icons": {
|
|
24
|
+
"types": "./dist/icons.d.ts",
|
|
25
|
+
"import": "./dist/icons.mjs",
|
|
26
|
+
"require": "./dist/icons.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./utils": {
|
|
29
|
+
"types": "./dist/utils.d.ts",
|
|
30
|
+
"import": "./dist/utils.mjs",
|
|
31
|
+
"require": "./dist/utils.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./store": {
|
|
34
|
+
"types": "./dist/store.d.ts",
|
|
35
|
+
"import": "./dist/store.mjs",
|
|
36
|
+
"require": "./dist/store.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./config": {
|
|
39
|
+
"types": "./dist/config.d.ts",
|
|
40
|
+
"import": "./dist/config.mjs",
|
|
41
|
+
"require": "./dist/config.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./constants": {
|
|
44
|
+
"types": "./dist/constants.d.ts",
|
|
45
|
+
"import": "./dist/constants.mjs",
|
|
46
|
+
"require": "./dist/constants.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./environment": {
|
|
49
|
+
"types": "./dist/environment.d.ts",
|
|
50
|
+
"import": "./dist/environment.mjs",
|
|
51
|
+
"require": "./dist/environment.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./provider": {
|
|
54
|
+
"types": "./dist/provider.d.ts",
|
|
55
|
+
"import": "./dist/provider.mjs",
|
|
56
|
+
"require": "./dist/provider.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./services": {
|
|
59
|
+
"types": "./dist/services.d.ts",
|
|
60
|
+
"import": "./dist/services.mjs",
|
|
61
|
+
"require": "./dist/services.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./types": {
|
|
64
|
+
"types": "./dist/types.d.ts",
|
|
65
|
+
"import": "./dist/types.mjs",
|
|
66
|
+
"require": "./dist/types.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist"
|
|
71
|
+
],
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "tsup",
|
|
74
|
+
"test": "jest"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@fctc/interface-logic": "^2.3.4",
|
|
78
|
+
"@headlessui/react": "^2.2.6",
|
|
79
|
+
"@tanstack/react-query": "^5.84.0",
|
|
80
|
+
"i18next": "^25.3.2",
|
|
81
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
82
|
+
"react-i18next": "^15.6.1",
|
|
83
|
+
"react-tooltip": "^5.29.1"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/react": "^18.3.1",
|
|
87
|
+
"jest": "^29.7.0",
|
|
88
|
+
"react": "18.0.0",
|
|
89
|
+
"tsup": "^8.0.0",
|
|
90
|
+
"typescript": "^5.8.2"
|
|
91
|
+
},
|
|
92
|
+
"packageManager": "yarn@1.22.0",
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@fctc/interface-logic": "^1.6.9"
|
|
95
|
+
}
|
|
96
|
+
}
|