@crystaldesign/diva-backoffice 26.13.0-beta.21 → 26.13.0-beta.23
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 +16 -0
- package/build/types/backoffice/src/tests/unit/ui/IDMCatalogEditor/Tables/priceFeatureGroupSubtables.test.d.ts +2 -0
- package/build/types/backoffice/src/tests/unit/ui/IDMCatalogEditor/Tables/priceFeatureGroupSubtables.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts +3 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts +3 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts.map +1 -1
- package/package.json +12 -12
package/build/esm/index.js
CHANGED
|
@@ -74388,6 +74388,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
|
74388
74388
|
apiConfig = _ref.apiConfig,
|
|
74389
74389
|
setNodeDataValue = _ref.setNodeDataValue,
|
|
74390
74390
|
setIsPercentage = _ref.setIsPercentage,
|
|
74391
|
+
onRowsSaved = _ref.onRowsSaved,
|
|
74391
74392
|
agentBoundParent = _ref.agentBoundParent;
|
|
74392
74393
|
var _useTranslation = useTranslation(),
|
|
74393
74394
|
i18n = _useTranslation.i18n;
|
|
@@ -74466,6 +74467,9 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
|
74466
74467
|
// A previous group's grid keeps its hooks after the switch, and a load or save still in flight for it answers late.
|
|
74467
74468
|
var shownGroupId = useRef(priceFeatureGroup._id);
|
|
74468
74469
|
shownGroupId.current = priceFeatureGroup._id;
|
|
74470
|
+
// Read at call time: the module hands a new function on every render.
|
|
74471
|
+
var latestOnRowsSaved = useRef(onRowsSaved);
|
|
74472
|
+
latestOnRowsSaved.current = onRowsSaved;
|
|
74469
74473
|
var hooks = useMemo(function () {
|
|
74470
74474
|
var groupId = priceFeatureGroup._id;
|
|
74471
74475
|
// The first block tells whether the group has percentage surcharges. An empty block clears only that claim, never
|
|
@@ -74473,6 +74477,9 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
|
74473
74477
|
var firstBlockSeen = false;
|
|
74474
74478
|
return {
|
|
74475
74479
|
onDataUpdated: function onDataUpdated(event) {
|
|
74480
|
+
var _latestOnRowsSaved$cu;
|
|
74481
|
+
// Only a row that was saved can add a price key; a failed save reports no updates.
|
|
74482
|
+
if (event.updates.length) (_latestOnRowsSaved$cu = latestOnRowsSaved.current) === null || _latestOnRowsSaved$cu === void 0 || _latestOnRowsSaved$cu.call(latestOnRowsSaved);
|
|
74476
74483
|
if (shownGroupId.current === groupId) _onDataUpdated(event);
|
|
74477
74484
|
},
|
|
74478
74485
|
onRowDataLoaded: function onRowDataLoaded(rows) {
|
|
@@ -74636,6 +74643,7 @@ function PriceFeatureGroupFinishes(_ref) {
|
|
|
74636
74643
|
apiConfig = _ref.apiConfig,
|
|
74637
74644
|
setNodeDataValue = _ref.setNodeDataValue,
|
|
74638
74645
|
setIsPercentage = _ref.setIsPercentage,
|
|
74646
|
+
onRowsSaved = _ref.onRowsSaved,
|
|
74639
74647
|
agentBoundParent = _ref.agentBoundParent;
|
|
74640
74648
|
var _useTranslation = useTranslation(),
|
|
74641
74649
|
t = _useTranslation.t,
|
|
@@ -74700,6 +74708,9 @@ function PriceFeatureGroupFinishes(_ref) {
|
|
|
74700
74708
|
// A previous group's grid keeps its hooks after the switch, and a load or save still in flight for it answers late.
|
|
74701
74709
|
var shownGroupId = useRef(priceFeatureGroup._id);
|
|
74702
74710
|
shownGroupId.current = priceFeatureGroup._id;
|
|
74711
|
+
// Read at call time: the module hands a new function on every render.
|
|
74712
|
+
var latestOnRowsSaved = useRef(onRowsSaved);
|
|
74713
|
+
latestOnRowsSaved.current = onRowsSaved;
|
|
74703
74714
|
var hooks = useMemo(function () {
|
|
74704
74715
|
var groupId = priceFeatureGroup._id;
|
|
74705
74716
|
// The first block tells whether the group has finishes: the row's isPercentage stays false after the group's last
|
|
@@ -74708,6 +74719,9 @@ function PriceFeatureGroupFinishes(_ref) {
|
|
|
74708
74719
|
var firstBlockSeen = false;
|
|
74709
74720
|
return {
|
|
74710
74721
|
onDataUpdated: function onDataUpdated(event) {
|
|
74722
|
+
var _latestOnRowsSaved$cu;
|
|
74723
|
+
// Only a row that was saved can add a price key; a failed save reports no updates.
|
|
74724
|
+
if (event.updates.length) (_latestOnRowsSaved$cu = latestOnRowsSaved.current) === null || _latestOnRowsSaved$cu === void 0 || _latestOnRowsSaved$cu.call(latestOnRowsSaved);
|
|
74711
74725
|
if (shownGroupId.current === groupId) _onDataUpdated(event);
|
|
74712
74726
|
},
|
|
74713
74727
|
onRowDataLoaded: function onRowDataLoaded(rows) {
|
|
@@ -74961,6 +74975,7 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
74961
74975
|
apiConfig: apiConfig,
|
|
74962
74976
|
setNodeDataValue: setNodeDataValue,
|
|
74963
74977
|
setIsPercentage: setIsPercentage,
|
|
74978
|
+
onRowsSaved: resetSeriesSelector,
|
|
74964
74979
|
agentBoundParent: _objectSpread$H(_objectSpread$H({}, boundPriceFeatureGroup), {}, {
|
|
74965
74980
|
tool: 'priceFeatureGroupFinishes'
|
|
74966
74981
|
})
|
|
@@ -74981,6 +74996,7 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
74981
74996
|
apiConfig: apiConfig,
|
|
74982
74997
|
setNodeDataValue: setNodeDataValue,
|
|
74983
74998
|
setIsPercentage: setIsPercentage,
|
|
74999
|
+
onRowsSaved: resetSeriesSelector,
|
|
74984
75000
|
agentBoundParent: _objectSpread$H(_objectSpread$H({}, boundPriceFeatureGroup), {}, {
|
|
74985
75001
|
tool: 'priceFeatureGroupPercentageSurcharge'
|
|
74986
75002
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceFeatureGroupSubtables.test.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/tests/unit/ui/IDMCatalogEditor/Tables/priceFeatureGroupSubtables.test.tsx"],"names":[],"mappings":""}
|
package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApiConfig } from '@crystaldesign/diva-core';
|
|
3
3
|
import type { AgentBoundParent } from '../../../store/GridRegistry';
|
|
4
|
-
export default function PriceFeatureGroupFinishes({ priceFeatureGroup, catalogId, defaultLanguage, apiConfig, setNodeDataValue, setIsPercentage, agentBoundParent, }: {
|
|
4
|
+
export default function PriceFeatureGroupFinishes({ priceFeatureGroup, catalogId, defaultLanguage, apiConfig, setNodeDataValue, setIsPercentage, onRowsSaved, agentBoundParent, }: {
|
|
5
5
|
priceFeatureGroup: any;
|
|
6
6
|
catalogId: string;
|
|
7
7
|
defaultLanguage?: string;
|
|
8
8
|
apiConfig: ApiConfig;
|
|
9
9
|
setNodeDataValue: (data: Record<string, any>) => Promise<boolean> | void;
|
|
10
10
|
setIsPercentage: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
11
|
+
/** Called after every save: it can give the serie a new price key column (PRFG<groupNo>_…). */
|
|
12
|
+
onRowsSaved?: () => void;
|
|
11
13
|
/** Set by the module that opens this subtable: the parent row it is bound to. */
|
|
12
14
|
agentBoundParent?: AgentBoundParent;
|
|
13
15
|
}): React.JSX.Element;
|
package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFeatureGroupFinishes.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAMrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,EAAE;IACD,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACzE,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,
|
|
1
|
+
{"version":3,"file":"PriceFeatureGroupFinishes.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAMrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACzE,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,+FAA+F;IAC/F,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,qBAkPA"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApiConfig } from '@crystaldesign/diva-core';
|
|
3
3
|
import type { AgentBoundParent } from '../../../store/GridRegistry';
|
|
4
|
-
export default function PriceFeatureGroupPercentageSurcharge({ priceFeatureGroup, catalogId, defaultLanguage, apiConfig, setNodeDataValue, setIsPercentage, agentBoundParent, }: {
|
|
4
|
+
export default function PriceFeatureGroupPercentageSurcharge({ priceFeatureGroup, catalogId, defaultLanguage, apiConfig, setNodeDataValue, setIsPercentage, onRowsSaved, agentBoundParent, }: {
|
|
5
5
|
priceFeatureGroup: any;
|
|
6
6
|
catalogId: string;
|
|
7
7
|
defaultLanguage?: string;
|
|
8
8
|
apiConfig: ApiConfig;
|
|
9
9
|
setNodeDataValue: (data: Record<string, any>) => Promise<boolean> | void;
|
|
10
10
|
setIsPercentage: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
11
|
+
/** Called after every save: it can give the serie a new price key column (PRFG<groupNo>_…). */
|
|
12
|
+
onRowsSaved?: () => void;
|
|
11
13
|
/** Set by the module that opens this subtable: the parent row it is bound to. */
|
|
12
14
|
agentBoundParent?: AgentBoundParent;
|
|
13
15
|
}): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFeatureGroupPercentageSurcharge.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAMrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,oCAAoC,CAAC,EAC3D,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,EAAE;IACD,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACzE,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,
|
|
1
|
+
{"version":3,"file":"PriceFeatureGroupPercentageSurcharge.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAMrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,oCAAoC,CAAC,EAC3D,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACzE,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,+FAA+F;IAC/F,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,qBA6OA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,eAAO,MAAM,uBAAuB;;CA4QlC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.13.0-beta.
|
|
3
|
+
"version": "26.13.0-beta.23",
|
|
4
4
|
"description": "Ant Design backoffice shell (configuration modules), the Diva Data Engine component hosting the IDM and enricher editors, and the Produkt Onboarding component hosting the Assortment Manager.",
|
|
5
5
|
"license": "COMMERCIAL",
|
|
6
6
|
"devDependencies": {
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@ant-design/icons": "6.3.4",
|
|
18
18
|
"@babel/runtime": "7.24.7",
|
|
19
|
-
"@crystaldesign/classification": "26.13.0-beta.
|
|
20
|
-
"@crystaldesign/content-box": "26.13.0-beta.
|
|
21
|
-
"@crystaldesign/content-item": "26.13.0-beta.
|
|
22
|
-
"@crystaldesign/diva-agent": "26.13.0-beta.
|
|
23
|
-
"@crystaldesign/diva-core": "26.13.0-beta.
|
|
24
|
-
"@crystaldesign/diva-utils": "26.13.0-beta.
|
|
25
|
-
"@crystaldesign/mass-configurator": "26.13.0-beta.
|
|
26
|
-
"@crystaldesign/media-upload": "26.13.0-beta.
|
|
27
|
-
"@crystaldesign/rtf-editor": "26.13.0-beta.
|
|
28
|
-
"@crystaldesign/spreadsheet": "26.13.0-beta.
|
|
19
|
+
"@crystaldesign/classification": "26.13.0-beta.23",
|
|
20
|
+
"@crystaldesign/content-box": "26.13.0-beta.23",
|
|
21
|
+
"@crystaldesign/content-item": "26.13.0-beta.23",
|
|
22
|
+
"@crystaldesign/diva-agent": "26.13.0-beta.23",
|
|
23
|
+
"@crystaldesign/diva-core": "26.13.0-beta.23",
|
|
24
|
+
"@crystaldesign/diva-utils": "26.13.0-beta.23",
|
|
25
|
+
"@crystaldesign/mass-configurator": "26.13.0-beta.23",
|
|
26
|
+
"@crystaldesign/media-upload": "26.13.0-beta.23",
|
|
27
|
+
"@crystaldesign/rtf-editor": "26.13.0-beta.23",
|
|
28
|
+
"@crystaldesign/spreadsheet": "26.13.0-beta.23",
|
|
29
29
|
"@dnd-kit/core": "^6.1.0",
|
|
30
30
|
"@dnd-kit/sortable": "^8.0.0",
|
|
31
31
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"suiteName": "diva-backoffice",
|
|
64
64
|
"outputDirectory": "./test-reports"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "73107bba2ec5a271de85f562536f426f0968b1ba"
|
|
67
67
|
}
|