@configura/web-api 1.2.1 → 1.3.0-alpha.3
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/LICENSE +201 -201
- package/README.md +1 -1
- package/dist/CatalogueAPI.d.ts +448 -448
- package/dist/CatalogueAPI.js +206 -206
- package/dist/CfgProduct.d.ts +116 -116
- package/dist/CfgProduct.js +588 -588
- package/dist/index.d.ts +15 -15
- package/dist/index.js +15 -15
- package/dist/material/CfgMaterialMapping.d.ts +7 -7
- package/dist/material/CfgMaterialMapping.js +176 -176
- package/dist/material/CfgMtrlApplication.d.ts +18 -18
- package/dist/material/CfgMtrlApplication.js +43 -43
- package/dist/material/CfgMtrlApplicationSource.d.ts +7 -7
- package/dist/material/CfgMtrlApplicationSource.js +8 -8
- package/dist/material/CfgMtrlSource.d.ts +19 -19
- package/dist/material/CfgMtrlSource.js +40 -40
- package/dist/material/CfgMtrlSourceWithMetaData.d.ts +7 -7
- package/dist/material/CfgMtrlSourceWithMetaData.js +1 -1
- package/dist/productConfiguration/CfgFeature.d.ts +134 -134
- package/dist/productConfiguration/CfgFeature.js +483 -483
- package/dist/productConfiguration/CfgOption.d.ts +112 -112
- package/dist/productConfiguration/CfgOption.js +293 -293
- package/dist/productConfiguration/CfgProductConfiguration.d.ts +50 -50
- package/dist/productConfiguration/CfgProductConfiguration.js +198 -198
- package/dist/productConfiguration/filters.d.ts +7 -7
- package/dist/productConfiguration/filters.js +29 -29
- package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
- package/dist/productConfiguration/productParamsGenerator.js +51 -51
- package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +9 -9
- package/dist/productConfiguration/utilitiesProductConfiguration.js +61 -61
- package/dist/productLoader.d.ts +11 -11
- package/dist/productLoader.js +41 -41
- package/dist/tests/testData/collectorForTest.d.ts +73 -73
- package/dist/tests/testData/collectorForTest.js +195 -195
- package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
- package/dist/tests/testData/dummyProductForTest.js +35 -35
- package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +32 -32
- package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +368 -368
- package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
- package/dist/tests/testData/testDataCachedGetProduct.js +199 -199
- package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
- package/dist/tests/testData/testDataCachedPostValidate.js +189 -189
- package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
- package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1117 -1117
- package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +28 -28
- package/dist/tests/testData/testDataProductAggregatedPrice.js +205 -205
- package/dist/tests/testData/testDataUpcharge.d.ts +29 -29
- package/dist/tests/testData/testDataUpcharge.js +159 -159
- package/dist/utilitiesCatalogueData.d.ts +20 -18
- package/dist/utilitiesCatalogueData.js +64 -56
- package/dist/utilitiesCataloguePermission.d.ts +39 -39
- package/dist/utilitiesCataloguePermission.js +84 -84
- package/package.json +3 -3
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export class CfgMtrlSource {
|
|
2
|
-
}
|
|
3
|
-
export class CfgMtrlSourceUrl extends CfgMtrlSource {
|
|
4
|
-
constructor(_url, _urlIsFromProperty) {
|
|
5
|
-
super();
|
|
6
|
-
this._url = _url;
|
|
7
|
-
this._urlIsFromProperty = _urlIsFromProperty;
|
|
8
|
-
}
|
|
9
|
-
get url() {
|
|
10
|
-
return this._url;
|
|
11
|
-
}
|
|
12
|
-
get urlIsFromProperty() {
|
|
13
|
-
return this._urlIsFromProperty;
|
|
14
|
-
}
|
|
15
|
-
isSame(other) {
|
|
16
|
-
if (!(other instanceof CfgMtrlSourceUrl)) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
return this.url === other.url;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export class CfgMtrlSourceBuffer extends CfgMtrlSource {
|
|
23
|
-
constructor(_fileName, _buffer) {
|
|
24
|
-
super();
|
|
25
|
-
this._fileName = _fileName;
|
|
26
|
-
this._buffer = _buffer;
|
|
27
|
-
}
|
|
28
|
-
get fileName() {
|
|
29
|
-
return this._fileName;
|
|
30
|
-
}
|
|
31
|
-
get buffer() {
|
|
32
|
-
return this._buffer;
|
|
33
|
-
}
|
|
34
|
-
isSame(other) {
|
|
35
|
-
if (!(other instanceof CfgMtrlSourceBuffer)) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
return this.fileName === other.fileName;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
export class CfgMtrlSource {
|
|
2
|
+
}
|
|
3
|
+
export class CfgMtrlSourceUrl extends CfgMtrlSource {
|
|
4
|
+
constructor(_url, _urlIsFromProperty) {
|
|
5
|
+
super();
|
|
6
|
+
this._url = _url;
|
|
7
|
+
this._urlIsFromProperty = _urlIsFromProperty;
|
|
8
|
+
}
|
|
9
|
+
get url() {
|
|
10
|
+
return this._url;
|
|
11
|
+
}
|
|
12
|
+
get urlIsFromProperty() {
|
|
13
|
+
return this._urlIsFromProperty;
|
|
14
|
+
}
|
|
15
|
+
isSame(other) {
|
|
16
|
+
if (!(other instanceof CfgMtrlSourceUrl)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return this.url === other.url;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class CfgMtrlSourceBuffer extends CfgMtrlSource {
|
|
23
|
+
constructor(_fileName, _buffer) {
|
|
24
|
+
super();
|
|
25
|
+
this._fileName = _fileName;
|
|
26
|
+
this._buffer = _buffer;
|
|
27
|
+
}
|
|
28
|
+
get fileName() {
|
|
29
|
+
return this._fileName;
|
|
30
|
+
}
|
|
31
|
+
get buffer() {
|
|
32
|
+
return this._buffer;
|
|
33
|
+
}
|
|
34
|
+
isSame(other) {
|
|
35
|
+
if (!(other instanceof CfgMtrlSourceBuffer)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return this.fileName === other.fileName;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CfgMtrlApplication } from "./CfgMtrlApplication.js";
|
|
2
|
-
import { CfgMtrlSource } from "./CfgMtrlSource.js";
|
|
3
|
-
export interface CfgMtrlSourceWithMetaData {
|
|
4
|
-
mtrl: CfgMtrlSource;
|
|
5
|
-
source: CfgMtrlApplication;
|
|
6
|
-
overriddenByOption: boolean;
|
|
7
|
-
}
|
|
1
|
+
import { CfgMtrlApplication } from "./CfgMtrlApplication.js";
|
|
2
|
+
import { CfgMtrlSource } from "./CfgMtrlSource.js";
|
|
3
|
+
export interface CfgMtrlSourceWithMetaData {
|
|
4
|
+
mtrl: CfgMtrlSource;
|
|
5
|
+
source: CfgMtrlApplication;
|
|
6
|
+
overriddenByOption: boolean;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=CfgMtrlSourceWithMetaData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import { Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
-
import { Feature, SelectedOption } from "../CatalogueAPI.js";
|
|
3
|
-
import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
|
|
4
|
-
import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
|
|
5
|
-
import { CfgOption, ProductConfigurationBubbleMode, _CfgOptionInternal } from "./CfgOption.js";
|
|
6
|
-
import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
|
|
7
|
-
export declare enum SelectionType {
|
|
8
|
-
/**
|
|
9
|
-
* All options are permanently selected. In our ui-component for this we skip over this level,
|
|
10
|
-
* and immediately show the children, but you could do this differently, like for instance
|
|
11
|
-
* showing the group heading.
|
|
12
|
-
*/
|
|
13
|
-
Group = 0,
|
|
14
|
-
/**
|
|
15
|
-
* One and only one can be selected at a time. This normally corresponds to either a dropdown
|
|
16
|
-
* menu or radio buttons.
|
|
17
|
-
*/
|
|
18
|
-
SelectOne = 1,
|
|
19
|
-
/** Zero to all can be selected at a time. This normally corresponds to checkboxes. */
|
|
20
|
-
SelectMany = 2
|
|
21
|
-
}
|
|
22
|
-
export declare type FeatureChangeNotification = {
|
|
23
|
-
freshRef: CfgFeature;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* This class is meant to only be used through CfgFeature. It should
|
|
27
|
-
* never be instantiated on its own. Normally the internal state of this class
|
|
28
|
-
* should never be directly modified. CfgFeature is the class that
|
|
29
|
-
* should be used and interacted with.
|
|
30
|
-
*/
|
|
31
|
-
export declare class _CfgFeatureInternal {
|
|
32
|
-
readonly rawFeature: Feature;
|
|
33
|
-
private readonly allRawFeatures;
|
|
34
|
-
readonly key: string;
|
|
35
|
-
readonly parent: _CfgProductConfigurationInternal | _CfgOptionInternal;
|
|
36
|
-
readonly parentProduct: _CfgProductInternal;
|
|
37
|
-
readonly rootProduct: _CfgProductInternal;
|
|
38
|
-
constructor(rawFeature: Feature, allRawFeatures: Feature[], key: string, // Unique amongst siblings
|
|
39
|
-
parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
|
|
40
|
-
readonly selectionType: SelectionType;
|
|
41
|
-
private _options;
|
|
42
|
-
private readonly _selectedOptions;
|
|
43
|
-
private _mtrlApplications;
|
|
44
|
-
readonly hasUpcharge: boolean;
|
|
45
|
-
readonly changeObservable: Observable<FeatureChangeNotification>;
|
|
46
|
-
get code(): string;
|
|
47
|
-
get groupCode(): string | undefined;
|
|
48
|
-
get description(): string;
|
|
49
|
-
get mtrlApplications(): CfgMtrlApplication[];
|
|
50
|
-
get selectedOptions(): CfgOption[];
|
|
51
|
-
get ancestorsSelected(): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If one option is selected or deselected this will potentially
|
|
54
|
-
* affect all other Options on this Feature
|
|
55
|
-
*/
|
|
56
|
-
private get isAllOptionsAffectedByAnySelection();
|
|
57
|
-
get preview(): string | undefined;
|
|
58
|
-
get visibleIfAdditionalProduct(): boolean;
|
|
59
|
-
get visibleIfMainProduct(): boolean;
|
|
60
|
-
get visible(): boolean;
|
|
61
|
-
get options(): CfgOption[];
|
|
62
|
-
private _notifyAllOfChange;
|
|
63
|
-
/**
|
|
64
|
-
* Called by child to tell its parent that it has changed.
|
|
65
|
-
* @throws Will throw if options have not yet been generated. This should be impossible
|
|
66
|
-
* as nonexisting children can not call their parent.
|
|
67
|
-
*/
|
|
68
|
-
_childHasChanged: (childOption: _CfgOptionInternal, bubbleMode: ProductConfigurationBubbleMode) => Promise<void>;
|
|
69
|
-
getApiSelection: () => {
|
|
70
|
-
[index: string]: SelectedOption;
|
|
71
|
-
} | undefined;
|
|
72
|
-
setApiSelection: (apiOptionSelectionMap: {
|
|
73
|
-
[index: string]: SelectedOption;
|
|
74
|
-
} | undefined) => Promise<boolean>;
|
|
75
|
-
structureCompare: (other: _CfgFeatureInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
76
|
-
tryMatchSelection: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => Promise<boolean>;
|
|
77
|
-
/**
|
|
78
|
-
* Normally this is used through methods on CfgFeature and CfgOption. Use this
|
|
79
|
-
* internal version if you need to control the bubbleMode.
|
|
80
|
-
* Using a validate bubbleMode will cause validation calls to the server.
|
|
81
|
-
*/
|
|
82
|
-
selectOption: (optionInternal: _CfgOptionInternal, on: boolean, bubbleMode: ProductConfigurationBubbleMode) => Promise<boolean>;
|
|
83
|
-
isSelected: (option: _CfgOptionInternal) => boolean;
|
|
84
|
-
keyMatch: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => boolean;
|
|
85
|
-
/** Only in selected options */
|
|
86
|
-
_getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
87
|
-
/**
|
|
88
|
-
* Make fresh references to all options on this feature.
|
|
89
|
-
* Also includes currently selected options.
|
|
90
|
-
* @throws Will throw if options have not yet been generated.
|
|
91
|
-
*/
|
|
92
|
-
private _freshRefAllOptions;
|
|
93
|
-
_freshRefDescendants(): void;
|
|
94
|
-
}
|
|
95
|
-
export declare class CfgFeature {
|
|
96
|
-
readonly _internal: _CfgFeatureInternal;
|
|
97
|
-
static make: (rawFeature: Feature, allRawFeatures: Feature[], key: string, parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal) => CfgFeature;
|
|
98
|
-
/**
|
|
99
|
-
* Makes an object wrapping the passed object. This is not a clone method,
|
|
100
|
-
* it is a method to make a new outer reference. Like a shallow copy.
|
|
101
|
-
* We use this to help frameworks that are built around using equals to detect change.
|
|
102
|
-
*/
|
|
103
|
-
static _makeNewRefFrom: (internal: _CfgFeatureInternal) => CfgFeature;
|
|
104
|
-
/**
|
|
105
|
-
* Private constructor and make-method because make new ref requires the constructor to
|
|
106
|
-
* take an internal and we don't want those who instantiate CfgFeature to have to be aware
|
|
107
|
-
* of the internal.
|
|
108
|
-
*/
|
|
109
|
-
private constructor();
|
|
110
|
-
isBackedBySame: (other: CfgFeature) => boolean;
|
|
111
|
-
get parentProduct(): CfgProduct;
|
|
112
|
-
get rootProduct(): CfgProduct;
|
|
113
|
-
get selectionType(): SelectionType;
|
|
114
|
-
get key(): string;
|
|
115
|
-
get code(): string;
|
|
116
|
-
get groupCode(): string | undefined;
|
|
117
|
-
get description(): string;
|
|
118
|
-
get hasUpcharge(): boolean | undefined;
|
|
119
|
-
get selectedOptions(): CfgOption[];
|
|
120
|
-
/** Are all ancestors up to the CfgProductConfiguration selected? */
|
|
121
|
-
get ancestorsSelected(): boolean;
|
|
122
|
-
get preview(): string | undefined;
|
|
123
|
-
get options(): CfgOption[];
|
|
124
|
-
get visible(): boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Selects the passed Option.
|
|
127
|
-
* Only Options belonging to Features that are "select many" can be deselected.
|
|
128
|
-
* Calling this will cause a validation call to the server.
|
|
129
|
-
*/
|
|
130
|
-
selectOption: (option: CfgOption, on: boolean) => Promise<boolean>;
|
|
131
|
-
isSelected: (option: CfgOption) => boolean;
|
|
132
|
-
listenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
|
|
133
|
-
stopListenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
|
|
134
|
-
}
|
|
1
|
+
import { Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
+
import { Feature, SelectedOption } from "../CatalogueAPI.js";
|
|
3
|
+
import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
|
|
4
|
+
import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
|
|
5
|
+
import { CfgOption, ProductConfigurationBubbleMode, _CfgOptionInternal } from "./CfgOption.js";
|
|
6
|
+
import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
|
|
7
|
+
export declare enum SelectionType {
|
|
8
|
+
/**
|
|
9
|
+
* All options are permanently selected. In our ui-component for this we skip over this level,
|
|
10
|
+
* and immediately show the children, but you could do this differently, like for instance
|
|
11
|
+
* showing the group heading.
|
|
12
|
+
*/
|
|
13
|
+
Group = 0,
|
|
14
|
+
/**
|
|
15
|
+
* One and only one can be selected at a time. This normally corresponds to either a dropdown
|
|
16
|
+
* menu or radio buttons.
|
|
17
|
+
*/
|
|
18
|
+
SelectOne = 1,
|
|
19
|
+
/** Zero to all can be selected at a time. This normally corresponds to checkboxes. */
|
|
20
|
+
SelectMany = 2
|
|
21
|
+
}
|
|
22
|
+
export declare type FeatureChangeNotification = {
|
|
23
|
+
freshRef: CfgFeature;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* This class is meant to only be used through CfgFeature. It should
|
|
27
|
+
* never be instantiated on its own. Normally the internal state of this class
|
|
28
|
+
* should never be directly modified. CfgFeature is the class that
|
|
29
|
+
* should be used and interacted with.
|
|
30
|
+
*/
|
|
31
|
+
export declare class _CfgFeatureInternal {
|
|
32
|
+
readonly rawFeature: Feature;
|
|
33
|
+
private readonly allRawFeatures;
|
|
34
|
+
readonly key: string;
|
|
35
|
+
readonly parent: _CfgProductConfigurationInternal | _CfgOptionInternal;
|
|
36
|
+
readonly parentProduct: _CfgProductInternal;
|
|
37
|
+
readonly rootProduct: _CfgProductInternal;
|
|
38
|
+
constructor(rawFeature: Feature, allRawFeatures: Feature[], key: string, // Unique amongst siblings
|
|
39
|
+
parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
|
|
40
|
+
readonly selectionType: SelectionType;
|
|
41
|
+
private _options;
|
|
42
|
+
private readonly _selectedOptions;
|
|
43
|
+
private _mtrlApplications;
|
|
44
|
+
readonly hasUpcharge: boolean;
|
|
45
|
+
readonly changeObservable: Observable<FeatureChangeNotification>;
|
|
46
|
+
get code(): string;
|
|
47
|
+
get groupCode(): string | undefined;
|
|
48
|
+
get description(): string;
|
|
49
|
+
get mtrlApplications(): CfgMtrlApplication[];
|
|
50
|
+
get selectedOptions(): CfgOption[];
|
|
51
|
+
get ancestorsSelected(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* If one option is selected or deselected this will potentially
|
|
54
|
+
* affect all other Options on this Feature
|
|
55
|
+
*/
|
|
56
|
+
private get isAllOptionsAffectedByAnySelection();
|
|
57
|
+
get preview(): string | undefined;
|
|
58
|
+
get visibleIfAdditionalProduct(): boolean;
|
|
59
|
+
get visibleIfMainProduct(): boolean;
|
|
60
|
+
get visible(): boolean;
|
|
61
|
+
get options(): CfgOption[];
|
|
62
|
+
private _notifyAllOfChange;
|
|
63
|
+
/**
|
|
64
|
+
* Called by child to tell its parent that it has changed.
|
|
65
|
+
* @throws Will throw if options have not yet been generated. This should be impossible
|
|
66
|
+
* as nonexisting children can not call their parent.
|
|
67
|
+
*/
|
|
68
|
+
_childHasChanged: (childOption: _CfgOptionInternal, bubbleMode: ProductConfigurationBubbleMode) => Promise<void>;
|
|
69
|
+
getApiSelection: () => {
|
|
70
|
+
[index: string]: SelectedOption;
|
|
71
|
+
} | undefined;
|
|
72
|
+
setApiSelection: (apiOptionSelectionMap: {
|
|
73
|
+
[index: string]: SelectedOption;
|
|
74
|
+
} | undefined) => Promise<boolean>;
|
|
75
|
+
structureCompare: (other: _CfgFeatureInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
76
|
+
tryMatchSelection: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Normally this is used through methods on CfgFeature and CfgOption. Use this
|
|
79
|
+
* internal version if you need to control the bubbleMode.
|
|
80
|
+
* Using a validate bubbleMode will cause validation calls to the server.
|
|
81
|
+
*/
|
|
82
|
+
selectOption: (optionInternal: _CfgOptionInternal, on: boolean, bubbleMode: ProductConfigurationBubbleMode) => Promise<boolean>;
|
|
83
|
+
isSelected: (option: _CfgOptionInternal) => boolean;
|
|
84
|
+
keyMatch: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => boolean;
|
|
85
|
+
/** Only in selected options */
|
|
86
|
+
_getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
87
|
+
/**
|
|
88
|
+
* Make fresh references to all options on this feature.
|
|
89
|
+
* Also includes currently selected options.
|
|
90
|
+
* @throws Will throw if options have not yet been generated.
|
|
91
|
+
*/
|
|
92
|
+
private _freshRefAllOptions;
|
|
93
|
+
_freshRefDescendants(): void;
|
|
94
|
+
}
|
|
95
|
+
export declare class CfgFeature {
|
|
96
|
+
readonly _internal: _CfgFeatureInternal;
|
|
97
|
+
static make: (rawFeature: Feature, allRawFeatures: Feature[], key: string, parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal) => CfgFeature;
|
|
98
|
+
/**
|
|
99
|
+
* Makes an object wrapping the passed object. This is not a clone method,
|
|
100
|
+
* it is a method to make a new outer reference. Like a shallow copy.
|
|
101
|
+
* We use this to help frameworks that are built around using equals to detect change.
|
|
102
|
+
*/
|
|
103
|
+
static _makeNewRefFrom: (internal: _CfgFeatureInternal) => CfgFeature;
|
|
104
|
+
/**
|
|
105
|
+
* Private constructor and make-method because make new ref requires the constructor to
|
|
106
|
+
* take an internal and we don't want those who instantiate CfgFeature to have to be aware
|
|
107
|
+
* of the internal.
|
|
108
|
+
*/
|
|
109
|
+
private constructor();
|
|
110
|
+
isBackedBySame: (other: CfgFeature) => boolean;
|
|
111
|
+
get parentProduct(): CfgProduct;
|
|
112
|
+
get rootProduct(): CfgProduct;
|
|
113
|
+
get selectionType(): SelectionType;
|
|
114
|
+
get key(): string;
|
|
115
|
+
get code(): string;
|
|
116
|
+
get groupCode(): string | undefined;
|
|
117
|
+
get description(): string;
|
|
118
|
+
get hasUpcharge(): boolean | undefined;
|
|
119
|
+
get selectedOptions(): CfgOption[];
|
|
120
|
+
/** Are all ancestors up to the CfgProductConfiguration selected? */
|
|
121
|
+
get ancestorsSelected(): boolean;
|
|
122
|
+
get preview(): string | undefined;
|
|
123
|
+
get options(): CfgOption[];
|
|
124
|
+
get visible(): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Selects the passed Option.
|
|
127
|
+
* Only Options belonging to Features that are "select many" can be deselected.
|
|
128
|
+
* Calling this will cause a validation call to the server.
|
|
129
|
+
*/
|
|
130
|
+
selectOption: (option: CfgOption, on: boolean) => Promise<boolean>;
|
|
131
|
+
isSelected: (option: CfgOption) => boolean;
|
|
132
|
+
listenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
|
|
133
|
+
stopListenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
|
|
134
|
+
}
|
|
135
135
|
//# sourceMappingURL=CfgFeature.d.ts.map
|