@variousjs/various 5.0.2 → 5.1.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.
- package/dist/index.dev.js +129 -120
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loader-dev.js +6 -4
- package/dist/loader-dev.js.map +1 -1
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/standalone-dev.js +1805 -0
- package/dist/standalone-dev.js.map +1 -0
- package/dist/standalone.js +2 -0
- package/dist/standalone.js.map +1 -0
- package/index.d.ts +10 -8
- package/package.json +31 -8
package/dist/index.dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["react"
|
|
1
|
+
define(["react"], function(__WEBPACK_EXTERNAL_MODULE_react__) { return /******/ (function() { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
4
|
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
|
|
@@ -50,7 +50,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50
50
|
/* harmony export */ DEPENDENCIES_KEY: function() { return /* binding */ DEPENDENCIES_KEY; },
|
|
51
51
|
/* harmony export */ MESSAGE_KEY: function() { return /* binding */ MESSAGE_KEY; },
|
|
52
52
|
/* harmony export */ MOUNTED_COMPONENTS_KEY: function() { return /* binding */ MOUNTED_COMPONENTS_KEY; },
|
|
53
|
-
/* harmony export */ ROOT: function() { return /* binding */ ROOT; },
|
|
54
53
|
/* harmony export */ VUE_FUNCTION_OPTIONS: function() { return /* binding */ VUE_FUNCTION_OPTIONS; },
|
|
55
54
|
/* harmony export */ VUE_VERSION: function() { return /* binding */ VUE_VERSION; }
|
|
56
55
|
/* harmony export */ });
|
|
@@ -58,7 +57,6 @@ const MOUNTED_COMPONENTS_KEY = Symbol('MOUNTED_COMPONENTS');
|
|
|
58
57
|
const MESSAGE_KEY = Symbol('MESSAGE');
|
|
59
58
|
const CONFIG_KEY = Symbol('CONFIG');
|
|
60
59
|
const DEPENDENCIES_KEY = Symbol('DEPENDENCIES');
|
|
61
|
-
const ROOT = '#root';
|
|
62
60
|
const VUE_FUNCTION_OPTIONS = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeUnmount', 'unmounted', 'errorCaptured', 'renderTracked', 'renderTriggered', 'activated', 'deactivated', 'setup', 'data', 'render'];
|
|
63
61
|
const VUE_VERSION = 3;
|
|
64
62
|
const BASE_DEPENDENCIES = ['react', 'react-dom', '@variousjs/various', 'app'];
|
|
@@ -79,8 +77,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79
77
|
|
|
80
78
|
class Connector {
|
|
81
79
|
constructor() {
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
80
|
+
this.fallbackComponent = _default_component__WEBPACK_IMPORTED_MODULE_0__.Fallback;
|
|
81
|
+
this.errorFallbackComponent = _default_component__WEBPACK_IMPORTED_MODULE_0__.ErrorFallback;
|
|
84
82
|
this.storeActions = {};
|
|
85
83
|
this.componentActions = {};
|
|
86
84
|
this.i18nConfigs = {};
|
|
@@ -130,17 +128,17 @@ class Connector {
|
|
|
130
128
|
getStoreActions() {
|
|
131
129
|
return this.storeActions;
|
|
132
130
|
}
|
|
133
|
-
|
|
134
|
-
this.
|
|
131
|
+
setFallbackComponent(fallbackComponent) {
|
|
132
|
+
this.fallbackComponent = fallbackComponent;
|
|
135
133
|
}
|
|
136
|
-
|
|
137
|
-
return this.
|
|
134
|
+
getFallbackComponent() {
|
|
135
|
+
return this.fallbackComponent;
|
|
138
136
|
}
|
|
139
|
-
|
|
140
|
-
this.
|
|
137
|
+
setErrorFallbackComponent(errorFallbackComponent) {
|
|
138
|
+
this.errorFallbackComponent = errorFallbackComponent;
|
|
141
139
|
}
|
|
142
|
-
|
|
143
|
-
return this.
|
|
140
|
+
getErrorFallbackComponent() {
|
|
141
|
+
return this.errorFallbackComponent;
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
/* harmony default export */ __webpack_exports__["default"] = (new Connector());
|
|
@@ -235,7 +233,7 @@ const createModule = (config, logError = true) => {
|
|
|
235
233
|
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(name, url);
|
|
236
234
|
}
|
|
237
235
|
return new Promise((resolve, reject) => {
|
|
238
|
-
if (!url && !dependencies[name]) {
|
|
236
|
+
if (!url && !dependencies[name] && !(0,_helper__WEBPACK_IMPORTED_MODULE_3__.isModuleSpecified)(name)) {
|
|
239
237
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
240
238
|
name,
|
|
241
239
|
module,
|
|
@@ -317,22 +315,35 @@ const createModule = (config, logError = true) => {
|
|
|
317
315
|
"use strict";
|
|
318
316
|
__webpack_require__.r(__webpack_exports__);
|
|
319
317
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
320
|
-
/* harmony export */
|
|
321
|
-
/* harmony export */
|
|
322
|
-
/* harmony export */
|
|
318
|
+
/* harmony export */ ErrorFallback: function() { return /* binding */ ErrorFallback; },
|
|
319
|
+
/* harmony export */ Fallback: function() { return /* binding */ Fallback; },
|
|
320
|
+
/* harmony export */ Root: function() { return /* binding */ Root; }
|
|
323
321
|
/* harmony export */ });
|
|
324
322
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
325
323
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
324
|
+
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
325
|
+
|
|
326
326
|
|
|
327
|
-
const
|
|
328
|
-
const
|
|
327
|
+
const Fallback = props => {
|
|
328
|
+
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)(props.$self, 'various-component-fallback');
|
|
329
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
330
|
+
className: className
|
|
331
|
+
}, "Loading");
|
|
332
|
+
};
|
|
333
|
+
const ErrorFallback = ({
|
|
329
334
|
$error,
|
|
330
|
-
$reload
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
$reload,
|
|
336
|
+
$self
|
|
337
|
+
}) => {
|
|
338
|
+
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)($self, 'various-component-error_fallback');
|
|
339
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
340
|
+
className: className
|
|
341
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, $error.type), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, $error.message), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
342
|
+
type: "button",
|
|
343
|
+
onClick: $reload
|
|
344
|
+
}, "Reload"));
|
|
345
|
+
};
|
|
346
|
+
const Root = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, "App Container is not defined");
|
|
336
347
|
|
|
337
348
|
/***/ }),
|
|
338
349
|
|
|
@@ -480,10 +491,10 @@ class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
|
|
480
491
|
});
|
|
481
492
|
};
|
|
482
493
|
render() {
|
|
483
|
-
const
|
|
494
|
+
const ErrorFallbackNode = _connector__WEBPACK_IMPORTED_MODULE_2__["default"].getErrorFallbackComponent();
|
|
484
495
|
const store = (0,_store__WEBPACK_IMPORTED_MODULE_3__.getUserStore)();
|
|
485
496
|
if (this.state.hasError) {
|
|
486
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
497
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ErrorFallbackNode, {
|
|
487
498
|
$self: this.$self,
|
|
488
499
|
$reload: this.reload,
|
|
489
500
|
$store: store,
|
|
@@ -510,11 +521,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
510
521
|
/* harmony export */ checkReactComponent: function() { return /* binding */ checkReactComponent; },
|
|
511
522
|
/* harmony export */ checkVueComponent: function() { return /* binding */ checkVueComponent; },
|
|
512
523
|
/* harmony export */ defineDependencies: function() { return /* binding */ defineDependencies; },
|
|
524
|
+
/* harmony export */ getClassNameWithModule: function() { return /* binding */ getClassNameWithModule; },
|
|
513
525
|
/* harmony export */ getConfig: function() { return /* binding */ getConfig; },
|
|
514
526
|
/* harmony export */ getMountedComponents: function() { return /* binding */ getMountedComponents; },
|
|
515
527
|
/* harmony export */ getNameWithModule: function() { return /* binding */ getNameWithModule; },
|
|
516
528
|
/* harmony export */ getSelfInfo: function() { return /* binding */ getSelfInfo; },
|
|
517
529
|
/* harmony export */ isModuleLoaded: function() { return /* binding */ isModuleLoaded; },
|
|
530
|
+
/* harmony export */ isModuleSpecified: function() { return /* binding */ isModuleSpecified; },
|
|
518
531
|
/* harmony export */ isPromiseLike: function() { return /* binding */ isPromiseLike; },
|
|
519
532
|
/* harmony export */ onComponentMounted: function() { return /* binding */ onComponentMounted; },
|
|
520
533
|
/* harmony export */ onError: function() { return /* binding */ onError; },
|
|
@@ -568,7 +581,8 @@ const defineDependencies = deps => {
|
|
|
568
581
|
}
|
|
569
582
|
}, true);
|
|
570
583
|
};
|
|
571
|
-
const isModuleLoaded = name => window.requirejs.
|
|
584
|
+
const isModuleLoaded = name => window.requirejs.defined(name);
|
|
585
|
+
const isModuleSpecified = name => window.requirejs.specified(name);
|
|
572
586
|
const getMountedComponents = () => (0,_store__WEBPACK_IMPORTED_MODULE_0__.getStore)(_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY);
|
|
573
587
|
const onComponentMounted = (module, callback) => {
|
|
574
588
|
const modules = Array.isArray(module) ? module : [module];
|
|
@@ -765,6 +779,13 @@ function getSelfInfo(params) {
|
|
|
765
779
|
url: url || dependencies[name]
|
|
766
780
|
};
|
|
767
781
|
}
|
|
782
|
+
function getClassNameWithModule(self, prefix) {
|
|
783
|
+
const {
|
|
784
|
+
name,
|
|
785
|
+
module
|
|
786
|
+
} = self;
|
|
787
|
+
return `${prefix} ${[name, module].filter(Boolean).join('-')}`;
|
|
788
|
+
}
|
|
768
789
|
|
|
769
790
|
/***/ }),
|
|
770
791
|
|
|
@@ -1184,7 +1205,7 @@ function reactComponent(config) {
|
|
|
1184
1205
|
url
|
|
1185
1206
|
});
|
|
1186
1207
|
render() {
|
|
1187
|
-
const
|
|
1208
|
+
const Fallback = _connector__WEBPACK_IMPORTED_MODULE_4__["default"].getFallbackComponent();
|
|
1188
1209
|
const {
|
|
1189
1210
|
$silent,
|
|
1190
1211
|
$componentProps,
|
|
@@ -1203,7 +1224,7 @@ function reactComponent(config) {
|
|
|
1203
1224
|
if ($silent || (0,_helper__WEBPACK_IMPORTED_MODULE_2__.isModuleLoaded)(name)) {
|
|
1204
1225
|
return null;
|
|
1205
1226
|
}
|
|
1206
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
1227
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Fallback, {
|
|
1207
1228
|
$self: this.$self,
|
|
1208
1229
|
$store: store
|
|
1209
1230
|
});
|
|
@@ -1237,19 +1258,18 @@ function reactComponent(config) {
|
|
|
1237
1258
|
__webpack_require__.r(__webpack_exports__);
|
|
1238
1259
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1239
1260
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1240
|
-
/* harmony import */ var
|
|
1241
|
-
/* harmony import */ var
|
|
1242
|
-
/* harmony import */ var
|
|
1243
|
-
/* harmony import */ var
|
|
1244
|
-
/* harmony import */ var
|
|
1245
|
-
/* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./error-boundary */ "./src/core/error-boundary.tsx");
|
|
1261
|
+
/* harmony import */ var _react_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react-component */ "./src/core/react-component.tsx");
|
|
1262
|
+
/* harmony import */ var _vue_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-component */ "./src/core/vue-component.tsx");
|
|
1263
|
+
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
1264
|
+
/* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./error-boundary */ "./src/core/error-boundary.tsx");
|
|
1265
|
+
/* harmony import */ var _create_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./create-module */ "./src/core/create-module.ts");
|
|
1246
1266
|
|
|
1247
1267
|
|
|
1248
1268
|
|
|
1249
1269
|
|
|
1250
1270
|
|
|
1251
1271
|
|
|
1252
|
-
const renderComponent = ({
|
|
1272
|
+
const renderComponent = async ({
|
|
1253
1273
|
name,
|
|
1254
1274
|
module,
|
|
1255
1275
|
url,
|
|
@@ -1259,14 +1279,17 @@ const renderComponent = ({
|
|
|
1259
1279
|
renderNode,
|
|
1260
1280
|
onMounted
|
|
1261
1281
|
}) => {
|
|
1262
|
-
const C = (type === 'vue3' ? _vue_component__WEBPACK_IMPORTED_MODULE_3__["default"] : _react_component__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
1263
|
-
name,
|
|
1264
|
-
module,
|
|
1265
|
-
url,
|
|
1266
|
-
onMounted
|
|
1267
|
-
});
|
|
1268
1282
|
try {
|
|
1269
|
-
const
|
|
1283
|
+
const ReactDOM = await (0,_create_module__WEBPACK_IMPORTED_MODULE_5__["default"])({
|
|
1284
|
+
name: 'react-dom'
|
|
1285
|
+
});
|
|
1286
|
+
const C = (type === 'vue3' ? _vue_component__WEBPACK_IMPORTED_MODULE_2__["default"] : _react_component__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
1287
|
+
name,
|
|
1288
|
+
module,
|
|
1289
|
+
url,
|
|
1290
|
+
onMounted
|
|
1291
|
+
});
|
|
1292
|
+
const root = ReactDOM.createRoot(target);
|
|
1270
1293
|
const {
|
|
1271
1294
|
$silent,
|
|
1272
1295
|
$ref,
|
|
@@ -1277,7 +1300,7 @@ const renderComponent = ({
|
|
|
1277
1300
|
$silent,
|
|
1278
1301
|
$ref
|
|
1279
1302
|
};
|
|
1280
|
-
const node = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1303
|
+
const node = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
1281
1304
|
name: name,
|
|
1282
1305
|
module: module,
|
|
1283
1306
|
url: url
|
|
@@ -1290,12 +1313,13 @@ const renderComponent = ({
|
|
|
1290
1313
|
});
|
|
1291
1314
|
});
|
|
1292
1315
|
} catch (e) {
|
|
1293
|
-
|
|
1316
|
+
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
1294
1317
|
name,
|
|
1295
1318
|
module,
|
|
1296
1319
|
type: 'SCRIPT_ERROR',
|
|
1297
1320
|
originalError: e
|
|
1298
|
-
})
|
|
1321
|
+
});
|
|
1322
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.onError)(error);
|
|
1299
1323
|
return () => Promise.resolve();
|
|
1300
1324
|
}
|
|
1301
1325
|
};
|
|
@@ -1401,7 +1425,7 @@ function vueComponent(config) {
|
|
|
1401
1425
|
const updateVueComponentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
1402
1426
|
const [componentReady, setComponentReady] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1403
1427
|
const [isError, setIsError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1404
|
-
const
|
|
1428
|
+
const Fallback = _connector__WEBPACK_IMPORTED_MODULE_1__["default"].getFallbackComponent();
|
|
1405
1429
|
const {
|
|
1406
1430
|
$silent,
|
|
1407
1431
|
$componentProps
|
|
@@ -1550,14 +1574,14 @@ function vueComponent(config) {
|
|
|
1550
1574
|
if (isError) {
|
|
1551
1575
|
throw errorRef.current;
|
|
1552
1576
|
}
|
|
1553
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, !componentReady && !$silent && !(0,_helper__WEBPACK_IMPORTED_MODULE_4__.isModuleLoaded)(name) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1577
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, !componentReady && !$silent && !(0,_helper__WEBPACK_IMPORTED_MODULE_4__.isModuleLoaded)(name) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Fallback, {
|
|
1554
1578
|
$self: selfRef.current,
|
|
1555
1579
|
$store: store
|
|
1556
1580
|
}) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1557
|
-
className:
|
|
1581
|
+
className: (0,_helper__WEBPACK_IMPORTED_MODULE_4__.getClassNameWithModule)({
|
|
1558
1582
|
name,
|
|
1559
1583
|
module
|
|
1560
|
-
})
|
|
1584
|
+
}, 'various-vue-component'),
|
|
1561
1585
|
ref: containerDivRef
|
|
1562
1586
|
}));
|
|
1563
1587
|
};
|
|
@@ -1582,17 +1606,6 @@ function vueComponent(config) {
|
|
|
1582
1606
|
"use strict";
|
|
1583
1607
|
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
1584
1608
|
|
|
1585
|
-
/***/ }),
|
|
1586
|
-
|
|
1587
|
-
/***/ "react-dom/client":
|
|
1588
|
-
/*!***********************************!*\
|
|
1589
|
-
!*** external "react-dom/client" ***!
|
|
1590
|
-
\***********************************/
|
|
1591
|
-
/***/ (function(module) {
|
|
1592
|
-
|
|
1593
|
-
"use strict";
|
|
1594
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom_client__;
|
|
1595
|
-
|
|
1596
1609
|
/***/ })
|
|
1597
1610
|
|
|
1598
1611
|
/******/ });
|
|
@@ -1672,43 +1685,41 @@ var __webpack_exports__ = {};
|
|
|
1672
1685
|
\****************************/
|
|
1673
1686
|
__webpack_require__.r(__webpack_exports__);
|
|
1674
1687
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1675
|
-
/* harmony export */ Nycticorax: function() { return /* reexport default from dynamic */
|
|
1676
|
-
/* harmony export */ createComponent: function() { return /* reexport safe */
|
|
1677
|
-
/* harmony export */ createDispatch: function() { return /* reexport safe */
|
|
1678
|
-
/* harmony export */ createLogger: function() { return /* reexport safe */
|
|
1679
|
-
/* harmony export */ createModule: function() { return /* reexport safe */
|
|
1680
|
-
/* harmony export */ createPostMessage: function() { return /* reexport safe */
|
|
1681
|
-
/* harmony export */ defineDependencies: function() { return /* reexport safe */
|
|
1682
|
-
/* harmony export */
|
|
1683
|
-
/* harmony export */
|
|
1684
|
-
/* harmony export */
|
|
1685
|
-
/* harmony export */
|
|
1686
|
-
/* harmony export */
|
|
1687
|
-
/* harmony export */
|
|
1688
|
-
/* harmony export */
|
|
1689
|
-
/* harmony export */
|
|
1688
|
+
/* harmony export */ Nycticorax: function() { return /* reexport default from dynamic */ nycticorax__WEBPACK_IMPORTED_MODULE_7___default.a; },
|
|
1689
|
+
/* harmony export */ createComponent: function() { return /* reexport safe */ _create_component__WEBPACK_IMPORTED_MODULE_13__["default"]; },
|
|
1690
|
+
/* harmony export */ createDispatch: function() { return /* reexport safe */ _dispatch__WEBPACK_IMPORTED_MODULE_8__["default"]; },
|
|
1691
|
+
/* harmony export */ createLogger: function() { return /* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_10__["default"]; },
|
|
1692
|
+
/* harmony export */ createModule: function() { return /* reexport safe */ _create_module__WEBPACK_IMPORTED_MODULE_12__["default"]; },
|
|
1693
|
+
/* harmony export */ createPostMessage: function() { return /* reexport safe */ _message__WEBPACK_IMPORTED_MODULE_9__.createPostMessage; },
|
|
1694
|
+
/* harmony export */ defineDependencies: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.defineDependencies; },
|
|
1695
|
+
/* harmony export */ getApp: function() { return /* binding */ getApp; },
|
|
1696
|
+
/* harmony export */ getConfig: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.getConfig; },
|
|
1697
|
+
/* harmony export */ getMountedComponents: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.getMountedComponents; },
|
|
1698
|
+
/* harmony export */ getStore: function() { return /* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.getUserStore; },
|
|
1699
|
+
/* harmony export */ isModuleLoaded: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.isModuleLoaded; },
|
|
1700
|
+
/* harmony export */ onComponentMounted: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.onComponentMounted; },
|
|
1701
|
+
/* harmony export */ preloadModules: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.preloadModules; },
|
|
1702
|
+
/* harmony export */ removeLoadedModules: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.removeLoadedModules; },
|
|
1703
|
+
/* harmony export */ renderComponent: function() { return /* reexport safe */ _render_component__WEBPACK_IMPORTED_MODULE_14__["default"]; },
|
|
1690
1704
|
/* harmony export */ version: function() { return /* binding */ version; }
|
|
1691
1705
|
/* harmony export */ });
|
|
1692
1706
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1693
1707
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1694
|
-
/* harmony import */ var
|
|
1695
|
-
/* harmony import */ var
|
|
1696
|
-
/* harmony import */ var
|
|
1697
|
-
/* harmony import */ var
|
|
1698
|
-
/* harmony import */ var
|
|
1699
|
-
/* harmony import */ var
|
|
1700
|
-
/* harmony import */ var
|
|
1701
|
-
/* harmony import */ var
|
|
1702
|
-
/* harmony import */ var
|
|
1703
|
-
/* harmony import */ var
|
|
1704
|
-
/* harmony import */ var
|
|
1705
|
-
/* harmony import */ var
|
|
1706
|
-
/* harmony import */ var
|
|
1707
|
-
/* harmony import */ var
|
|
1708
|
-
/* harmony import */ var
|
|
1709
|
-
/* harmony import */ var _create_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./create-component */ "./src/core/create-component.tsx");
|
|
1710
|
-
/* harmony import */ var _render_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./render-component */ "./src/core/render-component.tsx");
|
|
1711
|
-
|
|
1708
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ "./src/core/store.ts");
|
|
1709
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ "./src/core/config.ts");
|
|
1710
|
+
/* harmony import */ var _connector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./connector */ "./src/core/connector.ts");
|
|
1711
|
+
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./i18n */ "./src/core/i18n.ts");
|
|
1712
|
+
/* harmony import */ var _default_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./default-component */ "./src/core/default-component.tsx");
|
|
1713
|
+
/* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error-boundary */ "./src/core/error-boundary.tsx");
|
|
1714
|
+
/* harmony import */ var nycticorax__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! nycticorax */ "./node_modules/nycticorax/dist/index.js");
|
|
1715
|
+
/* harmony import */ var nycticorax__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(nycticorax__WEBPACK_IMPORTED_MODULE_7__);
|
|
1716
|
+
/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dispatch */ "./src/core/dispatch.ts");
|
|
1717
|
+
/* harmony import */ var _message__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./message */ "./src/core/message.ts");
|
|
1718
|
+
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./logger */ "./src/core/logger.ts");
|
|
1719
|
+
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
1720
|
+
/* harmony import */ var _create_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./create-module */ "./src/core/create-module.ts");
|
|
1721
|
+
/* harmony import */ var _create_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./create-component */ "./src/core/create-component.tsx");
|
|
1722
|
+
/* harmony import */ var _render_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./render-component */ "./src/core/render-component.tsx");
|
|
1712
1723
|
|
|
1713
1724
|
|
|
1714
1725
|
|
|
@@ -1727,52 +1738,50 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1727
1738
|
|
|
1728
1739
|
|
|
1729
1740
|
// eslint-disable-next-line no-undef
|
|
1730
|
-
const version = "5.
|
|
1731
|
-
|
|
1741
|
+
const version = "5.1.1";
|
|
1742
|
+
const getApp = config => {
|
|
1732
1743
|
const {
|
|
1733
1744
|
dependencies,
|
|
1734
|
-
root,
|
|
1735
1745
|
store = {},
|
|
1736
1746
|
actions = {},
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1747
|
+
Fallback,
|
|
1748
|
+
ErrorFallback,
|
|
1749
|
+
Root = _default_component__WEBPACK_IMPORTED_MODULE_5__.Root,
|
|
1740
1750
|
middlewares,
|
|
1741
1751
|
i18n,
|
|
1742
1752
|
...rest
|
|
1743
1753
|
} = config;
|
|
1744
1754
|
if (middlewares) {
|
|
1745
|
-
|
|
1755
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setMiddlewares(middlewares);
|
|
1746
1756
|
}
|
|
1747
|
-
|
|
1748
|
-
if (
|
|
1749
|
-
|
|
1757
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setStoreActions(actions);
|
|
1758
|
+
if (Fallback) {
|
|
1759
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setFallbackComponent(Fallback);
|
|
1750
1760
|
}
|
|
1751
|
-
if (
|
|
1752
|
-
|
|
1761
|
+
if (ErrorFallback) {
|
|
1762
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setErrorFallbackComponent(ErrorFallback);
|
|
1753
1763
|
}
|
|
1754
|
-
(0,
|
|
1764
|
+
(0,_store__WEBPACK_IMPORTED_MODULE_1__.createStore)({
|
|
1755
1765
|
...store,
|
|
1756
|
-
[
|
|
1757
|
-
[
|
|
1758
|
-
[
|
|
1759
|
-
[
|
|
1766
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY]: [],
|
|
1767
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.CONFIG_KEY]: rest,
|
|
1768
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.DEPENDENCIES_KEY]: dependencies,
|
|
1769
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_KEY]: null
|
|
1760
1770
|
});
|
|
1761
|
-
|
|
1762
|
-
class
|
|
1771
|
+
Root.displayName = 'various-app-root';
|
|
1772
|
+
return class extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
|
1763
1773
|
static displayName = 'various-app';
|
|
1764
1774
|
componentDidMount() {
|
|
1765
|
-
(0,
|
|
1775
|
+
(0,_i18n__WEBPACK_IMPORTED_MODULE_4__.createI18nConfig)(i18n);
|
|
1766
1776
|
}
|
|
1767
1777
|
render() {
|
|
1768
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1778
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
1769
1779
|
name: "app",
|
|
1770
1780
|
url: dependencies.app
|
|
1771
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1781
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Root, null));
|
|
1772
1782
|
}
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
});
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1776
1785
|
}();
|
|
1777
1786
|
/******/ return __webpack_exports__;
|
|
1778
1787
|
/******/ })()
|