@configura/web-api 2.2.0-alpha.1 → 2.2.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/.eslintrc.json +5 -5
- package/LICENSE +201 -201
- package/README.md +1 -1
- package/dist/CatalogueAPI.d.ts +633 -633
- package/dist/CatalogueAPI.js +312 -312
- package/dist/CfgMeasure.d.ts +32 -32
- package/dist/CfgMeasure.js +30 -30
- package/dist/CfgProduct.d.ts +359 -344
- package/dist/CfgProduct.js +1005 -992
- package/dist/CfgReferencePathHelper.d.ts +26 -26
- package/dist/CfgReferencePathHelper.js +26 -26
- package/dist/index.d.ts +24 -24
- package/dist/index.js +24 -24
- package/dist/io/CfgHistoryManager.d.ts +83 -83
- package/dist/io/CfgHistoryManager.js +144 -144
- package/dist/io/CfgHistoryToProdConfConnector.d.ts +21 -21
- package/dist/io/CfgHistoryToProdConfConnector.js +50 -50
- package/dist/io/CfgIOManager.d.ts +53 -53
- package/dist/io/CfgIOManager.js +134 -134
- package/dist/io/CfgIOProdConfConnector.d.ts +54 -54
- package/dist/io/CfgIOProdConfConnector.js +139 -139
- package/dist/io/CfgIOWarningSupplier.d.ts +3 -3
- package/dist/io/CfgIOWarningSupplier.js +1 -1
- package/dist/io/CfgObservableStateManager.d.ts +25 -25
- package/dist/io/CfgObservableStateManager.js +69 -69
- package/dist/io/CfgObservableStateToProdConfConnector.d.ts +15 -15
- package/dist/io/CfgObservableStateToProdConfConnector.js +17 -17
- package/dist/io/CfgWindowEventManager.d.ts +21 -21
- package/dist/io/CfgWindowEventManager.js +38 -38
- package/dist/io/CfgWindowMessageManager.d.ts +40 -40
- package/dist/io/CfgWindowMessageManager.js +91 -91
- package/dist/io/CfgWindowMessageToProdConfConnector.d.ts +17 -17
- package/dist/io/CfgWindowMessageToProdConfConnector.js +19 -19
- package/dist/io/index.d.ts +8 -8
- package/dist/io/index.js +8 -8
- package/dist/material/CfgMaterialMapping.d.ts +7 -7
- package/dist/material/CfgMaterialMapping.js +181 -181
- 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 +199 -199
- package/dist/productConfiguration/CfgFeature.js +691 -691
- package/dist/productConfiguration/CfgOption.d.ts +160 -160
- package/dist/productConfiguration/CfgOption.js +464 -464
- package/dist/productConfiguration/CfgProductConfiguration.d.ts +136 -129
- package/dist/productConfiguration/CfgProductConfiguration.js +355 -346
- package/dist/productConfiguration/filters.d.ts +17 -17
- package/dist/productConfiguration/filters.js +141 -141
- package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
- package/dist/productConfiguration/productParamsGenerator.js +65 -65
- package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -17
- package/dist/productConfiguration/utilitiesProductConfiguration.js +89 -87
- package/dist/productLoader.d.ts +33 -33
- package/dist/productLoader.js +49 -49
- package/dist/syncGroups/SyncGroupsApplyMode.d.ts +20 -20
- package/dist/syncGroups/SyncGroupsApplyMode.js +21 -21
- package/dist/syncGroups/SyncGroupsHandler.d.ts +47 -47
- package/dist/syncGroups/SyncGroupsHandler.js +370 -370
- package/dist/syncGroups/SyncGroupsPathHelper.d.ts +26 -26
- package/dist/syncGroups/SyncGroupsPathHelper.js +90 -90
- package/dist/syncGroups/SyncGroupsState.d.ts +39 -39
- package/dist/syncGroups/SyncGroupsState.js +167 -167
- package/dist/syncGroups/SyncGroupsTransaction.d.ts +154 -154
- package/dist/syncGroups/SyncGroupsTransaction.js +589 -589
- package/dist/tasks/TaskHandler.d.ts +77 -77
- package/dist/tasks/TaskHandler.js +276 -276
- package/dist/tasks/formats.d.ts +4 -4
- package/dist/tasks/formats.js +7 -7
- package/dist/tests/testData/collectorForTest.d.ts +73 -73
- package/dist/tests/testData/collectorForTest.js +194 -194
- package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
- package/dist/tests/testData/dummyProductForTest.js +32 -32
- package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +11 -11
- package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +282 -282
- package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
- package/dist/tests/testData/testDataCachedGetProduct.js +187 -187
- package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
- package/dist/tests/testData/testDataCachedPostValidate.js +185 -185
- package/dist/tests/testData/testDataConstraints.d.ts +3 -3
- package/dist/tests/testData/testDataConstraints.js +174 -174
- package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
- package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1099 -1099
- package/dist/tests/testData/testDataOptions.d.ts +12 -12
- package/dist/tests/testData/testDataOptions.js +60 -60
- package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +6 -6
- package/dist/tests/testData/testDataProductAggregatedPrice.js +189 -189
- package/dist/tests/testData/testDataUpcharge.d.ts +8 -8
- package/dist/tests/testData/testDataUpcharge.js +121 -121
- package/dist/utilitiesCatalogueData.d.ts +47 -47
- package/dist/utilitiesCatalogueData.js +180 -180
- package/dist/utilitiesCataloguePermission.d.ts +38 -38
- package/dist/utilitiesCataloguePermission.js +79 -79
- package/dist/utilitiesConfiguration.d.ts +28 -28
- package/dist/utilitiesConfiguration.js +200 -200
- package/dist/utilitiesNumericValues.d.ts +24 -24
- package/dist/utilitiesNumericValues.js +114 -114
- package/package.json +3 -3
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
import { LengthUnit, Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
-
import { DtoFeature, DtoMiscFile, DtoNote, DtoOption, DtoOptionConf, DtoPartsConstrainedOption, DtoSelectedOption } from "../CatalogueAPI.js";
|
|
3
|
-
import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
|
|
4
|
-
import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
|
|
5
|
-
import { NumericValuesSelection } from "../utilitiesNumericValues.js";
|
|
6
|
-
import { CfgFeature, _CfgFeatureInternal } from "./CfgFeature.js";
|
|
7
|
-
import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
|
|
8
|
-
export declare type OptionChangeNotification = {
|
|
9
|
-
freshRef: CfgOption;
|
|
10
|
-
committed: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare enum ProductConfigurationBubbleMode {
|
|
13
|
-
/**
|
|
14
|
-
* If this is select it will turns on all ancestors all the way up.
|
|
15
|
-
*/
|
|
16
|
-
BubbleSelected = "BubbleSelected",
|
|
17
|
-
/**
|
|
18
|
-
* Bubble to the closest CfgProduct, let it revalidate, then that will continue the bubble
|
|
19
|
-
* after validate.
|
|
20
|
-
*/
|
|
21
|
-
Validate = "Validate",
|
|
22
|
-
/**
|
|
23
|
-
* Bubble to the closest CfgProduct, let it revalidate, then that will continue the bubble
|
|
24
|
-
* after validate. If this is select it will turn on all ancestors all the way up.
|
|
25
|
-
* So with this mode it is possible to select an option where its parents are not selected.
|
|
26
|
-
*/
|
|
27
|
-
ValidateAndBubbleSelected = "ValidateAndBubbleSelected",
|
|
28
|
-
/**
|
|
29
|
-
* Like ValidateAndBubbleSelected, but SyncGroups are applied after ValidateAndBubbleSelected
|
|
30
|
-
* has been done
|
|
31
|
-
*/
|
|
32
|
-
ValidateAndBubbleSelectedAndApplySyncGroups = "ValidateAndBubbleSelectedAndApplySyncGroups",
|
|
33
|
-
/**
|
|
34
|
-
* Stop bubbling
|
|
35
|
-
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
36
|
-
*/
|
|
37
|
-
Stop = "Stop",
|
|
38
|
-
/**
|
|
39
|
-
* Bubble to the next level up the tree. In features-options the next level is considered
|
|
40
|
-
* the next feature, so option levels are skipped over. The node we call from notifies its
|
|
41
|
-
* parent, and the parent switches out the reference to the node. Then bubbling stops.
|
|
42
|
-
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
43
|
-
*/
|
|
44
|
-
OneLevel = "OneLevel",
|
|
45
|
-
/**
|
|
46
|
-
* Bubble to the closest CfgProduct without doing any validation
|
|
47
|
-
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
48
|
-
*/
|
|
49
|
-
ToParentProduct = "ToParentProduct",
|
|
50
|
-
/**
|
|
51
|
-
* Bubble to the root CfgProduct
|
|
52
|
-
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
53
|
-
*/
|
|
54
|
-
ToRoot = "ToRoot"
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* This class is only meant to be used through CfgOption. It should never be instantiated on its
|
|
58
|
-
* own. Normally the internal state of this class should never be directly modified. CfgOption is
|
|
59
|
-
* the class that should be used and interacted with.
|
|
60
|
-
*/
|
|
61
|
-
export declare class _CfgOptionInternal {
|
|
62
|
-
readonly rawOption: DtoOption;
|
|
63
|
-
private readonly rawFeatures;
|
|
64
|
-
readonly parent: _CfgFeatureInternal;
|
|
65
|
-
readonly parentConfiguration: _CfgProductConfigurationInternal;
|
|
66
|
-
readonly parentProduct: _CfgProductInternal;
|
|
67
|
-
readonly rootProduct: _CfgProductInternal;
|
|
68
|
-
constructor(rawOption: DtoOption, rawFeatures: DtoFeature[], siblingHasDuplicateDescription: boolean, parent: _CfgFeatureInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
|
|
69
|
-
private _features;
|
|
70
|
-
private _mtrlApplications;
|
|
71
|
-
readonly key: string;
|
|
72
|
-
private _upcharge;
|
|
73
|
-
private _numericValue;
|
|
74
|
-
readonly allowedNumericValues: NumericValuesSelection | undefined;
|
|
75
|
-
isAllowedNumericValue(val: number): boolean;
|
|
76
|
-
readonly changeObservable: Observable<OptionChangeNotification>;
|
|
77
|
-
get code(): string;
|
|
78
|
-
get notes(): DtoNote[];
|
|
79
|
-
get miscFiles(): DtoMiscFile[];
|
|
80
|
-
get isUseNumericValue(): boolean;
|
|
81
|
-
get numericValue(): number | undefined;
|
|
82
|
-
setNumericValue(val: number, doSelectOption: boolean): Promise<boolean>;
|
|
83
|
-
get unit(): LengthUnit;
|
|
84
|
-
get description(): string;
|
|
85
|
-
get selected(): boolean;
|
|
86
|
-
get disabled(): boolean;
|
|
87
|
-
get selectedChangeInProgress(): boolean;
|
|
88
|
-
get ancestorsSelected(): boolean;
|
|
89
|
-
get mtrlApplications(): CfgMtrlApplication[];
|
|
90
|
-
get thumbnail(): string | undefined;
|
|
91
|
-
private _calculateUpcharge;
|
|
92
|
-
get upcharge(): number;
|
|
93
|
-
get priceChangeAtSelectChange(): number;
|
|
94
|
-
get features(): CfgFeature[];
|
|
95
|
-
/** Called by child to tell its parent that it has changed. */
|
|
96
|
-
_childHasChanged: (freshRef: CfgFeature, bubbleMode: ProductConfigurationBubbleMode, committed: boolean) => Promise<void>;
|
|
97
|
-
getDtoConf: (includeExtendedData: boolean) => DtoOptionConf;
|
|
98
|
-
setApiSelection: (apiOptionSelection: DtoSelectedOption | undefined, apiOptionConstraint: DtoPartsConstrainedOption | undefined) => Promise<boolean>;
|
|
99
|
-
getApiConstrained: (constrOptions: CfgOption[]) => DtoPartsConstrainedOption;
|
|
100
|
-
structureCompare: (other: _CfgOptionInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
101
|
-
tryMatchSelection: (other: CfgOption, descriptionMatch?: boolean) => Promise<boolean>;
|
|
102
|
-
keyMatch: (other: _CfgOptionInternal, descriptionMatch?: boolean) => boolean;
|
|
103
|
-
_getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
104
|
-
}
|
|
105
|
-
export declare class CfgOption {
|
|
106
|
-
readonly _internal: _CfgOptionInternal;
|
|
107
|
-
static make(rawOption: DtoOption, rawFeatures: DtoFeature[], siblingHasDuplicateDescription: boolean, parent: _CfgFeatureInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal): CfgOption;
|
|
108
|
-
/**
|
|
109
|
-
* Makes an object wrapping the passed object. This is not a clone method,
|
|
110
|
-
* it is a method to make a new outer reference. Like a shallow copy.
|
|
111
|
-
* We use this to help frameworks that are build around using equals to detect change.
|
|
112
|
-
*/
|
|
113
|
-
static _makeNewRefFrom(internal: _CfgOptionInternal): CfgOption;
|
|
114
|
-
/**
|
|
115
|
-
* Private constructor and make-method because make new ref requires the constructor to
|
|
116
|
-
* take an internal and we don't want those who instantiate CfgOption to have to be aware
|
|
117
|
-
* of the internal.
|
|
118
|
-
*/
|
|
119
|
-
private constructor();
|
|
120
|
-
isBackedBySame: (other: CfgOption) => boolean;
|
|
121
|
-
get parentProduct(): CfgProduct;
|
|
122
|
-
get parent(): CfgFeature;
|
|
123
|
-
get rootProduct(): CfgProduct;
|
|
124
|
-
get rawOption(): DtoOption;
|
|
125
|
-
get key(): string;
|
|
126
|
-
get code(): string;
|
|
127
|
-
get notes(): DtoNote[];
|
|
128
|
-
get miscFiles(): DtoMiscFile[];
|
|
129
|
-
get isUseNumericValue(): boolean;
|
|
130
|
-
get numericValue(): number | undefined;
|
|
131
|
-
setNumericValue: (val: number, doSelectOption: boolean) => Promise<boolean>;
|
|
132
|
-
get allowedNumericValues(): NumericValuesSelection | undefined;
|
|
133
|
-
isAllowedNumericValue: (val: number) => boolean;
|
|
134
|
-
get unit(): LengthUnit;
|
|
135
|
-
get description(): string;
|
|
136
|
-
get selected(): boolean;
|
|
137
|
-
get disabled(): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Selection state is in progress to be changed. This can be used in GUI
|
|
140
|
-
* to display the state as transitioning, or as already changed.
|
|
141
|
-
* If selectedChangeInProgress and:
|
|
142
|
-
* selected is true, it means that this is about to get unselected
|
|
143
|
-
* selected is false, it means that this is about to get selected
|
|
144
|
-
*/
|
|
145
|
-
get selectedChangeInProgress(): boolean;
|
|
146
|
-
/** Are all ancestors up to the CfgProductConfiguration selected? Includes self. */
|
|
147
|
-
get ancestorsSelected(): boolean;
|
|
148
|
-
/**
|
|
149
|
-
* Selects this Option.
|
|
150
|
-
* Only Options belonging to Features that are "select many" can be deselected.
|
|
151
|
-
* Calling this will cause a validation call to the server.
|
|
152
|
-
*/
|
|
153
|
-
setSelected: (on: boolean) => Promise<boolean>;
|
|
154
|
-
get thumbnail(): string | undefined;
|
|
155
|
-
get upcharge(): number;
|
|
156
|
-
get priceChangeAtSelectChange(): number;
|
|
157
|
-
get features(): CfgFeature[];
|
|
158
|
-
listenForChange: (l: SingleArgCallback<OptionChangeNotification>) => void;
|
|
159
|
-
stopListenForChange: (l: SingleArgCallback<OptionChangeNotification>) => void;
|
|
160
|
-
}
|
|
1
|
+
import { LengthUnit, Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
+
import { DtoFeature, DtoMiscFile, DtoNote, DtoOption, DtoOptionConf, DtoPartsConstrainedOption, DtoSelectedOption } from "../CatalogueAPI.js";
|
|
3
|
+
import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
|
|
4
|
+
import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
|
|
5
|
+
import { NumericValuesSelection } from "../utilitiesNumericValues.js";
|
|
6
|
+
import { CfgFeature, _CfgFeatureInternal } from "./CfgFeature.js";
|
|
7
|
+
import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
|
|
8
|
+
export declare type OptionChangeNotification = {
|
|
9
|
+
freshRef: CfgOption;
|
|
10
|
+
committed: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare enum ProductConfigurationBubbleMode {
|
|
13
|
+
/**
|
|
14
|
+
* If this is select it will turns on all ancestors all the way up.
|
|
15
|
+
*/
|
|
16
|
+
BubbleSelected = "BubbleSelected",
|
|
17
|
+
/**
|
|
18
|
+
* Bubble to the closest CfgProduct, let it revalidate, then that will continue the bubble
|
|
19
|
+
* after validate.
|
|
20
|
+
*/
|
|
21
|
+
Validate = "Validate",
|
|
22
|
+
/**
|
|
23
|
+
* Bubble to the closest CfgProduct, let it revalidate, then that will continue the bubble
|
|
24
|
+
* after validate. If this is select it will turn on all ancestors all the way up.
|
|
25
|
+
* So with this mode it is possible to select an option where its parents are not selected.
|
|
26
|
+
*/
|
|
27
|
+
ValidateAndBubbleSelected = "ValidateAndBubbleSelected",
|
|
28
|
+
/**
|
|
29
|
+
* Like ValidateAndBubbleSelected, but SyncGroups are applied after ValidateAndBubbleSelected
|
|
30
|
+
* has been done
|
|
31
|
+
*/
|
|
32
|
+
ValidateAndBubbleSelectedAndApplySyncGroups = "ValidateAndBubbleSelectedAndApplySyncGroups",
|
|
33
|
+
/**
|
|
34
|
+
* Stop bubbling
|
|
35
|
+
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
36
|
+
*/
|
|
37
|
+
Stop = "Stop",
|
|
38
|
+
/**
|
|
39
|
+
* Bubble to the next level up the tree. In features-options the next level is considered
|
|
40
|
+
* the next feature, so option levels are skipped over. The node we call from notifies its
|
|
41
|
+
* parent, and the parent switches out the reference to the node. Then bubbling stops.
|
|
42
|
+
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
43
|
+
*/
|
|
44
|
+
OneLevel = "OneLevel",
|
|
45
|
+
/**
|
|
46
|
+
* Bubble to the closest CfgProduct without doing any validation
|
|
47
|
+
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
48
|
+
*/
|
|
49
|
+
ToParentProduct = "ToParentProduct",
|
|
50
|
+
/**
|
|
51
|
+
* Bubble to the root CfgProduct
|
|
52
|
+
* This mode supports internal functionality and is not expected to be used by integrators.
|
|
53
|
+
*/
|
|
54
|
+
ToRoot = "ToRoot"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* This class is only meant to be used through CfgOption. It should never be instantiated on its
|
|
58
|
+
* own. Normally the internal state of this class should never be directly modified. CfgOption is
|
|
59
|
+
* the class that should be used and interacted with.
|
|
60
|
+
*/
|
|
61
|
+
export declare class _CfgOptionInternal {
|
|
62
|
+
readonly rawOption: DtoOption;
|
|
63
|
+
private readonly rawFeatures;
|
|
64
|
+
readonly parent: _CfgFeatureInternal;
|
|
65
|
+
readonly parentConfiguration: _CfgProductConfigurationInternal;
|
|
66
|
+
readonly parentProduct: _CfgProductInternal;
|
|
67
|
+
readonly rootProduct: _CfgProductInternal;
|
|
68
|
+
constructor(rawOption: DtoOption, rawFeatures: DtoFeature[], siblingHasDuplicateDescription: boolean, parent: _CfgFeatureInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
|
|
69
|
+
private _features;
|
|
70
|
+
private _mtrlApplications;
|
|
71
|
+
readonly key: string;
|
|
72
|
+
private _upcharge;
|
|
73
|
+
private _numericValue;
|
|
74
|
+
readonly allowedNumericValues: NumericValuesSelection | undefined;
|
|
75
|
+
isAllowedNumericValue(val: number): boolean;
|
|
76
|
+
readonly changeObservable: Observable<OptionChangeNotification>;
|
|
77
|
+
get code(): string;
|
|
78
|
+
get notes(): DtoNote[];
|
|
79
|
+
get miscFiles(): DtoMiscFile[];
|
|
80
|
+
get isUseNumericValue(): boolean;
|
|
81
|
+
get numericValue(): number | undefined;
|
|
82
|
+
setNumericValue(val: number, doSelectOption: boolean): Promise<boolean>;
|
|
83
|
+
get unit(): LengthUnit;
|
|
84
|
+
get description(): string;
|
|
85
|
+
get selected(): boolean;
|
|
86
|
+
get disabled(): boolean;
|
|
87
|
+
get selectedChangeInProgress(): boolean;
|
|
88
|
+
get ancestorsSelected(): boolean;
|
|
89
|
+
get mtrlApplications(): CfgMtrlApplication[];
|
|
90
|
+
get thumbnail(): string | undefined;
|
|
91
|
+
private _calculateUpcharge;
|
|
92
|
+
get upcharge(): number;
|
|
93
|
+
get priceChangeAtSelectChange(): number;
|
|
94
|
+
get features(): CfgFeature[];
|
|
95
|
+
/** Called by child to tell its parent that it has changed. */
|
|
96
|
+
_childHasChanged: (freshRef: CfgFeature, bubbleMode: ProductConfigurationBubbleMode, committed: boolean) => Promise<void>;
|
|
97
|
+
getDtoConf: (includeExtendedData: boolean) => DtoOptionConf;
|
|
98
|
+
setApiSelection: (apiOptionSelection: DtoSelectedOption | undefined, apiOptionConstraint: DtoPartsConstrainedOption | undefined) => Promise<boolean>;
|
|
99
|
+
getApiConstrained: (constrOptions: CfgOption[]) => DtoPartsConstrainedOption;
|
|
100
|
+
structureCompare: (other: _CfgOptionInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
101
|
+
tryMatchSelection: (other: CfgOption, descriptionMatch?: boolean) => Promise<boolean>;
|
|
102
|
+
keyMatch: (other: _CfgOptionInternal, descriptionMatch?: boolean) => boolean;
|
|
103
|
+
_getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
104
|
+
}
|
|
105
|
+
export declare class CfgOption {
|
|
106
|
+
readonly _internal: _CfgOptionInternal;
|
|
107
|
+
static make(rawOption: DtoOption, rawFeatures: DtoFeature[], siblingHasDuplicateDescription: boolean, parent: _CfgFeatureInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal): CfgOption;
|
|
108
|
+
/**
|
|
109
|
+
* Makes an object wrapping the passed object. This is not a clone method,
|
|
110
|
+
* it is a method to make a new outer reference. Like a shallow copy.
|
|
111
|
+
* We use this to help frameworks that are build around using equals to detect change.
|
|
112
|
+
*/
|
|
113
|
+
static _makeNewRefFrom(internal: _CfgOptionInternal): CfgOption;
|
|
114
|
+
/**
|
|
115
|
+
* Private constructor and make-method because make new ref requires the constructor to
|
|
116
|
+
* take an internal and we don't want those who instantiate CfgOption to have to be aware
|
|
117
|
+
* of the internal.
|
|
118
|
+
*/
|
|
119
|
+
private constructor();
|
|
120
|
+
isBackedBySame: (other: CfgOption) => boolean;
|
|
121
|
+
get parentProduct(): CfgProduct;
|
|
122
|
+
get parent(): CfgFeature;
|
|
123
|
+
get rootProduct(): CfgProduct;
|
|
124
|
+
get rawOption(): DtoOption;
|
|
125
|
+
get key(): string;
|
|
126
|
+
get code(): string;
|
|
127
|
+
get notes(): DtoNote[];
|
|
128
|
+
get miscFiles(): DtoMiscFile[];
|
|
129
|
+
get isUseNumericValue(): boolean;
|
|
130
|
+
get numericValue(): number | undefined;
|
|
131
|
+
setNumericValue: (val: number, doSelectOption: boolean) => Promise<boolean>;
|
|
132
|
+
get allowedNumericValues(): NumericValuesSelection | undefined;
|
|
133
|
+
isAllowedNumericValue: (val: number) => boolean;
|
|
134
|
+
get unit(): LengthUnit;
|
|
135
|
+
get description(): string;
|
|
136
|
+
get selected(): boolean;
|
|
137
|
+
get disabled(): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Selection state is in progress to be changed. This can be used in GUI
|
|
140
|
+
* to display the state as transitioning, or as already changed.
|
|
141
|
+
* If selectedChangeInProgress and:
|
|
142
|
+
* selected is true, it means that this is about to get unselected
|
|
143
|
+
* selected is false, it means that this is about to get selected
|
|
144
|
+
*/
|
|
145
|
+
get selectedChangeInProgress(): boolean;
|
|
146
|
+
/** Are all ancestors up to the CfgProductConfiguration selected? Includes self. */
|
|
147
|
+
get ancestorsSelected(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Selects this Option.
|
|
150
|
+
* Only Options belonging to Features that are "select many" can be deselected.
|
|
151
|
+
* Calling this will cause a validation call to the server.
|
|
152
|
+
*/
|
|
153
|
+
setSelected: (on: boolean) => Promise<boolean>;
|
|
154
|
+
get thumbnail(): string | undefined;
|
|
155
|
+
get upcharge(): number;
|
|
156
|
+
get priceChangeAtSelectChange(): number;
|
|
157
|
+
get features(): CfgFeature[];
|
|
158
|
+
listenForChange: (l: SingleArgCallback<OptionChangeNotification>) => void;
|
|
159
|
+
stopListenForChange: (l: SingleArgCallback<OptionChangeNotification>) => void;
|
|
160
|
+
}
|
|
161
161
|
//# sourceMappingURL=CfgOption.d.ts.map
|