@configura/web-api 2.1.0-alpha.2 → 2.1.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 +329 -329
- package/dist/CfgMeasure.d.ts +32 -32
- package/dist/CfgMeasure.js +30 -30
- package/dist/CfgProduct.d.ts +344 -344
- package/dist/CfgProduct.js +990 -990
- 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 +137 -137
- 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 +129 -129
- package/dist/productConfiguration/CfgProductConfiguration.js +346 -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 +51 -51
- package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -17
- package/dist/productConfiguration/utilitiesProductConfiguration.js +87 -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,27 +1,27 @@
|
|
|
1
|
-
import { DtoCatalogueParamsWithCidAndLang, DtoProductParamsWithCidAndLang } from "./CatalogueAPI";
|
|
2
|
-
/**
|
|
3
|
-
* These methods aims to provide a default suggested way of building
|
|
4
|
-
* URLs to Products and Catalogues. By using consistent URL:s copy-paste
|
|
5
|
-
* between systems becomes easy and this can aid when debugging.
|
|
6
|
-
* Using this format on URL is no requirement. In fact, most of our
|
|
7
|
-
* integrators do not, as they do not expose the Catalogue-path.
|
|
8
|
-
* Internally at Configura we try to stick with this format.
|
|
9
|
-
*/
|
|
10
|
-
export declare class CfgReferencePathHelper {
|
|
11
|
-
/**
|
|
12
|
-
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
13
|
-
* @param browsingRootUrl The URL where Stage browsing begins
|
|
14
|
-
* @param catParams What catalogue to generate URL for.
|
|
15
|
-
* @returns An URL to a catalogue
|
|
16
|
-
*/
|
|
17
|
-
static getCataloguePath: (browsingRootUrl: string, catParams: DtoCatalogueParamsWithCidAndLang) => string;
|
|
18
|
-
/**
|
|
19
|
-
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
20
|
-
* @param browsingRootUrl The URL where Stage browsing begins
|
|
21
|
-
* @param productParams What product to generate URL for.
|
|
22
|
-
* @param separator Optional, defaults to "product", but can be changed to indicate another function.
|
|
23
|
-
* @returns An URL to a product
|
|
24
|
-
*/
|
|
25
|
-
static getProductPath: (browsingRootUrl: string, productParams: DtoProductParamsWithCidAndLang, separator?: string) => string;
|
|
26
|
-
}
|
|
1
|
+
import { DtoCatalogueParamsWithCidAndLang, DtoProductParamsWithCidAndLang } from "./CatalogueAPI";
|
|
2
|
+
/**
|
|
3
|
+
* These methods aims to provide a default suggested way of building
|
|
4
|
+
* URLs to Products and Catalogues. By using consistent URL:s copy-paste
|
|
5
|
+
* between systems becomes easy and this can aid when debugging.
|
|
6
|
+
* Using this format on URL is no requirement. In fact, most of our
|
|
7
|
+
* integrators do not, as they do not expose the Catalogue-path.
|
|
8
|
+
* Internally at Configura we try to stick with this format.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CfgReferencePathHelper {
|
|
11
|
+
/**
|
|
12
|
+
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
13
|
+
* @param browsingRootUrl The URL where Stage browsing begins
|
|
14
|
+
* @param catParams What catalogue to generate URL for.
|
|
15
|
+
* @returns An URL to a catalogue
|
|
16
|
+
*/
|
|
17
|
+
static getCataloguePath: (browsingRootUrl: string, catParams: DtoCatalogueParamsWithCidAndLang) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
20
|
+
* @param browsingRootUrl The URL where Stage browsing begins
|
|
21
|
+
* @param productParams What product to generate URL for.
|
|
22
|
+
* @param separator Optional, defaults to "product", but can be changed to indicate another function.
|
|
23
|
+
* @returns An URL to a product
|
|
24
|
+
*/
|
|
25
|
+
static getProductPath: (browsingRootUrl: string, productParams: DtoProductParamsWithCidAndLang, separator?: string) => string;
|
|
26
|
+
}
|
|
27
27
|
//# sourceMappingURL=CfgReferencePathHelper.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { encodeURIComponents } from "@configura/web-utilities";
|
|
2
|
-
/**
|
|
3
|
-
* These methods aims to provide a default suggested way of building
|
|
4
|
-
* URLs to Products and Catalogues. By using consistent URL:s copy-paste
|
|
5
|
-
* between systems becomes easy and this can aid when debugging.
|
|
6
|
-
* Using this format on URL is no requirement. In fact, most of our
|
|
7
|
-
* integrators do not, as they do not expose the Catalogue-path.
|
|
8
|
-
* Internally at Configura we try to stick with this format.
|
|
9
|
-
*/
|
|
10
|
-
export class CfgReferencePathHelper {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
14
|
-
* @param browsingRootUrl The URL where Stage browsing begins
|
|
15
|
-
* @param catParams What catalogue to generate URL for.
|
|
16
|
-
* @returns An URL to a catalogue
|
|
17
|
-
*/
|
|
18
|
-
CfgReferencePathHelper.getCataloguePath = (browsingRootUrl, catParams) => `${browsingRootUrl}/${encodeURIComponents(catParams.cid, catParams.lang, catParams.enterprise, catParams.prdCat, catParams.prdCatVersion, catParams.vendor, catParams.priceList)}`;
|
|
19
|
-
/**
|
|
20
|
-
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
21
|
-
* @param browsingRootUrl The URL where Stage browsing begins
|
|
22
|
-
* @param productParams What product to generate URL for.
|
|
23
|
-
* @param separator Optional, defaults to "product", but can be changed to indicate another function.
|
|
24
|
-
* @returns An URL to a product
|
|
25
|
-
*/
|
|
26
|
-
CfgReferencePathHelper.getProductPath = (browsingRootUrl, productParams, separator = "product") => `${CfgReferencePathHelper.getCataloguePath(browsingRootUrl, productParams)}/${separator}/${encodeURIComponent(productParams.partNumber)}`;
|
|
1
|
+
import { encodeURIComponents } from "@configura/web-utilities";
|
|
2
|
+
/**
|
|
3
|
+
* These methods aims to provide a default suggested way of building
|
|
4
|
+
* URLs to Products and Catalogues. By using consistent URL:s copy-paste
|
|
5
|
+
* between systems becomes easy and this can aid when debugging.
|
|
6
|
+
* Using this format on URL is no requirement. In fact, most of our
|
|
7
|
+
* integrators do not, as they do not expose the Catalogue-path.
|
|
8
|
+
* Internally at Configura we try to stick with this format.
|
|
9
|
+
*/
|
|
10
|
+
export class CfgReferencePathHelper {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
14
|
+
* @param browsingRootUrl The URL where Stage browsing begins
|
|
15
|
+
* @param catParams What catalogue to generate URL for.
|
|
16
|
+
* @returns An URL to a catalogue
|
|
17
|
+
*/
|
|
18
|
+
CfgReferencePathHelper.getCataloguePath = (browsingRootUrl, catParams) => `${browsingRootUrl}/${encodeURIComponents(catParams.cid, catParams.lang, catParams.enterprise, catParams.prdCat, catParams.prdCatVersion, catParams.vendor, catParams.priceList)}`;
|
|
19
|
+
/**
|
|
20
|
+
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
21
|
+
* @param browsingRootUrl The URL where Stage browsing begins
|
|
22
|
+
* @param productParams What product to generate URL for.
|
|
23
|
+
* @param separator Optional, defaults to "product", but can be changed to indicate another function.
|
|
24
|
+
* @returns An URL to a product
|
|
25
|
+
*/
|
|
26
|
+
CfgReferencePathHelper.getProductPath = (browsingRootUrl, productParams, separator = "product") => `${CfgReferencePathHelper.getCataloguePath(browsingRootUrl, productParams)}/${separator}/${encodeURIComponent(productParams.partNumber)}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export * from "./CatalogueAPI.js";
|
|
2
|
-
export * from "./CfgProduct.js";
|
|
3
|
-
export * from "./CfgReferencePathHelper.js";
|
|
4
|
-
export * from "./io/index.js";
|
|
5
|
-
export * from "./material/CfgMaterialMapping.js";
|
|
6
|
-
export * from "./material/CfgMtrlApplication.js";
|
|
7
|
-
export * from "./material/CfgMtrlApplicationSource.js";
|
|
8
|
-
export * from "./material/CfgMtrlSource.js";
|
|
9
|
-
export * from "./material/CfgMtrlSourceWithMetaData.js";
|
|
10
|
-
export * from "./productConfiguration/CfgFeature.js";
|
|
11
|
-
export * from "./productConfiguration/CfgOption.js";
|
|
12
|
-
export * from "./productConfiguration/CfgProductConfiguration.js";
|
|
13
|
-
export * from "./productConfiguration/filters.js";
|
|
14
|
-
export * from "./productConfiguration/productParamsGenerator.js";
|
|
15
|
-
export * from "./productLoader.js";
|
|
16
|
-
export * from "./syncGroups/SyncGroupsApplyMode.js";
|
|
17
|
-
export * from "./syncGroups/SyncGroupsHandler.js";
|
|
18
|
-
export * from "./syncGroups/SyncGroupsPathHelper.js";
|
|
19
|
-
export * from "./tasks/formats.js";
|
|
20
|
-
export * from "./tasks/TaskHandler.js";
|
|
21
|
-
export * from "./utilitiesCatalogueData.js";
|
|
22
|
-
export * from "./utilitiesCataloguePermission.js";
|
|
23
|
-
export * from "./utilitiesConfiguration.js";
|
|
24
|
-
export * from "./utilitiesNumericValues.js";
|
|
1
|
+
export * from "./CatalogueAPI.js";
|
|
2
|
+
export * from "./CfgProduct.js";
|
|
3
|
+
export * from "./CfgReferencePathHelper.js";
|
|
4
|
+
export * from "./io/index.js";
|
|
5
|
+
export * from "./material/CfgMaterialMapping.js";
|
|
6
|
+
export * from "./material/CfgMtrlApplication.js";
|
|
7
|
+
export * from "./material/CfgMtrlApplicationSource.js";
|
|
8
|
+
export * from "./material/CfgMtrlSource.js";
|
|
9
|
+
export * from "./material/CfgMtrlSourceWithMetaData.js";
|
|
10
|
+
export * from "./productConfiguration/CfgFeature.js";
|
|
11
|
+
export * from "./productConfiguration/CfgOption.js";
|
|
12
|
+
export * from "./productConfiguration/CfgProductConfiguration.js";
|
|
13
|
+
export * from "./productConfiguration/filters.js";
|
|
14
|
+
export * from "./productConfiguration/productParamsGenerator.js";
|
|
15
|
+
export * from "./productLoader.js";
|
|
16
|
+
export * from "./syncGroups/SyncGroupsApplyMode.js";
|
|
17
|
+
export * from "./syncGroups/SyncGroupsHandler.js";
|
|
18
|
+
export * from "./syncGroups/SyncGroupsPathHelper.js";
|
|
19
|
+
export * from "./tasks/formats.js";
|
|
20
|
+
export * from "./tasks/TaskHandler.js";
|
|
21
|
+
export * from "./utilitiesCatalogueData.js";
|
|
22
|
+
export * from "./utilitiesCataloguePermission.js";
|
|
23
|
+
export * from "./utilitiesConfiguration.js";
|
|
24
|
+
export * from "./utilitiesNumericValues.js";
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * from "./CatalogueAPI.js";
|
|
2
|
-
export * from "./CfgProduct.js";
|
|
3
|
-
export * from "./CfgReferencePathHelper.js";
|
|
4
|
-
export * from "./io/index.js";
|
|
5
|
-
export * from "./material/CfgMaterialMapping.js";
|
|
6
|
-
export * from "./material/CfgMtrlApplication.js";
|
|
7
|
-
export * from "./material/CfgMtrlApplicationSource.js";
|
|
8
|
-
export * from "./material/CfgMtrlSource.js";
|
|
9
|
-
export * from "./material/CfgMtrlSourceWithMetaData.js";
|
|
10
|
-
export * from "./productConfiguration/CfgFeature.js";
|
|
11
|
-
export * from "./productConfiguration/CfgOption.js";
|
|
12
|
-
export * from "./productConfiguration/CfgProductConfiguration.js";
|
|
13
|
-
export * from "./productConfiguration/filters.js";
|
|
14
|
-
export * from "./productConfiguration/productParamsGenerator.js";
|
|
15
|
-
export * from "./productLoader.js";
|
|
16
|
-
export * from "./syncGroups/SyncGroupsApplyMode.js";
|
|
17
|
-
export * from "./syncGroups/SyncGroupsHandler.js";
|
|
18
|
-
export * from "./syncGroups/SyncGroupsPathHelper.js";
|
|
19
|
-
export * from "./tasks/formats.js";
|
|
20
|
-
export * from "./tasks/TaskHandler.js";
|
|
21
|
-
export * from "./utilitiesCatalogueData.js";
|
|
22
|
-
export * from "./utilitiesCataloguePermission.js";
|
|
23
|
-
export * from "./utilitiesConfiguration.js";
|
|
24
|
-
export * from "./utilitiesNumericValues.js";
|
|
1
|
+
export * from "./CatalogueAPI.js";
|
|
2
|
+
export * from "./CfgProduct.js";
|
|
3
|
+
export * from "./CfgReferencePathHelper.js";
|
|
4
|
+
export * from "./io/index.js";
|
|
5
|
+
export * from "./material/CfgMaterialMapping.js";
|
|
6
|
+
export * from "./material/CfgMtrlApplication.js";
|
|
7
|
+
export * from "./material/CfgMtrlApplicationSource.js";
|
|
8
|
+
export * from "./material/CfgMtrlSource.js";
|
|
9
|
+
export * from "./material/CfgMtrlSourceWithMetaData.js";
|
|
10
|
+
export * from "./productConfiguration/CfgFeature.js";
|
|
11
|
+
export * from "./productConfiguration/CfgOption.js";
|
|
12
|
+
export * from "./productConfiguration/CfgProductConfiguration.js";
|
|
13
|
+
export * from "./productConfiguration/filters.js";
|
|
14
|
+
export * from "./productConfiguration/productParamsGenerator.js";
|
|
15
|
+
export * from "./productLoader.js";
|
|
16
|
+
export * from "./syncGroups/SyncGroupsApplyMode.js";
|
|
17
|
+
export * from "./syncGroups/SyncGroupsHandler.js";
|
|
18
|
+
export * from "./syncGroups/SyncGroupsPathHelper.js";
|
|
19
|
+
export * from "./tasks/formats.js";
|
|
20
|
+
export * from "./tasks/TaskHandler.js";
|
|
21
|
+
export * from "./utilitiesCatalogueData.js";
|
|
22
|
+
export * from "./utilitiesCataloguePermission.js";
|
|
23
|
+
export * from "./utilitiesConfiguration.js";
|
|
24
|
+
export * from "./utilitiesNumericValues.js";
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { CfgWindowEventManager } from "./CfgWindowEventManager.js";
|
|
2
|
-
declare type CfgHistoryManagerMessageData = {
|
|
3
|
-
initial: boolean;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* How the history is updated.
|
|
7
|
-
* @param DoNotWrite Only listens to initial URL-values.
|
|
8
|
-
* @param Replace Replaces the current history frame at updates.
|
|
9
|
-
* @param Push Adds history frames at updates.
|
|
10
|
-
* @param ReplaceAndUpdateUrl Replaces the current history frame at updates and updates the browser URL
|
|
11
|
-
* @param PushAndUpdateUrl Adds history frames at updates and updates the browser URL
|
|
12
|
-
*/
|
|
13
|
-
export declare enum HistoryMode {
|
|
14
|
-
DoNotWrite = 0,
|
|
15
|
-
Replace = 1,
|
|
16
|
-
Push = 2,
|
|
17
|
-
ReplaceAndUpdateUrl = 3,
|
|
18
|
-
PushAndUpdateUrl = 4
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* The collected data used when sending. For history this both contains the message, which is
|
|
22
|
-
* used as the "state" in the history-frame, and the qsKeyValues, which are query string
|
|
23
|
-
* key-values used in the URL.
|
|
24
|
-
* When navigating back and forth the stage (message) is used to restore the old state. When
|
|
25
|
-
* opening a window with no prior history the Query String will be used.
|
|
26
|
-
*/
|
|
27
|
-
export declare type CfgHistoryManagerSendData<D> = {
|
|
28
|
-
message: D;
|
|
29
|
-
mode: HistoryMode;
|
|
30
|
-
qsKeyValues: Map<string, string | undefined>;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* This class is used to coordinate writing and reading to the browser history.
|
|
34
|
-
* It handles messages sent from the connectors.
|
|
35
|
-
*/
|
|
36
|
-
export declare class CfgHistoryManager extends CfgWindowEventManager<"popstate", CfgHistoryManagerSendData<CfgHistoryManagerMessageData>> {
|
|
37
|
-
private static _instance;
|
|
38
|
-
static get instance(): CfgHistoryManager;
|
|
39
|
-
private constructor();
|
|
40
|
-
private _aggregatedQsKeyValues;
|
|
41
|
-
private _urlUpdateObservable;
|
|
42
|
-
/**
|
|
43
|
-
* @returns The current browser URL updated with the latest updates from
|
|
44
|
-
* the Connectors.
|
|
45
|
-
*/
|
|
46
|
-
getUrl(): string;
|
|
47
|
-
/**
|
|
48
|
-
* Listen for updated URL:s. This doesn't have to mean the URL in the
|
|
49
|
-
* browser has been updated.
|
|
50
|
-
*/
|
|
51
|
-
listenForUrl(listener: (url: string) => void): void;
|
|
52
|
-
/**
|
|
53
|
-
* Stop listen.
|
|
54
|
-
*/
|
|
55
|
-
stopListenForUrl(listener: (url: string) => void): void;
|
|
56
|
-
/**
|
|
57
|
-
* Write to the history
|
|
58
|
-
*/
|
|
59
|
-
send(messageKey: string, data: CfgHistoryManagerSendData<CfgHistoryManagerMessageData>): void;
|
|
60
|
-
/**
|
|
61
|
-
* Takes the current in browser URL and updates it with the provided Query String values.
|
|
62
|
-
* Old Query String is replaced.
|
|
63
|
-
*/
|
|
64
|
-
private static _makeUpdatedUrl;
|
|
65
|
-
/**
|
|
66
|
-
* Returns the current in browser Query String updated with the key values provided.
|
|
67
|
-
* If a value is undefined in the passed map it will be deleted from the Query String.
|
|
68
|
-
*/
|
|
69
|
-
private static _makeUpdatedQueryString;
|
|
70
|
-
/**
|
|
71
|
-
* @returns The current in browser Query String as a Map
|
|
72
|
-
*/
|
|
73
|
-
static currentQsKeyValues(): Map<string, string>;
|
|
74
|
-
/**
|
|
75
|
-
* If the passed currentState is a CfgIOContainer it will update it with the
|
|
76
|
-
* passed message. If not it will create a new CfgIOContainer with the message.
|
|
77
|
-
*/
|
|
78
|
-
private static _makeUpdatedState;
|
|
79
|
-
protected readonly eventType = "popstate";
|
|
80
|
-
protected getDataFromEvent(event: PopStateEvent): unknown;
|
|
81
|
-
static getMessageFromCurrentHistoryState(messageKey: string): unknown | undefined;
|
|
82
|
-
}
|
|
83
|
-
export {};
|
|
1
|
+
import { CfgWindowEventManager } from "./CfgWindowEventManager.js";
|
|
2
|
+
declare type CfgHistoryManagerMessageData = {
|
|
3
|
+
initial: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* How the history is updated.
|
|
7
|
+
* @param DoNotWrite Only listens to initial URL-values.
|
|
8
|
+
* @param Replace Replaces the current history frame at updates.
|
|
9
|
+
* @param Push Adds history frames at updates.
|
|
10
|
+
* @param ReplaceAndUpdateUrl Replaces the current history frame at updates and updates the browser URL
|
|
11
|
+
* @param PushAndUpdateUrl Adds history frames at updates and updates the browser URL
|
|
12
|
+
*/
|
|
13
|
+
export declare enum HistoryMode {
|
|
14
|
+
DoNotWrite = 0,
|
|
15
|
+
Replace = 1,
|
|
16
|
+
Push = 2,
|
|
17
|
+
ReplaceAndUpdateUrl = 3,
|
|
18
|
+
PushAndUpdateUrl = 4
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The collected data used when sending. For history this both contains the message, which is
|
|
22
|
+
* used as the "state" in the history-frame, and the qsKeyValues, which are query string
|
|
23
|
+
* key-values used in the URL.
|
|
24
|
+
* When navigating back and forth the stage (message) is used to restore the old state. When
|
|
25
|
+
* opening a window with no prior history the Query String will be used.
|
|
26
|
+
*/
|
|
27
|
+
export declare type CfgHistoryManagerSendData<D> = {
|
|
28
|
+
message: D;
|
|
29
|
+
mode: HistoryMode;
|
|
30
|
+
qsKeyValues: Map<string, string | undefined>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* This class is used to coordinate writing and reading to the browser history.
|
|
34
|
+
* It handles messages sent from the connectors.
|
|
35
|
+
*/
|
|
36
|
+
export declare class CfgHistoryManager extends CfgWindowEventManager<"popstate", CfgHistoryManagerSendData<CfgHistoryManagerMessageData>> {
|
|
37
|
+
private static _instance;
|
|
38
|
+
static get instance(): CfgHistoryManager;
|
|
39
|
+
private constructor();
|
|
40
|
+
private _aggregatedQsKeyValues;
|
|
41
|
+
private _urlUpdateObservable;
|
|
42
|
+
/**
|
|
43
|
+
* @returns The current browser URL updated with the latest updates from
|
|
44
|
+
* the Connectors.
|
|
45
|
+
*/
|
|
46
|
+
getUrl(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Listen for updated URL:s. This doesn't have to mean the URL in the
|
|
49
|
+
* browser has been updated.
|
|
50
|
+
*/
|
|
51
|
+
listenForUrl(listener: (url: string) => void): void;
|
|
52
|
+
/**
|
|
53
|
+
* Stop listen.
|
|
54
|
+
*/
|
|
55
|
+
stopListenForUrl(listener: (url: string) => void): void;
|
|
56
|
+
/**
|
|
57
|
+
* Write to the history
|
|
58
|
+
*/
|
|
59
|
+
send(messageKey: string, data: CfgHistoryManagerSendData<CfgHistoryManagerMessageData>): void;
|
|
60
|
+
/**
|
|
61
|
+
* Takes the current in browser URL and updates it with the provided Query String values.
|
|
62
|
+
* Old Query String is replaced.
|
|
63
|
+
*/
|
|
64
|
+
private static _makeUpdatedUrl;
|
|
65
|
+
/**
|
|
66
|
+
* Returns the current in browser Query String updated with the key values provided.
|
|
67
|
+
* If a value is undefined in the passed map it will be deleted from the Query String.
|
|
68
|
+
*/
|
|
69
|
+
private static _makeUpdatedQueryString;
|
|
70
|
+
/**
|
|
71
|
+
* @returns The current in browser Query String as a Map
|
|
72
|
+
*/
|
|
73
|
+
static currentQsKeyValues(): Map<string, string>;
|
|
74
|
+
/**
|
|
75
|
+
* If the passed currentState is a CfgIOContainer it will update it with the
|
|
76
|
+
* passed message. If not it will create a new CfgIOContainer with the message.
|
|
77
|
+
*/
|
|
78
|
+
private static _makeUpdatedState;
|
|
79
|
+
protected readonly eventType = "popstate";
|
|
80
|
+
protected getDataFromEvent(event: PopStateEvent): unknown;
|
|
81
|
+
static getMessageFromCurrentHistoryState(messageKey: string): unknown | undefined;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
84
84
|
//# sourceMappingURL=CfgHistoryManager.d.ts.map
|