Global

Members

(constant) ActionsProvider

ActionsContext is responsible for store which field is being hovered or active
Source:

(constant) App

Exporting default application to Forms Admin. Only Providers and routing must be defined.
Source:

(constant) AutoSaveProvider

AutoSave performs a periodic routine in minutes to save the current form. Save will only happen if the data on the form changes. Each time the rules are changed, the form is saved.
Source:

(constant) capitalize

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) capitalize

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) COLORS

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) ConfigProvider

A provider to store any configuration or property that has no side effect during the life cycle of the application. Maintaining configuration properties with side effect properties in the same `store` may be rendering unnecessary components that use only configuration properties.
Source:

(constant) context

Context stores all instances of schemas created by key to avoid recreating a new instance of the same Schema in different components.
Source:

(constant) convertValueToJSON

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) createFormURL

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) createReducer

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) dedupValue

Deduplicates the value by checking if there is a value in the fields, always incrementing an integer in front of the value to be friendly for the user.
Source:

(constant) DEFAULT_FIELD_NAME_REGEX

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) FIELD_NAME_REGEX

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) FIELD_TYPE_FIELDSET

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) FormFieldSettings

Render a new form to be used in the Sidebar so that can edit the properties of a field, a new FormProvider is needed to control the reducers of a Field's settingsContext structure.
Source:

(constant) FormFieldSettingsAdapter

This component is temporary and for exclusive use for Sidebar in Metal.js, this creates a form for editing the properties of a field in Form Builder.
Source:

(constant) FormNoopProvider

This is a no-op implementation for the store, a dispatch call will not call any action on the FormProvider and the state will always be the value passed through the value property. This is a temporary implementation that works as an intermediate provider and compatibility layer for the React and Metal.js frontier in FormBuilder. The one who actually causes an action is the LayoutProvider when that component is used. -> Metal.js -> Metal.js -> React.js with Adapter -> React.js ...
Source:

(constant) FormProvider

Form Provider is a "store" that is compatible with the concept of thunk but has no coupling to any specific reducer, the reducers can be configured through the property, as well as configuring the data init function and the initial state. ... Reducers receive the extra config property in addition to state and action, it is mandatory that ConfigProvider be declared before FormProvider. ... FormProvider is built to be composed and can be declared more than once in the application to deal with the same structure in some part of the application tree. The real example is Sidebar, which has the same `pages` structure that needs to be manipulated but is isolated from the application and the main store. <- Main Store <- Isolated state
Source:

(constant) FormView

Exports the default application to render the form for the user.
Source:

(constant) getFormNode

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) INITIAL_PAGES

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) KEYCODES

Mapping to be used to match keyCodes returned from keydown events.
Source:

(constant) LEGACY_EVENTS

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) LegacyFormBuilder

Render a form just for preview without actions/reducer just with FormNoopProvider, this component is for compatibility with the FormBuilder in Metal.js.
Source:

(constant) localDataStorage

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) ManagementToolbar

This is a fake component that only takes advantage of the React lifecycle to manipulate the visibility of the Management Toolbar, it is currently rendered via JSP and it is necessary to control visibility via JavaScript. Creates a simulation that this component is in React and deals with the visibility of elements in the DOM and events such as click.
Source:

(constant) MAPPED_EVENT_TYPES

Event mapping for compatibility with events for the LayoutProvider component.
Source:

(constant) MAX_ITEMS

Maximum number of items to be shown without the Search bar
Source:
This is a fake component that only takes advantage of the React lifecycle to change the React Router route, currently the component is rendered via JSP and it is necessary to control the interaction via JavaScript.
Source:

(constant) normalizeValue

If the value is null or undefined, normalize follows a verification order and the final stage of normalization is to deduplicate the value if necessary. 1. If the current value is null, use the default value that can be the label or the default option name, the parameter generateValueUsingLabel decides which of these two values will be used. 2. If the default value is null, use the string Option.
Source:

(constant) PAGINATION

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) PAGINATION_MODE_MAPPED

Maps the representation of pagination mode in the builder environment in the form view.
Source:

(constant) Report

This is a fake component that only takes advantage of the React lifecycle to manipulate the visibility of the report page, it is currently rendered via JSP and it is necessary to control visibility via JavaScript.
Source:

(constant) RULE

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) setJSONArrayValue

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) setValue

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) SYMBOL_CONTEXT

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) useBack

useBack is a hook that adds middleware to the Back button of the DXP Control Menu to alert the user if there is any change in the form that has not been saved.
Source:

(constant) useDataView

UseDataView creates a representation of the data based on the passed schema otherwise nothing is done. It should not be used directly, it is exposed through `useFormState`.
Source:

(constant) useEvaluate

This hook is a partial function that removes the need to pass the same properties every time they are called, this is only for thunks that use the `evaluate` function.
Source:

(constant) useStateSync

This hook is just a way to save the state in the hidden input of the form to make the submit, this is the same implementation of StateSyncronizer.
Source:

(constant) useStorage

Simple implementation to create a local storage that can be shared independently of the React tree, Form Renderer is not an application and can be reused more than once on the same page, so we need to share requests and fields, they are loaded on demand, so as not to make unnecessary requests. Use the `useStorage` hook as a way to cache data.
Source:

(constant) useSyncValue

Use Sync Value to synchronize the initial value with the current internal value, only update the internal value with the new initial value if the values are different and when the value is not changed for more than ms.
Source:

(constant) VALIDATIONS

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:

Methods

appendValue(options) → {Array}

Appends a new value on the current value state
Parameters:
Name Type Description
options Object
Properties
Name Type Description
value Array | String
valueToBeAppended Array | String
Source:
Returns:
Type
Array

assertOptionParameters()

