libs/ngx-pfe/pfe-actions/reset-state/reset-state.model.ts

Extends

PfeBaseActionConfig

Relationships

Used by

No results matching.

Depends on

Index

Properties

Properties

excludeFromResetExpressions
excludeFromResetExpressions: JsonPathExpression[]
Type : JsonPathExpression[]
Optional

Provide an array of JSON expressions that will not be reset.

Example :
{
"onNavigationStartActions": [
{
"type": "PFE_RESET_STATE",
"excludeFromResetExpressions": ["$.myState.keepThisState", "$.importantState"]
}
]
}
type
type: typeof PfeResetStateActionType
Type : typeof PfeResetStateActionType

Completely reset the state.

An example use case could be to reset the state before going back to the first page:

Example :
{
"pageId": "lastPage",
"nextOptionList": [
{
"nextPageId": "firstPage"
}
],
"onNavigationStartActions": [
{
"type": "PFE_RESET_STATE"
}
]
}
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 { JsonPathExpression } from '../../models/jsonpath-expression-type.model';
import { PfeBaseActionConfig } from '../pfe-actions.model';

export const PfeResetStateActionType = 'PFE_RESET_STATE';

export interface PfeResetStateActionConfig extends PfeBaseActionConfig {
  /**
   * Completely reset the state.
   *
   * An example use case could be to reset the state before going back to the first page:
   *
```json
{
  "pageId": "lastPage",
  "nextOptionList": [
    {
      "nextPageId": "firstPage"
    }
  ],
  "onNavigationStartActions": [
    {
      "type": "PFE_RESET_STATE"
    }
  ]
}
```
   */
  type: typeof PfeResetStateActionType;

  /**
   * Provide an array of JSON expressions that will not be reset.
```json
{
  "onNavigationStartActions": [
    {
      "type": "PFE_RESET_STATE",
      "excludeFromResetExpressions": ["$.myState.keepThisState", "$.importantState"]
    }
  ]
}
```
   */
  excludeFromResetExpressions?: JsonPathExpression[];
}

results matching ""

    No results matching ""