piral-core 0.13.9 → 0.14.0-beta.3157
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/debug-pilet.d.ts +3 -0
- package/debug-pilet.js +12 -0
- package/debug-piral.d.ts +4 -0
- package/debug-piral.js +59 -0
- package/dependencies.codegen +1 -1
- package/esm/Piral.js +6 -8
- package/esm/Piral.js.map +1 -1
- package/esm/actions/app.js +9 -10
- package/esm/actions/app.js.map +1 -1
- package/esm/actions/components.js +4 -5
- package/esm/actions/components.js.map +1 -1
- package/esm/actions/data.js +16 -17
- package/esm/actions/data.js.map +1 -1
- package/esm/actions/define.js +2 -3
- package/esm/actions/define.js.map +1 -1
- package/esm/actions/portal.d.ts +2 -0
- package/esm/actions/portal.js +9 -4
- package/esm/actions/portal.js.map +1 -1
- package/esm/actions/state.js +1 -1
- package/esm/actions/state.js.map +1 -1
- package/esm/components/DefaultErrorInfo.js +1 -2
- package/esm/components/DefaultErrorInfo.js.map +1 -1
- package/esm/components/DefaultLayout.js +1 -4
- package/esm/components/DefaultLayout.js.map +1 -1
- package/esm/components/DefaultLoader.js +1 -1
- package/esm/components/DefaultLoader.js.map +1 -1
- package/esm/components/ErrorBoundary.js +13 -18
- package/esm/components/ErrorBoundary.js.map +1 -1
- package/esm/components/ExtensionSlot.js +5 -9
- package/esm/components/ExtensionSlot.js.map +1 -1
- package/esm/components/Mediator.js +8 -8
- package/esm/components/Mediator.js.map +1 -1
- package/esm/components/PiralRoutes.js +8 -8
- package/esm/components/PiralRoutes.js.map +1 -1
- package/esm/components/PiralView.js +11 -16
- package/esm/components/PiralView.js.map +1 -1
- package/esm/components/PortalRenderer.d.ts +5 -0
- package/esm/components/PortalRenderer.js +7 -0
- package/esm/components/PortalRenderer.js.map +1 -0
- package/esm/components/ResponsiveLayout.js +5 -6
- package/esm/components/ResponsiveLayout.js.map +1 -1
- package/esm/components/SetComponent.js +3 -4
- package/esm/components/SetComponent.js.map +1 -1
- package/esm/components/SetError.js +3 -4
- package/esm/components/SetError.js.map +1 -1
- package/esm/components/SetErrors.js +2 -3
- package/esm/components/SetErrors.js.map +1 -1
- package/esm/components/SetLayout.js +2 -3
- package/esm/components/SetLayout.js.map +1 -1
- package/esm/components/SetProvider.js +3 -4
- package/esm/components/SetProvider.js.map +1 -1
- package/esm/components/SetRedirect.js +3 -4
- package/esm/components/SetRedirect.js.map +1 -1
- package/esm/components/SetRoute.js +3 -4
- package/esm/components/SetRoute.js.map +1 -1
- package/esm/components/SwitchErrorInfo.js +12 -10
- package/esm/components/SwitchErrorInfo.js.map +1 -1
- package/esm/components/components.js +8 -9
- package/esm/components/components.js.map +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.js +1 -0
- package/esm/components/index.js.map +1 -1
- package/esm/createInstance.js +24 -25
- package/esm/createInstance.js.map +1 -1
- package/esm/helpers.d.ts +11 -26
- package/esm/helpers.js +18 -56
- package/esm/helpers.js.map +1 -1
- package/esm/hooks/action.js +1 -1
- package/esm/hooks/action.js.map +1 -1
- package/esm/hooks/actions.js +1 -1
- package/esm/hooks/actions.js.map +1 -1
- package/esm/hooks/globalState.js +5 -5
- package/esm/hooks/globalState.js.map +1 -1
- package/esm/hooks/index.d.ts +0 -5
- package/esm/hooks/index.js +0 -5
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/media.js +8 -7
- package/esm/hooks/media.js.map +1 -1
- package/esm/hooks/setter.js +3 -2
- package/esm/hooks/setter.js.map +1 -1
- package/esm/hooks/sharedData.js +2 -2
- package/esm/hooks/sharedData.js.map +1 -1
- package/esm/modules/api.js +79 -28
- package/esm/modules/api.js.map +1 -1
- package/esm/modules/dependencies.d.ts +3 -4
- package/esm/modules/dependencies.js +11 -14
- package/esm/modules/dependencies.js.map +1 -1
- package/esm/state/createActions.js +7 -12
- package/esm/state/createActions.js.map +1 -1
- package/esm/state/createGlobalState.js +6 -8
- package/esm/state/createGlobalState.js.map +1 -1
- package/esm/state/stateContext.js +1 -1
- package/esm/state/stateContext.js.map +1 -1
- package/esm/state/withApi.js +59 -62
- package/esm/state/withApi.js.map +1 -1
- package/esm/types/config.d.ts +23 -16
- package/esm/types/state.d.ts +13 -0
- package/esm/utils/compare.js +4 -4
- package/esm/utils/compare.js.map +1 -1
- package/esm/utils/data.js +6 -7
- package/esm/utils/data.js.map +1 -1
- package/esm/utils/foreign.d.ts +4 -2
- package/esm/utils/foreign.js +16 -8
- package/esm/utils/foreign.js.map +1 -1
- package/esm/utils/guid.js +3 -3
- package/esm/utils/guid.js.map +1 -1
- package/esm/utils/helpers.d.ts +11 -8
- package/esm/utils/helpers.js +28 -17
- package/esm/utils/helpers.js.map +1 -1
- package/esm/utils/media.js +8 -7
- package/esm/utils/media.js.map +1 -1
- package/esm/utils/storage.js +13 -14
- package/esm/utils/storage.js.map +1 -1
- package/lib/Piral.js +9 -11
- package/lib/Piral.js.map +1 -1
- package/lib/actions/app.js +11 -12
- package/lib/actions/app.js.map +1 -1
- package/lib/actions/components.js +5 -6
- package/lib/actions/components.js.map +1 -1
- package/lib/actions/data.js +17 -18
- package/lib/actions/data.js.map +1 -1
- package/lib/actions/define.js +2 -3
- package/lib/actions/define.js.map +1 -1
- package/lib/actions/index.js +7 -7
- package/lib/actions/index.js.map +1 -1
- package/lib/actions/portal.d.ts +2 -0
- package/lib/actions/portal.js +12 -5
- package/lib/actions/portal.js.map +1 -1
- package/lib/actions/state.js +3 -3
- package/lib/actions/state.js.map +1 -1
- package/lib/components/DefaultErrorInfo.js +4 -5
- package/lib/components/DefaultErrorInfo.js.map +1 -1
- package/lib/components/DefaultLayout.js +2 -5
- package/lib/components/DefaultLayout.js.map +1 -1
- package/lib/components/DefaultLoader.js +2 -2
- package/lib/components/DefaultLoader.js.map +1 -1
- package/lib/components/ErrorBoundary.js +18 -22
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/components/ExtensionSlot.js +10 -14
- package/lib/components/ExtensionSlot.js.map +1 -1
- package/lib/components/Mediator.js +11 -11
- package/lib/components/Mediator.js.map +1 -1
- package/lib/components/PiralRoutes.js +11 -11
- package/lib/components/PiralRoutes.js.map +1 -1
- package/lib/components/PiralView.js +16 -21
- package/lib/components/PiralView.js.map +1 -1
- package/lib/components/PortalRenderer.d.ts +5 -0
- package/lib/components/PortalRenderer.js +11 -0
- package/lib/components/PortalRenderer.js.map +1 -0
- package/lib/components/ResponsiveLayout.js +9 -10
- package/lib/components/ResponsiveLayout.js.map +1 -1
- package/lib/components/SetComponent.js +4 -5
- package/lib/components/SetComponent.js.map +1 -1
- package/lib/components/SetError.js +4 -5
- package/lib/components/SetError.js.map +1 -1
- package/lib/components/SetErrors.js +4 -5
- package/lib/components/SetErrors.js.map +1 -1
- package/lib/components/SetLayout.js +4 -5
- package/lib/components/SetLayout.js.map +1 -1
- package/lib/components/SetProvider.js +4 -5
- package/lib/components/SetProvider.js.map +1 -1
- package/lib/components/SetRedirect.js +6 -7
- package/lib/components/SetRedirect.js.map +1 -1
- package/lib/components/SetRoute.js +4 -5
- package/lib/components/SetRoute.js.map +1 -1
- package/lib/components/SwitchErrorInfo.js +14 -12
- package/lib/components/SwitchErrorInfo.js.map +1 -1
- package/lib/components/components.js +5 -6
- package/lib/components/components.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +20 -19
- package/lib/components/index.js.map +1 -1
- package/lib/createInstance.js +31 -32
- package/lib/createInstance.js.map +1 -1
- package/lib/helpers.d.ts +11 -26
- package/lib/helpers.js +19 -59
- package/lib/helpers.js.map +1 -1
- package/lib/hooks/action.js +3 -3
- package/lib/hooks/action.js.map +1 -1
- package/lib/hooks/actions.js +4 -4
- package/lib/hooks/actions.js.map +1 -1
- package/lib/hooks/globalState.js +8 -8
- package/lib/hooks/globalState.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -5
- package/lib/hooks/index.js +7 -12
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/media.js +10 -9
- package/lib/hooks/media.js.map +1 -1
- package/lib/hooks/setter.js +4 -3
- package/lib/hooks/setter.js.map +1 -1
- package/lib/hooks/sharedData.js +3 -3
- package/lib/hooks/sharedData.js.map +1 -1
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/modules/api.js +86 -35
- package/lib/modules/api.js.map +1 -1
- package/lib/modules/dependencies.d.ts +3 -4
- package/lib/modules/dependencies.js +13 -16
- package/lib/modules/dependencies.js.map +1 -1
- package/lib/modules/index.js +3 -3
- package/lib/modules/index.js.map +1 -1
- package/lib/state/createActions.js +8 -13
- package/lib/state/createActions.js.map +1 -1
- package/lib/state/createGlobalState.js +9 -11
- package/lib/state/createGlobalState.js.map +1 -1
- package/lib/state/index.js +5 -5
- package/lib/state/index.js.map +1 -1
- package/lib/state/stateContext.js +1 -1
- package/lib/state/stateContext.js.map +1 -1
- package/lib/state/withApi.js +67 -70
- package/lib/state/withApi.js.map +1 -1
- package/lib/types/config.d.ts +23 -16
- package/lib/types/index.js +13 -13
- package/lib/types/index.js.map +1 -1
- package/lib/types/state.d.ts +13 -0
- package/lib/utils/compare.js +4 -4
- package/lib/utils/compare.js.map +1 -1
- package/lib/utils/data.js +6 -7
- package/lib/utils/data.js.map +1 -1
- package/lib/utils/foreign.d.ts +4 -2
- package/lib/utils/foreign.js +21 -11
- package/lib/utils/foreign.js.map +1 -1
- package/lib/utils/guid.js +3 -3
- package/lib/utils/guid.js.map +1 -1
- package/lib/utils/helpers.d.ts +11 -8
- package/lib/utils/helpers.js +30 -17
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/index.js +9 -9
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/media.js +7 -6
- package/lib/utils/media.js.map +1 -1
- package/lib/utils/react.js +1 -1
- package/lib/utils/react.js.map +1 -1
- package/lib/utils/storage.js +11 -12
- package/lib/utils/storage.js.map +1 -1
- package/package.json +21 -5
- package/src/Piral.tsx +2 -1
- package/src/actions/portal.ts +19 -1
- package/src/components/ExtensionSlot.tsx +2 -2
- package/src/components/Mediator.tsx +2 -1
- package/src/components/PortalRenderer.tsx +12 -0
- package/src/components/SwitchErrorInfo.tsx +5 -1
- package/src/components/index.ts +1 -0
- package/src/createInstance.tsx +6 -7
- package/src/helpers.test.tsx +7 -39
- package/src/helpers.tsx +32 -85
- package/src/hooks/index.ts +0 -5
- package/src/hooks/media.ts +2 -1
- package/src/hooks/setter.ts +2 -1
- package/src/modules/api.ts +72 -4
- package/src/modules/dependencies.test.ts +18 -5
- package/src/modules/dependencies.ts +12 -18
- package/src/state/withApi.tsx +12 -14
- package/src/types/config.ts +23 -17
- package/src/types/state.ts +13 -0
- package/src/utils/foreign.test.ts +4 -4
- package/src/utils/foreign.ts +28 -5
- package/src/utils/helpers.ts +21 -7
- package/src/utils/media.ts +2 -1
- package/esm/hooks/debounce.d.ts +0 -8
- package/esm/hooks/debounce.js +0 -18
- package/esm/hooks/debounce.js.map +0 -1
- package/esm/hooks/lockBodyScroll.d.ts +0 -6
- package/esm/hooks/lockBodyScroll.js +0 -15
- package/esm/hooks/lockBodyScroll.js.map +0 -1
- package/esm/hooks/onClickOutside.d.ts +0 -8
- package/esm/hooks/onClickOutside.js +0 -23
- package/esm/hooks/onClickOutside.js.map +0 -1
- package/esm/hooks/onScreenVisible.d.ts +0 -11
- package/esm/hooks/onScreenVisible.js +0 -28
- package/esm/hooks/onScreenVisible.js.map +0 -1
- package/esm/hooks/promise.d.ts +0 -13
- package/esm/hooks/promise.js +0 -21
- package/esm/hooks/promise.js.map +0 -1
- package/lib/hooks/debounce.d.ts +0 -8
- package/lib/hooks/debounce.js +0 -22
- package/lib/hooks/debounce.js.map +0 -1
- package/lib/hooks/lockBodyScroll.d.ts +0 -6
- package/lib/hooks/lockBodyScroll.js +0 -19
- package/lib/hooks/lockBodyScroll.js.map +0 -1
- package/lib/hooks/onClickOutside.d.ts +0 -8
- package/lib/hooks/onClickOutside.js +0 -27
- package/lib/hooks/onClickOutside.js.map +0 -1
- package/lib/hooks/onScreenVisible.d.ts +0 -11
- package/lib/hooks/onScreenVisible.js +0 -32
- package/lib/hooks/onScreenVisible.js.map +0 -1
- package/lib/hooks/promise.d.ts +0 -13
- package/lib/hooks/promise.js +0 -25
- package/lib/hooks/promise.js.map +0 -1
- package/src/hooks/debounce.test.ts +0 -67
- package/src/hooks/debounce.ts +0 -19
- package/src/hooks/lockBodyScroll.test.ts +0 -24
- package/src/hooks/lockBodyScroll.ts +0 -15
- package/src/hooks/onClickOutside.test.ts +0 -113
- package/src/hooks/onClickOutside.ts +0 -25
- package/src/hooks/onScreenVisible.test.ts +0 -68
- package/src/hooks/onScreenVisible.ts +0 -28
- package/src/hooks/promise.test.ts +0 -76
- package/src/hooks/promise.ts +0 -35
package/esm/state/withApi.js
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { isfunc } from 'piral-base';
|
|
4
3
|
import { __RouterContext } from 'react-router';
|
|
5
4
|
import { StateContext } from './stateContext';
|
|
6
|
-
import { PiralError, PiralLoadingIndicator, ErrorBoundary } from '../components';
|
|
7
|
-
import {
|
|
8
|
-
import { defaultRender, convertComponent } from '../utils';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_this.current = node;
|
|
5
|
+
import { PiralError, PiralLoadingIndicator, ErrorBoundary, PortalRenderer } from '../components';
|
|
6
|
+
import { useActions } from '../hooks';
|
|
7
|
+
import { defaultRender, convertComponent, none } from '../utils';
|
|
8
|
+
// this is an arbitrary start number to have 6 digits
|
|
9
|
+
let portalIdBase = 123456;
|
|
10
|
+
const DefaultWrapper = (props) => defaultRender(props.children);
|
|
11
|
+
class ForeignComponentContainer extends React.Component {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.handler = (ev) => {
|
|
15
|
+
const { innerProps } = this.props;
|
|
16
|
+
ev.stopPropagation();
|
|
17
|
+
innerProps.piral.renderHtmlExtension(ev.detail.target, ev.detail.props);
|
|
18
|
+
};
|
|
19
|
+
this.setNode = (node) => {
|
|
20
|
+
this.current = node;
|
|
23
21
|
};
|
|
24
|
-
return _this;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
componentDidMount() {
|
|
24
|
+
const node = this.current;
|
|
25
|
+
const { $component, $context, innerProps } = this.props;
|
|
26
|
+
const { mount } = $component;
|
|
30
27
|
if (node && isfunc(mount)) {
|
|
31
28
|
mount(node, innerProps, $context);
|
|
29
|
+
node.addEventListener('render-html', this.handler, false);
|
|
32
30
|
}
|
|
33
31
|
this.previous = node;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
}
|
|
33
|
+
componentDidUpdate() {
|
|
34
|
+
const { current, previous } = this;
|
|
35
|
+
const { $component, $context, innerProps } = this.props;
|
|
36
|
+
const { update } = $component;
|
|
39
37
|
if (current !== previous) {
|
|
40
38
|
previous && this.componentWillUnmount();
|
|
41
39
|
current && this.componentDidMount();
|
|
@@ -43,38 +41,38 @@ var ForeignComponentContainer = /** @class */ (function (_super) {
|
|
|
43
41
|
else if (isfunc(update)) {
|
|
44
42
|
update(current, innerProps, $context);
|
|
45
43
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
}
|
|
45
|
+
componentWillUnmount() {
|
|
46
|
+
const node = this.previous;
|
|
47
|
+
const { $component } = this.props;
|
|
48
|
+
const { unmount } = $component;
|
|
51
49
|
if (node && isfunc(unmount)) {
|
|
52
50
|
unmount(node);
|
|
51
|
+
node.removeEventListener('render-html', this.handler, false);
|
|
53
52
|
}
|
|
54
53
|
this.previous = undefined;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const { $portalId } = this.props;
|
|
58
57
|
return React.createElement("div", { "data-portal-id": $portalId, ref: this.setNode });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
}(React.Component));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
62
60
|
function wrapReactComponent(Component, stasisOptions, piral, Wrapper) {
|
|
63
|
-
return
|
|
64
|
-
React.createElement(ErrorBoundary,
|
|
65
|
-
React.createElement(Component,
|
|
61
|
+
return (props) => (React.createElement(Wrapper, Object.assign({}, props, { piral: piral }),
|
|
62
|
+
React.createElement(ErrorBoundary, Object.assign({}, stasisOptions, { renderProps: props }),
|
|
63
|
+
React.createElement(Component, Object.assign({}, props, { piral: piral })))));
|
|
66
64
|
}
|
|
67
65
|
function wrapForeignComponent(component, stasisOptions, piral, Wrapper) {
|
|
68
|
-
return React.memo(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
React.useEffect(
|
|
76
|
-
return (React.createElement(Wrapper,
|
|
77
|
-
React.createElement(ErrorBoundary,
|
|
66
|
+
return React.memo((props) => {
|
|
67
|
+
const { destroyPortal } = useActions();
|
|
68
|
+
const { state } = React.useContext(StateContext);
|
|
69
|
+
const router = React.useContext(__RouterContext);
|
|
70
|
+
const id = React.useMemo(() => (portalIdBase++).toString(26), none);
|
|
71
|
+
const context = React.useMemo(() => ({ router, state }), [router, state]);
|
|
72
|
+
const innerProps = React.useMemo(() => (Object.assign(Object.assign({}, props), { piral })), [props]);
|
|
73
|
+
React.useEffect(() => () => destroyPortal(id), none);
|
|
74
|
+
return (React.createElement(Wrapper, Object.assign({}, innerProps),
|
|
75
|
+
React.createElement(ErrorBoundary, Object.assign({}, stasisOptions, { renderProps: props }),
|
|
78
76
|
React.createElement(PortalRenderer, { id: id }),
|
|
79
77
|
React.createElement(ForeignComponentContainer, { innerProps: innerProps, "$portalId": id, "$component": component, "$context": context }))));
|
|
80
78
|
});
|
|
@@ -86,10 +84,10 @@ function wrapComponent(converters, component, piral, Wrapper, stasisOptions) {
|
|
|
86
84
|
if (!component) {
|
|
87
85
|
console.error('The given value is not a valid component.');
|
|
88
86
|
// tslint:disable-next-line:no-null-keyword
|
|
89
|
-
component =
|
|
87
|
+
component = () => null;
|
|
90
88
|
}
|
|
91
89
|
if (typeof component === 'object' && isNotExotic(component)) {
|
|
92
|
-
|
|
90
|
+
const result = convertComponent(converters[component.type], component);
|
|
93
91
|
return wrapForeignComponent(result, stasisOptions, piral, Wrapper);
|
|
94
92
|
}
|
|
95
93
|
return wrapReactComponent(component, stasisOptions, piral, Wrapper);
|
|
@@ -97,19 +95,18 @@ function wrapComponent(converters, component, piral, Wrapper, stasisOptions) {
|
|
|
97
95
|
function getWrapper(wrappers, wrapperType) {
|
|
98
96
|
return wrappers[wrapperType] || wrappers['*'] || DefaultWrapper;
|
|
99
97
|
}
|
|
100
|
-
export function withApi(context, component, piral, errorType, wrapperType) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var Wrapper = context.readState(function (m) { return getWrapper(m.registry.wrappers, wrapperType); });
|
|
98
|
+
export function withApi(context, component, piral, errorType, wrapperType = errorType) {
|
|
99
|
+
const converters = context.converters;
|
|
100
|
+
const Wrapper = context.readState((m) => getWrapper(m.registry.wrappers, wrapperType));
|
|
104
101
|
return wrapComponent(converters, component, piral, Wrapper, {
|
|
105
|
-
onError
|
|
102
|
+
onError(error) {
|
|
106
103
|
console.error(piral, error);
|
|
107
104
|
},
|
|
108
|
-
renderChild
|
|
105
|
+
renderChild(child) {
|
|
109
106
|
return React.createElement(React.Suspense, { fallback: React.createElement(PiralLoadingIndicator, null) }, child);
|
|
110
107
|
},
|
|
111
|
-
renderError
|
|
112
|
-
return React.createElement(PiralError,
|
|
108
|
+
renderError(error, props) {
|
|
109
|
+
return React.createElement(PiralError, Object.assign({ type: errorType, error: error }, props));
|
|
113
110
|
},
|
|
114
111
|
});
|
|
115
112
|
}
|
package/esm/state/withApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withApi.js","sourceRoot":"","sources":["../../src/state/withApi.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withApi.js","sourceRoot":"","sources":["../../src/state/withApi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,aAAa,EAAwB,cAAc,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAYjE,qDAAqD;AACrD,IAAI,YAAY,GAAG,MAAM,CAAC;AAE1B,MAAM,cAAc,GAAa,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAS1E,MAAM,yBAA6B,SAAQ,KAAK,CAAC,SAA4C;IAA7F;;QAGU,YAAO,GAAG,CAAC,EAAe,EAAE,EAAE;YACpC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAClC,EAAE,CAAC,eAAe,EAAE,CAAC;YACrB,UAAU,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1E,CAAC,CAAC;QAEM,YAAO,GAAG,CAAC,IAAoB,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC,CAAC;IA6CJ,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;AAED,SAAS,UAAU,CAAC,QAAkD,EAAE,WAAmB;IACzF,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,OAA2B,EAC3B,SAAoD,EACpD,KAAe,EACf,SAAuB,EACvB,cAAsB,SAAS;IAE/B,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAEvF,OAAO,aAAa,CAAS,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE;QAClE,OAAO,CAAC,KAAK;YACX,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,WAAW,CAAC,KAAK;YACf,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,qBAAqB,OAAG,IAAG,KAAK,CAAkB,CAAC;QACvF,CAAC;QACD,WAAW,CAAC,KAAK,EAAE,KAAU;YAC3B,OAAO,oBAAC,UAAU,kBAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;QAClE,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/esm/types/config.d.ts
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import type { PiletRequester,
|
|
1
|
+
import type { PiletRequester, PiletLoadingStrategy, PiletLoader, Pilet, AvailableDependencies, CustomSpecLoaders, DefaultLoaderConfig, PiletApiCreator } from 'piral-base';
|
|
2
|
+
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
2
3
|
import type { NestedPartial } from './common';
|
|
3
4
|
import type { PiralPlugin } from './plugin';
|
|
4
5
|
import type { GlobalState, GlobalStateContext, PiralDefineActions } from './state';
|
|
5
|
-
export { PiletLoadingStrategy,
|
|
6
|
+
export { PiletLoadingStrategy, PiletRequester, AvailableDependencies };
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Definition for customizing the shared dependencies.
|
|
8
9
|
*/
|
|
9
|
-
export interface
|
|
10
|
-
/**
|
|
11
|
-
* The callback for defining how a dependency will be fetched.
|
|
12
|
-
*/
|
|
13
|
-
fetchDependency?: PiletDependencyFetcher;
|
|
10
|
+
export interface DependencySelector {
|
|
14
11
|
/**
|
|
15
|
-
*
|
|
12
|
+
* Selects the dependencies to share from the currently available dependencies.
|
|
13
|
+
* @param currentDependencies The currently available dependencies.
|
|
14
|
+
* @default currentDependencies All current dependencies are shared
|
|
15
|
+
* @returns The dependencies selected to be shared.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
(currentDependencies: AvailableDependencies): AvailableDependencies;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The configuration for loading the pilets of the Piral instance.
|
|
21
|
+
*/
|
|
22
|
+
export interface PiralPiletConfiguration {
|
|
18
23
|
/**
|
|
19
24
|
* Function to load the modules asynchronously, e.g., from a server 🚚.
|
|
20
25
|
*/
|
|
@@ -31,6 +36,10 @@ export interface PiralPiletConfiguration {
|
|
|
31
36
|
* Optionally, configures the default loader.
|
|
32
37
|
*/
|
|
33
38
|
loaderConfig?: DefaultLoaderConfig;
|
|
39
|
+
/**
|
|
40
|
+
* Optionally, configures explicitly what dependencies are shared.
|
|
41
|
+
*/
|
|
42
|
+
shareDependencies?: DependencySelector;
|
|
34
43
|
/**
|
|
35
44
|
* Determines that pilets are loaded asynchronously, essentially showing the
|
|
36
45
|
* app right away without waiting for the pilets to load and evaluate.
|
|
@@ -42,12 +51,6 @@ export interface PiralPiletConfiguration {
|
|
|
42
51
|
* This can be used for customization or for debugging purposes.
|
|
43
52
|
*/
|
|
44
53
|
availablePilets?: Array<Pilet>;
|
|
45
|
-
/**
|
|
46
|
-
* Optionally provides a function to extend the API creator with some additional
|
|
47
|
-
* functionality.
|
|
48
|
-
* @deprecated Use plugins instead.
|
|
49
|
-
*/
|
|
50
|
-
extendApi?: PiralPlugin | Array<PiralPlugin>;
|
|
51
54
|
/**
|
|
52
55
|
* Extends the Piral instance with additional capabilities.
|
|
53
56
|
*/
|
|
@@ -80,6 +83,10 @@ export interface PiralStateConfiguration {
|
|
|
80
83
|
* Optionally, sets up some initial custom actions ⚡️.
|
|
81
84
|
*/
|
|
82
85
|
actions?: PiralDefineActions;
|
|
86
|
+
/**
|
|
87
|
+
* Optionally, sets up additional configuration for the debug tooling 🤖.
|
|
88
|
+
*/
|
|
89
|
+
debug?: DebuggerExtensionOptions;
|
|
83
90
|
}
|
|
84
91
|
/**
|
|
85
92
|
* The configuration to be used in the Piral instance.
|
package/esm/types/state.d.ts
CHANGED
|
@@ -261,6 +261,19 @@ export interface PiralActions extends PiralCustomActions {
|
|
|
261
261
|
* @param entry The child to render.
|
|
262
262
|
*/
|
|
263
263
|
showPortal(id: string, entry: ReactPortal): void;
|
|
264
|
+
/**
|
|
265
|
+
* Hides the provided portal in the rendering pipeline.
|
|
266
|
+
* @param id The id of the portal to use.
|
|
267
|
+
* @param entry The child to remove.
|
|
268
|
+
*/
|
|
269
|
+
hidePortal(id: string, entry: ReactPortal): void;
|
|
270
|
+
/**
|
|
271
|
+
* Updates the provided portal in the rendering pipeline.
|
|
272
|
+
* @param id The id of the portal to use.
|
|
273
|
+
* @param current The currently displayed child.
|
|
274
|
+
* @param next The updated child that should be displayed.
|
|
275
|
+
*/
|
|
276
|
+
updatePortal(id: string, current: ReactPortal, next: ReactPortal): void;
|
|
264
277
|
/**
|
|
265
278
|
* Dispatches a state change.
|
|
266
279
|
* @param update The update function creating a new state.
|
package/esm/utils/compare.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function compareObjects(a, b) {
|
|
2
|
-
for (
|
|
2
|
+
for (const i in a) {
|
|
3
3
|
if (!(i in b)) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
for (
|
|
7
|
+
for (const i in b) {
|
|
8
8
|
if (!compare(a[i], b[i])) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
@@ -13,8 +13,8 @@ function compareObjects(a, b) {
|
|
|
13
13
|
}
|
|
14
14
|
export function compare(a, b) {
|
|
15
15
|
if (a !== b) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const ta = typeof a;
|
|
17
|
+
const tb = typeof b;
|
|
18
18
|
if (ta === tb && ta === 'object' && a && b) {
|
|
19
19
|
return compareObjects(a, b);
|
|
20
20
|
}
|
package/esm/utils/compare.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/utils/compare.ts"],"names":[],"mappings":"AAAA,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,KAAK,
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/utils/compare.ts"],"names":[],"mappings":"AAAA,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;YACb,OAAO,KAAK,CAAC;SACd;KACF;IAED,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACxB,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,OAAO,CAAI,CAAI,EAAE,CAAI;IACnC,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;QACpB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;QAEpB,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,EAAE;YAC1C,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAC7B;QAED,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/esm/utils/data.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
const defaultTarget = 'memory';
|
|
2
2
|
export function createDataView(data) {
|
|
3
|
-
|
|
3
|
+
const proxyName = 'Proxy';
|
|
4
4
|
return (window[proxyName] &&
|
|
5
5
|
new Proxy(data, {
|
|
6
|
-
get
|
|
7
|
-
|
|
6
|
+
get(target, name) {
|
|
7
|
+
const item = target[name];
|
|
8
8
|
return item && item.value;
|
|
9
9
|
},
|
|
10
|
-
set
|
|
10
|
+
set(_target, _name, _value) {
|
|
11
11
|
return true;
|
|
12
12
|
},
|
|
13
13
|
}));
|
|
14
14
|
}
|
|
15
|
-
export function createDataOptions(options) {
|
|
16
|
-
if (options === void 0) { options = defaultTarget; }
|
|
15
|
+
export function createDataOptions(options = defaultTarget) {
|
|
17
16
|
if (typeof options === 'string') {
|
|
18
17
|
return {
|
|
19
18
|
target: options,
|
package/esm/utils/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/utils/data.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/utils/data.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAoB,QAAQ,CAAC;AAEhD,MAAM,UAAU,cAAc,CAAC,IAA0B;IACvD,MAAM,SAAS,GAAG,OAAO,CAAC;IAC1B,OAAO,CACL,MAAM,CAAC,SAAS,CAAC;QACjB,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,GAAG,CAAC,MAAM,EAAE,IAAI;gBACd,MAAM,IAAI,GAAG,MAAM,CAAC,IAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC;YAC5B,CAAC;YACD,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM;gBACxB,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,UAA4B,aAAa;IACzE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO;YACL,MAAM,EAAE,OAAO;SAChB,CAAC;KACH;SAAM,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5E,OAAO,OAAO,CAAC;KAChB;SAAM;QACL,OAAO;YACL,MAAM,EAAE,aAAa;SACtB,CAAC;KACH;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IACjE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,OAAO,CAAC;KAChB;SAAM,IAAI,OAAO,YAAY,IAAI,EAAE;QAClC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KAC1B;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
package/esm/utils/foreign.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
1
|
+
import { ComponentType, ReactPortal } from 'react';
|
|
2
2
|
import { GlobalStateContext, ForeignComponent } from '../types';
|
|
3
|
+
export declare function attachDomPortal<TProps>(id: string, context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
|
4
|
+
export declare function changeDomPortal<TProps>(id: string, current: ReactPortal, context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
|
3
5
|
export declare function convertComponent<T extends {
|
|
4
6
|
type: string;
|
|
5
7
|
}, U>(converter: (component: T) => ForeignComponent<U>, component: T): ForeignComponent<U>;
|
|
6
|
-
export declare function renderInDom<TProps>(context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): string;
|
|
8
|
+
export declare function renderInDom<TProps>(context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
package/esm/utils/foreign.js
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
|
+
export function attachDomPortal(id, context, element, component, props) {
|
|
4
|
+
const portal = createPortal(createElement(component, props), element);
|
|
5
|
+
context.showPortal(id, portal);
|
|
6
|
+
return [id, portal];
|
|
7
|
+
}
|
|
8
|
+
export function changeDomPortal(id, current, context, element, component, props) {
|
|
9
|
+
const next = createPortal(createElement(component, props), element);
|
|
10
|
+
context.updatePortal(id, current, next);
|
|
11
|
+
return [id, next];
|
|
12
|
+
}
|
|
3
13
|
export function convertComponent(converter, component) {
|
|
4
14
|
if (typeof converter !== 'function') {
|
|
5
|
-
throw new Error(
|
|
15
|
+
throw new Error(`No converter for component of type "${component.type}" registered.`);
|
|
6
16
|
}
|
|
7
17
|
return converter(component);
|
|
8
18
|
}
|
|
9
19
|
export function renderInDom(context, element, component, props) {
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
const portalId = 'data-portal-id';
|
|
21
|
+
let parent = element;
|
|
12
22
|
while (parent) {
|
|
13
23
|
if (parent instanceof Element && parent.hasAttribute(portalId)) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
context.showPortal(id, portal);
|
|
17
|
-
return id;
|
|
24
|
+
const id = parent.getAttribute(portalId);
|
|
25
|
+
return attachDomPortal(id, context, element, component, props);
|
|
18
26
|
}
|
|
19
27
|
parent = parent.parentNode || parent.host;
|
|
20
28
|
}
|
|
21
|
-
return
|
|
29
|
+
return attachDomPortal('root', context, element, component, props);
|
|
22
30
|
}
|
|
23
31
|
//# sourceMappingURL=foreign.js.map
|
package/esm/utils/foreign.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foreign.js","sourceRoot":"","sources":["../../src/utils/foreign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"foreign.js","sourceRoot":"","sources":["../../src/utils/foreign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA8B,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,UAAU,eAAe,CAC7B,EAAU,EACV,OAA2B,EAC3B,OAAiC,EACjC,SAAgC,EAChC,KAAa;IAEb,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAsB,CAAC,CAAC;IACrF,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,EAAU,EACV,OAAoB,EACpB,OAA2B,EAC3B,OAAiC,EACjC,SAAgC,EAChC,KAAa;IAEb,MAAM,IAAI,GAAG,YAAY,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAsB,CAAC,CAAC;IACnF,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,SAAgD,EAChD,SAAY;IAEZ,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;QACnC,MAAM,IAAI,KAAK,CAAC,uCAAuC,SAAS,CAAC,IAAI,eAAe,CAAC,CAAC;KACvF;IAED,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,OAA2B,EAC3B,OAAiC,EACjC,SAAgC,EAChC,KAAa;IAEb,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IAClC,IAAI,MAAM,GAAS,OAAO,CAAC;IAE3B,OAAO,MAAM,EAAE;QACb,IAAI,MAAM,YAAY,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;YAC9D,MAAM,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACzC,OAAO,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;SAChE;QAED,MAAM,GAAG,MAAM,CAAC,UAAU,IAAK,MAAqB,CAAC,IAAI,CAAC;KAC3D;IAED,OAAO,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AACrE,CAAC"}
|
package/esm/utils/guid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function rand(c) {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const r = (Math.random() * 16) | 0;
|
|
3
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
4
4
|
return v.toString(16);
|
|
5
5
|
}
|
|
6
6
|
export function generateId() {
|
|
7
7
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, rand);
|
|
8
8
|
}
|
|
9
9
|
export function buildName(prefix, name) {
|
|
10
|
-
return prefix
|
|
10
|
+
return `${prefix}://${name}`;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=guid.js.map
|
package/esm/utils/guid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guid.js","sourceRoot":"","sources":["../../src/utils/guid.ts"],"names":[],"mappings":"AAAA,SAAS,IAAI,CAAC,CAAY;IACxB,
|
|
1
|
+
{"version":3,"file":"guid.js","sourceRoot":"","sources":["../../src/utils/guid.ts"],"names":[],"mappings":"AAAA,SAAS,IAAI,CAAC,CAAY;IACxB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,MAAc,EAAE,IAAqB;IAC7D,OAAO,GAAG,MAAM,MAAM,IAAI,EAAE,CAAC;AAC/B,CAAC"}
|
package/esm/utils/helpers.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export declare const removeIndicator: any;
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
2
|
+
export declare const none: any[];
|
|
3
|
+
export declare const noop: () => void;
|
|
4
|
+
export declare function prependItem<T>(items: Array<T>, item: T): any[];
|
|
5
|
+
export declare function appendItem<T>(items: Array<T>, item: T): any[];
|
|
6
|
+
export declare function prependItems<T>(items: Array<T>, newItems: Array<T>): any[];
|
|
7
|
+
export declare function appendItems<T>(items: Array<T>, newItems: Array<T>): any[];
|
|
8
|
+
export declare function excludeItem<T>(items: Array<T>, item: T): any[];
|
|
9
|
+
export declare function includeItem<T>(items: Array<T>, item: T): any[];
|
|
10
|
+
export declare function replaceOrAddItem<T>(items: Array<T>, item: T, predicate: (item: T) => boolean): any[];
|
|
9
11
|
export declare function removeNested<T, U = any>(obj: T, predicate: (item: U) => boolean): T;
|
|
10
|
-
export declare function excludeOn<T>(items: Array<T>, predicate: (item: T) => boolean):
|
|
12
|
+
export declare function excludeOn<T>(items: Array<T>, predicate: (item: T) => boolean): any[];
|
|
11
13
|
export declare function updateKey<T, TKey extends keyof T>(obj: T, key: TKey, value: T[TKey]): T;
|
|
12
14
|
export declare function withKey<T, TKey extends keyof T>(obj: T, key: TKey, value: T[TKey]): T;
|
|
13
15
|
export declare function withoutKey<T, TKey extends keyof T>(obj: T, key: TKey): T;
|
|
16
|
+
export declare function tryParseJson(content: string): any;
|
package/esm/utils/helpers.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
2
|
// tslint:disable-next-line
|
|
3
|
-
export
|
|
3
|
+
export const removeIndicator = null;
|
|
4
|
+
// to avoid creating unnecessary empty arrays
|
|
5
|
+
export const none = [];
|
|
6
|
+
// to avoid creating unnecessary empty functions
|
|
7
|
+
export const noop = () => { };
|
|
4
8
|
export function prependItem(items, item) {
|
|
5
|
-
return
|
|
9
|
+
return [item, ...(items || none)];
|
|
6
10
|
}
|
|
7
11
|
export function appendItem(items, item) {
|
|
8
|
-
return
|
|
12
|
+
return [...(items || none), item];
|
|
9
13
|
}
|
|
10
14
|
export function prependItems(items, newItems) {
|
|
11
|
-
return
|
|
15
|
+
return [...newItems, ...(items || none)];
|
|
12
16
|
}
|
|
13
17
|
export function appendItems(items, newItems) {
|
|
14
|
-
return
|
|
18
|
+
return [...(items || none), ...newItems];
|
|
15
19
|
}
|
|
16
20
|
export function excludeItem(items, item) {
|
|
17
|
-
return (items ||
|
|
21
|
+
return (items || none).filter((m) => m !== item);
|
|
18
22
|
}
|
|
19
23
|
export function includeItem(items, item) {
|
|
20
24
|
return appendItem(excludeItem(items, item), item);
|
|
21
25
|
}
|
|
22
26
|
export function replaceOrAddItem(items, item, predicate) {
|
|
23
|
-
|
|
24
|
-
for (
|
|
27
|
+
const newItems = [...(items || none)];
|
|
28
|
+
for (let i = 0; i < newItems.length; i++) {
|
|
25
29
|
if (predicate(newItems[i])) {
|
|
26
30
|
newItems[i] = item;
|
|
27
31
|
return newItems;
|
|
@@ -31,10 +35,10 @@ export function replaceOrAddItem(items, item, predicate) {
|
|
|
31
35
|
return newItems;
|
|
32
36
|
}
|
|
33
37
|
export function removeNested(obj, predicate) {
|
|
34
|
-
return Object.keys(obj).reduce(
|
|
35
|
-
|
|
36
|
-
entries[key] = Object.keys(item).reduce(
|
|
37
|
-
|
|
38
|
+
return Object.keys(obj).reduce((entries, key) => {
|
|
39
|
+
const item = obj[key];
|
|
40
|
+
entries[key] = Object.keys(item).reduce((all, key) => {
|
|
41
|
+
const value = item[key];
|
|
38
42
|
if (Array.isArray(value)) {
|
|
39
43
|
all[key] = excludeOn(value, predicate);
|
|
40
44
|
}
|
|
@@ -47,17 +51,24 @@ export function removeNested(obj, predicate) {
|
|
|
47
51
|
}, {});
|
|
48
52
|
}
|
|
49
53
|
export function excludeOn(items, predicate) {
|
|
50
|
-
return (items ||
|
|
54
|
+
return (items || none).filter((m) => !predicate(m));
|
|
51
55
|
}
|
|
52
56
|
export function updateKey(obj, key, value) {
|
|
53
57
|
return value === removeIndicator ? withoutKey(obj, key) : withKey(obj, key, value);
|
|
54
58
|
}
|
|
55
59
|
export function withKey(obj, key, value) {
|
|
56
|
-
|
|
57
|
-
return __assign(__assign({}, obj), (_a = {}, _a[key] = value, _a));
|
|
60
|
+
return Object.assign(Object.assign({}, obj), { [key]: value });
|
|
58
61
|
}
|
|
59
62
|
export function withoutKey(obj, key) {
|
|
60
|
-
|
|
63
|
+
const _a = obj || {}, _b = key, _ = _a[_b], newObj = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
61
64
|
return newObj;
|
|
62
65
|
}
|
|
66
|
+
export function tryParseJson(content) {
|
|
67
|
+
try {
|
|
68
|
+
return JSON.parse(content);
|
|
69
|
+
}
|
|
70
|
+
catch (_a) {
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
63
74
|
//# sourceMappingURL=helpers.js.map
|
package/esm/utils/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;AAEvB,gDAAgD;AAChD,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAE7B,MAAM,UAAU,WAAW,CAAI,KAAe,EAAE,IAAO;IACrD,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,UAAU,CAAI,KAAe,EAAE,IAAO;IACpD,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,YAAY,CAAI,KAAe,EAAE,QAAkB;IACjE,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,KAAe,EAAE,QAAkB;IAChE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,KAAe,EAAE,IAAO;IACrD,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,CA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2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { none } from './helpers';
|
|
3
|
+
export const defaultLayouts = ['desktop', 'tablet', 'mobile'];
|
|
4
|
+
export const defaultBreakpoints = ['(min-width: 991px)', '(min-width: 481px)', '(max-width: 480px)'];
|
|
5
|
+
const mm = typeof window === 'undefined' || !isfunc(window.matchMedia)
|
|
6
|
+
? () => ({ matches: none })
|
|
7
|
+
: (q) => window.matchMedia(q);
|
|
7
8
|
export function getCurrentLayout(breakpoints, layouts, defaultLayout) {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
const query = breakpoints.findIndex((q) => mm(q).matches);
|
|
10
|
+
const layout = layouts[query];
|
|
10
11
|
return layout !== undefined ? layout : defaultLayout;
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=media.js.map
|
package/esm/utils/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/utils/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/utils/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,CAAC,MAAM,cAAc,GAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,kBAAkB,GAAsB,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;AAExH,MAAM,EAAE,GACN,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACzD,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE1C,MAAM,UAAU,gBAAgB,CAAI,WAA0B,EAAE,OAAiB,EAAE,aAAgB;IACjG,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC;AACvD,CAAC"}
|