@wirestate/react 0.6.0
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/CHANGELOG.md +51 -0
- package/LICENSE +21 -0
- package/README.md +319 -0
- package/cjs/development/index.js +395 -0
- package/cjs/development/index.js.map +1 -0
- package/cjs/development/lib.js +64 -0
- package/cjs/development/lib.js.map +1 -0
- package/cjs/development/test-utils.js +1075 -0
- package/cjs/development/test-utils.js.map +1 -0
- package/cjs/production/index.js +1 -0
- package/cjs/production/index.js.map +1 -0
- package/cjs/production/lib.js +1 -0
- package/cjs/production/lib.js.map +1 -0
- package/cjs/production/test-utils.js +1 -0
- package/cjs/production/test-utils.js.map +1 -0
- package/esm/development/wirestate-core/bind/bind-constant.js +19 -0
- package/esm/development/wirestate-core/bind/bind-constant.js.map +1 -0
- package/esm/development/wirestate-core/bind/bind-dynamic-value.js +28 -0
- package/esm/development/wirestate-core/bind/bind-dynamic-value.js.map +1 -0
- package/esm/development/wirestate-core/bind/bind-entry.js +39 -0
- package/esm/development/wirestate-core/bind/bind-entry.js.map +1 -0
- package/esm/development/wirestate-core/bind/bind-service.js +253 -0
- package/esm/development/wirestate-core/bind/bind-service.js.map +1 -0
- package/esm/development/wirestate-core/bind/get-entry-token.js +14 -0
- package/esm/development/wirestate-core/bind/get-entry-token.js.map +1 -0
- package/esm/development/wirestate-core/commands/command-bus.js +112 -0
- package/esm/development/wirestate-core/commands/command-bus.js.map +1 -0
- package/esm/development/wirestate-core/commands/get-command-handler-metadata.js +27 -0
- package/esm/development/wirestate-core/commands/get-command-handler-metadata.js.map +1 -0
- package/esm/development/wirestate-core/container/create-ioc-container.js +35 -0
- package/esm/development/wirestate-core/container/create-ioc-container.js.map +1 -0
- package/esm/development/wirestate-core/container/wire-scope.js +151 -0
- package/esm/development/wirestate-core/container/wire-scope.js.map +1 -0
- package/esm/development/wirestate-core/error/error-code.js +10 -0
- package/esm/development/wirestate-core/error/error-code.js.map +1 -0
- package/esm/development/wirestate-core/error/wirestate-error.js +29 -0
- package/esm/development/wirestate-core/error/wirestate-error.js.map +1 -0
- package/esm/development/wirestate-core/events/build-event-dispatcher.js +39 -0
- package/esm/development/wirestate-core/events/build-event-dispatcher.js.map +1 -0
- package/esm/development/wirestate-core/events/event-bus.js +52 -0
- package/esm/development/wirestate-core/events/event-bus.js.map +1 -0
- package/esm/development/wirestate-core/events/get-event-handler-metadata.js +27 -0
- package/esm/development/wirestate-core/events/get-event-handler-metadata.js.map +1 -0
- package/esm/development/wirestate-core/queries/get-query-handler-metadata.js +27 -0
- package/esm/development/wirestate-core/queries/get-query-handler-metadata.js.map +1 -0
- package/esm/development/wirestate-core/queries/query-bus.js +99 -0
- package/esm/development/wirestate-core/queries/query-bus.js.map +1 -0
- package/esm/development/wirestate-core/registry.js +56 -0
- package/esm/development/wirestate-core/registry.js.map +1 -0
- package/esm/development/wirestate-core/service/get-activated-handler-metadata.js +27 -0
- package/esm/development/wirestate-core/service/get-activated-handler-metadata.js.map +1 -0
- package/esm/development/wirestate-core/service/get-deactivation-handler-metadata.js +27 -0
- package/esm/development/wirestate-core/service/get-deactivation-handler-metadata.js.map +1 -0
- package/esm/development/wirestate-core/test-utils/mock-bind-entry.js +24 -0
- package/esm/development/wirestate-core/test-utils/mock-bind-entry.js.map +1 -0
- package/esm/development/wirestate-core/test-utils/mock-container.js +52 -0
- package/esm/development/wirestate-core/test-utils/mock-container.js.map +1 -0
- package/esm/development/wirestate-core/types/commands.js +12 -0
- package/esm/development/wirestate-core/types/commands.js.map +1 -0
- package/esm/development/wirestate-react/commands/use-command-caller.js +18 -0
- package/esm/development/wirestate-react/commands/use-command-caller.js.map +1 -0
- package/esm/development/wirestate-react/commands/use-command-handler.js +28 -0
- package/esm/development/wirestate-react/commands/use-command-handler.js.map +1 -0
- package/esm/development/wirestate-react/commands/use-optional-command-caller.js +19 -0
- package/esm/development/wirestate-react/commands/use-optional-command-caller.js.map +1 -0
- package/esm/development/wirestate-react/error/error-code.js +6 -0
- package/esm/development/wirestate-react/error/error-code.js.map +1 -0
- package/esm/development/wirestate-react/events/use-event-emitter.js +22 -0
- package/esm/development/wirestate-react/events/use-event-emitter.js.map +1 -0
- package/esm/development/wirestate-react/events/use-event.js +30 -0
- package/esm/development/wirestate-react/events/use-event.js.map +1 -0
- package/esm/development/wirestate-react/events/use-events-handler.js +25 -0
- package/esm/development/wirestate-react/events/use-events-handler.js.map +1 -0
- package/esm/development/wirestate-react/events/use-events.js +31 -0
- package/esm/development/wirestate-react/events/use-events.js.map +1 -0
- package/esm/development/wirestate-react/index.js +19 -0
- package/esm/development/wirestate-react/index.js.map +1 -0
- package/esm/development/wirestate-react/provision/create-injectables-provider.js +101 -0
- package/esm/development/wirestate-react/provision/create-injectables-provider.js.map +1 -0
- package/esm/development/wirestate-react/provision/ioc-context.js +11 -0
- package/esm/development/wirestate-react/provision/ioc-context.js.map +1 -0
- package/esm/development/wirestate-react/provision/ioc-provider.js +50 -0
- package/esm/development/wirestate-react/provision/ioc-provider.js.map +1 -0
- package/esm/development/wirestate-react/provision/use-container-revision.js +13 -0
- package/esm/development/wirestate-react/provision/use-container-revision.js.map +1 -0
- package/esm/development/wirestate-react/provision/use-container.js +13 -0
- package/esm/development/wirestate-react/provision/use-container.js.map +1 -0
- package/esm/development/wirestate-react/provision/use-injection.js +22 -0
- package/esm/development/wirestate-react/provision/use-injection.js.map +1 -0
- package/esm/development/wirestate-react/provision/use-ioc-context.js +21 -0
- package/esm/development/wirestate-react/provision/use-ioc-context.js.map +1 -0
- package/esm/development/wirestate-react/provision/use-optional-injection.js +29 -0
- package/esm/development/wirestate-react/provision/use-optional-injection.js.map +1 -0
- package/esm/development/wirestate-react/queries/use-optional-query-caller.js +19 -0
- package/esm/development/wirestate-react/queries/use-optional-query-caller.js.map +1 -0
- package/esm/development/wirestate-react/queries/use-optional-sync-query-caller.js +19 -0
- package/esm/development/wirestate-react/queries/use-optional-sync-query-caller.js.map +1 -0
- package/esm/development/wirestate-react/queries/use-query-caller.js +18 -0
- package/esm/development/wirestate-react/queries/use-query-caller.js.map +1 -0
- package/esm/development/wirestate-react/queries/use-query-handler.js +27 -0
- package/esm/development/wirestate-react/queries/use-query-handler.js.map +1 -0
- package/esm/development/wirestate-react/queries/use-sync-query-caller.js +20 -0
- package/esm/development/wirestate-react/queries/use-sync-query-caller.js.map +1 -0
- package/esm/development/wirestate-react/test-utils/with-ioc-provider.js +30 -0
- package/esm/development/wirestate-react/test-utils/with-ioc-provider.js.map +1 -0
- package/esm/development/wirestate-react/test-utils.js +2 -0
- package/esm/development/wirestate-react/test-utils.js.map +1 -0
- package/esm/production/wirestate-core/bind/bind-constant.js +1 -0
- package/esm/production/wirestate-core/bind/bind-constant.js.map +1 -0
- package/esm/production/wirestate-core/bind/bind-dynamic-value.js +1 -0
- package/esm/production/wirestate-core/bind/bind-dynamic-value.js.map +1 -0
- package/esm/production/wirestate-core/bind/bind-entry.js +1 -0
- package/esm/production/wirestate-core/bind/bind-entry.js.map +1 -0
- package/esm/production/wirestate-core/bind/bind-service.js +1 -0
- package/esm/production/wirestate-core/bind/bind-service.js.map +1 -0
- package/esm/production/wirestate-core/bind/get-entry-token.js +1 -0
- package/esm/production/wirestate-core/bind/get-entry-token.js.map +1 -0
- package/esm/production/wirestate-core/commands/command-bus.js +1 -0
- package/esm/production/wirestate-core/commands/command-bus.js.map +1 -0
- package/esm/production/wirestate-core/commands/get-command-handler-metadata.js +1 -0
- package/esm/production/wirestate-core/commands/get-command-handler-metadata.js.map +1 -0
- package/esm/production/wirestate-core/container/create-ioc-container.js +1 -0
- package/esm/production/wirestate-core/container/create-ioc-container.js.map +1 -0
- package/esm/production/wirestate-core/container/wire-scope.js +1 -0
- package/esm/production/wirestate-core/container/wire-scope.js.map +1 -0
- package/esm/production/wirestate-core/error/error-code.js +1 -0
- package/esm/production/wirestate-core/error/error-code.js.map +1 -0
- package/esm/production/wirestate-core/error/wirestate-error.js +1 -0
- package/esm/production/wirestate-core/error/wirestate-error.js.map +1 -0
- package/esm/production/wirestate-core/events/build-event-dispatcher.js +1 -0
- package/esm/production/wirestate-core/events/build-event-dispatcher.js.map +1 -0
- package/esm/production/wirestate-core/events/event-bus.js +1 -0
- package/esm/production/wirestate-core/events/event-bus.js.map +1 -0
- package/esm/production/wirestate-core/events/get-event-handler-metadata.js +1 -0
- package/esm/production/wirestate-core/events/get-event-handler-metadata.js.map +1 -0
- package/esm/production/wirestate-core/queries/get-query-handler-metadata.js +1 -0
- package/esm/production/wirestate-core/queries/get-query-handler-metadata.js.map +1 -0
- package/esm/production/wirestate-core/queries/query-bus.js +1 -0
- package/esm/production/wirestate-core/queries/query-bus.js.map +1 -0
- package/esm/production/wirestate-core/registry.js +1 -0
- package/esm/production/wirestate-core/registry.js.map +1 -0
- package/esm/production/wirestate-core/service/get-activated-handler-metadata.js +1 -0
- package/esm/production/wirestate-core/service/get-activated-handler-metadata.js.map +1 -0
- package/esm/production/wirestate-core/service/get-deactivation-handler-metadata.js +1 -0
- package/esm/production/wirestate-core/service/get-deactivation-handler-metadata.js.map +1 -0
- package/esm/production/wirestate-core/test-utils/mock-bind-entry.js +1 -0
- package/esm/production/wirestate-core/test-utils/mock-bind-entry.js.map +1 -0
- package/esm/production/wirestate-core/test-utils/mock-container.js +1 -0
- package/esm/production/wirestate-core/test-utils/mock-container.js.map +1 -0
- package/esm/production/wirestate-core/types/commands.js +1 -0
- package/esm/production/wirestate-core/types/commands.js.map +1 -0
- package/esm/production/wirestate-react/commands/use-command-caller.js +1 -0
- package/esm/production/wirestate-react/commands/use-command-caller.js.map +1 -0
- package/esm/production/wirestate-react/commands/use-command-handler.js +1 -0
- package/esm/production/wirestate-react/commands/use-command-handler.js.map +1 -0
- package/esm/production/wirestate-react/commands/use-optional-command-caller.js +1 -0
- package/esm/production/wirestate-react/commands/use-optional-command-caller.js.map +1 -0
- package/esm/production/wirestate-react/error/error-code.js +1 -0
- package/esm/production/wirestate-react/error/error-code.js.map +1 -0
- package/esm/production/wirestate-react/events/use-event-emitter.js +1 -0
- package/esm/production/wirestate-react/events/use-event-emitter.js.map +1 -0
- package/esm/production/wirestate-react/events/use-event.js +1 -0
- package/esm/production/wirestate-react/events/use-event.js.map +1 -0
- package/esm/production/wirestate-react/events/use-events-handler.js +1 -0
- package/esm/production/wirestate-react/events/use-events-handler.js.map +1 -0
- package/esm/production/wirestate-react/events/use-events.js +1 -0
- package/esm/production/wirestate-react/events/use-events.js.map +1 -0
- package/esm/production/wirestate-react/index.js +1 -0
- package/esm/production/wirestate-react/index.js.map +1 -0
- package/esm/production/wirestate-react/provision/create-injectables-provider.js +1 -0
- package/esm/production/wirestate-react/provision/create-injectables-provider.js.map +1 -0
- package/esm/production/wirestate-react/provision/ioc-context.js +1 -0
- package/esm/production/wirestate-react/provision/ioc-context.js.map +1 -0
- package/esm/production/wirestate-react/provision/ioc-provider.js +1 -0
- package/esm/production/wirestate-react/provision/ioc-provider.js.map +1 -0
- package/esm/production/wirestate-react/provision/use-container-revision.js +1 -0
- package/esm/production/wirestate-react/provision/use-container-revision.js.map +1 -0
- package/esm/production/wirestate-react/provision/use-container.js +1 -0
- package/esm/production/wirestate-react/provision/use-container.js.map +1 -0
- package/esm/production/wirestate-react/provision/use-injection.js +1 -0
- package/esm/production/wirestate-react/provision/use-injection.js.map +1 -0
- package/esm/production/wirestate-react/provision/use-ioc-context.js +1 -0
- package/esm/production/wirestate-react/provision/use-ioc-context.js.map +1 -0
- package/esm/production/wirestate-react/provision/use-optional-injection.js +1 -0
- package/esm/production/wirestate-react/provision/use-optional-injection.js.map +1 -0
- package/esm/production/wirestate-react/queries/use-optional-query-caller.js +1 -0
- package/esm/production/wirestate-react/queries/use-optional-query-caller.js.map +1 -0
- package/esm/production/wirestate-react/queries/use-optional-sync-query-caller.js +1 -0
- package/esm/production/wirestate-react/queries/use-optional-sync-query-caller.js.map +1 -0
- package/esm/production/wirestate-react/queries/use-query-caller.js +1 -0
- package/esm/production/wirestate-react/queries/use-query-caller.js.map +1 -0
- package/esm/production/wirestate-react/queries/use-query-handler.js +1 -0
- package/esm/production/wirestate-react/queries/use-query-handler.js.map +1 -0
- package/esm/production/wirestate-react/queries/use-sync-query-caller.js +1 -0
- package/esm/production/wirestate-react/queries/use-sync-query-caller.js.map +1 -0
- package/esm/production/wirestate-react/test-utils/with-ioc-provider.js +1 -0
- package/esm/production/wirestate-react/test-utils/with-ioc-provider.js.map +1 -0
- package/esm/production/wirestate-react/test-utils.js +1 -0
- package/esm/production/wirestate-react/test-utils.js.map +1 -0
- package/index.d.ts +218 -0
- package/package.json +62 -0
- package/test-utils.d.ts +18 -0
package/test-utils.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Container } from '@wirestate/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Wraps a component with IocProvider for testing.
|
|
7
|
+
*
|
|
8
|
+
* @param children - components to wrap
|
|
9
|
+
* @param container - optional custom container
|
|
10
|
+
* @param seed - optional shared seed object
|
|
11
|
+
* @returns wrapped components
|
|
12
|
+
*/
|
|
13
|
+
declare function withIocProvider(children: ReactNode, container?: Container, seed?: Record<string, unknown>): react.FunctionComponentElement<{
|
|
14
|
+
container: Container;
|
|
15
|
+
seed: Record<string, unknown> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
export { withIocProvider };
|