sample-piral 1.1.0-beta.5752 → 1.1.0-beta.5772
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.0dafac.js → index.a1d6d3.js} +54 -71
- package/app/index.a1d6d3.js.map +1 -0
- package/app/index.d.ts +87 -54
- 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 +8 -7
- package/app/index.0dafac.js.map +0 -1
|
@@ -248,10 +248,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
248
248
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
249
249
|
/* harmony import */ var _createInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createInstance */ "../../framework/piral-core/esm/createInstance.js");
|
|
250
250
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/components.js");
|
|
251
|
-
/* harmony import */ var
|
|
251
|
+
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components */ "../../framework/piral-core/esm/components/PiralView.js");
|
|
252
252
|
/* harmony import */ var _PiralContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PiralContext */ "../../framework/piral-core/esm/PiralContext.js");
|
|
253
|
-
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
254
|
-
|
|
255
253
|
|
|
256
254
|
|
|
257
255
|
|
|
@@ -279,8 +277,8 @@ var Piral = function Piral(_ref) {
|
|
|
279
277
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_PiralContext__WEBPACK_IMPORTED_MODULE_2__.PiralContext, {
|
|
280
278
|
instance: instance
|
|
281
279
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_3__.RegisteredRouter, {
|
|
282
|
-
publicPath:
|
|
283
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
280
|
+
publicPath: instance.context.navigation.publicPath
|
|
281
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_4__.PiralView, {
|
|
284
282
|
breakpoints: breakpoints
|
|
285
283
|
}, children)));
|
|
286
284
|
};
|
|
@@ -1116,21 +1114,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1116
1114
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1117
1115
|
/* harmony export */ "PiralRoutes": () => (/* binding */ PiralRoutes)
|
|
1118
1116
|
/* harmony export */ });
|
|
1119
|
-
/* harmony import */ var
|
|
1117
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
|
|
1120
1118
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
1121
1119
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1122
|
-
/* harmony import */ var
|
|
1120
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
1121
|
+
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
1122
|
+
|
|
1123
1123
|
|
|
1124
1124
|
|
|
1125
1125
|
|
|
1126
|
+
function useRoutes() {
|
|
1127
|
+
var routes = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalState)(function (s) {
|
|
1128
|
+
return s.routes;
|
|
1129
|
+
});
|
|
1130
|
+
var pages = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalState)(function (s) {
|
|
1131
|
+
return s.registry.pages;
|
|
1132
|
+
});
|
|
1133
|
+
var paths = [];
|
|
1134
|
+
Object.keys(routes).map(function (path) {
|
|
1135
|
+
return paths.push({
|
|
1136
|
+
path: path,
|
|
1137
|
+
Component: routes[path]
|
|
1138
|
+
});
|
|
1139
|
+
});
|
|
1140
|
+
Object.keys(pages).map(function (path) {
|
|
1141
|
+
return paths.push({
|
|
1142
|
+
path: path,
|
|
1143
|
+
Component: pages[path].component
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
return (0,_app_codegen__WEBPACK_IMPORTED_MODULE_2__.useRouteFilter)(paths);
|
|
1147
|
+
}
|
|
1126
1148
|
/**
|
|
1127
1149
|
* The component for defining the exclusive routes to be used.
|
|
1128
1150
|
*/
|
|
1129
1151
|
var PiralRoutes = function PiralRoutes(_a) {
|
|
1130
1152
|
var NotFound = _a.NotFound,
|
|
1131
1153
|
RouteSwitch = _a.RouteSwitch,
|
|
1132
|
-
props = (0,
|
|
1133
|
-
var paths =
|
|
1154
|
+
props = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__rest)(_a, ["NotFound", "RouteSwitch"]);
|
|
1155
|
+
var paths = useRoutes();
|
|
1134
1156
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteSwitch, Object.assign({
|
|
1135
1157
|
NotFound: NotFound,
|
|
1136
1158
|
paths: paths
|
|
@@ -1413,19 +1435,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1413
1435
|
/* harmony export */ });
|
|
1414
1436
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
1415
1437
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1416
|
-
/* harmony import */ var
|
|
1417
|
-
/* harmony import */ var
|
|
1438
|
+
/* harmony import */ var _PortalRenderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PortalRenderer */ "../../framework/piral-core/esm/components/PortalRenderer.js");
|
|
1439
|
+
/* harmony import */ var _ForeignComponentContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ForeignComponentContainer */ "../../framework/piral-core/esm/components/ForeignComponentContainer.js");
|
|
1418
1440
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
1419
1441
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/helpers.js");
|
|
1420
|
-
/* harmony import */ var
|
|
1421
|
-
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
1442
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/foreign.js");
|
|
1422
1443
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1423
1444
|
|
|
1424
1445
|
|
|
1425
1446
|
|
|
1426
1447
|
|
|
1427
1448
|
|
|
1428
|
-
|
|
1429
1449
|
// this is an arbitrary start number to have 6 digits
|
|
1430
1450
|
var portalIdBase = 123456;
|
|
1431
1451
|
function wrapReactComponent(Component, captured, Wrapper) {
|
|
@@ -1444,7 +1464,7 @@ function wrapForeignComponent(component, captured, Wrapper) {
|
|
|
1444
1464
|
// router added for backwards compatibility
|
|
1445
1465
|
var context = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(function () {
|
|
1446
1466
|
return {
|
|
1447
|
-
publicPath:
|
|
1467
|
+
publicPath: navigation.publicPath,
|
|
1448
1468
|
navigation: navigation,
|
|
1449
1469
|
router: navigation.router
|
|
1450
1470
|
};
|
|
@@ -1457,9 +1477,9 @@ function wrapForeignComponent(component, captured, Wrapper) {
|
|
|
1457
1477
|
return destroyPortal(id);
|
|
1458
1478
|
};
|
|
1459
1479
|
}, _utils__WEBPACK_IMPORTED_MODULE_2__.none);
|
|
1460
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Wrapper, Object.assign({}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
1480
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Wrapper, Object.assign({}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_PortalRenderer__WEBPACK_IMPORTED_MODULE_3__.PortalRenderer, {
|
|
1461
1481
|
id: id
|
|
1462
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
1482
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ForeignComponentContainer__WEBPACK_IMPORTED_MODULE_4__.ForeignComponentContainer, {
|
|
1463
1483
|
innerProps: innerProps,
|
|
1464
1484
|
"$portalId": id,
|
|
1465
1485
|
"$component": component,
|
|
@@ -1480,7 +1500,7 @@ function wrapComponent(converters, component, captured, Wrapper) {
|
|
|
1480
1500
|
};
|
|
1481
1501
|
}
|
|
1482
1502
|
if (_typeof(component) === 'object' && isNotExotic(component)) {
|
|
1483
|
-
var result = (0,
|
|
1503
|
+
var result = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.convertComponent)(converters[component.type], component);
|
|
1484
1504
|
return wrapForeignComponent(result, captured, Wrapper);
|
|
1485
1505
|
}
|
|
1486
1506
|
return wrapReactComponent(component, captured, Wrapper);
|
|
@@ -1609,8 +1629,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1609
1629
|
/* harmony export */ });
|
|
1610
1630
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
1611
1631
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1612
|
-
/* harmony import */ var
|
|
1613
|
-
/* harmony import */ var
|
|
1632
|
+
/* harmony import */ var _components_ExtensionSlot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/ExtensionSlot */ "../../framework/piral-core/esm/components/ExtensionSlot.js");
|
|
1633
|
+
/* harmony import */ var _components_SwitchErrorInfo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/SwitchErrorInfo */ "../../framework/piral-core/esm/components/SwitchErrorInfo.js");
|
|
1634
|
+
|
|
1614
1635
|
|
|
1615
1636
|
|
|
1616
1637
|
/**
|
|
@@ -1619,11 +1640,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1619
1640
|
* the "error" name.
|
|
1620
1641
|
*/
|
|
1621
1642
|
var DefaultErrorInfo = function DefaultErrorInfo(props) {
|
|
1622
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
1643
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ExtensionSlot__WEBPACK_IMPORTED_MODULE_1__.ExtensionSlot, {
|
|
1623
1644
|
name: "error",
|
|
1624
1645
|
params: props,
|
|
1625
1646
|
empty: function empty() {
|
|
1626
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
1647
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_SwitchErrorInfo__WEBPACK_IMPORTED_MODULE_2__.SwitchErrorInfo, Object.assign({}, props));
|
|
1627
1648
|
}
|
|
1628
1649
|
});
|
|
1629
1650
|
};
|
|
@@ -1795,7 +1816,7 @@ function createRedirect(to) {
|
|
|
1795
1816
|
});
|
|
1796
1817
|
};
|
|
1797
1818
|
}
|
|
1798
|
-
function createNavigation() {
|
|
1819
|
+
function createNavigation(publicPath) {
|
|
1799
1820
|
var enhance = function enhance(location, action) {
|
|
1800
1821
|
return {
|
|
1801
1822
|
action: action,
|
|
@@ -1851,7 +1872,8 @@ function createNavigation() {
|
|
|
1851
1872
|
get history() {
|
|
1852
1873
|
return _nav;
|
|
1853
1874
|
}
|
|
1854
|
-
}
|
|
1875
|
+
},
|
|
1876
|
+
publicPath: publicPath
|
|
1855
1877
|
};
|
|
1856
1878
|
}
|
|
1857
1879
|
|
|
@@ -2046,46 +2068,6 @@ function useMedia(queries, values, defaultValue) {
|
|
|
2046
2068
|
|
|
2047
2069
|
/***/ }),
|
|
2048
2070
|
|
|
2049
|
-
/***/ "../../framework/piral-core/esm/hooks/routes.js":
|
|
2050
|
-
/*!******************************************************!*\
|
|
2051
|
-
!*** ../../framework/piral-core/esm/hooks/routes.js ***!
|
|
2052
|
-
\******************************************************/
|
|
2053
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2054
|
-
|
|
2055
|
-
"use strict";
|
|
2056
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2057
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2058
|
-
/* harmony export */ "useRoutes": () => (/* binding */ useRoutes)
|
|
2059
|
-
/* harmony export */ });
|
|
2060
|
-
/* harmony import */ var _globalState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globalState */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
2061
|
-
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
function useRoutes() {
|
|
2065
|
-
var routes = (0,_globalState__WEBPACK_IMPORTED_MODULE_0__.useGlobalState)(function (s) {
|
|
2066
|
-
return s.routes;
|
|
2067
|
-
});
|
|
2068
|
-
var pages = (0,_globalState__WEBPACK_IMPORTED_MODULE_0__.useGlobalState)(function (s) {
|
|
2069
|
-
return s.registry.pages;
|
|
2070
|
-
});
|
|
2071
|
-
var paths = [];
|
|
2072
|
-
Object.keys(routes).map(function (path) {
|
|
2073
|
-
return paths.push({
|
|
2074
|
-
path: path,
|
|
2075
|
-
Component: routes[path]
|
|
2076
|
-
});
|
|
2077
|
-
});
|
|
2078
|
-
Object.keys(pages).map(function (path) {
|
|
2079
|
-
return paths.push({
|
|
2080
|
-
path: path,
|
|
2081
|
-
Component: pages[path].component
|
|
2082
|
-
});
|
|
2083
|
-
});
|
|
2084
|
-
return (0,_app_codegen__WEBPACK_IMPORTED_MODULE_1__.useRouteFilter)(paths);
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
/***/ }),
|
|
2088
|
-
|
|
2089
2071
|
/***/ "../../framework/piral-core/esm/modules/api.js":
|
|
2090
2072
|
/*!*****************************************************!*\
|
|
2091
2073
|
!*** ../../framework/piral-core/esm/modules/api.js ***!
|
|
@@ -2543,8 +2525,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2543
2525
|
/* harmony export */ "createActions": () => (/* binding */ createActions),
|
|
2544
2526
|
/* harmony export */ "includeActions": () => (/* binding */ includeActions)
|
|
2545
2527
|
/* harmony export */ });
|
|
2546
|
-
/* harmony import */ var
|
|
2528
|
+
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../actions */ "../../framework/piral-core/esm/actions/index.js");
|
|
2547
2529
|
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/esm/defaults/navigator_v5.js");
|
|
2530
|
+
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
2548
2531
|
|
|
2549
2532
|
|
|
2550
2533
|
function createContext(state, events) {
|
|
@@ -2556,7 +2539,7 @@ function createContext(state, events) {
|
|
|
2556
2539
|
return component;
|
|
2557
2540
|
}
|
|
2558
2541
|
},
|
|
2559
|
-
navigation: (0,_app_codegen__WEBPACK_IMPORTED_MODULE_0__.createNavigation)(),
|
|
2542
|
+
navigation: (0,_app_codegen__WEBPACK_IMPORTED_MODULE_0__.createNavigation)(_app_codegen__WEBPACK_IMPORTED_MODULE_1__.publicPath),
|
|
2560
2543
|
state: state
|
|
2561
2544
|
});
|
|
2562
2545
|
return ctx;
|
|
@@ -2571,7 +2554,7 @@ function includeActions(ctx, actions) {
|
|
|
2571
2554
|
}
|
|
2572
2555
|
function createActions(state, events) {
|
|
2573
2556
|
var context = createContext(state, events);
|
|
2574
|
-
includeActions(context,
|
|
2557
|
+
includeActions(context, _actions__WEBPACK_IMPORTED_MODULE_2__);
|
|
2575
2558
|
return context;
|
|
2576
2559
|
}
|
|
2577
2560
|
|
|
@@ -6347,12 +6330,12 @@ function installPiralDebug(options) {
|
|
|
6347
6330
|
debug: debugApiVersion,
|
|
6348
6331
|
instance: {
|
|
6349
6332
|
name: "sample-piral",
|
|
6350
|
-
version: "1.1.0-beta.
|
|
6333
|
+
version: "1.1.0-beta.5772",
|
|
6351
6334
|
dependencies: "reactstrap,tslib,react,react-dom,react-router,react-router-dom"
|
|
6352
6335
|
},
|
|
6353
6336
|
build: {
|
|
6354
|
-
date: "2023-07-
|
|
6355
|
-
cli: "1.1.0-beta.
|
|
6337
|
+
date: "2023-07-10T19:03:24.943Z",
|
|
6338
|
+
cli: "1.1.0-beta.5772",
|
|
6356
6339
|
compat: "1"
|
|
6357
6340
|
}
|
|
6358
6341
|
};
|
|
@@ -65169,4 +65152,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(piral
|
|
|
65169
65152
|
|
|
65170
65153
|
/******/ })()
|
|
65171
65154
|
;
|
|
65172
|
-
//# sourceMappingURL=index.
|
|
65155
|
+
//# sourceMappingURL=index.a1d6d3.js.map
|