@webiny/react-composition 5.34.0-beta.2 → 5.34.1-beta.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.
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
2
|
import { ComposableFC, HigherOrderComponent } from "./index";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a component which, when mounted, registers a Higher Order Component for the given base component.
|
|
5
|
+
* This is particularly useful for decorating (wrapping) existing composable components.
|
|
6
|
+
* For more information, visit https://www.webiny.com/docs/admin-area/basics/framework.
|
|
7
|
+
*/
|
|
3
8
|
export declare function createComponentPlugin<T extends ComposableFC<ComponentProps<T>>>(Base: T, hoc: HigherOrderComponent<ComponentProps<T>>): React.FC;
|
package/createComponentPlugin.js
CHANGED
|
@@ -11,6 +11,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _index = require("./index");
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Creates a component which, when mounted, registers a Higher Order Component for the given base component.
|
|
16
|
+
* This is particularly useful for decorating (wrapping) existing composable components.
|
|
17
|
+
* For more information, visit https://www.webiny.com/docs/admin-area/basics/framework.
|
|
18
|
+
*/
|
|
14
19
|
function createComponentPlugin(Base, hoc) {
|
|
15
20
|
var ComponentPlugin = function ComponentPlugin() {
|
|
16
21
|
return /*#__PURE__*/_react.default.createElement(_index.Compose, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createComponentPlugin","Base","hoc","ComponentPlugin","displayName"],"sources":["createComponentPlugin.tsx"],"sourcesContent":["import React, { ComponentProps } from \"react\";\nimport { ComposableFC, Compose, HigherOrderComponent } from \"./index\";\n\nexport function createComponentPlugin<T extends ComposableFC<ComponentProps<T>>>(\n Base: T,\n hoc: HigherOrderComponent<ComponentProps<T>>\n): React.FC {\n const ComponentPlugin = () => <Compose component={Base} with={hoc} />;\n ComponentPlugin.displayName = Base.displayName;\n return ComponentPlugin;\n}\n"],"mappings":";;;;;;;;;AAAA;;AACA;;
|
|
1
|
+
{"version":3,"names":["createComponentPlugin","Base","hoc","ComponentPlugin","displayName"],"sources":["createComponentPlugin.tsx"],"sourcesContent":["import React, { ComponentProps } from \"react\";\nimport { ComposableFC, Compose, HigherOrderComponent } from \"./index\";\n\n/**\n * Creates a component which, when mounted, registers a Higher Order Component for the given base component.\n * This is particularly useful for decorating (wrapping) existing composable components.\n * For more information, visit https://www.webiny.com/docs/admin-area/basics/framework.\n */\nexport function createComponentPlugin<T extends ComposableFC<ComponentProps<T>>>(\n Base: T,\n hoc: HigherOrderComponent<ComponentProps<T>>\n): React.FC {\n const ComponentPlugin = () => <Compose component={Base} with={hoc} />;\n ComponentPlugin.displayName = Base.displayName;\n return ComponentPlugin;\n}\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAT,CACHC,IADG,EAEHC,GAFG,EAGK;EACR,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;IAAA,oBAAM,6BAAC,cAAD;MAAS,SAAS,EAAEF,IAApB;MAA0B,IAAI,EAAEC;IAAhC,EAAN;EAAA,CAAxB;;EACAC,eAAe,CAACC,WAAhB,GAA8BH,IAAI,CAACG,WAAnC;EACA,OAAOD,eAAP;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/react-composition",
|
|
3
|
-
"version": "5.34.
|
|
3
|
+
"version": "5.34.1-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@babel/core": "^7.19.3",
|
|
26
26
|
"@babel/preset-env": "^7.19.4",
|
|
27
27
|
"@babel/preset-typescript": "^7.18.6",
|
|
28
|
-
"@webiny/cli": "^5.34.
|
|
29
|
-
"@webiny/project-utils": "^5.34.
|
|
28
|
+
"@webiny/cli": "^5.34.1-beta.0",
|
|
29
|
+
"@webiny/project-utils": "^5.34.1-beta.0",
|
|
30
30
|
"ttypescript": "^1.5.13",
|
|
31
31
|
"typescript": "4.7.4"
|
|
32
32
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"build": "yarn webiny run build",
|
|
39
39
|
"watch": "yarn webiny run watch"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "c893b6c771e45d4b2ea13da4f17455abdaef8239"
|
|
42
42
|
}
|