@crystaldesign/diva-backoffice 25.3.0-beta.14 → 25.3.0-beta.16
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 +62 -26
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts +5 -6
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/index.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -8391,6 +8391,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8391
8391
|
hidden: true
|
|
8392
8392
|
}]
|
|
8393
8393
|
});
|
|
8394
|
+
translationItems.push({
|
|
8395
|
+
name: [].concat(_toConsumableArray(p), ['disableFullscreen']),
|
|
8396
|
+
type: 'checkbox',
|
|
8397
|
+
label: t('backoffice.form.contentItem.disableFullscreen')
|
|
8398
|
+
});
|
|
8394
8399
|
break;
|
|
8395
8400
|
case 'Image':
|
|
8396
8401
|
translationItems.push({
|
|
@@ -8421,6 +8426,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8421
8426
|
label: t('backoffice.table.views.rowAction.label'),
|
|
8422
8427
|
doTranslate: true
|
|
8423
8428
|
});
|
|
8429
|
+
translationItems.push({
|
|
8430
|
+
name: [].concat(_toConsumableArray(p), ['disableFullscreen']),
|
|
8431
|
+
type: 'checkbox',
|
|
8432
|
+
label: t('backoffice.form.contentItem.disableFullscreen')
|
|
8433
|
+
});
|
|
8424
8434
|
break;
|
|
8425
8435
|
case 'Video':
|
|
8426
8436
|
translationItems.push({
|
|
@@ -8568,6 +8578,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8568
8578
|
name: [].concat(_toConsumableArray(p), ['Gallery']),
|
|
8569
8579
|
type: 'subTitle'
|
|
8570
8580
|
});
|
|
8581
|
+
translationItems.push({
|
|
8582
|
+
name: [].concat(_toConsumableArray(p), ['disableFullscreen']),
|
|
8583
|
+
type: 'checkbox',
|
|
8584
|
+
label: t('backoffice.form.contentItem.disableFullscreen')
|
|
8585
|
+
});
|
|
8571
8586
|
translationItems.push({
|
|
8572
8587
|
name: [].concat(_toConsumableArray(p), ['type']),
|
|
8573
8588
|
hidden: true
|
|
@@ -8642,6 +8657,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8642
8657
|
label: t('backoffice.table.views.rowAction.label'),
|
|
8643
8658
|
doTranslate: true
|
|
8644
8659
|
});
|
|
8660
|
+
translationItems.push({
|
|
8661
|
+
name: [].concat(_toConsumableArray(p), ['disableFullscreen']),
|
|
8662
|
+
type: 'checkbox',
|
|
8663
|
+
label: t('backoffice.form.contentItem.disableFullscreen')
|
|
8664
|
+
});
|
|
8645
8665
|
break;
|
|
8646
8666
|
case 'Video':
|
|
8647
8667
|
translationItems.push({
|
|
@@ -31721,6 +31741,7 @@ var getConfig$1 = function getConfig(isoLanguageIds) {
|
|
|
31721
31741
|
colDef: [{
|
|
31722
31742
|
headerName: 'backoffice.idmEnricher.renaming.label.serieNo',
|
|
31723
31743
|
field: 'serieNo',
|
|
31744
|
+
cellDataType: 'number',
|
|
31724
31745
|
required: true,
|
|
31725
31746
|
editable: false
|
|
31726
31747
|
}, createTranslatedColumnConfig('translatedSeriesName', 'backoffice.idmEnricher.renaming.label.serieName', isoLanguageIds, false, 'withPlaceholder', {
|
|
@@ -32137,11 +32158,11 @@ function getConfig(t) {
|
|
|
32137
32158
|
cellDataType: 'number'
|
|
32138
32159
|
}, {
|
|
32139
32160
|
headerName: 'backoffice.idmEnricher.exclusivity.label.validFrom',
|
|
32140
|
-
field: '
|
|
32161
|
+
field: 'validFromDate',
|
|
32141
32162
|
cellDataType: 'dateString',
|
|
32142
32163
|
editable: false
|
|
32143
32164
|
}, {
|
|
32144
|
-
field: '
|
|
32165
|
+
field: 'validUntilDate',
|
|
32145
32166
|
headerName: 'backoffice.idmEnricher.exclusivity.label.validUntil',
|
|
32146
32167
|
cellDataType: 'dateString',
|
|
32147
32168
|
editable: false
|
|
@@ -33245,13 +33266,40 @@ var css_248z$9 = ".container-T4Tzz {\n display: flex;\n align-items: center;\n
|
|
|
33245
33266
|
styleInject(css_248z$9);
|
|
33246
33267
|
|
|
33247
33268
|
function PriceDisplayCellRenderer(props) {
|
|
33248
|
-
var
|
|
33269
|
+
var _data$origPrices, _data$manualPrices, _currentPrice$toFixed, _origPrice$toFixed;
|
|
33249
33270
|
var value = props.value,
|
|
33250
|
-
commas = props.commas
|
|
33251
|
-
|
|
33252
|
-
|
|
33271
|
+
commas = props.commas,
|
|
33272
|
+
item = props.item,
|
|
33273
|
+
data = props.data,
|
|
33274
|
+
node = props.node,
|
|
33275
|
+
column = props.column,
|
|
33276
|
+
api = props.api;
|
|
33277
|
+
var origPrice = data === null || data === void 0 || (_data$origPrices = data.origPrices) === null || _data$origPrices === void 0 ? void 0 : _data$origPrices[item !== null && item !== void 0 ? item : ''];
|
|
33278
|
+
var currentPrice = value;
|
|
33253
33279
|
var diffPercentage = origPrice && currentPrice ? (currentPrice - origPrice) / origPrice * 100 : undefined;
|
|
33254
|
-
var isManualPrice = (
|
|
33280
|
+
var isManualPrice = data === null || data === void 0 || (_data$manualPrices = data.manualPrices) === null || _data$manualPrices === void 0 ? void 0 : _data$manualPrices.includes(item !== null && item !== void 0 ? item : '');
|
|
33281
|
+
useEffect(function () {
|
|
33282
|
+
//The cellrenderer is only rerendered when the value (currentPrice) changes.
|
|
33283
|
+
//So we need to listen for changes in the other properties and refresh the cell manually if necessary
|
|
33284
|
+
var listener = function listener(_ref) {
|
|
33285
|
+
var _newData$manualPrices, _newData$origPrices;
|
|
33286
|
+
var newData = _ref.newData;
|
|
33287
|
+
var newIsManualPrice = newData === null || newData === void 0 || (_newData$manualPrices = newData.manualPrices) === null || _newData$manualPrices === void 0 ? void 0 : _newData$manualPrices.includes(item !== null && item !== void 0 ? item : '');
|
|
33288
|
+
var newOrigPrice = newData === null || newData === void 0 || (_newData$origPrices = newData.origPrices) === null || _newData$origPrices === void 0 ? void 0 : _newData$origPrices[item !== null && item !== void 0 ? item : ''];
|
|
33289
|
+
if (newIsManualPrice !== isManualPrice || newOrigPrice !== origPrice) {
|
|
33290
|
+
api.refreshCells({
|
|
33291
|
+
force: true,
|
|
33292
|
+
suppressFlash: true,
|
|
33293
|
+
rowNodes: [node],
|
|
33294
|
+
columns: [column !== null && column !== void 0 ? column : '']
|
|
33295
|
+
});
|
|
33296
|
+
}
|
|
33297
|
+
};
|
|
33298
|
+
node.addEventListener('dataChanged', listener);
|
|
33299
|
+
return function () {
|
|
33300
|
+
node.removeEventListener('dataChanged', listener);
|
|
33301
|
+
};
|
|
33302
|
+
}, []);
|
|
33255
33303
|
return /*#__PURE__*/jsxs("div", {
|
|
33256
33304
|
className: container$2,
|
|
33257
33305
|
children: [/*#__PURE__*/jsxs("span", {
|
|
@@ -33524,28 +33572,16 @@ function Prices (_ref) {
|
|
|
33524
33572
|
cellDataType: 'number',
|
|
33525
33573
|
headerTooltip: (_priceFeatureGroup$ke3 = priceFeatureGroup.keysDisplayTexts) === null || _priceFeatureGroup$ke3 === void 0 ? void 0 : _priceFeatureGroup$ke3[j],
|
|
33526
33574
|
cellRenderer: PriceDisplayCellRenderer,
|
|
33527
|
-
valueGetter: function valueGetter(_ref3) {
|
|
33528
|
-
var _data$prices, _data$origPrices, _data$manualPrices;
|
|
33529
|
-
var data = _ref3.data;
|
|
33530
|
-
if (!data) return;
|
|
33531
|
-
return {
|
|
33532
|
-
price: (_data$prices = data.prices) === null || _data$prices === void 0 ? void 0 : _data$prices[priceFeatureGroupItem],
|
|
33533
|
-
origPrice: (_data$origPrices = data.origPrices) === null || _data$origPrices === void 0 ? void 0 : _data$origPrices[priceFeatureGroupItem],
|
|
33534
|
-
isManualPrice: (_data$manualPrices = data.manualPrices) === null || _data$manualPrices === void 0 ? void 0 : _data$manualPrices.includes(priceFeatureGroupItem)
|
|
33535
|
-
};
|
|
33536
|
-
},
|
|
33537
|
-
equals: function equals(a, b) {
|
|
33538
|
-
return (a === null || a === void 0 ? void 0 : a.price) === (b === null || b === void 0 ? void 0 : b.price) && (a === null || a === void 0 ? void 0 : a.origPrice) === (b === null || b === void 0 ? void 0 : b.origPrice) && (a === null || a === void 0 ? void 0 : a.isManualPrice) === (b === null || b === void 0 ? void 0 : b.isManualPrice);
|
|
33539
|
-
},
|
|
33540
33575
|
cellRendererParams: {
|
|
33541
|
-
commas: pricelist.commas
|
|
33576
|
+
commas: pricelist.commas,
|
|
33577
|
+
item: priceFeatureGroupItem
|
|
33542
33578
|
},
|
|
33543
33579
|
additionalFields: ["origPrices.".concat(priceFeatureGroupItem)],
|
|
33544
33580
|
headerClass: inputHeader,
|
|
33545
33581
|
headerComponentParams: {
|
|
33546
33582
|
additionalElement: /*#__PURE__*/jsx(PriceFactorInput, {
|
|
33547
33583
|
onSave: (/*#__PURE__*/function () {
|
|
33548
|
-
var
|
|
33584
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data, value) {
|
|
33549
33585
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
33550
33586
|
while (1) switch (_context2.prev = _context2.next) {
|
|
33551
33587
|
case 0:
|
|
@@ -33557,7 +33593,7 @@ function Prices (_ref) {
|
|
|
33557
33593
|
}, _callee2);
|
|
33558
33594
|
}));
|
|
33559
33595
|
return function (_x3, _x4) {
|
|
33560
|
-
return
|
|
33596
|
+
return _ref3.apply(this, arguments);
|
|
33561
33597
|
};
|
|
33562
33598
|
}()),
|
|
33563
33599
|
value: (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 || (_pricelist$pgPricefac = _pricelist$pgPricefac[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[priceFeatureGroupItem],
|
|
@@ -33625,7 +33661,7 @@ function Prices (_ref) {
|
|
|
33625
33661
|
value: (_pricelist$seriePrice = pricelist.seriePricefactors) === null || _pricelist$seriePrice === void 0 ? void 0 : _pricelist$seriePrice[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo],
|
|
33626
33662
|
title: t('backoffice.idmCatalog.prices.priceFactor.label.series'),
|
|
33627
33663
|
onSave: (/*#__PURE__*/function () {
|
|
33628
|
-
var
|
|
33664
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_, value) {
|
|
33629
33665
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
33630
33666
|
while (1) switch (_context3.prev = _context3.next) {
|
|
33631
33667
|
case 0:
|
|
@@ -33637,7 +33673,7 @@ function Prices (_ref) {
|
|
|
33637
33673
|
}, _callee3);
|
|
33638
33674
|
}));
|
|
33639
33675
|
return function (_x5, _x6) {
|
|
33640
|
-
return
|
|
33676
|
+
return _ref4.apply(this, arguments);
|
|
33641
33677
|
};
|
|
33642
33678
|
}()),
|
|
33643
33679
|
disabled: !selectedSerie
|
|
@@ -39664,7 +39700,7 @@ var getTranslation = function getTranslation(text, lang) {
|
|
|
39664
39700
|
};
|
|
39665
39701
|
|
|
39666
39702
|
var container = "container-Xbv0B";
|
|
39667
|
-
var css_248z = ".container-Xbv0B {\n background: white;\n color: black;\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.darkmode .container-Xbv0B {\n border-color: #424242;\n}\n";
|
|
39703
|
+
var css_248z = ".container-Xbv0B {\n background: white;\n color: black;\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n}\n\n.darkmode .container-Xbv0B {\n border-color: #424242;\n}\n";
|
|
39668
39704
|
styleInject(css_248z);
|
|
39669
39705
|
|
|
39670
39706
|
var WsyiwygContentItem = function WsyiwygContentItem(_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CustomCellRendererProps } from 'ag-grid-react';
|
|
3
3
|
import { DivaContext } from '@crystaldesign/spreadsheet';
|
|
4
|
-
|
|
4
|
+
interface Data {
|
|
5
5
|
prices: {
|
|
6
6
|
[key: string]: number;
|
|
7
7
|
};
|
|
@@ -9,11 +9,10 @@ export default function PriceDisplayCellRenderer(props: CustomCellRendererProps<
|
|
|
9
9
|
[key: string]: number;
|
|
10
10
|
};
|
|
11
11
|
manualPrices: string[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
origPrice: number;
|
|
15
|
-
isManualPrice: boolean;
|
|
16
|
-
}, DivaContext> & {
|
|
12
|
+
}
|
|
13
|
+
export default function PriceDisplayCellRenderer(props: CustomCellRendererProps<Data, number, DivaContext> & {
|
|
17
14
|
commas?: number;
|
|
15
|
+
item?: string;
|
|
18
16
|
}): React.JSX.Element;
|
|
17
|
+
export {};
|
|
19
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAazD,UAAU,IAAI;IACZ,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;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,EAAE,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAgD9I"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/Tables/Prices/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/Tables/Prices/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAWrE,MAAM,CAAC,OAAO,WAAW,EACvB,cAAc,EACd,SAAS,EACT,SAAS,EACT,SAAS,EACT,gBAAgB,GACjB,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;IACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;CAC1D,qBA4RA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "25.3.0-beta.
|
|
3
|
+
"version": "25.3.0-beta.16",
|
|
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.3.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "25.3.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "25.3.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "25.3.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "25.3.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "25.3.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "25.3.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "25.3.0-beta.16",
|
|
19
|
+
"@crystaldesign/content-item": "25.3.0-beta.16",
|
|
20
|
+
"@crystaldesign/diva-core": "25.3.0-beta.16",
|
|
21
|
+
"@crystaldesign/diva-utils": "25.3.0-beta.16",
|
|
22
|
+
"@crystaldesign/media-upload": "25.3.0-beta.16",
|
|
23
|
+
"@crystaldesign/rtf-editor": "25.3.0-beta.16",
|
|
24
|
+
"@crystaldesign/spreadsheet": "25.3.0-beta.16",
|
|
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": "ca1eff765abecb3093e22e0838a5cbc721d81ebe"
|
|
55
55
|
}
|