piral-core 1.6.0-beta.7240 → 1.6.0-beta.7244
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.codegen +2 -3
- package/lib/Piral.js +8 -13
- package/lib/Piral.js.map +1 -1
- package/lib/PiralContext.js +11 -16
- package/lib/PiralContext.js.map +1 -1
- package/lib/RootListener.js +8 -13
- package/lib/RootListener.js.map +1 -1
- package/lib/actions/app.js +19 -30
- package/lib/actions/app.js.map +1 -1
- package/lib/actions/components.js +9 -16
- package/lib/actions/components.js.map +1 -1
- package/lib/actions/data.js +7 -15
- package/lib/actions/data.js.map +1 -1
- package/lib/actions/define.js +2 -7
- package/lib/actions/define.js.map +1 -1
- package/lib/actions/index.js +6 -9
- package/lib/actions/index.js.map +1 -1
- package/lib/actions/portal.js +9 -16
- package/lib/actions/portal.js.map +1 -1
- package/lib/actions/state.js +4 -9
- package/lib/actions/state.js.map +1 -1
- package/lib/components/ErrorBoundary.js +9 -14
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/components/ExtensionSlot.js +9 -14
- package/lib/components/ExtensionSlot.js.map +1 -1
- package/lib/components/ForeignComponentContainer.js +6 -11
- package/lib/components/ForeignComponentContainer.js.map +1 -1
- package/lib/components/Mediator.js +8 -13
- package/lib/components/Mediator.js.map +1 -1
- package/lib/components/PiralGlobals.js +6 -11
- package/lib/components/PiralGlobals.js.map +1 -1
- package/lib/components/PiralRoutes.js +11 -16
- package/lib/components/PiralRoutes.js.map +1 -1
- package/lib/components/PiralSuspense.js +6 -11
- package/lib/components/PiralSuspense.js.map +1 -1
- package/lib/components/PiralView.js +13 -18
- package/lib/components/PiralView.js.map +1 -1
- package/lib/components/PortalRenderer.js +5 -9
- package/lib/components/PortalRenderer.js.map +1 -1
- package/lib/components/ResponsiveLayout.js +6 -11
- package/lib/components/ResponsiveLayout.js.map +1 -1
- package/lib/components/SwitchErrorInfo.js +7 -12
- package/lib/components/SwitchErrorInfo.js.map +1 -1
- package/lib/components/components.js +10 -15
- package/lib/components/components.js.map +1 -1
- package/lib/components/index.js +12 -15
- package/lib/components/index.js.map +1 -1
- package/lib/components/wrapComponent.js +12 -17
- package/lib/components/wrapComponent.js.map +1 -1
- package/lib/createInstance.js +15 -19
- package/lib/createInstance.js.map +1 -1
- package/lib/defaults/DefaultErrorInfo.js +5 -10
- package/lib/defaults/DefaultErrorInfo.js.map +1 -1
- package/lib/defaults/DefaultLayout.js +3 -7
- package/lib/defaults/DefaultLayout.js.map +1 -1
- package/lib/defaults/DefaultLoadingIndicator.js +3 -8
- package/lib/defaults/DefaultLoadingIndicator.js.map +1 -1
- package/lib/defaults/DefaultRouteSwitch_v5.js +7 -12
- package/lib/defaults/DefaultRouteSwitch_v5.js.map +1 -1
- package/lib/defaults/DefaultRouteSwitch_v6.js +7 -12
- package/lib/defaults/DefaultRouteSwitch_v6.js.map +1 -1
- package/lib/defaults/DefaultRouter_v5.js +5 -10
- package/lib/defaults/DefaultRouter_v5.js.map +1 -1
- package/lib/defaults/DefaultRouter_v6.js +5 -10
- package/lib/defaults/DefaultRouter_v6.js.map +1 -1
- package/lib/defaults/navigator_none.js +4 -11
- package/lib/defaults/navigator_none.js.map +1 -1
- package/lib/defaults/navigator_v5.js +9 -17
- package/lib/defaults/navigator_v5.js.map +1 -1
- package/lib/defaults/navigator_v6.js +9 -17
- package/lib/defaults/navigator_v6.js.map +1 -1
- package/lib/helpers.js +8 -12
- package/lib/helpers.js.map +1 -1
- package/lib/hooks/action.js +3 -7
- package/lib/hooks/action.js.map +1 -1
- package/lib/hooks/actions.js +4 -8
- package/lib/hooks/actions.js.map +1 -1
- package/lib/hooks/globalState.js +5 -10
- package/lib/hooks/globalState.js.map +1 -1
- package/lib/hooks/index.js +7 -10
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/media.js +8 -12
- package/lib/hooks/media.js.map +1 -1
- package/lib/hooks/piletApi.js +5 -9
- package/lib/hooks/piletApi.js.map +1 -1
- package/lib/hooks/setter.js +5 -9
- package/lib/hooks/setter.js.map +1 -1
- package/lib/hooks/sharedData.js +3 -7
- package/lib/hooks/sharedData.js.map +1 -1
- package/lib/index.js +10 -13
- package/lib/index.js.map +1 -1
- package/lib/modules/api.js +8 -13
- package/lib/modules/api.js.map +1 -1
- package/lib/modules/core.js +11 -15
- package/lib/modules/core.js.map +1 -1
- package/lib/modules/dependencies.js +7 -12
- package/lib/modules/dependencies.js.map +1 -1
- package/lib/modules/element.js +22 -26
- package/lib/modules/element.js.map +1 -1
- package/lib/modules/index.js +3 -6
- package/lib/modules/index.js.map +1 -1
- package/lib/setters/SetComponent.js +4 -8
- package/lib/setters/SetComponent.js.map +1 -1
- package/lib/setters/SetError.js +4 -8
- package/lib/setters/SetError.js.map +1 -1
- package/lib/setters/SetErrors.js +4 -9
- package/lib/setters/SetErrors.js.map +1 -1
- package/lib/setters/SetLayout.js +4 -9
- package/lib/setters/SetLayout.js.map +1 -1
- package/lib/setters/SetProvider.js +4 -8
- package/lib/setters/SetProvider.js.map +1 -1
- package/lib/setters/SetRedirect.js +5 -9
- package/lib/setters/SetRedirect.js.map +1 -1
- package/lib/setters/SetRoute.js +4 -8
- package/lib/setters/SetRoute.js.map +1 -1
- package/lib/setters/index.js +7 -10
- package/lib/setters/index.js.map +1 -1
- package/lib/state/createActions.js +5 -11
- package/lib/state/createActions.js.map +1 -1
- package/lib/state/createGlobalState.js +5 -10
- package/lib/state/createGlobalState.js.map +1 -1
- package/lib/state/index.js +4 -7
- package/lib/state/index.js.map +1 -1
- package/lib/state/stateContext.js +3 -7
- package/lib/state/stateContext.js.map +1 -1
- package/lib/state/withApi.js +7 -12
- package/lib/state/withApi.js.map +1 -1
- package/lib/tools/codegen.js +15 -22
- package/lib/tools/codegen.js.map +1 -1
- package/lib/tools/debugger.js +3 -7
- package/lib/tools/debugger.js.map +1 -1
- package/lib/tools/emulator.js +3 -7
- package/lib/tools/emulator.js.map +1 -1
- package/lib/types/api.js +1 -2
- package/lib/types/common.js +1 -2
- package/lib/types/components.js +1 -2
- package/lib/types/config.js +1 -2
- package/lib/types/custom.js +1 -2
- package/lib/types/data.js +1 -2
- package/lib/types/extension.js +1 -2
- package/lib/types/index.js +14 -17
- package/lib/types/index.js.map +1 -1
- package/lib/types/instance.js +1 -2
- package/lib/types/layout.js +1 -2
- package/lib/types/navigation.js +1 -2
- package/lib/types/plugin.js +1 -2
- package/lib/types/state.js +1 -2
- package/lib/types/utils.js +1 -2
- package/lib/types/web.js +1 -2
- package/lib/utils/compare.js +1 -5
- package/lib/utils/compare.js.map +1 -1
- package/lib/utils/data.js +3 -9
- package/lib/utils/data.js.map +1 -1
- package/lib/utils/extension.js +3 -9
- package/lib/utils/extension.js.map +1 -1
- package/lib/utils/foreign.js +15 -23
- package/lib/utils/foreign.js.map +1 -1
- package/lib/utils/guid.js +2 -7
- package/lib/utils/guid.js.map +1 -1
- package/lib/utils/helpers.js +24 -41
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/index.js +12 -18
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/media.js +5 -9
- package/lib/utils/media.js.map +1 -1
- package/lib/utils/react.js +2 -7
- package/lib/utils/react.js.map +1 -1
- package/lib/utils/routes.js +3 -8
- package/lib/utils/routes.js.map +1 -1
- package/lib/utils/state.js +19 -30
- package/lib/utils/state.js.map +1 -1
- package/lib/utils/storage.js +2 -5
- package/lib/utils/storage.js.map +1 -1
- package/package.json +11 -26
- package/esm/Piral.d.ts +0 -18
- package/esm/Piral.js +0 -24
- package/esm/Piral.js.map +0 -1
- package/esm/PiralContext.d.ts +0 -21
- package/esm/PiralContext.js +0 -34
- package/esm/PiralContext.js.map +0 -1
- package/esm/RootListener.d.ts +0 -2
- package/esm/RootListener.js +0 -44
- package/esm/RootListener.js.map +0 -1
- package/esm/actions/app.d.ts +0 -13
- package/esm/actions/app.js +0 -61
- package/esm/actions/app.js.map +0 -1
- package/esm/actions/components.d.ts +0 -5
- package/esm/actions/components.js +0 -14
- package/esm/actions/components.js.map +0 -1
- package/esm/actions/data.d.ts +0 -6
- package/esm/actions/data.js +0 -46
- package/esm/actions/data.js.map +0 -1
- package/esm/actions/define.d.ts +0 -3
- package/esm/actions/define.js +0 -10
- package/esm/actions/define.js.map +0 -1
- package/esm/actions/index.d.ts +0 -6
- package/esm/actions/index.js +0 -7
- package/esm/actions/index.js.map +0 -1
- package/esm/actions/portal.d.ts +0 -6
- package/esm/actions/portal.js +0 -26
- package/esm/actions/portal.js.map +0 -1
- package/esm/actions/state.d.ts +0 -3
- package/esm/actions/state.js +0 -12
- package/esm/actions/state.js.map +0 -1
- package/esm/components/ErrorBoundary.d.ts +0 -33
- package/esm/components/ErrorBoundary.js +0 -50
- package/esm/components/ErrorBoundary.js.map +0 -1
- package/esm/components/ExtensionSlot.d.ts +0 -11
- package/esm/components/ExtensionSlot.js +0 -29
- package/esm/components/ExtensionSlot.js.map +0 -1
- package/esm/components/ForeignComponentContainer.d.ts +0 -19
- package/esm/components/ForeignComponentContainer.js +0 -46
- package/esm/components/ForeignComponentContainer.js.map +0 -1
- package/esm/components/Mediator.d.ts +0 -15
- package/esm/components/Mediator.js +0 -24
- package/esm/components/Mediator.js.map +0 -1
- package/esm/components/PiralGlobals.d.ts +0 -6
- package/esm/components/PiralGlobals.js +0 -13
- package/esm/components/PiralGlobals.js.map +0 -1
- package/esm/components/PiralRoutes.d.ts +0 -20
- package/esm/components/PiralRoutes.js +0 -36
- package/esm/components/PiralRoutes.js.map +0 -1
- package/esm/components/PiralSuspense.d.ts +0 -5
- package/esm/components/PiralSuspense.js +0 -8
- package/esm/components/PiralSuspense.js.map +0 -1
- package/esm/components/PiralView.d.ts +0 -20
- package/esm/components/PiralView.js +0 -19
- package/esm/components/PiralView.js.map +0 -1
- package/esm/components/PortalRenderer.d.ts +0 -5
- package/esm/components/PortalRenderer.js +0 -7
- package/esm/components/PortalRenderer.js.map +0 -1
- package/esm/components/ResponsiveLayout.d.ts +0 -23
- package/esm/components/ResponsiveLayout.js +0 -12
- package/esm/components/ResponsiveLayout.js.map +0 -1
- package/esm/components/SwitchErrorInfo.d.ts +0 -3
- package/esm/components/SwitchErrorInfo.js +0 -23
- package/esm/components/SwitchErrorInfo.js.map +0 -1
- package/esm/components/components.d.ts +0 -40
- package/esm/components/components.js +0 -47
- package/esm/components/components.js.map +0 -1
- package/esm/components/index.d.ts +0 -12
- package/esm/components/index.js +0 -13
- package/esm/components/index.js.map +0 -1
- package/esm/components/wrapComponent.d.ts +0 -7
- package/esm/components/wrapComponent.js +0 -41
- package/esm/components/wrapComponent.js.map +0 -1
- package/esm/createInstance.d.ts +0 -22
- package/esm/createInstance.js +0 -68
- package/esm/createInstance.js.map +0 -1
- package/esm/defaults/DefaultErrorInfo.d.ts +0 -8
- package/esm/defaults/DefaultErrorInfo.js +0 -11
- package/esm/defaults/DefaultErrorInfo.js.map +0 -1
- package/esm/defaults/DefaultLayout.d.ts +0 -6
- package/esm/defaults/DefaultLayout.js +0 -7
- package/esm/defaults/DefaultLayout.js.map +0 -1
- package/esm/defaults/DefaultLoadingIndicator.d.ts +0 -6
- package/esm/defaults/DefaultLoadingIndicator.js +0 -7
- package/esm/defaults/DefaultLoadingIndicator.js.map +0 -1
- package/esm/defaults/DefaultRouteSwitch_v5.d.ts +0 -3
- package/esm/defaults/DefaultRouteSwitch_v5.js +0 -9
- package/esm/defaults/DefaultRouteSwitch_v5.js.map +0 -1
- package/esm/defaults/DefaultRouteSwitch_v6.d.ts +0 -3
- package/esm/defaults/DefaultRouteSwitch_v6.js +0 -13
- package/esm/defaults/DefaultRouteSwitch_v6.js.map +0 -1
- package/esm/defaults/DefaultRouter_v5.d.ts +0 -3
- package/esm/defaults/DefaultRouter_v5.js +0 -7
- package/esm/defaults/DefaultRouter_v5.js.map +0 -1
- package/esm/defaults/DefaultRouter_v6.d.ts +0 -3
- package/esm/defaults/DefaultRouter_v6.js +0 -7
- package/esm/defaults/DefaultRouter_v6.js.map +0 -1
- package/esm/defaults/navigator_none.d.ts +0 -5
- package/esm/defaults/navigator_none.js +0 -31
- package/esm/defaults/navigator_none.js.map +0 -1
- package/esm/defaults/navigator_v5.d.ts +0 -6
- package/esm/defaults/navigator_v5.js +0 -85
- package/esm/defaults/navigator_v5.js.map +0 -1
- package/esm/defaults/navigator_v6.d.ts +0 -6
- package/esm/defaults/navigator_v6.js +0 -84
- package/esm/defaults/navigator_v6.js.map +0 -1
- package/esm/helpers.d.ts +0 -17
- package/esm/helpers.js +0 -19
- package/esm/helpers.js.map +0 -1
- package/esm/hooks/action.d.ts +0 -6
- package/esm/hooks/action.js +0 -10
- package/esm/hooks/action.js.map +0 -1
- package/esm/hooks/actions.d.ts +0 -5
- package/esm/hooks/actions.js +0 -10
- package/esm/hooks/actions.js.map +0 -1
- package/esm/hooks/globalState.d.ts +0 -19
- package/esm/hooks/globalState.js +0 -16
- package/esm/hooks/globalState.js.map +0 -1
- package/esm/hooks/index.d.ts +0 -7
- package/esm/hooks/index.js +0 -8
- package/esm/hooks/index.js.map +0 -1
- package/esm/hooks/media.d.ts +0 -7
- package/esm/hooks/media.js +0 -22
- package/esm/hooks/media.js.map +0 -1
- package/esm/hooks/piletApi.d.ts +0 -7
- package/esm/hooks/piletApi.js +0 -14
- package/esm/hooks/piletApi.js.map +0 -1
- package/esm/hooks/setter.d.ts +0 -5
- package/esm/hooks/setter.js +0 -14
- package/esm/hooks/setter.js.map +0 -1
- package/esm/hooks/sharedData.d.ts +0 -12
- package/esm/hooks/sharedData.js +0 -6
- package/esm/hooks/sharedData.js.map +0 -1
- package/esm/index.d.ts +0 -10
- package/esm/index.js +0 -11
- package/esm/index.js.map +0 -1
- package/esm/modules/api.d.ts +0 -4
- package/esm/modules/api.js +0 -25
- package/esm/modules/api.js.map +0 -1
- package/esm/modules/core.d.ts +0 -3
- package/esm/modules/core.js +0 -50
- package/esm/modules/core.js.map +0 -1
- package/esm/modules/dependencies.d.ts +0 -23
- package/esm/modules/dependencies.js +0 -32
- package/esm/modules/dependencies.js.map +0 -1
- package/esm/modules/element.d.ts +0 -5
- package/esm/modules/element.js +0 -248
- package/esm/modules/element.js.map +0 -1
- package/esm/modules/index.d.ts +0 -3
- package/esm/modules/index.js +0 -4
- package/esm/modules/index.js.map +0 -1
- package/esm/setters/SetComponent.d.ts +0 -19
- package/esm/setters/SetComponent.js +0 -11
- package/esm/setters/SetComponent.js.map +0 -1
- package/esm/setters/SetError.d.ts +0 -19
- package/esm/setters/SetError.js +0 -11
- package/esm/setters/SetError.js.map +0 -1
- package/esm/setters/SetErrors.d.ts +0 -15
- package/esm/setters/SetErrors.js +0 -9
- package/esm/setters/SetErrors.js.map +0 -1
- package/esm/setters/SetLayout.d.ts +0 -15
- package/esm/setters/SetLayout.js +0 -9
- package/esm/setters/SetLayout.js.map +0 -1
- package/esm/setters/SetProvider.d.ts +0 -14
- package/esm/setters/SetProvider.js +0 -11
- package/esm/setters/SetProvider.js.map +0 -1
- package/esm/setters/SetRedirect.d.ts +0 -18
- package/esm/setters/SetRedirect.js +0 -12
- package/esm/setters/SetRedirect.js.map +0 -1
- package/esm/setters/SetRoute.d.ts +0 -23
- package/esm/setters/SetRoute.js +0 -11
- package/esm/setters/SetRoute.js.map +0 -1
- package/esm/setters/index.d.ts +0 -7
- package/esm/setters/index.js +0 -8
- package/esm/setters/index.js.map +0 -1
- package/esm/state/createActions.d.ts +0 -4
- package/esm/state/createActions.js +0 -27
- package/esm/state/createActions.js.map +0 -1
- package/esm/state/createGlobalState.d.ts +0 -2
- package/esm/state/createGlobalState.js +0 -19
- package/esm/state/createGlobalState.js.map +0 -1
- package/esm/state/index.d.ts +0 -4
- package/esm/state/index.js +0 -5
- package/esm/state/index.js.map +0 -1
- package/esm/state/stateContext.d.ts +0 -4
- package/esm/state/stateContext.js +0 -4
- package/esm/state/stateContext.js.map +0 -1
- package/esm/state/withApi.d.ts +0 -3
- package/esm/state/withApi.js +0 -30
- package/esm/state/withApi.js.map +0 -1
- package/esm/tools/codegen.d.ts +0 -23
- package/esm/tools/codegen.js +0 -194
- package/esm/tools/codegen.js.map +0 -1
- package/esm/tools/debugger.d.ts +0 -4
- package/esm/tools/debugger.js +0 -61
- package/esm/tools/debugger.js.map +0 -1
- package/esm/tools/emulator.d.ts +0 -4
- package/esm/tools/emulator.js +0 -12
- package/esm/tools/emulator.js.map +0 -1
- package/esm/types/api.d.ts +0 -141
- package/esm/types/api.js +0 -2
- package/esm/types/api.js.map +0 -1
- package/esm/types/common.d.ts +0 -21
- package/esm/types/common.js +0 -2
- package/esm/types/common.js.map +0 -1
- package/esm/types/components.d.ts +0 -250
- package/esm/types/components.js +0 -2
- package/esm/types/components.js.map +0 -1
- package/esm/types/config.d.ts +0 -94
- package/esm/types/config.js +0 -2
- package/esm/types/config.js.map +0 -1
- package/esm/types/custom.d.ts +0 -50
- package/esm/types/custom.js +0 -2
- package/esm/types/custom.js.map +0 -1
- package/esm/types/data.d.ts +0 -51
- package/esm/types/data.js +0 -2
- package/esm/types/data.js.map +0 -1
- package/esm/types/extension.d.ts +0 -61
- package/esm/types/extension.js +0 -2
- package/esm/types/extension.js.map +0 -1
- package/esm/types/index.d.ts +0 -14
- package/esm/types/index.js +0 -15
- package/esm/types/index.js.map +0 -1
- package/esm/types/instance.d.ts +0 -60
- package/esm/types/instance.js +0 -2
- package/esm/types/instance.js.map +0 -1
- package/esm/types/layout.d.ts +0 -12
- package/esm/types/layout.js +0 -2
- package/esm/types/layout.js.map +0 -1
- package/esm/types/navigation.d.ts +0 -98
- package/esm/types/navigation.js +0 -2
- package/esm/types/navigation.js.map +0 -1
- package/esm/types/plugin.d.ts +0 -14
- package/esm/types/plugin.js +0 -2
- package/esm/types/plugin.js.map +0 -1
- package/esm/types/state.d.ts +0 -346
- package/esm/types/state.js +0 -2
- package/esm/types/state.js.map +0 -1
- package/esm/types/utils.d.ts +0 -84
- package/esm/types/utils.js +0 -2
- package/esm/types/utils.js.map +0 -1
- package/esm/types/web.d.ts +0 -47
- package/esm/types/web.js +0 -2
- package/esm/types/web.js.map +0 -1
- package/esm/utils/compare.d.ts +0 -1
- package/esm/utils/compare.js +0 -42
- package/esm/utils/compare.js.map +0 -1
- package/esm/utils/data.d.ts +0 -4
- package/esm/utils/data.js +0 -39
- package/esm/utils/data.js.map +0 -1
- package/esm/utils/extension.d.ts +0 -16
- package/esm/utils/extension.js +0 -36
- package/esm/utils/extension.js.map +0 -1
- package/esm/utils/foreign.d.ts +0 -14
- package/esm/utils/foreign.js +0 -39
- package/esm/utils/foreign.js.map +0 -1
- package/esm/utils/guid.d.ts +0 -2
- package/esm/utils/guid.js +0 -12
- package/esm/utils/guid.js.map +0 -1
- package/esm/utils/helpers.d.ts +0 -16
- package/esm/utils/helpers.js +0 -76
- package/esm/utils/helpers.js.map +0 -1
- package/esm/utils/index.d.ts +0 -12
- package/esm/utils/index.js +0 -13
- package/esm/utils/index.js.map +0 -1
- package/esm/utils/media.d.ts +0 -4
- package/esm/utils/media.js +0 -12
- package/esm/utils/media.js.map +0 -1
- package/esm/utils/react.d.ts +0 -2
- package/esm/utils/react.js +0 -5
- package/esm/utils/react.js.map +0 -1
- package/esm/utils/routes.d.ts +0 -1
- package/esm/utils/routes.js +0 -5
- package/esm/utils/routes.js.map +0 -1
- package/esm/utils/state.d.ts +0 -57
- package/esm/utils/state.js +0 -113
- package/esm/utils/state.js.map +0 -1
- package/esm/utils/storage.d.ts +0 -3
- package/esm/utils/storage.js +0 -26
- package/esm/utils/storage.js.map +0 -1
- /package/{dist → lib}/codegen.js +0 -0
package/esm/types/utils.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { PiralCustomEventMap } from './custom';
|
|
2
|
-
/**
|
|
3
|
-
* A key value store that can be abstracted onto a storage solution (e.g. cookie).
|
|
4
|
-
*/
|
|
5
|
-
export interface PiralStorage {
|
|
6
|
-
/**
|
|
7
|
-
* Sets the value of an item.
|
|
8
|
-
* @param name The name of the item to set.
|
|
9
|
-
* @param data The new value of the item.
|
|
10
|
-
* @param expires Optional expiration information.
|
|
11
|
-
*/
|
|
12
|
-
setItem(name: string, data: string, expires?: string): void;
|
|
13
|
-
/**
|
|
14
|
-
* Gets the value of an item.
|
|
15
|
-
* @param name The name of the item to look for.
|
|
16
|
-
*/
|
|
17
|
-
getItem(name: string): string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Removes an item from the storage.
|
|
20
|
-
* @param name The name of the item to remove.
|
|
21
|
-
*/
|
|
22
|
-
removeItem(name: string): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Can be implemented by functions to be used for disposal purposes.
|
|
26
|
-
*/
|
|
27
|
-
export interface Disposable {
|
|
28
|
-
/**
|
|
29
|
-
* Disposes the created resource.
|
|
30
|
-
*/
|
|
31
|
-
(): void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Gets fired when a data item gets stored in piral.
|
|
35
|
-
*/
|
|
36
|
-
export interface PiralStoreDataEvent<TValue = any> {
|
|
37
|
-
/**
|
|
38
|
-
* The name of the item that was stored.
|
|
39
|
-
*/
|
|
40
|
-
name: string;
|
|
41
|
-
/**
|
|
42
|
-
* The storage target of the item.
|
|
43
|
-
*/
|
|
44
|
-
target: string;
|
|
45
|
-
/**
|
|
46
|
-
* The value that was stored.
|
|
47
|
-
*/
|
|
48
|
-
value: TValue;
|
|
49
|
-
/**
|
|
50
|
-
* The owner of the item.
|
|
51
|
-
*/
|
|
52
|
-
owner: string;
|
|
53
|
-
/**
|
|
54
|
-
* The expiration of the item.
|
|
55
|
-
*/
|
|
56
|
-
expires: number;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Gets fired when an unhandled error in a component has been prevented.
|
|
60
|
-
*/
|
|
61
|
-
export interface PiralUnhandledErrorEvent {
|
|
62
|
-
/**
|
|
63
|
-
* The container showing the error / containing the component.
|
|
64
|
-
*/
|
|
65
|
-
container: any;
|
|
66
|
-
/**
|
|
67
|
-
* The type of the error, i.e., the type of component that crashed.
|
|
68
|
-
*/
|
|
69
|
-
errorType: string;
|
|
70
|
-
/**
|
|
71
|
-
* The actual error that was emitted.
|
|
72
|
-
*/
|
|
73
|
-
error: Error;
|
|
74
|
-
/**
|
|
75
|
-
* The name of the pilet containing the problematic component.
|
|
76
|
-
*/
|
|
77
|
-
pilet: string;
|
|
78
|
-
}
|
|
79
|
-
declare module 'piral-base/lib/types/api' {
|
|
80
|
-
interface PiralEventMap extends PiralCustomEventMap {
|
|
81
|
-
'store-data': PiralStoreDataEvent;
|
|
82
|
-
'unhandled-error': PiralUnhandledErrorEvent;
|
|
83
|
-
}
|
|
84
|
-
}
|
package/esm/types/utils.js
DELETED
package/esm/types/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":""}
|
package/esm/types/web.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
export interface PiralComponentProps extends HTMLAttributes<{}> {
|
|
3
|
-
name?: string;
|
|
4
|
-
origin: string;
|
|
5
|
-
}
|
|
6
|
-
export interface PiralExtensionProps extends HTMLAttributes<{}> {
|
|
7
|
-
name: string;
|
|
8
|
-
params: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PiralPortalProps extends HTMLAttributes<{}> {
|
|
11
|
-
pid: string;
|
|
12
|
-
}
|
|
13
|
-
export interface PiralSlotProps extends HTMLAttributes<{}> {
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
namespace JSX {
|
|
17
|
-
interface IntrinsicElements {
|
|
18
|
-
'piral-component': React.DetailedHTMLProps<PiralComponentProps, {}>;
|
|
19
|
-
'piral-extension': React.DetailedHTMLProps<PiralExtensionProps, {}>;
|
|
20
|
-
'piral-portal': React.DetailedHTMLProps<PiralPortalProps, {}>;
|
|
21
|
-
'piral-slot': React.DetailedHTMLProps<PiralSlotProps, {}>;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
interface Window {
|
|
25
|
-
/**
|
|
26
|
-
* Assigns content in form a ReactChild to be rendered later
|
|
27
|
-
* from a foreign container / element in an piral-content
|
|
28
|
-
* child.
|
|
29
|
-
* @param cid The ID of the piral-content node.
|
|
30
|
-
* @param content The ReactChild to be rendered.
|
|
31
|
-
*/
|
|
32
|
-
assignContent(cid: string, content: any): void;
|
|
33
|
-
}
|
|
34
|
-
interface HTMLElementTagNameMap {
|
|
35
|
-
'piral-component': HTMLElement & {
|
|
36
|
-
name?: string;
|
|
37
|
-
origin: string;
|
|
38
|
-
};
|
|
39
|
-
'piral-extension': HTMLElement & {
|
|
40
|
-
params: any;
|
|
41
|
-
name: string;
|
|
42
|
-
empty: any;
|
|
43
|
-
};
|
|
44
|
-
'piral-portal': HTMLElement;
|
|
45
|
-
'piral-slot': HTMLElement;
|
|
46
|
-
}
|
|
47
|
-
}
|
package/esm/types/web.js
DELETED
package/esm/types/web.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/types/web.ts"],"names":[],"mappings":""}
|
package/esm/utils/compare.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isSame<T>(a: T, b: T): boolean;
|
package/esm/utils/compare.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function compareObjects(a, b) {
|
|
2
|
-
for (const i in a) {
|
|
3
|
-
if (!(i in b)) {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
for (const i in b) {
|
|
8
|
-
if (!isSame(a[i], b[i])) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
function compareArrays(a, b) {
|
|
15
|
-
const l = a.length;
|
|
16
|
-
if (l === b.length) {
|
|
17
|
-
for (let i = 0; i < l; i++) {
|
|
18
|
-
if (!isSame(a[i], b[i])) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
export function isSame(a, b) {
|
|
27
|
-
if (a !== b) {
|
|
28
|
-
const ta = typeof a;
|
|
29
|
-
const tb = typeof b;
|
|
30
|
-
if (ta === tb && ta === 'object' && a && b) {
|
|
31
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
32
|
-
return compareArrays(a, b);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return compareObjects(a, b);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=compare.js.map
|
package/esm/utils/compare.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,CAAa,EAAE,CAAa;IACjD,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IAEnB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;gBACvB,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,MAAM,CAAI,CAAI,EAAE,CAAI;IAClC,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,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACxC,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC5B;iBAAM;gBACL,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC7B;SACF;QAED,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/esm/utils/data.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { DataStoreOptions, CustomDataStoreOptions, Dict, SharedDataItem } from '../types';
|
|
2
|
-
export declare function createDataView(data: Dict<SharedDataItem>): Readonly<Dict<any>>;
|
|
3
|
-
export declare function createDataOptions(options?: DataStoreOptions): CustomDataStoreOptions;
|
|
4
|
-
export declare function getDataExpiration(expires?: number | Date | 'never'): number;
|
package/esm/utils/data.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const defaultTarget = 'memory';
|
|
2
|
-
export function createDataView(data) {
|
|
3
|
-
const proxyName = 'Proxy';
|
|
4
|
-
return (window[proxyName] &&
|
|
5
|
-
new Proxy(data, {
|
|
6
|
-
get(target, name) {
|
|
7
|
-
const item = target[name];
|
|
8
|
-
return item && item.value;
|
|
9
|
-
},
|
|
10
|
-
set(_target, _name, _value) {
|
|
11
|
-
return true;
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
export function createDataOptions(options = defaultTarget) {
|
|
16
|
-
if (typeof options === 'string') {
|
|
17
|
-
return {
|
|
18
|
-
target: options,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else if (options && typeof options === 'object' && !Array.isArray(options)) {
|
|
22
|
-
return options;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return {
|
|
26
|
-
target: defaultTarget,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export function getDataExpiration(expires) {
|
|
31
|
-
if (typeof expires === 'number') {
|
|
32
|
-
return expires;
|
|
33
|
-
}
|
|
34
|
-
else if (expires instanceof Date) {
|
|
35
|
-
return expires.valueOf();
|
|
36
|
-
}
|
|
37
|
-
return -1;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=data.js.map
|
package/esm/utils/data.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/extension.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ExtensionComponentProps, WrappedComponent } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Transforms the given component to an extension component.
|
|
5
|
-
* @param Component The component to transform.
|
|
6
|
-
* @returns The extension component (receiving its props via params).
|
|
7
|
-
*/
|
|
8
|
-
export declare function toExtension<T>(Component: React.ComponentType<T>): WrappedComponent<ExtensionComponentProps<T>>;
|
|
9
|
-
/**
|
|
10
|
-
* Reactifies the list of child nodes to a React Node by removing the
|
|
11
|
-
* nodes from the DOM and carrying it in a React Node, where it would be
|
|
12
|
-
* attached at a slot.
|
|
13
|
-
* @param childNodes The child nodes to reactify.
|
|
14
|
-
* @returns The React Node.
|
|
15
|
-
*/
|
|
16
|
-
export declare function reactifyContent(childNodes: NodeListOf<ChildNode>): React.ReactNode;
|
package/esm/utils/extension.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
function removeAll(nodes) {
|
|
3
|
-
nodes.forEach((node) => node.remove());
|
|
4
|
-
}
|
|
5
|
-
const SlotCarrier = ({ nodes }) => {
|
|
6
|
-
const host = React.useRef();
|
|
7
|
-
React.useEffect(() => {
|
|
8
|
-
host.current?.append(...nodes);
|
|
9
|
-
return () => removeAll(nodes);
|
|
10
|
-
}, [nodes]);
|
|
11
|
-
if (nodes.length) {
|
|
12
|
-
return React.createElement("piral-slot", { ref: host });
|
|
13
|
-
}
|
|
14
|
-
return null;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Transforms the given component to an extension component.
|
|
18
|
-
* @param Component The component to transform.
|
|
19
|
-
* @returns The extension component (receiving its props via params).
|
|
20
|
-
*/
|
|
21
|
-
export function toExtension(Component) {
|
|
22
|
-
return (props) => React.createElement(Component, { ...props.params });
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Reactifies the list of child nodes to a React Node by removing the
|
|
26
|
-
* nodes from the DOM and carrying it in a React Node, where it would be
|
|
27
|
-
* attached at a slot.
|
|
28
|
-
* @param childNodes The child nodes to reactify.
|
|
29
|
-
* @returns The React Node.
|
|
30
|
-
*/
|
|
31
|
-
export function reactifyContent(childNodes) {
|
|
32
|
-
const nodes = Array.prototype.filter.call(childNodes, Boolean);
|
|
33
|
-
removeAll(nodes);
|
|
34
|
-
return React.createElement(SlotCarrier, { nodes: nodes });
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=extension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../src/utils/extension.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,SAAS,SAAS,CAAC,KAAuB;IACxC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACzC,CAAC;AAMD,MAAM,WAAW,GAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5D,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAmB,CAAC;IAE7C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC;QAC/B,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAI,KAAK,CAAC,MAAM,EAAE;QAChB,OAAO,oCAAY,GAAG,EAAE,IAAI,GAAI,CAAC;KAClC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAI,SAAiC;IAC9D,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,SAAS,OAAK,KAAK,CAAC,MAAM,GAAI,CAAC;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,UAAiC;IAC/D,MAAM,KAAK,GAAqB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjF,SAAS,CAAC,KAAK,CAAC,CAAC;IACjB,OAAO,oBAAC,WAAW,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;AACvC,CAAC"}
|
package/esm/utils/foreign.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactPortal } from 'react';
|
|
2
|
-
import { GlobalStateContext, ForeignComponent } from '../types';
|
|
3
|
-
export declare const extensionName = "piral-extension";
|
|
4
|
-
export declare const componentName = "piral-component";
|
|
5
|
-
export declare const contentName = "piral-content";
|
|
6
|
-
export declare const portalName = "piral-portal";
|
|
7
|
-
export declare const slotName = "piral-slot";
|
|
8
|
-
export declare function attachDomPortal<TProps>(id: string, context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
|
9
|
-
export declare function changeDomPortal<TProps>(id: string, current: ReactPortal, context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
|
10
|
-
export declare function convertComponent<T extends {
|
|
11
|
-
type: string;
|
|
12
|
-
}, U>(converter: (component: T) => ForeignComponent<U>, component: T): ForeignComponent<U>;
|
|
13
|
-
export declare function renderInDom<TProps>(context: GlobalStateContext, element: HTMLElement | ShadowRoot, component: ComponentType<TProps>, props: TProps): [string, ReactPortal];
|
|
14
|
-
export declare function defer(cb: () => void): void;
|
package/esm/utils/foreign.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createElement } from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
|
-
export const extensionName = 'piral-extension';
|
|
4
|
-
export const componentName = 'piral-component';
|
|
5
|
-
export const contentName = 'piral-content';
|
|
6
|
-
export const portalName = 'piral-portal';
|
|
7
|
-
export const slotName = 'piral-slot';
|
|
8
|
-
export function attachDomPortal(id, context, element, component, props) {
|
|
9
|
-
const portal = createPortal(createElement(component, props), element);
|
|
10
|
-
context.showPortal(id, portal);
|
|
11
|
-
return [id, portal];
|
|
12
|
-
}
|
|
13
|
-
export function changeDomPortal(id, current, context, element, component, props) {
|
|
14
|
-
const next = createPortal(createElement(component, props), element);
|
|
15
|
-
context.updatePortal(id, current, next);
|
|
16
|
-
return [id, next];
|
|
17
|
-
}
|
|
18
|
-
export function convertComponent(converter, component) {
|
|
19
|
-
if (typeof converter !== 'function') {
|
|
20
|
-
throw new Error(`No converter for component of type "${component.type}" registered.`);
|
|
21
|
-
}
|
|
22
|
-
return converter(component);
|
|
23
|
-
}
|
|
24
|
-
export function renderInDom(context, element, component, props) {
|
|
25
|
-
const portalId = 'pid';
|
|
26
|
-
let parent = element;
|
|
27
|
-
while (parent) {
|
|
28
|
-
if (parent instanceof Element && parent.localName === portalName && parent.hasAttribute(portalId)) {
|
|
29
|
-
const id = parent.getAttribute(portalId);
|
|
30
|
-
return attachDomPortal(id, context, element, component, props);
|
|
31
|
-
}
|
|
32
|
-
parent = parent.parentNode || parent.host;
|
|
33
|
-
}
|
|
34
|
-
return attachDomPortal('root', context, element, component, props);
|
|
35
|
-
}
|
|
36
|
-
export function defer(cb) {
|
|
37
|
-
setTimeout(cb, 0);
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=foreign.js.map
|
package/esm/utils/foreign.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC,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,KAAK,CAAC;IACvB,IAAI,MAAM,GAAS,OAAO,CAAC;IAE3B,OAAO,MAAM,EAAE;QACb,IAAI,MAAM,YAAY,OAAO,IAAI,MAAM,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;YACjG,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;AAED,MAAM,UAAU,KAAK,CAAC,EAAc;IAClC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
package/esm/utils/guid.d.ts
DELETED
package/esm/utils/guid.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function rand(c) {
|
|
2
|
-
const r = (Math.random() * 16) | 0;
|
|
3
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
4
|
-
return v.toString(16);
|
|
5
|
-
}
|
|
6
|
-
export function generateId() {
|
|
7
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, rand);
|
|
8
|
-
}
|
|
9
|
-
export function buildName(prefix, name) {
|
|
10
|
-
return `${prefix}://${name}`;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=guid.js.map
|
package/esm/utils/guid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const removeIndicator: any;
|
|
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[];
|
|
11
|
-
export declare function removeNested<T, U = any>(obj: T, predicate: (item: U) => boolean): T;
|
|
12
|
-
export declare function excludeOn<T>(items: Array<T>, predicate: (item: T) => boolean): any[];
|
|
13
|
-
export declare function updateKey<T, TKey extends keyof T>(obj: T, key: TKey, value: T[TKey]): T;
|
|
14
|
-
export declare function withKey<T, TKey extends keyof T>(obj: T, key: TKey, value: T[TKey]): T;
|
|
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
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// tslint:disable-next-line
|
|
2
|
-
export const removeIndicator = null;
|
|
3
|
-
// to avoid creating unnecessary empty arrays
|
|
4
|
-
export const none = [];
|
|
5
|
-
// to avoid creating unnecessary empty functions
|
|
6
|
-
export const noop = () => { };
|
|
7
|
-
export function prependItem(items, item) {
|
|
8
|
-
return [item, ...(items || none)];
|
|
9
|
-
}
|
|
10
|
-
export function appendItem(items, item) {
|
|
11
|
-
return [...(items || none), item];
|
|
12
|
-
}
|
|
13
|
-
export function prependItems(items, newItems) {
|
|
14
|
-
return [...newItems, ...(items || none)];
|
|
15
|
-
}
|
|
16
|
-
export function appendItems(items, newItems) {
|
|
17
|
-
return [...(items || none), ...newItems];
|
|
18
|
-
}
|
|
19
|
-
export function excludeItem(items, item) {
|
|
20
|
-
return (items || none).filter((m) => m !== item);
|
|
21
|
-
}
|
|
22
|
-
export function includeItem(items, item) {
|
|
23
|
-
return appendItem(excludeItem(items, item), item);
|
|
24
|
-
}
|
|
25
|
-
export function replaceOrAddItem(items, item, predicate) {
|
|
26
|
-
const newItems = [...(items || none)];
|
|
27
|
-
for (let i = 0; i < newItems.length; i++) {
|
|
28
|
-
if (predicate(newItems[i])) {
|
|
29
|
-
newItems[i] = item;
|
|
30
|
-
return newItems;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
newItems.push(item);
|
|
34
|
-
return newItems;
|
|
35
|
-
}
|
|
36
|
-
export function removeNested(obj, predicate) {
|
|
37
|
-
return Object.keys(obj).reduce((entries, key) => {
|
|
38
|
-
const item = obj[key];
|
|
39
|
-
entries[key] = Object.keys(item).reduce((all, key) => {
|
|
40
|
-
const value = item[key];
|
|
41
|
-
if (Array.isArray(value)) {
|
|
42
|
-
all[key] = excludeOn(value, predicate);
|
|
43
|
-
}
|
|
44
|
-
else if (!value || !predicate(value)) {
|
|
45
|
-
all[key] = value;
|
|
46
|
-
}
|
|
47
|
-
return all;
|
|
48
|
-
}, {});
|
|
49
|
-
return entries;
|
|
50
|
-
}, {});
|
|
51
|
-
}
|
|
52
|
-
export function excludeOn(items, predicate) {
|
|
53
|
-
return (items || none).filter((m) => !predicate(m));
|
|
54
|
-
}
|
|
55
|
-
export function updateKey(obj, key, value) {
|
|
56
|
-
return value === removeIndicator ? withoutKey(obj, key) : withKey(obj, key, value);
|
|
57
|
-
}
|
|
58
|
-
export function withKey(obj, key, value) {
|
|
59
|
-
return {
|
|
60
|
-
...obj,
|
|
61
|
-
[key]: value,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export function withoutKey(obj, key) {
|
|
65
|
-
const { [key]: _, ...newObj } = obj || {};
|
|
66
|
-
return newObj;
|
|
67
|
-
}
|
|
68
|
-
export function tryParseJson(content) {
|
|
69
|
-
try {
|
|
70
|
-
return JSON.parse(content);
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return {};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=helpers.js.map
|
package/esm/utils/helpers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"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"}
|
package/esm/utils/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { isfunc, requireModule } from 'piral-base';
|
|
2
|
-
export * from './compare';
|
|
3
|
-
export * from './data';
|
|
4
|
-
export * from './extension';
|
|
5
|
-
export * from './foreign';
|
|
6
|
-
export * from './guid';
|
|
7
|
-
export * from './helpers';
|
|
8
|
-
export * from './media';
|
|
9
|
-
export * from './react';
|
|
10
|
-
export * from './routes';
|
|
11
|
-
export * from './state';
|
|
12
|
-
export * from './storage';
|
package/esm/utils/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { isfunc, requireModule } from 'piral-base';
|
|
2
|
-
export * from './compare';
|
|
3
|
-
export * from './data';
|
|
4
|
-
export * from './extension';
|
|
5
|
-
export * from './foreign';
|
|
6
|
-
export * from './guid';
|
|
7
|
-
export * from './helpers';
|
|
8
|
-
export * from './media';
|
|
9
|
-
export * from './react';
|
|
10
|
-
export * from './routes';
|
|
11
|
-
export * from './state';
|
|
12
|
-
export * from './storage';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/esm/utils/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEnD,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
package/esm/utils/media.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LayoutTypes, LayoutBreakpoints } from '../types';
|
|
2
|
-
export declare const defaultLayouts: LayoutTypes;
|
|
3
|
-
export declare const defaultBreakpoints: LayoutBreakpoints;
|
|
4
|
-
export declare function getCurrentLayout<T>(breakpoints: Array<string>, layouts: Array<T>, defaultLayout: T): T;
|
package/esm/utils/media.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isfunc } from 'piral-base';
|
|
2
|
-
export const defaultLayouts = ['desktop', 'tablet', 'mobile'];
|
|
3
|
-
export const defaultBreakpoints = ['(min-width: 991px)', '(min-width: 481px)', '(max-width: 480px)'];
|
|
4
|
-
const mm = typeof window === 'undefined' || !isfunc(window.matchMedia)
|
|
5
|
-
? () => ({ matches: undefined })
|
|
6
|
-
: (q) => window.matchMedia(q);
|
|
7
|
-
export function getCurrentLayout(breakpoints = defaultBreakpoints, layouts, defaultLayout) {
|
|
8
|
-
const query = breakpoints.findIndex((q) => mm(q).matches);
|
|
9
|
-
const layout = layouts[query];
|
|
10
|
-
return layout !== undefined ? layout : defaultLayout;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=media.js.map
|
package/esm/utils/media.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/utils/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,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,SAAS,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE1C,MAAM,UAAU,gBAAgB,CAAI,cAA6B,kBAAkB,EAAE,OAAiB,EAAE,aAAgB;IACtH,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"}
|
package/esm/utils/react.d.ts
DELETED
package/esm/utils/react.js
DELETED
package/esm/utils/react.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/utils/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,UAAU,aAAa,CAAC,QAAyB,EAAE,GAAY;IACnE,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,GAAG,IAAG,QAAQ,CAAkB,CAAC;AAC/D,CAAC"}
|
package/esm/utils/routes.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createRouteMatcher(path: string): RegExp;
|
package/esm/utils/routes.js
DELETED
package/esm/utils/routes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/utils/routes.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,gBAAgB,CAAC;AAEjC,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
package/esm/utils/state.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router';
|
|
3
|
-
import { GlobalState, PageRegistration, ExtensionRegistration } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Returns a dispatcher that includes all mentioned dispatchers.
|
|
6
|
-
* @param dispatchers The dispatchers to include.
|
|
7
|
-
*/
|
|
8
|
-
export declare function withAll(...dispatchers: Array<(state: GlobalState) => GlobalState>): (state: GlobalState) => GlobalState;
|
|
9
|
-
/**
|
|
10
|
-
* Returns a dispatcher that adds a page registration.
|
|
11
|
-
* @param name The path of the page to register.
|
|
12
|
-
* @param value The value of the page to register.
|
|
13
|
-
* @returns The dispatcher.
|
|
14
|
-
*/
|
|
15
|
-
export declare function withPage(name: string, value: PageRegistration): (state: GlobalState) => GlobalState;
|
|
16
|
-
/**
|
|
17
|
-
* Returns a dispatcher that removes a page registration.
|
|
18
|
-
* @param name The path of the page to unregister.
|
|
19
|
-
* @returns The dispatcher.
|
|
20
|
-
*/
|
|
21
|
-
export declare function withoutPage(name: string): (state: GlobalState) => GlobalState;
|
|
22
|
-
/**
|
|
23
|
-
* Returns a dispatcher that adds an extension registration.
|
|
24
|
-
* @param name The name of the extension to register.
|
|
25
|
-
* @param value The value of the extension to register.
|
|
26
|
-
* @returns The dispatcher.
|
|
27
|
-
*/
|
|
28
|
-
export declare function withExtension(name: string, value: ExtensionRegistration): (state: GlobalState) => GlobalState;
|
|
29
|
-
/**
|
|
30
|
-
* Returns a dispatcher that removes an extension registration.
|
|
31
|
-
* @param name The name of the extension to unregister.
|
|
32
|
-
* @param reference The reference for the extension.
|
|
33
|
-
* @returns The dispatcher.
|
|
34
|
-
*/
|
|
35
|
-
export declare function withoutExtension(name: string, reference: any): (state: GlobalState) => GlobalState;
|
|
36
|
-
/**
|
|
37
|
-
* Returns a dispatcher that adds an extension registration from the root (no Pilet API).
|
|
38
|
-
* @param name The name of the extension to register.
|
|
39
|
-
* @param component The extension's component to use.
|
|
40
|
-
* @returns The dispatcher.
|
|
41
|
-
*/
|
|
42
|
-
export declare function withRootExtension<T>(name: string, component: ComponentType<T>): (state: GlobalState) => GlobalState;
|
|
43
|
-
/**
|
|
44
|
-
* Returns a dispatcher that adds another provider.
|
|
45
|
-
* @param provider The provider to include.
|
|
46
|
-
* @returns The dispatcher.
|
|
47
|
-
*/
|
|
48
|
-
export declare function withProvider(provider: JSX.Element): (state: GlobalState) => GlobalState;
|
|
49
|
-
/**
|
|
50
|
-
* Returns a dispatcher that registers another route.
|
|
51
|
-
* @param path The path of the route to register.
|
|
52
|
-
* @param component The component representing the route.
|
|
53
|
-
* @returns The dispatcher.
|
|
54
|
-
*/
|
|
55
|
-
export declare function withRoute<T extends {
|
|
56
|
-
[K in keyof T]?: string;
|
|
57
|
-
} = {}>(path: string, component: ComponentType<RouteComponentProps<T>>): (state: GlobalState) => GlobalState;
|