@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
package/dist/CfgProduct.d.ts
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { AggregatedLoadingObservable, Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
-
import { AdditionalProductConfiguration, CatalogueParams, MtrlApplication, Prices, Transform } from "./CatalogueAPI.js";
|
|
3
|
-
import { _CfgFeatureInternal } from "./productConfiguration/CfgFeature.js";
|
|
4
|
-
import { ProductConfigurationBubbleMode } from "./productConfiguration/CfgOption.js";
|
|
5
|
-
import { CfgProductConfiguration } from "./productConfiguration/CfgProductConfiguration.js";
|
|
6
|
-
import { ProductLoader } from "./productLoader.js";
|
|
7
|
-
import { CfgProductData, RootNodeSource } from "./utilitiesCatalogueData.js";
|
|
8
|
-
export declare type CfgProductChangeNotification = {
|
|
9
|
-
freshRef: CfgProduct;
|
|
10
|
-
};
|
|
11
|
-
export declare type CfgProductSettings = {
|
|
12
|
-
strictSelectOneSelectionCount: boolean;
|
|
13
|
-
strictSetApiSelectionMatch: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare enum CfgProductBubbleMode {
|
|
16
|
-
Stop = "Stop",
|
|
17
|
-
OneLevel = "OneLevel",
|
|
18
|
-
ToRoot = "ToRoot",
|
|
19
|
-
ToRootAndBubbleSelected = "ToRootAndBubbleSelected"
|
|
20
|
-
}
|
|
21
|
-
export declare type CfgPrice = {
|
|
22
|
-
basePrice: number;
|
|
23
|
-
listPrice: number;
|
|
24
|
-
currency: string;
|
|
25
|
-
fractionDigits: number;
|
|
26
|
-
};
|
|
27
|
-
export declare class _CfgProductInternal {
|
|
28
|
-
readonly _productLoaderRaw: ProductLoader;
|
|
29
|
-
readonly lang: string;
|
|
30
|
-
readonly catId: CatalogueParams;
|
|
31
|
-
readonly partNumber: string;
|
|
32
|
-
readonly settings: CfgProductSettings;
|
|
33
|
-
readonly uuid: string;
|
|
34
|
-
private _rawProductData;
|
|
35
|
-
readonly loadingObservable: AggregatedLoadingObservable;
|
|
36
|
-
readonly refKey: string | undefined;
|
|
37
|
-
readonly refDescription: string | undefined;
|
|
38
|
-
readonly parent: _CfgProductInternal | undefined;
|
|
39
|
-
readonly transform: Transform | undefined;
|
|
40
|
-
static make: (productLoaderRaw: ProductLoader, productLoaderForGroupedLoad: ProductLoader | undefined, lang: string, catId: CatalogueParams, partNumber: string, settings: CfgProductSettings, optional: boolean, loadingObservable: AggregatedLoadingObservable, refKey: string | undefined, refDescription: string | undefined, parent: _CfgProductInternal | undefined, root: _CfgProductInternal | undefined, transform: Transform | undefined) => Promise<_CfgProductInternal>;
|
|
41
|
-
private constructor();
|
|
42
|
-
readonly root: _CfgProductInternal;
|
|
43
|
-
private _destroyed;
|
|
44
|
-
readonly key: string;
|
|
45
|
-
readonly additionalProducts: CfgProduct[];
|
|
46
|
-
private _selected;
|
|
47
|
-
private _configuration;
|
|
48
|
-
readonly changeObservable: Observable<CfgProductChangeNotification>;
|
|
49
|
-
get selected(): boolean;
|
|
50
|
-
readonly isAdditionalProduct: boolean;
|
|
51
|
-
clone(parent?: _CfgProductInternal, root?: _CfgProductInternal): Promise<_CfgProductInternal>;
|
|
52
|
-
destroy: () => void;
|
|
53
|
-
get description(): string | undefined;
|
|
54
|
-
get rootNodeSources(): RootNodeSource[] | undefined;
|
|
55
|
-
get mtrlApplications(): MtrlApplication[] | undefined;
|
|
56
|
-
get currency(): string;
|
|
57
|
-
get fractionDigits(): number;
|
|
58
|
-
get prices(): Prices | undefined;
|
|
59
|
-
get aggregatedPrice(): CfgPrice;
|
|
60
|
-
get optional(): boolean;
|
|
61
|
-
setSelected(v: boolean, bubbleMode: CfgProductBubbleMode): Promise<boolean>;
|
|
62
|
-
get configuration(): CfgProductConfiguration;
|
|
63
|
-
get rawProductData(): CfgProductData;
|
|
64
|
-
_notifyAllOfChange: (bubbleMode: CfgProductBubbleMode) => Promise<void>;
|
|
65
|
-
private _childHasChanged;
|
|
66
|
-
_additionalProductHasChanged: (freshRef: CfgProduct, bubbleMode: CfgProductBubbleMode) => Promise<void>;
|
|
67
|
-
_configurationHasChanged: (freshRef: CfgProductConfiguration, bubbleMode: ProductConfigurationBubbleMode) => Promise<void>;
|
|
68
|
-
getApiSelection: () => AdditionalProductConfiguration;
|
|
69
|
-
setApiSelection: (s: AdditionalProductConfiguration, doValidate: boolean, productLoaderForGroupedLoad?: ProductLoader | undefined) => Promise<boolean>;
|
|
70
|
-
structureCompare: (other: _CfgProductInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
71
|
-
tryMatchSelection: (other: _CfgProductInternal, descriptionMatch?: boolean, productLoaderForGroupedLoad?: ProductLoader | undefined) => Promise<boolean>;
|
|
72
|
-
_getDescendantFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
73
|
-
private _revalidateInProgressToken;
|
|
74
|
-
_revalidate: (bubbleMode: CfgProductBubbleMode, productLoaderForGroupedLoad: ProductLoader) => Promise<boolean>;
|
|
75
|
-
_syncAndLoadAdditionalProducts: (productLoaderForGroupedLoad: ProductLoader) => Promise<boolean>;
|
|
76
|
-
}
|
|
77
|
-
export declare class CfgProduct {
|
|
78
|
-
readonly _internal: _CfgProductInternal;
|
|
79
|
-
static make: (productLoader: ProductLoader, lang: string, catId: CatalogueParams, partNumber: string, settings?: Partial<CfgProductSettings> | undefined) => Promise<CfgProduct>;
|
|
80
|
-
static _makeNewRefFrom: (source: _CfgProductInternal) => CfgProduct;
|
|
81
|
-
private constructor();
|
|
82
|
-
isBackedBySame: (other: CfgProduct) => boolean;
|
|
83
|
-
destroy: () => void;
|
|
84
|
-
clone: () => Promise<CfgProduct>;
|
|
85
|
-
get key(): string;
|
|
86
|
-
get refKey(): string | undefined;
|
|
87
|
-
get lang(): string;
|
|
88
|
-
get catId(): CatalogueParams;
|
|
89
|
-
get partNumber(): string;
|
|
90
|
-
get isAdditionalProduct(): boolean;
|
|
91
|
-
get optional(): boolean;
|
|
92
|
-
get selected(): boolean;
|
|
93
|
-
setSelected: (v: boolean) => Promise<boolean>;
|
|
94
|
-
get rawProductData(): CfgProductData;
|
|
95
|
-
get uuid(): string;
|
|
96
|
-
get sku(): string;
|
|
97
|
-
get styleNr(): string;
|
|
98
|
-
get preview(): string | undefined;
|
|
99
|
-
get description(): string | undefined;
|
|
100
|
-
get additionalProducts(): CfgProduct[];
|
|
101
|
-
get configuration(): CfgProductConfiguration;
|
|
102
|
-
get transform(): Transform | undefined;
|
|
103
|
-
get currency(): string;
|
|
104
|
-
get fractionDigits(): number;
|
|
105
|
-
get aggregatedPrice(): CfgPrice;
|
|
106
|
-
structureCompare: (other: CfgProduct, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
107
|
-
tryMatchSelection: (other: CfgProduct, descriptionMatch?: boolean) => Promise<boolean>;
|
|
108
|
-
getApiSelection: () => AdditionalProductConfiguration;
|
|
109
|
-
setApiSelection: (s: AdditionalProductConfiguration, doValidate?: boolean) => Promise<boolean>;
|
|
110
|
-
listenForChange: (l: SingleArgCallback<CfgProductChangeNotification>) => void;
|
|
111
|
-
stopListenForChange: (l: SingleArgCallback<CfgProductChangeNotification>) => void;
|
|
112
|
-
stopAllListenForChange: () => void;
|
|
113
|
-
listenForLoading: (l: SingleArgCallback<boolean>) => void;
|
|
114
|
-
stopListenForLoading: (l: SingleArgCallback<boolean>) => void;
|
|
115
|
-
stopAllListenForLoading: () => void;
|
|
116
|
-
}
|
|
1
|
+
import { AggregatedLoadingObservable, Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
+
import { AdditionalProductConfiguration, CatalogueParams, MtrlApplication, Prices, Transform } from "./CatalogueAPI.js";
|
|
3
|
+
import { _CfgFeatureInternal } from "./productConfiguration/CfgFeature.js";
|
|
4
|
+
import { ProductConfigurationBubbleMode } from "./productConfiguration/CfgOption.js";
|
|
5
|
+
import { CfgProductConfiguration } from "./productConfiguration/CfgProductConfiguration.js";
|
|
6
|
+
import { ProductLoader } from "./productLoader.js";
|
|
7
|
+
import { CfgProductData, RootNodeSource } from "./utilitiesCatalogueData.js";
|
|
8
|
+
export declare type CfgProductChangeNotification = {
|
|
9
|
+
freshRef: CfgProduct;
|
|
10
|
+
};
|
|
11
|
+
export declare type CfgProductSettings = {
|
|
12
|
+
strictSelectOneSelectionCount: boolean;
|
|
13
|
+
strictSetApiSelectionMatch: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare enum CfgProductBubbleMode {
|
|
16
|
+
Stop = "Stop",
|
|
17
|
+
OneLevel = "OneLevel",
|
|
18
|
+
ToRoot = "ToRoot",
|
|
19
|
+
ToRootAndBubbleSelected = "ToRootAndBubbleSelected"
|
|
20
|
+
}
|
|
21
|
+
export declare type CfgPrice = {
|
|
22
|
+
basePrice: number;
|
|
23
|
+
listPrice: number;
|
|
24
|
+
currency: string;
|
|
25
|
+
fractionDigits: number;
|
|
26
|
+
};
|
|
27
|
+
export declare class _CfgProductInternal {
|
|
28
|
+
readonly _productLoaderRaw: ProductLoader;
|
|
29
|
+
readonly lang: string;
|
|
30
|
+
readonly catId: CatalogueParams;
|
|
31
|
+
readonly partNumber: string;
|
|
32
|
+
readonly settings: CfgProductSettings;
|
|
33
|
+
readonly uuid: string;
|
|
34
|
+
private _rawProductData;
|
|
35
|
+
readonly loadingObservable: AggregatedLoadingObservable;
|
|
36
|
+
readonly refKey: string | undefined;
|
|
37
|
+
readonly refDescription: string | undefined;
|
|
38
|
+
readonly parent: _CfgProductInternal | undefined;
|
|
39
|
+
readonly transform: Transform | undefined;
|
|
40
|
+
static make: (productLoaderRaw: ProductLoader, productLoaderForGroupedLoad: ProductLoader | undefined, lang: string, catId: CatalogueParams, partNumber: string, settings: CfgProductSettings, optional: boolean, loadingObservable: AggregatedLoadingObservable, refKey: string | undefined, refDescription: string | undefined, parent: _CfgProductInternal | undefined, root: _CfgProductInternal | undefined, transform: Transform | undefined) => Promise<_CfgProductInternal>;
|
|
41
|
+
private constructor();
|
|
42
|
+
readonly root: _CfgProductInternal;
|
|
43
|
+
private _destroyed;
|
|
44
|
+
readonly key: string;
|
|
45
|
+
readonly additionalProducts: CfgProduct[];
|
|
46
|
+
private _selected;
|
|
47
|
+
private _configuration;
|
|
48
|
+
readonly changeObservable: Observable<CfgProductChangeNotification>;
|
|
49
|
+
get selected(): boolean;
|
|
50
|
+
readonly isAdditionalProduct: boolean;
|
|
51
|
+
clone(parent?: _CfgProductInternal, root?: _CfgProductInternal): Promise<_CfgProductInternal>;
|
|
52
|
+
destroy: () => void;
|
|
53
|
+
get description(): string | undefined;
|
|
54
|
+
get rootNodeSources(): RootNodeSource[] | undefined;
|
|
55
|
+
get mtrlApplications(): MtrlApplication[] | undefined;
|
|
56
|
+
get currency(): string;
|
|
57
|
+
get fractionDigits(): number;
|
|
58
|
+
get prices(): Prices | undefined;
|
|
59
|
+
get aggregatedPrice(): CfgPrice;
|
|
60
|
+
get optional(): boolean;
|
|
61
|
+
setSelected(v: boolean, bubbleMode: CfgProductBubbleMode): Promise<boolean>;
|
|
62
|
+
get configuration(): CfgProductConfiguration;
|
|
63
|
+
get rawProductData(): CfgProductData;
|
|
64
|
+
_notifyAllOfChange: (bubbleMode: CfgProductBubbleMode) => Promise<void>;
|
|
65
|
+
private _childHasChanged;
|
|
66
|
+
_additionalProductHasChanged: (freshRef: CfgProduct, bubbleMode: CfgProductBubbleMode) => Promise<void>;
|
|
67
|
+
_configurationHasChanged: (freshRef: CfgProductConfiguration, bubbleMode: ProductConfigurationBubbleMode) => Promise<void>;
|
|
68
|
+
getApiSelection: () => AdditionalProductConfiguration;
|
|
69
|
+
setApiSelection: (s: AdditionalProductConfiguration, doValidate: boolean, productLoaderForGroupedLoad?: ProductLoader | undefined) => Promise<boolean>;
|
|
70
|
+
structureCompare: (other: _CfgProductInternal, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
71
|
+
tryMatchSelection: (other: _CfgProductInternal, descriptionMatch?: boolean, productLoaderForGroupedLoad?: ProductLoader | undefined) => Promise<boolean>;
|
|
72
|
+
_getDescendantFeaturesWithCode: (code: string) => _CfgFeatureInternal[];
|
|
73
|
+
private _revalidateInProgressToken;
|
|
74
|
+
_revalidate: (bubbleMode: CfgProductBubbleMode, productLoaderForGroupedLoad: ProductLoader) => Promise<boolean>;
|
|
75
|
+
_syncAndLoadAdditionalProducts: (productLoaderForGroupedLoad: ProductLoader) => Promise<boolean>;
|
|
76
|
+
}
|
|
77
|
+
export declare class CfgProduct {
|
|
78
|
+
readonly _internal: _CfgProductInternal;
|
|
79
|
+
static make: (productLoader: ProductLoader, lang: string, catId: CatalogueParams, partNumber: string, settings?: Partial<CfgProductSettings> | undefined) => Promise<CfgProduct>;
|
|
80
|
+
static _makeNewRefFrom: (source: _CfgProductInternal) => CfgProduct;
|
|
81
|
+
private constructor();
|
|
82
|
+
isBackedBySame: (other: CfgProduct) => boolean;
|
|
83
|
+
destroy: () => void;
|
|
84
|
+
clone: () => Promise<CfgProduct>;
|
|
85
|
+
get key(): string;
|
|
86
|
+
get refKey(): string | undefined;
|
|
87
|
+
get lang(): string;
|
|
88
|
+
get catId(): CatalogueParams;
|
|
89
|
+
get partNumber(): string;
|
|
90
|
+
get isAdditionalProduct(): boolean;
|
|
91
|
+
get optional(): boolean;
|
|
92
|
+
get selected(): boolean;
|
|
93
|
+
setSelected: (v: boolean) => Promise<boolean>;
|
|
94
|
+
get rawProductData(): CfgProductData;
|
|
95
|
+
get uuid(): string;
|
|
96
|
+
get sku(): string;
|
|
97
|
+
get styleNr(): string;
|
|
98
|
+
get preview(): string | undefined;
|
|
99
|
+
get description(): string | undefined;
|
|
100
|
+
get additionalProducts(): CfgProduct[];
|
|
101
|
+
get configuration(): CfgProductConfiguration;
|
|
102
|
+
get transform(): Transform | undefined;
|
|
103
|
+
get currency(): string;
|
|
104
|
+
get fractionDigits(): number;
|
|
105
|
+
get aggregatedPrice(): CfgPrice;
|
|
106
|
+
structureCompare: (other: CfgProduct, strictOrder?: boolean, descriptionMatch?: boolean) => boolean;
|
|
107
|
+
tryMatchSelection: (other: CfgProduct, descriptionMatch?: boolean) => Promise<boolean>;
|
|
108
|
+
getApiSelection: () => AdditionalProductConfiguration;
|
|
109
|
+
setApiSelection: (s: AdditionalProductConfiguration, doValidate?: boolean) => Promise<boolean>;
|
|
110
|
+
listenForChange: (l: SingleArgCallback<CfgProductChangeNotification>) => void;
|
|
111
|
+
stopListenForChange: (l: SingleArgCallback<CfgProductChangeNotification>) => void;
|
|
112
|
+
stopAllListenForChange: () => void;
|
|
113
|
+
listenForLoading: (l: SingleArgCallback<boolean>) => void;
|
|
114
|
+
stopListenForLoading: (l: SingleArgCallback<boolean>) => void;
|
|
115
|
+
stopAllListenForLoading: () => void;
|
|
116
|
+
}
|
|
117
117
|
//# sourceMappingURL=CfgProduct.d.ts.map
|