import FlowContainer from './flow-container';
import type { TransientContainerInfo, TransientContainerInfoForUpdate, NonEmptyString, ContainerInfo } from './types';
export declare const CONTAINER_TYPES: {
SINGLE: string;
MULTIPLE: string;
};
export declare const CONTAINER_NAMES: {
PRIMARY: string;
WORKAREA: string;
MODAL: string;
PREVIEW: string;
};
/**
* this function returns the container data for the given container name
* @function getContainerData
* @param target -- target container
* @returns - State Object for the given container
* @static
*
* @example
Example for getContainerData.
* PCore.getContainerUtils().getContainerData('app/primary');
* example for getting containers info under app/primary target
*/
export declare const getContainerData: (target: string | null) => any;
/**
* this function returns the container data for the given container name
* @private
* @function getContainerItemData
* @param target -- target container
* @param containerItem -- target container item
* @returns - State Object for the given container item
* @static
*
* @example
Example for getContainerItemData.
* PCore.getContainerUtils().getContainerItemData('app/primary', 'app/primary_1');
* example for getting container item app/primary_1 data under app/primary target
*/
export declare const getContainerItemData: (target: string | null | undefined, containerItem: string | null) => any;
/**
* this function returns the container items data for the given target
* @function getContainerItems
* @param target -- target container
* @returns - container items data for the given target
* @static
*
* @example
Example for getContainerItems.
* PCore.getContainerUtils().getContainerItems('app/primary');
* example for getting container items info under app/primary target
*/
export declare const getContainerItems: (target: string) => object | null;
/**
* this function returns the container accessOrder data for the given target
* @function getContainerAccessOrder
* @param target -- target container
* @returns returns -- container accessOrder data for the given target
* @static
*
* @example
Example for getContainerAccessOrder.
* PCore.getContainerUtils().getContainerAccessOrder('app/primary');
* example for getting container accessOrder info under app/primary target
*/
export declare const getContainerAccessOrder: (target: string) => any[];
/**
* this function returns the container items present or not for the given target
* @function areContainerItemsPresent
* @param target -- target container
* @returns - container items present or not for the given target
* @static
*
* @example
Example for areContainerItemsPresent.
* PCore.getContainerUtils().areContainerItemsPresent('app/primary');
* example for are container items present under app/primary target
*/
export declare const areContainerItemsPresent: (target: string) => boolean;
/**
* this function determines whether a containeritem present with given key in a target container.
* @function isContainerItemExists
* @param target -- target container e.g. app/primary
* @param key -- unique key name e.g app/view/1
* @param callback A function to execute on unique key in each containerItem until the function returns true,
* indicating that the satisfying containerItem was found. if callback is undefined, we use strict comparison for key match.
* @returns returns -- true if containeritem already exists in store OR
* -- false if no containeritem found with param information
* @static
*
* @example
Example for isContainerItemExists.
* PCore.getContainerUtils().isContainerItemExists('app/primary', 'R-1234');
* example for getting to know whether 'R-1234' Work Item under 'app/primary' target exists or not
*/
export declare const isContainerItemExists: (target: string | null, key: string, callback?: Function) => boolean;
/**
* this function returns containeritem name if unique key is present in containers data.
* @function getContainerItemName
* @param target -- target container e.g. app/primary
* @param key -- key name e.g. app/view/1
* @param callback -- A function to execute on unique key in each containerItem until the function returns true,
* indicating that the satisfying containerItem was found. if callback is undefined, we use strict comparison for key match.
* @returns - item name if container already exists in store OR
* - null if no container found with param information
* @static
*
* @example
Example for getContainerItemName.
* PCore.getContainerUtils().getContainerItemName('app/primary', 'R-1234');
* example for getting container item name for 'R-1234' Work Item under 'app/primary' target.
*/
export declare const getContainerItemName: (target: string | null, key: string | undefined, callback?: Function) => string | null;
/**
* @private
* @function getContainerItemByKey
* this function returns containeritem name if unique key is present in containers data
* @param key - key name eg: 'R-1234'
* @returns - item if container already exists in store OR
* - null if no container found with param information
* @example
Example for getContainerItemByKey.
* PCore.getContainerUtils().getContainerItemByKey('R-1234');
*/
export declare const getContainerItemByKey: (key: string | undefined) => ContainerInfo | null;
/**
* this function gives whether container is initialized in corresponding context
* @function isContainerInitialized
* @param context -- context of the container e.g. app/primary_1
* @param name -- container name e.g. workarea
* @returns - is container initialized
* @static
*
* @example
Example for isContainerInitialized.
* PCore.getContainerUtils().isContainerInitialized('app', 'primary');
* example for getting to know whether container initialized or not for provided information
*/
export declare const isContainerInitialized: (context: string, name: string) => boolean | undefined;
/**
* this function gives the container type
* @function getContainerType
* @param context -- context of the container e.g. app/primary_1
* @param name -- container name e.g. workarea
* @returns returns -- container type e.g single or multiple
* @static
*
* @example
Example for getContainerType.
* PCore.getContainerUtils().getContainerType('app', 'primary');
* example for getting container type for provided information
*/
export declare const getContainerType: (context: string, name: string) => null | string;
/**
* this functions gives active containeritem under provided target container
* @function getActiveContainerItemName
* @param target -- target container e.g. app/primary
* @returns - container name e.g. app/primary_4
* @static
*
* @example
Example for getActiveContainerItemName.
* PCore.getContainerUtils().getActiveContainerItemName('app/primary_1/workarea');
* example for getting Active Container ItemName under 'app/primary_1/workarea' target.
*
* @example
Example for getActiveContainerItemName.
* PCore.getContainerUtils().getActiveContainerItemName('app/primary');
* example for getting Active Container ItemName under 'app/primary' target.
*/
export declare const getActiveContainerItemName: (target: string | null) => null | string;
/**
* this functions helps to determine if containeritem is active or not with given inputs
* @function isContainerItemActive
* @param target -- target container e.g. app/primary
* @param key -- unique key of the containeritem e.g app/view/1
* @param callback - A function to execute on unique key in each containerItem until the function returns true,
* indicating that the satisfying containerItem was found. if callback is undefined, we use strict comparison for key match.
* @returns - 1) true if passed in containerItemName is active
* - 2) false if passed in containerItemName is not active
* @static
*
* @example
Example for isContainerItemActive with comparator function.
* PCore.getContainerUtils().isContainerItemActive('app/primary', 'R-1234', (key, semanticURL) => { });
* example for checking 'R-1234' Work Item is active or not under 'app/primary' target.
*
*
* @example
Example for isContainerItemActive without comparator function.
* PCore.getContainerUtils().isContainerItemActive('app/primary', 'W-67');
* example for checking 'W-67' Work Item is active or not under 'app/primary' target.
*
*/
export declare const isContainerItemActive: (target: string, key: string, callback: Function) => boolean;
/**
* this functions gives data context name for provided containeritem
* @function getDataContextName
* @param containerItemName -- containerItem name e.g. app/primary_4
* @returns - 1) data context if passed in containerItem is present in any of the containers
* - 2) null if no data found
* @static
*
* @example
Example for getDataContextName.
* PCore.getContainerUtils().getDataContextName('app/primary_3');
* example is for returning data context name for container item name --> 'app/primary_3'
*
* @example
Example for getDataContextName.
* PCore.getContainerUtils().getDataContextName('app/primary_2/workarea_1');
* example is for returning data context name for container item name --> 'app/primary_2/workarea_1'
*/
export declare const getDataContextName: (containerItemName: string | null) => string | null;
/**
* this functions gives active container context under provided target container
* @function getActiveContainerItemContext
* @param target -- target container e.g. app/primary
* @returns - container context e.g. app/primary_4
* @static
*
* @example
Example for getActiveContainerItemContext.
* PCore.getContainerUtils().getActiveContainerItemContext('app/primary_1/workarea');
* example for getting Active Container Item Context under 'app/primary_1/workarea' target.
*
* @example
Example for getActiveContainerItemContext.
* PCore.getContainerUtils().getActiveContainerItemContext('app/primary');
* example for getting Active Container Item Context under 'app/primary' target.
*/
export declare const getActiveContainerItemContext: (target: string | null) => string | null;
/**
* This functions returns child containeritems for given parent containeritem
* @function getChildContainerItems
* @param containerItemName -- containeritem name e.g. app/primary_4
* @returns e.g. array of child container item names['app/primary_4/workarea_1', 'app/primary_4/workarea_3']
* @static
*
* @example
Example for getChildContainerItems.
* PCore.getContainerUtils().getChildContainerItems('app/primary_3');
* example is for returning child containeritems present under 'app/primary_3' (parent containeritem name)
*
* @example
Example for getChildContainerItems.
* PCore.getContainerUtils().getChildContainerItems('app/secondary_2');
* example is for returning child containeritems present under 'app/secondary_2' (parent containeritem name)
*/
export declare const getChildContainerItems: (containerItemName: string) => string[];
/**
* This functions returns child containers for given parent container name
* @function getChildContainers
* @param containerItemName -- containeritem name e.g. app/primary_1
* @returns e.g. array of child container names['app/primary_1/workarea']
* @private
*
* @example
Example for getChildContainers.
* PCore.getContainerUtils().getChildContainers('app/primary_1');
* example is for returning child containers present under 'app/primary_1' (parent containeritem name)e
*
* @example
Example for getChildContainers.
* PCore.getContainerUtils().getChildContainers('app/primary_2');
* example is for returning child containers present under 'app/primary_2' (parent containeritem name)
*/
export declare const getChildContainers: (containerItemName: string) => string[];
/**
* This functions returns child containers for given parent container name
* @function getChildContainersContexts
* @param parentContainerItemID -- containeritem name e.g. app/primary_1
* @returns e.g. array of child container names['app/primary_1/workarea']
* @private
*
* @example
Example for getChildContainersContexts.
* PCore.getContainerUtils().getChildContainers('app/primary_1');
* example is for returning child containers present under 'app/primary_1' (parent containeritem name)e
*
* @example
Example for getChildContainersContexts.
* PCore.getContainerUtils().getChildContainers('app/primary_2');
* example is for returning child containers present under 'app/primary_2' (parent containeritem name)
*/
export declare const getChildContainersContexts: (parentContainerItemID: string) => (string | null)[];
/**
* This functions returns suggestion contexts related to containerItemID
* @function getSuggestionContexts
* @param containerItemID parent containerItemID e.g. app/primary_1
* @returns array of related suggestion context name e.g. ['app/primary_1/suggestion,app/primary_1/workarea_1/suggestion']
* @private
*
* @example
Example for getSuggestionContexts.
* PCore.getContainerUtils().getSuggestionContexts('app/primary_1');
* example is for returning related suggestion context present for 'app/primary_1' (parent containeritemId)
*/
export declare const getSuggestionContexts: (containerItemID: string) => string[];
/**
* This function determines whether container is single mode or not
* @function isContainerSingleMode
* @param target -- target container e.g. app/primary
* @returns - 1) true if passed container type is single
* - 2) false if passed container type is other
* @private
*
* @example
Example for isContainerSingleMode.
* PCore.getContainerUtils().isContainerSingleMode('app/primary');
* example for getting to know whether container is single mode
*
* @example
Example for isContainerSingleMode.
* PCore.getContainerUtils().isContainerSingleMode('app/primary_1/workarea');
* example for getting to know whether container is single mode
*/
export declare const isContainerSingleMode: (target: string | null) => boolean | null;
/**
* This function determines whether container is multiple mode or not
* @function isContainerMultipleMode
* @param target -- target container e.g. app/primary
* @returns - 1) true if passed container type is multiple
* - 2) false if passed container type is other
* @private
*
* @example
Example for isContainerMultipleMode.
* PCore.getContainerUtils().isContainerMultipleMode('app/primary');
* example for getting to know whether container is multiple mode
*
* @example
Example for isContainerMultipleMode.
* PCore.getContainerUtils().isContainerMultipleMode('app/primary_1/workarea');
* example for getting to know whether container is multiple mode
*/
export declare const isContainerMultipleMode: (target: string | null) => boolean | null;
/**
* This function determines whether container have items or not
* @function hasContainerItems
* @param target -- target container e.g. app/primary
* @returns - 1) true if passed container has items
* - 2) false if passed in container has no items
* @private
*
* @example
Example for hasContainerItems.
* PCore.getContainerUtils().hasContainerItems('app/primary');
* example for getting to know whether container has items for provided information
*
* @example
Example for hasContainerItems.
* PCore.getContainerUtils().hasContainerItems('app/primary_1/workarea');
* example for getting to know whether container has items for provided information
*/
export declare const hasContainerItems: (target: string | null) => boolean;
/**
* This function provides container limit information.
* @function getContainerLimit
* @param target -- target container e.g. app/primary
* @returns - container limit value
* @private
*
* @example
Example for getContainerLimit.
* PCore.getContainerUtils().getContainerLimit('app/primary');
* example to know container limit for `app/primary`
*/
export declare const getContainerLimit: (target: string) => number;
/**
* This function helps to set container limit for target.
* @function setContainerLimit
* @param target -- target container e.g. app/primary
* @param limitNumber -- limit value e.g. 8, 16, 32 etc..
* -- if not limitNumber passed, default limit value 16 will be set.
* @private
*
* @example
Example for setContainerLimit.
* PCore.getContainerUtils().setContainerLimit('app/primary', 8);
* example to set container limit for `app/primary` as 8
*/
export declare const setContainerLimit: (target: string, limitNumber?: number) => void;
/**
* This function helps to know whether container limit has been reached or not.
* @function isContainerLimitReached
* @param target container e.g. app/primary
* @returns - 1) true - if container limit reaches
* - 2) false - if container limit not reached.
* @private
*
* @example
Example for isContainerLimitReached.
* PCore.getContainerUtils().isContainerLimitReached('app/primary');
* example to know container limit for `app/primary`
*/
export declare const isContainerLimitReached: (target: string | null) => boolean;
/**
* This function helps to give payload for resetContainers.
* @function resetContainersPayload
* @param containerInfo -- target container e.g. app/primary
* @returns - contains context, Array of container items, container name
*
* @private
*
* @example
Example for resetContainersPayload.
* PCore.getContainerUtils().resetContainersPayload({ "context": "app", "name": "preview"});
*/
export declare const resetContainersPayload: (containerInfo: {
[key: string]: any;
}) => {
context: NonEmptyString;
name: NonEmptyString;
containerItems: any[];
childContainers: string[];
} | null;
/**
* This function checks whether container content is changed or not
* i.e. state is dirty or not
* @function isContainerDirty
* @param containerItemID -- container id e.g. app/primary_1
* @returns - returns true if container is dirty else false
*
* @example
Example for isContainerDirty.
* PCore.getContainerUtils().isContainerDirty("app/primary_1");
*/
export declare const isContainerDirty: (containerItemID: string) => boolean;
/**
* This function helps to know whether container limit has been reached or not.
* @function getLeastRecentlyUsedNonDirtyContainerItemID
* @param target -- target container e.g. app/primary
* @returns - 1) containerItemID (string type) - if LRU + ND container item found.
* - 2) undefined - if no container item found with non dirty status.
* @private
*
* @example
Example for getLeastRecentlyUsedNonDirtyContainerItemID.
* PCore.getContainerUtils().getLeastRecentlyUsedNonDirtyContainerItemID('app/primary');
* example to know least used not dirty container item inside `app/primary`
*/
export declare const getLeastRecentlyUsedNonDirtyContainerItemID: (target: string | null) => string | null;
/**
* This function helps to get the target of the given containerItemID.
* @function getTargetFromContainerItemID
* @param containerItemID -- target container e.g. app/primary
* @returns - return the target of the containerItem
* @private
*
* @example
Example for getTargetFromContainerItemID.
* PCore.getContainerUtils().getTargetFromContainerItemID('app/primary/workarea_1');
* example to get the target ('app/primary/workarea') of the containerItemID 'app/primary/workarea_1'
*/
export declare const getTargetFromContainerItemID: (containerItemID: string | null) => string | null;
/**
* This function used to close the container item
* @function closeContainerItem
* @param containerItemID -- container item which need to be closed
* @param options options contains additional info like skipDirtyCheck to
* @returns this returns promise
* skip confirm dialog if container item is dirty
* @example
Example for closeContainerItem.
* In the below example container item with id - "app/primary_4" will be closed
* PCore.getContainerUtils().closeContainerItem("app/primary_4");
*
* // pass skipDirtyCheck: true in options to prevent confirm dialog
* PCore.getContainerUtils().closeContainerItem("app/primary_4",{skipDirtyCheck:true});
*
*/
export declare const closeContainerItem: (containerItemID: string, options?: {
skipDirtyCheck?: boolean;
}) => Promise