@modern-js/plugin-garfish 1.6.1 → 1.6.2-beta.1

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,4 +1,5 @@
1
- const _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
1
+ const _excluded = ["setLoadingState", "style"],
2
+ _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
2
3
 
3
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
5
 
@@ -30,9 +31,13 @@ export function generateMApp(options, manifest) {
30
31
  const {
31
32
  domId
32
33
  } = this.state;
33
- const {
34
- setLoadingState
35
- } = this.props;
34
+
35
+ const _this$props = this.props,
36
+ {
37
+ setLoadingState,
38
+ style
39
+ } = _this$props,
40
+ userProps = _objectWithoutProperties(_this$props, _excluded);
36
41
 
37
42
  const {
38
43
  beforeLoad,
@@ -41,7 +46,7 @@ export function generateMApp(options, manifest) {
41
46
  errorMountApp,
42
47
  errorUnmountApp
43
48
  } = options,
44
- otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
49
+ otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
45
50
 
46
51
 
47
52
  Garfish.router.setRouterConfig({
@@ -113,6 +118,7 @@ export function generateMApp(options, manifest) {
113
118
  }
114
119
 
115
120
  }, otherOptions), {}, {
121
+ props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
116
122
  insulationVariable: [...(otherOptions.insulationVariable || []), '_SERVER_DATA'],
117
123
  customLoader: provider => {
118
124
  const {
@@ -15,7 +15,8 @@ var _loadable = require("../loadable");
15
15
 
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
- const _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
18
+ const _excluded = ["setLoadingState", "style"],
19
+ _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
19
20
 
20
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
22
 
@@ -43,9 +44,13 @@ function generateMApp(options, manifest) {
43
44
  const {
44
45
  domId
45
46
  } = this.state;
46
- const {
47
- setLoadingState
48
- } = this.props;
47
+
48
+ const _this$props = this.props,
49
+ {
50
+ setLoadingState,
51
+ style
52
+ } = _this$props,
53
+ userProps = _objectWithoutProperties(_this$props, _excluded);
49
54
 
50
55
  const {
51
56
  beforeLoad,
@@ -54,7 +59,7 @@ function generateMApp(options, manifest) {
54
59
  errorMountApp,
55
60
  errorUnmountApp
56
61
  } = options,
57
- otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
62
+ otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
58
63
 
59
64
 
60
65
  _garfish.default.router.setRouterConfig({
@@ -126,6 +131,7 @@ function generateMApp(options, manifest) {
126
131
  }
127
132
 
128
133
  }, otherOptions), {}, {
134
+ props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
129
135
  insulationVariable: [...(otherOptions.insulationVariable || []), '_SERVER_DATA'],
130
136
  customLoader: provider => {
131
137
  const {
@@ -7,7 +7,8 @@ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitial
7
7
  import _inherits from "@babel/runtime/helpers/esm/inherits";
8
8
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
9
9
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
- var _excluded = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
10
+ var _excluded = ["setLoadingState", "style"],
11
+ _excluded2 = ["beforeLoad", "beforeMount", "errorLoadApp", "errorMountApp", "errorUnmountApp"];
11
12
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
12
13
 
13
14
  import Garfish from 'garfish';
@@ -44,14 +45,18 @@ export function generateMApp(options, manifest) {
44
45
  var _this2 = this;
45
46
 
46
47
  var domId = this.state.domId;
47
- var setLoadingState = this.props.setLoadingState;
48
+
49
+ var _this$props = this.props,
50
+ setLoadingState = _this$props.setLoadingState,
51
+ style = _this$props.style,
52
+ userProps = _objectWithoutProperties(_this$props, _excluded);
48
53
 
49
54
  var _beforeLoad = options.beforeLoad,
50
55
  _beforeMount = options.beforeMount,
51
56
  _errorLoadApp = options.errorLoadApp,
52
57
  _errorMountApp = options.errorMountApp,
53
58
  _errorUnmountApp = options.errorUnmountApp,
54
- otherOptions = _objectWithoutProperties(options, _excluded); // start auto render able
59
+ otherOptions = _objectWithoutProperties(options, _excluded2); // start auto render able
55
60
 
56
61
 
57
62
  Garfish.router.setRouterConfig({
@@ -137,6 +142,7 @@ export function generateMApp(options, manifest) {
137
142
  return _errorUnmountApp === null || _errorUnmountApp === void 0 ? void 0 : _errorUnmountApp.apply(void 0, [error, appInfo].concat(args));
138
143
  }
139
144
  }, otherOptions), {}, {
145
+ props: _objectSpread(_objectSpread({}, otherOptions.props || {}), userProps),
140
146
  insulationVariable: [].concat(_toConsumableArray(otherOptions.insulationVariable || []), ['_SERVER_DATA']),
141
147
  customLoader: function customLoader(provider) {
142
148
  var render = provider.render,
@@ -8,7 +8,7 @@ export interface MicroProps extends RouteComponentProps {
8
8
  }) => void;
9
9
  [key: string]: any;
10
10
  }
11
- export declare function Loadable(WrapComponent: any): (defaultLoadable?: LoadableConfig | undefined) => {
11
+ export declare function Loadable(WrapComponent: any): (defaultLoadable?: LoadableConfig) => {
12
12
  new (props: MicroComponentProps | Readonly<MicroComponentProps>): {
13
13
  state: {
14
14
  error: any;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.6.1",
14
+ "version": "1.6.2-beta.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "typesVersions": {
@@ -49,8 +49,8 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@babel/runtime": "^7",
53
- "@modern-js/utils": "^1.7.7",
52
+ "@babel/runtime": "^7.18.0",
53
+ "@modern-js/utils": "^1.7.8",
54
54
  "@types/debug": "^4.1.7",
55
55
  "@types/react-loadable": "^5.5.6",
56
56
  "debug": "^4.3.2",
@@ -67,9 +67,9 @@
67
67
  }
68
68
  },
69
69
  "devDependencies": {
70
- "@modern-js/core": "1.12.0",
70
+ "@modern-js/core": "1.12.1",
71
71
  "@modern-js/plugin-router": "1.2.15",
72
- "@modern-js/runtime-core": "1.5.0",
72
+ "@modern-js/runtime-core": "1.5.1",
73
73
  "@modern-js/types": "1.5.4",
74
74
  "@scripts/build": "0.0.0",
75
75
  "@scripts/jest-config": "0.0.0",