@crystaldesign/diva-backoffice 25.6.1 → 25.6.2
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/build/esm/index.js
CHANGED
@@ -34036,6 +34036,40 @@ function PriceFactorCellRenderer(props) {
|
|
34036
34036
|
return _ref.apply(this, arguments);
|
34037
34037
|
};
|
34038
34038
|
}();
|
34039
|
+
useEffect(function () {
|
34040
|
+
//
|
34041
|
+
// This is a workaround to prevent the row to go into edit mode when the cell is clicked.
|
34042
|
+
// Ag-grid intercepts dom events on a higher level, so normal event handler on the cell element do not work.
|
34043
|
+
// We have to intercept the event at a even higher level and already during the capture phase.
|
34044
|
+
//
|
34045
|
+
var handleClick = function handleClick(e) {
|
34046
|
+
// Get the cell element from the event target
|
34047
|
+
var cellElement = e.target.closest('.ag-cell');
|
34048
|
+
var rowElement = e.target.closest('.ag-row');
|
34049
|
+
|
34050
|
+
// Check if this is our cell by comparing the cell's data
|
34051
|
+
if (rowElement && cellElement && rowElement.getAttribute('row-id') === (node === null || node === void 0 ? void 0 : node.id) && cellElement.getAttribute('col-id') === (colDef === null || colDef === void 0 ? void 0 : colDef.field)) {
|
34052
|
+
e.preventDefault();
|
34053
|
+
e.stopPropagation();
|
34054
|
+
handleModalOpen();
|
34055
|
+
api === null || api === void 0 || api.stopEditing();
|
34056
|
+
return false;
|
34057
|
+
}
|
34058
|
+
return true;
|
34059
|
+
};
|
34060
|
+
if (singleClick) {
|
34061
|
+
document.addEventListener('click', handleClick, true);
|
34062
|
+
} else {
|
34063
|
+
document.addEventListener('dblclick', handleClick, true);
|
34064
|
+
}
|
34065
|
+
return function () {
|
34066
|
+
if (singleClick) {
|
34067
|
+
document.removeEventListener('click', handleClick, true);
|
34068
|
+
} else {
|
34069
|
+
document.removeEventListener('dblclick', handleClick, true);
|
34070
|
+
}
|
34071
|
+
};
|
34072
|
+
}, [api, node === null || node === void 0 ? void 0 : node.id, colDef === null || colDef === void 0 ? void 0 : colDef.field, singleClick]);
|
34039
34073
|
var _usePriceFactor = usePriceFactor({
|
34040
34074
|
data: data,
|
34041
34075
|
initialValue: value,
|
@@ -34065,19 +34099,7 @@ function PriceFactorCellRenderer(props) {
|
|
34065
34099
|
});
|
34066
34100
|
return /*#__PURE__*/jsxs(Fragment, {
|
34067
34101
|
children: [/*#__PURE__*/jsx("div", {
|
34068
|
-
onDoubleClick: function onDoubleClick(e) {
|
34069
|
-
e.stopPropagation();
|
34070
|
-
if (!singleClick) {
|
34071
|
-
handleModalOpen();
|
34072
|
-
}
|
34073
|
-
},
|
34074
34102
|
className: cell,
|
34075
|
-
onClick: function onClick(e) {
|
34076
|
-
e.stopPropagation();
|
34077
|
-
if (singleClick) {
|
34078
|
-
handleModalOpen();
|
34079
|
-
}
|
34080
|
-
},
|
34081
34103
|
children: formatListValue(value || [], type, i18n.language)
|
34082
34104
|
}), /*#__PURE__*/jsxs(Modal$2, {
|
34083
34105
|
title: colDef === null || colDef === void 0 ? void 0 : colDef.headerName,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAQzD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,KAAK,EAAE,OAAO,CACZ,uBAAuB,CACrB;IACE,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACtC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,EACD,MAAM,EAAE,EACR,WAAW,CACZ,CACF,GAAG;IACF,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,qBAuJF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
3
|
-
"version": "25.6.
|
3
|
+
"version": "25.6.2",
|
4
4
|
"license": "COMMERCIAL",
|
5
5
|
"devDependencies": {
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
@@ -15,13 +15,13 @@
|
|
15
15
|
"dependencies": {
|
16
16
|
"@ant-design/icons": "5.4.0",
|
17
17
|
"@babel/runtime": "7.24.7",
|
18
|
-
"@crystaldesign/content-box": "25.6.
|
19
|
-
"@crystaldesign/content-item": "25.6.
|
20
|
-
"@crystaldesign/diva-core": "25.6.
|
21
|
-
"@crystaldesign/diva-utils": "25.6.
|
22
|
-
"@crystaldesign/media-upload": "25.6.
|
23
|
-
"@crystaldesign/rtf-editor": "25.6.
|
24
|
-
"@crystaldesign/spreadsheet": "25.6.
|
18
|
+
"@crystaldesign/content-box": "25.6.2",
|
19
|
+
"@crystaldesign/content-item": "25.6.2",
|
20
|
+
"@crystaldesign/diva-core": "25.6.2",
|
21
|
+
"@crystaldesign/diva-utils": "25.6.2",
|
22
|
+
"@crystaldesign/media-upload": "25.6.2",
|
23
|
+
"@crystaldesign/rtf-editor": "25.6.2",
|
24
|
+
"@crystaldesign/spreadsheet": "25.6.2",
|
25
25
|
"@google/model-viewer": "3.5.0",
|
26
26
|
"ag-charts-community": "^10.1.0",
|
27
27
|
"ag-charts-react": "^10.1.0",
|
@@ -51,5 +51,5 @@
|
|
51
51
|
},
|
52
52
|
"module": "build/esm/index.js",
|
53
53
|
"types": "./build/types/backoffice/src/index.d.ts",
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "7e549400affa0ab055500aa7b6ee02baf0a6b127"
|
55
55
|
}
|