Global

Members

_store :object

Type:
  • object
Source:

(constant) ADD_MAPPED_ASSET_ENTRY

Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Source:

(constant) DEFAULT_INITIAL_STATE :object

Initial default state
Type:
  • object
Source:

(constant) DRAG_SPEED

Metal drag
Source:

(constant) DROP_TARGET_BORDERS

Positions where elements can be dragged to
Source:

(constant) DROP_TARGET_ITEM_TYPES

Possible drop target types
Source:

(constant) EDITABLE_FIELD_CHANGE_DELAY :number

Type:
  • number
Source:

(constant) ELEMENT_AVAILABLE_POSITIONS :object

Type:
  • object
Source:

(constant) ELEMENT_POSITION :object

Type:
  • object
Source:

(constant, non-null) ENTER_KEY :string

KeyBoardEvent enter key
Type:
  • string
Source:

(constant, non-null) ENTER_KEY :string

KeyBoardEvent enter key
Type:
  • string
Source:

(constant) FIXED_PANEL_CLASS :object

Type:
  • object
Source:

(constant) HOVERED_ITEM_CLASS :string

Type:
  • string
Source:

(constant) INITIAL_STATE :object

Initial state
Type:
  • object
Source:

(constant) ITEM_CLASS :string

Type:
  • string
Source:

(constant) LAYOUT_COLUMN_ITEM_DROPDOWN_ITEMS

Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Source:

(constant, non-null) POPOVER_POSITIONS :object

Mapping from metal-position to popover positions
Type:
  • object
Source:

(constant) reducers :object

List of reducers
Type:
  • object
Source:
DOM selector where the sidebar is rendered
Source:

(constant) STORE_DEVTOOLS_ID

ID of the development devTool that may be connected to store. We are relying on redux-devtools, so we can continue using them when we move to a proper state-management library. They provide a global hook that is available when the browser has redux-devtools-extension installed: http://extension.remotedev.io/#usage
Source:

(constant) WINDOW_RESIZE_DEBOUNCE_DELAY :number

Type:
  • number
Source:

(constant) WRAPPER_SELECTOR

DOM selector where the fragmentEntryLinks are rendered
Source:

Methods

_addColumns(layoutData, rowIndex, numberOfColumns, columnsSize) → {object}

Returns a new layoutData with the given columns inserted in the specified row with the specified size and resizes the rest of columns to the same size.
Parameters:
Name Type Description
layoutData object
rowIndex number
numberOfColumns number
columnsSize number
Source:
Returns:
Type
object
Parameters:
Name Type Description
addFragmentEntryLinkURL string
fragmentEntryKey string
fragmentName string
classNameId string
classPK string
portletNamespace string
Source:
Returns:
Type
object

_addFragmentToColumn(layoutData, fragmentEntryLinkId, targetColumnId, position) → {object}

Returns a new layoutData with the given fragmentEntryLinkId inserted into a given column at the given position
Parameters:
Name Type Description
layoutData object
fragmentEntryLinkId string
targetColumnId string
position number
Source:
Returns:
Type
object

_addPortlet(addPortletURL, portletId, classNameId, classPK, portletNamespace, segmentsExperienceId) → {object}

Parameters:
Name Type Description
addPortletURL string
portletId string
classNameId string
classPK string
portletNamespace string
segmentsExperienceId string
Source:
Returns:
Type
object

_addSingleFragmentRow(layoutData, fragmentEntryLinkId, fragmentEntryLinkRowType, position) → {object}

Returns a new layoutData with the given fragmentEntryLinkId inserted into a single-column new row. The row will be created at the given position.
Parameters:
Name Type Description
layoutData object
fragmentEntryLinkId string
fragmentEntryLinkRowType string
position number
Source:
Returns:
Type
object

_duplicateFragmentEntryLinkAction(originalFragmentEntryLinkId, fragmentEntryLink, fragmentEntryLinkRowType)

Parameters:
Name Type Description
originalFragmentEntryLinkId string
fragmentEntryLink object
fragmentEntryLinkRowType string
Source:

_editableFragmentMigrator(object, defaultSegmentsExperienceKey)

Parameters:
Name Type Description
object object
defaultSegmentsExperienceKey string
Source:

_encodeId(objnon-null)

Encode an id object and returns encoded id
Parameters:
Name Type Description
obj obj
Source:

_getColumnSize(numberOfColumns, columnsSize, columnIndex) → {string}

Returns the new size of a column based on the total number of columns of a grid, the general size and its position in the grid.
Parameters:
Name Type Description
numberOfColumns number
columnsSize number
columnIndex number
Source:
Returns:
Type
string

_getDropFragmentPosition(fragmentEntryLinkIds, targetFragmentEntryLinkId, targetBorder) → {number}

Parameters:
Name Type Description
fragmentEntryLinkIds Array.<string>
targetFragmentEntryLinkId string
targetBorder FRAGMENTS_EDITOR_ITEM_BORDERS
Source:
Returns:
Type
number

_getEditorConfiguration(editableElement, portletNamespace, fragmentEntryLinkId, defaultEditorConfiguration, editorName) → {object}

Returns a configuration object for a AlloyEditor instance.
Parameters:
Name Type Description
editableElement HTMLElement
portletNamespace string
fragmentEntryLinkId string
defaultEditorConfiguration object
editorName string
Source:
Returns:
Type
object

