@crystaldesign/diva-backoffice 26.10.0-beta.33 → 26.10.0-beta.34
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 +4794 -911
- package/build/types/backoffice/src/Configuration.d.ts +3 -2
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/hooks/useUnsavedChanges.d.ts +35 -0
- package/build/types/backoffice/src/hooks/useUnsavedChanges.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts +4 -0
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/AffectedCount/index.d.ts +17 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/AffectedCount/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/Content/index.d.ts +38 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/Content/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/GroupCard/index.d.ts +13 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/GroupCard/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/HeaderField/index.d.ts +21 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/HeaderField/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/ItemGroupTable/index.d.ts +24 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/ItemGroupTable/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/PagedDropdownSelect/index.d.ts +16 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/PagedDropdownSelect/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useAffectedProducts.d.ts +20 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useAffectedProducts.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useCreateHeaderData.d.ts +18 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useCreateHeaderData.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useDropdownEnumData.d.ts +44 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useDropdownEnumData.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useHeaderData.d.ts +26 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useHeaderData.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/usePersistedFilter.d.ts +14 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/usePersistedFilter.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useSaveHeaderData.d.ts +25 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useSaveHeaderData.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/index.d.ts +7 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/dropEmptyRows.d.ts +9 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/dropEmptyRows.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/enabledWhenRules.d.ts +18 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/enabledWhenRules.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/fixedValueRules.d.ts +18 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/fixedValueRules.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupColumns.d.ts +22 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupColumns.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupToolId.d.ts +7 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupToolId.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/syntheticRowIds.d.ts +12 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/syntheticRowIds.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/types.d.ts +32 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/config/fields.d.ts +3 -0
- package/build/types/backoffice/src/ui/AssortmentManager/config/fields.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/config/headerTemplate.d.ts +15 -0
- package/build/types/backoffice/src/ui/AssortmentManager/config/headerTemplate.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/index.d.ts +4 -0
- package/build/types/backoffice/src/ui/AssortmentManager/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/dropEmptyRows.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/dropEmptyRows.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/enabledWhenRules.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/enabledWhenRules.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/fixedValueRules.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/fixedValueRules.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/itemGroupColumns.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/itemGroupColumns.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/types.d.ts +139 -0
- package/build/types/backoffice/src/ui/AssortmentManager/types.d.ts.map +1 -0
- package/package.json +9 -9
package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupColumns.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemGroupColumns.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/AssortmentManager/HeaderData/logic/itemGroupColumns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAA8B,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAOzD,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAWhD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKlE;AAsBD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,EACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EACtC,CAAC,EAAE,SAAS,GACX,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CA6BvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool id of an ITEM_GROUP tab in the bottom toolbar — shared by the tab registration in the
|
|
3
|
+
* header data page and the "Öffnen" buttons in the header value cards, so both always address the
|
|
4
|
+
* same tool.
|
|
5
|
+
*/
|
|
6
|
+
export declare function itemGroupToolId(groupKey: string): string;
|
|
7
|
+
//# sourceMappingURL=itemGroupToolId.d.ts.map
|
package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/itemGroupToolId.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemGroupToolId.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/AssortmentManager/HeaderData/logic/itemGroupToolId.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spreadsheet requires every loaded row to carry a value in its id column (`_id` by default,
|
|
3
|
+
* see the grid's `getRowId`); the SAP table rows have no natural id. The load adapter therefore
|
|
4
|
+
* injects synthetic positional ids — they only identify rows within one grid load, a re-load
|
|
5
|
+
* re-ids from scratch. Before rows are persisted the ids are stripped again: the SAP arrays on
|
|
6
|
+
* the product must stay id-free.
|
|
7
|
+
*/
|
|
8
|
+
/** The grid row id of the `index`-th seeded row — also the target for host writes via setNodeDataValue. */
|
|
9
|
+
export declare function syntheticRowId(index: number): string;
|
|
10
|
+
export declare function withSyntheticRowIds(rows: Record<string, unknown>[]): Record<string, unknown>[];
|
|
11
|
+
export declare function stripSyntheticRowIds(rows: Record<string, unknown>[]): Record<string, unknown>[];
|
|
12
|
+
//# sourceMappingURL=syntheticRowIds.d.ts.map
|
package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/logic/syntheticRowIds.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntheticRowIds.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/AssortmentManager/HeaderData/logic/syntheticRowIds.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE9F;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAG/F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseModulConfiguration } from '../../../Configuration';
|
|
2
|
+
export interface AssortmentManagerHeaderDataConfiguration extends BaseModulConfiguration {
|
|
3
|
+
type: 'AssortmentManagerHeaderData';
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The i18next `t` the pure logic modules receive from their calling component. `name`, `description`
|
|
7
|
+
* and `group` of [../config/fields.ts](../config/fields.ts) are translation keys, so they are passed
|
|
8
|
+
* without a default value; the UI messages of this module pass one.
|
|
9
|
+
*/
|
|
10
|
+
export interface Translate {
|
|
11
|
+
(key: string): string;
|
|
12
|
+
(key: string, options: {
|
|
13
|
+
defaultValue: string;
|
|
14
|
+
} & Record<string, unknown>): string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The table half of a save, produced by the page shell from the grids' prepared saves: the data
|
|
18
|
+
* sets are fixed and the grids keep showing their pending state until the caller settles the save.
|
|
19
|
+
* With `errors` non-empty the grids were already released — only `changes` of an error-free
|
|
20
|
+
* preparation may be persisted, and then exactly one of confirm/abort must be called.
|
|
21
|
+
*/
|
|
22
|
+
export interface PreparedTableSave {
|
|
23
|
+
/** Group key (= product path) → rows to write; only groups whose rows differ from the baseline. */
|
|
24
|
+
changes: Record<string, Record<string, unknown>[]>;
|
|
25
|
+
/** Validation errors; non-empty means the save is blocked and the grids are released again. */
|
|
26
|
+
errors: string[];
|
|
27
|
+
/** The host persisted `changes` — finalizes the grids, their state counts as saved. */
|
|
28
|
+
confirm: () => Promise<void>;
|
|
29
|
+
/** The persist failed — every grid keeps its pending changes. */
|
|
30
|
+
abort: (error?: unknown) => void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/HeaderData/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,wCAAyC,SAAQ,sBAAsB;IACtF,IAAI,EAAE,6BAA6B,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;CACpF;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,mGAAmG;IACnG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACnD,+FAA+F;IAC/F,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uFAAuF;IACvF,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,iEAAiE;IACjE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/config/fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,yBAAyB,EAAE,4BAA4B,EAy2CnE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template for a freshly created header product of a supplier / EK group combination.
|
|
3
|
+
*/
|
|
4
|
+
export interface HeaderTemplateParams {
|
|
5
|
+
/** The supplier number (`MT_LIEFERANTEN` key) the header belongs to. */
|
|
6
|
+
supplierNr: string;
|
|
7
|
+
/** The EK group (`EKGRP` key) the header belongs to. */
|
|
8
|
+
ekg: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Builds the initial `customData` of a new header product. Every call returns fresh row objects, so
|
|
12
|
+
* the result can be handed to the grids / a create request without sharing state.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createHeaderTemplate({ supplierNr, ekg }: HeaderTemplateParams): Record<string, unknown>;
|
|
15
|
+
//# sourceMappingURL=headerTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerTemplate.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/config/headerTemplate.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0CH,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiCvG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/AssortmentManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,wCAAwC,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,wCAAwC,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropEmptyRows.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/tests/dropEmptyRows.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enabledWhenRules.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/tests/enabledWhenRules.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixedValueRules.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/tests/fixedValueRules.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemGroupColumns.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/AssortmentManager/tests/itemGroupColumns.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/** Editor type of a single field, derived from the legacy `Datatype` column. */
|
|
2
|
+
export type AssortmentManagerFieldType = 'string' | 'number' | 'decimal' | 'boolean' | 'date';
|
|
3
|
+
/** Rule enabling a field only for certain values of another form field, see `AssortmentManagerField.enabledWhen`. */
|
|
4
|
+
export interface AssortmentManagerEnabledWhenRule {
|
|
5
|
+
/** Full path of the controlling form field (e.g. `customData.SAP.SAP_MAW1_ZZSHOP`). */
|
|
6
|
+
field: string;
|
|
7
|
+
/** Value(s) of the controlling field for which this field is editable. */
|
|
8
|
+
equals: string | string[];
|
|
9
|
+
}
|
|
10
|
+
/** Rule fixing a field's value depending on another form field, see `AssortmentManagerField.fixedValueBy`. */
|
|
11
|
+
export interface AssortmentManagerFixedValueRule {
|
|
12
|
+
/** Full path of the controlling form field (e.g. `customData.SAP.SAP_EINE_WAERS`). */
|
|
13
|
+
field: string;
|
|
14
|
+
/**
|
|
15
|
+
* Controlling value → fixed value. While the controlling field holds one of these values, the
|
|
16
|
+
* field is set to the mapped value and locked; any other value leaves it freely editable.
|
|
17
|
+
*/
|
|
18
|
+
values: Record<string, number | string>;
|
|
19
|
+
}
|
|
20
|
+
/** One target of a form → table value coupling, see `AssortmentManagerField.copyValueTo`. */
|
|
21
|
+
export interface AssortmentManagerCopyTarget {
|
|
22
|
+
/** Full path of the ITEM_GROUP whose rows receive the value (e.g. `customData.SAP.SAP_KONP_EK`). */
|
|
23
|
+
itemGroup: string;
|
|
24
|
+
/** Row column that identifies the receiving row(s) (e.g. `SAP_KONP_KSCHL`). */
|
|
25
|
+
matchColumn: string;
|
|
26
|
+
/** Value `matchColumn` must have for a row to be updated (e.g. `PB00`). */
|
|
27
|
+
matchValue: string;
|
|
28
|
+
/** Row column the field's value is written into (e.g. `SAP_KONP_KONWA`). */
|
|
29
|
+
column: string;
|
|
30
|
+
}
|
|
31
|
+
interface AssortmentManagerEntryBase {
|
|
32
|
+
/** Display label in German (legacy `FieldName`, with `<br>` resolved). */
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Full path of the field inside the product, e.g. `customData.SAP.SAP_MARA_MTART`.
|
|
36
|
+
* Must be unique and must resolve against `PfisterArticleCustomData` in diva-pfister-article.
|
|
37
|
+
*/
|
|
38
|
+
key: string;
|
|
39
|
+
/** Show as a column in the article table (legacy `ShowOnArticleLevel` combined with `Visible`). */
|
|
40
|
+
showOnArticle: boolean;
|
|
41
|
+
/** Show and edit on the header data page (legacy `ShowOnSupplierLevel` combined with `Visible`). */
|
|
42
|
+
showOnHeaderValues: boolean;
|
|
43
|
+
/** Help text shown as a tooltip (legacy `ToolTip`, falling back to `Description`). */
|
|
44
|
+
description?: string;
|
|
45
|
+
/** Card title on the header data page; entries sharing a group land in the same card (legacy `EditorGroup`). */
|
|
46
|
+
group: string;
|
|
47
|
+
}
|
|
48
|
+
/** A single editable field. */
|
|
49
|
+
export interface AssortmentManagerField extends AssortmentManagerEntryBase {
|
|
50
|
+
type: AssortmentManagerFieldType;
|
|
51
|
+
/** When set, the field renders as a select fed by `/v1/dropdownItems` (legacy `DropdownKey`). */
|
|
52
|
+
dropDownKey?: string;
|
|
53
|
+
/**
|
|
54
|
+
* When set, the field renders as a multi select fed by `/v1/dropdownItems`; the selected codes are
|
|
55
|
+
* stored semicolon-joined in one string value (e.g. Marketplace `A;B`).
|
|
56
|
+
*/
|
|
57
|
+
multiselectKey?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Mandatory field — empty values block saving, the label renders in bold (legacy `Required`).
|
|
60
|
+
* Can be limited to the article level via `notRequiredOnHeaderValues`.
|
|
61
|
+
*/
|
|
62
|
+
required?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Limits `required` to the article level: on the header page the field stays optional. E.g. the
|
|
65
|
+
* condition amount (SAP_KONP_KBETR) — the template rows legitimately carry no amount on the
|
|
66
|
+
* header, every article fills in its own.
|
|
67
|
+
*/
|
|
68
|
+
notRequiredOnHeaderValues?: boolean;
|
|
69
|
+
/** Maximum input length for string fields, enforced by the editors (legacy `MaxLength`). */
|
|
70
|
+
maxLength?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Renders the field as a growing textarea instead of a single-line input (legacy `Multiline` > 1,
|
|
73
|
+
* which opened a modal editor because its form inputs were single-line only).
|
|
74
|
+
*/
|
|
75
|
+
multiline?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Full path of a sibling dropdown field this field is the descriptive label of. The field then
|
|
78
|
+
* renders read-only, always showing the label text of the referenced field's current selection,
|
|
79
|
+
* and carries no form value of its own.
|
|
80
|
+
*/
|
|
81
|
+
showAsLabelFor?: string;
|
|
82
|
+
/**
|
|
83
|
+
* When this form field changes, its new value is also written into matching rows of the listed
|
|
84
|
+
* ITEM_GROUP tables. Replaces the legacy hard-coded coupling that wrote the purchasing currency
|
|
85
|
+
* into the first EK condition row (`SAP_EINE_WAERS` → `SAP_KONP_EK[0].SAP_KONP_KONWA`) — rows are
|
|
86
|
+
* matched by column value here instead of by index.
|
|
87
|
+
*/
|
|
88
|
+
copyValueTo?: AssortmentManagerCopyTarget[];
|
|
89
|
+
/**
|
|
90
|
+
* Fixes this field's value depending on another form field and locks the editor while the rule
|
|
91
|
+
* matches (legacy `ValidateExtraHeaderValues`: HausKurs 100 for USD / 112 for EUR, free otherwise).
|
|
92
|
+
*/
|
|
93
|
+
fixedValueBy?: AssortmentManagerFixedValueRule;
|
|
94
|
+
/**
|
|
95
|
+
* Enables this field only while another form field holds one of the given values; otherwise the
|
|
96
|
+
* editor is locked and the value cleared. Legacy `VisibilityRule` (e.g. Marketplace only when
|
|
97
|
+
* `SAP_MAW1_ZZSHOP == '1'`) — despite that name the legacy disabled the field, it never hid it.
|
|
98
|
+
*/
|
|
99
|
+
enabledWhen?: AssortmentManagerEnabledWhenRule;
|
|
100
|
+
/**
|
|
101
|
+
* `false` = not editable, e.g. because the value is derived from the supplier / EK group filter.
|
|
102
|
+
* Named after the spreadsheet column definition; this used to be `readOnly` (legacy `ReadOnly`),
|
|
103
|
+
* so the semantics are inverted: legacy `ReadOnly: true` is `editable: false` here.
|
|
104
|
+
*/
|
|
105
|
+
editable?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A repeating table inside the product — `key` points at an array (e.g. `customData.SAP.SAP_MARM`) and
|
|
109
|
+
* `fields` describes the columns of one row. Replaces the legacy `Datatype: 'SUBITEMS'` + `SubFields`.
|
|
110
|
+
*/
|
|
111
|
+
export interface AssortmentManagerItemGroup extends AssortmentManagerEntryBase {
|
|
112
|
+
type: 'ITEM_GROUP';
|
|
113
|
+
fields: AssortmentManagerField[];
|
|
114
|
+
/**
|
|
115
|
+
* `false` = the table does not offer adding rows (context menu insert/duplicate and the row
|
|
116
|
+
* growth on multi-row paste). Named after the spreadsheet configuration.
|
|
117
|
+
*/
|
|
118
|
+
canCreate?: boolean;
|
|
119
|
+
canDelete?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Minimum number of rows (legacy `SubItemMinQuantity`), enforced by the grid: the delete entries
|
|
122
|
+
* lock at the bound (spreadsheet `minRows`), so the remaining rows are edited in place.
|
|
123
|
+
*/
|
|
124
|
+
minItems?: number;
|
|
125
|
+
/**
|
|
126
|
+
* Maximum number of rows (legacy `SubItemMaxQuantity`), enforced by the grid: row creation stops
|
|
127
|
+
* once reached (spreadsheet `maxRows`).
|
|
128
|
+
*/
|
|
129
|
+
maxItems?: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* One entry of the assortment manager field catalogue, describing both how it is rendered on the
|
|
133
|
+
* header data page and whether it belongs in the article table.
|
|
134
|
+
*
|
|
135
|
+
* Replaces the legacy runtime field metadata fetched from `function=getjsonflatarticlefields`.
|
|
136
|
+
*/
|
|
137
|
+
export type AssortmentManagerFieldConfig = AssortmentManagerField | AssortmentManagerItemGroup;
|
|
138
|
+
export {};
|
|
139
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/AssortmentManager/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9F,qHAAqH;AACrH,MAAM,WAAW,gCAAgC;IAC/C,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC3B;AAED,8GAA8G;AAC9G,MAAM,WAAW,+BAA+B;IAC9C,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACzC;AAED,6FAA6F;AAC7F,MAAM,WAAW,2BAA2B;IAC1C,oGAAoG;IACpG,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,0BAA0B;IAClC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,mGAAmG;IACnG,aAAa,EAAE,OAAO,CAAC;IACvB,oGAAoG;IACpG,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gHAAgH;IAChH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+BAA+B;AAC/B,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;IACxE,IAAI,EAAE,0BAA0B,CAAC;IACjC,iGAAiG;IACjG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,2BAA2B,EAAE,CAAC;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,+BAA+B,CAAC;IAC/C;;;;OAIG;IACH,WAAW,CAAC,EAAE,gCAAgC,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA2B,SAAQ,0BAA0B;IAC5E,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.10.0-beta.
|
|
3
|
+
"version": "26.10.0-beta.34",
|
|
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": "6.1.0",
|
|
17
17
|
"@babel/runtime": "7.24.7",
|
|
18
|
-
"@crystaldesign/content-box": "26.10.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "26.10.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "26.10.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.10.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "26.10.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.10.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.10.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "26.10.0-beta.34",
|
|
19
|
+
"@crystaldesign/content-item": "26.10.0-beta.34",
|
|
20
|
+
"@crystaldesign/diva-core": "26.10.0-beta.34",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.10.0-beta.34",
|
|
22
|
+
"@crystaldesign/media-upload": "26.10.0-beta.34",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.10.0-beta.34",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.10.0-beta.34",
|
|
25
25
|
"@dnd-kit/core": "^6.1.0",
|
|
26
26
|
"@dnd-kit/sortable": "^8.0.0",
|
|
27
27
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"module": "build/esm/index.js",
|
|
58
58
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "8486975021f4ffa17a278b5b96d5764f193e8ef1"
|
|
60
60
|
}
|