@telia-ace/widget-core 1.0.15 → 1.0.16-next.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.
@@ -1,8 +1,8 @@
1
- import { ComponentNode } from './component-node';
2
- export declare type ComponentDescriptor = {
3
- id: string;
4
- type?: string;
5
- name?: string;
6
- branch: string;
7
- };
8
- export declare const asDescriptor: (node: ComponentNode, branch?: string) => ComponentDescriptor;
1
+ import { ComponentNode } from './component-node';
2
+ export declare type ComponentDescriptor = {
3
+ id: string;
4
+ type?: string;
5
+ name?: string;
6
+ branch: string;
7
+ };
8
+ export declare const asDescriptor: (node: ComponentNode, branch?: string) => ComponentDescriptor;
@@ -1,8 +1,8 @@
1
- import { Container } from '@webprovisions/platform';
2
- import { ComponentNodeController } from './component-controller';
3
- import { ComponentQuery } from './component-query';
4
- export declare type ExtendComponentHandler = (controller: ComponentNodeController) => any;
5
- export declare type ExtendComponentOptions = {
6
- reuseController?: boolean;
7
- };
8
- export declare const extendComponent: (container: Container, typeOrQuery: string | ComponentQuery, handler: ExtendComponentHandler, ns?: string, options?: ExtendComponentOptions) => Promise<void>;
1
+ import { Container } from '@webprovisions/platform';
2
+ import { ComponentNodeController } from './component-controller';
3
+ import { ComponentQuery } from './component-query';
4
+ export declare type ExtendComponentHandler = (controller: ComponentNodeController) => any;
5
+ export declare type ExtendComponentOptions = {
6
+ reuseController?: boolean;
7
+ };
8
+ export declare const extendComponent: (container: Container, typeOrQuery: string | ComponentQuery, handler: ExtendComponentHandler, ns?: string, options?: ExtendComponentOptions) => Promise<void>;
@@ -1,18 +1,18 @@
1
- export { ActionsController } from './actions-controller';
2
- export type { WatchActionDelegate } from './actions-controller';
3
- export type { ChangesetProvider } from './changeset-provider';
4
- export { default as componentConfigurationApi } from './component-configuration-api';
5
- export { AbstractComponentController, ComponentNodeController } from './component-controller';
6
- export { ComponentNode } from './component-node';
7
- export type { ChangesetOptions, ComponentNodeAttributes, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties, ComponentNodeSettings, Size, } from './component-node';
8
- export { ComponentPlatform } from './component-platform';
9
- export type { SwitchMap } from './component-platform';
10
- export { ComponentQuery } from './component-query';
11
- export type { ComponentQueryRule } from './component-query';
12
- export { createChildren, createComponentModel } from './create-component-model';
13
- export type { ComponentHandlerOptions, NormalizedComponentReference, } from './create-component-model';
14
- export { asDescriptor } from './descriptor';
15
- export type { ComponentDescriptor } from './descriptor';
16
- export { extendComponent } from './extend-component';
17
- export type { ExtendComponentHandler, ExtendComponentOptions } from './extend-component';
18
- export { findComponent, findVisibleComponents, traverseComponents } from './queries';
1
+ export { ActionsController } from './actions-controller';
2
+ export type { WatchActionDelegate } from './actions-controller';
3
+ export type { ChangesetProvider } from './changeset-provider';
4
+ export { default as componentConfigurationApi } from './component-configuration-api';
5
+ export { AbstractComponentController, ComponentNodeController } from './component-controller';
6
+ export { ComponentNode } from './component-node';
7
+ export type { ChangesetOptions, ComponentNodeAttributes, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties, ComponentNodeSettings, Size, } from './component-node';
8
+ export { ComponentPlatform } from './component-platform';
9
+ export type { SwitchMap } from './component-platform';
10
+ export { ComponentQuery } from './component-query';
11
+ export type { ComponentQueryRule } from './component-query';
12
+ export { createChildren, createComponentModel } from './create-component-model';
13
+ export type { ComponentHandlerOptions, NormalizedComponentReference, } from './create-component-model';
14
+ export { asDescriptor } from './descriptor';
15
+ export type { ComponentDescriptor } from './descriptor';
16
+ export { extendComponent } from './extend-component';
17
+ export type { ExtendComponentHandler, ExtendComponentOptions } from './extend-component';
18
+ export { findComponent, findVisibleComponents, traverseComponents } from './queries';
@@ -1,6 +1,6 @@
1
- import { ComponentNode } from './component-node';
2
- import { SwitchMap } from './component-platform';
3
- export declare const traverseComponents: (root: ComponentNode, switches: SwitchMap, fn: (node: ComponentNode) => boolean | void) => void;
4
- export declare const findVisibleComponents: (root: ComponentNode, switches: SwitchMap) => ComponentNode[];
5
- export declare const findComponent: (root: ComponentNode, switches: SwitchMap, fn: (node: ComponentNode) => boolean) => ComponentNode | undefined;
6
- export declare const getAncestors: (node: ComponentNode) => ComponentNode[];
1
+ import { ComponentNode } from './component-node';
2
+ import { SwitchMap } from './component-platform';
3
+ export declare const traverseComponents: (root: ComponentNode, switches: SwitchMap, fn: (node: ComponentNode) => boolean | void) => void;
4
+ export declare const findVisibleComponents: (root: ComponentNode, switches: SwitchMap) => ComponentNode[];
5
+ export declare const findComponent: (root: ComponentNode, switches: SwitchMap, fn: (node: ComponentNode) => boolean) => ComponentNode | undefined;
6
+ export declare const getAncestors: (node: ComponentNode) => ComponentNode[];
@@ -1,12 +1,12 @@
1
- import { ComponentPlatform } from '.';
2
- import { ComponentNode } from './component-node';
3
- export declare type ProcessOptions = {
4
- context?: boolean;
5
- properties?: boolean;
6
- layout?: boolean;
7
- recursive?: boolean;
8
- };
9
- export declare type StateProcessor = (node: ComponentNode, options: ProcessOptions) => void;
10
- export declare type ProcessResult = Map<ComponentNode, ProcessOptions>;
11
- export declare type ProcessReportCallback = (report: ProcessResult) => void;
12
- export declare const createStateProcessor: (platform: ComponentPlatform, callback: ProcessReportCallback) => StateProcessor;
1
+ import { ComponentPlatform } from '.';
2
+ import { ComponentNode } from './component-node';
3
+ export declare type ProcessOptions = {
4
+ context?: boolean;
5
+ properties?: boolean;
6
+ layout?: boolean;
7
+ recursive?: boolean;
8
+ };
9
+ export declare type StateProcessor = (node: ComponentNode, options: ProcessOptions) => void;
10
+ export declare type ProcessResult = Map<ComponentNode, ProcessOptions>;
11
+ export declare type ProcessReportCallback = (report: ProcessResult) => void;
12
+ export declare const createStateProcessor: (platform: ComponentPlatform, callback: ProcessReportCallback) => StateProcessor;
@@ -1,14 +1,14 @@
1
- import { Logger } from '@telia-ace/widget-utilities';
2
- import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
3
- export declare type ReactComponent = any | null;
4
- export default class ComponentResolver {
5
- aliases: Map<string, string>;
6
- components: Map<string, any>;
7
- events: EventManager;
8
- logger: Logger;
9
- constructor(container: Container);
10
- getComponent(key: string): ReactComponent;
11
- registerComponent(key: string, component: ReactComponent): EventSubscriptionCancellation;
12
- registerResolver(key: string, fn: (component: ReactComponent) => void): EventSubscriptionCancellation;
13
- registerAlias(alias: string, key: string): EventSubscriptionCancellation;
14
- }
1
+ import { Logger } from '@telia-ace/widget-utilities';
2
+ import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
3
+ export declare type ReactComponent = any | null;
4
+ export default class ComponentResolver {
5
+ aliases: Map<string, string>;
6
+ components: Map<string, any>;
7
+ events: EventManager;
8
+ logger: Logger;
9
+ constructor(container: Container);
10
+ getComponent(key: string): ReactComponent;
11
+ registerComponent(key: string, component: ReactComponent): EventSubscriptionCancellation;
12
+ registerResolver(key: string, fn: (component: ReactComponent) => void): EventSubscriptionCancellation;
13
+ registerAlias(alias: string, key: string): EventSubscriptionCancellation;
14
+ }
@@ -1,7 +1,7 @@
1
- import { EventListener, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
2
- export declare type SubscribeDelegate = (type: string, listener: EventListener) => void;
3
- /**
4
- * Creates s subscriber for the specified `EventManager` and provides a single cancellation
5
- * function for all registered subscriptions.
6
- */
7
- export declare const createEventSubscriber: (events: EventManager) => [SubscribeDelegate, EventSubscriptionCancellation];
1
+ import { EventListener, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
2
+ export declare type SubscribeDelegate = (type: string, listener: EventListener) => void;
3
+ /**
4
+ * Creates s subscriber for the specified `EventManager` and provides a single cancellation
5
+ * function for all registered subscriptions.
6
+ */
7
+ export declare const createEventSubscriber: (events: EventManager) => [SubscribeDelegate, EventSubscriptionCancellation];
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { default as ActionResolver } from './action-resolver';
2
- export { ActionsController, asDescriptor, componentConfigurationApi, ComponentNode, ComponentNodeController, ComponentPlatform, ComponentQuery, createChildren, createComponentModel, extendComponent, findComponent, findVisibleComponents, traverseComponents, } from './component-platform';
3
- export type { ChangesetOptions, ChangesetProvider, ComponentDescriptor, ComponentHandlerOptions, ComponentNodeAttributes, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties, ComponentNodeSettings, ComponentQueryRule, ExtendComponentHandler, ExtendComponentOptions, NormalizedComponentReference, Size, SwitchMap, WatchActionDelegate, } from './component-platform';
4
- export { default as ComponentResolver } from './component-resolver';
5
- export type { ReactComponent } from './component-resolver';
6
- export { createEventSubscriber } from './event-subscriber';
7
- export type { SubscribeDelegate } from './event-subscriber';
8
- export * from './types';
1
+ export { default as ActionResolver } from './action-resolver';
2
+ export { ActionsController, asDescriptor, componentConfigurationApi, ComponentNode, ComponentNodeController, ComponentPlatform, ComponentQuery, createChildren, createComponentModel, extendComponent, findComponent, findVisibleComponents, traverseComponents, } from './component-platform';
3
+ export type { ChangesetOptions, ChangesetProvider, ComponentDescriptor, ComponentHandlerOptions, ComponentNodeAttributes, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties, ComponentNodeSettings, ComponentQueryRule, ExtendComponentHandler, ExtendComponentOptions, NormalizedComponentReference, Size, SwitchMap, WatchActionDelegate, } from './component-platform';
4
+ export { default as ComponentResolver } from './component-resolver';
5
+ export type { ReactComponent } from './component-resolver';
6
+ export { createEventSubscriber } from './event-subscriber';
7
+ export type { SubscribeDelegate } from './event-subscriber';
8
+ export * from './types';