_getFormData(body, portletNamespace, _formDataopt) → {FormData}

Parameters:
Name Type Attributes Default Description
body object
portletNamespace string
_formData FormData <optional>
new FormData()
Source:
Returns:
Type
FormData

_getLanguageId(getState)

Parameters:
Name Type Description
getState function
Source:

_getSegmentsExperienceId(getState)

Parameters:
Name Type Description
getState function
Source:

_mergeChange(editableValues, change)

Parameters:
Name Type Description
editableValues object
change Object
Source:

_removeColumns(layoutData, rowIndex, numberOfColumns, columnsSize) → {object}

Returns a new layoutData without the columns out of range in the specified row and resizes the rest of columns to the specified size.
Parameters:
Name Type Description
layoutData object
rowIndex number
numberOfColumns number
columnsSize number
Source:
Returns:
Type
object

_removeFragment(layoutData, fragmentEntryLinkId, fragmentEntryLinkRowTypeopt) → {object}

Removes a given fragmentEntryLinkId from a given layoutData. It does not remove it from fragmentEntryLinks array. If the fragmentEntryLinkRowType is "section", it will remove the whole row (and columns) too.
Parameters:
Name Type Attributes Default Description
layoutData object
fragmentEntryLinkId string
fragmentEntryLinkRowType string <optional>
FRAGMENTS_EDITOR_ROW_TYPES.componentRow
Source:
Returns:
Next layout data
Type
object

_removeLayoutDataItem(state, segmentsExperienceId) → {object}

Parameters:
Name Type Description
state object
Properties
Name Type Description
layoutDataList Array.<{segmentsExperienceId: string}>
segmentsExperienceId string
Source:
Returns:
Type
object

_selectRange(event, nativeEditor)

Place the caret in the click position
Parameters:
Name Type Description
event Event
nativeEditor CKEditor
Source:

_sendEditableValues(fragmentEntryLinkId, changes, dispatch, getState)

Parameters:
Name Type Description
fragmentEntryLinkId string
changes Array.<{path: Array.<string>, content: any}>
dispatch function
getState function
Source:

_setUsedWidgets(state, segmentsExperienceId) → {object}

Parameters:
Name Type Description
state object
segmentsExperienceId string
Source:
Returns:
Type
object

_stopEventPropagation(event)

Parameters:
Name Type Description
event Event
Source:

_storeNewLayoutData(state, segmentsExperienceId, layoutData) → {object}

Stores a the layout data of a new experience in layoutDataList
Parameters:
Name Type Description
state object
Properties
Name Type Description
layoutDataList Array.<{segmentsExperienceId: string}>
layoutData object
defaultSegmentsExperienceId string
segmentsExperienceId string The segmentsExperience id that owns this LayoutData
layoutData string The new LayoutData to store
Source:
Returns:
Type
object

_switchLayoutDataList(state, segmentsExperienceId) → {Promise}

Parameters:
Name Type Description
state object
Properties
Name Type Description
layoutData object
layoutDataList Array.<{segmentsExperienceId: string, layoutData: object}>
segmentsExperienceId string
Source:
Returns:
Type
Promise

_switchLayoutDataToDefault(state) → {object}

Parameters:
Name Type Description
state object
Properties
Name Type Description
layoutDataList Array.<{segmentsExperienceId: string}>
defaultSegmentsExperienceId string
Source:
Returns:
Type
object

_updateEditableValuesErrorAction(fragmentEntryLinkId, editableValues, dateopt) → {object}

Parameters:
Name Type Attributes Default Description
fragmentEntryLinkId string
editableValues object
date Date <optional>
new Date()
Source:
Returns:
Type
object

_updateEditableValuesLoadingAction(fragmentEntryLinkId, editableValues) → {object}

Parameters:
Name Type Description
fragmentEntryLinkId string
editableValues object
Source:
Returns:
Type
object
Parameters:
Name Type Description
state object
segmentsExperienceId string
Source:
Returns:
Type
object

_updateFragmentEntryLinksEditableValues(state, fragmentEntryLinks) → {object}

Updates the fragmentEntryLinks editableValues in State
Parameters:
Name Type Description
state object
Properties
Name Type Description
defaultSegmentsExperienceId string
fragmentEntryLinks object
fragmentEntryLinks string
Source:
Returns:
Type
object

add(arraynon-null, element, positionnon-null) → {Array}

Inserts an element in the given position of a given array and returns a copy of the array
Parameters:
Name Type Description
array Array
element *
position number
Source:
Returns:
Type
Array

addFragmentEntryLinkComment(fragmentEntryLinkId, body)

Parameters:
Name Type Description
fragmentEntryLinkId string
body string
Source:

addFragmentEntryLinkCommentReply(fragmentEntryLinkId, parentCommentId, body)

Parameters:
Name Type Description
fragmentEntryLinkId string
parentCommentId string
body string
Source:

addFragmentEntryLinkReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
type string
fragmentEntryKey string
fragmentEntryLinkType string
fragmentName string
groupId string
Source:
Returns:
Type
object

addMappingAssetEntry(state, action)

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
classNameId string
classPK string
title string
type string
Source:

addPortletReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
instanceable boolean
portletId string
type string
Source:
Returns:
Type
object

addRow(layoutColumns, layoutData, position, fragmentEntryLinkIds, type) → {object}

