@openui5/sap.ui.core
Version:
OpenUI5 Core Library sap.ui.core
1,950 lines (1,701 loc) • 61 kB
JavaScript
/*!
* OpenUI5
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
/**
* Initialization Code and shared classes of library sap.ui.core.
*/
sap.ui.define([
'sap/ui/base/DataType',
'sap/ui/core/Lib',
'sap/ui/core/mvc/ViewType', // provides sap.ui.core.mvc.ViewType
'./CalendarType' // provides sap.ui.core.CalendarType
],
function(DataType, Library, ViewType) {
"use strict";
/**
* The SAPUI5 Core Runtime.
*
* Contains the UI5 Core and all its components, base classes for Controls,
* Components and the Model View Controller classes.
*
* @namespace
* @alias sap.ui.core
* @author SAP SE
* @version 1.111.5
* @since 0.8
* @public
*/
var thisLib = Library.init({
name: "sap.ui.core",
version: "1.111.5",
designtime: "sap/ui/core/designtime/library.designtime",
types: [
// builtin types
"any",
"boolean",
"float",
"int",
"object",
"string",
"void",
// simple types and enums
"sap.ui.core.AbsoluteCSSSize",
"sap.ui.core.AccessibleRole",
"sap.ui.core.AccessibleLandmarkRole",
"sap.ui.core.aria.HasPopup",
"sap.ui.core.BarColor",
"sap.ui.core.BusyIndicatorSize",
"sap.ui.core.CalendarType",
"sap.ui.core.CSSColor",
"sap.ui.core.CSSSize",
"sap.ui.core.CSSSizeShortHand",
"sap.ui.core.Collision",
"sap.ui.core.ComponentLifecycle",
"sap.ui.core.Design",
"sap.ui.core.Dock",
"sap.ui.core.HorizontalAlign",
"sap.ui.core.ID",
"sap.ui.core.IconColor",
"sap.ui.core.ImeMode",
"sap.ui.core.IndicationColor",
"sap.ui.core.MessageType",
"sap.ui.core.OpenState",
"sap.ui.core.Orientation",
"sap.ui.core.Percentage",
"sap.ui.core.Priority",
"sap.ui.core.ScrollBarAction",
"sap.ui.core.Scrolling",
"sap.ui.core.SortOrder",
"sap.ui.core.TextAlign",
"sap.ui.core.TextDirection",
"sap.ui.core.TitleLevel",
"sap.ui.core.URI",
"sap.ui.core.ValueState",
"sap.ui.core.VerticalAlign",
"sap.ui.core.Wrapping",
"sap.ui.core.InvisibleMessageMode",
"sap.ui.core.dnd.DropEffect",
"sap.ui.core.dnd.DropLayout",
"sap.ui.core.dnd.DropPosition",
"sap.ui.core.mvc.ViewType",
"sap.ui.core.routing.HistoryDirection"
],
interfaces: [
"sap.ui.core.IShrinkable",
"sap.ui.core.Label",
"sap.ui.core.PopupInterface",
"sap.ui.core.Toolbar",
"sap.ui.core.IContextMenu",
"sap.ui.core.IFormContent",
"sap.ui.core.dnd.IDragInfo",
"sap.ui.core.dnd.IDropInfo",
"sap.ui.core.IDScope",
"sap.ui.core.ITitleContent",
"sap.ui.core.IAsyncContentCreation",
"sap.ui.core.IPlaceholderSupport",
"sap.ui.core.IColumnHeaderMenu"
],
controls: [
"sap.ui.core.ComponentContainer",
"sap.ui.core.Control",
"sap.ui.core.HTML",
"sap.ui.core.Icon",
"sap.ui.core.InvisibleText",
"sap.ui.core.LocalBusyIndicator",
"sap.ui.core.ScrollBar",
"sap.ui.core.TooltipBase",
"sap.ui.core.XMLComposite",
"sap.ui.core.mvc.HTMLView",
"sap.ui.core.mvc.JSONView",
"sap.ui.core.mvc.JSView",
"sap.ui.core.mvc.TemplateView",
"sap.ui.core.mvc.View",
"sap.ui.core.mvc.XMLView",
"sap.ui.core.tmpl.DOMElement",
"sap.ui.core.tmpl.TemplateControl",
"sap.ui.core.util.Export"
],
elements: [
"sap.ui.core.CustomData",
"sap.ui.core.Element",
"sap.ui.core.Item",
"sap.ui.core.LayoutData",
"sap.ui.core.ListItem",
"sap.ui.core.Message",
"sap.ui.core.SeparatorItem",
"sap.ui.core.Title",
"sap.ui.core.VariantLayoutData",
"sap.ui.core.dnd.DragDropBase",
"sap.ui.core.dnd.DragInfo",
"sap.ui.core.dnd.DropInfo",
"sap.ui.core.dnd.DragDropInfo",
"sap.ui.core.search.OpenSearchProvider",
"sap.ui.core.search.SearchProvider",
"sap.ui.core.tmpl.DOMAttribute",
"sap.ui.core.util.ExportCell",
"sap.ui.core.InvisibleMessage"
],
extensions: {
"sap.ui.support" : {
diagnosticPlugins: [
"sap/ui/core/support/plugins/TechInfo",
"sap/ui/core/support/plugins/ControlTree",
"sap/ui/core/support/plugins/Debugging",
"sap/ui/core/support/plugins/Trace",
"sap/ui/core/support/plugins/Selector",
"sap/ui/core/support/plugins/Breakpoint",
"sap/ui/core/support/plugins/ViewInfo",
"sap/ui/core/support/plugins/LocalStorage",
"sap/ui/core/support/plugins/Interaction",
"sap/ui/core/support/plugins/Performance"
],
//Configuration used for rule loading of Support Assistant
publicRules:true,
internalRules:true
}
}
});
/**
* @classdesc A string type that represents non-relative CSS size values.
*
* This is a subtype of the <code>'<length> type'</code> defined in the CSS specifications.
* Allowed values are only absolute CSS sizes like "1px" or "2em". Percentage
* sizes like "50%" and the special values "auto" and "inherit" are
* NOT allowed. Mathematical expressions using the CSS3 <code>calc(<i>expression</i>)</code> operator
* are allowed as long as they do not use percentage sizes.
*
* Note that CSS might not allow all these values for every CSS property representing a size.
* So even if a value is accepted by <code>sap.ui.core.AbsoluteCSSSize</code>, it still might have no effect
* in a specific context. In other words: UI5 controls usually don't extend the range of allowed
* values in CSS.
*
*
* <b>Units</b>
*
* Valid font-relative units are <code>em, ex</code> and <code>rem</code>. Supported absolute units
* are <code>cm, mm, in, pc, pt</code> and <code>px</code>. Other units are not supported.
*
*
* <b>Mathematical Expressions</b>
*
* Expressions inside the <code>calc()</code> operator are only roughly checked for validity.
* Not every value that this type accepts is a valid expression in the sense of the CSS spec.
* But vice versa, any expression that is valid according to the spec should be accepted by this type.
* The current implementation is based on the
* {@link http://dev.w3.org/csswg/css-values-3/#calc-syntax CSS3 Draft specification from 22 April 2015}.
*
* Noteworthy details:
* <ul>
* <li>whitespace is mandatory around a '-' or '+' operator and optional otherwise</li>
* <li>parentheses are accepted but not checked for being balanced (a restriction of regexp based checks)</li>
* <li>semantic constraints like type restrictions are not checked</li>
* </ul>
*
* Future versions of UI5 might check <code>calc()</code> expressions in more detail, so applications should
* not assume that a value, that is invalid according to the CSS spec but currently accepted by this type
* still will be accepted by future versions of this type.
*
* @final
* @namespace
* @public
*/
thisLib.AbsoluteCSSSize = DataType.createType('sap.ui.core.AbsoluteCSSSize', {
isValid : function(vValue) {
// Note: the following regexp by intention is a single regexp literal.
// It could be made much more readable by constructing it out of (reused) sub-expressions (strings)
// but this would not be parseable by the metamodel recovery tooling that is used inside SAP
return /^([-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC])?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC])?)))*\s*(\)\s*)*\))$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* Defines the accessible roles for ARIA support. This enumeration is used with the AccessibleRole control property.
* For more information, goto "Roles for Accessible Rich Internet Applications (WAI-ARIA Roles)" at the www.w3.org homepage.
*
* @enum {string}
* @public
*/
thisLib.AccessibleRole = {
/**
* A message with an alert or error information.
*
* @public
*/
Alert : "Alert",
/**
* A separate window with an alert or error information.
*
* @public
*/
AlertDialog : "AlertDialog",
/**
* A software unit executing a set of tasks for the user.
* @public
*/
Application : "Application",
/**
* Usually defined as the advertisement at the top of a web page.
* The banner content typically contains the site or company logo, or other key advertisements.
*
* @public
*/
Banner : "Banner",
/**
* Allows user-triggered actions.
*
* @public
*/
Button : "Button",
/**
* A control that has three possible values: true, false, mixed.
* @public
*/
Checkbox : "Checkbox",
/**
* A table cell containing header information for a column.
* @public
*/
ColumnHeader : "ColumnHeader",
/**
* Allows selecting an item from a list, or to enter data directly in the input field.
* @public
*/
Combobox : "Combobox",
/**
* Information about the content on the page. Examples are footnotes, copyrights, or links to privacy statements.
*
* @public
*/
ContentInfo : "ContentInfo",
/**
* The content of the associated element represents a definition.
* If there is a definition element within the content, this one represents the term being defined.
*
* @public
*/
Definition : "Definition",
/**
* Descriptive content for a page element.
* @public
*/
Description : "Description",
/**
* A small window that is designed to interrupt the current application processing
* in order to inform the user and to get some response.
* @public
*/
Dialog : "Dialog",
/**
* A list of references to members of a single group.
*
* @public
*/
Directory : "Directory",
/**
* Content that contains related information, such as a book.
* @public
*/
Document : "Document",
/**
* Contains cells of tabular data arranged in rows and columns, for example in a table.
* @public
*/
Grid : "Grid",
/**
* A table cell in a grid where the cells can be active, editable, and selectable.
* Cells may have functional relationships to controls, for example.
* @public
*/
GridCell : "GridCell",
/**
* A section of user interface objects.
* @public
*/
Group : "Group",
/**
* A heading for a section of the page.
* @public
*/
Heading : "Heading",
/**
* A container for a collection of elements that form an image.
* @public
*/
Img : "Img",
/**
* An interactive reference to a resource.
* @public
*/
Link : "Link",
/**
* A container for non-interactive list items which are the children of the list.
* @public
*/
List : "List",
/**
* A widget that allows the user to select one or more items from a list.
* The items within the list are static and can contain images.
* @public
*/
Listbox : "Listbox",
/**
* A single item in a list.
* @public
*/
ListItem : "ListItem",
/**
* An area where new information is added, or old information disappears.
* Information types are chat logs, messaging, or error logs, for example.
* The log contains a sequence: New information is always added to the end of the log.
* @public
*/
Log : "Log",
/**
* Defines the main content of a document.
*
* @public
*/
Main : "Main",
/**
* Is used to scroll text across the page.
*
* @public
*/
Marquee : "Marquee",
/**
* Offers a list of choices to the user.
*
* @public
*/
Menu : "Menu",
/**
* A container for menu items where each item may activate a submenu.
*
* @public
*/
Menubar : "Menubar",
/**
* A child in a menu.
* @public
*/
MenuItem : "MenuItem",
/**
* A checkable menu item (tri-state).
* @public
*/
MenuItemCheckbox : "MenuItemCheckbox",
/**
* A menu item which is part of a group of menuitemradio roles.
* @public
*/
MenuItemRadio : "MenuItemRadio",
/**
* A collection of links suitable for use when navigating the document or related documents.
* @public
*/
Navigation : "Navigation",
/**
* The content is parenthetic or ancillary to the main content of the resource.
* @public
*/
Note : "Note",
/**
* A selectable item in a list represented by a select.
*
* @public
*/
Option : "Option",
/**
* An element whose role is presentational does not need to be mapped to the accessibility API.
* @public
*/
Presentation : "Presentation",
/**
* Shows the execution progress in applications providing functions that take a long time.
* @public
*/
ProgressBar : "ProgressBar",
/**
* An option in single-select list. Only one radio control in a radiogroup can be selected at the same time.
*
* @public
*/
Radio : "Radio",
/**
* A group of radio controls.
* @public
*/
RadioGroup : "RadioGroup",
/**
* A large section on the web page.
* @public
*/
Region : "Region",
/**
* A row of table cells.
* @public
*/
Row : "Row",
/**
* A table cell containing header information for a row.
* @public
*/
RowHeader : "RowHeader",
/**
* A search section of a web document. In many cases, this is a form used to submit search requests about the site,
* or a more general Internet wide search service.
* @public
*/
Search : "Search",
/**
* A unique section of the document. In the case of a portal, this may include time display, weather forecast,
* or stock price.
* @public
*/
Secondary : "Secondary",
/**
* Indicates that the element contains content that is related to the main content of the page.
* @public
*/
SeeAlso : "SeeAlso",
/**
* A line or bar that separates sections of content.
* @public
*/
Separator : "Separator",
/**
* A user input where the user selects an input in a given range. This form of range expects an analogous keyboard
* interface.
* @public
*/
Slider : "Slider",
/**
* Allows users to select a value from a list of given entries where exactly one value is displayed at runtime, and
* the other ones can be displayed by scrolling using the arrow up and arrow down key.
*
* @public
*/
SpinButton : "SpinButton",
/**
* A container for processing advisory information.
* @public
*/
Status : "Status",
/**
* A header for a tab panel.
* @public
*/
Tab : "Tab",
/**
* A list of tabs which are references to tab panels.
*
* @public
*/
Tablist : "Tablist",
/**
* A container for the resources associated with a tab.
* @public
*/
Tabpanel : "Tabpanel",
/**
* Inputs that allow free-form text as their value.
* @public
*/
Textbox : "Textbox",
/**
* A numerical counter which indicates an amount of elapsed time from a start point,
* or of the time remaining until a certain end point.
* @public
*/
Timer : "Timer",
/**
* A collection of commonly used functions represented in compact visual form.
* @public
*/
Toolbar : "Toolbar",
/**
* A popup that displays a description for an element when the user passes over or rests on that element.
* Supplement to the normal tooltip processing of the user agent.
*
* @public
*/
Tooltip : "Tooltip",
/**
* A form of a list (tree) having groups (subtrees) inside groups (subtrees), where the sub trees can be collapsed and expanded.
*
* @public
*/
Tree : "Tree",
/**
* A grid whose rows are expandable and collapsable in the same manner as the ones of trees.
* @public
*/
TreeGrid : "TreeGrid",
/**
* A tree node
* @public
*/
TreeItem : "TreeItem"
};
/**
* Defines the accessible landmark roles for ARIA support. This enumeration is used with the AccessibleRole control property.
* For more information, go to "Roles for Accessible Rich Internet Applications (WAI-ARIA Roles)" at the www.w3.org homepage.
*
* @enum {string}
* @public
*/
thisLib.AccessibleLandmarkRole = {
/**
* No explicit role is applicable.
*
* The interpretation of this value depends on the control / element which defines a property with this type.
* Normally this value means that no accessible landmark should be written.
*
* @public
*/
None : "None",
/**
* Represents the ARIA role <code>banner</code>.
*
* A banner usually appears at the top of the page and typically spans the full width.
*
* @public
*/
Banner : "Banner",
/**
* Represents the ARIA role <code>main</code>.
*
* The main content of a page.
*
* @public
*/
Main : "Main",
/**
* Represents the ARIA role <code>region</code>.
*
* A section of a page, that is important enough to be included in a page summary or table of contents.
*
* @public
*/
Region : "Region",
/**
* Represents the ARIA role <code>navigation</code>.
*
* A region that contains a collection of items and objects that, as a whole, combine to create a navigation facility.
*
* @public
*/
Navigation : "Navigation",
/**
* Represents the ARIA role <code>search</code>.
*
* A region that contains a collection of items and objects that, as a whole, combine to create a search facility.
*
* @public
*/
Search : "Search",
/**
* Represents the ARIA role <code>complementary</code>.
*
* A section of the page, designed to be complementary to the main content at a similar level in the DOM hierarchy.
*
* @public
*/
Complementary : "Complementary",
/**
* Represents the ARIA role <code>form</code>.
*
* A region that contains a collection of items and objects that, as a whole, combine to create a form.
*
* @public
*/
Form : "Form",
/**
* Represents the ARIA role <code>contentinfo</code>.
*
* A region that contains information about the content on the page.
*
* @public
*/
ContentInfo : "ContentInfo"
};
thisLib.aria = thisLib.aria || {};
/**
* Types of popups to set as aria-haspopup attribute.
* Most of the values (except "None") of the enumeration are taken from the ARIA specification:
* https://www.w3.org/TR/wai-aria/#aria-haspopup
*
* @enum {string}
* @public
* @since 1.84
*/
thisLib.aria.HasPopup = {
/**
* None - the aria-haspopup attribute will not be rendered.
* @public
*/
None : "None",
/**
* Menu popup type.
* @public
*/
Menu : "Menu",
/**
* ListBox popup type.
* @public
*/
ListBox : "ListBox",
/**
* Tree popup type.
* @public
*/
Tree : "Tree",
/**
* Grid popup type.
* @public
*/
Grid : "Grid",
/**
* Dialog popup type.
* @public
*/
Dialog : "Dialog"
};
/**
* The object contains accessibility information for a control.
*
* @typedef {object} sap.ui.core.AccessibilityInfo
*
* @property {string} [role]
* The WAI-ARIA role which is implemented by the control.
* @property {string} [type]
* A translated text that represents the control type. Might correlate with the role.
* @property {string} [description]
* Describes the most relevant control state (e.g. the input's value) - it should be a translated text.
* <b>Note:</b> The type and the enabled/editable state shouldn`t be handled here.
* @property {boolean} [focusable]
* Whether the control can get the focus.
* @property {boolean | null} [enabled]
* Whether the control is enabled. If not relevant, it shouldn`t be set or <code>null</code> can be provided.
* @property {boolean | null} [editable]
* Whether the control is editable. If not relevant, it shouldn`t be set or <code>null</code> can be provided.
* @property {boolean | null} [readonly]
* Whether the control is readonly. If not relevant, it shouldn`t be set or <code>null</code> can be provided.
* @property {sap.ui.core.Element[]} [children]
* A list of elements or controls that are aggregated by the given control (e.g. when the control is a layout).
* Primitive values in the list will be ignored.
* <b>Note:</b> Children should only be provided when it is helpful to understand the accessibility context
* (e.g. a form control shouldn`t provide details of its internals (fields, labels, ...) but a layout should).
* @protected
* @since 1.110
*/
/**
* The object contains focus information for input controls.
*
* @typedef {object} sap.ui.core.FocusInfo
*
* @property {string} [id]
* The ID of the focused control.
* @property {int} [cursorPos]
* The position of the cursor.
* @property {int} [selectionStart]
* The start position of selection.
* @property {int} [selectionEnd]
* The end position of selection.
* @property {boolean | undefined} [preventScroll]
* Prevents scrolling.
* @protected
* @since 1.111
*/
/**
* Configuration options for the colors of a progress bar.
*
* @enum {string}
* @public
*/
thisLib.BarColor = {
/**
* Color: blue (#b8d0e8)
* @public
*/
NEUTRAL : "NEUTRAL",
/**
* Color: green (#b5e7a8)
* @public
*/
POSITIVE : "POSITIVE",
/**
* Color: yellow (#faf2b0)
* @public
*/
CRITICAL : "CRITICAL",
/**
* Color: red (#ff9a90)
* @public
*/
NEGATIVE : "NEGATIVE"
};
/**
* Configuration options for the <code>BusyIndicator</code> size.
*
* @enum {string}
* @public
*/
thisLib.BusyIndicatorSize = {
/**
* Type: automatic size detection
* @public
*/
Auto : "Auto",
/**
* Type: small size
* @public
*/
Small : "Small",
/**
* Type: Medium size
* @public
*/
Medium : "Medium",
/**
* Type: Large size
* @public
*/
Large : "Large",
/**
* Type: Medium size, specifically if the BusyIndicator is displayed over a page section
* @public
*/
Section : "Section"
};
// Note: the imported module sap/ui/core/CalendarType already defines the global sap.ui.core.CalendarType,
// this assignment here is only kept as a reminder
// thisLib.CalendarType = CalendarType;
/**
* @classdesc A string type that represents CSS color values (CSS Color Level 3).
*
* <b>Allowed values are:</b>
* <ul>
* <li>Hex colors like <code>#666666</code> or <code>#fff</code>,</li>
* <li>HSL/RGB values with or without transparency, like <code>hsla(90,10%,30%,0.5)</code> or <code>rgb(0,0,0)</code>,</li>
* <li>CSS color names like <code>darkblue</code>, or special values like <code>inherit</code> and <code>transparent</code>,</li>
* <li>an empty string, which has the same effect as setting no color.</li>
* </ul>
* For more information about the CSS Level 3 color specification, see {@link https://www.w3.org/TR/css-color-3/#css-system}.
*
* @final
* @namespace
* @public
*/
thisLib.CSSColor = DataType.createType('sap.ui.core.CSSColor', {
isValid : function(vValue) {
// Note: the following regexp by intention is a single regexp literal.
// It could be made much more readable by constructing it out of (reused) sub-expressions (strings)
// but this would not be parseable by the metamodel recovery tooling that is used inside SAP
return /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})|rgb\(\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*(,\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*){2}\)|rgba\((\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*,){3}\s*(0(\.[0-9]+)?|1(\.0+)?)\s*\)|hsl\(\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\s*(,\s*(([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*){2}\)|hsla\(\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\s*,(\s*(([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*,){2}\s*(0(\.[0-9]+)?|1(\.0+)?)\s*\)|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silverskyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|transparent|inherit|)$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* @classdesc A string type that represents CSS size values.
*
* The CSS specifications calls this the <code>'<length> type'</code>.
* Allowed values are CSS sizes like "1px" or "2em" or "50%". The special values <code>auto</code>
* and <code>inherit</code> are also accepted as well as mathematical expressions using the CSS3
* <code>calc(<i>expression</i>)</code> operator. Furthermore, length units representing a percentage of the
* current viewport dimensions: width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax)
* can also be defined as a CSS size.
*
* Note that CSS does not allow all these values for every CSS property representing a size.
* E.g. <code>padding-left</code> doesn't allow the value <code>auto</code>. So even if a value is
* accepted by <code>sap.ui.core.CSSSize</code>, it still might have no effect in a specific context.
* In other words: UI5 controls usually don't extend the range of allowed values in CSS.
*
*
* <b>Units</b>
*
* Valid font-relative units are <code>em, ex</code> and <code>rem</code>. Viewport relative units
* <code>vw, vh, vmin, vmax</code> are also valid. Supported absolute units are <code>cm, mm, in, pc, pt</code>
* and <code>px</code>.Other units are not supported yet.
*
*
* <b>Mathematical Expressions</b>
*
* Expressions inside the <code>calc()</code> operator are only roughly checked for validity.
* Not every value that this type accepts might be a valid expression in the sense of the CSS spec.
* But vice versa, any expression that is valid according to the spec should be accepted by this type.
* The current implementation is based on the
* {@link http://dev.w3.org/csswg/css-values-3/#calc-syntax CSS3 Draft specification from 22 April 2015}.
*
* Noteworthy details:
* <ul>
* <li>whitespace is mandatory around a '-' or '+' operator and optional otherwise</li>
* <li>parentheses are accepted but not checked for being balanced (a restriction of regexp based checks)</li>
* <li>semantic constraints like type restrictions are not checked</li>
* </ul>
*
* Future versions of UI5 might check <code>calc()</code> expressions in more detail, so applications should
* not assume that a value, that is invalid according to the CSS spec but currently accepted by this type
* still will be accepted by future versions of this type.
*
* @final
* @namespace
* @public
*/
thisLib.CSSSize = DataType.createType('sap.ui.core.CSSSize', {
isValid : function(vValue) {
// Note: the following regexp by intention is a single regexp literal.
// It could be made much more readable by constructing it out of (reused) sub-expressions (strings)
// but this would not be parseable by the metamodel recovery tooling that is used inside SAP
return /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|[vV][wW]|[vV][hH]|[vV][mM][iI][nN]|[vV][mM][aA][xX]|%))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|[vV][wW]|[vV][hH]|[vV][mM][iI][nN]|[vV][mM][aA][xX]|%)?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|[vV][wW]|[vV][hH]|[vV][mM][iI][nN]|[vV][mM][aA][xX]|%)?)))*\s*(\)\s*)*\))$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* @classdesc This type checks the short hand form of a margin or padding definition.
*
* E.g. "1px 1px" or up to four CSSSize values are allowed or tHe special keyword <code>inherit</code>.
*
*
* @since 1.11.0
* @final
* @namespace
* @public
*/
thisLib.CSSSizeShortHand = DataType.createType('sap.ui.core.CSSSizeShortHand', {
isValid : function(vValue) {
// Note: the following regexp by intention is a single regexp literal.
// It could be made much more readable by constructing it out of (reused) sub-expressions (strings)
// but this would not be parseable by the metamodel recovery tooling that is used inside SAP
return /^(inherit|(auto|[-+]?(0*|(\d+|\d*\.\d+)([eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))){1}(\s(auto|[-+]?(0*|(\d+|\d*\.\d+)([eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)))){0,3})$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* @classdesc Collision behavior: horizontal/vertical.
*
* Defines how the position of an element should be adjusted in case it overflows the window in some direction.
* For both directions this can be "flip", "fit", "flipfit" or "none".
* If only one behavior is provided it is applied to both directions.
*
* Examples: "flip", "fit none", "flipfit fit"
*
* @final
* @namespace
* @public
*/
thisLib.Collision = DataType.createType('sap.ui.core.Collision', {
isValid : function(vValue) {
return /^((flip|fit|flipfit|none)( (flip|fit|flipfit|none))?)$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* Font design for texts.
*
* @enum {string}
* @public
*/
thisLib.Design = {
/**
* Standard font
* @public
*/
Standard : "Standard",
/**
* Mono space font
* @public
*/
Monospace : "Monospace"
};
/**
* @classdesc Docking position: horizontal/vertical.
*
* Defines a position on the element which is used for aligned positioning of another element (e.g. the left top
* corner of a popup is positioned at the left bottom corner of the input field). For the horizontal position possible values
* are "begin", "left", "center", "right" and "end", where left/right always are left and right, or begin/end which are
* dependent on the text direction. For the vertical position possible values are "top", "center" and "bottom".
* Examples: "left top", "end bottom", "center center".
*
* @final
* @namespace
* @public
*/
thisLib.Dock = DataType.createType('sap.ui.core.Dock', {
isValid : function(vValue) {
return /^((begin|left|center|right|end) (top|center|bottom))$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* Configuration options for horizontal alignments of controls.
*
* @enum {string}
* @public
*/
thisLib.HorizontalAlign = {
/**
* Locale-specific positioning at the beginning of the line
* @public
*/
Begin : "Begin",
/**
* Locale-specific positioning at the end of the line
* @public
*/
End : "End",
/**
* Hard option for left alignment
* @public
*/
Left : "Left",
/**
* Hard option for right alignment
* @public
*/
Right : "Right",
/**
* Centered alignment of text
* @public
*/
Center : "Center"
};
/**
* @classdesc A string type representing an ID or a name.
*
* Allowed is a sequence of characters (capital/lowercase), digits, underscores, dashes, points and/or colons.
* It may start with a character or underscore only.
*
* @final
* @namespace
* @public
*/
thisLib.ID = DataType.createType('sap.ui.core.ID', {
isValid : function(vValue) {
return /^([A-Za-z_][-A-Za-z0-9_.:]*)$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* Interface for the controls which are suitable to shrink.
*
* This means the control should still look fine when it gets smaller than its normal size,
* e.g. Text controls which can show ellipsis in case of shrink.
*
* Note: This marker interface can be implemented by controls to give a hint to the container.
* The control itself does not need to implement anything. A parent control that respects this interface
* will apply the "flex-shrink" as a CSS property which determines how much the item will shrink relative
* to the rest of the items in the container when negative free space is distributed.
*
* @since 1.26
* @name sap.ui.core.IShrinkable
* @interface
* @public
*/
/**
* Semantic Colors of an icon.
*
* @enum {string}
* @public
*/
thisLib.IconColor = {
/**
* Default color (brand color)
* @public
*/
Default : "Default",
/**
* Positive color
* @public
*/
Positive : "Positive",
/**
* Negative color
* @public
*/
Negative : "Negative",
/**
* Critical color
* @public
*/
Critical : "Critical",
/**
* Neutral color.
* @public
*/
Neutral : "Neutral",
/**
* Contrast color.
* @public
*/
Contrast : "Contrast",
/**
* Color that indicates an icon which isn't interactive
* @public
* @since 1.76
*/
NonInteractive : "NonInteractive",
/**
* Color for icon used in a Tile
* @public
* @since 1.76
*/
Tile : "Tile",
/**
* Color for icon used as a marker
* @public
* @since 1.76
*/
Marker : "Marker"
};
/**
* State of the Input Method Editor (IME) for the control.
*
* Depending on its value, it allows users to enter and edit for example Chinese characters.
*
* @enum {string}
* @public
*/
thisLib.ImeMode = {
/**
* The value is automatically computed by the user agent.
* @public
*/
Auto : "Auto",
/**
* IME is used for entering characters.
* @public
*/
Active : "Active",
/**
* IME is not used for entering characters.
* @public
*/
Inactive : "Inactive",
/**
* IME is disabled.
* @public
*/
Disabled : "Disabled"
};
/**
* Marker interface for controls which are suitable for use as label.
*
* @name sap.ui.core.Label
* @interface
* @public
*/
/**
* Colors to highlight certain UI elements.
*
* In contrast to the <code>ValueState</code>, the semantic meaning must be defined by the application.
*
* @enum {string}
* @public
* @since 1.62.0
* @see {@link fiori:/how-to-use-semantic-colors/ Semantic Colors}
*/
thisLib.IndicationColor = {
/**
* Indication Color 1
* @public
*/
Indication01 : "Indication01",
/**
* Indication Color 2
* @public
*/
Indication02 : "Indication02",
/**
* Indication Color 3
* @public
*/
Indication03 : "Indication03",
/**
* Indication Color 4
* @public
*/
Indication04 : "Indication04",
/**
* Indication Color 5
* @public
*/
Indication05 : "Indication05",
/**
* Indication Color 6
* @public
* @since 1.75
*/
Indication06 : "Indication06",
/**
* Indication Color 7
* @public
* @since 1.75
*/
Indication07 : "Indication07",
/**
* Indication Color 8
* @public
* @since 1.75
*/
Indication08 : "Indication08"
};
/**
* Defines the different message types.
*
* @enum {string}
* @public
* @since 1.10
*/
thisLib.MessageType = {
/**
* Message should be just an information
* @public
*/
Information : "Information",
/**
* Message is a warning
* @public
*/
Warning : "Warning",
/**
* Message is an error
* @public
*/
Error : "Error",
/**
* Message has no specific level
* @public
*/
None : "None",
/**
* Message is a success message
* @public
*/
Success : "Success"
};
/**
* Defines the different possible states of an element that can be open or closed and does not only
* toggle between these states, but also spends some time in between (e.g. because of an animation).
*
* @enum {string}
* @public
*/
thisLib.OpenState = {
/**
* Open and currently not changing states.
* @public
*/
OPEN : "OPEN",
/**
* Closed and currently not changing states.
* @public
*/
CLOSED : "CLOSED",
/**
* Already left the CLOSED state, is not OPEN yet, but in the process of getting OPEN.
* @public
*/
OPENING : "OPENING",
/**
* Still open, but in the process of going to the CLOSED state.
* @public
*/
CLOSING : "CLOSING"
};
/**
* Orientation of a UI element.
*
* @enum {string}
* @public
* @since 1.22
*/
thisLib.Orientation = {
/**
* Arrange Horizontally
* @public
*/
Horizontal : "Horizontal",
/**
* Arrange Vertically
* @public
*/
Vertical : "Vertical"
};
/**
* @classdesc A string type that represents a percentage value.
*
* @final
* @namespace
* @public
*/
thisLib.Percentage = DataType.createType('sap.ui.core.Percentage', {
isValid : function(vValue) {
return /^([0-9][0-9]*(\.[0-9]+)?%)$/.test(vValue);
}
},
DataType.getType('string')
);
/**
* Priorities for general use.
*
* @enum {string}
* @public
*/
thisLib.Priority = {
/**
* Default, none priority
* @public
*/
None: "None",
/**
* Low priority
* @public
*/
Low: "Low",
/**
* Medium priority
* @public
*/
Medium: "Medium",
/**
* High priority
* @public
*/
High: "High"
};
/**
* Marker interface for controls that are not rendered "embedded" into other controls but need to be opened/closed.
*
* Such controls are handled differently during rendering.
*
* @since 1.19.0
* @name sap.ui.core.PopupInterface
* @interface
* @public
*/
/**
* Actions are: Click on track, button, drag of thumb, or mouse wheel click.
*
* @enum {string}
* @public
*/
thisLib.ScrollBarAction = {
/**
* Single step scrolling caused by clicking an arrow button or arrow key.
* @public
*/
Step : "Step",
/**
* Range scrolling caused by clicking track area or using page up or page down key.
* @public
*/
Page : "Page",
/**
* Scrolling done by mouse wheel
* @public
*/
MouseWheel : "MouseWheel",
/**
* Scrolling done by dragging the scroll bar's paint thumb
* @public
*/
Drag : "Drag"
};
/**
* Defines the possible values for horizontal and vertical scrolling behavior.
*
* @enum {string}
* @public
*/
thisLib.Scrolling = {
/**
* No scroll bar provided even if the content is larger than the available space.
* @public
*/
None : "None",
/**
* A scroll bar is shown if the content requires more space than the given space (rectangle) provides.
* @public
*/
Auto : "Auto",
/**
* A scroll bar is always shown even if the space is large enough for the current content.
* @public
*/
Scroll : "Scroll",
/**
* No scroll bar is shown, and the content stays in the given rectangle.
* @public
*/
Hidden : "Hidden"
};
/**
* Sort order of a column.
*
* @version 1.111.5
* @enum {string}
* @public
* @since 1.61.0
*/
thisLib.SortOrder = {
/**
* Sorting is not applied.
* @public
*/
None : "None",
/**
* Sorting is done in ascending order.
* @public
*/
Ascending : "Ascending",
/**
* Sorting is done in descending order.
* @public
*/
Descending : "Descending"
};
/**
* Configuration options for text alignments.
*
* @enum {string}
* @public
*/
thisLib.TextAlign = {
/**
* Locale-specific positioning at the beginning of the line.
* @public
*/
Begin : "Begin",
/**
* Locale-specific positioning at the end of the line.
* @public
*/
End : "End",
/**
* Hard option for left alignment.
* @public
*/
Left : "Left",
/**
* Hard option for right alignment.
* @public
*/
Right : "Right",
/**
* Centered text alignment.
* @public
*/
Center : "Center",
/**
* Sets no text align, so the browser default is used.
* @public
* @since 1.26.0
*/
Initial : "Initial"
};
/**
* Configuration options for the direction of texts.
*
* @enum {string}
* @public
*/
thisLib.TextDirection = {
/**
* Specifies left-to-right text direction.
* @public
*/
LTR : "LTR",
/**
* Specifies right-to-left text direction.
* @public
*/
RTL : "RTL",
/**
* Inherits the direction from its parent control/container.
* @public
*/
Inherit : "Inherit"
};
/**
* Level of a title.
*
* @enum {string}
* @public
* @since 1.9.1
*/
thisLib.TitleLevel = {
/**
* The level of the title is choosen by the control rendering the title.
* @public
*/
Auto : "Auto",
/**
* The Title is of level 1.
* @public
*/
H1 : "H1",
/**
* The Title is of level 2
* @public
*/
H2 : "H2",
/**
* The Title is of level 3
* @public
*/
H3 : "H3",
/**
* The Title is of level 4
* @public
*/
H4 : "H4",
/**
* The Title is of level 5
* @public
*/
H5 : "H5",
/**
* The Title is of level 6
* @public
*/
H6 : "H6"
};
/**
*
* Marker interface for toolbar controls.
*
*
* @since 1.21.0
* @name sap.ui.core.Toolbar
* @interface
* @public
*/
/**
* Marker interface for subclasses of <code>sap.ui.core.UIComponent</code>.
*
* Implementing this interface allows a {@link sap.ui.core.UIComponent} to be created fully asynchronously.
* This interface will implicitly set the component's rootView and router configuration to async.
* Nested views will also be handled asynchronously.
* Additionally the error handling during the processing of views is stricter and will fail if a view definition contains
* errors, e.g. broken binding strings.
*
* <b>Note:</b> Nested components (via {@link sap.ui.core.ComponentContainer}) are not handled asynchronously by default.
*
* When implementing this interface the {@link sap.ui.core.Component.create Component.create} factory's result Promise
* will resolve once the defined <code>rootView</code> is fully processed.
*
* An asynchronous component can also return a Promise in its {@link sap.ui.core.UIComponent#createContent createContent} function.
* This Promise will also be chained into the {@link sap.ui.core.Component.create Component.create} factory's result Promise.
*
* See {@link sap.ui.core.UIComponent#createContent} for more details and usage samples.
*
* @name sap.ui.core.IAsyncContentCreation
* @interface
* @public
* @since 1.89.0
*/
/**
* Marker interface for container controls.
*
* Implementing this interface allows a container control to display a {@link sap.ui.core.Placeholder}.
* This requires the container control to implement the <code>showPlaceholder</code> and <code>hidePlaceholder</code>
* methods.
*
* Optionally, the <code>needPlaceholder</code> method can be implemented to defined, whether a placeholder is needed or not.
* If implemented, this method must return a <code>boolean</code>. Depending on the return value, <code>showPlaceholder</code>
* will be called or not.
*
* @name sap.ui.core.IPlaceholderSupport
* @interface
* @public
* @since 1.92.0
*/
/**
* Marker interface for controls that can serve as a menu for a table column header.
*
* Implementation of this interface implements the <code>openBy</code> and <code>getAriaHasPopupType</code> methods.
*
* @name sap.ui.core.IColumnHeaderMenu
* @interface
* @public
* @experimental As of version 1.98
* @since 1.98
*
*/
/**
* Opens the menu using the column header.
* @param {sap.ui.core.Control|HTMLElement} oAnchor Specifies the element where the menu is placed.
*
* @public
* @function
* @experimental As of version 1.98
* @since 1.98
* @name sap.ui.core.IColumnHeaderMenu.openBy
*/
/**
* Returns the <code>sap.ui.core.aria.HasPopup<\code> type of the menu.
*
* @returns {sap.ui.core.aria.HasPopup} <code>sap.ui.core.aria.HasPopup<\code> type of the menu
*
* @public
* @function
* @experimental As of version 1.98
* @since 1.98.0
* @name sap.ui.core.IColumnHeaderMenu.getAriaHasPopupType
*/
/**
* Implementing this interface allows a control to be accessible via access keys.
*
* @name sap.ui.core.IAccessKeySupport
* @interface
* @public
* @experimental As of version 1.104
* @since 1.104
*/
/**
* Returns a refence to DOM element to be focused during Access key navigation.
* If not implemented getFocusDomRef() method is used.
*
* @public
* @function
* @experimental As of version 1.104
* @since 1.104
* @name sap.ui.core.IAccessKeySupport.getAccessKeysFocusTarget?
*/
/**
* If implemented called when access keys feature is enabled and highlighting is ongoing
*
* @public
* @function
* @experimental As of version 1.104
* @since 1.104
* @name sap.ui.core.IAccessKeySupport.onAccKeysHighlightStart?
*/
/**
* If implemented called when access keys feature is enabled and highlighting is over
*
* @public
* @function
* @experimental As of version 1.104
* @since 1.104
* @name sap.ui.core.IAccessKeySupport.onAccKeysHighlightEnd?
*/
/**
* Marker interface for controls that can serve as a context menu.
*
* Implementation of this interface should implement the <code>openAsContextMenu</code> method.
*
* @name sap.ui.core.IContextMenu
* @interface
* @public
*/
/**
* Opens the control by given opener ref.
* @param {jQuery.Event | object} oEvent
* An <code>oncontextmenu</code> event object or an object with properties left, top, offsetX, offsetY
* @param {sap.ui.core.Element|HTMLElement} oOpenerRef
* The element which will get the focus back again after the menu was closed
*
* @public
* @function
* @name sap.ui.core.IContextMenu.openAsContextMenu
*/
/**
* Marker interface for drag configuration providing information about the source of the drag operation.
*
* @since 1.52.0
* @name sap.ui.core.dnd.IDragInfo
* @interface
* @public
*/
/**
* Marker interface for drop configuration providing information about the target of the drop operation.
*
* @since 1.52.0
* @name sap.ui.core.dnd.IDropInfo
* @interface
* @public
*/
/**
* Marker interface to flag controls that provide access to substructures from a byId method.
*
* @since 1.56.0
* @name sap.ui.core.IDScope
* @interface
* @private
* @ui5-restricted
*/
/**
* Marker interface for a ControllerExtension.
*
* @since 1.56.0
* @name sap.ui.core.mvc.IControllerExtension
* @interface
* @public
*/
/**
* Marker interface for controls that can be used as content of <code>sap.ui.layout.form.Form</code>
* or <code>sap.ui.layout.form.SimpleForm</code>.
*
* If the control's width must not be adjusted by the <code>Form</code> control to meet the cell's width, the
* control must implement the <code>getFormDoNotAdjustWidth</code> function and return <code>true</code>.
*
* @since 1.48.0
* @name sap.ui.core.IFormContent
* @interface
* @public
*/
/**
*
* Marker interface for controls that can be used in <code>content</code> aggregation of the <code>sap.m.Title</code> control.
*
* @since 1.87
* @name sap.ui.core.ITitleContent
* @interface
* @public
*/
/**
* Whether a control wants to keep its original width even when used in a <code>Form</code>.
*
* In the <code>Form</code> control, all content controls are positioned on a grid cell base. By default,
* the controls use the full width of the used grid cell. But for some controls (like image controls),
* this is not the desired behavior. In this case the control must keep its original width.
*
* This is an optional method. When not defined, the width of the control might be adjusted.
*
* @returns {boolean} true if the <code>Form</code> is not allowed to adjust the width of the control to use the cell's width
* @since 1.48.0
* @public
* @function
* @name sap.ui.core.IFormContent.getFormDoNotAdjustWidth?
*/
/**
* Marker interface for controls that can be used as content of <code>sap.ui.layout.form.SemanticFormElement</code>.
*
* If the value-holding property of the control is not <code>value</code or <code>text</code>, the name of the
* value-holding property must be returned in the <code>getFormValueProperty</code> function.
*
* If the value of the control needs some special output formatting (to show a description instead of a key), this
* formatted text needs to be returned in the <code>getFormFormattedValue</code> function.
*
* @since 1.86.0
* @name sap.ui.core.ISemanticFormContent
* @interface
* @public
* @experimental As of version 1.86
*/
/**
* Returns the formatted value of a control used in a <code>SemanticFormElement</code>.
*
* In the <code>SemanticFormElement</code> element, the assigned fields are rendered in edit mode. In display mode, a text
* is rendered that concatenates the values of all assigned fi