Global

Members

(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) checkInvalidFieldNameCharacter

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) CSS_DDM_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) 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) 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) getEditingValue

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

O normalize value impede que value seja nulo ou undefined. 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 label 2. If the current label is null, use the string Option
Source:

(constant) ReactFieldAdapter

This creates a compatibility layer for the Field component on React, allowing it to be called by Metal+Soy file. This component creates a mask for the Field component, some DDM fields access the `usePage` and we need to bring the `usePage` here since this component will not have a React context above it.
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) 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:

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}

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:

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:

ObserverSubscribe()

Adds a sub observer to maintain the updated state of the component.
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

roundPercentage()

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:

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:

toArray(value)

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