@crystaldesign/diva-backoffice 25.9.0-beta.13 → 25.9.0-beta.15
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 +67 -36
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts +2 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/priceFactorHelpers.d.ts +2 -2
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
@@ -33769,7 +33769,7 @@ var SeriesSelector$2 = function SeriesSelector(_ref) {
|
|
33769
33769
|
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
|
33770
33770
|
},
|
33771
33771
|
selectMapping: {
|
33772
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
33772
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "} (${serieNo})"),
|
33773
33773
|
value: '${serieNo}'
|
33774
33774
|
},
|
33775
33775
|
autoSelectFirst: true,
|
@@ -34869,7 +34869,7 @@ var formatListValue = function formatListValue(values, type, locale) {
|
|
34869
34869
|
/**
|
34870
34870
|
* Converts an internal value to its display representation
|
34871
34871
|
* For factors: keeps the decimal value
|
34872
|
-
* For discounts: converts to percentage (e.g., 0.
|
34872
|
+
* For discounts: converts from negative factor to percentage string (e.g., "0.95" -> "5")
|
34873
34873
|
* @param value - The internal value to convert
|
34874
34874
|
* @param type - The type of price modification
|
34875
34875
|
* @returns The display value as string
|
@@ -34877,13 +34877,13 @@ var formatListValue = function formatListValue(values, type, locale) {
|
|
34877
34877
|
var convertToDisplayValue = function convertToDisplayValue(value, type) {
|
34878
34878
|
if (type === 'factor') return value;
|
34879
34879
|
var numValue = parseFloat(value);
|
34880
|
-
return isNaN(numValue) ? '0' : Math.round(numValue * 100).toString();
|
34880
|
+
return isNaN(numValue) ? '0' : Math.round((1 - numValue) * 100).toString();
|
34881
34881
|
};
|
34882
34882
|
|
34883
34883
|
/**
|
34884
34884
|
* Converts a display value back to its internal representation
|
34885
34885
|
* For factors: keeps the input value
|
34886
|
-
* For discounts: converts
|
34886
|
+
* For discounts: converts the input as a negative factor (e.g., "5" -> "0.95" for a 5% discount)
|
34887
34887
|
* @param value - The display value to convert
|
34888
34888
|
* @param type - The type of price modification
|
34889
34889
|
* @returns The internal value as string
|
@@ -34891,7 +34891,7 @@ var convertToDisplayValue = function convertToDisplayValue(value, type) {
|
|
34891
34891
|
var convertFromDisplayValue = function convertFromDisplayValue(value, type) {
|
34892
34892
|
if (type === 'factor') return value;
|
34893
34893
|
var numValue = parseInt(value, 10);
|
34894
|
-
return isNaN(numValue) ? '0' : (numValue / 100).toString();
|
34894
|
+
return isNaN(numValue) ? '0' : (1 - numValue / 100).toString();
|
34895
34895
|
};
|
34896
34896
|
|
34897
34897
|
/**
|
@@ -36480,13 +36480,14 @@ function Content$3() {
|
|
36480
36480
|
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
36481
36481
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
36482
36482
|
function UploadButton (_ref) {
|
36483
|
-
var action = _ref.action
|
36484
|
-
|
36485
|
-
|
36486
|
-
contentType = _ref.contentType,
|
36483
|
+
var action = _ref.action;
|
36484
|
+
_ref.title;
|
36485
|
+
_ref.disabled;
|
36486
|
+
var contentType = _ref.contentType,
|
36487
36487
|
updateProgress = _ref.updateProgress,
|
36488
36488
|
fileList = _ref.fileList,
|
36489
|
-
progress = _ref.progress
|
36489
|
+
progress = _ref.progress,
|
36490
|
+
setName = _ref.setName;
|
36490
36491
|
var _useTranslation = useTranslation(),
|
36491
36492
|
t = _useTranslation.t;
|
36492
36493
|
var root = useStore();
|
@@ -36510,10 +36511,27 @@ function UploadButton (_ref) {
|
|
36510
36511
|
ref.current = undefined;
|
36511
36512
|
}
|
36512
36513
|
} else if (status === 'error') {
|
36513
|
-
var _file$response
|
36514
|
+
var _file$response, _file$response2;
|
36514
36515
|
progress = 'ERROR';
|
36515
36516
|
fileList = [];
|
36516
|
-
|
36517
|
+
if ((_file$response = file.response) !== null && _file$response !== void 0 && _file$response.error) {
|
36518
|
+
error = file.response.error;
|
36519
|
+
} else if ((_file$response2 = file.response) !== null && _file$response2 !== void 0 && _file$response2.errors) {
|
36520
|
+
// If response has a validation error structure, extract messages
|
36521
|
+
if (_typeof(file.response.errors) === 'object') {
|
36522
|
+
error = Object.values(file.response.errors).map(function (v) {
|
36523
|
+
return Array.isArray(v) ? v.join(', ') : v;
|
36524
|
+
}).join('; ');
|
36525
|
+
} else {
|
36526
|
+
error = file.response.errors;
|
36527
|
+
}
|
36528
|
+
} else {
|
36529
|
+
try {
|
36530
|
+
error = JSON.parse(file.response);
|
36531
|
+
} catch (_unused) {
|
36532
|
+
error = 'Unknown error';
|
36533
|
+
}
|
36534
|
+
}
|
36517
36535
|
if (ref.current) {
|
36518
36536
|
clearInterval(ref.current.interval);
|
36519
36537
|
ref.current = undefined;
|
@@ -36568,34 +36586,37 @@ function UploadButton (_ref) {
|
|
36568
36586
|
// Allow both XML and ZIP files
|
36569
36587
|
isXml = file.type === 'application/xml' || file.type === 'text/xml' || file.name.endsWith('.xml');
|
36570
36588
|
isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
|
36589
|
+
nameWithoutExt = file.name.substring(0, file.name.lastIndexOf('.')) || file.name;
|
36571
36590
|
if (!(!isXml && !isZip)) {
|
36572
|
-
_context.next =
|
36591
|
+
_context.next = 6;
|
36573
36592
|
break;
|
36574
36593
|
}
|
36575
36594
|
updateProgress('ERROR', fileList, t('backoffice.idmEnricher.import.uploadinvalid'));
|
36576
36595
|
return _context.abrupt("return", Upload$2.LIST_IGNORE);
|
36577
|
-
case
|
36596
|
+
case 6:
|
36597
|
+
setName(nameWithoutExt);
|
36598
|
+
|
36599
|
+
// If it's already a ZIP file, return it as is
|
36578
36600
|
if (!isZip) {
|
36579
|
-
_context.next =
|
36601
|
+
_context.next = 9;
|
36580
36602
|
break;
|
36581
36603
|
}
|
36582
36604
|
return _context.abrupt("return", file);
|
36583
|
-
case
|
36605
|
+
case 9:
|
36584
36606
|
// For XML files, create a ZIP
|
36585
|
-
nameWithoutExt = file.name.substring(0, file.name.lastIndexOf('.')) || file.name;
|
36586
36607
|
zip = new JSZip();
|
36587
36608
|
zip.file(file.name, file);
|
36588
|
-
_context.next =
|
36609
|
+
_context.next = 13;
|
36589
36610
|
return zip.generateAsync({
|
36590
36611
|
type: 'blob'
|
36591
36612
|
});
|
36592
|
-
case
|
36613
|
+
case 13:
|
36593
36614
|
zipBlob = _context.sent;
|
36594
36615
|
zipFile = new File([zipBlob], nameWithoutExt + '.zip', {
|
36595
36616
|
type: 'application/zip'
|
36596
36617
|
});
|
36597
36618
|
return _context.abrupt("return", zipFile);
|
36598
|
-
case
|
36619
|
+
case 16:
|
36599
36620
|
case "end":
|
36600
36621
|
return _context.stop();
|
36601
36622
|
}
|
@@ -36624,12 +36645,18 @@ function UploadButton (_ref) {
|
|
36624
36645
|
}
|
36625
36646
|
};
|
36626
36647
|
return /*#__PURE__*/jsx(Fragment, {
|
36627
|
-
children: /*#__PURE__*/
|
36628
|
-
|
36629
|
-
|
36630
|
-
|
36631
|
-
children:
|
36632
|
-
})
|
36648
|
+
children: /*#__PURE__*/jsxs(Upload$2.Dragger, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
36649
|
+
disabled: progress === 'INPROGRESS',
|
36650
|
+
children: [/*#__PURE__*/jsx("p", {
|
36651
|
+
className: "ant-upload-drag-icon",
|
36652
|
+
children: /*#__PURE__*/jsx(UploadOutlined$1, {})
|
36653
|
+
}), /*#__PURE__*/jsx("p", {
|
36654
|
+
className: "ant-upload-text",
|
36655
|
+
children: t('backoffice.idmEnricher.import.uploadtext')
|
36656
|
+
}), /*#__PURE__*/jsx("p", {
|
36657
|
+
className: "ant-upload-hint",
|
36658
|
+
children: t('backoffice.idmEnricher.import.uploadhint')
|
36659
|
+
})]
|
36633
36660
|
}))
|
36634
36661
|
});
|
36635
36662
|
}
|
@@ -36645,7 +36672,7 @@ function IDMImportForm (_ref) {
|
|
36645
36672
|
progress = _ref.progress,
|
36646
36673
|
name = _ref.name,
|
36647
36674
|
error = _ref.error,
|
36648
|
-
|
36675
|
+
_setName = _ref.setName,
|
36649
36676
|
fileList = _ref.fileList;
|
36650
36677
|
var _useTranslation = useTranslation(),
|
36651
36678
|
t = _useTranslation.t;
|
@@ -36660,10 +36687,11 @@ function IDMImportForm (_ref) {
|
|
36660
36687
|
}],
|
36661
36688
|
children: /*#__PURE__*/jsx(Input, {
|
36662
36689
|
onChange: function onChange(e) {
|
36663
|
-
return
|
36690
|
+
return _setName(e.target.value);
|
36664
36691
|
},
|
36665
36692
|
value: name,
|
36666
|
-
|
36693
|
+
placeholder: t('backoffice.idmEnricher.import.nameplaceholder'),
|
36694
|
+
disabled: progress === 'INPROGRESS'
|
36667
36695
|
})
|
36668
36696
|
}), /*#__PURE__*/jsx(Form$1.Item, {
|
36669
36697
|
children: /*#__PURE__*/jsx(UploadButton, {
|
@@ -36671,8 +36699,11 @@ function IDMImportForm (_ref) {
|
|
36671
36699
|
contentType: "multipart/form-data",
|
36672
36700
|
updateProgress: updateProgress,
|
36673
36701
|
progress: progress,
|
36674
|
-
disabled:
|
36675
|
-
fileList: fileList
|
36702
|
+
disabled: progress === 'INPROGRESS',
|
36703
|
+
fileList: fileList,
|
36704
|
+
setName: function setName(fileName) {
|
36705
|
+
return !name && _setName(fileName);
|
36706
|
+
}
|
36676
36707
|
})
|
36677
36708
|
}), /*#__PURE__*/jsxs(Form$1.Item, {
|
36678
36709
|
style: {
|
@@ -36741,6 +36772,9 @@ function OpenModalButton (_ref) {
|
|
36741
36772
|
setProgress(progress);
|
36742
36773
|
setFileList(fileList);
|
36743
36774
|
setError(error);
|
36775
|
+
if (progress === 'SUCCESS') {
|
36776
|
+
setName('');
|
36777
|
+
}
|
36744
36778
|
};
|
36745
36779
|
var buttonText = progress == undefined || progress == 'ERROR' ? t('backoffice.idmEnricher.import.cancel') : progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : t('backoffice.idmEnricher.import.finish');
|
36746
36780
|
return /*#__PURE__*/jsxs(Fragment, {
|
@@ -36753,17 +36787,14 @@ function OpenModalButton (_ref) {
|
|
36753
36787
|
open: isModalOpen,
|
36754
36788
|
onOk: handleOk,
|
36755
36789
|
onCancel: handleOk,
|
36756
|
-
cancelButtonProps:
|
36790
|
+
cancelButtonProps: {
|
36757
36791
|
style: {
|
36758
36792
|
display: 'none'
|
36759
36793
|
}
|
36760
|
-
} : {
|
36761
|
-
onClick: resetProgress
|
36762
36794
|
},
|
36763
36795
|
closable: progress !== 'INPROGRESS',
|
36764
36796
|
maskClosable: progress !== 'INPROGRESS',
|
36765
36797
|
okText: buttonText,
|
36766
|
-
cancelText: progress === 'SUCCESS' ? t('backoffice.idmEnricher.import.new') : undefined,
|
36767
36798
|
okButtonProps: {
|
36768
36799
|
disabled: progress === 'INPROGRESS'
|
36769
36800
|
} // Disable the button if progress is 'INPROGRESS'
|
@@ -37773,7 +37804,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
37773
37804
|
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id")
|
37774
37805
|
};
|
37775
37806
|
var selectMapping = {
|
37776
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
37807
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "} (${serieNo})"),
|
37777
37808
|
value: '${_id}'
|
37778
37809
|
};
|
37779
37810
|
var fetchSerie = /*#__PURE__*/function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IDMImportForm.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrG,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"IDMImportForm.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrG,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,qBAsCvH"}
|
package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/OpenModalButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/OpenModalButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,KAAK,qBAyEnF"}
|
@@ -9,7 +9,8 @@ interface Props {
|
|
9
9
|
updateProgress: (state: IDMIMportProgressState, fileList: UploadFile<any>[], error?: string) => void;
|
10
10
|
progress: IDMIMportProgressState;
|
11
11
|
fileList: UploadFile<any>[];
|
12
|
+
setName: (name: string) => void;
|
12
13
|
}
|
13
|
-
export default function ({ action, title, disabled, contentType, updateProgress, fileList, progress }: Props): React.JSX.Element;
|
14
|
+
export default function ({ action, title, disabled, contentType, updateProgress, fileList, progress, setName }: Props): React.JSX.Element;
|
14
15
|
export {};
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,MAAM,CAAC;AAIpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGlD,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrG,QAAQ,EAAE,sBAAsB,CAAC;IACjC,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,MAAM,CAAC;AAIpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGlD,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrG,QAAQ,EAAE,sBAAsB,CAAC;IACjC,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,qBAmJpH"}
|
@@ -26,7 +26,7 @@ export declare const formatListValue: (values: number[], type: PriceType, locale
|
|
26
26
|
/**
|
27
27
|
* Converts an internal value to its display representation
|
28
28
|
* For factors: keeps the decimal value
|
29
|
-
* For discounts: converts to percentage (e.g., 0.
|
29
|
+
* For discounts: converts from negative factor to percentage string (e.g., "0.95" -> "5")
|
30
30
|
* @param value - The internal value to convert
|
31
31
|
* @param type - The type of price modification
|
32
32
|
* @returns The display value as string
|
@@ -35,7 +35,7 @@ export declare const convertToDisplayValue: (value: string, type: PriceType) =>
|
|
35
35
|
/**
|
36
36
|
* Converts a display value back to its internal representation
|
37
37
|
* For factors: keeps the input value
|
38
|
-
* For discounts: converts
|
38
|
+
* For discounts: converts the input as a negative factor (e.g., "5" -> "0.95" for a 5% discount)
|
39
39
|
* @param value - The display value to convert
|
40
40
|
* @param type - The type of price modification
|
41
41
|
* @returns The internal value as string
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
3
|
-
"version": "25.9.0-beta.
|
3
|
+
"version": "25.9.0-beta.15",
|
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.9.0-beta.
|
19
|
-
"@crystaldesign/content-item": "25.9.0-beta.
|
20
|
-
"@crystaldesign/diva-core": "25.9.0-beta.
|
21
|
-
"@crystaldesign/diva-utils": "25.9.0-beta.
|
22
|
-
"@crystaldesign/media-upload": "25.9.0-beta.
|
23
|
-
"@crystaldesign/rtf-editor": "25.9.0-beta.
|
24
|
-
"@crystaldesign/spreadsheet": "25.9.0-beta.
|
18
|
+
"@crystaldesign/content-box": "25.9.0-beta.15",
|
19
|
+
"@crystaldesign/content-item": "25.9.0-beta.15",
|
20
|
+
"@crystaldesign/diva-core": "25.9.0-beta.15",
|
21
|
+
"@crystaldesign/diva-utils": "25.9.0-beta.15",
|
22
|
+
"@crystaldesign/media-upload": "25.9.0-beta.15",
|
23
|
+
"@crystaldesign/rtf-editor": "25.9.0-beta.15",
|
24
|
+
"@crystaldesign/spreadsheet": "25.9.0-beta.15",
|
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": "0fce5cf3bb5666e6dc433a3bd63af6a2865792df"
|
55
55
|
}
|