Some parameters on each option needs to be prepared in case of multiple selected values(when the value state is an array).
Source:

FieldTypeBox()

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:

getColumnLabel()

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:

getConnectedReactComponentAdapter(ReactComponent)

The Adapter creates a communication bridge between the Metal and React components. The Adapter when it is rendered for the first time uses `ReactDOM.render` to assemble the component and subsequent renderings are done by React. We created a tunnel with an Observer that updates the internal state of the component in React that makes a wrapper over the main component to force React to render at the best time, we also ignore the rendering of Metal.
Parameters:
Name Type Description
ReactComponent React.createElement
Source:
Examples
// import getConnectedReactComponentAdapter from '/path/ReactComponentAdapter.es';
//
// const ReactComponent = ({children, className}) => <div className={className}>{children}</div>;
// const ReactComponentAdapter = getConnectedReactComponentAdapter(
//   ReactComponent
// );
//
// In the rendering of Metal
// render() {
//	return (
//		<ReactComponentAdapter className="h1-title">
//			<h1>{'Title'}</h1>
//		</ReactComponentAdapter>
//	);
// }

To call the React component in the context of Metal + soy, where varient is not an option,
you can use Metal's `Soy.register` to create a fake component so that you can call the React
component in Soy. The use of children from Soy components for React does not work.
// import Soy from 'metal-soy';
// import getConnectedReactComponentAdapter from '/path/ReactComponentAdapter.es';
// import templates from './FakeAdapter.soy';
//
// const ReactComponent = ({className}) => <div className={className} />;
// const ReactComponentAdapter = getConnectedReactComponentAdapter(
//   ReactComponent
// );
// Soy.register(ReactComponentAdapter, templates);
//
// In soy
// {call FakeAdapter.render}
//	{param className: 'test' /}
// {/call}

getFieldNameGenerator()

This is a literary copy of the logic of the old LayoutProvider, check the documentation for more details.
Source:

identity()

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:

isDroppingFieldIntoFieldAndSameGroup()

Determines whether are moving the source Field into inside the Field in the same FieldGroup to create another FieldGroup but with only two fields.
Source:

isDroppingFieldIntoSingleField()

Determines whether the source Field is being moved into inside a Field where its parent is a FieldGroup with just that element.
Source:

isFieldGroupMovingIntoItself()

Just check if the Field is a FieldGroup before checking if it is moving into itself. The index of the source and target are added to the loc, at the level where `useDrop` is used it is not visible the loc of the Field being rendered.
Source:

isMovingIntoItself()

Checks whether Field is moving into itself. In conventional mode, we would be visiting all the fields within it to check if the target belongs to the Field root (in this case the source), but this can be very slow depending on the depth and it is very expensive in this hot path instead this method implement heuristic algorithm based on two assumptions: - The target indexes are the same as the source indexes - The target depth is greater than the source The indexes are an Array that contains the index of the Field according to the depth level, the head of the array is the current loc and the tail is the root of the tree. It does not compare all target indexes just up to the same level of depth as the source. [ {pageIndex: 0, rowIndex: 1, columnIndex: 0}, <- Head (deeper) {pageIndex: 0, rowIndex: 0, columnIndex: 0}, {pageIndex: 0, rowIndex: 0, columnIndex: 0}, <- Tail (root) ] The comparison of the indexes also fails in the first index that is not equal to the source index to fail early.
Source:

isStaleRaw()

Compare the values of the properties at the reference level, the properties should only be for readonly, the raw object and props will always be different objects because props contain all the properties of the store but raw only the properties that the schema needs.
Source:

mountStruct()

This only assembles the expected structure of the Forms field event, creates a makeup to maintain compatibility with the mechanism, the fields in React do not need to assemble this structure, they must only provide a native event or value in the case of an onChange
Source:

normalizePages()

NormalizePages deals with manipulations of the Field to change behaviors or fixes something specific to the structure that affects the Field. Called only at application startup, but adds an initial computing load to traverse through all fields on the form as well as nested fields.
Source:

ObserverSubscribe()

Adds a sub observer to maintain the updated state of the component.
Source:

Page()

Renderer is the main component for dealing with Forms `pages` structure, you can use the renderer to render fields from different layouts. Renderer supports some rendering modes by default - multi_pages - paginated - single-page - success - tabbed - wizard You can replace all major components or just a few to change the layout structure, consider the following components - Container - Page - Rows - Row - Column Use the `overrides` API to pass the components you want to replace, an example of Page. children }} />
Source:

Panel()

Alternative component for ClayPanel, since the original component don't have to much flexibility for adding items on the ClayPanel trigger.
Source:

removeValue(options) → {Array}

Removes a value from the value array.
Parameters:
Name Type Description
options Object
Properties
Name Type Description
value Array | String
valueToBeRemoved Array | String
Source:
Returns:
Type
Array

selectText()

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:

StateSync()

Updates the state of the FieldSettings when any value coming from layers above changes.
Source:

toArray(value)

Wraps the given argument into an array.
Parameters:
Name Type Description
value Array | String
Source:

useFormSubmit()

This is a copy of the old implementation made in Metal.js, deals with the submit of the Form in the User View, removes the default behavior of the submit and uses Liferay.Util.submitForm.
Source:

usePropagateAction()

Propagate Action is used in conjunction with useReducer that "listens" for any action in a dispatch call. const [state, dispatch] = usePropagateAction(useReducer(...));
Source:

usePublicAPI()

Exposes methods to manipulate some states within the application in User View through the ref via React and exposed by the Liferay.Component register.
Source:

validator()

The validator only removes properties with the value undefined to allow the initialProps to be added.
Source:

Documentation generated by JSDoc 3.6.3 on Tue Apr 27 2021 16:07:27 GMT-0700 (Pacific Daylight Time)