@common-stack/components-pro 7.0.4-alpha.27 → 7.0.4-alpha.28
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/lib/plugin/loader.js
CHANGED
|
@@ -4,10 +4,10 @@ async function PluginsLoader(plugins, loaderContext) {
|
|
|
4
4
|
if (plugin.renderImporter) {
|
|
5
5
|
const module = await plugin.renderImporter();
|
|
6
6
|
const ImportedComponent = module.default;
|
|
7
|
-
if (module.loader && typeof module.loader === 'function') {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
7
|
+
// if (module.loader && typeof module.loader === 'function') {
|
|
8
|
+
// const loaderData = await module.loader(loaderContext);
|
|
9
|
+
// return { ...plugin, Component: ImportedComponent, loaderData };
|
|
10
|
+
// }
|
|
11
11
|
return { ...plugin, Component: ImportedComponent };
|
|
12
12
|
}
|
|
13
13
|
}
|
package/lib/plugin/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sources":["../../src/plugin/loader.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,eAAe,aAAa,CAAC,OAAc,EAAE,aAAsF,EAAA;AACtI,IAAA,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACnC,OAAO,CAAC,GAAG,CAAC,OAAO,MAAW,KAAI;AAC9B,QAAA,IAAI;AACA,YAAA,IAAI,MAAM,CAAC,cAAc,EAAE;AACvB,gBAAA,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,EAAE,CAAC;AAC7C,gBAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"loader.js","sources":["../../src/plugin/loader.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,eAAe,aAAa,CAAC,OAAc,EAAE,aAAsF,EAAA;AACtI,IAAA,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACnC,OAAO,CAAC,GAAG,CAAC,OAAO,MAAW,KAAI;AAC9B,QAAA,IAAI;AACA,YAAA,IAAI,MAAM,CAAC,cAAc,EAAE;AACvB,gBAAA,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,EAAE,CAAC;AAC7C,gBAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC;;;;;gBAMzC,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;aACtD;SACJ;QAAC,OAAO,KAAK,EAAE;AACZ,YAAA,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;SAClD;AACD,QAAA,OAAO,MAAM,CAAC;KACjB,CAAC,CACL,CAAC;AACF,IAAA,OAAO,aAAa,CAAC;AACzB"}
|
|
@@ -2,7 +2,11 @@ import React__default,{useContext}from'react';import {DynamicRender}from'./dynam
|
|
|
2
2
|
return React__default.createElement(React__default.Fragment, null, isFunction(children) ? children(props) : children);
|
|
3
3
|
};
|
|
4
4
|
const PluginRender = (props) => {
|
|
5
|
-
const
|
|
5
|
+
const context = useContext(FillRenderContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error('PluginRender must be used within a FillRenderContext.Provider');
|
|
8
|
+
}
|
|
9
|
+
const { loadedPlugins } = context;
|
|
6
10
|
const FillRender = ({ fill, ...props }) => {
|
|
7
11
|
const plugin = loadedPlugins.find((plugin) => plugin.index === fill.index);
|
|
8
12
|
const loaderData = plugin ? plugin.loaderData : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-render.js","sources":["../../src/plugin/plugin-render.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"+
|
|
1
|
+
{"version":3,"file":"plugin-render.js","sources":["../../src/plugin/plugin-render.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"+LAKO,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAAI;AACrD,IAAA,OAAOA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
4
|
"description": "browser plugin for git",
|
|
5
5
|
"homepage": "https://github.com/cdmbase/fullstack-pro#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"typescript": {
|
|
54
54
|
"definition": "lib/index.d.ts"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "cd5e2a90eada6a941cead717336f4184cf432b01"
|
|
57
57
|
}
|