API ReferenceGlobalsConfiguratorHistory

# Class: ConfiguratorHistory

# Hierarchy

  • ConfiguratorHistory

# Implements

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

+ new ConfiguratorHistory(creator: string): ConfiguratorHistory

Defined in packages/configurator-core/src/utils/configurator-history.ts:12

Parameters:

Name Type
creator string

Returns: ConfiguratorHistory

# Properties

# creator

creator: string

_Implementation of Context.creator_

Defined in packages/configurator-core/src/utils/configurator-history.ts:8

# Methods

# canRedo

canRedo(): boolean

Defined in packages/configurator-core/src/utils/configurator-history.ts:89

checks if there are newer configurations

Returns: boolean

true if current configuration is not the latest configuration


# canUndo

canUndo(): boolean

Defined in packages/configurator-core/src/utils/configurator-history.ts:81

checks if there are any changes on the item already happened

Returns: boolean

true if the current configuration is not the default configuration


# clearHistory

clearHistory(): void

Defined in packages/configurator-core/src/utils/configurator-history.ts:104

clears history and make new empty history array sets index on 0 that no undo and redo is possible

Returns: void


# getHistory

getHistory(): string[]

Defined in packages/configurator-core/src/utils/configurator-history.ts:96

Returns: string[]

array of all configuration strings


# push

push(configurationString: ConfigurationString): void

Defined in packages/configurator-core/src/utils/configurator-history.ts:62

pushes new configurationString to history Array is called when changes on the item happened

Parameters:

Name Type
configurationString ConfigurationString

Returns: void


# redo

redo(): ConfigurationString | null

Defined in packages/configurator-core/src/utils/configurator-history.ts:42

loads the configurationString of the configuration which was set before undo function was called only possible if undo function was called before

Returns: ConfigurationString | null

configurationString of configuration before undo was called or null if canRedo returns false


# undo

undo(): ConfigurationString | null

Defined in packages/configurator-core/src/utils/configurator-history.ts:23

loads the configurationString of the configuration which was set before only possible if there are some changes on the current item

Returns: ConfigurationString | null

configurationString of lastAction or null if canUndo returns false