@financial-times/dotcom-ui-app-context 11.3.0 → 12.0.0
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/dist/browser/client/AppContext.d.ts +1 -1
- package/dist/browser/components/AppContextEmbed.d.ts +1 -2
- package/dist/node/client/AppContext.d.ts +1 -1
- package/dist/node/client/browser.js +2 -3
- package/dist/node/client/loadAppContext.js +2 -2
- package/dist/node/components/AppContextEmbed.d.ts +1 -1
- package/dist/node/components/AppContextEmbed.js +2 -3
- package/dist/node/index.js +5 -1
- package/dist/tsconfig.tsbuildinfo +1 -2931
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TAppContext } from '../types';
|
|
3
|
-
export
|
|
2
|
+
export type TAppContextProps = {
|
|
4
3
|
appContext?: TAppContext;
|
|
5
4
|
};
|
|
6
5
|
export declare function AppContextEmbed({ appContext }: TAppContextProps): import("react").JSX.Element;
|
|
@@ -3,13 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.init =
|
|
6
|
+
exports.init = init;
|
|
7
7
|
const AppContext_1 = __importDefault(require("./AppContext"));
|
|
8
8
|
const loadAppContext_1 = __importDefault(require("./loadAppContext"));
|
|
9
9
|
function init() {
|
|
10
|
-
const appContext = loadAppContext_1.default();
|
|
10
|
+
const appContext = (0, loadAppContext_1.default)();
|
|
11
11
|
const client = new AppContext_1.default({ appContext });
|
|
12
12
|
console.log('Page Kit app context:', client.getAll()); // eslint-disable-line no-console
|
|
13
13
|
return client;
|
|
14
14
|
}
|
|
15
|
-
exports.init = init;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = loadEmbeddedAppContext;
|
|
3
4
|
const dotcom_ui_data_embed_1 = require("@financial-times/dotcom-ui-data-embed");
|
|
4
5
|
const constants_1 = require("../constants");
|
|
5
6
|
function loadEmbeddedAppContext() {
|
|
6
|
-
return dotcom_ui_data_embed_1.loadDataEmbed(constants_1.APP_CONTEXT_ELEMENT_ID);
|
|
7
|
+
return (0, dotcom_ui_data_embed_1.loadDataEmbed)(constants_1.APP_CONTEXT_ELEMENT_ID);
|
|
7
8
|
}
|
|
8
|
-
exports.default = loadEmbeddedAppContext;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppContextEmbed =
|
|
3
|
+
exports.AppContextEmbed = AppContextEmbed;
|
|
4
4
|
const dotcom_ui_data_embed_1 = require("@financial-times/dotcom-ui-data-embed");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
function AppContextEmbed({ appContext }) {
|
|
7
|
-
return dotcom_ui_data_embed_1.DataEmbed({ id: constants_1.APP_CONTEXT_ELEMENT_ID, data: appContext });
|
|
7
|
+
return (0, dotcom_ui_data_embed_1.DataEmbed)({ id: constants_1.APP_CONTEXT_ELEMENT_ID, data: appContext });
|
|
8
8
|
}
|
|
9
|
-
exports.AppContextEmbed = AppContextEmbed;
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|