sample-piral 1.3.0-beta.6062 → 1.3.0-beta.6067
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.da2dcb.js → index.e4dc9f.js} +56 -33
- package/app/index.e4dc9f.js.map +1 -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 +7 -7
- package/app/index.da2dcb.js.map +0 -1
|
@@ -1108,51 +1108,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1108
1108
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
|
|
1109
1109
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1110
1110
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
|
|
1111
|
-
/* harmony import */ var
|
|
1112
|
-
/* harmony import */ var
|
|
1113
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1114
|
-
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."); }
|
|
1115
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
1116
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1111
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "../../framework/piral-core/esm/utils/routes.js");
|
|
1112
|
+
/* harmony import */ var _app_codegen__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../app.codegen */ "../../framework/piral-core/app.codegen");
|
|
1117
1113
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1118
1114
|
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."); }
|
|
1119
|
-
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); }
|
|
1120
1115
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1121
1116
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1117
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1118
|
+
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."); }
|
|
1119
|
+
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); }
|
|
1122
1120
|
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; }
|
|
1121
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
1122
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1123
1123
|
|
|
1124
1124
|
|
|
1125
1125
|
|
|
1126
1126
|
|
|
1127
1127
|
|
|
1128
|
-
function
|
|
1128
|
+
function useShellRoutes() {
|
|
1129
1129
|
var routes = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalState)(function (s) {
|
|
1130
1130
|
return s.routes;
|
|
1131
1131
|
});
|
|
1132
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(function () {
|
|
1133
|
+
return Object.entries(routes).map(function (_ref) {
|
|
1134
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1135
|
+
path = _ref2[0],
|
|
1136
|
+
Component = _ref2[1];
|
|
1137
|
+
return {
|
|
1138
|
+
path: path,
|
|
1139
|
+
Component: Component,
|
|
1140
|
+
meta: (Component === null || Component === void 0 ? void 0 : Component.meta) || {},
|
|
1141
|
+
matcher: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.createRouteMatcher)(path)
|
|
1142
|
+
};
|
|
1143
|
+
});
|
|
1144
|
+
}, [routes]);
|
|
1145
|
+
}
|
|
1146
|
+
function usePiletRoutes() {
|
|
1132
1147
|
var pages = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalState)(function (s) {
|
|
1133
1148
|
return s.registry.pages;
|
|
1134
1149
|
});
|
|
1135
|
-
return
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
matcher: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.createRouteMatcher)(path)
|
|
1154
|
-
};
|
|
1155
|
-
}))));
|
|
1150
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(function () {
|
|
1151
|
+
return Object.entries(pages).map(function (_ref3) {
|
|
1152
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1153
|
+
path = _ref4[0],
|
|
1154
|
+
entry = _ref4[1];
|
|
1155
|
+
return {
|
|
1156
|
+
path: path,
|
|
1157
|
+
Component: entry.component,
|
|
1158
|
+
meta: entry.meta,
|
|
1159
|
+
matcher: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.createRouteMatcher)(path)
|
|
1160
|
+
};
|
|
1161
|
+
});
|
|
1162
|
+
}, [pages]);
|
|
1163
|
+
}
|
|
1164
|
+
function useRoutes() {
|
|
1165
|
+
var shellRoutes = useShellRoutes();
|
|
1166
|
+
var piletRoutes = usePiletRoutes();
|
|
1167
|
+
return (0,_app_codegen__WEBPACK_IMPORTED_MODULE_3__.useRouteFilter)([].concat(_toConsumableArray(shellRoutes), _toConsumableArray(piletRoutes)));
|
|
1156
1168
|
}
|
|
1157
1169
|
/**
|
|
1158
1170
|
* The component for defining the exclusive routes to be used.
|
|
@@ -2497,11 +2509,22 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
|
|
|
2497
2509
|
* This is a virtual element to render children defined in React / by Piral in other
|
|
2498
2510
|
* frameworks.
|
|
2499
2511
|
*
|
|
2512
|
+
* Internally, you can use the assignContent function to populate the content to be
|
|
2513
|
+
* rendered once the element is attached / mounted in the DOM.
|
|
2514
|
+
*
|
|
2500
2515
|
* Usage:
|
|
2501
2516
|
*
|
|
2502
2517
|
* ```
|
|
2503
2518
|
* <piral-content cid="123"></piral-content>
|
|
2504
2519
|
* ```
|
|
2520
|
+
*
|
|
2521
|
+
* where you'd
|
|
2522
|
+
*
|
|
2523
|
+
* ```
|
|
2524
|
+
* window.assignContent("123", myReactContent)
|
|
2525
|
+
* ```
|
|
2526
|
+
*
|
|
2527
|
+
* beforehand.
|
|
2505
2528
|
*/
|
|
2506
2529
|
var PiralContent = /*#__PURE__*/function (_HTMLElement4) {
|
|
2507
2530
|
_inherits(PiralContent, _HTMLElement4);
|
|
@@ -6413,12 +6436,12 @@ function installPiralDebug(options) {
|
|
|
6413
6436
|
debug: debugApiVersion,
|
|
6414
6437
|
instance: {
|
|
6415
6438
|
name: "sample-piral",
|
|
6416
|
-
version: "1.3.0-beta.
|
|
6439
|
+
version: "1.3.0-beta.6067",
|
|
6417
6440
|
dependencies: "reactstrap,tslib,react,react-dom,react-router,react-router-dom"
|
|
6418
6441
|
},
|
|
6419
6442
|
build: {
|
|
6420
|
-
date: "2023-10-
|
|
6421
|
-
cli: "1.3.0-beta.
|
|
6443
|
+
date: "2023-10-09T11:06:16.935Z",
|
|
6444
|
+
cli: "1.3.0-beta.6067",
|
|
6422
6445
|
compat: "1"
|
|
6423
6446
|
}
|
|
6424
6447
|
};
|
|
@@ -65284,4 +65307,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(piral
|
|
|
65284
65307
|
|
|
65285
65308
|
/******/ })()
|
|
65286
65309
|
;
|
|
65287
|
-
//# sourceMappingURL=index.
|
|
65310
|
+
//# sourceMappingURL=index.e4dc9f.js.map
|