@evlop/commons 1.0.238 → 1.0.239
Sign up to get free protection for your applications and to get access to all the features.
package/dist/src/edl/index.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
declare function registerElement(name: any, element: any): void;
|
2
3
|
declare function registerRenderContextValue(name: any, value: any): void;
|
3
4
|
export declare const EDL: {
|
@@ -5,7 +6,7 @@ export declare const EDL: {
|
|
5
6
|
edl: any;
|
6
7
|
data: any;
|
7
8
|
dataSources: any;
|
8
|
-
}) =>
|
9
|
+
}) => React.JSX.Element;
|
9
10
|
registerElement: typeof registerElement;
|
10
11
|
registerContextValue: typeof registerRenderContextValue;
|
11
12
|
elements: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAwB9D,iBAAS,eAAe,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,QAErC;AAGD,iBAAS,0BAA0B,CAAC,IAAI,KAAA,EAAE,KAAK,KAAA,QAG9C;AAiED,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAMf,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
package/dist/src/edl/index.js
CHANGED
@@ -32,6 +32,7 @@ const parser_1 = __importDefault(require("./parser"));
|
|
32
32
|
const helpers_1 = require("../helpers");
|
33
33
|
const hooks_1 = require("../hooks");
|
34
34
|
const localStorage_1 = __importDefault(require("./localStorage"));
|
35
|
+
const EDLContext_1 = require("../contexts/EDLContext");
|
35
36
|
const lodash = require('lodash');
|
36
37
|
const edlElements = {
|
37
38
|
...elements_1.default,
|
@@ -94,7 +95,7 @@ const RenderEDL = ({ edl, data: _data, dataSources }) => {
|
|
94
95
|
}), [scope, setState, runtimeData, setRuntimeData, state, renderData]);
|
95
96
|
const dataSourceLoaders = react_1.useMemo(() => lodash_1.map(dataSources, (dataSource, name) => (react_1.default.createElement(DataSourceLoader_1.default, { key: name, name: name, dataSource: dataSource, setDatasourceData: setDatasourceData }))), [dataSources]);
|
96
97
|
const renderedBlocks = react_1.useMemo(() => edlBlockRenderer.renderBlocks(blocks, renderContext, null), [blocks, renderContext]);
|
97
|
-
return react_1.useMemo(() => [...dataSourceLoaders, ...renderedBlocks], [dataSourceLoaders, renderedBlocks]);
|
98
|
+
return react_1.useMemo(() => react_1.default.createElement(EDLContext_1.EDLProvider, { value: { setRuntimeData }, children: [...dataSourceLoaders, ...renderedBlocks] }), [dataSourceLoaders, renderedBlocks]);
|
98
99
|
};
|
99
100
|
exports.EDL = {
|
100
101
|
Render: RenderEDL,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8C;AAC9C,+CAA8D;AAC9D,0EAAkD;AAClD,0DAAsC;AACtC,oEAA+C;AAC/C,sDAAgC;AAChC,wCAAyC;AACzC,oCAAmD;AACnD,kEAA0C;AAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjC,MAAM,WAAW,GAAG;IAChB,GAAG,kBAAY;CAClB,CAAA;AAED,MAAM,mBAAmB,GAAG;IACxB,KAAK,EAAE,qBAAW;IAClB,CAAC,EAAE,MAAM;IACT,YAAY,EAAZ,sBAAY;CACf,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC;AAE9D,qCAAqC;AACrC,SAAS,eAAe,CAAC,IAAI,EAAE,OAAO;IAClC,WAAW,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;AAChC,CAAC;AAED,qCAAqC;AACrC,SAAS,0BAA0B,CAAC,IAAI,EAAE,KAAK;IAC3C,mBAAmB,CAAC,I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