libs/ngx-pfe/pfe-actions/nested-actions/nested-actions.model.ts

Description

You can group a list of actions that will be executed together

Example :
{
 "type": "PFE_NESTED_ACTIONS",
 "conditions": [
     {
         "expression": "{$.EMAIL_ERROR}"
     }
  ],
  "break": true,
  "actions": [
     {
         "type": "EDP_TOAST_NOTIFICATION",
          // Show a toast notification of error...
     },
     {
         "type": "PFE_UPDATE_STATE_VALUES",
         // Restore the email to the previous one
     }
   ]
}

JsonSchema:

  • In theory, we can nest endless actions, but probably we want to keep things simple. Also the json-schema can give some errors. Here its an example of the JsonSchema
Example :
export type UnNestedActionConfig = PfeActionConfig | XtraActionsConfig;
export type PortalActionConfig = UnNestedActionConfig | PfeNestedActions<UnNestedActionConfig>;
export interface PortalNavigationConfiguration extends PfeNavigationConfiguration<PortalActionConfig> {}

Extends

PfeBaseActionConfig

Relationships

Used by

No results matching.

Depends on

Index

Properties

Properties

actions
actions: Array<ACTIONS | PfeBaseActionConfig>
Type : Array<ACTIONS | PfeBaseActionConfig>
type
type: typeof PfeNestedActionsType
Type : typeof PfeNestedActionsType
break
break: boolean
Type : boolean
Optional

If break is "true" and the action was executed (that means, no conditions or conditions returns true) The flow will be stopped and the next actions will not be executed

conditions
conditions: Conditions
Type : Conditions
Optional

A list of conditions under which the actions are executed

globalConfigId
globalConfigId: string
Type : string
Optional

Only valid on the navigation. Will spread the actions.

import { PfeBaseActionConfig } from './../pfe-actions.model';

export const PfeNestedActionsType = 'PFE_NESTED_ACTIONS';

/**
 * You can group a list of actions that will be executed together
 * ```json
 * {
 *  "type": "PFE_NESTED_ACTIONS",
 *  "conditions": [
 *      {
 *          "expression": "{$.EMAIL_ERROR}"
 *      }
 *   ],
 *   "break": true,
 *   "actions": [
 *      {
 *          "type": "EDP_TOAST_NOTIFICATION",
 *           // Show a toast notification of error...
 *      },
 *      {
 *          "type": "PFE_UPDATE_STATE_VALUES",
 *          // Restore the email to the previous one
 *      }
 *    ]
 * }
 * ```
 * JsonSchema:
 * - In theory, we can nest endless actions, but probably we want to keep things simple. Also the json-schema
 * can give some errors.
 * Here its an example of the JsonSchema
 * ```typescript
 * export type UnNestedActionConfig = PfeActionConfig | XtraActionsConfig;
 * export type PortalActionConfig = UnNestedActionConfig | PfeNestedActions<UnNestedActionConfig>;
 * export interface PortalNavigationConfiguration extends PfeNavigationConfiguration<PortalActionConfig> {}
 * ```
 */
export interface PfeNestedActions<ACTIONS> extends PfeBaseActionConfig {
  type: typeof PfeNestedActionsType;
  actions: Array<ACTIONS | PfeBaseActionConfig>;
}

results matching ""

    No results matching ""