@webiny/app 5.41.4-beta.1 → 5.41.4-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app",
3
- "version": "5.41.4-beta.1",
3
+ "version": "5.41.4-beta.3",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,12 +18,12 @@
18
18
  "@babel/runtime": "7.24.1",
19
19
  "@emotion/styled": "11.10.6",
20
20
  "@types/react": "18.2.79",
21
- "@webiny/i18n": "5.41.4-beta.1",
22
- "@webiny/i18n-react": "5.41.4-beta.1",
23
- "@webiny/plugins": "5.41.4-beta.1",
24
- "@webiny/react-composition": "5.41.4-beta.1",
25
- "@webiny/react-router": "5.41.4-beta.1",
26
- "@webiny/ui": "5.41.4-beta.1",
21
+ "@webiny/i18n": "5.41.4-beta.3",
22
+ "@webiny/i18n-react": "5.41.4-beta.3",
23
+ "@webiny/plugins": "5.41.4-beta.3",
24
+ "@webiny/react-composition": "5.41.4-beta.3",
25
+ "@webiny/react-router": "5.41.4-beta.3",
26
+ "@webiny/ui": "5.41.4-beta.3",
27
27
  "apollo-cache": "1.3.5",
28
28
  "apollo-cache-inmemory": "1.6.6",
29
29
  "apollo-client": "2.6.10",
@@ -53,8 +53,8 @@
53
53
  "@babel/preset-typescript": "7.24.1",
54
54
  "@types/lodash": "4.14.195",
55
55
  "@types/warning": "3.0.0",
56
- "@webiny/cli": "5.41.4-beta.1",
57
- "@webiny/project-utils": "5.41.4-beta.1",
56
+ "@webiny/cli": "5.41.4-beta.3",
57
+ "@webiny/project-utils": "5.41.4-beta.3",
58
58
  "rimraf": "5.0.5",
59
59
  "typescript": "4.9.5"
60
60
  },
@@ -73,5 +73,5 @@
73
73
  ]
74
74
  }
75
75
  },
76
- "gitHead": "ff5f3a2431623ef31920b84e2973e90dedaa9e31"
76
+ "gitHead": "1be3b755403a5151fd830e72ec31c6b83f49e292"
77
77
  }
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
- export interface LegacyPluginToReactComponentParams {
2
+ export interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {
3
3
  pluginType: string;
4
4
  componentDisplayName: string;
5
+ mapProps?: (props: TProps) => TProps;
5
6
  }
6
- export declare const legacyPluginToReactComponent: <TProps extends Record<string, any>>(params: LegacyPluginToReactComponentParams) => React.FunctionComponent<TProps>;
7
+ export declare const legacyPluginToReactComponent: <TProps extends Record<string, any>>(params: LegacyPluginToReactComponentParams<TProps>) => React.FunctionComponent<TProps>;
@@ -1,17 +1,16 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.legacyPluginToReactComponent = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
7
  var _useRegisterLegacyPlugin = require("../hooks/useRegisterLegacyPlugin");
10
8
  var legacyPluginToReactComponent = exports.legacyPluginToReactComponent = function legacyPluginToReactComponent(params) {
11
9
  var Component = function Component(props) {
12
- (0, _useRegisterLegacyPlugin.useRegisterLegacyPlugin)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
10
+ var plugin = Object.assign({
13
11
  type: params.pluginType
14
- }));
12
+ }, params.mapProps ? params.mapProps(props) : props);
13
+ (0, _useRegisterLegacyPlugin.useRegisterLegacyPlugin)(plugin);
15
14
  return null;
16
15
  };
17
16
  Component.displayName = params.componentDisplayName;
@@ -1 +1 @@
1
- {"version":3,"names":["_useRegisterLegacyPlugin","require","legacyPluginToReactComponent","exports","params","Component","props","useRegisterLegacyPlugin","_objectSpread2","default","type","pluginType","displayName","componentDisplayName"],"sources":["legacyPluginToReactComponent.ts"],"sourcesContent":["import React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin\";\n\nexport interface LegacyPluginToReactComponentParams {\n pluginType: string;\n componentDisplayName: string;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams\n) {\n const Component: React.ComponentType<TProps> = props => {\n useRegisterLegacyPlugin({ ...props, type: params.pluginType });\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,wBAAA,GAAAC,OAAA;AAOO,IAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,SAA/BA,4BAA4BA,CACrCE,MAA0C,EAC5C;EACE,IAAMC,SAAsC,GAAG,SAAzCA,SAAsCA,CAAGC,KAAK,EAAI;IACpD,IAAAC,gDAAuB,MAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAAMH,KAAK;MAAEI,IAAI,EAAEN,MAAM,CAACO;IAAU,EAAE,CAAC;IAC9D,OAAO,IAAI;EACf,CAAC;EAEDN,SAAS,CAACO,WAAW,GAAGR,MAAM,CAACS,oBAAoB;EAEnD,OAAOR,SAAS;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_useRegisterLegacyPlugin","require","legacyPluginToReactComponent","exports","params","Component","props","plugin","Object","assign","type","pluginType","mapProps","useRegisterLegacyPlugin","displayName","componentDisplayName"],"sources":["legacyPluginToReactComponent.ts"],"sourcesContent":["import React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin\";\n\nexport interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {\n pluginType: string;\n componentDisplayName: string;\n mapProps?: (props: TProps) => TProps;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams<TProps>\n) {\n const Component: React.ComponentType<TProps> = props => {\n const plugin = Object.assign(\n { type: params.pluginType },\n params.mapProps ? params.mapProps(props) : props\n );\n useRegisterLegacyPlugin(plugin);\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"mappings":";;;;;;AACA,IAAAA,wBAAA,GAAAC,OAAA;AAQO,IAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,SAA/BA,4BAA4BA,CACrCE,MAAkD,EACpD;EACE,IAAMC,SAAsC,GAAG,SAAzCA,SAAsCA,CAAGC,KAAK,EAAI;IACpD,IAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CACxB;MAAEC,IAAI,EAAEN,MAAM,CAACO;IAAW,CAAC,EAC3BP,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACQ,QAAQ,CAACN,KAAK,CAAC,GAAGA,KAC/C,CAAC;IACD,IAAAO,gDAAuB,EAACN,MAAM,CAAC;IAC/B,OAAO,IAAI;EACf,CAAC;EAEDF,SAAS,CAACS,WAAW,GAAGV,MAAM,CAACW,oBAAoB;EAEnD,OAAOV,SAAS;AACpB,CAAC","ignoreList":[]}