@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.
Files changed (102) hide show
  1. package/.eslintrc.json +5 -5
  2. package/LICENSE +201 -201
  3. package/README.md +1 -1
  4. package/dist/CatalogueAPI.d.ts +633 -633
  5. package/dist/CatalogueAPI.js +312 -312
  6. package/dist/CfgMeasure.d.ts +32 -32
  7. package/dist/CfgMeasure.js +30 -30
  8. package/dist/CfgProduct.d.ts +359 -344
  9. package/dist/CfgProduct.js +1005 -992
  10. package/dist/CfgReferencePathHelper.d.ts +26 -26
  11. package/dist/CfgReferencePathHelper.js +26 -26
  12. package/dist/index.d.ts +24 -24
  13. package/dist/index.js +24 -24
  14. package/dist/io/CfgHistoryManager.d.ts +83 -83
  15. package/dist/io/CfgHistoryManager.js +144 -144
  16. package/dist/io/CfgHistoryToProdConfConnector.d.ts +21 -21
  17. package/dist/io/CfgHistoryToProdConfConnector.js +50 -50
  18. package/dist/io/CfgIOManager.d.ts +53 -53
  19. package/dist/io/CfgIOManager.js +134 -134
  20. package/dist/io/CfgIOProdConfConnector.d.ts +54 -54
  21. package/dist/io/CfgIOProdConfConnector.js +139 -139
  22. package/dist/io/CfgIOWarningSupplier.d.ts +3 -3
  23. package/dist/io/CfgIOWarningSupplier.js +1 -1
  24. package/dist/io/CfgObservableStateManager.d.ts +25 -25
  25. package/dist/io/CfgObservableStateManager.js +69 -69
  26. package/dist/io/CfgObservableStateToProdConfConnector.d.ts +15 -15
  27. package/dist/io/CfgObservableStateToProdConfConnector.js +17 -17
  28. package/dist/io/CfgWindowEventManager.d.ts +21 -21
  29. package/dist/io/CfgWindowEventManager.js +38 -38
  30. package/dist/io/CfgWindowMessageManager.d.ts +40 -40
  31. package/dist/io/CfgWindowMessageManager.js +91 -91
  32. package/dist/io/CfgWindowMessageToProdConfConnector.d.ts +17 -17
  33. package/dist/io/CfgWindowMessageToProdConfConnector.js +19 -19
  34. package/dist/io/index.d.ts +8 -8
  35. package/dist/io/index.js +8 -8
  36. package/dist/material/CfgMaterialMapping.d.ts +7 -7
  37. package/dist/material/CfgMaterialMapping.js +181 -181
  38. package/dist/material/CfgMtrlApplication.d.ts +18 -18
  39. package/dist/material/CfgMtrlApplication.js +43 -43
  40. package/dist/material/CfgMtrlApplicationSource.d.ts +7 -7
  41. package/dist/material/CfgMtrlApplicationSource.js +8 -8
  42. package/dist/material/CfgMtrlSource.d.ts +19 -19
  43. package/dist/material/CfgMtrlSource.js +40 -40
  44. package/dist/material/CfgMtrlSourceWithMetaData.d.ts +7 -7
  45. package/dist/material/CfgMtrlSourceWithMetaData.js +1 -1
  46. package/dist/productConfiguration/CfgFeature.d.ts +199 -199
  47. package/dist/productConfiguration/CfgFeature.js +691 -691
  48. package/dist/productConfiguration/CfgOption.d.ts +160 -160
  49. package/dist/productConfiguration/CfgOption.js +464 -464
  50. package/dist/productConfiguration/CfgProductConfiguration.d.ts +136 -129
  51. package/dist/productConfiguration/CfgProductConfiguration.js +355 -346
  52. package/dist/productConfiguration/filters.d.ts +17 -17
  53. package/dist/productConfiguration/filters.js +141 -141
  54. package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
  55. package/dist/productConfiguration/productParamsGenerator.js +65 -65
  56. package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -17
  57. package/dist/productConfiguration/utilitiesProductConfiguration.js +89 -87
  58. package/dist/productLoader.d.ts +33 -33
  59. package/dist/productLoader.js +49 -49
  60. package/dist/syncGroups/SyncGroupsApplyMode.d.ts +20 -20
  61. package/dist/syncGroups/SyncGroupsApplyMode.js +21 -21
  62. package/dist/syncGroups/SyncGroupsHandler.d.ts +47 -47
  63. package/dist/syncGroups/SyncGroupsHandler.js +370 -370
  64. package/dist/syncGroups/SyncGroupsPathHelper.d.ts +26 -26
  65. package/dist/syncGroups/SyncGroupsPathHelper.js +90 -90
  66. package/dist/syncGroups/SyncGroupsState.d.ts +39 -39
  67. package/dist/syncGroups/SyncGroupsState.js +167 -167
  68. package/dist/syncGroups/SyncGroupsTransaction.d.ts +154 -154
  69. package/dist/syncGroups/SyncGroupsTransaction.js +589 -589
  70. package/dist/tasks/TaskHandler.d.ts +77 -77
  71. package/dist/tasks/TaskHandler.js +276 -276
  72. package/dist/tasks/formats.d.ts +4 -4
  73. package/dist/tasks/formats.js +7 -7
  74. package/dist/tests/testData/collectorForTest.d.ts +73 -73
  75. package/dist/tests/testData/collectorForTest.js +194 -194
  76. package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
  77. package/dist/tests/testData/dummyProductForTest.js +32 -32
  78. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +11 -11
  79. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +282 -282
  80. package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
  81. package/dist/tests/testData/testDataCachedGetProduct.js +187 -187
  82. package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
  83. package/dist/tests/testData/testDataCachedPostValidate.js +185 -185
  84. package/dist/tests/testData/testDataConstraints.d.ts +3 -3
  85. package/dist/tests/testData/testDataConstraints.js +174 -174
  86. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
  87. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1099 -1099
  88. package/dist/tests/testData/testDataOptions.d.ts +12 -12
  89. package/dist/tests/testData/testDataOptions.js +60 -60
  90. package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +6 -6
  91. package/dist/tests/testData/testDataProductAggregatedPrice.js +189 -189
  92. package/dist/tests/testData/testDataUpcharge.d.ts +8 -8
  93. package/dist/tests/testData/testDataUpcharge.js +121 -121
  94. package/dist/utilitiesCatalogueData.d.ts +47 -47
  95. package/dist/utilitiesCatalogueData.js +180 -180
  96. package/dist/utilitiesCataloguePermission.d.ts +38 -38
  97. package/dist/utilitiesCataloguePermission.js +79 -79
  98. package/dist/utilitiesConfiguration.d.ts +28 -28
  99. package/dist/utilitiesConfiguration.js +200 -200
  100. package/dist/utilitiesNumericValues.d.ts +24 -24
  101. package/dist/utilitiesNumericValues.js +114 -114
  102. package/package.json +3 -3