Returns a new layoutData with the given columns inserted as a new row at the given position
Parameters:
Name Type Description
layoutColumns Array
layoutData object
position number
fragmentEntryLinkIds Array
type string
Source:
Returns:
Type
object

addRowReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
layoutColumns Array
type string
Source:
Returns:
Type
object

addSegmentsExperience(segmentsExperienceId, fragmentEntryLinkIdsopt) → {Promise.<Response>}

Parameters:
Name Type Attributes Default Description
segmentsExperienceId string
fragmentEntryLinkIds Array.<string> <optional>
[]
Source:
Returns:
Type
Promise.<Response>

addStructuredContent(ddmFormValues, ddmStructureId)

Parameters:
Name Type Description
ddmFormValues string
ddmStructureId string
Source:

appendItemToColumn(sourceItem, layoutColumns, targetColumnIndex) → {Array.<object>}

Append an item to a column and returns a new array of columns
Parameters:
Name Type Description
sourceItem object
layoutColumns Array.<object>
targetColumnIndex number
Source:
Returns:
Type
Array.<object>

clearFollowingColumns(layoutColumns, startColumnIndex) → {object}

Removes following columns starting at position indicated by startColumnIndex and returns a new array of columns
Parameters:
Name Type Description
layoutColumns object
startColumnIndex number
Source:
Returns:
Type
object

clearPath(layoutColumns, sourceItem, sourceItemColumnIndex, targetItemPlid) → {object}

Clears path if an active item is moved to another column
Parameters:
Name Type Description
layoutColumns object
sourceItem object
sourceItemColumnIndex number
targetItemPlid string
Source:
Returns:
Type
object

columnIsItemChild(columnIndex, item, itemColumnIndex) → {boolean}

Parameters:
Name Type Description
columnIndex number
item object
itemColumnIndex number
Source:
Returns:
Returns whether a column is child of an item or not
Type
boolean

comparePriority(obj1, obj2) → {number}

Tells if a priority an `obj2` has higher, equal or lower priority than `obj1`. Return values can be 1, 0, or -1
Parameters:
Name Type Description
obj1 object
obj2 object
Source:
Returns:
Type
number

connect(component, store)

Connects a given component to a given store, syncing it's properties with it.
Parameters:
Name Type Description
component Component
store Store
Source:

containsFragmentEntryLinkId(LayoutDataList, fragmentEntryLinkId, skipSegmentsExperienceIdopt) → {boolean}

Tells if a fragmentEntryLink is referenced in any (but the current one) LayoutData inside LayoutDataList
Parameters:
Name Type Attributes Description
LayoutDataList Array.<{segmentsExperienceId: string, layoutData: {structure: Array}}>
fragmentEntryLinkId string
skipSegmentsExperienceId string <optional>
allows to skip searching in layoutData by segmentsExperienceId
Source:
Returns:
Type
boolean

createSegmentsExperienceReducer(state, action) → {Promise}

Parameters:
Name Type Description
state object
Properties
Name Type Description
classNameId string
classPK string
defaultLanguageId string
defaultSegmentsExperienceId string
layoutData Array
layoutDataList Array.<{segmentsExperienceId: string}>
action object
Properties
Name Type Description
segmentsEntryId string
name string
type string
Source:
Returns:
Type
Promise

createSetValueReducer(keyPath) → {function}

Parameters:
Name Type Description
keyPath string | Array.<string>
Source:
Returns:
Type
function

createStore(initialState, reducer, componentIds) → {Store}

Creates a store and links the given components to it. Each component will receive the store as `store` attribute.
Parameters:
Name Type Description
initialState object
reducer function
componentIds Array.<string>
Source:
Returns:
Type
Store

debouncedAlert(callback, delayopt, messageopt) → {function}

Returns a debounced function that will delay it execution until delay has passed. If window is closed or navigation is performed before this delay, an alert will be shown to prevent it from not being executed.
Parameters:
Name Type Attributes Default Description
callback function
delay number <optional>
0
message string <optional>
'Do you want to leave this site...'
Source:
Returns:
Type
function

decodeId(strnon-null)

Decode an id and returns original object
Parameters:
Name Type Description
str string
Source:

deepClone(objectToClone) → {object}

Parameters:
Name Type Description
objectToClone object
Source:
Returns:
Type
object

deleteFragmentEntryLinkComment(commentId)

Parameters:
Name Type Description
commentId string
Source:

deleteFragmentEntryLinkCommentReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
type string
fragmentEntryLinkId string
comment object
Source:
Returns:
Type
object

deleteIn(object, keyPath) → {Array|Object}

Removes the last key in keyPath from the given object and returns a new one
Parameters:
Name Type Description
object Array | Object Original object that will be copied
keyPath Array.<string> Array of strings used for reaching the deep property
Source:
Returns:
Copy of the original object without the last key in keyPath
Type
Array | Object

deleteSegmentsExperienceReducer(state, action) → {Promise}

Parameters:
Name Type Description
state object
Properties
Name Type Description
availableSegmentsExperiences Array
defaultSegmentsExperienceId string
layoutData Object
layoutDataList array
segmentsExperienceId string
action object
Properties
Name Type Description
segmentsExperienceId string
type string
Source:
Returns:
Type
Promise

destroy()

Do nothing, as LiferayItemSelectorDialog is automatically destroyed on hide.
Source:

destroy()

