piral-core 0.15.0-alpha.4034 → 0.15.0-alpha.4098
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/esm/Piral.d.ts +2 -2
- package/esm/Piral.js +14 -12
- package/esm/Piral.js.map +1 -1
- package/esm/PiralContext.d.ts +21 -0
- package/esm/PiralContext.js +34 -0
- package/esm/PiralContext.js.map +1 -0
- package/esm/actions/app.d.ts +1 -2
- package/esm/actions/app.js +0 -3
- package/esm/actions/app.js.map +1 -1
- package/esm/actions/state.js +5 -1
- package/esm/actions/state.js.map +1 -1
- package/esm/components/ErrorBoundary.d.ts +4 -0
- package/esm/components/ErrorBoundary.js +3 -3
- package/esm/components/ErrorBoundary.js.map +1 -1
- package/esm/components/PiralGlobals.d.ts +6 -0
- package/esm/components/PiralGlobals.js +13 -0
- package/esm/components/PiralGlobals.js.map +1 -0
- package/esm/components/PiralSuspense.d.ts +5 -0
- package/esm/components/PiralSuspense.js +8 -0
- package/esm/components/PiralSuspense.js.map +1 -0
- package/esm/components/PiralView.d.ts +10 -1
- package/esm/components/PiralView.js +12 -24
- package/esm/components/PiralView.js.map +1 -1
- package/esm/components/ResponsiveLayout.d.ts +9 -1
- package/esm/components/ResponsiveLayout.js +5 -12
- package/esm/components/ResponsiveLayout.js.map +1 -1
- package/esm/components/components.d.ts +13 -6
- package/esm/components/components.js +13 -6
- package/esm/components/components.js.map +1 -1
- package/esm/components/index.d.ts +2 -12
- package/esm/components/index.js +2 -12
- package/esm/components/index.js.map +1 -1
- package/esm/{components → defaults}/DefaultErrorInfo.d.ts +0 -0
- package/esm/{components → defaults}/DefaultErrorInfo.js +1 -2
- package/esm/defaults/DefaultErrorInfo.js.map +1 -0
- package/esm/{components → defaults}/DefaultLayout.d.ts +0 -0
- package/esm/{components → defaults}/DefaultLayout.js +0 -0
- package/esm/defaults/DefaultLayout.js.map +1 -0
- package/esm/{components/DefaultLoader.d.ts → defaults/DefaultLoadingIndicator.d.ts} +0 -0
- package/esm/{components/DefaultLoader.js → defaults/DefaultLoadingIndicator.js} +1 -1
- package/esm/defaults/DefaultLoadingIndicator.js.map +1 -0
- package/esm/{components → defaults}/DefaultRouteSwitch.d.ts +0 -0
- package/esm/{components → defaults}/DefaultRouteSwitch.js +0 -0
- package/esm/defaults/DefaultRouteSwitch.js.map +1 -0
- package/esm/defaults/DefaultRouter.d.ts +3 -0
- package/esm/{components → defaults}/DefaultRouter.js +0 -0
- package/esm/defaults/DefaultRouter.js.map +1 -0
- package/esm/defaults/index.d.ts +5 -0
- package/esm/defaults/index.js +6 -0
- package/esm/defaults/index.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/{components → setters}/SetComponent.d.ts +0 -0
- package/esm/{components → setters}/SetComponent.js +0 -0
- package/esm/setters/SetComponent.js.map +1 -0
- package/esm/{components → setters}/SetError.d.ts +0 -0
- package/esm/{components → setters}/SetError.js +0 -0
- package/esm/setters/SetError.js.map +1 -0
- package/esm/{components → setters}/SetErrors.d.ts +0 -0
- package/esm/{components → setters}/SetErrors.js +0 -0
- package/esm/setters/SetErrors.js.map +1 -0
- package/esm/{components → setters}/SetLayout.d.ts +0 -0
- package/esm/{components → setters}/SetLayout.js +0 -0
- package/esm/setters/SetLayout.js.map +1 -0
- package/esm/{components → setters}/SetProvider.d.ts +0 -0
- package/esm/{components → setters}/SetProvider.js +0 -0
- package/esm/setters/SetProvider.js.map +1 -0
- package/esm/{components → setters}/SetRedirect.d.ts +0 -0
- package/esm/{components → setters}/SetRedirect.js +0 -0
- package/esm/setters/SetRedirect.js.map +1 -0
- package/esm/{components → setters}/SetRoute.d.ts +0 -0
- package/esm/{components → setters}/SetRoute.js +0 -0
- package/esm/setters/SetRoute.js.map +1 -0
- package/esm/setters/index.d.ts +7 -0
- package/esm/setters/index.js +8 -0
- package/esm/setters/index.js.map +1 -0
- package/esm/state/createGlobalState.js +1 -2
- package/esm/state/createGlobalState.js.map +1 -1
- package/esm/state/withApi.js.map +1 -1
- package/esm/types/components.d.ts +9 -1
- package/esm/types/instance.d.ts +10 -3
- package/esm/types/state.d.ts +2 -12
- package/esm/utils/compare.d.ts +1 -1
- package/esm/utils/compare.js +20 -3
- package/esm/utils/compare.js.map +1 -1
- package/esm/utils/media.js +1 -1
- package/esm/utils/media.js.map +1 -1
- package/lib/Piral.d.ts +2 -2
- package/lib/Piral.js +13 -11
- package/lib/Piral.js.map +1 -1
- package/lib/PiralContext.d.ts +21 -0
- package/lib/PiralContext.js +38 -0
- package/lib/PiralContext.js.map +1 -0
- package/lib/actions/app.d.ts +1 -2
- package/lib/actions/app.js +1 -5
- package/lib/actions/app.js.map +1 -1
- package/lib/actions/index.js +6 -6
- package/lib/actions/index.js.map +1 -1
- package/lib/actions/state.js +5 -1
- package/lib/actions/state.js.map +1 -1
- package/lib/components/ErrorBoundary.d.ts +4 -0
- package/lib/components/ErrorBoundary.js +3 -3
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/components/PiralGlobals.d.ts +6 -0
- package/lib/components/PiralGlobals.js +17 -0
- package/lib/components/PiralGlobals.js.map +1 -0
- package/lib/components/PiralRoutes.js +1 -1
- package/lib/components/PiralRoutes.js.map +1 -1
- package/lib/components/PiralSuspense.d.ts +5 -0
- package/lib/components/PiralSuspense.js +12 -0
- package/lib/components/PiralSuspense.js.map +1 -0
- package/lib/components/PiralView.d.ts +10 -1
- package/lib/components/PiralView.js +11 -23
- package/lib/components/PiralView.js.map +1 -1
- package/lib/components/ResponsiveLayout.d.ts +9 -1
- package/lib/components/ResponsiveLayout.js +3 -10
- package/lib/components/ResponsiveLayout.js.map +1 -1
- package/lib/components/components.d.ts +13 -6
- package/lib/components/components.js +14 -7
- package/lib/components/components.js.map +1 -1
- package/lib/components/index.d.ts +2 -12
- package/lib/components/index.js +12 -22
- package/lib/components/index.js.map +1 -1
- package/lib/{components → defaults}/DefaultErrorInfo.d.ts +0 -0
- package/lib/{components → defaults}/DefaultErrorInfo.js +2 -3
- package/lib/defaults/DefaultErrorInfo.js.map +1 -0
- package/lib/{components → defaults}/DefaultLayout.d.ts +0 -0
- package/lib/{components → defaults}/DefaultLayout.js +0 -0
- package/lib/defaults/DefaultLayout.js.map +1 -0
- package/lib/{components/DefaultLoader.d.ts → defaults/DefaultLoadingIndicator.d.ts} +0 -0
- package/lib/{components/DefaultLoader.js → defaults/DefaultLoadingIndicator.js} +1 -1
- package/lib/defaults/DefaultLoadingIndicator.js.map +1 -0
- package/lib/{components → defaults}/DefaultRouteSwitch.d.ts +0 -0
- package/lib/{components → defaults}/DefaultRouteSwitch.js +1 -1
- package/lib/defaults/DefaultRouteSwitch.js.map +1 -0
- package/lib/defaults/DefaultRouter.d.ts +3 -0
- package/lib/{components → defaults}/DefaultRouter.js +0 -0
- package/lib/defaults/DefaultRouter.js.map +1 -0
- package/lib/defaults/index.d.ts +5 -0
- package/lib/defaults/index.js +9 -0
- package/lib/defaults/index.js.map +1 -0
- package/lib/hooks/actions.js +1 -1
- package/lib/hooks/actions.js.map +1 -1
- package/lib/hooks/index.js +6 -6
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -8
- package/lib/index.js.map +1 -1
- package/lib/modules/index.js +3 -3
- package/lib/modules/index.js.map +1 -1
- package/lib/{components → setters}/SetComponent.d.ts +0 -0
- package/lib/{components → setters}/SetComponent.js +0 -0
- package/lib/setters/SetComponent.js.map +1 -0
- package/lib/{components → setters}/SetError.d.ts +0 -0
- package/lib/{components → setters}/SetError.js +0 -0
- package/lib/setters/SetError.js.map +1 -0
- package/lib/{components → setters}/SetErrors.d.ts +0 -0
- package/lib/{components → setters}/SetErrors.js +0 -0
- package/lib/setters/SetErrors.js.map +1 -0
- package/lib/{components → setters}/SetLayout.d.ts +0 -0
- package/lib/{components → setters}/SetLayout.js +0 -0
- package/lib/setters/SetLayout.js.map +1 -0
- package/lib/{components → setters}/SetProvider.d.ts +0 -0
- package/lib/{components → setters}/SetProvider.js +0 -0
- package/lib/setters/SetProvider.js.map +1 -0
- package/lib/{components → setters}/SetRedirect.d.ts +0 -0
- package/lib/{components → setters}/SetRedirect.js +0 -0
- package/lib/setters/SetRedirect.js.map +1 -0
- package/lib/{components → setters}/SetRoute.d.ts +0 -0
- package/lib/{components → setters}/SetRoute.js +0 -0
- package/lib/setters/SetRoute.js.map +1 -0
- package/lib/setters/index.d.ts +7 -0
- package/lib/setters/index.js +11 -0
- package/lib/setters/index.js.map +1 -0
- package/lib/state/createGlobalState.js +6 -7
- package/lib/state/createGlobalState.js.map +1 -1
- package/lib/state/index.js +4 -4
- package/lib/state/index.js.map +1 -1
- package/lib/state/withApi.js.map +1 -1
- package/lib/types/components.d.ts +9 -1
- package/lib/types/index.js +12 -12
- package/lib/types/index.js.map +1 -1
- package/lib/types/instance.d.ts +10 -3
- package/lib/types/state.d.ts +2 -12
- package/lib/utils/compare.d.ts +1 -1
- package/lib/utils/compare.js +22 -5
- package/lib/utils/compare.js.map +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/index.js +10 -10
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/media.js +1 -1
- package/lib/utils/media.js.map +1 -1
- package/package.json +20 -8
- package/src/Piral.test.tsx +3 -3
- package/src/Piral.tsx +18 -14
- package/src/PiralContext.tsx +43 -0
- package/src/actions/app.test.ts +0 -18
- package/src/actions/app.ts +0 -8
- package/src/actions/state.ts +6 -1
- package/src/components/ErrorBoundary.tsx +7 -3
- package/src/components/PiralGlobals.tsx +16 -0
- package/src/components/PiralRoutes.test.tsx +1 -1
- package/src/components/PiralSuspense.tsx +19 -0
- package/src/components/PiralView-server.test.tsx +1 -0
- package/src/components/PiralView.test.tsx +1 -0
- package/src/components/PiralView.tsx +28 -47
- package/src/components/ResponsiveLayout.test.tsx +14 -43
- package/src/components/ResponsiveLayout.tsx +18 -15
- package/src/components/components.tsx +13 -6
- package/src/components/index.ts +2 -12
- package/src/{components → defaults}/DefaultErrorInfo.test.tsx +0 -0
- package/src/{components → defaults}/DefaultErrorInfo.tsx +1 -2
- package/src/{components → defaults}/DefaultLayout.test.tsx +0 -0
- package/src/{components → defaults}/DefaultLayout.tsx +1 -1
- package/src/{components/DefaultLoader.test.tsx → defaults/DefaultLoadingIndicator.test.tsx} +2 -2
- package/src/{components/DefaultLoader.tsx → defaults/DefaultLoadingIndicator.tsx} +0 -0
- package/src/{components → defaults}/DefaultRouteSwitch.tsx +0 -0
- package/src/{components → defaults}/DefaultRouter.tsx +2 -1
- package/src/defaults/index.ts +5 -0
- package/src/index.tsx +1 -0
- package/src/{components → setters}/SetComponent.test.tsx +0 -0
- package/src/{components → setters}/SetComponent.tsx +0 -0
- package/src/{components → setters}/SetError.test.tsx +0 -0
- package/src/{components → setters}/SetError.tsx +0 -0
- package/src/{components → setters}/SetErrors.test.tsx +0 -0
- package/src/{components → setters}/SetErrors.tsx +0 -0
- package/src/{components → setters}/SetLayout.test.tsx +0 -0
- package/src/{components → setters}/SetLayout.tsx +0 -0
- package/src/{components → setters}/SetProvider.test.tsx +0 -0
- package/src/{components → setters}/SetProvider.tsx +0 -0
- package/src/{components → setters}/SetRedirect.test.tsx +0 -0
- package/src/{components → setters}/SetRedirect.tsx +0 -0
- package/src/{components → setters}/SetRoute.test.tsx +0 -0
- package/src/{components → setters}/SetRoute.tsx +0 -0
- package/src/setters/index.ts +7 -0
- package/src/state/createGlobalState.test.ts +1 -10
- package/src/state/createGlobalState.ts +2 -3
- package/src/state/withApi.tsx +2 -2
- package/src/types/components.ts +11 -2
- package/src/types/instance.ts +11 -3
- package/src/types/state.ts +2 -12
- package/src/utils/compare.test.ts +15 -15
- package/src/utils/compare.ts +23 -3
- package/src/utils/foreign.test.ts +1 -1
- package/src/utils/media.ts +1 -1
- package/esm/components/DefaultErrorInfo.js.map +0 -1
- package/esm/components/DefaultLayout.js.map +0 -1
- package/esm/components/DefaultLoader.js.map +0 -1
- package/esm/components/DefaultRouteSwitch.js.map +0 -1
- package/esm/components/DefaultRouter.d.ts +0 -2
- package/esm/components/DefaultRouter.js.map +0 -1
- package/esm/components/SetComponent.js.map +0 -1
- package/esm/components/SetError.js.map +0 -1
- package/esm/components/SetErrors.js.map +0 -1
- package/esm/components/SetLayout.js.map +0 -1
- package/esm/components/SetProvider.js.map +0 -1
- package/esm/components/SetRedirect.js.map +0 -1
- package/esm/components/SetRoute.js.map +0 -1
- package/lib/components/DefaultErrorInfo.js.map +0 -1
- package/lib/components/DefaultLayout.js.map +0 -1
- package/lib/components/DefaultLoader.js.map +0 -1
- package/lib/components/DefaultRouteSwitch.js.map +0 -1
- package/lib/components/DefaultRouter.d.ts +0 -2
- package/lib/components/DefaultRouter.js.map +0 -1
- package/lib/components/SetComponent.js.map +0 -1
- package/lib/components/SetError.js.map +0 -1
- package/lib/components/SetErrors.js.map +0 -1
- package/lib/components/SetLayout.js.map +0 -1
- package/lib/components/SetProvider.js.map +0 -1
- package/lib/components/SetRedirect.js.map +0 -1
- package/lib/components/SetRoute.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PiralGlobals = void 0;
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const PortalRenderer_1 = require("./PortalRenderer");
|
|
6
|
+
const components_1 = require("./components");
|
|
7
|
+
/**
|
|
8
|
+
* Integrates the global portal renderer and the debug utilities
|
|
9
|
+
* (if registered).
|
|
10
|
+
*/
|
|
11
|
+
const PiralGlobals = () => {
|
|
12
|
+
return (React.createElement(React.Fragment, null,
|
|
13
|
+
React.createElement(PortalRenderer_1.PortalRenderer, { id: "root" }),
|
|
14
|
+
React.createElement(components_1.RegisteredDebug, null)));
|
|
15
|
+
};
|
|
16
|
+
exports.PiralGlobals = PiralGlobals;
|
|
17
|
+
//# sourceMappingURL=PiralGlobals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PiralGlobals.js","sourceRoot":"","sources":["../../src/components/PiralGlobals.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,qDAAkD;AAClD,6CAA+C;AAE/C;;;GAGG;AACI,MAAM,YAAY,GAAa,GAAG,EAAE;IACzC,OAAO,CACL;QACE,oBAAC,+BAAc,IAAC,EAAE,EAAC,MAAM,GAAG;QAC5B,oBAAC,4BAAe,OAAG,CAClB,CACJ,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,YAAY,gBAOvB"}
|
|
@@ -8,7 +8,7 @@ const hooks_1 = require("../hooks");
|
|
|
8
8
|
* The component for defining the exclusive routes to be used.
|
|
9
9
|
*/
|
|
10
10
|
const PiralRoutes = (_a) => {
|
|
11
|
-
var { NotFound, RouteSwitch } = _a, props =
|
|
11
|
+
var { NotFound, RouteSwitch } = _a, props = tslib_1.__rest(_a, ["NotFound", "RouteSwitch"]);
|
|
12
12
|
const routes = (0, hooks_1.useGlobalState)((s) => s.routes);
|
|
13
13
|
const pages = (0, hooks_1.useGlobalState)((s) => s.registry.pages);
|
|
14
14
|
const paths = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PiralRoutes.js","sourceRoot":"","sources":["../../src/components/PiralRoutes.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,oCAA0C;AAiB1C;;GAEG;AACI,MAAM,WAAW,GAA0B,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,QAAQ,EAAE,WAAW,OAAY,EAAP,KAAK,
|
|
1
|
+
{"version":3,"file":"PiralRoutes.js","sourceRoot":"","sources":["../../src/components/PiralRoutes.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,oCAA0C;AAiB1C;;GAEG;AACI,MAAM,WAAW,GAA0B,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,QAAQ,EAAE,WAAW,OAAY,EAAP,KAAK,sBAAjC,2BAAmC,CAAF;IAClF,MAAM,MAAM,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAEzF,OAAO,oBAAC,WAAW,kBAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;AACtE,CAAC,CAAC;AATW,QAAA,WAAW,eAStB;AACF,mBAAW,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PiralSuspense = void 0;
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const components_1 = require("./components");
|
|
6
|
+
const hooks_1 = require("../hooks");
|
|
7
|
+
const PiralSuspense = ({ children }) => {
|
|
8
|
+
const { error, loading } = (0, hooks_1.useGlobalState)((m) => m.app);
|
|
9
|
+
return error ? (React.createElement(components_1.RegisteredErrorInfo, { type: "loading", error: error })) : loading ? (React.createElement(components_1.RegisteredLoadingIndicator, null)) : (React.createElement(React.Fragment, null, children));
|
|
10
|
+
};
|
|
11
|
+
exports.PiralSuspense = PiralSuspense;
|
|
12
|
+
//# sourceMappingURL=PiralSuspense.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PiralSuspense.js","sourceRoot":"","sources":["../../src/components/PiralSuspense.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,6CAA+E;AAC/E,oCAA0C;AAMnC,MAAM,aAAa,GAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,gCAAmB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,uCAA0B,OAAG,CAC/B,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { LayoutBreakpoints } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* The props for the PiralView component.
|
|
4
5
|
*/
|
|
5
6
|
export interface PiralViewProps {
|
|
7
|
+
/**
|
|
8
|
+
* The custom breakpoints for the different layout modi.
|
|
9
|
+
*/
|
|
10
|
+
breakpoints?: LayoutBreakpoints;
|
|
11
|
+
/**
|
|
12
|
+
* The extra content.
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactNode;
|
|
6
15
|
}
|
|
7
16
|
/**
|
|
8
17
|
* The component responsible for the generic view of the application.
|
|
9
|
-
* This includes the
|
|
18
|
+
* This includes the used the current content and some convenience.
|
|
10
19
|
*/
|
|
11
20
|
export declare const PiralView: React.FC<PiralViewProps>;
|
|
@@ -2,34 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PiralView = void 0;
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
5
|
+
const PiralGlobals_1 = require("./PiralGlobals");
|
|
6
6
|
const PiralRoutes_1 = require("./PiralRoutes");
|
|
7
|
+
const PiralSuspense_1 = require("./PiralSuspense");
|
|
8
|
+
const ResponsiveLayout_1 = require("./ResponsiveLayout");
|
|
7
9
|
const components_1 = require("./components");
|
|
8
|
-
const
|
|
9
|
-
const NotFound = (props) => React.createElement(components_1.PiralError, Object.assign({ type: "not_found" }, props));
|
|
10
|
-
const PiralContent = () => {
|
|
11
|
-
const { error, loading, layout } = (0, hooks_1.useGlobalState)((m) => m.app);
|
|
12
|
-
return error ? (React.createElement(components_1.PiralError, { type: "loading", error: error })) : loading ? (React.createElement(components_1.PiralLoadingIndicator, null)) : (React.createElement(components_1.PiralLayout, { currentLayout: layout },
|
|
13
|
-
React.createElement(PiralRoutes_1.PiralRoutes, { NotFound: NotFound, RouteSwitch: components_1.PiralRouteSwitch })));
|
|
14
|
-
};
|
|
15
|
-
const FallbackRouter = (props) => {
|
|
16
|
-
const publicPath = (0, hooks_1.useGlobalState)((s) => s.app.publicPath);
|
|
17
|
-
return React.createElement(react_router_1.StaticRouter, Object.assign({ location: "/" }, props, { basename: publicPath }));
|
|
18
|
-
};
|
|
19
|
-
const Router = typeof window === 'undefined' ? FallbackRouter : components_1.PiralRouter;
|
|
20
|
-
const PiralProvider = ({ children }) => {
|
|
21
|
-
const provider = (0, hooks_1.useGlobalState)((m) => m.provider) || React.Fragment;
|
|
22
|
-
return React.createElement(provider, undefined, children);
|
|
23
|
-
};
|
|
10
|
+
const NotFound = (props) => React.createElement(components_1.RegisteredErrorInfo, Object.assign({ type: "not_found" }, props));
|
|
24
11
|
/**
|
|
25
12
|
* The component responsible for the generic view of the application.
|
|
26
|
-
* This includes the
|
|
13
|
+
* This includes the used the current content and some convenience.
|
|
27
14
|
*/
|
|
28
|
-
const PiralView = ({ children }) => (React.createElement(
|
|
29
|
-
React.createElement(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
const PiralView = ({ breakpoints, children }) => (React.createElement(React.Fragment, null,
|
|
16
|
+
React.createElement(PiralGlobals_1.PiralGlobals, null),
|
|
17
|
+
React.createElement(PiralSuspense_1.PiralSuspense, null,
|
|
18
|
+
React.createElement(ResponsiveLayout_1.ResponsiveLayout, { breakpoints: breakpoints, Layout: components_1.RegisteredLayout },
|
|
19
|
+
React.createElement(PiralRoutes_1.PiralRoutes, { NotFound: NotFound, RouteSwitch: components_1.RegisteredRouteSwitch }))),
|
|
20
|
+
children));
|
|
33
21
|
exports.PiralView = PiralView;
|
|
34
22
|
exports.PiralView.displayName = 'PiralView';
|
|
35
23
|
//# sourceMappingURL=PiralView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;
|
|
1
|
+
{"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,iDAA8C;AAC9C,+CAA4C;AAC5C,mDAAgD;AAChD,yDAAsD;AACtD,6CAA4F;AAG5F,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,gCAAmB,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAgB/G;;;GAGG;AACI,MAAM,SAAS,GAA6B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF;IACE,oBAAC,2BAAY,OAAG;IAChB,oBAAC,6BAAa;QACZ,oBAAC,mCAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,6BAAgB;YAClE,oBAAC,yBAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAqB,GAAI,CACtD,CACL;IACf,QAAQ,CACR,CACJ,CAAC;AAVW,QAAA,SAAS,aAUpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LayoutBreakpoints } from '../types';
|
|
2
|
+
import { LayoutBreakpoints, LayoutProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* The props for the ResponsiveLayout component.
|
|
5
5
|
*/
|
|
@@ -8,6 +8,14 @@ export interface ResponsiveLayoutProps {
|
|
|
8
8
|
* The individual breakpoints to be used for the different layouts.
|
|
9
9
|
*/
|
|
10
10
|
breakpoints?: LayoutBreakpoints;
|
|
11
|
+
/**
|
|
12
|
+
* The actual layout component to render to transport.
|
|
13
|
+
*/
|
|
14
|
+
Layout: React.ComponentType<LayoutProps>;
|
|
15
|
+
/**
|
|
16
|
+
* The content to display.
|
|
17
|
+
*/
|
|
18
|
+
children: React.ReactNode;
|
|
11
19
|
}
|
|
12
20
|
/**
|
|
13
21
|
* The component capable of identifying and switching the currently used layout.
|
|
@@ -7,16 +7,9 @@ const utils_1 = require("../utils");
|
|
|
7
7
|
/**
|
|
8
8
|
* The component capable of identifying and switching the currently used layout.
|
|
9
9
|
*/
|
|
10
|
-
const ResponsiveLayout = ({ breakpoints = utils_1.defaultBreakpoints, children }) => {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const selected = (0, hooks_1.useMedia)(breakpoints, utils_1.defaultLayouts, current);
|
|
14
|
-
React.useEffect(() => {
|
|
15
|
-
if (selected !== current) {
|
|
16
|
-
changeLayout(selected);
|
|
17
|
-
}
|
|
18
|
-
}, [selected]);
|
|
19
|
-
return (0, utils_1.defaultRender)(children);
|
|
10
|
+
const ResponsiveLayout = ({ breakpoints = utils_1.defaultBreakpoints, Layout, children, }) => {
|
|
11
|
+
const selected = (0, hooks_1.useMedia)(breakpoints, utils_1.defaultLayouts, 'desktop');
|
|
12
|
+
return React.createElement(Layout, { currentLayout: selected }, children);
|
|
20
13
|
};
|
|
21
14
|
exports.ResponsiveLayout = ResponsiveLayout;
|
|
22
15
|
exports.ResponsiveLayout.displayName = 'ResponsiveLayout';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAAoC;AACpC,oCAA8D;AAqB9D;;GAEG;AACI,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,GAAG,0BAAkB,EAChC,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,IAAA,gBAAQ,EAAC,WAAW,EAAE,sBAAc,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,oBAAC,MAAM,IAAC,aAAa,EAAE,QAAQ,IAAG,QAAQ,CAAU,CAAC;AAC9D,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AACF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,33 +1,40 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ComponentsState } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a registered layout component by its name.
|
|
5
|
+
* This will always return a valid component. If nothing is found
|
|
6
|
+
* then the returned component will just return null.
|
|
7
|
+
* @param name The name of the registered layout component.
|
|
8
|
+
* @returns The registered layout component or an empty stub component.
|
|
9
|
+
*/
|
|
3
10
|
export declare function getPiralComponent<TKey extends keyof ComponentsState>(name: TKey): ComponentsState[TKey];
|
|
4
11
|
/**
|
|
5
12
|
* Gets the currently registered ErrorInfo component.
|
|
6
13
|
* By default the DefaultErrorInfo component is used.
|
|
7
14
|
*/
|
|
8
|
-
export declare const
|
|
15
|
+
export declare const RegisteredErrorInfo: React.ComponentType<import("../types").ErrorInfoProps>;
|
|
9
16
|
/**
|
|
10
17
|
* Gets the currently registered LoadingIndicator component.
|
|
11
18
|
* By default only Loading is rendered.
|
|
12
19
|
*/
|
|
13
|
-
export declare const
|
|
20
|
+
export declare const RegisteredLoadingIndicator: React.ComponentType<import("../types").LoadingIndicatorProps>;
|
|
14
21
|
/**
|
|
15
22
|
* Gets the currently registered Router component.
|
|
16
23
|
* By default the BrowserRouter is used.
|
|
17
24
|
*/
|
|
18
|
-
export declare const
|
|
25
|
+
export declare const RegisteredRouter: React.ComponentType<import("../types").RouterProps>;
|
|
19
26
|
/**
|
|
20
27
|
* Gets the currently registered Route Switch component.
|
|
21
28
|
* By default the DefaultRouteSwitch component is used.
|
|
22
29
|
*/
|
|
23
|
-
export declare const
|
|
30
|
+
export declare const RegisteredRouteSwitch: React.ComponentType<import("../types").RouteSwitchProps>;
|
|
24
31
|
/**
|
|
25
32
|
* Gets the currently registered Layout component.
|
|
26
33
|
* By default the children are rendered.
|
|
27
34
|
*/
|
|
28
|
-
export declare const
|
|
35
|
+
export declare const RegisteredLayout: React.ComponentType<import("../types").LayoutProps>;
|
|
29
36
|
/**
|
|
30
37
|
* Gets the currently registered Debug component.
|
|
31
38
|
* By default nothing is used.
|
|
32
39
|
*/
|
|
33
|
-
export declare const
|
|
40
|
+
export declare const RegisteredDebug: React.ComponentType<{}>;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RegisteredDebug = exports.RegisteredLayout = exports.RegisteredRouteSwitch = exports.RegisteredRouter = exports.RegisteredLoadingIndicator = exports.RegisteredErrorInfo = exports.getPiralComponent = void 0;
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const hooks_1 = require("../hooks");
|
|
6
|
+
/**
|
|
7
|
+
* Gets a registered layout component by its name.
|
|
8
|
+
* This will always return a valid component. If nothing is found
|
|
9
|
+
* then the returned component will just return null.
|
|
10
|
+
* @param name The name of the registered layout component.
|
|
11
|
+
* @returns The registered layout component or an empty stub component.
|
|
12
|
+
*/
|
|
6
13
|
function getPiralComponent(name) {
|
|
7
14
|
return (props) => {
|
|
8
15
|
const Component = (0, hooks_1.useGlobalState)((s) => s.components[name]);
|
|
@@ -15,30 +22,30 @@ exports.getPiralComponent = getPiralComponent;
|
|
|
15
22
|
* Gets the currently registered ErrorInfo component.
|
|
16
23
|
* By default the DefaultErrorInfo component is used.
|
|
17
24
|
*/
|
|
18
|
-
exports.
|
|
25
|
+
exports.RegisteredErrorInfo = getPiralComponent('ErrorInfo');
|
|
19
26
|
/**
|
|
20
27
|
* Gets the currently registered LoadingIndicator component.
|
|
21
28
|
* By default only Loading is rendered.
|
|
22
29
|
*/
|
|
23
|
-
exports.
|
|
30
|
+
exports.RegisteredLoadingIndicator = getPiralComponent('LoadingIndicator');
|
|
24
31
|
/**
|
|
25
32
|
* Gets the currently registered Router component.
|
|
26
33
|
* By default the BrowserRouter is used.
|
|
27
34
|
*/
|
|
28
|
-
exports.
|
|
35
|
+
exports.RegisteredRouter = getPiralComponent('Router');
|
|
29
36
|
/**
|
|
30
37
|
* Gets the currently registered Route Switch component.
|
|
31
38
|
* By default the DefaultRouteSwitch component is used.
|
|
32
39
|
*/
|
|
33
|
-
exports.
|
|
40
|
+
exports.RegisteredRouteSwitch = getPiralComponent('RouteSwitch');
|
|
34
41
|
/**
|
|
35
42
|
* Gets the currently registered Layout component.
|
|
36
43
|
* By default the children are rendered.
|
|
37
44
|
*/
|
|
38
|
-
exports.
|
|
45
|
+
exports.RegisteredLayout = getPiralComponent('Layout');
|
|
39
46
|
/**
|
|
40
47
|
* Gets the currently registered Debug component.
|
|
41
48
|
* By default nothing is used.
|
|
42
49
|
*/
|
|
43
|
-
exports.
|
|
50
|
+
exports.RegisteredDebug = getPiralComponent('Debug');
|
|
44
51
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/components/components.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAA0C;AAG1C,SAAgB,iBAAiB,CAAqC,IAAU;IAC9E,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,2CAA2C;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAND,8CAMC;AAED;;;GAGG;AACU,QAAA,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/components/components.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAA0C;AAG1C;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAqC,IAAU;IAC9E,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,2CAA2C;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAND,8CAMC;AAED;;;GAGG;AACU,QAAA,mBAAmB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAElE;;;GAGG;AACU,QAAA,0BAA0B,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAEhF;;;GAGG;AACU,QAAA,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAE5D;;;GAGG;AACU,QAAA,qBAAqB,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAEtE;;;GAGG;AACU,QAAA,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAE5D;;;GAGG;AACU,QAAA,eAAe,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
export * from './components';
|
|
2
|
-
export * from './DefaultErrorInfo';
|
|
3
|
-
export * from './DefaultLayout';
|
|
4
|
-
export * from './DefaultLoader';
|
|
5
|
-
export * from './DefaultRouter';
|
|
6
|
-
export * from './DefaultRouteSwitch';
|
|
7
2
|
export * from './ErrorBoundary';
|
|
8
3
|
export * from './ExtensionSlot';
|
|
9
4
|
export * from './Mediator';
|
|
5
|
+
export * from './PiralGlobals';
|
|
10
6
|
export * from './PiralRoutes';
|
|
7
|
+
export * from './PiralSuspense';
|
|
11
8
|
export * from './PiralView';
|
|
12
9
|
export * from './PortalRenderer';
|
|
13
10
|
export * from './ResponsiveLayout';
|
|
14
|
-
export * from './SetComponent';
|
|
15
|
-
export * from './SetError';
|
|
16
|
-
export * from './SetErrors';
|
|
17
|
-
export * from './SetLayout';
|
|
18
|
-
export * from './SetProvider';
|
|
19
|
-
export * from './SetRedirect';
|
|
20
|
-
export * from './SetRoute';
|
|
21
11
|
export * from './SwitchErrorInfo';
|
|
22
12
|
export * from './wrapComponent';
|
package/lib/components/index.js
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(0, tslib_1.__exportStar)(require("./ResponsiveLayout"), exports);
|
|
17
|
-
(0, tslib_1.__exportStar)(require("./SetComponent"), exports);
|
|
18
|
-
(0, tslib_1.__exportStar)(require("./SetError"), exports);
|
|
19
|
-
(0, tslib_1.__exportStar)(require("./SetErrors"), exports);
|
|
20
|
-
(0, tslib_1.__exportStar)(require("./SetLayout"), exports);
|
|
21
|
-
(0, tslib_1.__exportStar)(require("./SetProvider"), exports);
|
|
22
|
-
(0, tslib_1.__exportStar)(require("./SetRedirect"), exports);
|
|
23
|
-
(0, tslib_1.__exportStar)(require("./SetRoute"), exports);
|
|
24
|
-
(0, tslib_1.__exportStar)(require("./SwitchErrorInfo"), exports);
|
|
25
|
-
(0, tslib_1.__exportStar)(require("./wrapComponent"), exports);
|
|
4
|
+
tslib_1.__exportStar(require("./components"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ErrorBoundary"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ExtensionSlot"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./Mediator"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./PiralGlobals"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./PiralRoutes"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./PiralSuspense"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./PiralView"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./PortalRenderer"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./ResponsiveLayout"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./SwitchErrorInfo"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./wrapComponent"), exports);
|
|
26
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,0DAAgC;AAChC,0DAAgC;AAChC,qDAA2B;AAC3B,yDAA+B;AAC/B,wDAA8B;AAC9B,0DAAgC;AAChC,sDAA4B;AAC5B,2DAAiC;AACjC,6DAAmC;AACnC,4DAAkC;AAClC,0DAAgC"}
|
|
File without changes
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DefaultErrorInfo = void 0;
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
6
|
-
const SwitchErrorInfo_1 = require("./SwitchErrorInfo");
|
|
5
|
+
const components_1 = require("../components");
|
|
7
6
|
/**
|
|
8
7
|
* The default error info component. Just uses the "error" extension slot.
|
|
9
8
|
* Leverage the default one by registration of respective extensions using
|
|
10
9
|
* the "error" name.
|
|
11
10
|
*/
|
|
12
|
-
const DefaultErrorInfo = (props) => (React.createElement(
|
|
11
|
+
const DefaultErrorInfo = (props) => (React.createElement(components_1.ExtensionSlot, { name: "error", params: props, empty: () => React.createElement(components_1.SwitchErrorInfo, Object.assign({ key: "default_error" }, props)) }));
|
|
13
12
|
exports.DefaultErrorInfo = DefaultErrorInfo;
|
|
14
13
|
exports.DefaultErrorInfo.displayName = 'DefaultErrorInfo';
|
|
15
14
|
//# sourceMappingURL=DefaultErrorInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultErrorInfo.js","sourceRoot":"","sources":["../../src/defaults/DefaultErrorInfo.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,8CAA+D;AAG/D;;;;GAIG;AACI,MAAM,gBAAgB,GAA6B,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,oBAAC,0BAAa,IAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,oBAAC,4BAAe,kBAAC,GAAG,EAAC,eAAe,IAAK,KAAK,EAAI,GAAI,CAC/G,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AACF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLayout.js","sourceRoot":"","sources":["../../src/defaults/DefaultLayout.tsx"],"names":[],"mappings":";;;AACA,oCAAyC;AAGzC;;GAEG;AACI,MAAM,aAAa,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAC;AAAjF,QAAA,aAAa,iBAAoE;AAC9F,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
|
|
File without changes
|
|
@@ -8,4 +8,4 @@ const React = require("react");
|
|
|
8
8
|
const DefaultLoadingIndicator = () => React.createElement("div", null, "Loading");
|
|
9
9
|
exports.DefaultLoadingIndicator = DefaultLoadingIndicator;
|
|
10
10
|
exports.DefaultLoadingIndicator.displayName = 'DefaultLoadingIndicator';
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=DefaultLoadingIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLoadingIndicator.js","sourceRoot":"","sources":["../../src/defaults/DefaultLoadingIndicator.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAG/B;;GAEG;AACI,MAAM,uBAAuB,GAAoC,GAAG,EAAE,CAAC,2CAAkB,CAAC;AAApF,QAAA,uBAAuB,2BAA6D;AACjG,+BAAuB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const react_router_1 = require("react-router");
|
|
7
7
|
const DefaultRouteSwitch = (_a) => {
|
|
8
|
-
var { paths, NotFound } = _a, props =
|
|
8
|
+
var { paths, NotFound } = _a, props = tslib_1.__rest(_a, ["paths", "NotFound"]);
|
|
9
9
|
return (React.createElement(react_router_1.Switch, Object.assign({}, props),
|
|
10
10
|
paths.map(({ path, Component }) => (React.createElement(react_router_1.Route, { exact: true, key: path, path: path, component: Component }))),
|
|
11
11
|
React.createElement(react_router_1.Route, { component: NotFound })));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultRouteSwitch.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouteSwitch.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+CAA6C;AAGtC,MAAM,kBAAkB,GAA+B,CAAC,EAA6B,EAAE,EAAE;QAAjC,EAAE,KAAK,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAA3B,qBAA6B,CAAF;IACxF,OAAO,CACL,oBAAC,qBAAM,oBAAK,KAAK;QACd,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClC,oBAAC,oBAAK,IAAC,KAAK,QAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,CAC7D,CAAC;QACF,oBAAC,oBAAK,IAAC,SAAS,EAAE,QAAQ,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultRouter.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouter.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uDAAiD;AACjD,oCAA0C;AAGnC,MAAM,aAAa,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,UAAU,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO,oBAAC,gCAAa,IAAC,QAAQ,EAAE,UAAU,IAAG,QAAQ,CAAiB,CAAC;AACzE,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./DefaultErrorInfo"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./DefaultLayout"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./DefaultLoadingIndicator"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./DefaultRouter"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./DefaultRouteSwitch"), exports);
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/defaults/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,0DAAgC;AAChC,oEAA0C;AAC1C,0DAAgC;AAChC,+DAAqC"}
|
package/lib/hooks/actions.js
CHANGED
|
@@ -8,7 +8,7 @@ const stateContext_1 = require("../state/stateContext");
|
|
|
8
8
|
* Hook that gets the actions for manipulating the global state.
|
|
9
9
|
*/
|
|
10
10
|
function useActions() {
|
|
11
|
-
const _a = (0, react_1.useContext)(stateContext_1.StateContext), { state } = _a, actions =
|
|
11
|
+
const _a = (0, react_1.useContext)(stateContext_1.StateContext), { state } = _a, actions = tslib_1.__rest(_a, ["state"]);
|
|
12
12
|
return actions;
|
|
13
13
|
}
|
|
14
14
|
exports.useActions = useActions;
|
package/lib/hooks/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/hooks/actions.ts"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,wDAAqD;AAGrD;;GAEG;AACH,SAAgB,UAAU;IACxB,MAAM,KAAwB,IAAA,kBAAU,EAAqB,2BAAY,CAAC,EAApE,EAAE,KAAK,OAA6D,EAAxD,OAAO,
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/hooks/actions.ts"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,wDAAqD;AAGrD;;GAEG;AACH,SAAgB,UAAU;IACxB,MAAM,KAAwB,IAAA,kBAAU,EAAqB,2BAAY,CAAC,EAApE,EAAE,KAAK,OAA6D,EAAxD,OAAO,sBAAnB,SAAqB,CAA+C,CAAC;IAC3E,OAAO,OAAuB,CAAC;AACjC,CAAC;AAHD,gCAGC"}
|
package/lib/hooks/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./action"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./actions"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./globalState"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./media"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./setter"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./sharedData"), exports);
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/lib/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,oDAA0B;AAC1B,wDAA8B;AAC9B,kDAAwB;AACxB,mDAAyB;AACzB,uDAA6B"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./createInstance"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Piral"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./helpers"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./components"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./hooks"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./setters"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./state"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./utils"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,kDAAwB;AACxB,oDAA0B;AAC1B,uDAA6B;AAC7B,kDAAwB;AACxB,oDAA0B;AAC1B,kDAAwB;AACxB,kDAAwB;AACxB,kDAAwB"}
|
package/lib/modules/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./api"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./dependencies"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./element"), exports);
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/modules/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,yDAA+B;AAC/B,oDAA0B"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetComponent.js","sourceRoot":"","sources":["../../src/setters/SetComponent.tsx"],"names":[],"mappings":";;;AACA,oCAA4D;AAiB5D;;GAEG;AACH,SAAgB,YAAY,CAAqC,EAC/D,IAAI,EACJ,SAAS,GACe;IACxB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACjD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,SAAS,IAAI,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AARD,oCAQC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetError.js","sourceRoot":"","sources":["../../src/setters/SetError.tsx"],"names":[],"mappings":";;;AACA,oCAA4D;AAiB5D;;GAEG;AACH,SAAgB,QAAQ,CAA0C,EAChE,IAAI,EACJ,SAAS,GACW;IACpB,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACtD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACjE,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AARD,4BAQC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetErrors.js","sourceRoot":"","sources":["../../src/setters/SetErrors.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yCAAsC;AAatC;;GAEG;AACH,SAAgB,SAAS,CAAC,EAAE,MAAM,GAAG,EAAE,EAAkB;IACvD,OAAO,CACL,0CACG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CACrC,oBAAC,mBAAQ,IAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAI,CAC1D,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AARD,8BAQC"}
|
|
File without changes
|
|
File without changes
|