@fctc/widget-logic 2.3.2 → 2.3.3
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 +21 -49
- package/dist/index.mjs +23 -54
- package/dist/widget.d.mts +3 -22
- package/dist/widget.d.ts +3 -22
- package/dist/widget.js +15 -49
- package/dist/widget.mjs +16 -54
- package/package.json +96 -96
package/dist/index.js
CHANGED
|
@@ -6987,43 +6987,28 @@ 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
|
|
6996
6990
|
var tableGroupController = (props) => {
|
|
6997
|
-
const env = (0,
|
|
6991
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6998
6992
|
const {
|
|
6999
|
-
rows,
|
|
7000
6993
|
columns,
|
|
7001
|
-
indexRow,
|
|
7002
6994
|
row,
|
|
7003
6995
|
model,
|
|
7004
6996
|
viewData,
|
|
7005
|
-
renderField,
|
|
7006
6997
|
level,
|
|
7007
6998
|
specification,
|
|
7008
|
-
domain,
|
|
7009
6999
|
context,
|
|
7010
|
-
checkedAll
|
|
7011
|
-
isDisplayCheckbox,
|
|
7012
|
-
isAutoSelect,
|
|
7013
|
-
setIsAutoSelect,
|
|
7014
|
-
selectedRowKeysRef
|
|
7000
|
+
checkedAll
|
|
7015
7001
|
} = props;
|
|
7016
7002
|
const [pageGroup, setPageGroup] = (0, import_react23.useState)(0);
|
|
7017
7003
|
const { groupByDomain, selectedTags } = (0, import_store10.useAppSelector)(import_store10.selectSearch);
|
|
7018
7004
|
const { selectedRowKeys } = (0, import_store10.useAppSelector)(import_store10.selectList);
|
|
7019
7005
|
const appDispatch = (0, import_store10.useAppDispatch)();
|
|
7020
|
-
const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
|
|
7021
|
-
const initVal = toDataJS(row, viewData, model);
|
|
7022
7006
|
const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
|
|
7023
7007
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
|
|
7024
7008
|
fromStart: 1,
|
|
7025
7009
|
fromEnd: 1
|
|
7026
7010
|
});
|
|
7011
|
+
const domain = row?.__domain;
|
|
7027
7012
|
const processedData = (0, import_react23.useMemo)(() => {
|
|
7028
7013
|
const calculateColSpanEmpty = () => {
|
|
7029
7014
|
const startIndex = columns.findIndex(
|
|
@@ -7053,15 +7038,14 @@ var tableGroupController = (props) => {
|
|
|
7053
7038
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
7054
7039
|
};
|
|
7055
7040
|
const queryKey = [
|
|
7056
|
-
`data-${model}
|
|
7041
|
+
`data-${model}-level_${level}-row-${row?.id}`,
|
|
7057
7042
|
specification,
|
|
7058
7043
|
domain,
|
|
7059
7044
|
pageGroup
|
|
7060
7045
|
];
|
|
7061
7046
|
const {
|
|
7062
|
-
data:
|
|
7063
|
-
isFetched:
|
|
7064
|
-
isPlaceholderData,
|
|
7047
|
+
data: dataGroup,
|
|
7048
|
+
isFetched: isDataGroupFetched,
|
|
7065
7049
|
isLoading,
|
|
7066
7050
|
isFetching
|
|
7067
7051
|
} = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
|
|
@@ -7072,13 +7056,12 @@ var tableGroupController = (props) => {
|
|
|
7072
7056
|
} = tableController({
|
|
7073
7057
|
data: {
|
|
7074
7058
|
fields: viewData?.views?.list?.fields,
|
|
7075
|
-
records:
|
|
7059
|
+
records: dataGroup?.records ?? dataGroup?.groups,
|
|
7076
7060
|
dataModel: viewData?.models?.[model],
|
|
7077
7061
|
context: env.context,
|
|
7078
|
-
typeTable:
|
|
7062
|
+
typeTable: dataGroup?.groups ? "group" : "list"
|
|
7079
7063
|
}
|
|
7080
7064
|
});
|
|
7081
|
-
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
7082
7065
|
(0, import_react23.useEffect)(() => {
|
|
7083
7066
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
7084
7067
|
setIsShowGroup(false);
|
|
@@ -7090,7 +7073,7 @@ var tableGroupController = (props) => {
|
|
|
7090
7073
|
)?.[1] : row[group_by_field_name];
|
|
7091
7074
|
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`]})`;
|
|
7092
7075
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
7093
|
-
const
|
|
7076
|
+
const onExpandChildGroup = () => {
|
|
7094
7077
|
if (isLoading || isFetching) return;
|
|
7095
7078
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
7096
7079
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -7103,7 +7086,7 @@ var tableGroupController = (props) => {
|
|
|
7103
7086
|
(id) => !ids.includes(id)
|
|
7104
7087
|
);
|
|
7105
7088
|
appDispatch((0, import_store10.setSelectedRowKeys)(filteredIds));
|
|
7106
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
7089
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isDataGroupFetched) {
|
|
7107
7090
|
const clonedKeys = [...selectedRowKeys];
|
|
7108
7091
|
appDispatch((0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]));
|
|
7109
7092
|
setTimeout(() => appDispatch((0, import_store10.setSelectedRowKeys)(clonedKeys)), 500);
|
|
@@ -7114,39 +7097,22 @@ var tableGroupController = (props) => {
|
|
|
7114
7097
|
toggleShowGroup();
|
|
7115
7098
|
};
|
|
7116
7099
|
(0, import_react23.useEffect)(() => {
|
|
7117
|
-
if (!
|
|
7100
|
+
if (!isDataGroupFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
7118
7101
|
return;
|
|
7119
7102
|
}
|
|
7120
7103
|
const clonedKeys = [...selectedRowKeys];
|
|
7121
7104
|
(0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]);
|
|
7122
7105
|
setTimeout(() => (0, import_store10.setSelectedRowKeys)(clonedKeys), 500);
|
|
7123
|
-
}, [
|
|
7106
|
+
}, [isDataGroupFetched]);
|
|
7124
7107
|
return {
|
|
7125
|
-
|
|
7108
|
+
onExpandChildGroup,
|
|
7126
7109
|
colEmptyGroup,
|
|
7127
|
-
leftPadding,
|
|
7128
7110
|
isShowGroup,
|
|
7129
|
-
|
|
7111
|
+
isDataGroupFetched,
|
|
7130
7112
|
nameGroupWithCount,
|
|
7131
|
-
columns,
|
|
7132
|
-
row,
|
|
7133
|
-
isPlaceholderData,
|
|
7134
7113
|
columnsGroup,
|
|
7135
|
-
indexRow,
|
|
7136
7114
|
rowsGroup,
|
|
7137
|
-
|
|
7138
|
-
viewData,
|
|
7139
|
-
renderField,
|
|
7140
|
-
level,
|
|
7141
|
-
specification,
|
|
7142
|
-
context,
|
|
7143
|
-
checkedAll,
|
|
7144
|
-
isDisplayCheckbox,
|
|
7145
|
-
isAutoSelect,
|
|
7146
|
-
setIsAutoSelect,
|
|
7147
|
-
selectedRowKeysRef,
|
|
7148
|
-
initVal,
|
|
7149
|
-
dataResponse,
|
|
7115
|
+
dataGroup,
|
|
7150
7116
|
pageGroup,
|
|
7151
7117
|
setPageGroup
|
|
7152
7118
|
};
|
|
@@ -7429,6 +7395,12 @@ __reExport(constants_exports, require("@fctc/interface-logic/constants"));
|
|
|
7429
7395
|
|
|
7430
7396
|
// src/index.ts
|
|
7431
7397
|
__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
|
|
7432
7404
|
__reExport(index_exports, environment_exports, module.exports);
|
|
7433
7405
|
__reExport(index_exports, provider_exports, module.exports);
|
|
7434
7406
|
|
package/dist/index.mjs
CHANGED
|
@@ -7028,10 +7028,7 @@ 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 {
|
|
7032
|
-
useOdooDataTransform,
|
|
7033
|
-
useGetListData as useGetListData2
|
|
7034
|
-
} from "@fctc/interface-logic/hooks";
|
|
7031
|
+
import { useGetListData as useGetListData2 } from "@fctc/interface-logic/hooks";
|
|
7035
7032
|
import {
|
|
7036
7033
|
useAppSelector as useAppSelector6,
|
|
7037
7034
|
selectSearch as selectSearch5,
|
|
@@ -7039,44 +7036,28 @@ import {
|
|
|
7039
7036
|
useAppDispatch as useAppDispatch6,
|
|
7040
7037
|
setSelectedRowKeys as setSelectedRowKeys2
|
|
7041
7038
|
} 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
|
|
7049
7039
|
var tableGroupController = (props) => {
|
|
7050
|
-
const env = (0,
|
|
7040
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
7051
7041
|
const {
|
|
7052
|
-
rows,
|
|
7053
7042
|
columns,
|
|
7054
|
-
indexRow,
|
|
7055
7043
|
row,
|
|
7056
7044
|
model,
|
|
7057
7045
|
viewData,
|
|
7058
|
-
renderField,
|
|
7059
7046
|
level,
|
|
7060
7047
|
specification,
|
|
7061
|
-
domain,
|
|
7062
7048
|
context,
|
|
7063
|
-
checkedAll
|
|
7064
|
-
isDisplayCheckbox,
|
|
7065
|
-
isAutoSelect,
|
|
7066
|
-
setIsAutoSelect,
|
|
7067
|
-
selectedRowKeysRef
|
|
7049
|
+
checkedAll
|
|
7068
7050
|
} = props;
|
|
7069
7051
|
const [pageGroup, setPageGroup] = useState15(0);
|
|
7070
7052
|
const { groupByDomain, selectedTags } = useAppSelector6(selectSearch5);
|
|
7071
7053
|
const { selectedRowKeys } = useAppSelector6(selectList4);
|
|
7072
7054
|
const appDispatch = useAppDispatch6();
|
|
7073
|
-
const { toDataJS } = useOdooDataTransform();
|
|
7074
|
-
const initVal = toDataJS(row, viewData, model);
|
|
7075
7055
|
const [isShowGroup, setIsShowGroup] = useState15(false);
|
|
7076
7056
|
const [colEmptyGroup, setColEmptyGroup] = useState15({
|
|
7077
7057
|
fromStart: 1,
|
|
7078
7058
|
fromEnd: 1
|
|
7079
7059
|
});
|
|
7060
|
+
const domain = row?.__domain;
|
|
7080
7061
|
const processedData = useMemo13(() => {
|
|
7081
7062
|
const calculateColSpanEmpty = () => {
|
|
7082
7063
|
const startIndex = columns.findIndex(
|
|
@@ -7106,15 +7087,14 @@ var tableGroupController = (props) => {
|
|
|
7106
7087
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
7107
7088
|
};
|
|
7108
7089
|
const queryKey = [
|
|
7109
|
-
`data-${model}
|
|
7090
|
+
`data-${model}-level_${level}-row-${row?.id}`,
|
|
7110
7091
|
specification,
|
|
7111
7092
|
domain,
|
|
7112
7093
|
pageGroup
|
|
7113
7094
|
];
|
|
7114
7095
|
const {
|
|
7115
|
-
data:
|
|
7116
|
-
isFetched:
|
|
7117
|
-
isPlaceholderData,
|
|
7096
|
+
data: dataGroup,
|
|
7097
|
+
isFetched: isDataGroupFetched,
|
|
7118
7098
|
isLoading,
|
|
7119
7099
|
isFetching
|
|
7120
7100
|
} = useGetListData2(listDataProps, queryKey, enabled);
|
|
@@ -7125,13 +7105,12 @@ var tableGroupController = (props) => {
|
|
|
7125
7105
|
} = tableController({
|
|
7126
7106
|
data: {
|
|
7127
7107
|
fields: viewData?.views?.list?.fields,
|
|
7128
|
-
records:
|
|
7108
|
+
records: dataGroup?.records ?? dataGroup?.groups,
|
|
7129
7109
|
dataModel: viewData?.models?.[model],
|
|
7130
7110
|
context: env.context,
|
|
7131
|
-
typeTable:
|
|
7111
|
+
typeTable: dataGroup?.groups ? "group" : "list"
|
|
7132
7112
|
}
|
|
7133
7113
|
});
|
|
7134
|
-
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
7135
7114
|
useEffect14(() => {
|
|
7136
7115
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
7137
7116
|
setIsShowGroup(false);
|
|
@@ -7143,7 +7122,7 @@ var tableGroupController = (props) => {
|
|
|
7143
7122
|
)?.[1] : row[group_by_field_name];
|
|
7144
7123
|
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`]})`;
|
|
7145
7124
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
7146
|
-
const
|
|
7125
|
+
const onExpandChildGroup = () => {
|
|
7147
7126
|
if (isLoading || isFetching) return;
|
|
7148
7127
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
7149
7128
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -7156,7 +7135,7 @@ var tableGroupController = (props) => {
|
|
|
7156
7135
|
(id) => !ids.includes(id)
|
|
7157
7136
|
);
|
|
7158
7137
|
appDispatch(setSelectedRowKeys2(filteredIds));
|
|
7159
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
7138
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isDataGroupFetched) {
|
|
7160
7139
|
const clonedKeys = [...selectedRowKeys];
|
|
7161
7140
|
appDispatch(setSelectedRowKeys2([...clonedKeys, -1]));
|
|
7162
7141
|
setTimeout(() => appDispatch(setSelectedRowKeys2(clonedKeys)), 500);
|
|
@@ -7167,39 +7146,22 @@ var tableGroupController = (props) => {
|
|
|
7167
7146
|
toggleShowGroup();
|
|
7168
7147
|
};
|
|
7169
7148
|
useEffect14(() => {
|
|
7170
|
-
if (!
|
|
7149
|
+
if (!isDataGroupFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
7171
7150
|
return;
|
|
7172
7151
|
}
|
|
7173
7152
|
const clonedKeys = [...selectedRowKeys];
|
|
7174
7153
|
setSelectedRowKeys2([...clonedKeys, -1]);
|
|
7175
7154
|
setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
|
|
7176
|
-
}, [
|
|
7155
|
+
}, [isDataGroupFetched]);
|
|
7177
7156
|
return {
|
|
7178
|
-
|
|
7157
|
+
onExpandChildGroup,
|
|
7179
7158
|
colEmptyGroup,
|
|
7180
|
-
leftPadding,
|
|
7181
7159
|
isShowGroup,
|
|
7182
|
-
|
|
7160
|
+
isDataGroupFetched,
|
|
7183
7161
|
nameGroupWithCount,
|
|
7184
|
-
columns,
|
|
7185
|
-
row,
|
|
7186
|
-
isPlaceholderData,
|
|
7187
7162
|
columnsGroup,
|
|
7188
|
-
indexRow,
|
|
7189
7163
|
rowsGroup,
|
|
7190
|
-
|
|
7191
|
-
viewData,
|
|
7192
|
-
renderField,
|
|
7193
|
-
level,
|
|
7194
|
-
specification,
|
|
7195
|
-
context,
|
|
7196
|
-
checkedAll,
|
|
7197
|
-
isDisplayCheckbox,
|
|
7198
|
-
isAutoSelect,
|
|
7199
|
-
setIsAutoSelect,
|
|
7200
|
-
selectedRowKeysRef,
|
|
7201
|
-
initVal,
|
|
7202
|
-
dataResponse,
|
|
7164
|
+
dataGroup,
|
|
7203
7165
|
pageGroup,
|
|
7204
7166
|
setPageGroup
|
|
7205
7167
|
};
|
|
@@ -7488,6 +7450,13 @@ import * as constants_star from "@fctc/interface-logic/constants";
|
|
|
7488
7450
|
|
|
7489
7451
|
// src/index.ts
|
|
7490
7452
|
__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
|
|
7491
7460
|
__reExport(index_exports, environment_exports);
|
|
7492
7461
|
__reExport(index_exports, provider_exports);
|
|
7493
7462
|
|
package/dist/widget.d.mts
CHANGED
|
@@ -238,36 +238,17 @@ declare const tableController: ({ data }: ITableProps) => {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
declare const tableGroupController: (props: any) => {
|
|
241
|
-
|
|
241
|
+
onExpandChildGroup: () => void;
|
|
242
242
|
colEmptyGroup: {
|
|
243
243
|
fromStart: number;
|
|
244
244
|
fromEnd: number;
|
|
245
245
|
};
|
|
246
|
-
leftPadding: string;
|
|
247
246
|
isShowGroup: boolean;
|
|
248
|
-
|
|
247
|
+
isDataGroupFetched: boolean;
|
|
249
248
|
nameGroupWithCount: string;
|
|
250
|
-
columns: any;
|
|
251
|
-
row: any;
|
|
252
|
-
isPlaceholderData: boolean;
|
|
253
249
|
columnsGroup: any;
|
|
254
|
-
indexRow: any;
|
|
255
250
|
rowsGroup: any[];
|
|
256
|
-
|
|
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;
|
|
251
|
+
dataGroup: any;
|
|
271
252
|
pageGroup: any;
|
|
272
253
|
setPageGroup: react.Dispatch<any>;
|
|
273
254
|
};
|
package/dist/widget.d.ts
CHANGED
|
@@ -238,36 +238,17 @@ declare const tableController: ({ data }: ITableProps) => {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
declare const tableGroupController: (props: any) => {
|
|
241
|
-
|
|
241
|
+
onExpandChildGroup: () => void;
|
|
242
242
|
colEmptyGroup: {
|
|
243
243
|
fromStart: number;
|
|
244
244
|
fromEnd: number;
|
|
245
245
|
};
|
|
246
|
-
leftPadding: string;
|
|
247
246
|
isShowGroup: boolean;
|
|
248
|
-
|
|
247
|
+
isDataGroupFetched: boolean;
|
|
249
248
|
nameGroupWithCount: string;
|
|
250
|
-
columns: any;
|
|
251
|
-
row: any;
|
|
252
|
-
isPlaceholderData: boolean;
|
|
253
249
|
columnsGroup: any;
|
|
254
|
-
indexRow: any;
|
|
255
250
|
rowsGroup: any[];
|
|
256
|
-
|
|
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;
|
|
251
|
+
dataGroup: any;
|
|
271
252
|
pageGroup: any;
|
|
272
253
|
setPageGroup: react.Dispatch<any>;
|
|
273
254
|
};
|
package/dist/widget.js
CHANGED
|
@@ -6712,43 +6712,28 @@ 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
|
|
6721
6715
|
var tableGroupController = (props) => {
|
|
6722
|
-
const env = (0,
|
|
6716
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6723
6717
|
const {
|
|
6724
|
-
rows,
|
|
6725
6718
|
columns,
|
|
6726
|
-
indexRow,
|
|
6727
6719
|
row,
|
|
6728
6720
|
model,
|
|
6729
6721
|
viewData,
|
|
6730
|
-
renderField,
|
|
6731
6722
|
level,
|
|
6732
6723
|
specification,
|
|
6733
|
-
domain,
|
|
6734
6724
|
context,
|
|
6735
|
-
checkedAll
|
|
6736
|
-
isDisplayCheckbox,
|
|
6737
|
-
isAutoSelect,
|
|
6738
|
-
setIsAutoSelect,
|
|
6739
|
-
selectedRowKeysRef
|
|
6725
|
+
checkedAll
|
|
6740
6726
|
} = props;
|
|
6741
6727
|
const [pageGroup, setPageGroup] = (0, import_react23.useState)(0);
|
|
6742
6728
|
const { groupByDomain, selectedTags } = (0, import_store10.useAppSelector)(import_store10.selectSearch);
|
|
6743
6729
|
const { selectedRowKeys } = (0, import_store10.useAppSelector)(import_store10.selectList);
|
|
6744
6730
|
const appDispatch = (0, import_store10.useAppDispatch)();
|
|
6745
|
-
const { toDataJS } = (0, import_hooks15.useOdooDataTransform)();
|
|
6746
|
-
const initVal = toDataJS(row, viewData, model);
|
|
6747
6731
|
const [isShowGroup, setIsShowGroup] = (0, import_react23.useState)(false);
|
|
6748
6732
|
const [colEmptyGroup, setColEmptyGroup] = (0, import_react23.useState)({
|
|
6749
6733
|
fromStart: 1,
|
|
6750
6734
|
fromEnd: 1
|
|
6751
6735
|
});
|
|
6736
|
+
const domain = row?.__domain;
|
|
6752
6737
|
const processedData = (0, import_react23.useMemo)(() => {
|
|
6753
6738
|
const calculateColSpanEmpty = () => {
|
|
6754
6739
|
const startIndex = columns.findIndex(
|
|
@@ -6778,15 +6763,14 @@ var tableGroupController = (props) => {
|
|
|
6778
6763
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
6779
6764
|
};
|
|
6780
6765
|
const queryKey = [
|
|
6781
|
-
`data-${model}
|
|
6766
|
+
`data-${model}-level_${level}-row-${row?.id}`,
|
|
6782
6767
|
specification,
|
|
6783
6768
|
domain,
|
|
6784
6769
|
pageGroup
|
|
6785
6770
|
];
|
|
6786
6771
|
const {
|
|
6787
|
-
data:
|
|
6788
|
-
isFetched:
|
|
6789
|
-
isPlaceholderData,
|
|
6772
|
+
data: dataGroup,
|
|
6773
|
+
isFetched: isDataGroupFetched,
|
|
6790
6774
|
isLoading,
|
|
6791
6775
|
isFetching
|
|
6792
6776
|
} = (0, import_hooks15.useGetListData)(listDataProps, queryKey, enabled);
|
|
@@ -6797,13 +6781,12 @@ var tableGroupController = (props) => {
|
|
|
6797
6781
|
} = tableController({
|
|
6798
6782
|
data: {
|
|
6799
6783
|
fields: viewData?.views?.list?.fields,
|
|
6800
|
-
records:
|
|
6784
|
+
records: dataGroup?.records ?? dataGroup?.groups,
|
|
6801
6785
|
dataModel: viewData?.models?.[model],
|
|
6802
6786
|
context: env.context,
|
|
6803
|
-
typeTable:
|
|
6787
|
+
typeTable: dataGroup?.groups ? "group" : "list"
|
|
6804
6788
|
}
|
|
6805
6789
|
});
|
|
6806
|
-
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
6807
6790
|
(0, import_react23.useEffect)(() => {
|
|
6808
6791
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
6809
6792
|
setIsShowGroup(false);
|
|
@@ -6815,7 +6798,7 @@ var tableGroupController = (props) => {
|
|
|
6815
6798
|
)?.[1] : row[group_by_field_name];
|
|
6816
6799
|
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`]})`;
|
|
6817
6800
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
6818
|
-
const
|
|
6801
|
+
const onExpandChildGroup = () => {
|
|
6819
6802
|
if (isLoading || isFetching) return;
|
|
6820
6803
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
6821
6804
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -6828,7 +6811,7 @@ var tableGroupController = (props) => {
|
|
|
6828
6811
|
(id) => !ids.includes(id)
|
|
6829
6812
|
);
|
|
6830
6813
|
appDispatch((0, import_store10.setSelectedRowKeys)(filteredIds));
|
|
6831
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
6814
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isDataGroupFetched) {
|
|
6832
6815
|
const clonedKeys = [...selectedRowKeys];
|
|
6833
6816
|
appDispatch((0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]));
|
|
6834
6817
|
setTimeout(() => appDispatch((0, import_store10.setSelectedRowKeys)(clonedKeys)), 500);
|
|
@@ -6839,39 +6822,22 @@ var tableGroupController = (props) => {
|
|
|
6839
6822
|
toggleShowGroup();
|
|
6840
6823
|
};
|
|
6841
6824
|
(0, import_react23.useEffect)(() => {
|
|
6842
|
-
if (!
|
|
6825
|
+
if (!isDataGroupFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
6843
6826
|
return;
|
|
6844
6827
|
}
|
|
6845
6828
|
const clonedKeys = [...selectedRowKeys];
|
|
6846
6829
|
(0, import_store10.setSelectedRowKeys)([...clonedKeys, -1]);
|
|
6847
6830
|
setTimeout(() => (0, import_store10.setSelectedRowKeys)(clonedKeys), 500);
|
|
6848
|
-
}, [
|
|
6831
|
+
}, [isDataGroupFetched]);
|
|
6849
6832
|
return {
|
|
6850
|
-
|
|
6833
|
+
onExpandChildGroup,
|
|
6851
6834
|
colEmptyGroup,
|
|
6852
|
-
leftPadding,
|
|
6853
6835
|
isShowGroup,
|
|
6854
|
-
|
|
6836
|
+
isDataGroupFetched,
|
|
6855
6837
|
nameGroupWithCount,
|
|
6856
|
-
columns,
|
|
6857
|
-
row,
|
|
6858
|
-
isPlaceholderData,
|
|
6859
6838
|
columnsGroup,
|
|
6860
|
-
indexRow,
|
|
6861
6839
|
rowsGroup,
|
|
6862
|
-
|
|
6863
|
-
viewData,
|
|
6864
|
-
renderField,
|
|
6865
|
-
level,
|
|
6866
|
-
specification,
|
|
6867
|
-
context,
|
|
6868
|
-
checkedAll,
|
|
6869
|
-
isDisplayCheckbox,
|
|
6870
|
-
isAutoSelect,
|
|
6871
|
-
setIsAutoSelect,
|
|
6872
|
-
selectedRowKeysRef,
|
|
6873
|
-
initVal,
|
|
6874
|
-
dataResponse,
|
|
6840
|
+
dataGroup,
|
|
6875
6841
|
pageGroup,
|
|
6876
6842
|
setPageGroup
|
|
6877
6843
|
};
|
package/dist/widget.mjs
CHANGED
|
@@ -6730,10 +6730,7 @@ 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 {
|
|
6734
|
-
useOdooDataTransform,
|
|
6735
|
-
useGetListData as useGetListData2
|
|
6736
|
-
} from "@fctc/interface-logic/hooks";
|
|
6733
|
+
import { useGetListData as useGetListData2 } from "@fctc/interface-logic/hooks";
|
|
6737
6734
|
import {
|
|
6738
6735
|
useAppSelector as useAppSelector6,
|
|
6739
6736
|
selectSearch as selectSearch5,
|
|
@@ -6741,44 +6738,28 @@ import {
|
|
|
6741
6738
|
useAppDispatch as useAppDispatch6,
|
|
6742
6739
|
setSelectedRowKeys as setSelectedRowKeys2
|
|
6743
6740
|
} 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
|
|
6751
6741
|
var tableGroupController = (props) => {
|
|
6752
|
-
const env = (0,
|
|
6742
|
+
const { env } = (0, provider_exports.useEnv)();
|
|
6753
6743
|
const {
|
|
6754
|
-
rows,
|
|
6755
6744
|
columns,
|
|
6756
|
-
indexRow,
|
|
6757
6745
|
row,
|
|
6758
6746
|
model,
|
|
6759
6747
|
viewData,
|
|
6760
|
-
renderField,
|
|
6761
6748
|
level,
|
|
6762
6749
|
specification,
|
|
6763
|
-
domain,
|
|
6764
6750
|
context,
|
|
6765
|
-
checkedAll
|
|
6766
|
-
isDisplayCheckbox,
|
|
6767
|
-
isAutoSelect,
|
|
6768
|
-
setIsAutoSelect,
|
|
6769
|
-
selectedRowKeysRef
|
|
6751
|
+
checkedAll
|
|
6770
6752
|
} = props;
|
|
6771
6753
|
const [pageGroup, setPageGroup] = useState15(0);
|
|
6772
6754
|
const { groupByDomain, selectedTags } = useAppSelector6(selectSearch5);
|
|
6773
6755
|
const { selectedRowKeys } = useAppSelector6(selectList4);
|
|
6774
6756
|
const appDispatch = useAppDispatch6();
|
|
6775
|
-
const { toDataJS } = useOdooDataTransform();
|
|
6776
|
-
const initVal = toDataJS(row, viewData, model);
|
|
6777
6757
|
const [isShowGroup, setIsShowGroup] = useState15(false);
|
|
6778
6758
|
const [colEmptyGroup, setColEmptyGroup] = useState15({
|
|
6779
6759
|
fromStart: 1,
|
|
6780
6760
|
fromEnd: 1
|
|
6781
6761
|
});
|
|
6762
|
+
const domain = row?.__domain;
|
|
6782
6763
|
const processedData = useMemo13(() => {
|
|
6783
6764
|
const calculateColSpanEmpty = () => {
|
|
6784
6765
|
const startIndex = columns.findIndex(
|
|
@@ -6808,15 +6789,14 @@ var tableGroupController = (props) => {
|
|
|
6808
6789
|
groupby: [groupByDomain?.contexts[level]?.group_by]
|
|
6809
6790
|
};
|
|
6810
6791
|
const queryKey = [
|
|
6811
|
-
`data-${model}
|
|
6792
|
+
`data-${model}-level_${level}-row-${row?.id}`,
|
|
6812
6793
|
specification,
|
|
6813
6794
|
domain,
|
|
6814
6795
|
pageGroup
|
|
6815
6796
|
];
|
|
6816
6797
|
const {
|
|
6817
|
-
data:
|
|
6818
|
-
isFetched:
|
|
6819
|
-
isPlaceholderData,
|
|
6798
|
+
data: dataGroup,
|
|
6799
|
+
isFetched: isDataGroupFetched,
|
|
6820
6800
|
isLoading,
|
|
6821
6801
|
isFetching
|
|
6822
6802
|
} = useGetListData2(listDataProps, queryKey, enabled);
|
|
@@ -6827,13 +6807,12 @@ var tableGroupController = (props) => {
|
|
|
6827
6807
|
} = tableController({
|
|
6828
6808
|
data: {
|
|
6829
6809
|
fields: viewData?.views?.list?.fields,
|
|
6830
|
-
records:
|
|
6810
|
+
records: dataGroup?.records ?? dataGroup?.groups,
|
|
6831
6811
|
dataModel: viewData?.models?.[model],
|
|
6832
6812
|
context: env.context,
|
|
6833
|
-
typeTable:
|
|
6813
|
+
typeTable: dataGroup?.groups ? "group" : "list"
|
|
6834
6814
|
}
|
|
6835
6815
|
});
|
|
6836
|
-
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
6837
6816
|
useEffect14(() => {
|
|
6838
6817
|
if (isShowGroup && selectedTags?.length > 0) {
|
|
6839
6818
|
setIsShowGroup(false);
|
|
@@ -6845,7 +6824,7 @@ var tableGroupController = (props) => {
|
|
|
6845
6824
|
)?.[1] : row[group_by_field_name];
|
|
6846
6825
|
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`]})`;
|
|
6847
6826
|
const allIdsNull = selectedRowKeys?.every((item) => item === void 0);
|
|
6848
|
-
const
|
|
6827
|
+
const onExpandChildGroup = () => {
|
|
6849
6828
|
if (isLoading || isFetching) return;
|
|
6850
6829
|
const toggleShowGroup = () => setIsShowGroup((prev) => !prev);
|
|
6851
6830
|
if (allIdsNull || typeTableGroup === "group") {
|
|
@@ -6858,7 +6837,7 @@ var tableGroupController = (props) => {
|
|
|
6858
6837
|
(id) => !ids.includes(id)
|
|
6859
6838
|
);
|
|
6860
6839
|
appDispatch(setSelectedRowKeys2(filteredIds));
|
|
6861
|
-
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull &&
|
|
6840
|
+
} else if (!isShowGroup && selectedRowKeys?.length > 0 && typeTableGroup === "list" && checkedAll && !allIdsNull && isDataGroupFetched) {
|
|
6862
6841
|
const clonedKeys = [...selectedRowKeys];
|
|
6863
6842
|
appDispatch(setSelectedRowKeys2([...clonedKeys, -1]));
|
|
6864
6843
|
setTimeout(() => appDispatch(setSelectedRowKeys2(clonedKeys)), 500);
|
|
@@ -6869,39 +6848,22 @@ var tableGroupController = (props) => {
|
|
|
6869
6848
|
toggleShowGroup();
|
|
6870
6849
|
};
|
|
6871
6850
|
useEffect14(() => {
|
|
6872
|
-
if (!
|
|
6851
|
+
if (!isDataGroupFetched || !rowsGroup || !checkedAll || allIdsNull || typeTableGroup === "group") {
|
|
6873
6852
|
return;
|
|
6874
6853
|
}
|
|
6875
6854
|
const clonedKeys = [...selectedRowKeys];
|
|
6876
6855
|
setSelectedRowKeys2([...clonedKeys, -1]);
|
|
6877
6856
|
setTimeout(() => setSelectedRowKeys2(clonedKeys), 500);
|
|
6878
|
-
}, [
|
|
6857
|
+
}, [isDataGroupFetched]);
|
|
6879
6858
|
return {
|
|
6880
|
-
|
|
6859
|
+
onExpandChildGroup,
|
|
6881
6860
|
colEmptyGroup,
|
|
6882
|
-
leftPadding,
|
|
6883
6861
|
isShowGroup,
|
|
6884
|
-
|
|
6862
|
+
isDataGroupFetched,
|
|
6885
6863
|
nameGroupWithCount,
|
|
6886
|
-
columns,
|
|
6887
|
-
row,
|
|
6888
|
-
isPlaceholderData,
|
|
6889
6864
|
columnsGroup,
|
|
6890
|
-
indexRow,
|
|
6891
6865
|
rowsGroup,
|
|
6892
|
-
|
|
6893
|
-
viewData,
|
|
6894
|
-
renderField,
|
|
6895
|
-
level,
|
|
6896
|
-
specification,
|
|
6897
|
-
context,
|
|
6898
|
-
checkedAll,
|
|
6899
|
-
isDisplayCheckbox,
|
|
6900
|
-
isAutoSelect,
|
|
6901
|
-
setIsAutoSelect,
|
|
6902
|
-
selectedRowKeysRef,
|
|
6903
|
-
initVal,
|
|
6904
|
-
dataResponse,
|
|
6866
|
+
dataGroup,
|
|
6905
6867
|
pageGroup,
|
|
6906
6868
|
setPageGroup
|
|
6907
6869
|
};
|
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.0",
|
|
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.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.0",
|
|
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
|
+
}
|