@evlop/commons 1.0.250 → 1.0.251
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/src/edl/index.d.ts +9 -5
- package/dist/src/edl/index.d.ts.map +1 -1
- package/dist/src/edl/index.js +15 -3
- package/dist/src/edl/index.js.map +1 -1
- package/dist/src/reducers/fonts.d.ts.map +1 -1
- package/dist/src/reducers/fonts.js +0 -3
- package/dist/src/reducers/fonts.js.map +1 -1
- package/package.json +1 -1
package/dist/src/edl/index.d.ts
CHANGED
@@ -16,12 +16,16 @@ declare function registerRenderContextVariables(newContextValues: RenderContextS
|
|
16
16
|
declare function registerRenderContextScope(scope: RenderContextScope): void;
|
17
17
|
declare function registerRenderContextScopes(scopes: RenderContextScope[]): void;
|
18
18
|
declare function setOptions(newOptions: EDLOptions): void;
|
19
|
+
interface RenderEDLProps {
|
20
|
+
edl: string;
|
21
|
+
data: any;
|
22
|
+
dataSources: {
|
23
|
+
[key: string]: any;
|
24
|
+
};
|
25
|
+
scopes?: RenderContextScope[];
|
26
|
+
}
|
19
27
|
export declare const EDL: {
|
20
|
-
Render: ({ edl, data: _data, dataSources }:
|
21
|
-
edl: any;
|
22
|
-
data: any;
|
23
|
-
dataSources: any;
|
24
|
-
}) => React.JSX.Element;
|
28
|
+
Render: ({ edl, data: _data, dataSources, scopes }: RenderEDLProps) => React.JSX.Element;
|
25
29
|
registerElement: typeof registerElement;
|
26
30
|
registerElements: typeof registerElements;
|
27
31
|
registerContextValue: typeof registerRenderContextVariable;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAiB9D,aAAK,yBAAyB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAA;AAOD,aAAK,kBAAkB,GAAG,MAAM,GAAG,CAAC,S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AS,2BAA2B,CAAC,MAAM,EAAE,kBAAkB,EAAE,QAEhE;AAED,iBAAS,UAAU,CAAC,UAAU,EAAE,UAAU,QAEzC;AAUD,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC;IACV,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAsED,eAAO,MAAM,GAAG;wDApE4C,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;CAiFzE,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
package/dist/src/edl/index.js
CHANGED
@@ -93,7 +93,7 @@ const edlBlockRenderer = new BlockRenderer_1.default(edlElements, options);
|
|
93
93
|
* @type {React.FC<JsxRendererComponentProps>}
|
94
94
|
*/
|
95
95
|
const parseEDLMemoized = lodash_1.memoize(edl => parser_1.default(edl, renderContextVariables));
|
96
|
-
const RenderEDL = ({ edl, data: _data, dataSources }) => {
|
96
|
+
const RenderEDL = ({ edl, data: _data, dataSources, scopes }) => {
|
97
97
|
const scope = hooks_1.useScope();
|
98
98
|
const actionable = hooks_1.useActionable();
|
99
99
|
const blocks = react_1.useMemo(() => parseEDLMemoized(edl), [edl]);
|
@@ -116,6 +116,18 @@ const RenderEDL = ({ edl, data: _data, dataSources }) => {
|
|
116
116
|
_setState(currentState => ({ ...currentState, ...newStates }));
|
117
117
|
}, []);
|
118
118
|
const renderData = react_1.useMemo(() => ({ ..._data, ...datasourceData }), [_data, datasourceData]);
|
119
|
+
const _scopeDefinitions = react_1.useMemo(() => {
|
120
|
+
return lodash_1.reduce(scopes, (acc, renderContextScope) => {
|
121
|
+
if (Array.isArray(renderContextScope)) {
|
122
|
+
const [scopeName, variableName] = renderContextScope;
|
123
|
+
acc[variableName] = scope[scopeName];
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
acc[renderContextScope] = scope[renderContextScope];
|
127
|
+
}
|
128
|
+
return acc;
|
129
|
+
}, { ...renderContextScopes });
|
130
|
+
}, [scopes]);
|
119
131
|
const renderContext = react_1.useMemo(() => lodash_1.assign({}, scope, {
|
120
132
|
setState: setState,
|
121
133
|
setStates,
|
@@ -126,9 +138,9 @@ const RenderEDL = ({ edl, data: _data, dataSources }) => {
|
|
126
138
|
context: scope,
|
127
139
|
setRuntimeData,
|
128
140
|
...renderContextStaticValues,
|
141
|
+
...lodash_1.mapValues(_scopeDefinitions, scopeName => scope[scopeName]),
|
129
142
|
...runtimeData,
|
130
|
-
|
131
|
-
}), [scope, setState, runtimeData, setRuntimeData, state, renderData]);
|
143
|
+
}), [scope, setState, runtimeData, setRuntimeData, state, renderData, _scopeDefinitions]);
|
132
144
|
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]);
|
133
145
|
const renderedBlocks = react_1.useMemo(() => edlBlockRenderer.renderBlocks(blocks, renderContext, null), [blocks, renderContext]);
|
134
146
|
return react_1.useMemo(() => react_1.default.createElement(EDLContext_1.EDLProvider, { value: { setRuntimeData }, children: [...dataSourceLoaders, ...renderedBlocks] }), [dataSourceLoaders, renderedBlocks]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiE;AACjE,+CAA8D;AAC9D,0EAAkD;AAClD,0DAAsC;AACtC,oEAA+C;AAC/C,sDAAgC;AAChC,wCAAyC;AACzC,oCAAmD;AACnD,kEAA0C;AAC1C,uDAAqD;AACrD,MAAM,MAAM,GAAG,OAAO,CA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AAC;AACrE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,UAAU,IAAI;IACV,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAC,IAAI,GAAG,MAAM;;;EAK9C;;
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,UAAU,IAAI;IACV,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAC,IAAI,GAAG,MAAM;;;EAK9C;;AAeD,wBA6CC"}
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.activateFont = exports.registerAppFonts = exports.registerWebFonts = exports.LOAD_GOOGLE_FONTS_FAILED = exports.LOAD_GOOGLE_FONTS_SUCCESS = exports.LOAD_GOOGLE_FONTS_STARTED = exports.ACTIVATE_FONT = exports.REGISTER_APP_FONTS = exports.REGISTER_WEB_FONTS = void 0;
|
7
|
-
const lodash_1 = require("lodash");
|
8
7
|
const googleFonts_1 = __importDefault(require("../constants/googleFonts"));
|
9
8
|
exports.REGISTER_WEB_FONTS = 'REGISTER_WEB_FONTS';
|
10
9
|
exports.REGISTER_APP_FONTS = 'REGISTER_APP_FONTS';
|
@@ -51,7 +50,6 @@ exports.default = (state = initialState, action) => {
|
|
51
50
|
...state.webFonts,
|
52
51
|
...action.fonts
|
53
52
|
];
|
54
|
-
lodash_1.assign(newWebFonts, lodash_1.keyBy(newWebFonts, 'family'));
|
55
53
|
return {
|
56
54
|
...state,
|
57
55
|
webFonts: newWebFonts,
|
@@ -62,7 +60,6 @@ exports.default = (state = initialState, action) => {
|
|
62
60
|
...state.appFonts,
|
63
61
|
...action.fonts
|
64
62
|
];
|
65
|
-
lodash_1.assign(newAppFonts, lodash_1.keyBy(newAppFonts, 'family'));
|
66
63
|
return {
|
67
64
|
...state,
|
68
65
|
appFonts: newAppFonts,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":";;;;;;
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":";;;;;;AACA,2EAAmD;AAEtC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,aAAa,GAAG,eAAe,CAAC;AAEhC,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AAQnE,SAAgB,gBAAgB,CAAC,KAAY;IACzC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,KAAK;KACR,CAAC;AACN,CAAC;AALD,4CAKC;AAED,SAAgB,gBAAgB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