Do nothing, as LiferayItemSelectorDialog is automatically destroyed on hide.
Source:

destroy()

Destroys, if any, an existing instance of AlloyEditor.
Source:

destroy()

Destroys, if any, an existing instance of LiferayFullScreenSourceEditor.
Source:

disableSavingChangesStatusAction() → {object}

Source:
Returns:
Type
object

disconnect(component)

Disconnects a given component from it's store
Parameters:
Name Type Description
component ConnectedComponent
Source:

dropIsValid(layoutColumns, sourceItem, sourceItemColumnIndex, targetId, targetType) → {boolean}

Parameters:
Name Type Description
layoutColumns object
sourceItem object
sourceItemColumnIndex string
targetId string
targetType string
Source:
Returns:
Returns whether a drop is valid or not
Type
boolean

dropItemInsideColumn(layoutColumns, sourceItem, targetColumnIndex) → {object}

Append an item to a column and calculates newParentPlid and priority
Parameters:
Name Type Description
layoutColumns object
sourceItem object
targetColumnIndex number
Source:
Returns:
Type
object

dropItemInsideItem(layoutColumns, sourceItem, sourceItemColumnIndex, pathUpdated, targetItem) → {object}

Inserts an item inside another item's children and calculates new parent plid and priority
Parameters:
Name Type Description
layoutColumns object
sourceItem object
sourceItemColumnIndex number
pathUpdated bollean
targetItem object
Source:
Returns:
Type
object

dropItemNextToItem(layoutColumns, sourceItem, dropPosition, targetItem) → {object}

Insert an item next to another item and calculates new parent plid and priority
Parameters:
Name Type Description
layoutColumns object
sourceItem object
dropPosition string
targetItem object
Source:
Returns:
Type
object
Parameters:
Name Type Description
fragmentEntryLinkId string
Source:
Returns:
Type
Promise.<Response>

duplicateFragmentEntryLinkAction(fragmentEntryLinkId, fragmentEntryLinkRowType)

Parameters:
Name Type Description
fragmentEntryLinkId string
fragmentEntryLinkRowType string
Source:

duplicateFragmentEntryLinkReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkId string
fragmentEntryLinkRowType string
Source:
Returns:
Type
object

editableValuesMigrator(editableValue, defaultSegmentsExperienceKey)

Parameters:
Name Type Description
editableValue object
defaultSegmentsExperienceKey string
Source:

editFragmentEntryLinkComment(commentId, body)

Parameters:
Name Type Description
commentId string
body string
Source:

editSegmentsExperienceReducer(state, action) → {Promise}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
segmentsEntryId string
name string
segmentsExperienceId string
type string
Source:
Returns:
Type
Promise

enableSavingChangesStatusAction() → {object}

Source:
Returns:
Type
object

encodeAssetId(assetnon-null) → {object}

Parameters:
Name Type Description
asset object Asset object
Source:
Returns:
Asset object with encoded id added
Type
object

getActiveEditableElement() → {HTMLElement|null}

Returns the existing editable element or null.
Source:
Returns:
Type
HTMLElement | null

getAssetFieldValue(classNameId, classPK, fieldId)

Parameters:
Name Type Description
classNameId string
classPK string
fieldId string
Source:

getColumn(structure, columnId) → {Object}

Returns the column with the given columnId
Parameters:
Name Type Description
structure Object
columnId string
Source:
Returns:
Type
Object

getColumnActiveItem(layoutColumns, columnIndex) → {string}

Return the active item of a given column
Parameters:
Name Type Description
layoutColumns object
columnIndex number
Source:
Returns:
Type
string

getColumnLastItem(layoutColumns, columnIndex) → {object|undefined}

Get last item of a column
Parameters:
Name Type Description
layoutColumns Array.<object>
columnIndex number
Source:
Returns:
Returns last item or undefined if the column is empty
Type
object | undefined

getConnectedComponent(Component, propertiesopt) → {Component}

HOC that returns a component that connects automatically to a Store parameter.
Parameters:
Name Type Attributes Default Description
Component Component
properties Array.<string> <optional>
[] List of properties to be fetched from store
Source:
Returns:
Type
Component

getConnectedReactComponent(mapStateToProps, mapDispatchToProps) → {object}

Second order function to produce a Connected Component Wrapper
Parameters:
Name Type Description
mapStateToProps function Recieves the state and returns mapped version of it ready for consumption by the Wrapped Component
mapDispatchToProps function Recieves the dispatch and returns a set of component props that use it to call the modify the state tree
Source:
Returns:
Type
object

getContentStructureMappingFields(ddmStructureId)

Parameters:
Name Type Description
ddmStructureId string
Source:

getDropRowPosition(structure, targetRowId, targetBorder) → {number}

Returns the position in the structure of the given row
Parameters:
Name Type Description
structure object
targetRowId number
targetBorder string
Source:
Returns:
Type
number

getElements(itemId, itemType)

Get HTML elements from itemId and itemType in page editor
Parameters:
Name Type Description
itemId string
itemType string
Source:

getEmptyLayoutData() → {object}

Utility to get a layoutData object
Source:
Returns:
Type
object

getExperiencesState(classPK, incomingSegmentId) → {modalState|null}

This function provides an state to restore a desired internal experiences state The state is provided conditionally if there is a modalState stored if the current page matches the one provided by that modalState and if the current url provides a segment id
Parameters:
Name Type Description
classPK string
incomingSegmentId string
Source:
Returns:
Type
modalState | null

