sample-piral 0.14.13 → 0.14.14-beta.3765
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/app/{index.1021e6.js → index.2d688d.js} +323 -120
- package/app/index.2d688d.js.map +1 -0
- package/app/index.d.ts +27 -0
- package/app/index.html +1 -1
- package/app/index.js +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +4 -4
- package/app/index.1021e6.js.map +0 -1
|
@@ -2375,6 +2375,44 @@ DefaultLoadingIndicator.displayName = 'DefaultLoadingIndicator';
|
|
|
2375
2375
|
|
|
2376
2376
|
/***/ }),
|
|
2377
2377
|
|
|
2378
|
+
/***/ "../../framework/piral-core/esm/components/DefaultRouteSwitch.js":
|
|
2379
|
+
/*!***********************************************************************!*\
|
|
2380
|
+
!*** ../../framework/piral-core/esm/components/DefaultRouteSwitch.js ***!
|
|
2381
|
+
\***********************************************************************/
|
|
2382
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2383
|
+
|
|
2384
|
+
"use strict";
|
|
2385
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2386
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2387
|
+
/* harmony export */ "DefaultRouteSwitch": () => (/* binding */ DefaultRouteSwitch)
|
|
2388
|
+
/* harmony export */ });
|
|
2389
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
|
|
2390
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
2391
|
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-router */ "../../../node_modules/react-router/esm/react-router.js");
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
var DefaultRouteSwitch = function DefaultRouteSwitch(_a) {
|
|
2396
|
+
var paths = _a.paths,
|
|
2397
|
+
NotFound = _a.NotFound,
|
|
2398
|
+
props = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["paths", "NotFound"]);
|
|
2399
|
+
|
|
2400
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_2__.Switch, Object.assign({}, props), paths.map(function (_ref) {
|
|
2401
|
+
var path = _ref.path,
|
|
2402
|
+
Component = _ref.Component;
|
|
2403
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_2__.Route, {
|
|
2404
|
+
exact: true,
|
|
2405
|
+
key: path,
|
|
2406
|
+
path: path,
|
|
2407
|
+
component: Component
|
|
2408
|
+
});
|
|
2409
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_2__.Route, {
|
|
2410
|
+
component: NotFound
|
|
2411
|
+
}));
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
/***/ }),
|
|
2415
|
+
|
|
2378
2416
|
/***/ "../../framework/piral-core/esm/components/DefaultRouter.js":
|
|
2379
2417
|
/*!******************************************************************!*\
|
|
2380
2418
|
!*** ../../framework/piral-core/esm/components/DefaultRouter.js ***!
|
|
@@ -2756,19 +2794,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2756
2794
|
/* harmony export */ });
|
|
2757
2795
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
|
|
2758
2796
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
2759
|
-
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router */ "../../../node_modules/react-router/esm/react-router.js");
|
|
2760
2797
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
2761
2798
|
|
|
2762
2799
|
|
|
2763
2800
|
|
|
2764
|
-
|
|
2765
2801
|
/**
|
|
2766
2802
|
* The component for defining the exclusive routes to be used.
|
|
2767
2803
|
*/
|
|
2768
2804
|
|
|
2769
2805
|
var PiralRoutes = function PiralRoutes(_a) {
|
|
2770
2806
|
var NotFound = _a.NotFound,
|
|
2771
|
-
|
|
2807
|
+
RouteSwitch = _a.RouteSwitch,
|
|
2808
|
+
props = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["NotFound", "RouteSwitch"]);
|
|
2772
2809
|
|
|
2773
2810
|
var routes = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useGlobalState)(function (s) {
|
|
2774
2811
|
return s.routes;
|
|
@@ -2776,23 +2813,23 @@ var PiralRoutes = function PiralRoutes(_a) {
|
|
|
2776
2813
|
var pages = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useGlobalState)(function (s) {
|
|
2777
2814
|
return s.registry.pages;
|
|
2778
2815
|
});
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
component: routes[url]
|
|
2816
|
+
var paths = [];
|
|
2817
|
+
Object.keys(routes).map(function (path) {
|
|
2818
|
+
return paths.push({
|
|
2819
|
+
path: path,
|
|
2820
|
+
Component: routes[path]
|
|
2785
2821
|
});
|
|
2786
|
-
})
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
component: pages[url].component
|
|
2822
|
+
});
|
|
2823
|
+
Object.keys(pages).map(function (path) {
|
|
2824
|
+
return paths.push({
|
|
2825
|
+
path: path,
|
|
2826
|
+
Component: pages[path].component
|
|
2792
2827
|
});
|
|
2793
|
-
})
|
|
2794
|
-
|
|
2795
|
-
|
|
2828
|
+
});
|
|
2829
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteSwitch, Object.assign({
|
|
2830
|
+
NotFound: NotFound,
|
|
2831
|
+
paths: paths
|
|
2832
|
+
}, props));
|
|
2796
2833
|
};
|
|
2797
2834
|
PiralRoutes.displayName = 'Routes';
|
|
2798
2835
|
|
|
@@ -2811,8 +2848,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2811
2848
|
/* harmony export */ });
|
|
2812
2849
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
2813
2850
|
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-router */ "../../../node_modules/react-router/esm/react-router.js");
|
|
2814
|
-
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/components.js");
|
|
2815
2851
|
/* harmony import */ var _PiralRoutes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PiralRoutes */ "../../framework/piral-core/esm/components/PiralRoutes.js");
|
|
2852
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/components.js");
|
|
2816
2853
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
2817
2854
|
|
|
2818
2855
|
|
|
@@ -2840,7 +2877,8 @@ var PiralContent = function PiralContent() {
|
|
|
2840
2877
|
}) : loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_1__.PiralLoadingIndicator, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_1__.PiralLayout, {
|
|
2841
2878
|
currentLayout: layout
|
|
2842
2879
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_PiralRoutes__WEBPACK_IMPORTED_MODULE_3__.PiralRoutes, {
|
|
2843
|
-
NotFound: NotFound
|
|
2880
|
+
NotFound: NotFound,
|
|
2881
|
+
RouteSwitch: _components__WEBPACK_IMPORTED_MODULE_1__.PiralRouteSwitch
|
|
2844
2882
|
}));
|
|
2845
2883
|
};
|
|
2846
2884
|
|
|
@@ -3259,6 +3297,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3259
3297
|
/* harmony export */ "PiralError": () => (/* binding */ PiralError),
|
|
3260
3298
|
/* harmony export */ "PiralLoadingIndicator": () => (/* binding */ PiralLoadingIndicator),
|
|
3261
3299
|
/* harmony export */ "PiralRouter": () => (/* binding */ PiralRouter),
|
|
3300
|
+
/* harmony export */ "PiralRouteSwitch": () => (/* binding */ PiralRouteSwitch),
|
|
3262
3301
|
/* harmony export */ "PiralLayout": () => (/* binding */ PiralLayout),
|
|
3263
3302
|
/* harmony export */ "PiralDebug": () => (/* binding */ PiralDebug)
|
|
3264
3303
|
/* harmony export */ });
|
|
@@ -3270,7 +3309,8 @@ function getPiralComponent(name) {
|
|
|
3270
3309
|
return function (props) {
|
|
3271
3310
|
var Component = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalState)(function (s) {
|
|
3272
3311
|
return s.components[name];
|
|
3273
|
-
});
|
|
3312
|
+
}); // tslint:disable-next-line:no-null-keyword
|
|
3313
|
+
|
|
3274
3314
|
return Component ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, Object.assign({}, props)) : null;
|
|
3275
3315
|
};
|
|
3276
3316
|
}
|
|
@@ -3292,6 +3332,12 @@ var PiralLoadingIndicator = getPiralComponent('LoadingIndicator');
|
|
|
3292
3332
|
*/
|
|
3293
3333
|
|
|
3294
3334
|
var PiralRouter = getPiralComponent('Router');
|
|
3335
|
+
/**
|
|
3336
|
+
* Gets the currently registered Route Switch component.
|
|
3337
|
+
* By default the DefaultRouteSwitch component is used.
|
|
3338
|
+
*/
|
|
3339
|
+
|
|
3340
|
+
var PiralRouteSwitch = getPiralComponent('RouteSwitch');
|
|
3295
3341
|
/**
|
|
3296
3342
|
* Gets the currently registered Layout component.
|
|
3297
3343
|
* By default the children are rendered.
|
|
@@ -3320,50 +3366,54 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3320
3366
|
/* harmony export */ "PiralError": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PiralError),
|
|
3321
3367
|
/* harmony export */ "PiralLayout": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PiralLayout),
|
|
3322
3368
|
/* harmony export */ "PiralLoadingIndicator": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PiralLoadingIndicator),
|
|
3369
|
+
/* harmony export */ "PiralRouteSwitch": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PiralRouteSwitch),
|
|
3323
3370
|
/* harmony export */ "PiralRouter": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PiralRouter),
|
|
3324
3371
|
/* harmony export */ "getPiralComponent": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.getPiralComponent),
|
|
3325
3372
|
/* harmony export */ "DefaultErrorInfo": () => (/* reexport safe */ _DefaultErrorInfo__WEBPACK_IMPORTED_MODULE_1__.DefaultErrorInfo),
|
|
3326
3373
|
/* harmony export */ "DefaultLayout": () => (/* reexport safe */ _DefaultLayout__WEBPACK_IMPORTED_MODULE_2__.DefaultLayout),
|
|
3327
3374
|
/* harmony export */ "DefaultLoadingIndicator": () => (/* reexport safe */ _DefaultLoader__WEBPACK_IMPORTED_MODULE_3__.DefaultLoadingIndicator),
|
|
3328
3375
|
/* harmony export */ "DefaultRouter": () => (/* reexport safe */ _DefaultRouter__WEBPACK_IMPORTED_MODULE_4__.DefaultRouter),
|
|
3329
|
-
/* harmony export */ "
|
|
3330
|
-
/* harmony export */ "
|
|
3331
|
-
/* harmony export */ "
|
|
3332
|
-
/* harmony export */ "
|
|
3333
|
-
/* harmony export */ "
|
|
3334
|
-
/* harmony export */ "
|
|
3335
|
-
/* harmony export */ "
|
|
3336
|
-
/* harmony export */ "
|
|
3337
|
-
/* harmony export */ "
|
|
3338
|
-
/* harmony export */ "
|
|
3339
|
-
/* harmony export */ "
|
|
3340
|
-
/* harmony export */ "
|
|
3341
|
-
/* harmony export */ "
|
|
3342
|
-
/* harmony export */ "
|
|
3343
|
-
/* harmony export */ "
|
|
3344
|
-
/* harmony export */ "
|
|
3376
|
+
/* harmony export */ "DefaultRouteSwitch": () => (/* reexport safe */ _DefaultRouteSwitch__WEBPACK_IMPORTED_MODULE_5__.DefaultRouteSwitch),
|
|
3377
|
+
/* harmony export */ "ErrorBoundary": () => (/* reexport safe */ _ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__.ErrorBoundary),
|
|
3378
|
+
/* harmony export */ "ExtensionSlot": () => (/* reexport safe */ _ExtensionSlot__WEBPACK_IMPORTED_MODULE_7__.ExtensionSlot),
|
|
3379
|
+
/* harmony export */ "Mediator": () => (/* reexport safe */ _Mediator__WEBPACK_IMPORTED_MODULE_8__.Mediator),
|
|
3380
|
+
/* harmony export */ "PiralRoutes": () => (/* reexport safe */ _PiralRoutes__WEBPACK_IMPORTED_MODULE_9__.PiralRoutes),
|
|
3381
|
+
/* harmony export */ "PiralView": () => (/* reexport safe */ _PiralView__WEBPACK_IMPORTED_MODULE_10__.PiralView),
|
|
3382
|
+
/* harmony export */ "PortalRenderer": () => (/* reexport safe */ _PortalRenderer__WEBPACK_IMPORTED_MODULE_11__.PortalRenderer),
|
|
3383
|
+
/* harmony export */ "ResponsiveLayout": () => (/* reexport safe */ _ResponsiveLayout__WEBPACK_IMPORTED_MODULE_12__.ResponsiveLayout),
|
|
3384
|
+
/* harmony export */ "SetComponent": () => (/* reexport safe */ _SetComponent__WEBPACK_IMPORTED_MODULE_13__.SetComponent),
|
|
3385
|
+
/* harmony export */ "SetError": () => (/* reexport safe */ _SetError__WEBPACK_IMPORTED_MODULE_14__.SetError),
|
|
3386
|
+
/* harmony export */ "SetErrors": () => (/* reexport safe */ _SetErrors__WEBPACK_IMPORTED_MODULE_15__.SetErrors),
|
|
3387
|
+
/* harmony export */ "SetLayout": () => (/* reexport safe */ _SetLayout__WEBPACK_IMPORTED_MODULE_16__.SetLayout),
|
|
3388
|
+
/* harmony export */ "SetProvider": () => (/* reexport safe */ _SetProvider__WEBPACK_IMPORTED_MODULE_17__.SetProvider),
|
|
3389
|
+
/* harmony export */ "SetRedirect": () => (/* reexport safe */ _SetRedirect__WEBPACK_IMPORTED_MODULE_18__.SetRedirect),
|
|
3390
|
+
/* harmony export */ "SetRoute": () => (/* reexport safe */ _SetRoute__WEBPACK_IMPORTED_MODULE_19__.SetRoute),
|
|
3391
|
+
/* harmony export */ "SwitchErrorInfo": () => (/* reexport safe */ _SwitchErrorInfo__WEBPACK_IMPORTED_MODULE_20__.SwitchErrorInfo),
|
|
3392
|
+
/* harmony export */ "wrapComponent": () => (/* reexport safe */ _wrapComponent__WEBPACK_IMPORTED_MODULE_21__.wrapComponent)
|
|
3345
3393
|
/* harmony export */ });
|
|
3346
3394
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/components.js");
|
|
3347
3395
|
/* harmony import */ var _DefaultErrorInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DefaultErrorInfo */ "../../framework/piral-core/esm/components/DefaultErrorInfo.js");
|
|
3348
3396
|
/* harmony import */ var _DefaultLayout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DefaultLayout */ "../../framework/piral-core/esm/components/DefaultLayout.js");
|
|
3349
3397
|
/* harmony import */ var _DefaultLoader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DefaultLoader */ "../../framework/piral-core/esm/components/DefaultLoader.js");
|
|
3350
3398
|
/* harmony import */ var _DefaultRouter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DefaultRouter */ "../../framework/piral-core/esm/components/DefaultRouter.js");
|
|
3351
|
-
/* harmony import */ var
|
|
3352
|
-
/* harmony import */ var
|
|
3353
|
-
/* harmony import */ var
|
|
3354
|
-
/* harmony import */ var
|
|
3355
|
-
/* harmony import */ var
|
|
3356
|
-
/* harmony import */ var
|
|
3357
|
-
/* harmony import */ var
|
|
3358
|
-
/* harmony import */ var
|
|
3359
|
-
/* harmony import */ var
|
|
3360
|
-
/* harmony import */ var
|
|
3361
|
-
/* harmony import */ var
|
|
3362
|
-
/* harmony import */ var
|
|
3363
|
-
/* harmony import */ var
|
|
3364
|
-
/* harmony import */ var
|
|
3365
|
-
/* harmony import */ var
|
|
3366
|
-
/* harmony import */ var
|
|
3399
|
+
/* harmony import */ var _DefaultRouteSwitch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DefaultRouteSwitch */ "../../framework/piral-core/esm/components/DefaultRouteSwitch.js");
|
|
3400
|
+
/* harmony import */ var _ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ErrorBoundary */ "../../framework/piral-core/esm/components/ErrorBoundary.js");
|
|
3401
|
+
/* harmony import */ var _ExtensionSlot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExtensionSlot */ "../../framework/piral-core/esm/components/ExtensionSlot.js");
|
|
3402
|
+
/* harmony import */ var _Mediator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Mediator */ "../../framework/piral-core/esm/components/Mediator.js");
|
|
3403
|
+
/* harmony import */ var _PiralRoutes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./PiralRoutes */ "../../framework/piral-core/esm/components/PiralRoutes.js");
|
|
3404
|
+
/* harmony import */ var _PiralView__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PiralView */ "../../framework/piral-core/esm/components/PiralView.js");
|
|
3405
|
+
/* harmony import */ var _PortalRenderer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./PortalRenderer */ "../../framework/piral-core/esm/components/PortalRenderer.js");
|
|
3406
|
+
/* harmony import */ var _ResponsiveLayout__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ResponsiveLayout */ "../../framework/piral-core/esm/components/ResponsiveLayout.js");
|
|
3407
|
+
/* harmony import */ var _SetComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SetComponent */ "../../framework/piral-core/esm/components/SetComponent.js");
|
|
3408
|
+
/* harmony import */ var _SetError__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SetError */ "../../framework/piral-core/esm/components/SetError.js");
|
|
3409
|
+
/* harmony import */ var _SetErrors__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SetErrors */ "../../framework/piral-core/esm/components/SetErrors.js");
|
|
3410
|
+
/* harmony import */ var _SetLayout__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SetLayout */ "../../framework/piral-core/esm/components/SetLayout.js");
|
|
3411
|
+
/* harmony import */ var _SetProvider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./SetProvider */ "../../framework/piral-core/esm/components/SetProvider.js");
|
|
3412
|
+
/* harmony import */ var _SetRedirect__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./SetRedirect */ "../../framework/piral-core/esm/components/SetRedirect.js");
|
|
3413
|
+
/* harmony import */ var _SetRoute__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./SetRoute */ "../../framework/piral-core/esm/components/SetRoute.js");
|
|
3414
|
+
/* harmony import */ var _SwitchErrorInfo__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SwitchErrorInfo */ "../../framework/piral-core/esm/components/SwitchErrorInfo.js");
|
|
3415
|
+
/* harmony import */ var _wrapComponent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./wrapComponent */ "../../framework/piral-core/esm/components/wrapComponent.js");
|
|
3416
|
+
|
|
3367
3417
|
|
|
3368
3418
|
|
|
3369
3419
|
|
|
@@ -3561,7 +3611,7 @@ function createInstance() {
|
|
|
3561
3611
|
var createApi = apiFactory(context, usedPlugins);
|
|
3562
3612
|
var root = createApi({
|
|
3563
3613
|
name: 'root',
|
|
3564
|
-
version: "0.14.
|
|
3614
|
+
version: "0.14.14-beta.3765" || 0,
|
|
3565
3615
|
spec: ''
|
|
3566
3616
|
});
|
|
3567
3617
|
var options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
|
|
@@ -3920,6 +3970,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3920
3970
|
/* harmony export */ "DefaultErrorInfo": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.DefaultErrorInfo),
|
|
3921
3971
|
/* harmony export */ "DefaultLayout": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.DefaultLayout),
|
|
3922
3972
|
/* harmony export */ "DefaultLoadingIndicator": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.DefaultLoadingIndicator),
|
|
3973
|
+
/* harmony export */ "DefaultRouteSwitch": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.DefaultRouteSwitch),
|
|
3923
3974
|
/* harmony export */ "DefaultRouter": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.DefaultRouter),
|
|
3924
3975
|
/* harmony export */ "ErrorBoundary": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.ErrorBoundary),
|
|
3925
3976
|
/* harmony export */ "ExtensionSlot": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.ExtensionSlot),
|
|
@@ -3928,6 +3979,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3928
3979
|
/* harmony export */ "PiralError": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralError),
|
|
3929
3980
|
/* harmony export */ "PiralLayout": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralLayout),
|
|
3930
3981
|
/* harmony export */ "PiralLoadingIndicator": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralLoadingIndicator),
|
|
3982
|
+
/* harmony export */ "PiralRouteSwitch": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralRouteSwitch),
|
|
3931
3983
|
/* harmony export */ "PiralRouter": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralRouter),
|
|
3932
3984
|
/* harmony export */ "PiralRoutes": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralRoutes),
|
|
3933
3985
|
/* harmony export */ "PiralView": () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.PiralView),
|
|
@@ -4476,12 +4528,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4476
4528
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4477
4529
|
/* harmony export */ "createGlobalState": () => (/* binding */ createGlobalState)
|
|
4478
4530
|
/* harmony export */ });
|
|
4479
|
-
/* harmony import */ var
|
|
4480
|
-
/* harmony import */ var
|
|
4531
|
+
/* harmony import */ var _dbeining_react_atom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @dbeining/react-atom */ "../../../node_modules/@dbeining/react-atom/dist/react-atom.js");
|
|
4532
|
+
/* harmony import */ var _dbeining_react_atom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_dbeining_react_atom__WEBPACK_IMPORTED_MODULE_5__);
|
|
4481
4533
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/DefaultErrorInfo.js");
|
|
4482
4534
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/DefaultLoader.js");
|
|
4483
4535
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/DefaultRouter.js");
|
|
4484
|
-
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/
|
|
4536
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/DefaultRouteSwitch.js");
|
|
4537
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components */ "../../framework/piral-core/esm/components/DefaultLayout.js");
|
|
4485
4538
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4486
4539
|
|
|
4487
4540
|
|
|
@@ -4517,7 +4570,8 @@ function createGlobalState() {
|
|
|
4517
4570
|
ErrorInfo: _components__WEBPACK_IMPORTED_MODULE_0__.DefaultErrorInfo,
|
|
4518
4571
|
LoadingIndicator: _components__WEBPACK_IMPORTED_MODULE_1__.DefaultLoadingIndicator,
|
|
4519
4572
|
Router: _components__WEBPACK_IMPORTED_MODULE_2__.DefaultRouter,
|
|
4520
|
-
|
|
4573
|
+
RouteSwitch: _components__WEBPACK_IMPORTED_MODULE_3__.DefaultRouteSwitch,
|
|
4574
|
+
Layout: _components__WEBPACK_IMPORTED_MODULE_4__.DefaultLayout
|
|
4521
4575
|
},
|
|
4522
4576
|
errorComponents: {},
|
|
4523
4577
|
registry: {
|
|
@@ -4530,7 +4584,7 @@ function createGlobalState() {
|
|
|
4530
4584
|
portals: {},
|
|
4531
4585
|
modules: []
|
|
4532
4586
|
};
|
|
4533
|
-
return
|
|
4587
|
+
return _dbeining_react_atom__WEBPACK_IMPORTED_MODULE_5__.Atom.of(extend(defaultState, customState));
|
|
4534
4588
|
}
|
|
4535
4589
|
|
|
4536
4590
|
/***/ }),
|
|
@@ -5693,6 +5747,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5693
5747
|
/* harmony export */ "DefaultErrorInfo": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.DefaultErrorInfo),
|
|
5694
5748
|
/* harmony export */ "DefaultLayout": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.DefaultLayout),
|
|
5695
5749
|
/* harmony export */ "DefaultLoadingIndicator": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.DefaultLoadingIndicator),
|
|
5750
|
+
/* harmony export */ "DefaultRouteSwitch": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.DefaultRouteSwitch),
|
|
5696
5751
|
/* harmony export */ "DefaultRouter": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.DefaultRouter),
|
|
5697
5752
|
/* harmony export */ "ErrorBoundary": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.ErrorBoundary),
|
|
5698
5753
|
/* harmony export */ "ExtensionSlot": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.ExtensionSlot),
|
|
@@ -5702,6 +5757,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5702
5757
|
/* harmony export */ "PiralError": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralError),
|
|
5703
5758
|
/* harmony export */ "PiralLayout": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralLayout),
|
|
5704
5759
|
/* harmony export */ "PiralLoadingIndicator": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralLoadingIndicator),
|
|
5760
|
+
/* harmony export */ "PiralRouteSwitch": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralRouteSwitch),
|
|
5705
5761
|
/* harmony export */ "PiralRouter": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralRouter),
|
|
5706
5762
|
/* harmony export */ "PiralRoutes": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralRoutes),
|
|
5707
5763
|
/* harmony export */ "PiralView": () => (/* reexport safe */ piral_core__WEBPACK_IMPORTED_MODULE_0__.PiralView),
|
|
@@ -8863,6 +8919,89 @@ var Localizer = /*#__PURE__*/function () {
|
|
|
8863
8919
|
|
|
8864
8920
|
/***/ }),
|
|
8865
8921
|
|
|
8922
|
+
/***/ "../../utilities/piral-debug-utils/esm/DebugRouteSwitch.js":
|
|
8923
|
+
/*!*****************************************************************!*\
|
|
8924
|
+
!*** ../../utilities/piral-debug-utils/esm/DebugRouteSwitch.js ***!
|
|
8925
|
+
\*****************************************************************/
|
|
8926
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8927
|
+
|
|
8928
|
+
"use strict";
|
|
8929
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8930
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8931
|
+
/* harmony export */ "freezeRouteRefresh": () => (/* binding */ freezeRouteRefresh),
|
|
8932
|
+
/* harmony export */ "DebugRouteSwitch": () => (/* binding */ DebugRouteSwitch)
|
|
8933
|
+
/* harmony export */ });
|
|
8934
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
8935
|
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router */ "../../../node_modules/react-router/esm/react-router.js");
|
|
8936
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8937
|
+
|
|
8938
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8939
|
+
|
|
8940
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8941
|
+
|
|
8942
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8943
|
+
|
|
8944
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8945
|
+
|
|
8946
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8947
|
+
|
|
8948
|
+
|
|
8949
|
+
|
|
8950
|
+
var debugRouteCache = {
|
|
8951
|
+
active: 0,
|
|
8952
|
+
paths: [],
|
|
8953
|
+
refresh: undefined
|
|
8954
|
+
};
|
|
8955
|
+
function freezeRouteRefresh() {
|
|
8956
|
+
debugRouteCache.active++;
|
|
8957
|
+
return function () {
|
|
8958
|
+
var _a;
|
|
8959
|
+
|
|
8960
|
+
debugRouteCache.active--;
|
|
8961
|
+
|
|
8962
|
+
if (!debugRouteCache.active) {
|
|
8963
|
+
(_a = debugRouteCache.refresh) === null || _a === void 0 ? void 0 : _a.call(debugRouteCache, function (s) {
|
|
8964
|
+
return s + 1;
|
|
8965
|
+
});
|
|
8966
|
+
}
|
|
8967
|
+
};
|
|
8968
|
+
}
|
|
8969
|
+
var DebugRouteSwitch = function DebugRouteSwitch(_ref) {
|
|
8970
|
+
var paths = _ref.paths,
|
|
8971
|
+
NotFound = _ref.NotFound;
|
|
8972
|
+
|
|
8973
|
+
var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__.useState(0),
|
|
8974
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
8975
|
+
_ = _React$useState2[0],
|
|
8976
|
+
triggerChange = _React$useState2[1];
|
|
8977
|
+
|
|
8978
|
+
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {
|
|
8979
|
+
debugRouteCache.refresh = triggerChange;
|
|
8980
|
+
return function () {
|
|
8981
|
+
debugRouteCache.refresh = undefined;
|
|
8982
|
+
};
|
|
8983
|
+
}, []);
|
|
8984
|
+
|
|
8985
|
+
if (!debugRouteCache.active) {
|
|
8986
|
+
debugRouteCache.paths = paths;
|
|
8987
|
+
}
|
|
8988
|
+
|
|
8989
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_1__.Switch, null, debugRouteCache.paths.map(function (_ref2) {
|
|
8990
|
+
var path = _ref2.path,
|
|
8991
|
+
Component = _ref2.Component;
|
|
8992
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_1__.Route, {
|
|
8993
|
+
exact: true,
|
|
8994
|
+
key: path,
|
|
8995
|
+
path: path,
|
|
8996
|
+
component: Component
|
|
8997
|
+
});
|
|
8998
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_1__.Route, {
|
|
8999
|
+
component: NotFound
|
|
9000
|
+
}));
|
|
9001
|
+
};
|
|
9002
|
+
|
|
9003
|
+
/***/ }),
|
|
9004
|
+
|
|
8866
9005
|
/***/ "../../utilities/piral-debug-utils/esm/DebugTracker.js":
|
|
8867
9006
|
/*!*************************************************************!*\
|
|
8868
9007
|
!*** ../../utilities/piral-debug-utils/esm/DebugTracker.js ***!
|
|
@@ -9097,6 +9236,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9097
9236
|
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state */ "../../utilities/piral-debug-utils/esm/state.js");
|
|
9098
9237
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9099
9238
|
|
|
9239
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9240
|
+
|
|
9241
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9242
|
+
|
|
9243
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9244
|
+
|
|
9245
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9246
|
+
|
|
9247
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9248
|
+
|
|
9249
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9250
|
+
|
|
9100
9251
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
9101
9252
|
|
|
9102
9253
|
|
|
@@ -9337,12 +9488,12 @@ function installPiralDebug(options) {
|
|
|
9337
9488
|
debug: debugApiVersion,
|
|
9338
9489
|
instance: {
|
|
9339
9490
|
name: "sample-piral",
|
|
9340
|
-
version: "0.14.
|
|
9491
|
+
version: "0.14.14-beta.3765",
|
|
9341
9492
|
dependencies: "reactstrap,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
|
|
9342
9493
|
},
|
|
9343
9494
|
build: {
|
|
9344
|
-
date: "2022-
|
|
9345
|
-
cli: "0.14.
|
|
9495
|
+
date: "2022-03-02T17:59:28.793Z",
|
|
9496
|
+
cli: "0.14.13",
|
|
9346
9497
|
compat: "0.14"
|
|
9347
9498
|
},
|
|
9348
9499
|
pilets: {
|
|
@@ -9396,10 +9547,22 @@ function installPiralDebug(options) {
|
|
|
9396
9547
|
|
|
9397
9548
|
var getDependencyMap = function getDependencyMap() {
|
|
9398
9549
|
var dependencyMap = {};
|
|
9550
|
+
|
|
9551
|
+
var addDeps = function addDeps(pilet, dependencies) {
|
|
9552
|
+
var _dependencyMap$pilet;
|
|
9553
|
+
|
|
9554
|
+
if (!(pilet in dependencyMap)) {
|
|
9555
|
+
dependencyMap[pilet] = [];
|
|
9556
|
+
}
|
|
9557
|
+
|
|
9558
|
+
(_dependencyMap$pilet = dependencyMap[pilet]).push.apply(_dependencyMap$pilet, _toConsumableArray(dependencies));
|
|
9559
|
+
};
|
|
9560
|
+
|
|
9399
9561
|
var pilets = getPilets().map(function (pilet) {
|
|
9400
9562
|
return {
|
|
9401
9563
|
name: pilet.name,
|
|
9402
|
-
link: pilet.link
|
|
9564
|
+
link: pilet.link,
|
|
9565
|
+
base: pilet.base
|
|
9403
9566
|
};
|
|
9404
9567
|
}).filter(function (m) {
|
|
9405
9568
|
return m.link;
|
|
@@ -9411,7 +9574,15 @@ function installPiralDebug(options) {
|
|
|
9411
9574
|
});
|
|
9412
9575
|
|
|
9413
9576
|
if (pilet) {
|
|
9414
|
-
|
|
9577
|
+
addDeps(pilet.name, dependencies);
|
|
9578
|
+
} else if (!pilet) {
|
|
9579
|
+
var parent = pilets.find(function (p) {
|
|
9580
|
+
return url.startsWith(p.base);
|
|
9581
|
+
});
|
|
9582
|
+
|
|
9583
|
+
if (parent) {
|
|
9584
|
+
addDeps(parent.name, dependencies);
|
|
9585
|
+
}
|
|
9415
9586
|
}
|
|
9416
9587
|
});
|
|
9417
9588
|
sendMessage({
|
|
@@ -9650,10 +9821,11 @@ function decycle(obj) {
|
|
|
9650
9821
|
"use strict";
|
|
9651
9822
|
__webpack_require__.r(__webpack_exports__);
|
|
9652
9823
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9653
|
-
/* harmony export */ "
|
|
9824
|
+
/* harmony export */ "installPiletsEmulator": () => (/* binding */ installPiletsEmulator)
|
|
9654
9825
|
/* harmony export */ });
|
|
9655
|
-
/* harmony import */ var
|
|
9656
|
-
/* harmony import */ var
|
|
9826
|
+
/* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/utils.js");
|
|
9827
|
+
/* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/setup.js");
|
|
9828
|
+
/* harmony import */ var _DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DebugRouteSwitch */ "../../utilities/piral-debug-utils/esm/DebugRouteSwitch.js");
|
|
9657
9829
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9658
9830
|
|
|
9659
9831
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -9667,10 +9839,12 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
9667
9839
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9668
9840
|
|
|
9669
9841
|
|
|
9670
|
-
|
|
9842
|
+
|
|
9843
|
+
function installPiletsEmulator(requestPilets, options) {
|
|
9671
9844
|
var loadPilet = options.loadPilet,
|
|
9672
9845
|
createApi = options.createApi,
|
|
9673
9846
|
injectPilet = options.injectPilet,
|
|
9847
|
+
integrate = options.integrate,
|
|
9674
9848
|
_options$piletApiFall = options.piletApiFallback,
|
|
9675
9849
|
piletApiFallback = _options$piletApiFall === void 0 ? '/$pilet-api' : _options$piletApiFall; // check if pilets should be loaded
|
|
9676
9850
|
|
|
@@ -9680,64 +9854,85 @@ function withEmulatorPilets(requestPilets, options) {
|
|
|
9680
9854
|
return Promise.resolve([]);
|
|
9681
9855
|
};
|
|
9682
9856
|
|
|
9683
|
-
var
|
|
9684
|
-
return function () {
|
|
9685
|
-
var promise = requester(); // the window['dbg:pilet-api'] should point to an API address used as a proxy, fall back to '/$pilet-api' if unavailable
|
|
9857
|
+
var _requester = loadPilets ? requestPilets : noPilets;
|
|
9686
9858
|
|
|
9687
|
-
|
|
9859
|
+
integrate({
|
|
9860
|
+
components: {
|
|
9861
|
+
RouteSwitch: _DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.DebugRouteSwitch
|
|
9862
|
+
},
|
|
9863
|
+
requester: function requester() {
|
|
9864
|
+
var promise = _requester(); // the window['dbg:pilet-api'] should point to an API address used as a proxy, fall back to '/$pilet-api' if unavailable
|
|
9688
9865
|
|
|
9689
|
-
var initialTarget = /^https?:/.test(piletApi) ? piletApi : "".concat(location.origin).concat(piletApi[0] === '/' ? '' : '/').concat(piletApi);
|
|
9690
|
-
var updateTarget = initialTarget.replace('http', 'ws');
|
|
9691
|
-
var ws = new WebSocket(updateTarget);
|
|
9692
|
-
var appendix = fetch(initialTarget).then(function (res) {
|
|
9693
|
-
return res.json();
|
|
9694
|
-
}).then(function (item) {
|
|
9695
|
-
return Array.isArray(item) ? item : [item];
|
|
9696
|
-
});
|
|
9697
9866
|
|
|
9698
|
-
|
|
9699
|
-
var data = _ref.data;
|
|
9700
|
-
var hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
|
|
9867
|
+
var piletApi = window['dbg:pilet-api'] || piletApiFallback; // either take a full URI or make it an absolute path relative to the current origin
|
|
9701
9868
|
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9869
|
+
var initialTarget = /^https?:/.test(piletApi) ? piletApi : "".concat(location.origin).concat(piletApi[0] === '/' ? '' : '/').concat(piletApi);
|
|
9870
|
+
var updateTarget = initialTarget.replace('http', 'ws');
|
|
9871
|
+
var ws = new WebSocket(updateTarget);
|
|
9872
|
+
var timeoutCache = {};
|
|
9873
|
+
var timeout = 150;
|
|
9874
|
+
var appendix = fetch(initialTarget).then(function (res) {
|
|
9875
|
+
return res.json();
|
|
9876
|
+
}).then(function (item) {
|
|
9877
|
+
return Array.isArray(item) ? item : [item];
|
|
9878
|
+
});
|
|
9705
9879
|
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9880
|
+
ws.onmessage = function (_ref) {
|
|
9881
|
+
var data = _ref.data;
|
|
9882
|
+
var hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
|
|
9709
9883
|
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
}
|
|
9884
|
+
if (!hardRefresh) {
|
|
9885
|
+
// standard setting is to just perform an inject
|
|
9886
|
+
var meta = JSON.parse(data);
|
|
9887
|
+
var name = meta.name; // like a debounce; only one change of the current pilet should be actively processed
|
|
9715
9888
|
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
console.error(error);
|
|
9719
|
-
}
|
|
9720
|
-
});
|
|
9721
|
-
} else {
|
|
9722
|
-
location.reload();
|
|
9723
|
-
}
|
|
9724
|
-
};
|
|
9889
|
+
clearTimeout(timeoutCache[name]); // some bundlers may have fired before writing to the disk
|
|
9890
|
+
// so we give them a bit of time before actually loading the pilet
|
|
9725
9891
|
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9892
|
+
timeoutCache[name] = setTimeout(function () {
|
|
9893
|
+
// we should make sure to only refresh the page / router if pilets have been loaded
|
|
9894
|
+
var unfreeze = (0,_DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.freezeRouteRefresh)(); // tear down pilet
|
|
9895
|
+
|
|
9896
|
+
injectPilet({
|
|
9897
|
+
name: name
|
|
9898
|
+
}); // load and evaluate pilet
|
|
9899
|
+
|
|
9900
|
+
loadPilet(meta).then(function (pilet) {
|
|
9901
|
+
try {
|
|
9902
|
+
if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(injectPilet)) {
|
|
9903
|
+
injectPilet(pilet);
|
|
9904
|
+
} // setup actual pilet
|
|
9905
|
+
|
|
9906
|
+
|
|
9907
|
+
(0,piral_base__WEBPACK_IMPORTED_MODULE_2__.setupPilet)(pilet, createApi); // disable route cache, should be zero again and lead to route refresh
|
|
9908
|
+
|
|
9909
|
+
unfreeze();
|
|
9910
|
+
} catch (error) {
|
|
9911
|
+
console.error(error);
|
|
9912
|
+
}
|
|
9913
|
+
});
|
|
9914
|
+
}, timeout);
|
|
9915
|
+
} else {
|
|
9916
|
+
location.reload();
|
|
9917
|
+
}
|
|
9918
|
+
};
|
|
9919
|
+
|
|
9920
|
+
return promise["catch"](function (err) {
|
|
9921
|
+
console.error("Requesting the pilets failed. We'll continue loading without pilets (DEBUG only).", err);
|
|
9922
|
+
return [];
|
|
9923
|
+
}).then(function (pilets) {
|
|
9924
|
+
return appendix.then(function (debugPilets) {
|
|
9925
|
+
var debugPiletNames = debugPilets.map(function (m) {
|
|
9926
|
+
return m.name;
|
|
9927
|
+
});
|
|
9928
|
+
var feedPilets = pilets.filter(function (m) {
|
|
9929
|
+
return !debugPiletNames.includes(m.name);
|
|
9930
|
+
});
|
|
9931
|
+
return [].concat(_toConsumableArray(feedPilets), _toConsumableArray(debugPilets));
|
|
9736
9932
|
});
|
|
9737
|
-
return [].concat(_toConsumableArray(feedPilets), _toConsumableArray(debugPilets));
|
|
9738
9933
|
});
|
|
9739
|
-
}
|
|
9740
|
-
};
|
|
9934
|
+
}
|
|
9935
|
+
});
|
|
9741
9936
|
}
|
|
9742
9937
|
|
|
9743
9938
|
/***/ }),
|
|
@@ -9752,7 +9947,7 @@ function withEmulatorPilets(requestPilets, options) {
|
|
|
9752
9947
|
__webpack_require__.r(__webpack_exports__);
|
|
9753
9948
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9754
9949
|
/* harmony export */ "installPiralDebug": () => (/* reexport safe */ _debug__WEBPACK_IMPORTED_MODULE_0__.installPiralDebug),
|
|
9755
|
-
/* harmony export */ "
|
|
9950
|
+
/* harmony export */ "installPiletsEmulator": () => (/* reexport safe */ _emulator__WEBPACK_IMPORTED_MODULE_1__.installPiletsEmulator)
|
|
9756
9951
|
/* harmony export */ });
|
|
9757
9952
|
/* harmony import */ var _debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./debug */ "../../utilities/piral-debug-utils/esm/debug.js");
|
|
9758
9953
|
/* harmony import */ var _emulator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./emulator */ "../../utilities/piral-debug-utils/esm/emulator.js");
|
|
@@ -9880,10 +10075,18 @@ exports.integrate = void 0;
|
|
|
9880
10075
|
var piral_debug_utils_1 = __webpack_require__(/*! piral-debug-utils */ "../../utilities/piral-debug-utils/esm/index.js");
|
|
9881
10076
|
|
|
9882
10077
|
function integrate(context, options) {
|
|
9883
|
-
|
|
10078
|
+
(0, piral_debug_utils_1.installPiletsEmulator)(options.fetchPilets, {
|
|
9884
10079
|
injectPilet: context.injectPilet,
|
|
9885
10080
|
createApi: options.createApi,
|
|
9886
|
-
loadPilet: options.loadPilet
|
|
10081
|
+
loadPilet: options.loadPilet,
|
|
10082
|
+
integrate: function integrate(emulator) {
|
|
10083
|
+
context.dispatch(function (s) {
|
|
10084
|
+
return Object.assign(Object.assign({}, s), {
|
|
10085
|
+
components: Object.assign(Object.assign({}, s.components), emulator.components)
|
|
10086
|
+
});
|
|
10087
|
+
});
|
|
10088
|
+
options.fetchPilets = emulator.requester;
|
|
10089
|
+
}
|
|
9887
10090
|
});
|
|
9888
10091
|
}
|
|
9889
10092
|
|
|
@@ -80693,4 +80896,4 @@ var layout_1 = __webpack_require__(/*! ./layout */ "./src/layout.tsx");
|
|
|
80693
80896
|
|
|
80694
80897
|
/******/ })()
|
|
80695
80898
|
;
|
|
80696
|
-
//# sourceMappingURL=index.
|
|
80899
|
+
//# sourceMappingURL=index.2d688d.js.map
|