@@ -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,200 +1,200 @@
1
- import { LengthUnit, Observable, SingleArgCallback } from "@configura/web-utilities";
2
- import { DtoFeature, DtoFeatureConf, DtoNote, DtoPartsConstrainedOption, DtoSelectedOption, DtoSyncGroup, DtoSyncGroupMethods } from "../CatalogueAPI.js";
3
- import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
4
- import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
5
- import { SyncCode } from "../syncGroups/SyncGroupsHandler.js";
6
- import { CfgOption, ProductConfigurationBubbleMode, _CfgOptionInternal } from "./CfgOption.js";
7
- import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
8
- export declare enum SelectionType {
9
- /**
10
- * All options are permanently selected. In our ui-component for this we skip over this level,
11
- * and immediately show the children, but you could do this differently, like for instance
12
- * showing the group heading.
13
- */
14
- Group = 0,
15
- /**
16
- * One and only one can be selected at a time. This normally corresponds to either a dropdown
17
- * menu or radio buttons.
18
- */
19
- SelectOne = 1,
20
- /** Zero to all can be selected at a time. This normally corresponds to checkboxes. */
21
- SelectMany = 2
22
- }
23
- export declare type FeatureChangeNotification = {
24
- freshRef: CfgFeature;
25
- committed: boolean;
26
- };
27
- /**
28
- * This class is meant to only be used through CfgFeature. It should
29
- * never be instantiated on its own. Normally the internal state of this class
30
- * should never be directly modified. CfgFeature is the class that
31
- * should be used and interacted with.
32
- */
33
- export declare class _CfgFeatureInternal {
34
- readonly rawFeature: DtoFeature;
35
- private readonly rawFeatures;
36
- private _key;
37
- readonly parent: _CfgProductConfigurationInternal | _CfgOptionInternal;
38
- readonly parentConfiguration: _CfgProductConfigurationInternal;
39
- readonly parentProduct: _CfgProductInternal;
40
- readonly rootProduct: _CfgProductInternal;
41
- constructor(rawFeature: DtoFeature, rawFeatures: DtoFeature[], _key: string, // Unique amongst siblings
42
- parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
43
- readonly selectionType: SelectionType;
44
- private _options;
45
- private readonly _selectedOptions;
46
- private readonly _constrainedOptions;
47
- private _mtrlApplications;
48
- readonly hasUpcharge: boolean;
49
- readonly changeObservable: Observable<FeatureChangeNotification>;
50
- get code(): string;
51
- get groupCode(): string | undefined;
52
- get key(): string;
53
- set key(k: string);
54
- get notes(): DtoNote[];
55
- get isUseNumericValue(): boolean;
56
- get numericValue(): number | undefined;
57
- setNumericValue: (val: number) => Promise<boolean>;
58
- get description(): string;
59
- get omitOnOrder(): boolean;
60
- get syncGroup(): DtoSyncGroup | undefined;
61
- /**
62
- * @return one of the following, in order:
63
- * - undefined if the Feature lacks a syncGroup.
64
- * - false if the syncGroup doesn't fulfill the optional mustSupport requirement.
65
- * - syncCode from the syncGroup.
66
- */
67
- getSyncCode(mustSupport?: DtoSyncGroupMethods): undefined | false | SyncCode;
68
- /**
69
- * The DtoMeasureParam class is re-used for different purposes. In Features it is used
70
- * to indicate which stretch measures inside Models shall be affected by this state
71
- * of this Feature. Hence only the code property is used.
72
- */
73
- get measureParamCodes(): string[] | undefined;
74
- get unit(): LengthUnit;
75
- get mtrlApplications(): CfgMtrlApplication[];
76
- get selectedOptions(): CfgOption[];
77
- get ancestorsSelected(): boolean;
78
- /**
79
- * If one option is selected or deselected this will potentially
80
- * affect all other Options on this Feature
81
- */
82
- private get isAllOptionsAffectedByAnySelection();
83
- get preview(): string | undefined;
84
- /**
85
- * Please note that this relates to the visibility in the Configuration tree.
86
- * It does not affect the visibility of anything in the 3D view at all.
87
- */
88
- get visibleIfAdditionalProduct(): boolean;
89
- /**
90
- * Please note that this relates to the visibility in the Configuration tree.
91
- * It does not affect the visibility of anything in the 3D view at all.
92
- */
93
- get visibleIfMainProduct(): boolean;
94
- /**
95
- * Please note that this relates to the visibility in the Configuration tree.
96
- * It does not affect the visibility of anything in the 3D view at all.
97
- */
98
- get visible(): boolean;
99
- get options(): CfgOption[];
100
- private _notifyAllOfChange;
101
- /**
102
- * Called by child to tell its parent that it has changed.
103
- * @throws Will throw if options have not yet been generated. This should be impossible
104
- * as nonexisting children can not call their parent.
105
- */
106
- _childHasChanged: (childOption: _CfgOptionInternal, bubbleMode: ProductConfigurationBubbleMode, committed: boolean) => Promise<void>;
107
- getDtoConf: (includeExtendedData: boolean) => DtoFeatureConf;
108
- setApiSelection: (apiOptionSelectionMap: {
109
- [index: string]: DtoSelectedOption;
110
- } | undefined, apiOptionConstraintMap: {
111
- [index: string]: DtoPartsConstrainedOption;
112
- } | undefined) => Promise<boolean>;
113
- addForApiConstrained: (next: {
114
- [key: string]: DtoPartsConstrainedOption;
115
- }) => void;
116
- /** Pushes to refresh stretch. Does not cause validation. */
117
- pushStretch: () => Promise<boolean>;
118
- structureCompare: (other: _CfgFeatureInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
119
- tryMatchSelection: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => Promise<boolean>;
120
- /**
121
- * Normally this is used through methods on CfgFeature and CfgOption. Use this internal version
122
- * if you need to control the bubbleMode.
123
- *
124
- * Using a validate bubbleMode will cause validation calls to the server.
125
- */
126
- selectOption: (optionInternal: _CfgOptionInternal, on: boolean, bubbleMode: ProductConfigurationBubbleMode) => Promise<boolean>;
127
- isSelected: (option: _CfgOptionInternal) => boolean;
128
- isDisabled: (option: _CfgOptionInternal) => boolean;
129
- keyMatch: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => boolean;
130
- /** Only in selected options */
131
- _getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
132
- /**
133
- * Make fresh references to all options on this feature.
134
- * Also includes currently selected options.
135
- * @throws Will throw if options have not yet been generated.
136
- */
137
- private _freshRefAllOptions;
138
- }
139
- export declare class CfgFeature {
140
- readonly _internal: _CfgFeatureInternal;
141
- static make(rawFeature: DtoFeature, rawFeatures: DtoFeature[], key: string, parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal): CfgFeature;
142
- /**
143
- * Makes an object wrapping the passed object. This is not a clone method,
144
- * it is a method to make a new outer reference. Like a shallow copy.
145
- * We use this to help frameworks that are built around using equals to detect change.
146
- */
147
- static _makeNewRefFrom(internal: _CfgFeatureInternal): CfgFeature;
148
- /**
149
- * Private constructor and make-method because make new ref requires the constructor to
150
- * take an internal and we don't want those who instantiate CfgFeature to have to be aware
151
- * of the internal.
152
- */
153
- private constructor();
154
- isBackedBySame: (other: CfgFeature) => boolean;
155
- get parentProduct(): CfgProduct;
156
- get rootProduct(): CfgProduct;
157
- get selectionType(): SelectionType;
158
- get key(): string;
159
- get code(): string;
160
- get groupCode(): string | undefined;
161
- get notes(): DtoNote[];
162
- /**
163
- * If true the options in the feature is selected by both sending its code and numeric value
164
- * when selecting.
165
- */
166
- get isUseNumericValue(): boolean;
167
- /** This will read the numeric value of the selected option. */
168
- get numericValue(): number | undefined;
169
- /**
170
- * This will find the first option allowing the value, set the value on it and select it.
171
- * This is an implicit option-select.
172
- */
173
- setNumericValue: (val: number) => Promise<boolean>;
174
- get unit(): LengthUnit;
175
- get description(): string;
176
- get omitOnOrder(): boolean;
177
- get hasUpcharge(): boolean | undefined;
178
- get selectedOptions(): CfgOption[];
179
- /** Are all ancestors up to the CfgProductConfiguration selected? */
180
- get ancestorsSelected(): boolean;
181
- get preview(): string | undefined;
182
- get options(): CfgOption[];
183
- /**
184
- * Please note that this relates to the visibility in the Configuration tree.
185
- * It does not affect the visibility of anything in the 3D view at all.
186
- * Visibility is not inherited. If this is hidden the children
187
- * of this Feature might still be visible, depending on their settings.
188
- */
189
- get visible(): boolean;
190
- /**
191
- * Selects the passed Option.
192
- * Only Options belonging to Features that are "select many" can be deselected.
193
- * Calling this will cause a validation call to the server.
194
- */
195
- selectOption: (option: CfgOption, on: boolean) => Promise<boolean>;
196
- isSelected: (option: CfgOption) => boolean;
197
- listenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
198
- stopListenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
199
- }
1
+ import { LengthUnit, Observable, SingleArgCallback } from "@configura/web-utilities";
2
+ import { DtoFeature, DtoFeatureConf, DtoNote, DtoPartsConstrainedOption, DtoSelectedOption, DtoSyncGroup, DtoSyncGroupMethods } from "../CatalogueAPI.js";
3
+ import { CfgProduct, _CfgProductInternal } from "../CfgProduct.js";
4
+ import { CfgMtrlApplication } from "../material/CfgMtrlApplication.js";
5
+ import { SyncCode } from "../syncGroups/SyncGroupsHandler.js";
6
+ import { CfgOption, ProductConfigurationBubbleMode, _CfgOptionInternal } from "./CfgOption.js";
7
+ import { _CfgProductConfigurationInternal } from "./CfgProductConfiguration.js";
8
+ export declare enum SelectionType {
9
+ /**
10
+ * All options are permanently selected. In our ui-component for this we skip over this level,
11
+ * and immediately show the children, but you could do this differently, like for instance
12
+ * showing the group heading.
13
+ */
14
+ Group = 0,
15
+ /**
16
+ * One and only one can be selected at a time. This normally corresponds to either a dropdown
17
+ * menu or radio buttons.
18
+ */
19
+ SelectOne = 1,
20
+ /** Zero to all can be selected at a time. This normally corresponds to checkboxes. */
21
+ SelectMany = 2
22
+ }
23
+ export declare type FeatureChangeNotification = {
24
+ freshRef: CfgFeature;
25
+ committed: boolean;
26
+ };
27
+ /**
28
+ * This class is meant to only be used through CfgFeature. It should
29
+ * never be instantiated on its own. Normally the internal state of this class
30
+ * should never be directly modified. CfgFeature is the class that
31
+ * should be used and interacted with.
32
+ */
33
+ export declare class _CfgFeatureInternal {
34
+ readonly rawFeature: DtoFeature;
35
+ private readonly rawFeatures;
36
+ private _key;
37
+ readonly parent: _CfgProductConfigurationInternal | _CfgOptionInternal;
38
+ readonly parentConfiguration: _CfgProductConfigurationInternal;
39
+ readonly parentProduct: _CfgProductInternal;
40
+ readonly rootProduct: _CfgProductInternal;
41
+ constructor(rawFeature: DtoFeature, rawFeatures: DtoFeature[], _key: string, // Unique amongst siblings
42
+ parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal);
43
+ readonly selectionType: SelectionType;
44
+ private _options;
45
+ private readonly _selectedOptions;
46
+ private readonly _constrainedOptions;
47
+ private _mtrlApplications;
48
+ readonly hasUpcharge: boolean;
49
+ readonly changeObservable: Observable<FeatureChangeNotification>;
50
+ get code(): string;
51
+ get groupCode(): string | undefined;
52
+ get key(): string;
53
+ set key(k: string);
54
+ get notes(): DtoNote[];
55
+ get isUseNumericValue(): boolean;
56
+ get numericValue(): number | undefined;
57
+ setNumericValue: (val: number) => Promise<boolean>;
58
+ get description(): string;
59
+ get omitOnOrder(): boolean;
60
+ get syncGroup(): DtoSyncGroup | undefined;
61
+ /**
62
+ * @return one of the following, in order:
63
+ * - undefined if the Feature lacks a syncGroup.
64
+ * - false if the syncGroup doesn't fulfill the optional mustSupport requirement.
65
+ * - syncCode from the syncGroup.
66
+ */
67
+ getSyncCode(mustSupport?: DtoSyncGroupMethods): undefined | false | SyncCode;
68
+ /**
69
+ * The DtoMeasureParam class is re-used for different purposes. In Features it is used
70
+ * to indicate which stretch measures inside Models shall be affected by this state
71
+ * of this Feature. Hence only the code property is used.
72
+ */
73
+ get measureParamCodes(): string[] | undefined;
74
+ get unit(): LengthUnit;
75
+ get mtrlApplications(): CfgMtrlApplication[];
76
+ get selectedOptions(): CfgOption[];
77
+ get ancestorsSelected(): boolean;
78
+ /**
79
+ * If one option is selected or deselected this will potentially
80
+ * affect all other Options on this Feature
81
+ */
82
+ private get isAllOptionsAffectedByAnySelection();
83
+ get preview(): string | undefined;
84
+ /**
85
+ * Please note that this relates to the visibility in the Configuration tree.
86
+ * It does not affect the visibility of anything in the 3D view at all.
87
+ */
88
+ get visibleIfAdditionalProduct(): boolean;
89
+ /**
90
+ * Please note that this relates to the visibility in the Configuration tree.
91
+ * It does not affect the visibility of anything in the 3D view at all.
92
+ */
93
+ get visibleIfMainProduct(): boolean;
94
+ /**
95
+ * Please note that this relates to the visibility in the Configuration tree.
96
+ * It does not affect the visibility of anything in the 3D view at all.
97
+ */
98
+ get visible(): boolean;
99
+ get options(): CfgOption[];
100
+ private _notifyAllOfChange;
101
+ /**
102
+ * Called by child to tell its parent that it has changed.
103
+ * @throws Will throw if options have not yet been generated. This should be impossible
104
+ * as nonexisting children can not call their parent.
105
+ */
106
+ _childHasChanged: (childOption: _CfgOptionInternal, bubbleMode: ProductConfigurationBubbleMode, committed: boolean) => Promise<void>;
107
+ getDtoConf: (includeExtendedData: boolean) => DtoFeatureConf;
108
+ setApiSelection: (apiOptionSelectionMap: {
109
+ [index: string]: DtoSelectedOption;
110
+ } | undefined, apiOptionConstraintMap: {
111
+ [index: string]: DtoPartsConstrainedOption;
112
+ } | undefined) => Promise<boolean>;
113
+ addForApiConstrained: (next: {
114
+ [key: string]: DtoPartsConstrainedOption;
115
+ }) => void;
116
+ /** Pushes to refresh stretch. Does not cause validation. */
117
+ pushStretch: () => Promise<boolean>;
118
+ structureCompare: (other: _CfgFeatureInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
119
+ tryMatchSelection: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => Promise<boolean>;
120
+ /**
121
+ * Normally this is used through methods on CfgFeature and CfgOption. Use this internal version
122
+ * if you need to control the bubbleMode.
123
+ *
124
+ * Using a validate bubbleMode will cause validation calls to the server.
125
+ */
126
+ selectOption: (optionInternal: _CfgOptionInternal, on: boolean, bubbleMode: ProductConfigurationBubbleMode) => Promise<boolean>;
127
+ isSelected: (option: _CfgOptionInternal) => boolean;
128
+ isDisabled: (option: _CfgOptionInternal) => boolean;
129
+ keyMatch: (other: _CfgFeatureInternal, descriptionMatch?: boolean) => boolean;
130
+ /** Only in selected options */
131
+ _getFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
132
+ /**
133
+ * Make fresh references to all options on this feature.
134
+ * Also includes currently selected options.
135
+ * @throws Will throw if options have not yet been generated.
136
+ */
137
+ private _freshRefAllOptions;
138
+ }
139
+ export declare class CfgFeature {
140
+ readonly _internal: _CfgFeatureInternal;
141
+ static make(rawFeature: DtoFeature, rawFeatures: DtoFeature[], key: string, parent: _CfgProductConfigurationInternal | _CfgOptionInternal, parentConfiguration: _CfgProductConfigurationInternal, parentProduct: _CfgProductInternal, rootProduct: _CfgProductInternal): CfgFeature;
142
+ /**
143
+ * Makes an object wrapping the passed object. This is not a clone method,
144
+ * it is a method to make a new outer reference. Like a shallow copy.
145
+ * We use this to help frameworks that are built around using equals to detect change.
146
+ */
147
+ static _makeNewRefFrom(internal: _CfgFeatureInternal): CfgFeature;
148
+ /**
149
+ * Private constructor and make-method because make new ref requires the constructor to
150
+ * take an internal and we don't want those who instantiate CfgFeature to have to be aware
151
+ * of the internal.
152
+ */
153
+ private constructor();
154
+ isBackedBySame: (other: CfgFeature) => boolean;
155
+ get parentProduct(): CfgProduct;
156
+ get rootProduct(): CfgProduct;
157
+ get selectionType(): SelectionType;
158
+ get key(): string;
159
+ get code(): string;
160
+ get groupCode(): string | undefined;
161
+ get notes(): DtoNote[];
162
+ /**
163
+ * If true the options in the feature is selected by both sending its code and numeric value
164
+ * when selecting.
165
+ */
166
+ get isUseNumericValue(): boolean;
167
+ /** This will read the numeric value of the selected option. */
168
+ get numericValue(): number | undefined;
169
+ /**
170
+ * This will find the first option allowing the value, set the value on it and select it.
171
+ * This is an implicit option-select.
172
+ */
173
+ setNumericValue: (val: number) => Promise<boolean>;
174
+ get unit(): LengthUnit;
175
+ get description(): string;
176
+ get omitOnOrder(): boolean;
177
+ get hasUpcharge(): boolean | undefined;
178
+ get selectedOptions(): CfgOption[];
179
+ /** Are all ancestors up to the CfgProductConfiguration selected? */
180
+ get ancestorsSelected(): boolean;
181
+ get preview(): string | undefined;
182
+ get options(): CfgOption[];
183
+ /**
184
+ * Please note that this relates to the visibility in the Configuration tree.
185
+ * It does not affect the visibility of anything in the 3D view at all.
186
+ * Visibility is not inherited. If this is hidden the children
187
+ * of this Feature might still be visible, depending on their settings.
188
+ */
189
+ get visible(): boolean;
190
+ /**
191
+ * Selects the passed Option.
192
+ * Only Options belonging to Features that are "select many" can be deselected.
193
+ * Calling this will cause a validation call to the server.
194
+ */
195
+ selectOption: (option: CfgOption, on: boolean) => Promise<boolean>;
196
+ isSelected: (option: CfgOption) => boolean;
197
+ listenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
198
+ stopListenForChange: (l: SingleArgCallback<FeatureChangeNotification>) => void;
199
+ }
200
200
  //# sourceMappingURL=CfgFeature.d.ts.map