getFloatingToolbarButtons(editableValues) → {Array.<object>}

Parameters:
Name Type Description
editableValues object
Source:
Returns:
Floating toolbar panels
Type
Array.<object>

getFloatingToolbarButtons(editableValues) → {Array.<object>}

Parameters:
Name Type Description
editableValues object
Source:
Returns:
Floating toolbar panels
Type
Array.<object>

getFloatingToolbarButtons(editableValues) → {Array.<object>}

Parameters:
Name Type Description
editableValues object
Source:
Returns:
Floating toolbar panels
Type
Array.<object>

getFloatingToolbarButtons(editableValues) → {Array.<object>}

Parameters:
Name Type Description
editableValues object
Source:
Returns:
Floating toolbar panels
Type
Array.<object>

getFloatingToolbarButtons() → {Array.<object>}

Source:
Returns:
Floating toolbar panels
Type
Array.<object>

getFragmentColumn(structure, fragmentEntryLinkId) → {Object}

Returns the column that contains the fragment with the given fragmentEntryLinkId.
Parameters:
Name Type Description
structure Array
fragmentEntryLinkId string
Source:
Returns:
Type
Object

getFragmentEntryLinkContent(renderFragmentEntryURL, fragmentEntryLink, portletNamespace, segmentsExperienceId) → {Promise.<object>}

Parameters:
Name Type Description
renderFragmentEntryURL string
fragmentEntryLink Object
portletNamespace string
segmentsExperienceId number
Source:
Returns:
Type
Promise.<object>

getFragmentRowIndex(structure, fragmentEntryLinkId) → {number}

Returns the row index of a given fragmentEntryLinkId. -1 if it is not present.
Parameters:
Name Type Description
structure Array
fragmentEntryLinkId string
Source:
Returns:
Type
number

getItemColumn(layoutColumns, itemPlid) → {Array.<object>|null}

Get the container column of an item
Parameters:
Name Type Description
layoutColumns Array.<object>
itemPlid string
Source:
Returns:
Type
Array.<object> | null

getItemColumnIndex(layoutColumns, itemPlid) → {number}

Return the index of an item's column
Parameters:
Name Type Description
layoutColumns Array.<object>
itemPlid string
Source:
Returns:
Type
number

getItemMoveDirection(keycode) → {number|null}

Parameters:
Name Type Description
keycode number
Source:
Returns:
Type
number | null

getItemPath(itemId, itemType, structure) → {Array.<{itemId: string, itemType}>}

For a given itemId and itemType, returns an array with the whole path of active elements.
Parameters:
Name Type Description
itemId string | null
itemType string | null
structure Array.<object>
Source:
Returns:
Type
Array.<{itemId: string, itemType}>

getLayoutDataFragmentEntryLinkIds(layoutData) → {Array}

Utility to get a fragment entry links ids from layout data
Parameters:
Name Type Description
layoutData LayoutDataShape
Source:
Returns:
Type
Array

getRowFragmentEntryLinkIds(row) → {Array.<string>}

Get the fragmentEntryLinkIds of the fragments inside the given row
Parameters:
Name Type Description
row Object
Source:
Returns:
Type
Array.<string>

getRowIndex(structure, rowId) → {number}

Returns the index of the row with the given rowId
Parameters:
Name Type Description
structure Array
rowId string
Source:
Returns:
Type
number

getTargetBorder(direction) → {string}

Get target item border from the direction the item is moving in
Parameters:
Name Type Description
direction number
Source:
Returns:
Type
string

getWidget(widgetsnon-null, portletIdnon-null) → {object}

Get widget from the widgets tree by portletId
Parameters:
Name Type Description
widgets Array
portletId string
Source:
Returns:
Type
object

getWidgetPath(widgets, portletId, _pathopt) → {object}

Get widget path from the widgets tree by portletId
Parameters:
Name Type Attributes Default Description
widgets Array.<{categories: Array, portlets: Array}>
portletId string
_path Array.<string> <optional>
['widgets']
Source:
Returns:
Type
object

init(callback, imageSelectorURL, portletNamespace)

Show the image selector dialog and calls the given callback when an image is selected.
Parameters:
Name Type Description
callback function
imageSelectorURL string
portletNamespace string
Source:

init(editableElement, fragmentEntryLinkId, portletNamespace, options, changedCallback, destroyedCallback)

Creates an instance of LiferayFullScreenSourceEditor and destroys the existing one if any.
Parameters:
Name Type Description
editableElement HTMLElement
fragmentEntryLinkId string
portletNamespace string
options Object
changedCallback function
destroyedCallback function
Source:

init(editableElement, fragmentEntryLinkId, portletNamespace, options, changedCallback, destroyedCallback)

Creates an instance of AlloyEditor and destroys the existing one if any.
Parameters:
Name Type Description
editableElement HTMLElement
fragmentEntryLinkId string
portletNamespace string
options Object
changedCallback function
destroyedCallback function
Source:

init(editableElement, fragmentEntryLinkId, portletNamespace, options, changedCallback, destroyedCallback)

Show the image selector dialog and calls the given callback when an image is selected.
Parameters:
Name Type Description
editableElement HTMLElement
fragmentEntryLinkId string
portletNamespace string
options Object
changedCallback function
destroyedCallback function
Source:

