@nascentdigital/funnel-core 5.0.1 → 5.0.2
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.
|
@@ -4,6 +4,7 @@ export type RegionsConfig<TRegion extends string = string> = {
|
|
|
4
4
|
fallback: TRegion;
|
|
5
5
|
urlTruncation: RegionsConfig.UrlTruncation;
|
|
6
6
|
mergedRoutes?: boolean;
|
|
7
|
+
liveRoutesOnly?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare namespace RegionsConfig {
|
|
9
10
|
type RegionConfig = {
|
|
@@ -24,6 +25,7 @@ export declare namespace RegionsConfig {
|
|
|
24
25
|
function parse<TRegion extends string = string>(regionalization: RegionsConfig, value: string | undefined): TRegion;
|
|
25
26
|
function getRegionConfig<TRegion extends string = string>(regionalization: RegionsConfig, region: TRegion): RegionConfig;
|
|
26
27
|
function getLocales<TRegion extends string = string>(regionalization: RegionsConfig): [TRegion, Language][];
|
|
28
|
+
function getLocaleParams<TRegion extends string = string>(regionalization: RegionsConfig): Locale.Params<TRegion>[];
|
|
27
29
|
function getLanguages(regionalization: RegionsConfig): Language[];
|
|
28
30
|
/**
|
|
29
31
|
* Given a config for all regions, return the default region. If the default region is set through cookies, we use
|
|
@@ -72,6 +72,11 @@ var RegionsConfig;
|
|
|
72
72
|
.filter(utils_1.Value.isDefined);
|
|
73
73
|
}
|
|
74
74
|
RegionsConfig.getLocales = getLocales;
|
|
75
|
+
function getLocaleParams(regionalization) {
|
|
76
|
+
return getLocales(regionalization)
|
|
77
|
+
.map(([region, language]) => ({ region: region, language }));
|
|
78
|
+
}
|
|
79
|
+
RegionsConfig.getLocaleParams = getLocaleParams;
|
|
75
80
|
function getLanguages(regionalization) {
|
|
76
81
|
return Object.values(regionalization.regions).reduce((languages, regionConfig) => {
|
|
77
82
|
// add missing languages
|
|
@@ -16,6 +16,7 @@ const LinkedData_1 = require("./LinkedData");
|
|
|
16
16
|
// class
|
|
17
17
|
class LinkedPage {
|
|
18
18
|
constructor(args) {
|
|
19
|
+
console.debug('[LinkedPage/new] creating with', args);
|
|
19
20
|
// set instance variables
|
|
20
21
|
this._data = args.data;
|
|
21
22
|
this._linkedStore = args.linkedStore;
|
|
@@ -76,6 +77,7 @@ class LinkedPage {
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
static async create(args) {
|
|
80
|
+
console.debug('[LinkedPage/create] called with', args);
|
|
79
81
|
// find and resolve all dynamic references
|
|
80
82
|
const dynamicRefs = LinkedData_1.LinkedData.findDynamicRefs(args.data);
|
|
81
83
|
const dynamic = await LinkedData_1.LinkedData.resolveDynamicRefs({ dynamicRefs, resolvers: args.resolvers });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nascentdigital/funnel-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/nascentdigital/funnel.git",
|
|
6
6
|
"directory": "libs/core"
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"jest-tsd": "^0.2.2",
|
|
66
66
|
"ts-jest": "^29.3.2"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "24d9690cf813052f6561c3ccef11c7cf69ad7f7c"
|
|
69
69
|
}
|