@variousjs/various 5.1.4 → 5.2.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.
- package/dist/index.dev.js +172 -267
- 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 +11 -5
- package/dist/loader-dev.js.map +1 -1
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/standalone.js +398 -297
- package/dist/standalone.js.map +1 -1
- package/index.d.ts +166 -77
- package/package.json +38 -33
- package/standalone.d.ts +30 -20
package/dist/standalone.js
CHANGED
|
@@ -2189,7 +2189,7 @@ var requirejs, require, define;
|
|
|
2189
2189
|
\***********************************************/
|
|
2190
2190
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2191
2191
|
|
|
2192
|
-
!function(t,e){ true?module.exports=e(__webpack_require__(/*! react */ "react")):0}(self,
|
|
2192
|
+
!function(t,e){ true?module.exports=e(__webpack_require__(/*! react */ "react")):0}(self,t=>(()=>{"use strict";var e={17(t){t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var o,s,n;if(Array.isArray(e)){if((o=e.length)!=r.length)return!1;for(s=o;0!==s--;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((o=(n=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(s=o;0!==s--;)if(!Object.prototype.hasOwnProperty.call(r,n[s]))return!1;for(s=o;0!==s--;){var i=n[s];if(!t(e[i],r[i]))return!1}return!0}return e!=e&&r!=r}},232(t,e,r){r.d(e,{default:()=>u});var o=r(705),s=r(17),n=r.n(s);function i(t,e=new WeakMap){if("object"!=typeof t||null===t)return t;if(e.has(t))return e.get(t);const r=Array.isArray(t)?[]:{};e.set(t,r);const o=Reflect.ownKeys(t);for(const s of o)r[s]=i(t[s],e);return r}class u{constructor(){var t;(0,o.A)(this,"state",void 0),(0,o.A)(this,"listeners",void 0),(0,o.A)(this,"emits",void 0),(0,o.A)(this,"timer",void 0),(0,o.A)(this,"onStateChange",void 0),(0,o.A)(this,"getStore",void 0),(0,o.A)(this,"createStore",t=>{this.listeners=Reflect.ownKeys(t).reduce((e,r)=>{const o=r;return this.state[o]=t[o],{...e,[r]:[]}},{})}),(0,o.A)(this,"subscribe",t=>{const e={};return Reflect.ownKeys(t).forEach(r=>{const o=r;this.listeners[o]||(this.listeners[o]=[]),this.listeners[o].push(t[o]),e[o]=t[o]}),()=>{Reflect.ownKeys(e).forEach(t=>{const r=t;this.listeners[r]=this.listeners[r].filter(t=>t!==e[r])})}}),(0,o.A)(this,"emit",(t,e)=>{this.emits={...this.emits,...t},e?this.trigger():(clearTimeout(this.timer),this.timer=setTimeout(this.trigger))}),(0,o.A)(this,"dispatch",(t,...e)=>t({getStore:this.getStore,emit:t=>this.emit(t,!0)},...e)),(0,o.A)(this,"trigger",()=>{const t=this.emits,e=[],r=Reflect.ownKeys(t);for(let o=0;o<r.length;o+=1){const s=r[o];if(n()(this.state[s],t[s]))continue;const u=t[s],c=this.state[s];this.state[s]=i(t[s]),e.push({key:s,newValue:u,oldValue:c})}const o={};e.forEach(t=>{o[t.key]=[t.newValue,t.oldValue],this.listeners[t.key]&&this.listeners[t.key].forEach(e=>e(t.newValue,t.oldValue))}),e.length&&this.onStateChange(o),this.emits={},this.timer=void 0}),this.state={},this.listeners={},this.emits={},this.timer=void 0,this.onStateChange=()=>null,this.getStore=(t=this.state,function(e){return e?i(t[e]):t})}set onChange(t){this.onStateChange=t}}},438(e){e.exports=t},705(t,e,r){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e,r){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{A:()=>s})}},r={};function o(t){var s=r[t];if(void 0!==s)return s.exports;var n=r[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};o.d(s,{default:()=>l});var n=o(705),i=o(232),u=o(438),c=o.n(u);const a=["name","prototype","length","getDerivedStateFromProps","getDerivedStateFromError"];class f extends i.default{constructor(...t){super(...t),(0,n.A)(this,"connect",function(t){const{getStore:e,subscribe:r}=t;return function(...t){return function(o){class s extends u.Component{constructor(o){super(o),(0,n.A)(this,"unsubscribe",void 0),(0,n.A)(this,"state",{props:e()}),this.unsubscribe=r(t.reduce((t,r)=>({...t,[r]:()=>{this.setState({props:e()})}}),{}))}componentWillUnmount(){this.unsubscribe()}render(){const{props:t}=this.state,e={...t,...this.props};return c().createElement(o,e)}}return Reflect.ownKeys(o).forEach(t=>{const e=String(t);if(!a.includes(e)){const e=Object.getOwnPropertyDescriptor(o,t);e&&Object.defineProperty(s,t,e)}}),s}}}(this)),(0,n.A)(this,"useStore",function(t){const{getStore:e,subscribe:r}=t;return function(...t){const[o,s]=(0,u.useState)(e());return(0,u.useLayoutEffect)(()=>r(t.reduce((t,r)=>({...t,[r]:()=>{s(t=>({...t,[r]:e()[r]}))}}),{}))),o}}(this))}}const l=f;return s.default})());
|
|
2193
2193
|
//# sourceMappingURL=index.js.map
|
|
2194
2194
|
|
|
2195
2195
|
/***/ }),
|
|
@@ -2232,8 +2232,6 @@ const BASE_DEPENDENCIES = ['react', 'react-dom', '@variousjs/various', 'app'];
|
|
|
2232
2232
|
"use strict";
|
|
2233
2233
|
__webpack_require__.r(__webpack_exports__);
|
|
2234
2234
|
/* harmony import */ var _default_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./default-component */ "./src/core/default-component.tsx");
|
|
2235
|
-
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
2236
|
-
|
|
2237
2235
|
|
|
2238
2236
|
class Connector {
|
|
2239
2237
|
constructor() {
|
|
@@ -2250,16 +2248,14 @@ class Connector {
|
|
|
2250
2248
|
getMiddlewares() {
|
|
2251
2249
|
return this.middlewares;
|
|
2252
2250
|
}
|
|
2253
|
-
setI18nConfig(
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
...this.i18nConfigs[name],
|
|
2251
|
+
setI18nConfig(module, config) {
|
|
2252
|
+
this.i18nConfigs[module] = {
|
|
2253
|
+
...this.i18nConfigs[module],
|
|
2257
2254
|
...config
|
|
2258
2255
|
};
|
|
2259
2256
|
}
|
|
2260
|
-
getI18nConfig(
|
|
2261
|
-
|
|
2262
|
-
return this.i18nConfigs[name];
|
|
2257
|
+
getI18nConfig(module) {
|
|
2258
|
+
return this.i18nConfigs[module];
|
|
2263
2259
|
}
|
|
2264
2260
|
setGlobalI18nConfig(config) {
|
|
2265
2261
|
this.globalI18nConfig = {
|
|
@@ -2270,17 +2266,14 @@ class Connector {
|
|
|
2270
2266
|
getGlobalI18nConfig() {
|
|
2271
2267
|
return this.globalI18nConfig;
|
|
2272
2268
|
}
|
|
2273
|
-
setComponentActions(
|
|
2274
|
-
|
|
2275
|
-
this.componentActions[name] = actions;
|
|
2269
|
+
setComponentActions(module, actions) {
|
|
2270
|
+
this.componentActions[module] = actions;
|
|
2276
2271
|
}
|
|
2277
|
-
deleteComponentActions(
|
|
2278
|
-
|
|
2279
|
-
delete this.componentActions[name];
|
|
2272
|
+
deleteComponentActions(module) {
|
|
2273
|
+
delete this.componentActions[module];
|
|
2280
2274
|
}
|
|
2281
|
-
getComponentActions(
|
|
2282
|
-
|
|
2283
|
-
return this.componentActions[name];
|
|
2275
|
+
getComponentActions(module) {
|
|
2276
|
+
return this.componentActions[module];
|
|
2284
2277
|
}
|
|
2285
2278
|
setStoreActions(actions) {
|
|
2286
2279
|
this.storeActions = actions;
|
|
@@ -2324,13 +2317,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2324
2317
|
|
|
2325
2318
|
const createComponent = (config, storeKeys) => {
|
|
2326
2319
|
const {
|
|
2327
|
-
name,
|
|
2328
2320
|
module,
|
|
2329
2321
|
url,
|
|
2330
2322
|
type = 'react'
|
|
2331
2323
|
} = config;
|
|
2332
2324
|
const C = (type === 'vue3' ? _vue_component__WEBPACK_IMPORTED_MODULE_2__["default"] : _react_component__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
2333
|
-
name,
|
|
2334
2325
|
module,
|
|
2335
2326
|
url,
|
|
2336
2327
|
watchKeys: storeKeys
|
|
@@ -2347,7 +2338,6 @@ const createComponent = (config, storeKeys) => {
|
|
|
2347
2338
|
$ref
|
|
2348
2339
|
};
|
|
2349
2340
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
|
2350
|
-
name: name,
|
|
2351
2341
|
module: module,
|
|
2352
2342
|
url: url
|
|
2353
2343
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(C, nextProps));
|
|
@@ -2379,10 +2369,13 @@ const createModule = (config, logError = true) => {
|
|
|
2379
2369
|
const dependencies = (0,_store__WEBPACK_IMPORTED_MODULE_1__.getStore)(_config__WEBPACK_IMPORTED_MODULE_0__.DEPENDENCIES_KEY);
|
|
2380
2370
|
const middlewares = _connector__WEBPACK_IMPORTED_MODULE_2__["default"].getMiddlewares();
|
|
2381
2371
|
const {
|
|
2382
|
-
|
|
2383
|
-
module
|
|
2384
|
-
url
|
|
2372
|
+
url,
|
|
2373
|
+
module
|
|
2385
2374
|
} = config;
|
|
2375
|
+
const {
|
|
2376
|
+
name,
|
|
2377
|
+
entry
|
|
2378
|
+
} = (0,_helper__WEBPACK_IMPORTED_MODULE_3__.getModuleInfo)(module);
|
|
2386
2379
|
const loadStart = +new Date();
|
|
2387
2380
|
const logOnError = e => {
|
|
2388
2381
|
if (logError) {
|
|
@@ -2390,12 +2383,11 @@ const createModule = (config, logError = true) => {
|
|
|
2390
2383
|
}
|
|
2391
2384
|
};
|
|
2392
2385
|
if (url) {
|
|
2393
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(
|
|
2386
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(module, url);
|
|
2394
2387
|
}
|
|
2395
2388
|
return new Promise((resolve, reject) => {
|
|
2396
|
-
if (!url && !dependencies[name] && !(0,_helper__WEBPACK_IMPORTED_MODULE_3__.isModuleSpecified)(
|
|
2389
|
+
if (!url && !dependencies[name] && !(0,_helper__WEBPACK_IMPORTED_MODULE_3__.isModuleSpecified)(module)) {
|
|
2397
2390
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
2398
|
-
name,
|
|
2399
2391
|
module,
|
|
2400
2392
|
type: 'NOT_DEFINED',
|
|
2401
2393
|
originalError: new Error(`module "${name}" not defined`)
|
|
@@ -2407,34 +2399,31 @@ const createModule = (config, logError = true) => {
|
|
|
2407
2399
|
window.requirejs([name], C => {
|
|
2408
2400
|
const loadEnd = +new Date();
|
|
2409
2401
|
middlewares?.onLoad?.({
|
|
2410
|
-
name,
|
|
2411
2402
|
module,
|
|
2412
2403
|
loadStart,
|
|
2413
2404
|
loadEnd,
|
|
2414
|
-
beenLoaded: (0,_helper__WEBPACK_IMPORTED_MODULE_3__.isModuleLoaded)(
|
|
2405
|
+
beenLoaded: (0,_helper__WEBPACK_IMPORTED_MODULE_3__.isModuleLoaded)(module)
|
|
2415
2406
|
});
|
|
2416
2407
|
if (!C) {
|
|
2417
2408
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
2418
|
-
name,
|
|
2419
2409
|
module,
|
|
2420
2410
|
type: 'INVALID_MODULE',
|
|
2421
2411
|
originalError: new Error(`module "${name}" invalid`)
|
|
2422
2412
|
});
|
|
2423
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(
|
|
2413
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(module);
|
|
2424
2414
|
logOnError(error);
|
|
2425
2415
|
reject(error);
|
|
2426
2416
|
return;
|
|
2427
2417
|
}
|
|
2428
2418
|
const defaultModule = 'default' in C ? C.default : C;
|
|
2429
|
-
const actualModule = !
|
|
2430
|
-
if (actualModule === undefined &&
|
|
2419
|
+
const actualModule = !entry ? defaultModule : C[entry];
|
|
2420
|
+
if (actualModule === undefined && entry) {
|
|
2431
2421
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
2432
|
-
name,
|
|
2433
2422
|
module,
|
|
2434
2423
|
type: 'SUBMODULE_NOT_DEFINED',
|
|
2435
|
-
originalError: new Error(`submodule "${
|
|
2424
|
+
originalError: new Error(`submodule "${entry}" not defined`)
|
|
2436
2425
|
});
|
|
2437
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(
|
|
2426
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(module);
|
|
2438
2427
|
logOnError(error);
|
|
2439
2428
|
reject(error);
|
|
2440
2429
|
return;
|
|
@@ -2442,7 +2431,7 @@ const createModule = (config, logError = true) => {
|
|
|
2442
2431
|
resolve(actualModule);
|
|
2443
2432
|
}, e => {
|
|
2444
2433
|
const [requireModule] = e.requireModules;
|
|
2445
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(
|
|
2434
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(module, url);
|
|
2446
2435
|
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.resetDependencyConfig)(requireModule);
|
|
2447
2436
|
let errorType = 'LOADING_ERROR';
|
|
2448
2437
|
if (requireModule !== name) {
|
|
@@ -2452,8 +2441,7 @@ const createModule = (config, logError = true) => {
|
|
|
2452
2441
|
errorType = requireModule === name ? 'SCRIPT_ERROR' : 'SUBMODULE_SCRIPT_ERROR';
|
|
2453
2442
|
}
|
|
2454
2443
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
2455
|
-
|
|
2456
|
-
module: requireModule === name ? undefined : requireModule,
|
|
2444
|
+
module: requireModule,
|
|
2457
2445
|
type: errorType,
|
|
2458
2446
|
originalError: e
|
|
2459
2447
|
});
|
|
@@ -2485,7 +2473,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2485
2473
|
|
|
2486
2474
|
|
|
2487
2475
|
const Fallback = props => {
|
|
2488
|
-
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)(props.$self, 'various-component-fallback');
|
|
2476
|
+
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)(props.$self.module, 'various-component-fallback');
|
|
2489
2477
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2490
2478
|
className: className
|
|
2491
2479
|
}, "Loading");
|
|
@@ -2495,7 +2483,7 @@ const ErrorFallback = ({
|
|
|
2495
2483
|
$reload,
|
|
2496
2484
|
$self
|
|
2497
2485
|
}) => {
|
|
2498
|
-
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)($self, 'various-component-error_fallback');
|
|
2486
|
+
const className = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getClassNameWithModule)($self.module, 'various-component-error_fallback');
|
|
2499
2487
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2500
2488
|
className: className
|
|
2501
2489
|
}, /*#__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", {
|
|
@@ -2523,59 +2511,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2523
2511
|
|
|
2524
2512
|
|
|
2525
2513
|
|
|
2526
|
-
const createDispatch =
|
|
2514
|
+
const createDispatch = module => async function (params) {
|
|
2527
2515
|
const middlewares = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getMiddlewares();
|
|
2528
|
-
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
2516
|
+
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_3__["default"])(module);
|
|
2529
2517
|
let {
|
|
2530
|
-
name,
|
|
2531
|
-
module,
|
|
2532
2518
|
action,
|
|
2533
|
-
|
|
2519
|
+
payload,
|
|
2520
|
+
target
|
|
2534
2521
|
} = params;
|
|
2535
2522
|
if (middlewares?.onDispatch) {
|
|
2536
2523
|
const check = await middlewares.onDispatch({
|
|
2537
|
-
target
|
|
2538
|
-
name,
|
|
2539
|
-
module
|
|
2540
|
-
},
|
|
2524
|
+
target,
|
|
2541
2525
|
action,
|
|
2542
|
-
|
|
2543
|
-
trigger:
|
|
2526
|
+
payload,
|
|
2527
|
+
trigger: module
|
|
2544
2528
|
});
|
|
2545
2529
|
if (check === false) {
|
|
2546
2530
|
logger.warn('blocked by middleware', 'DISPATCH');
|
|
2547
2531
|
return Promise.resolve();
|
|
2548
2532
|
}
|
|
2549
2533
|
if (check !== true) {
|
|
2550
|
-
|
|
2551
|
-
module = check.target.module;
|
|
2534
|
+
target = check.target;
|
|
2552
2535
|
action = check.action;
|
|
2553
|
-
|
|
2536
|
+
payload = check.payload;
|
|
2554
2537
|
}
|
|
2555
2538
|
}
|
|
2556
|
-
if (
|
|
2539
|
+
if (target === 'app') {
|
|
2557
2540
|
const storeActions = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getStoreActions();
|
|
2558
2541
|
const storeAction = storeActions[action];
|
|
2559
2542
|
if (!storeAction) {
|
|
2560
2543
|
const errorMessage = `action "${action}" is not present`;
|
|
2561
2544
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_2__.VariousError({
|
|
2562
|
-
|
|
2545
|
+
module,
|
|
2563
2546
|
type: 'DISPATCH',
|
|
2564
2547
|
originalError: new Error(errorMessage)
|
|
2565
2548
|
});
|
|
2566
2549
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.onError)(error);
|
|
2567
2550
|
throw error;
|
|
2568
2551
|
}
|
|
2569
|
-
return (0,_store__WEBPACK_IMPORTED_MODULE_1__.dispatch)(storeAction,
|
|
2552
|
+
return (0,_store__WEBPACK_IMPORTED_MODULE_1__.dispatch)(storeAction, payload, module);
|
|
2570
2553
|
}
|
|
2571
|
-
const componentActions = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getComponentActions(
|
|
2572
|
-
name,
|
|
2573
|
-
module
|
|
2574
|
-
});
|
|
2554
|
+
const componentActions = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getComponentActions(target);
|
|
2575
2555
|
if (!componentActions) {
|
|
2576
2556
|
const errorMessage = 'component is not ready';
|
|
2577
2557
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_2__.VariousError({
|
|
2578
|
-
|
|
2558
|
+
module,
|
|
2579
2559
|
type: 'DISPATCH',
|
|
2580
2560
|
originalError: new Error(errorMessage)
|
|
2581
2561
|
});
|
|
@@ -2586,14 +2566,17 @@ const createDispatch = moduleDefined => async function (params) {
|
|
|
2586
2566
|
if (!componentAction) {
|
|
2587
2567
|
const errorMessage = `action "${action}" is not present`;
|
|
2588
2568
|
const error = new _helper__WEBPACK_IMPORTED_MODULE_2__.VariousError({
|
|
2589
|
-
|
|
2569
|
+
module,
|
|
2590
2570
|
type: 'DISPATCH',
|
|
2591
2571
|
originalError: new Error(errorMessage)
|
|
2592
2572
|
});
|
|
2593
2573
|
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.onError)(error);
|
|
2594
2574
|
throw error;
|
|
2595
2575
|
}
|
|
2596
|
-
return Promise.resolve(componentAction(
|
|
2576
|
+
return Promise.resolve(componentAction({
|
|
2577
|
+
payload,
|
|
2578
|
+
trigger: module
|
|
2579
|
+
}));
|
|
2597
2580
|
};
|
|
2598
2581
|
/* harmony default export */ __webpack_exports__["default"] = (createDispatch);
|
|
2599
2582
|
|
|
@@ -2623,13 +2606,11 @@ class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
|
|
2623
2606
|
};
|
|
2624
2607
|
componentDidCatch(e) {
|
|
2625
2608
|
const {
|
|
2626
|
-
name,
|
|
2627
2609
|
module
|
|
2628
2610
|
} = this.props;
|
|
2629
2611
|
const error = e instanceof _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError ? e : new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
2630
|
-
name,
|
|
2631
2612
|
module,
|
|
2632
|
-
type:
|
|
2613
|
+
type: module === 'app' ? 'APP_ERROR' : 'SCRIPT_ERROR',
|
|
2633
2614
|
originalError: e
|
|
2634
2615
|
});
|
|
2635
2616
|
this.setState({
|
|
@@ -2637,11 +2618,8 @@ class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
|
|
2637
2618
|
});
|
|
2638
2619
|
this.error = error;
|
|
2639
2620
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(error);
|
|
2640
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.resetDependencyConfig)(
|
|
2641
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.updateUnMountComponent)(
|
|
2642
|
-
name,
|
|
2643
|
-
module
|
|
2644
|
-
});
|
|
2621
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.resetDependencyConfig)(module);
|
|
2622
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.updateUnMountComponent)(module);
|
|
2645
2623
|
}
|
|
2646
2624
|
$self = (0,_helper__WEBPACK_IMPORTED_MODULE_1__.getSelfInfo)(this.props);
|
|
2647
2625
|
reload = () => {
|
|
@@ -2683,8 +2661,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2683
2661
|
/* harmony export */ defineDependencies: function() { return /* binding */ defineDependencies; },
|
|
2684
2662
|
/* harmony export */ getClassNameWithModule: function() { return /* binding */ getClassNameWithModule; },
|
|
2685
2663
|
/* harmony export */ getConfig: function() { return /* binding */ getConfig; },
|
|
2664
|
+
/* harmony export */ getModuleInfo: function() { return /* binding */ getModuleInfo; },
|
|
2686
2665
|
/* harmony export */ getMountedComponents: function() { return /* binding */ getMountedComponents; },
|
|
2687
|
-
/* harmony export */ getNameWithModule: function() { return /* binding */ getNameWithModule; },
|
|
2688
2666
|
/* harmony export */ getSelfInfo: function() { return /* binding */ getSelfInfo; },
|
|
2689
2667
|
/* harmony export */ isModuleLoaded: function() { return /* binding */ isModuleLoaded; },
|
|
2690
2668
|
/* harmony export */ isModuleSpecified: function() { return /* binding */ isModuleSpecified; },
|
|
@@ -2711,12 +2689,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2711
2689
|
|
|
2712
2690
|
|
|
2713
2691
|
const getUrlHash = url => `${url}?${+new Date()}`;
|
|
2714
|
-
const
|
|
2715
|
-
const
|
|
2692
|
+
const getModuleInfo = module => {
|
|
2693
|
+
const [name, entry] = module.split('.');
|
|
2694
|
+
return {
|
|
2695
|
+
name,
|
|
2696
|
+
entry
|
|
2697
|
+
};
|
|
2698
|
+
};
|
|
2699
|
+
const preloadModules = modules => new Promise((resolve, reject) => {
|
|
2700
|
+
const names = modules.map(m => getModuleInfo(m).name);
|
|
2716
2701
|
window.requirejs(names, resolve, reject);
|
|
2717
2702
|
});
|
|
2718
|
-
const removeLoadedModules =
|
|
2719
|
-
|
|
2703
|
+
const removeLoadedModules = modules => {
|
|
2704
|
+
modules.forEach(module => {
|
|
2705
|
+
const {
|
|
2706
|
+
name
|
|
2707
|
+
} = getModuleInfo(module);
|
|
2720
2708
|
if (!_config__WEBPACK_IMPORTED_MODULE_2__.BASE_DEPENDENCIES.includes(name)) {
|
|
2721
2709
|
window.requirejs.undef(name);
|
|
2722
2710
|
}
|
|
@@ -2741,18 +2729,27 @@ const defineDependencies = deps => {
|
|
|
2741
2729
|
}
|
|
2742
2730
|
}, true);
|
|
2743
2731
|
};
|
|
2744
|
-
const isModuleLoaded =
|
|
2745
|
-
const
|
|
2732
|
+
const isModuleLoaded = module => {
|
|
2733
|
+
const {
|
|
2734
|
+
name
|
|
2735
|
+
} = getModuleInfo(module);
|
|
2736
|
+
return window.requirejs.defined(name);
|
|
2737
|
+
};
|
|
2738
|
+
const isModuleSpecified = module => {
|
|
2739
|
+
const {
|
|
2740
|
+
name
|
|
2741
|
+
} = getModuleInfo(module);
|
|
2742
|
+
return window.requirejs.specified(name);
|
|
2743
|
+
};
|
|
2746
2744
|
const getMountedComponents = () => (0,_store__WEBPACK_IMPORTED_MODULE_0__.getStore)(_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY);
|
|
2747
2745
|
const onComponentMounted = (module, callback) => {
|
|
2748
2746
|
const modules = Array.isArray(module) ? module : [module];
|
|
2749
|
-
if (modules.every(m =>
|
|
2747
|
+
if (modules.every(m => getMountedComponents().includes(m))) {
|
|
2750
2748
|
callback();
|
|
2751
2749
|
}
|
|
2752
2750
|
const unSubscribe = (0,_store__WEBPACK_IMPORTED_MODULE_0__.subscribe)({
|
|
2753
2751
|
[_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY](value) {
|
|
2754
|
-
|
|
2755
|
-
if (modules.every(n => hasModule(mountedModules, n))) {
|
|
2752
|
+
if (modules.every(n => value.includes(n))) {
|
|
2756
2753
|
unSubscribe();
|
|
2757
2754
|
callback();
|
|
2758
2755
|
}
|
|
@@ -2760,7 +2757,10 @@ const onComponentMounted = (module, callback) => {
|
|
|
2760
2757
|
});
|
|
2761
2758
|
return unSubscribe;
|
|
2762
2759
|
};
|
|
2763
|
-
const resetDependencyConfig = (
|
|
2760
|
+
const resetDependencyConfig = (module, url) => {
|
|
2761
|
+
const {
|
|
2762
|
+
name
|
|
2763
|
+
} = getModuleInfo(module);
|
|
2764
2764
|
const dependencies = (0,_store__WEBPACK_IMPORTED_MODULE_0__.getStore)(_config__WEBPACK_IMPORTED_MODULE_2__.DEPENDENCIES_KEY);
|
|
2765
2765
|
|
|
2766
2766
|
// ignore multiple custom module url
|
|
@@ -2776,20 +2776,8 @@ const resetDependencyConfig = (name, url) => {
|
|
|
2776
2776
|
return;
|
|
2777
2777
|
}
|
|
2778
2778
|
let path = getUrlHash(dependencies[name]);
|
|
2779
|
-
|
|
2780
|
-
// custom module url, but module loaded error
|
|
2781
2779
|
if (url) {
|
|
2782
|
-
path = `${url}#${name}
|
|
2783
|
-
try {
|
|
2784
|
-
const {
|
|
2785
|
-
registry
|
|
2786
|
-
} = window.requirejs.s.contexts._;
|
|
2787
|
-
if (registry?.[name].error) {
|
|
2788
|
-
path = getUrlHash(url);
|
|
2789
|
-
}
|
|
2790
|
-
} catch (e) {
|
|
2791
|
-
// ignore
|
|
2792
|
-
}
|
|
2780
|
+
path = getUrlHash(`${url}#${name}`);
|
|
2793
2781
|
}
|
|
2794
2782
|
window.requirejs.undef(name);
|
|
2795
2783
|
window.requirejs.config({
|
|
@@ -2798,26 +2786,15 @@ const resetDependencyConfig = (name, url) => {
|
|
|
2798
2786
|
}
|
|
2799
2787
|
});
|
|
2800
2788
|
};
|
|
2801
|
-
const getNameWithModule = moduleDefined => {
|
|
2802
|
-
const {
|
|
2803
|
-
name,
|
|
2804
|
-
module
|
|
2805
|
-
} = moduleDefined;
|
|
2806
|
-
return module ? `${name}.${module}` : name;
|
|
2807
|
-
};
|
|
2808
2789
|
function getConfig() {
|
|
2809
2790
|
return (0,_store__WEBPACK_IMPORTED_MODULE_0__.getStore)(_config__WEBPACK_IMPORTED_MODULE_2__.CONFIG_KEY);
|
|
2810
2791
|
}
|
|
2811
2792
|
const onError = e => {
|
|
2812
2793
|
const {
|
|
2813
|
-
name,
|
|
2814
2794
|
module,
|
|
2815
2795
|
type
|
|
2816
2796
|
} = e;
|
|
2817
|
-
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
2818
|
-
name,
|
|
2819
|
-
module
|
|
2820
|
-
});
|
|
2797
|
+
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_1__["default"])(module);
|
|
2821
2798
|
logger.error(e, type);
|
|
2822
2799
|
};
|
|
2823
2800
|
class VariousError extends Error {
|
|
@@ -2826,17 +2803,16 @@ class VariousError extends Error {
|
|
|
2826
2803
|
this.type = data.type;
|
|
2827
2804
|
this.originalError = data.originalError;
|
|
2828
2805
|
this.module = data.module;
|
|
2829
|
-
this.name = data.name;
|
|
2830
2806
|
}
|
|
2831
2807
|
}
|
|
2832
|
-
function checkReactComponent(component,
|
|
2808
|
+
function checkReactComponent(component, module) {
|
|
2833
2809
|
return new Promise((reslove, reject) => {
|
|
2834
2810
|
if (component.$$typeof || component.prototype?.isReactComponent || typeof component === 'function') {
|
|
2835
2811
|
reslove();
|
|
2836
2812
|
return;
|
|
2837
2813
|
}
|
|
2838
2814
|
reject(new VariousError({
|
|
2839
|
-
|
|
2815
|
+
module,
|
|
2840
2816
|
originalError: new Error('not a valid React component'),
|
|
2841
2817
|
type: 'INVALID_COMPONENT'
|
|
2842
2818
|
}));
|
|
@@ -2845,7 +2821,7 @@ function checkReactComponent(component, moduleDefined) {
|
|
|
2845
2821
|
function isPromiseLike(value) {
|
|
2846
2822
|
return value != null && typeof value.then === 'function';
|
|
2847
2823
|
}
|
|
2848
|
-
function checkVueComponent(component,
|
|
2824
|
+
function checkVueComponent(component, module) {
|
|
2849
2825
|
const versionRegex = new RegExp(`^${_config__WEBPACK_IMPORTED_MODULE_2__.VUE_VERSION}\\.`);
|
|
2850
2826
|
return new Promise((resolve, reject) => {
|
|
2851
2827
|
window.requirejs(['vue'], Vue => {
|
|
@@ -2857,7 +2833,7 @@ function checkVueComponent(component, moduleDefined) {
|
|
|
2857
2833
|
return;
|
|
2858
2834
|
}
|
|
2859
2835
|
reject(new VariousError({
|
|
2860
|
-
|
|
2836
|
+
module,
|
|
2861
2837
|
originalError: new Error('not a valid Vue component'),
|
|
2862
2838
|
type: 'INVALID_COMPONENT'
|
|
2863
2839
|
}));
|
|
@@ -2867,7 +2843,6 @@ function checkVueComponent(component, moduleDefined) {
|
|
|
2867
2843
|
function parseComponentActions(params) {
|
|
2868
2844
|
const {
|
|
2869
2845
|
componentNode,
|
|
2870
|
-
name,
|
|
2871
2846
|
module,
|
|
2872
2847
|
type,
|
|
2873
2848
|
i18nUpdate
|
|
@@ -2893,66 +2868,51 @@ function parseComponentActions(params) {
|
|
|
2893
2868
|
actions[method] = componentNode[method];
|
|
2894
2869
|
});
|
|
2895
2870
|
if (i18nAction) {
|
|
2896
|
-
(0,_i18n__WEBPACK_IMPORTED_MODULE_5__.createI18nConfig)(i18nAction,
|
|
2897
|
-
name,
|
|
2898
|
-
module
|
|
2899
|
-
}, i18nUpdate);
|
|
2871
|
+
(0,_i18n__WEBPACK_IMPORTED_MODULE_5__.createI18nConfig)(i18nAction, module, i18nUpdate);
|
|
2900
2872
|
}
|
|
2901
|
-
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setComponentActions(
|
|
2902
|
-
name,
|
|
2903
|
-
module
|
|
2904
|
-
}, actions);
|
|
2873
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setComponentActions(module, actions);
|
|
2905
2874
|
if (onMessageAction) {
|
|
2906
|
-
return (0,_message__WEBPACK_IMPORTED_MODULE_4__.createOnMessage)(
|
|
2907
|
-
name,
|
|
2908
|
-
module
|
|
2909
|
-
}, onMessageAction);
|
|
2875
|
+
return (0,_message__WEBPACK_IMPORTED_MODULE_4__.createOnMessage)(module, onMessageAction);
|
|
2910
2876
|
}
|
|
2911
2877
|
return () => null;
|
|
2912
2878
|
}
|
|
2913
|
-
function updateMountedComponent(
|
|
2879
|
+
function updateMountedComponent(module) {
|
|
2914
2880
|
const mountedComponents = getMountedComponents();
|
|
2915
|
-
if (!
|
|
2916
|
-
mountedComponents.push(
|
|
2881
|
+
if (!mountedComponents.includes(module)) {
|
|
2882
|
+
mountedComponents.push(module);
|
|
2917
2883
|
}
|
|
2918
2884
|
(0,_store__WEBPACK_IMPORTED_MODULE_0__.emit)({
|
|
2919
2885
|
[_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY]: mountedComponents
|
|
2920
2886
|
}, true);
|
|
2921
2887
|
}
|
|
2922
|
-
function updateUnMountComponent(
|
|
2923
|
-
const {
|
|
2924
|
-
name,
|
|
2925
|
-
module
|
|
2926
|
-
} = moduleDefined;
|
|
2888
|
+
function updateUnMountComponent(module) {
|
|
2927
2889
|
let mountedComponents = getMountedComponents();
|
|
2928
|
-
mountedComponents = mountedComponents.filter(item => item
|
|
2890
|
+
mountedComponents = mountedComponents.filter(item => item !== module);
|
|
2929
2891
|
(0,_store__WEBPACK_IMPORTED_MODULE_0__.emit)({
|
|
2930
2892
|
[_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY]: mountedComponents
|
|
2931
2893
|
}, true);
|
|
2932
|
-
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].deleteComponentActions(
|
|
2933
|
-
name,
|
|
2934
|
-
module
|
|
2935
|
-
});
|
|
2894
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].deleteComponentActions(module);
|
|
2936
2895
|
}
|
|
2937
2896
|
function getSelfInfo(params) {
|
|
2938
2897
|
const {
|
|
2939
|
-
name,
|
|
2940
2898
|
module,
|
|
2941
2899
|
url
|
|
2942
2900
|
} = params;
|
|
2943
2901
|
const dependencies = (0,_store__WEBPACK_IMPORTED_MODULE_0__.getStore)(_config__WEBPACK_IMPORTED_MODULE_2__.DEPENDENCIES_KEY);
|
|
2902
|
+
const {
|
|
2903
|
+
name
|
|
2904
|
+
} = getModuleInfo(module);
|
|
2944
2905
|
return {
|
|
2945
|
-
name,
|
|
2946
2906
|
module,
|
|
2947
2907
|
url: url || dependencies[name]
|
|
2948
2908
|
};
|
|
2949
2909
|
}
|
|
2950
|
-
function getClassNameWithModule(
|
|
2910
|
+
function getClassNameWithModule(module, prefix) {
|
|
2951
2911
|
const {
|
|
2952
2912
|
name,
|
|
2953
|
-
|
|
2954
|
-
} =
|
|
2955
|
-
return `${prefix} ${[name,
|
|
2913
|
+
entry
|
|
2914
|
+
} = getModuleInfo(module);
|
|
2915
|
+
return `${prefix} ${[name, entry].filter(Boolean).join('-')}`;
|
|
2956
2916
|
}
|
|
2957
2917
|
|
|
2958
2918
|
/***/ }),
|
|
@@ -2975,21 +2935,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2975
2935
|
|
|
2976
2936
|
|
|
2977
2937
|
|
|
2978
|
-
function createI18nConfig(method,
|
|
2938
|
+
function createI18nConfig(method, module, callback) {
|
|
2979
2939
|
if (!method) {
|
|
2980
2940
|
return;
|
|
2981
2941
|
}
|
|
2982
2942
|
const i18nConfig = method();
|
|
2983
2943
|
if (!(0,_helper__WEBPACK_IMPORTED_MODULE_1__.isPromiseLike)(i18nConfig)) {
|
|
2984
|
-
if (
|
|
2985
|
-
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(
|
|
2944
|
+
if (module) {
|
|
2945
|
+
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(module, i18nConfig);
|
|
2986
2946
|
} else {
|
|
2987
2947
|
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setGlobalI18nConfig(i18nConfig);
|
|
2988
2948
|
}
|
|
2989
2949
|
return;
|
|
2990
2950
|
}
|
|
2991
|
-
if (
|
|
2992
|
-
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(
|
|
2951
|
+
if (module) {
|
|
2952
|
+
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(module, {
|
|
2993
2953
|
loading: true,
|
|
2994
2954
|
lngStoreKey: '',
|
|
2995
2955
|
resources: {}
|
|
@@ -3002,8 +2962,8 @@ function createI18nConfig(method, moduleDefined, callback) {
|
|
|
3002
2962
|
});
|
|
3003
2963
|
}
|
|
3004
2964
|
i18nConfig.then(res => {
|
|
3005
|
-
if (
|
|
3006
|
-
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(
|
|
2965
|
+
if (module) {
|
|
2966
|
+
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(module, {
|
|
3007
2967
|
...res,
|
|
3008
2968
|
loading: false
|
|
3009
2969
|
});
|
|
@@ -3023,23 +2983,22 @@ function createI18nConfig(method, moduleDefined, callback) {
|
|
|
3023
2983
|
});
|
|
3024
2984
|
}).catch(e => {
|
|
3025
2985
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3026
|
-
|
|
3027
|
-
module: moduleDefined?.module,
|
|
2986
|
+
module: module || 'app',
|
|
3028
2987
|
type: 'I18N',
|
|
3029
2988
|
originalError: e
|
|
3030
2989
|
}));
|
|
3031
2990
|
});
|
|
3032
2991
|
}
|
|
3033
|
-
function createI18n(
|
|
2992
|
+
function createI18n(module, updater) {
|
|
3034
2993
|
const ctx = (key, params, defaultString) => {
|
|
3035
|
-
const i18nConfig = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getI18nConfig(
|
|
2994
|
+
const i18nConfig = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getI18nConfig(module) || _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getGlobalI18nConfig();
|
|
3036
2995
|
let defaultText = defaultString;
|
|
3037
2996
|
if (defaultText === undefined) {
|
|
3038
2997
|
defaultText = typeof params === 'string' ? params : key;
|
|
3039
2998
|
}
|
|
3040
2999
|
if (!i18nConfig) {
|
|
3041
3000
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3042
|
-
|
|
3001
|
+
module,
|
|
3043
3002
|
type: 'I18N',
|
|
3044
3003
|
originalError: new Error('config not exist')
|
|
3045
3004
|
}));
|
|
@@ -3055,7 +3014,7 @@ function createI18n(moduleDefined, updater) {
|
|
|
3055
3014
|
const locale = (0,_store__WEBPACK_IMPORTED_MODULE_2__.getStore)(lngStoreKey);
|
|
3056
3015
|
if (lngStoreKey === undefined || locale === undefined) {
|
|
3057
3016
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3058
|
-
|
|
3017
|
+
module,
|
|
3059
3018
|
type: 'I18N',
|
|
3060
3019
|
originalError: new Error('locale key not defined')
|
|
3061
3020
|
}));
|
|
@@ -3064,7 +3023,7 @@ function createI18n(moduleDefined, updater) {
|
|
|
3064
3023
|
const resource = resources?.[locale];
|
|
3065
3024
|
if (!resource) {
|
|
3066
3025
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3067
|
-
|
|
3026
|
+
module,
|
|
3068
3027
|
type: 'I18N',
|
|
3069
3028
|
originalError: new Error(`locale resource \`${locale}\` not exist`)
|
|
3070
3029
|
}));
|
|
@@ -3072,7 +3031,7 @@ function createI18n(moduleDefined, updater) {
|
|
|
3072
3031
|
}
|
|
3073
3032
|
if (!resource[key]) {
|
|
3074
3033
|
(0,_helper__WEBPACK_IMPORTED_MODULE_1__.onError)(new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3075
|
-
|
|
3034
|
+
module,
|
|
3076
3035
|
type: 'I18N',
|
|
3077
3036
|
originalError: new Error(`locale key \`${key}\` not exist`)
|
|
3078
3037
|
}));
|
|
@@ -3092,7 +3051,7 @@ function createI18n(moduleDefined, updater) {
|
|
|
3092
3051
|
}, text);
|
|
3093
3052
|
};
|
|
3094
3053
|
ctx.update = (config, type) => {
|
|
3095
|
-
const i18nConfig = type === 'app' ? _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getGlobalI18nConfig() : _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getI18nConfig(
|
|
3054
|
+
const i18nConfig = type === 'app' ? _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getGlobalI18nConfig() : _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getI18nConfig(module);
|
|
3096
3055
|
const next = {
|
|
3097
3056
|
...i18nConfig,
|
|
3098
3057
|
...config
|
|
@@ -3100,7 +3059,7 @@ function createI18n(moduleDefined, updater) {
|
|
|
3100
3059
|
if (type === 'app') {
|
|
3101
3060
|
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setGlobalI18nConfig(next);
|
|
3102
3061
|
} else {
|
|
3103
|
-
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(
|
|
3062
|
+
_connector__WEBPACK_IMPORTED_MODULE_0__["default"].setI18nConfig(module, next);
|
|
3104
3063
|
}
|
|
3105
3064
|
updater();
|
|
3106
3065
|
};
|
|
@@ -3109,6 +3068,116 @@ function createI18n(moduleDefined, updater) {
|
|
|
3109
3068
|
|
|
3110
3069
|
/***/ }),
|
|
3111
3070
|
|
|
3071
|
+
/***/ "./src/core/index.tsx":
|
|
3072
|
+
/*!****************************!*\
|
|
3073
|
+
!*** ./src/core/index.tsx ***!
|
|
3074
|
+
\****************************/
|
|
3075
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3076
|
+
|
|
3077
|
+
"use strict";
|
|
3078
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3079
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3080
|
+
/* harmony export */ Nycticorax: function() { return /* reexport default from dynamic */ nycticorax__WEBPACK_IMPORTED_MODULE_7___default.a; },
|
|
3081
|
+
/* harmony export */ createComponent: function() { return /* reexport safe */ _create_component__WEBPACK_IMPORTED_MODULE_13__["default"]; },
|
|
3082
|
+
/* harmony export */ createDispatch: function() { return /* reexport safe */ _dispatch__WEBPACK_IMPORTED_MODULE_8__["default"]; },
|
|
3083
|
+
/* harmony export */ createLogger: function() { return /* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_10__["default"]; },
|
|
3084
|
+
/* harmony export */ createModule: function() { return /* reexport safe */ _create_module__WEBPACK_IMPORTED_MODULE_12__["default"]; },
|
|
3085
|
+
/* harmony export */ createPostMessage: function() { return /* reexport safe */ _message__WEBPACK_IMPORTED_MODULE_9__.createPostMessage; },
|
|
3086
|
+
/* harmony export */ defineDependencies: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.defineDependencies; },
|
|
3087
|
+
/* harmony export */ getApp: function() { return /* binding */ getApp; },
|
|
3088
|
+
/* harmony export */ getConfig: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.getConfig; },
|
|
3089
|
+
/* harmony export */ getModuleInfo: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.getModuleInfo; },
|
|
3090
|
+
/* harmony export */ getMountedComponents: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.getMountedComponents; },
|
|
3091
|
+
/* harmony export */ getStore: function() { return /* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.getUserStore; },
|
|
3092
|
+
/* harmony export */ isModuleLoaded: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.isModuleLoaded; },
|
|
3093
|
+
/* harmony export */ onComponentMounted: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.onComponentMounted; },
|
|
3094
|
+
/* harmony export */ preloadModules: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.preloadModules; },
|
|
3095
|
+
/* harmony export */ removeLoadedModules: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_11__.removeLoadedModules; },
|
|
3096
|
+
/* harmony export */ renderComponent: function() { return /* reexport safe */ _render_component__WEBPACK_IMPORTED_MODULE_14__["default"]; },
|
|
3097
|
+
/* harmony export */ version: function() { return /* binding */ version; }
|
|
3098
|
+
/* harmony export */ });
|
|
3099
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
3100
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3101
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./store */ "./src/core/store.ts");
|
|
3102
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ "./src/core/config.ts");
|
|
3103
|
+
/* harmony import */ var _connector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./connector */ "./src/core/connector.ts");
|
|
3104
|
+
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./i18n */ "./src/core/i18n.ts");
|
|
3105
|
+
/* harmony import */ var _default_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./default-component */ "./src/core/default-component.tsx");
|
|
3106
|
+
/* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error-boundary */ "./src/core/error-boundary.tsx");
|
|
3107
|
+
/* harmony import */ var nycticorax__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! nycticorax */ "./node_modules/nycticorax/dist/index.js");
|
|
3108
|
+
/* harmony import */ var nycticorax__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(nycticorax__WEBPACK_IMPORTED_MODULE_7__);
|
|
3109
|
+
/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dispatch */ "./src/core/dispatch.ts");
|
|
3110
|
+
/* harmony import */ var _message__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./message */ "./src/core/message.ts");
|
|
3111
|
+
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./logger */ "./src/core/logger.ts");
|
|
3112
|
+
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
3113
|
+
/* harmony import */ var _create_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./create-module */ "./src/core/create-module.ts");
|
|
3114
|
+
/* harmony import */ var _create_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./create-component */ "./src/core/create-component.tsx");
|
|
3115
|
+
/* harmony import */ var _render_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./render-component */ "./src/core/render-component.tsx");
|
|
3116
|
+
|
|
3117
|
+
|
|
3118
|
+
|
|
3119
|
+
|
|
3120
|
+
|
|
3121
|
+
|
|
3122
|
+
|
|
3123
|
+
|
|
3124
|
+
|
|
3125
|
+
|
|
3126
|
+
|
|
3127
|
+
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
|
|
3132
|
+
|
|
3133
|
+
// eslint-disable-next-line no-undef
|
|
3134
|
+
const version = "5.2.0";
|
|
3135
|
+
const getApp = config => {
|
|
3136
|
+
const {
|
|
3137
|
+
dependencies,
|
|
3138
|
+
store = {},
|
|
3139
|
+
actions = {},
|
|
3140
|
+
Fallback,
|
|
3141
|
+
ErrorFallback,
|
|
3142
|
+
Root = _default_component__WEBPACK_IMPORTED_MODULE_5__.Root,
|
|
3143
|
+
middlewares,
|
|
3144
|
+
i18n,
|
|
3145
|
+
...rest
|
|
3146
|
+
} = config;
|
|
3147
|
+
if (middlewares) {
|
|
3148
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setMiddlewares(middlewares);
|
|
3149
|
+
}
|
|
3150
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setStoreActions(actions);
|
|
3151
|
+
if (Fallback) {
|
|
3152
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setFallbackComponent(Fallback);
|
|
3153
|
+
}
|
|
3154
|
+
if (ErrorFallback) {
|
|
3155
|
+
_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setErrorFallbackComponent(ErrorFallback);
|
|
3156
|
+
}
|
|
3157
|
+
(0,_store__WEBPACK_IMPORTED_MODULE_1__.createStore)({
|
|
3158
|
+
...store,
|
|
3159
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.MOUNTED_COMPONENTS_KEY]: [],
|
|
3160
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.CONFIG_KEY]: rest,
|
|
3161
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.DEPENDENCIES_KEY]: dependencies,
|
|
3162
|
+
[_config__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_KEY]: null
|
|
3163
|
+
});
|
|
3164
|
+
Root.displayName = 'various-app-root';
|
|
3165
|
+
return class extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
|
3166
|
+
static displayName = 'various-app';
|
|
3167
|
+
componentDidMount() {
|
|
3168
|
+
(0,_i18n__WEBPACK_IMPORTED_MODULE_4__.createI18nConfig)(i18n);
|
|
3169
|
+
}
|
|
3170
|
+
render() {
|
|
3171
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
3172
|
+
module: "app",
|
|
3173
|
+
url: dependencies.app
|
|
3174
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Root, null));
|
|
3175
|
+
}
|
|
3176
|
+
};
|
|
3177
|
+
};
|
|
3178
|
+
|
|
3179
|
+
/***/ }),
|
|
3180
|
+
|
|
3112
3181
|
/***/ "./src/core/logger.ts":
|
|
3113
3182
|
/*!****************************!*\
|
|
3114
3183
|
!*** ./src/core/logger.ts ***!
|
|
@@ -3133,7 +3202,7 @@ const logger = args => {
|
|
|
3133
3202
|
error: 'red'
|
|
3134
3203
|
};
|
|
3135
3204
|
const color = colorMap[args.level];
|
|
3136
|
-
const params = [`%c ${
|
|
3205
|
+
const params = [`%c ${args.module} `, `background:${color};border:1px solid ${color};padding:1px;border-radius:2px 0 0 2px;color: #fff;`];
|
|
3137
3206
|
if (args.type) {
|
|
3138
3207
|
params[0] = `${params[0]}%c ${args.type} %c`;
|
|
3139
3208
|
params.push(`border:1px solid ${color};padding:1px;border-radius:0 2px 2px 0;color:${color};`, 'background:transparent');
|
|
@@ -3143,10 +3212,10 @@ const logger = args => {
|
|
|
3143
3212
|
}
|
|
3144
3213
|
window.console[args.level](...params, args.message);
|
|
3145
3214
|
};
|
|
3146
|
-
const createLogger =
|
|
3215
|
+
const createLogger = module => ({
|
|
3147
3216
|
info(message, type) {
|
|
3148
3217
|
logger({
|
|
3149
|
-
|
|
3218
|
+
module,
|
|
3150
3219
|
level: 'info',
|
|
3151
3220
|
type,
|
|
3152
3221
|
message
|
|
@@ -3154,7 +3223,7 @@ const createLogger = moduleDefined => ({
|
|
|
3154
3223
|
},
|
|
3155
3224
|
warn(message, type) {
|
|
3156
3225
|
logger({
|
|
3157
|
-
|
|
3226
|
+
module,
|
|
3158
3227
|
level: 'warn',
|
|
3159
3228
|
type,
|
|
3160
3229
|
message
|
|
@@ -3163,13 +3232,13 @@ const createLogger = moduleDefined => ({
|
|
|
3163
3232
|
error(message, type) {
|
|
3164
3233
|
const middlewares = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getMiddlewares();
|
|
3165
3234
|
const error = message instanceof _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError ? message : new _helper__WEBPACK_IMPORTED_MODULE_1__.VariousError({
|
|
3166
|
-
|
|
3235
|
+
module,
|
|
3167
3236
|
type: type || 'unknow',
|
|
3168
3237
|
originalError: message instanceof Error ? message : new Error(message)
|
|
3169
3238
|
});
|
|
3170
3239
|
middlewares?.onError?.(error);
|
|
3171
3240
|
logger({
|
|
3172
|
-
|
|
3241
|
+
module,
|
|
3173
3242
|
level: 'error',
|
|
3174
3243
|
type,
|
|
3175
3244
|
message
|
|
@@ -3200,13 +3269,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3200
3269
|
|
|
3201
3270
|
|
|
3202
3271
|
|
|
3203
|
-
const createPostMessage =
|
|
3272
|
+
const createPostMessage = module => async ({
|
|
3273
|
+
event,
|
|
3274
|
+
payload
|
|
3275
|
+
}) => {
|
|
3204
3276
|
const middlewares = _connector__WEBPACK_IMPORTED_MODULE_0__["default"].getMiddlewares();
|
|
3205
|
-
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
3277
|
+
const logger = (0,_logger__WEBPACK_IMPORTED_MODULE_1__["default"])(module);
|
|
3206
3278
|
let next = {
|
|
3207
|
-
trigger:
|
|
3279
|
+
trigger: module,
|
|
3208
3280
|
event,
|
|
3209
|
-
|
|
3281
|
+
payload
|
|
3210
3282
|
};
|
|
3211
3283
|
if (middlewares?.onMessage) {
|
|
3212
3284
|
const check = await middlewares.onMessage(next);
|
|
@@ -3225,22 +3297,22 @@ const createPostMessage = moduleDefined => async (event, value) => {
|
|
|
3225
3297
|
[_config__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_KEY]: {
|
|
3226
3298
|
timestamp: +new Date(),
|
|
3227
3299
|
event: next.event,
|
|
3228
|
-
trigger:
|
|
3229
|
-
|
|
3300
|
+
trigger: module,
|
|
3301
|
+
payload: next.payload
|
|
3230
3302
|
}
|
|
3231
3303
|
});
|
|
3232
3304
|
};
|
|
3233
|
-
const createOnMessage = (
|
|
3305
|
+
const createOnMessage = (module, onMessage) => (0,_store__WEBPACK_IMPORTED_MODULE_2__.subscribe)({
|
|
3234
3306
|
[_config__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_KEY](v) {
|
|
3235
3307
|
const {
|
|
3236
3308
|
trigger,
|
|
3237
|
-
|
|
3309
|
+
payload,
|
|
3238
3310
|
event
|
|
3239
3311
|
} = v;
|
|
3240
|
-
if (
|
|
3312
|
+
if (module !== trigger) {
|
|
3241
3313
|
onMessage({
|
|
3242
3314
|
event,
|
|
3243
|
-
|
|
3315
|
+
payload,
|
|
3244
3316
|
trigger
|
|
3245
3317
|
});
|
|
3246
3318
|
}
|
|
@@ -3280,7 +3352,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3280
3352
|
|
|
3281
3353
|
function reactComponent(config) {
|
|
3282
3354
|
const {
|
|
3283
|
-
name,
|
|
3284
3355
|
module,
|
|
3285
3356
|
url,
|
|
3286
3357
|
watchKeys,
|
|
@@ -3303,36 +3374,22 @@ function reactComponent(config) {
|
|
|
3303
3374
|
this.ComponentNode = null;
|
|
3304
3375
|
this.isUnMounted = true;
|
|
3305
3376
|
this.unSubscribeMessage();
|
|
3306
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.updateUnMountComponent)(
|
|
3307
|
-
name,
|
|
3308
|
-
module
|
|
3309
|
-
});
|
|
3377
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.updateUnMountComponent)(module);
|
|
3310
3378
|
}
|
|
3311
3379
|
mountComponent = async () => {
|
|
3312
3380
|
try {
|
|
3313
3381
|
const componentNode = await (0,_create_module__WEBPACK_IMPORTED_MODULE_9__["default"])({
|
|
3314
|
-
name,
|
|
3315
3382
|
module,
|
|
3316
3383
|
url
|
|
3317
3384
|
}, false);
|
|
3318
3385
|
if (this.isUnMounted) {
|
|
3319
3386
|
return;
|
|
3320
3387
|
}
|
|
3321
|
-
await (0,_helper__WEBPACK_IMPORTED_MODULE_2__.checkReactComponent)(componentNode,
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
});
|
|
3325
|
-
componentNode.displayName = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.getNameWithModule)({
|
|
3326
|
-
name,
|
|
3327
|
-
module
|
|
3328
|
-
});
|
|
3329
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.updateMountedComponent)({
|
|
3330
|
-
name,
|
|
3331
|
-
module
|
|
3332
|
-
});
|
|
3388
|
+
await (0,_helper__WEBPACK_IMPORTED_MODULE_2__.checkReactComponent)(componentNode, module);
|
|
3389
|
+
componentNode.displayName = module;
|
|
3390
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_2__.updateMountedComponent)(module);
|
|
3333
3391
|
this.unSubscribeMessage = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.parseComponentActions)({
|
|
3334
3392
|
componentNode,
|
|
3335
|
-
name,
|
|
3336
3393
|
module,
|
|
3337
3394
|
i18nUpdate: () => this.forceUpdate()
|
|
3338
3395
|
});
|
|
@@ -3352,24 +3409,11 @@ function reactComponent(config) {
|
|
|
3352
3409
|
});
|
|
3353
3410
|
}
|
|
3354
3411
|
};
|
|
3355
|
-
$postMessage = (0,_message__WEBPACK_IMPORTED_MODULE_5__.createPostMessage)(
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
$dispatch = (0,_dispatch__WEBPACK_IMPORTED_MODULE_6__["default"])({
|
|
3360
|
-
name,
|
|
3361
|
-
module
|
|
3362
|
-
});
|
|
3363
|
-
$t = (0,_i18n__WEBPACK_IMPORTED_MODULE_8__.createI18n)({
|
|
3364
|
-
name,
|
|
3365
|
-
module
|
|
3366
|
-
}, () => this.forceUpdate());
|
|
3367
|
-
$logger = (0,_logger__WEBPACK_IMPORTED_MODULE_7__["default"])({
|
|
3368
|
-
name,
|
|
3369
|
-
module
|
|
3370
|
-
});
|
|
3412
|
+
$postMessage = (0,_message__WEBPACK_IMPORTED_MODULE_5__.createPostMessage)(module);
|
|
3413
|
+
$dispatch = (0,_dispatch__WEBPACK_IMPORTED_MODULE_6__["default"])(module);
|
|
3414
|
+
$t = (0,_i18n__WEBPACK_IMPORTED_MODULE_8__.createI18n)(module, () => this.forceUpdate());
|
|
3415
|
+
$logger = (0,_logger__WEBPACK_IMPORTED_MODULE_7__["default"])(module);
|
|
3371
3416
|
$self = (0,_helper__WEBPACK_IMPORTED_MODULE_2__.getSelfInfo)({
|
|
3372
|
-
name,
|
|
3373
3417
|
module,
|
|
3374
3418
|
url
|
|
3375
3419
|
});
|
|
@@ -3390,7 +3434,7 @@ function reactComponent(config) {
|
|
|
3390
3434
|
throw this.error;
|
|
3391
3435
|
}
|
|
3392
3436
|
if (!componentReady) {
|
|
3393
|
-
if ($silent || (0,_helper__WEBPACK_IMPORTED_MODULE_2__.isModuleLoaded)(
|
|
3437
|
+
if ($silent || (0,_helper__WEBPACK_IMPORTED_MODULE_2__.isModuleLoaded)(module)) {
|
|
3394
3438
|
return null;
|
|
3395
3439
|
}
|
|
3396
3440
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Fallback, {
|
|
@@ -3417,6 +3461,81 @@ function reactComponent(config) {
|
|
|
3417
3461
|
|
|
3418
3462
|
/***/ }),
|
|
3419
3463
|
|
|
3464
|
+
/***/ "./src/core/render-component.tsx":
|
|
3465
|
+
/*!***************************************!*\
|
|
3466
|
+
!*** ./src/core/render-component.tsx ***!
|
|
3467
|
+
\***************************************/
|
|
3468
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3469
|
+
|
|
3470
|
+
"use strict";
|
|
3471
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3472
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
3473
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3474
|
+
/* harmony import */ var _react_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react-component */ "./src/core/react-component.tsx");
|
|
3475
|
+
/* harmony import */ var _vue_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-component */ "./src/core/vue-component.tsx");
|
|
3476
|
+
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper */ "./src/core/helper.ts");
|
|
3477
|
+
/* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./error-boundary */ "./src/core/error-boundary.tsx");
|
|
3478
|
+
/* harmony import */ var _create_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./create-module */ "./src/core/create-module.ts");
|
|
3479
|
+
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
const renderComponent = async ({
|
|
3486
|
+
module,
|
|
3487
|
+
url,
|
|
3488
|
+
target,
|
|
3489
|
+
props,
|
|
3490
|
+
type = 'react',
|
|
3491
|
+
renderNode,
|
|
3492
|
+
onMounted
|
|
3493
|
+
}) => {
|
|
3494
|
+
try {
|
|
3495
|
+
const ReactDOM = await (0,_create_module__WEBPACK_IMPORTED_MODULE_5__["default"])({
|
|
3496
|
+
module: 'react-dom'
|
|
3497
|
+
});
|
|
3498
|
+
const C = (type === 'vue3' ? _vue_component__WEBPACK_IMPORTED_MODULE_2__["default"] : _react_component__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
3499
|
+
module,
|
|
3500
|
+
url,
|
|
3501
|
+
onMounted
|
|
3502
|
+
});
|
|
3503
|
+
const root = ReactDOM.createRoot(target);
|
|
3504
|
+
const {
|
|
3505
|
+
$silent,
|
|
3506
|
+
$ref,
|
|
3507
|
+
...rest
|
|
3508
|
+
} = props || {};
|
|
3509
|
+
const nextProps = {
|
|
3510
|
+
$componentProps: rest,
|
|
3511
|
+
$silent,
|
|
3512
|
+
$ref
|
|
3513
|
+
};
|
|
3514
|
+
const node = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
3515
|
+
module: module,
|
|
3516
|
+
url: url
|
|
3517
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(C, nextProps));
|
|
3518
|
+
root.render(renderNode ? renderNode(node) : node);
|
|
3519
|
+
return () => new Promise(resolve => {
|
|
3520
|
+
setTimeout(() => {
|
|
3521
|
+
root.unmount();
|
|
3522
|
+
resolve();
|
|
3523
|
+
});
|
|
3524
|
+
});
|
|
3525
|
+
} catch (e) {
|
|
3526
|
+
const error = new _helper__WEBPACK_IMPORTED_MODULE_3__.VariousError({
|
|
3527
|
+
module,
|
|
3528
|
+
type: 'SCRIPT_ERROR',
|
|
3529
|
+
originalError: e
|
|
3530
|
+
});
|
|
3531
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_3__.onError)(error);
|
|
3532
|
+
return () => Promise.resolve();
|
|
3533
|
+
}
|
|
3534
|
+
};
|
|
3535
|
+
/* harmony default export */ __webpack_exports__["default"] = (renderComponent);
|
|
3536
|
+
|
|
3537
|
+
/***/ }),
|
|
3538
|
+
|
|
3420
3539
|
/***/ "./src/core/store.ts":
|
|
3421
3540
|
/*!***************************!*\
|
|
3422
3541
|
!*** ./src/core/store.ts ***!
|
|
@@ -3488,7 +3607,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3488
3607
|
|
|
3489
3608
|
function vueComponent(config) {
|
|
3490
3609
|
const {
|
|
3491
|
-
name,
|
|
3492
3610
|
module,
|
|
3493
3611
|
url,
|
|
3494
3612
|
watchKeys,
|
|
@@ -3504,7 +3622,6 @@ function vueComponent(config) {
|
|
|
3504
3622
|
const isUnMountedRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
|
3505
3623
|
const ComponentNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
3506
3624
|
const selfRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)((0,_helper__WEBPACK_IMPORTED_MODULE_4__.getSelfInfo)({
|
|
3507
|
-
name,
|
|
3508
3625
|
module,
|
|
3509
3626
|
url
|
|
3510
3627
|
}));
|
|
@@ -3522,22 +3639,10 @@ function vueComponent(config) {
|
|
|
3522
3639
|
$componentProps
|
|
3523
3640
|
} = props;
|
|
3524
3641
|
const mountVue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
3525
|
-
const $logger = (0,_logger__WEBPACK_IMPORTED_MODULE_6__["default"])(
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
const $dispatch = (0,_dispatch__WEBPACK_IMPORTED_MODULE_5__["default"])({
|
|
3530
|
-
name,
|
|
3531
|
-
module
|
|
3532
|
-
});
|
|
3533
|
-
const $postMessage = (0,_message__WEBPACK_IMPORTED_MODULE_7__.createPostMessage)({
|
|
3534
|
-
name,
|
|
3535
|
-
module
|
|
3536
|
-
});
|
|
3537
|
-
const $t = (0,_i18n__WEBPACK_IMPORTED_MODULE_8__.createI18n)({
|
|
3538
|
-
name,
|
|
3539
|
-
module
|
|
3540
|
-
}, () => {
|
|
3642
|
+
const $logger = (0,_logger__WEBPACK_IMPORTED_MODULE_6__["default"])(module);
|
|
3643
|
+
const $dispatch = (0,_dispatch__WEBPACK_IMPORTED_MODULE_5__["default"])(module);
|
|
3644
|
+
const $postMessage = (0,_message__WEBPACK_IMPORTED_MODULE_7__.createPostMessage)(module);
|
|
3645
|
+
const $t = (0,_i18n__WEBPACK_IMPORTED_MODULE_8__.createI18n)(module, () => {
|
|
3541
3646
|
updateVueComponentRef.current?.();
|
|
3542
3647
|
});
|
|
3543
3648
|
propsReactiveRef.current = vueRef.current.ref({
|
|
@@ -3560,7 +3665,6 @@ function vueComponent(config) {
|
|
|
3560
3665
|
const error = e;
|
|
3561
3666
|
errorRef.current = error.message?.includes('https://react') ? new _helper__WEBPACK_IMPORTED_MODULE_4__.VariousError({
|
|
3562
3667
|
originalError: new Error('not a valid Vue component'),
|
|
3563
|
-
name,
|
|
3564
3668
|
module,
|
|
3565
3669
|
type: 'INVALID_COMPONENT'
|
|
3566
3670
|
}) : error;
|
|
@@ -3593,28 +3697,20 @@ function vueComponent(config) {
|
|
|
3593
3697
|
const mountComponent = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
|
|
3594
3698
|
try {
|
|
3595
3699
|
const vue = await (0,_create_module__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
3596
|
-
|
|
3700
|
+
module: 'vue'
|
|
3597
3701
|
});
|
|
3598
3702
|
vueRef.current = vue;
|
|
3599
3703
|
const componentNode = await (0,_create_module__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
3600
|
-
name,
|
|
3601
3704
|
module,
|
|
3602
3705
|
url
|
|
3603
3706
|
}, false);
|
|
3604
3707
|
if (isUnMountedRef.current) {
|
|
3605
3708
|
return;
|
|
3606
3709
|
}
|
|
3607
|
-
await (0,_helper__WEBPACK_IMPORTED_MODULE_4__.checkVueComponent)(componentNode,
|
|
3608
|
-
|
|
3609
|
-
module
|
|
3610
|
-
});
|
|
3611
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.updateMountedComponent)({
|
|
3612
|
-
name,
|
|
3613
|
-
module
|
|
3614
|
-
});
|
|
3710
|
+
await (0,_helper__WEBPACK_IMPORTED_MODULE_4__.checkVueComponent)(componentNode, module);
|
|
3711
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.updateMountedComponent)(module);
|
|
3615
3712
|
unSubscribeMessageRef.current = (0,_helper__WEBPACK_IMPORTED_MODULE_4__.parseComponentActions)({
|
|
3616
3713
|
componentNode,
|
|
3617
|
-
name,
|
|
3618
3714
|
module,
|
|
3619
3715
|
type: 'vue3',
|
|
3620
3716
|
i18nUpdate() {
|
|
@@ -3641,10 +3737,7 @@ function vueComponent(config) {
|
|
|
3641
3737
|
errorRef.current = undefined;
|
|
3642
3738
|
ComponentNodeRef.current = undefined;
|
|
3643
3739
|
isUnMountedRef.current = true;
|
|
3644
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.updateUnMountComponent)(
|
|
3645
|
-
name,
|
|
3646
|
-
module
|
|
3647
|
-
});
|
|
3740
|
+
(0,_helper__WEBPACK_IMPORTED_MODULE_4__.updateUnMountComponent)(module);
|
|
3648
3741
|
unMountVue.current?.();
|
|
3649
3742
|
unSubscribeMessageRef.current?.();
|
|
3650
3743
|
isVueMounted.current = false;
|
|
@@ -3673,21 +3766,15 @@ function vueComponent(config) {
|
|
|
3673
3766
|
if (isError) {
|
|
3674
3767
|
throw errorRef.current;
|
|
3675
3768
|
}
|
|
3676
|
-
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)(
|
|
3769
|
+
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)(module) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Fallback, {
|
|
3677
3770
|
$self: selfRef.current,
|
|
3678
3771
|
$store: store
|
|
3679
3772
|
}) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3680
|
-
className: (0,_helper__WEBPACK_IMPORTED_MODULE_4__.getClassNameWithModule)(
|
|
3681
|
-
name,
|
|
3682
|
-
module
|
|
3683
|
-
}, 'various-vue-component'),
|
|
3773
|
+
className: (0,_helper__WEBPACK_IMPORTED_MODULE_4__.getClassNameWithModule)(module, 'various-vue-component'),
|
|
3684
3774
|
ref: containerDivRef
|
|
3685
3775
|
}));
|
|
3686
3776
|
};
|
|
3687
|
-
V.displayName =
|
|
3688
|
-
name,
|
|
3689
|
-
module
|
|
3690
|
-
});
|
|
3777
|
+
V.displayName = module;
|
|
3691
3778
|
const VueComponent = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(V, props);
|
|
3692
3779
|
VueComponent.displayName = 'various-vue-component';
|
|
3693
3780
|
return VueComponent;
|
|
@@ -3705,9 +3792,16 @@ function vueComponent(config) {
|
|
|
3705
3792
|
"use strict";
|
|
3706
3793
|
__webpack_require__.r(__webpack_exports__);
|
|
3707
3794
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3795
|
+
/* harmony export */ createAppConfig: function() { return /* binding */ createAppConfig; },
|
|
3708
3796
|
/* harmony export */ defineModules: function() { return /* binding */ defineModules; }
|
|
3709
3797
|
/* harmony export */ });
|
|
3710
3798
|
/* harmony import */ var _core_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/helper */ "./src/core/helper.ts");
|
|
3799
|
+
/* harmony import */ var _core_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/store */ "./src/core/store.ts");
|
|
3800
|
+
/* harmony import */ var _core_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/config */ "./src/core/config.ts");
|
|
3801
|
+
/* harmony import */ var _core_connector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/connector */ "./src/core/connector.ts");
|
|
3802
|
+
|
|
3803
|
+
|
|
3804
|
+
|
|
3711
3805
|
|
|
3712
3806
|
const defineAsync = (name, dep) => new Promise(resolve => {
|
|
3713
3807
|
window.define(name, [], () => dep);
|
|
@@ -3741,6 +3835,35 @@ function defineModules(deps) {
|
|
|
3741
3835
|
});
|
|
3742
3836
|
return Promise.all(defines.map(item => defineAsync(item.key, item.value)));
|
|
3743
3837
|
}
|
|
3838
|
+
const createAppConfig = config => {
|
|
3839
|
+
const {
|
|
3840
|
+
dependencies,
|
|
3841
|
+
ErrorFallback,
|
|
3842
|
+
Fallback,
|
|
3843
|
+
store,
|
|
3844
|
+
actions
|
|
3845
|
+
} = config;
|
|
3846
|
+
(0,_core_store__WEBPACK_IMPORTED_MODULE_1__.emit)({
|
|
3847
|
+
[_core_config__WEBPACK_IMPORTED_MODULE_2__.STANDALONE_CONFIG_READY]: false
|
|
3848
|
+
}, true);
|
|
3849
|
+
if (ErrorFallback) {
|
|
3850
|
+
_core_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setErrorFallbackComponent(ErrorFallback);
|
|
3851
|
+
}
|
|
3852
|
+
if (Fallback) {
|
|
3853
|
+
_core_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setFallbackComponent(Fallback);
|
|
3854
|
+
}
|
|
3855
|
+
if (actions) {
|
|
3856
|
+
_core_connector__WEBPACK_IMPORTED_MODULE_3__["default"].setStoreActions(actions);
|
|
3857
|
+
}
|
|
3858
|
+
if (store) {
|
|
3859
|
+
(0,_core_store__WEBPACK_IMPORTED_MODULE_1__.emit)(store);
|
|
3860
|
+
}
|
|
3861
|
+
defineModules(dependencies).then(() => {
|
|
3862
|
+
(0,_core_store__WEBPACK_IMPORTED_MODULE_1__.emit)({
|
|
3863
|
+
[_core_config__WEBPACK_IMPORTED_MODULE_2__.STANDALONE_CONFIG_READY]: true
|
|
3864
|
+
}, true);
|
|
3865
|
+
});
|
|
3866
|
+
};
|
|
3744
3867
|
|
|
3745
3868
|
/***/ }),
|
|
3746
3869
|
|
|
@@ -3767,6 +3890,12 @@ module.exports = require("react");
|
|
|
3767
3890
|
/******/ if (cachedModule !== undefined) {
|
|
3768
3891
|
/******/ return cachedModule.exports;
|
|
3769
3892
|
/******/ }
|
|
3893
|
+
/******/ // Check if module exists (development only)
|
|
3894
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
3895
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
3896
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
3897
|
+
/******/ throw e;
|
|
3898
|
+
/******/ }
|
|
3770
3899
|
/******/ // Create a new module (and put it into the cache)
|
|
3771
3900
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
3772
3901
|
/******/ // no module.id needed
|
|
@@ -3832,8 +3961,11 @@ var __webpack_exports__ = {};
|
|
|
3832
3961
|
\**********************************/
|
|
3833
3962
|
__webpack_require__.r(__webpack_exports__);
|
|
3834
3963
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3964
|
+
/* harmony export */ createAppConfig: function() { return /* reexport safe */ _helper__WEBPACK_IMPORTED_MODULE_6__.createAppConfig; },
|
|
3835
3965
|
/* harmony export */ createComponent: function() { return /* binding */ createComponent; },
|
|
3836
|
-
/* harmony export */
|
|
3966
|
+
/* harmony export */ createDispatch: function() { return /* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_9__.createDispatch; },
|
|
3967
|
+
/* harmony export */ createLogger: function() { return /* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_9__.createLogger; },
|
|
3968
|
+
/* harmony export */ createPostMessage: function() { return /* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_9__.createPostMessage; }
|
|
3837
3969
|
/* harmony export */ });
|
|
3838
3970
|
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
3839
3971
|
/* harmony import */ var _variousjs_requirejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @variousjs/requirejs */ "./node_modules/@variousjs/requirejs/require.js");
|
|
@@ -3846,6 +3978,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3846
3978
|
/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helper */ "./src/standalone/helper.ts");
|
|
3847
3979
|
/* harmony import */ var _core_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/store */ "./src/core/store.ts");
|
|
3848
3980
|
/* harmony import */ var _core_config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/config */ "./src/core/config.ts");
|
|
3981
|
+
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../core */ "./src/core/index.tsx");
|
|
3982
|
+
|
|
3983
|
+
|
|
3849
3984
|
|
|
3850
3985
|
|
|
3851
3986
|
|
|
@@ -3867,7 +4002,6 @@ const Standalone = props => {
|
|
|
3867
4002
|
const {
|
|
3868
4003
|
dependencies,
|
|
3869
4004
|
url,
|
|
3870
|
-
name,
|
|
3871
4005
|
module,
|
|
3872
4006
|
type,
|
|
3873
4007
|
$componentProps,
|
|
@@ -3880,19 +4014,17 @@ const Standalone = props => {
|
|
|
3880
4014
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
|
|
3881
4015
|
(0,_helper__WEBPACK_IMPORTED_MODULE_6__.defineModules)(dependencies || {}).then(() => {
|
|
3882
4016
|
componentNode.current = (0,_core_create_component__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
3883
|
-
name,
|
|
3884
4017
|
module,
|
|
3885
4018
|
url,
|
|
3886
4019
|
type
|
|
3887
4020
|
}, storeKeys);
|
|
3888
4021
|
setComponentReady(true);
|
|
3889
4022
|
});
|
|
3890
|
-
}, [
|
|
4023
|
+
}, [url, module, dependencies, type, storeKeys]);
|
|
3891
4024
|
if (!componentReady || store[_core_config__WEBPACK_IMPORTED_MODULE_8__.STANDALONE_CONFIG_READY] === false) {
|
|
3892
4025
|
const FallBack = _core_connector__WEBPACK_IMPORTED_MODULE_5__["default"].getFallbackComponent();
|
|
3893
4026
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(FallBack, {
|
|
3894
4027
|
$self: {
|
|
3895
|
-
name,
|
|
3896
4028
|
module,
|
|
3897
4029
|
url
|
|
3898
4030
|
},
|
|
@@ -3907,44 +4039,13 @@ const Standalone = props => {
|
|
|
3907
4039
|
Standalone.displayName = 'various-standalone';
|
|
3908
4040
|
const createComponent = args => {
|
|
3909
4041
|
const component = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_core_error_boundary__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
3910
|
-
name: "standalone",
|
|
3911
4042
|
url: args.url,
|
|
3912
4043
|
module: args.module
|
|
3913
4044
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Standalone, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
|
3914
4045
|
$componentProps: props
|
|
3915
4046
|
}, args)));
|
|
3916
|
-
const dispatch = next => {
|
|
3917
|
-
(0,_core_store__WEBPACK_IMPORTED_MODULE_7__.emit)(next, true);
|
|
3918
|
-
};
|
|
3919
4047
|
component.displayName = 'various-standalone-creator';
|
|
3920
|
-
return
|
|
3921
|
-
dispatch
|
|
3922
|
-
});
|
|
3923
|
-
};
|
|
3924
|
-
const createConfig = config => {
|
|
3925
|
-
const {
|
|
3926
|
-
baseDependencies,
|
|
3927
|
-
errorFallback,
|
|
3928
|
-
fallback,
|
|
3929
|
-
store
|
|
3930
|
-
} = config;
|
|
3931
|
-
(0,_core_store__WEBPACK_IMPORTED_MODULE_7__.emit)({
|
|
3932
|
-
[_core_config__WEBPACK_IMPORTED_MODULE_8__.STANDALONE_CONFIG_READY]: false
|
|
3933
|
-
}, true);
|
|
3934
|
-
if (errorFallback) {
|
|
3935
|
-
_core_connector__WEBPACK_IMPORTED_MODULE_5__["default"].setErrorFallbackComponent(errorFallback);
|
|
3936
|
-
}
|
|
3937
|
-
if (fallback) {
|
|
3938
|
-
_core_connector__WEBPACK_IMPORTED_MODULE_5__["default"].setFallbackComponent(fallback);
|
|
3939
|
-
}
|
|
3940
|
-
if (store) {
|
|
3941
|
-
(0,_core_store__WEBPACK_IMPORTED_MODULE_7__.emit)(store);
|
|
3942
|
-
}
|
|
3943
|
-
(0,_helper__WEBPACK_IMPORTED_MODULE_6__.defineModules)(baseDependencies).then(() => {
|
|
3944
|
-
(0,_core_store__WEBPACK_IMPORTED_MODULE_7__.emit)({
|
|
3945
|
-
[_core_config__WEBPACK_IMPORTED_MODULE_8__.STANDALONE_CONFIG_READY]: true
|
|
3946
|
-
});
|
|
3947
|
-
});
|
|
4048
|
+
return component;
|
|
3948
4049
|
};
|
|
3949
4050
|
}();
|
|
3950
4051
|
module.exports = __webpack_exports__;
|