initializeDragDrop(dragDropOptions)

Parameters:
Name Type Description
dragDropOptions object
Source:

itemIsInPath(path, itemId, itemType) → {boolean}

Parameters:
Name Type Description
path object
itemId string
itemType string
Source:
Returns:
Item is in path
Type
boolean

itemIsParent(layoutColumns, childItemPlid, parentItemPlid) → {boolean}

Parameters:
Name Type Description
layoutColumns Array.<object>
childItemPlid string
parentItemPlid string
Source:
Returns:
Returns wheter an item is child of a given item
Type
boolean

moveFragmentEntryLinkReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkId string
fragmentEntryLinkRowType string
fragmentEntryLinkType string
targetBorder string
targetItemId string
targetItemType string
type string
Source:
Returns:
Type
object

moveItem(storenon-null, moveItemActionnon-null, moveItemPayloadnon-null)

Dispatches necessary actions to move an item to another position
Parameters:
Name Type Description
store Object Store instance that dispatches the actions
moveItemAction string
moveItemPayload Object Data that is passed to the reducer
Source:

moveItemInside(layoutColumns, pathUpdated, sourceItem, sourceItemColumnIndex, targetItem) → {object}

Insert an item inside another item's children and returns a new array of columns
Parameters:
Name Type Description
layoutColumns object
pathUpdated boolean
sourceItem object
sourceItemColumnIndex number
targetItem object
Source:
Returns:
Type
object

moveRow(direction, rowIndex, store, structure)

Moves a row one position in the given direction
Parameters:
Name Type Description
direction number
rowIndex number
store Object
structure Array
Source:

moveRowReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
rowId string
targetBorder string
targetItemId string
type object
Source:
Returns:
Type
object

openDisplayPageModal()

Opens a modal that will let the user choose the title and the mapping types of a displaoy page.
Parameters:
Name Type Description
param.displayPageName string
param.formSubmitURL string
param.mappingTypes array
param.namespace string
param.spritemap string
param.title string
Source:

prefixSegmentsExperienceId(segmentsExperienceIdopt) → {string}

Returns a prefixed id if the value is not undefined
Parameters:
Name Type Attributes Description
segmentsExperienceId string | number <optional>
Source:
Returns:
Type
string

reducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
type string
Source:
Returns:
Type
object

remove(arraynon-null, positionnon-null) → {Array}

Removes from the given array the element in the given position and returns a new array
Parameters:
Name Type Description
array Array
position number
Source:
Returns:
Type
Array

removeExperience(segmentsExperienceId, fragmentEntryLinkIdsopt) → {Promise.<Response>}

Parameters:
Name Type Attributes Default Description
segmentsExperienceId string
fragmentEntryLinkIds Array.<string> <optional>
[]
Source:
Returns:
Type
Promise.<Response>

removeFragmentEntryLinkAction(fragmentEntryLinkId)

Removes a fragment entry link
Parameters:
Name Type Description
fragmentEntryLinkId string
Source:

removeFragmentEntryLinkReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkId string
type string
Source:
Returns:
Type
object
Parameters:
Name Type Description
fragmentEntryLinkIds Array.<string>
Source:
Returns:
Type
Promise.<Array.<Response>>

removeFragmentEntryLinksAction(fragmentEntryLinks)

Removes a list of fragment entry links
Parameters:
Name Type Description
fragmentEntryLinks array
Source:

removeItem(storenon-null, removeItemActionnon-null, removeItemPayloadnon-null)

Dispatches necessary actions to remove an item
Parameters:
Name Type Description
store Object Store instance that dispatches the actions
removeItemAction string
removeItemPayload Object Data that is passed to the reducer
Source:

removeItem(itemPlid, layoutColumns, targetItemPlid) → {Array.<object>}

Removes an item, if any, from a column and returns a new array of columns
Parameters:
Name Type Description
itemPlid string
layoutColumns Array.<object>
targetItemPlid string
Source:
Returns:
new column array
Type
Array.<object>

removeRowAction(rowId)

Removes a row of the layout data structure
Parameters:
Name Type Description
rowId number
Source:

removeRowReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
rowId string
type string
Source:
Returns:
Type
object

render(element, backgroundImageopt)

Parameters:
Name Type Attributes Default Description
element HTMLElement
backgroundImage object <optional>
{}
Source:

render(content, value) → {string}

Parameters:
Name Type Description
content string editableField's original HTML
value string Translated/segmented value
Source:
Returns:
Transformed content
Type
string

render(content, value) → {string}

Parameters:
Name Type Description
content string editableField's original HTML
value string Translated/segmented value
Source:
Returns:
Transformed content
Type
string

render(content, value, editableValues) → {string}

Parameters:
Name Type Description
content string editableField's original HTML
value string Translated/segmented value
editableValues object values of the element
Source:
Returns:
Transformed content
Type
string

render(content, value, editableValues) → {string}

Parameters:
Name Type Description
content string editableField's original HTML
value object Translated/segmented value
editableValues object values of the element
Source:
Returns:
Transformed content
Type
string

render(content, value) → {string}

Parameters:
Name Type Description
content string editableField's original HTML
value string Translated/segmented value
Source:
Returns:
Transformed content
Type
string

restoreExperiencesState() → {experienceState|null}

Looks for a modalState stored, wipes it and returns it;
Source:
Returns:
Type
experienceState | null

