@omnia/fx-models
Version:
Provide Omnia Fx Models Stuffs.
115 lines (114 loc) • 3.52 kB
TypeScript
import { IIcon, AppProvisioningHandler } from '.';
import { GuidValue } from './Guid';
import { BladeMenuNavigationNode } from './Admin';
export interface Topic<T> {
namespace: string;
name: string;
}
export interface TopicSettings {
caching?: TopicCacheSettings;
}
export interface TopicCacheSettings {
size: number;
}
export interface OmniaHeaderMessage {
/**
* The element that will be rendered when selected
*/
elementToRender: string;
/**
* This influence the order of the nodes, be nice, use ordering with gap -100, 0, 100, 200
So other extensions etc can inject between
*/
weight: number;
}
export interface NavigationNodeMenuMessage {
/**
* The parent element to the navigation node
*/
parentNodeKey: string;
/**
* The blade menu node
*/
menuNode: BladeMenuNavigationNode;
}
export interface OmniaFooterMessage {
component: string;
order: number;
}
export interface UserMenuMessage {
/**
* Registration Title. Support localization : $Localize:A.B.C
*/
title?: string;
/**
* Registration Icon.
*/
icon?: IIcon;
/**
* false : the action menu will take care of render flat icon / list item. The component only render its stuff (Ex: dialog)
* true: the action menu will render the component at the begining (no lazy). Then the component will take care of render on Action Menu.
*/
customItemRendering?: boolean;
/**
* The element that will be rendered when selected
*/
elementToRender: string;
/**
* This influence the order of the nodes, be nice, use ordering with gap -100, 0, 100, 200
So other extensions etc can inject between
*/
weight: number;
}
export interface PageEditModeMessage {
editMode: boolean;
contentEditing: boolean;
}
export interface AppTitleMessage {
title: string;
}
export interface AppProvisioningHandlerMessage {
/**
* appDefinition which this handler should be applied
*/
appDefinitionId: GuidValue;
/**
* appDefinition handler which should handle some events during app provisioning
*/
handler: AppProvisioningHandler;
/**
* This influence the order of the nodes, be nice, use ordering with gap -100, 0, 100, 200
So other extensions etc can inject between
*/
weight: number;
}
export interface TopicCreatedFunc<T> {
(created: IMessageBusTopicPublishSubscriber<T>): void;
}
export interface IMessageBusSubscriptionHandler {
/**
* Unsubscribe to the related subscription(s)
* and/or any subscriptions added using add method)
* */
unsubscribe(): any;
/**
* Adds another unsubscribe handler, all will be unsubscribed to if calling unsubscribe
* @param unSubscriptionHandler
*/
add(unSubscriptionHandler: IMessageBusSubscriptionHandler): any;
}
export interface IMessageBusTopicSubscription<T> {
subscribe: (fn: (obj: T) => void) => IMessageBusSubscriptionHandler;
}
export interface IMessageBusTopicPublication<T> {
publish: (msg: T) => void;
}
export interface IMessageBusTopicPublishSubscriber<T> extends IMessageBusTopicSubscription<T>, IMessageBusTopicPublication<T> {
}
export interface RichTextEditorExtensionMessage {
id: GuidValue;
title: string;
manifestId: GuidValue;
serviceId: GuidValue;
instance: any;
}