{
  "name": "select-single",
  "version": "20.0.2",
  "jetVersion": "^20.0.2",
  "pack": "oj-c",
  "type": "composite",
  "dependencyScope": "runtime",
  "license": "https://opensource.org/licenses/UPL",
  "implements": [
    "CSelectSingleElement"
  ],
  "displayName": "Select Single",
  "description": "A select single is a dropdown list that supports single selection and search filtering.",
  "help": "oj-c.SelectSingle.html",
  "main": "oj-c/select-single",
  "status": [
    {
      "type": "supersedes",
      "since": "19.0.0",
      "value": [
        "oj-select-single",
        "oj-combobox-one"
      ]
    }
  ],
  "extension": {
    "catalog": {
      "category": "Forms"
    },
    "vbdt": {
      "module": "oj-c/select-single",
      "defaultColumns": 6,
      "minColumns": 2
    },
    "oracle": {
      "icon": "oj-ux-ico-select",
      "uxSpecs": [
        "select-single-items"
      ]
    },
    "webelement": {
      "package": "@oracle/oraclejet-core-pack",
      "version": "20.0.2",
      "docUrl": "https://www.oracle.com/webfolder/technetwork/jet/cpwdtsdoc/classes/SelectSingleWebElement.html",
      "export": "findSelectSingle",
      "main": "@oracle/oraclejet-core-pack/webdriver"
    }
  },
  "propertyLayout": [
    {
      "propertyGroup": "common",
      "items": [
        "disabled",
        "labelHint",
        "placeholder",
        "readonly",
        "required",
        "virtualKeyboard"
      ]
    },
    {
      "propertyGroup": "data",
      "items": [
        "data",
        "itemText",
        "value",
        "valueItem"
      ]
    }
  ],
  "since": "14.0.0",
  "requirements": [
    {
      "type": "anyOf",
      "label": "accessibility",
      "properties": [
        "labelHint"
      ]
    },
    {
      "type": "not",
      "label": "accessibility",
      "properties": [
        "aria-label",
        "aria-labelledby"
      ]
    }
  ],
  "properties": {
    "addToList": {
      "type": "string",
      "description": "Specifies whether the add to list link is shown in the dropdown when the user filters.",
      "displayName": "Add to List",
      "help": "#addToList",
      "enumValues": [
        "off",
        "on"
      ],
      "value": "off"
    },
    "advancedSearch": {
      "type": "string",
      "description": "Specifies whether the advanced search link is shown in the dropdown when the user filters.",
      "displayName": "Advanced Search",
      "help": "#advancedSearch",
      "enumValues": [
        "off",
        "on"
      ],
      "value": "off"
    },
    "columnSpan": {
      "type": "number",
      "description": "Specifies how many columns this component should span.",
      "displayName": "Column Span",
      "help": "#columnSpan",
      "value": 1
    },
    "containerReadonly": {
      "type": "boolean",
      "description": "Specifies whether an ancestor container, like oj-c-form-layout, is readonly.",
      "displayName": "Container Readonly",
      "help": "#containerReadonly",
      "binding": {
        "consume": {
          "name": "containerReadonly"
        }
      }
    },
    "data": {
      "type": "DataProvider|null",
      "description": "The data source for SelectSingle.",
      "displayName": "Data",
      "help": "#data",
      "extension": {
        "webelement": {
          "exceptionStatus": [
            {
              "type": "deprecated",
              "since": "15.0.0",
              "description": "Data sets from a DataProvider cannot be sent to WebDriverJS; use ViewModels or page variables instead."
            }
          ]
        }
      },
      "value": null
    },
    "disabled": {
      "type": "boolean",
      "description": "Specifies whether the component is disabled.",
      "displayName": "Disabled",
      "help": "#disabled",
      "value": false
    },
    "displayOptions": {
      "type": "object",
      "description": "Display options for auxiliary content that determines whether or not it should be displayed.",
      "displayName": "Display Options",
      "help": "#displayOptions",
      "properties": {
        "messages": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        }
      }
    },
    "help": {
      "type": "object",
      "description": "Form component help information.",
      "displayName": "Help",
      "help": "#help",
      "properties": {
        "instruction": {
          "type": "string",
          "value": ""
        }
      }
    },
    "helpHints": {
      "type": "object",
      "description": "The helpHints object contains a definition property and a source property.",
      "displayName": "Help Hints",
      "help": "#helpHints",
      "properties": {
        "definition": {
          "type": "string",
          "value": ""
        },
        "source": {
          "type": "string",
          "value": ""
        },
        "sourceText": {
          "type": "string"
        }
      }
    },
    "itemText": {
      "type": "string|number|function",
      "description": "Specifies how to get the text string to render for a data item.",
      "displayName": "Item Text",
      "help": "#itemText",
      "required": true
    },
    "labelEdge": {
      "type": "string",
      "description": "Specifies how the label is positioned for the component",
      "displayName": "Label Edge",
      "help": "#labelEdge",
      "propertyEditorValues": {
        "inside": {
          "description": "The label floats over the input element, but moves up on focus or when the component has a value (default, if unspecified).",
          "displayName": "Inside"
        },
        "none": {
          "description": "The component will not create a label, but instead set the aria-label property on the input element.",
          "displayName": "None"
        },
        "start": {
          "description": "The label will be placed before the start of the component.",
          "displayName": "Start"
        },
        "top": {
          "description": "The label will be placed on top of the component.",
          "displayName": "Top"
        }
      },
      "enumValues": [
        "none",
        "start",
        "top",
        "inside"
      ],
      "binding": {
        "consume": {
          "name": "containerLabelEdge"
        }
      }
    },
    "labelHint": {
      "type": "string",
      "description": "Represents a hint for rendering a label on the component.",
      "displayName": "Label Hint",
      "help": "#labelHint",
      "required": true,
      "translatable": true
    },
    "labelStartWidth": {
      "type": "number|string",
      "description": "The width of the label when labelEdge is 'start'",
      "displayName": "Label Start Width",
      "help": "#labelStartWidth",
      "binding": {
        "consume": {
          "name": "labelWidth"
        }
      }
    },
    "labelWrapping": {
      "type": "string",
      "status": [
        {
          "type": "deprecated",
          "since": "18.0.0",
          "description": "Label truncation for 'start' and 'top' aligned labels is no longer recommended by the Redwood Design System. The default for labelWrapping was 'wrap' and that is now the only suggested pattern by UX design for 'start' and 'top' aligned labels. 'inside' aligned labels are always truncated per UX design and are not affected by this property's value."
        }
      ],
      "description": "Should the labels wrap or truncate when there is not enough available space.",
      "displayName": "Label Wrapping",
      "help": "#labelWrapping",
      "propertyEditorValues": {
        "truncate": {
          "description": "Label will truncate if needed.",
          "displayName": "Truncate"
        },
        "wrap": {
          "description": "Label will wrap if needed.",
          "displayName": "Wrap"
        }
      },
      "enumValues": [
        "truncate",
        "wrap"
      ],
      "binding": {
        "consume": {
          "name": "labelWrapping"
        }
      }
    },
    "matchBy": {
      "type": "Array<string>|null",
      "description": "List of text filter matching behaviors to use when filtering.",
      "displayName": "Match By",
      "help": "#matchBy",
      "value": null
    },
    "maxWidth": {
      "type": "number|string",
      "description": "The max width of the control.",
      "displayName": "Max Width",
      "help": "#maxWidth",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "messagesCustom": {
      "type": "Array<object>",
      "description": "List of custom component messages",
      "displayName": "Messages Custom",
      "help": "#messagesCustom",
      "extension": {
        "vbdt": {
          "itemProperties": {
            "summary": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enumValues": [
                "error",
                "confirmation",
                "info",
                "warning"
              ]
            }
          }
        }
      },
      "writeback": true,
      "value": []
    },
    "placeholder": {
      "type": "string",
      "description": "The placeholder text to set on the element.",
      "displayName": "Placeholder",
      "help": "#placeholder",
      "translatable": true
    },
    "readonly": {
      "type": "boolean",
      "description": "Whether the component is readonly",
      "displayName": "Readonly",
      "help": "#readonly",
      "binding": {
        "consume": {
          "name": "containerReadonly"
        }
      }
    },
    "readonlyUserAssistanceShown": {
      "type": "string",
      "description": "Specifies which user assistance types should be shown when the component is readonly.",
      "displayName": "ReadonlyUserAssistanceShown",
      "help": "#readonlyUserAssistanceShown",
      "enumValues": [
        "none",
        "confirmationAndInfoMessages"
      ],
      "value": "none"
    },
    "required": {
      "type": "boolean",
      "description": "Specifies whether or not the component is required.",
      "displayName": "Required",
      "help": "#required",
      "value": false
    },
    "requiredMessageDetail": {
      "type": "string",
      "description": "Overrides the default Required error message.",
      "displayName": "Required Message Detail",
      "help": "#requiredMessageDetail",
      "translatable": true
    },
    "textAlign": {
      "type": "string",
      "description": "Specifies how the text is aligned within the text field",
      "displayName": "Text Align",
      "help": "#textAlign",
      "propertyEditorValues": {
        "start": {
          "description": "Aligns text left when reading direction is ltr and right when reading direction is rtl (default, if unspecified).",
          "displayName": "Start"
        },
        "end": {
          "description": "Aligns text right when reading direction is ltr and left when reading direction is rtl.",
          "displayName": "End"
        },
        "right": {
          "description": "Aligns text right regardless of reading direction, often used for numbers.",
          "displayName": "Right"
        }
      },
      "enumValues": [
        "end",
        "start",
        "right"
      ]
    },
    "userAssistanceDensity": {
      "type": "string",
      "description": "Specifies the density of the form component's user assistance presentation.",
      "displayName": "User Assistance Density",
      "help": "#userAssistanceDensity",
      "propertyEditorValues": {
        "reflow": {
          "description": "Messages, help, hints, and required are all shown inline under the field with no reserved space.",
          "displayName": "Reflow"
        },
        "efficient": {
          "description": "Messages, help, hints, and required are all shown inline under the field with reserved space.",
          "displayName": "Efficient"
        },
        "compact": {
          "description": "Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required.",
          "displayName": "Compact"
        }
      },
      "enumValues": [
        "compact",
        "reflow",
        "efficient"
      ],
      "binding": {
        "consume": {
          "name": "containerUserAssistanceDensity"
        }
      }
    },
    "value": {
      "type": "string|number|null",
      "description": "The value of the component.",
      "displayName": "Value",
      "help": "#value",
      "writeback": true,
      "value": null
    },
    "valueItem": {
      "type": "object|null",
      "description": "The current value of the element and its associated data.",
      "displayName": "Value Item",
      "help": "#valueItem",
      "properties": {
        "data": {
          "type": "any"
        },
        "key": {
          "type": "string|number"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "indexFromParent": {
              "type": "number"
            },
            "isLeaf": {
              "type": "boolean"
            },
            "key": {
              "type": "string|number"
            },
            "message": {
              "type": "object",
              "properties": {
                "detail": {
                  "type": "string"
                },
                "severity": {
                  "type": "string|number",
                  "propertyEditorValues": {
                    "error": {},
                    "confirmation": {},
                    "info": {},
                    "warning": {},
                    "fatal": {}
                  }
                },
                "summary": {
                  "type": "string"
                }
              }
            },
            "parentKey": {
              "type": "string|number"
            },
            "suggestion": {
              "type": "object"
            },
            "treeDepth": {
              "type": "number"
            }
          }
        }
      },
      "writeback": true,
      "value": null
    },
    "virtualKeyboard": {
      "type": "string",
      "description": "The type of virtual keyboard to display for entering a value on mobile browsers",
      "displayName": "Virtual Keyboard",
      "help": "#virtualKeyboard",
      "propertyEditorValues": {
        "number": {
          "description": "Use a mobile virtual keyboard for entering numbers. Note that on Android and Windows Mobile, the 'number' keyboard does not contain the minus sign. This value should not be used on fields that accept negative values.",
          "displayName": "Number"
        },
        "auto": {
          "description": "The component will determine the best mobile virtual keyboard to use (default, if unspecified).",
          "displayName": "Auto"
        },
        "email": {
          "description": "Use a mobile virtual keyboard for entering email addresses.",
          "displayName": "Email"
        },
        "search": {
          "description": "Use a mobile virtual keyboard for entering search terms.",
          "displayName": "Search"
        },
        "tel": {
          "description": "Use a mobile virtual keyboard for entering telephone numbers.",
          "displayName": "Tel"
        },
        "text": {
          "description": "Use a mobile virtual keyboard for entering text.",
          "displayName": "Text"
        },
        "url": {
          "description": "Use a mobile virtual keyboard for URL entry.",
          "displayName": "URL"
        }
      },
      "enumValues": [
        "number",
        "search",
        "auto",
        "url",
        "text",
        "email",
        "tel"
      ],
      "value": "auto"
    },
    "width": {
      "type": "number|string",
      "description": "The width of the control.",
      "displayName": "Width",
      "help": "#width",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "valid": {
      "type": "string",
      "description": "Specifies how the valid state of the component",
      "displayName": "Valid",
      "help": "#valid",
      "propertyEditorValues": {
        "valid": {
          "description": "The component is valid",
          "displayName": "Valid"
        },
        "pending": {
          "description": "The component is waiting for the validation state to be determined. The 'pending' state is set at the start of the convert/validate process.",
          "displayName": "Pending"
        },
        "invalidHidden": {
          "description": "The component has invalid messages hidden and no invalid messages showing. An invalid message is one with severity 'error'.",
          "displayName": "Invalid Hidden"
        },
        "invalidShown": {
          "description": "The component has invalid messages showing. An invalid message is one with severity 'error'.",
          "displayName": "Invalid Shown"
        }
      },
      "enumValues": [
        "pending",
        "valid",
        "invalidHidden",
        "invalidShown"
      ],
      "readOnly": true,
      "writeback": true
    }
  },
  "slots": {
    "collectionTemplate": {
      "description": "The collectionTemplate slot is used to specify the template for rendering the items in the dropdown.",
      "displayName": "collectionTemplate",
      "help": "#collectionTemplate",
      "maxItems": 1,
      "preferredContent": [
        "CTableElement",
        "CListViewElement"
      ],
      "data": {
        "data": {
          "type": "DataProvider|null"
        },
        "searchText": {
          "type": "string"
        },
        "currentRowOverride": {
          "type": "object",
          "properties": {
            "rowKey": {
              "type": "string|number"
            }
          }
        },
        "onCurrentRowChanged": {
          "type": "function"
        },
        "selected": {
          "type": "object"
        },
        "onRowAction": {
          "type": "function"
        }
      }
    },
    "itemTemplate": {
      "description": "The itemTemplate slot is used to specify the template for rendering each item in the dropdown. See the Help documentation for more information.",
      "displayName": "itemTemplate",
      "help": "#itemTemplate",
      "maxItems": 1,
      "data": {
        "searchText": {
          "type": "string"
        },
        "item": {
          "type": "object",
          "properties": {
            "data": {
              "type": "any"
            },
            "metadata": {
              "type": "object",
              "properties": {
                "indexFromParent": {
                  "type": "number"
                },
                "isLeaf": {
                  "type": "boolean"
                },
                "key": {
                  "type": "string|number"
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string|number"
                    },
                    "summary": {
                      "type": "string"
                    }
                  }
                },
                "parentKey": {
                  "type": "string|number"
                },
                "suggestion": {
                  "type": "object"
                },
                "treeDepth": {
                  "type": "number"
                }
              }
            }
          }
        }
      }
    }
  },
  "events": {
    "ojAddToListAction": {
      "description": "Event triggered when the user clicks or presses Enter on the add to list link in the dropdown.",
      "displayName": "onOjAddToListAction",
      "help": "#event:addToListAction",
      "detail": {
        "searchText": {
          "type": "string"
        }
      }
    },
    "ojAdvancedSearchAction": {
      "description": "Event triggered when the user clicks or presses Enter on the advanced search link in the dropdown.",
      "displayName": "onOjAdvancedSearchAction",
      "help": "#event:advancedSearchAction",
      "detail": {
        "searchText": {
          "type": "string"
        }
      }
    },
    "ojValueAction": {
      "description": "Event triggered when a value is submitted by the user, even if the value is the same as the previous value.",
      "displayName": "onOjValueAction",
      "help": "#event:valueAction",
      "detail": {
        "itemContext": {
          "type": "object",
          "properties": {
            "data": {
              "type": "any"
            },
            "key": {
              "type": "string|number"
            },
            "metadata": {
              "type": "object",
              "properties": {
                "indexFromParent": {
                  "type": "number"
                },
                "isLeaf": {
                  "type": "boolean"
                },
                "key": {
                  "type": "string|number"
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string|number"
                    },
                    "summary": {
                      "type": "string"
                    }
                  }
                },
                "parentKey": {
                  "type": "string|number"
                },
                "suggestion": {
                  "type": "object"
                },
                "treeDepth": {
                  "type": "number"
                }
              }
            }
          }
        },
        "previousValue": {
          "type": "string|number|null"
        },
        "value": {
          "type": "string|number|null"
        }
      }
    }
  },
  "methods": {
    "blur": {
      "description": "Blurs the input field.",
      "return": "void"
    },
    "focus": {
      "description": "Focuses the input field.",
      "return": "void"
    },
    "showMessages": {
      "description": "Takes all deferred messages and shows them.",
      "return": "void"
    },
    "reset": {
      "description": "Resets the component by clearing all messages and updating the component's display value using the attribute value.",
      "return": "void"
    },
    "validate": {
      "description": "If enabled, validates the component's display value using the converter and all validators registered on the component. The Promise resolves to 'valid' if there were no converter parse errors and the component passed all validations, or if the component is disabled or readonly.",
      "return": "Promise"
    },
    "_doAddToListAction": {
      "description": "This method imitates triggering the add to list link in the dropdown. This is used by the WebElement implementation of oj-c-select-single.\"",
      "params": [
        {
          "name": "searchText",
          "description": "The search text to include in the event",
          "type": "string"
        }
      ],
      "return": "void"
    },
    "_doAdvancedSearchAction": {
      "description": "This method imitates triggering the advanced search link in the dropdown. This is used by the WebElement implementation of oj-c-select-single.",
      "params": [
        {
          "name": "searchText",
          "description": "The search text to include in the event",
          "type": "string"
        }
      ],
      "return": "void"
    },
    "_selectItemByValue": {
      "description": "This method imitates an option selection from the dropdown by using the key of an item. This is used by the WebElement implementation of oj-c-select-single.",
      "params": [
        {
          "name": "value",
          "description": "The value to be selected",
          "type": "any"
        }
      ],
      "return": "Promise"
    },
    "UNSAFE_focusAndOpenDropdown": {
      "return": "void"
    },
    "setProperty": {
      "description": "Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.",
      "help": "#setProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to set. Supports dot notation for subproperty access.",
          "type": "string"
        },
        {
          "name": "value",
          "description": "The new value to set the property to.",
          "type": "any"
        }
      ],
      "return": "void"
    },
    "getProperty": {
      "description": "Retrieves the value of a property or a subproperty.",
      "help": "#getProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to get. Supports dot notation for subproperty access.",
          "type": "string"
        }
      ],
      "return": "any"
    },
    "setProperties": {
      "description": "Performs a batch set of properties.",
      "help": "#setProperties",
      "params": [
        {
          "name": "properties",
          "description": "An object containing the property and value pairs to set.",
          "type": "object"
        }
      ],
      "return": "void"
    }
  }
}