saveChangesReducer(statenon-null, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
lastSaveDate Date
savingChanges boolean
type string
Source:
Returns:
Type
object

selectSegmentsExperienceReducer(state, action) → {Promise}

Parameters:
Name Type Description
state object
Properties
Name Type Description
layoutData object
layoutDataList object
segmentsExperienceId string
action object
Properties
Name Type Description
segmentsExperienceId string
type string
Source:
Returns:
Type
Promise

setActiveItem(layoutColumns, itemPlid) → {object}

Set the item with the given plid as the active item of its column and returns a new layoutColumns
Parameters:
Name Type Description
layoutColumns object
itemPlid string
Source:
Returns:
Type
object

setDraggingItemPosition(event)

Set dragging item's position to mouse coordinates
Parameters:
Name Type Description
event MouseEvent
Source:

setElementPosition(element, xPos, yPos)

Set an element's position to new x and y coordinates
Parameters:
Name Type Description
element HTMLElement
xPos number
yPos number
Source:

setIn(Original, Arraynon-null, value) → {Array|Object}

Recursively inserts a value inside an object creating a copy of the original target. It the object (or any in the path), it's an Array, it will generate new Arrays, preserving the same structure.
Parameters:
Name Type Description
Original Array | Object object that will be copied
Array Array.<string> of strings used for reaching the deep property
value * Value to be inserted
Source:
Returns:
Copy of the original object with the new value
Type
Array | Object

setIn(object, keyPath, value) → {Array|Object}

Recursively inserts a value inside an object creating a copy of the original target. It the object (or any in the path), it's an Array, it will generate new Arrays, preserving the same structure.
Parameters:
Name Type Description
object Array | Object Original object that will be copied
keyPath Array.<string> Array of strings used for reaching the deep property
value * Value to be inserted
Source:
Returns:
Copy of the original object with the new value
Type
Array | Object

setStore(store)

Sets the store
Parameters:
Name Type Description
store object
Source:

shouldUpdateOnChangeProperties(changes, properties) → {boolean}

Returns true if any of the given properties has changed
Parameters:
Name Type Description
changes object
properties Array.<string>
Source:
Returns:
Type
boolean

shouldUpdatePureComponent(changes) → {boolean}

Returns true if any change is different
Parameters:
Name Type Description
changes object
Source:
Returns:
Type
boolean

storeExperiencesState(modalState) → {void}

Stores a given modalState
Parameters:
Name Type Description
modalState object
Properties
Name Type Description
type 'creation' | 'edition'
experienceName string
segmentsExperienceId string
classPK string
Source:
Returns:
Type
void

stripHTML(html) → {string}

Parameters:
Name Type Description
html string Removes HTML from the given text
Source:
Returns:
Plain text
Type
string

syncStoreState(component, store)

Parameters:
Name Type Description
component ConnectedComponent
store Store
Source:

toggleShowResolvedComments()

Toggles the value of showResolvedComments
Source:

toggleShowResolvedCommentsReducer(state) → {object}

Parameters:
Name Type Description
state object
Source:
Returns:
Type
object

updateActiveItemAction(activeItemId, activeItemType, optionsopt)

Updates the active item
Parameters:
Name Type Attributes Default Description
activeItemId string
activeItemType string
options object <optional>
{}
Properties
Name Type Attributes Default Description
appendItem boolean <optional>
false
Source:

updateActiveItemReducer(statenon-null, action) → {object}

Updates active element data with the information sent.
Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
activeItemId string
activeItemType string
appendItem boolean
type string
Source:
Returns:
Type
object

updateDropTargetReducer(statenon-null, action) → {object}

Updates drop target element with the information sent.
Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
dropTargetBorder string
dropTargetItemId string
dropTargetItemType string
type string
Source:
Returns:
Type
object

updateEditableValueContentAction(fragmentEntryLinkId, processor, editableId, content)

Sets the editable value content.
Parameters:
Name Type Description
fragmentEntryLinkId string
processor EDITABLE_FRAGMENT_ENTRY_PROCESSOR | BACKGROUND_IMAGE_FRAGMENT_ENTRY_PROCESSOR
editableId string
content string
Source:

updateEditableValueFieldIdAction(fragmentEntryLinkId, processor, editableId, mapData)

Sets the editable value classNameId, classPK and fieldId.
Parameters:
Name Type Description
fragmentEntryLinkId string
processor EDITABLE_FRAGMENT_ENTRY_PROCESSOR | BACKGROUND_IMAGE_FRAGMENT_ENTRY_PROCESSOR
editableId string
mapData object
Properties
Name Type Description
classNameId string
classPK string
fieldId string
Source:

updateEditableValueMappedFieldAction(fragmentEntryLinkId, processor, editableId, mappedField)

Sets the editable value mappedField.
Parameters:
Name Type Description
fragmentEntryLinkId string
processor EDITABLE_FRAGMENT_ENTRY_PROCESSOR | BACKGROUND_IMAGE_FRAGMENT_ENTRY_PROCESSOR
editableId string
mappedField string
Source:

updateEditableValueReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
type string
fragmentEntryLinkId string
editableValues string
date Date
Source:
Returns:
Type
object

updateEditableValues(fragmentEntryLinkId, editableValues, updateClassedModel) → {Promise.<Response>}

Parameters:
Name Type Default Description
fragmentEntryLinkId string
editableValues object
updateClassedModel boolean true Update classed model(Layout) associated with the fragment entry link
Source:
Returns:
Type
Promise.<Response>

updateFragmentConfigurationAction(fragmentEntryLinkId, configuration)

Parameters:
Name Type Description
fragmentEntryLinkId number
configuration object
Source:

updateFragmentEntryLinkCommentAction(fragmentEntryLinkId, comment)

Adds/updates a given comment
Parameters:
Name Type Description
fragmentEntryLinkId string
comment object
Source:

updateFragmentEntryLinkCommentReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Attributes Description
comment object
fragmentEntryLinkId string
parentCommentId string <optional>
type string
Source:
Returns:
Type
object

updateFragmentEntryLinkCommentReplyAction(fragmentEntryLinkId, parentCommentId, comment)

Adds/updates a given comment reply
Parameters:
Name Type Description
fragmentEntryLinkId string
parentCommentId string
comment object
Source:

updateFragmentEntryLinkConfigReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
config object
editableId string
fragmentEntryLinkId string
type string
Source:
Returns:
Type
object

updateFragmentEntryLinkContent(fragmentEntryLinkId, segmentsExperienceId)

Parameters:
Name Type Description
fragmentEntryLinkId number
segmentsExperienceId number
Source:

updateFragmentEntryLinkContentReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkContent string
fragmentEntryLinkId string
Source:
Returns:
Type
object

updateHoveredItemReducer(state, action) → {object}

Updates hovered element data with the information sent.
Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
hoveredItemId string
hoveredItemType string
type string
Source:
Returns:
Type
object

updateIn(object, keyPath, updater, defaultValueopt) → {Object}

Recursively inserts the value returned from updater inside an object creating a copy of the original target. It the object (or any in the path), it's an Array, it will generate new Arrays, preserving the same structure. Updater receives the previous value or defaultValue and returns a new value.
Parameters:
Name Type Attributes Description
object Array | Object Original object that will be copied
keyPath Array.<string> Array of strings used for reaching the deep property
updater function Update function
defaultValue * <optional>
Default value to be sent to updater function if there is no existing value
Source:
Returns:
Type
Object

updateLastSaveDateAction(dateopt) → {object}

Parameters:
Name Type Attributes Default Description
date Date <optional>
new Date()
Source:
Returns:
Type
object

updatePageContentsAction() → {object}

Source:
Returns:
Type
object

updatePageEditorLayoutData(layoutData, segmentsExperienceId) → {Promise.<Response>}

Parameters:
Name Type Description
layoutData Object
segmentsExperienceId string
Source:
Returns:
Type
Promise.<Response>

updateRowColumnsAction(columns, rowId) → {function}

Parameters:
Name Type Description
columns Array
rowId string
Source:
Returns:
Type
function

updateRowColumnsErrorAction(layoutData) → {object}

Parameters:
Name Type Description
layoutData Array
Source:
Returns:
Type
object

updateRowColumnsLoadingAction(layoutData) → {object}

Parameters:
Name Type Description
layoutData Array
Source:
Returns:
Type
object

updateRowColumnsNumberAction(numberOfColumns, rowId) → {function}

Parameters:
Name Type Description
numberOfColumns number
rowId string
Source:
Returns:
Type
function

updateRowColumnsNumberReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkIdsToRemove Array
layoutData object
type string
Source:
Returns:
Type
object

updateRowColumnsNumberSuccessAction(fragmentEntryLinkIdsToRemove, layoutData) → {object}

Parameters:
Name Type Description
fragmentEntryLinkIdsToRemove Array
layoutData object
Source:
Returns:
Type
object

updateRowConfigReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
config object
rowId string
Source:
Returns:
Type
object

updateSegmentsExperiencePriorityReducer(state, action) → {Promise}

Parameters:
Name Type Description
state object
Properties
Name Type Description
availableSegmentsExperiences Array
action object
Properties
Name Type Description
direction 'up' | 'down'
segmentsExperienceId string
priority number | string
type string
Source:
Returns:
Type
Promise

updateUsedWidgets(widgetsnon-null, {{!Array}) → {Array}

Sets used widgets based on the portletIds array
Parameters:
Name Type Description
widgets Array
{{!Array} portletIds
Source:
Returns:
Type
Array

updateWidgets(state, fragmentEntryLinkId) → {Object}

Parameters:
Name Type Description
state Object
Properties
Name Type Description
fragmentEntryLinks Array.<Object>
widgets Array.<Object>
fragmentEntryLinkId string
Source:
Returns:
Type
Object

updateWigetsReducer(state, action) → {object}

Parameters:
Name Type Description
state object
action object
Properties
Name Type Description
fragmentEntryLinkIds Array
type string
Source:
Returns:
Type
object

Type Definitions

experiencesState

Properties:
Name Type Description
modalState modalState
selectedSegmentsExperienceId string
Source:

experienceState

Properties:
Name Type Description
modalStates object
Properties
Name Type Description
type 'creation' | 'edition'
experienceName string
classPK string
segmentsExperienceId string
selectedSegmentsExpereinceId string
Source:

modalState

Properties:
Name Type Attributes Description
edition Object <optional>
Properties
Name Type Description
name string
segmentsEntryId string
segmentsExperienceId string
creation Object <optional>
Properties
Name Type Description
name string
segmentsEntryId string
segmentsExperienceId string
Source: