{
  "name": "input-number",
  "version": "20.0.2",
  "jetVersion": "^20.0.2",
  "pack": "oj-c",
  "type": "composite",
  "dependencyScope": "runtime",
  "license": "https://opensource.org/licenses/UPL",
  "implements": [
    "CInputNumberElement"
  ],
  "displayName": "Input Number",
  "description": "An input number allows the user to enter a number value.",
  "help": "oj-c.InputNumber.html",
  "main": "oj-c/input-number",
  "status": [
    {
      "type": "supersedes",
      "since": "16.0.0",
      "value": [
        "oj-input-number"
      ]
    }
  ],
  "extension": {
    "catalog": {
      "category": "Forms"
    },
    "vbdt": {
      "module": "oj-c/input-number",
      "defaultColumns": 6,
      "minColumns": 2
    },
    "oracle": {
      "icon": "oj-ux-ico-input-number",
      "uxSpecs": [
        "input-number"
      ]
    },
    "webelement": {
      "package": "@oracle/oraclejet-core-pack",
      "version": "20.0.2",
      "docUrl": "https://www.oracle.com/webfolder/technetwork/jet/cpwdtsdoc/classes/InputNumberWebElement.html",
      "export": "findInputNumber",
      "main": "@oracle/oraclejet-core-pack/webdriver"
    }
  },
  "propertyLayout": [
    {
      "propertyGroup": "common",
      "items": [
        "disabled",
        "labelHint",
        "placeholder",
        "readonly",
        "required",
        "virtualKeyboard"
      ]
    },
    {
      "propertyGroup": "data",
      "items": [
        "value"
      ]
    }
  ],
  "since": "14.0.0",
  "requirements": [
    {
      "type": "anyOf",
      "label": "accessibility",
      "properties": [
        "labelHint"
      ]
    },
    {
      "type": "not",
      "label": "accessibility",
      "properties": [
        "aria-label",
        "aria-labelledby"
      ]
    }
  ],
  "properties": {
    "autocomplete": {
      "type": "string",
      "description": "Dictates component's autocomplete state",
      "displayName": "Autocomplete",
      "help": "#autocomplete",
      "value": "on"
    },
    "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"
        }
      }
    },
    "converter": {
      "type": "object|null",
      "description": "Specifies the converter instance.",
      "displayName": "Converter",
      "help": "#converter",
      "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": {
        "converterHint": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        },
        "messages": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        },
        "validatorHint": {
          "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"
        }
      }
    },
    "inputPrefix": {
      "type": "string",
      "description": "The text before the input text.",
      "displayName": "Input Prefix",
      "help": "#inputPrefix",
      "translatable": true
    },
    "inputSuffix": {
      "type": "string",
      "description": "The text after the input text.",
      "displayName": "Input Suffix",
      "help": "#inputSuffix",
      "translatable": 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"
        }
      }
    },
    "max": {
      "type": "number|null",
      "description": "The maximum allowed value",
      "displayName": "Max",
      "help": "#max"
    },
    "maxWidth": {
      "type": "number|string",
      "description": "The max width of the control.",
      "displayName": "Max Width",
      "help": "#maxWidth",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "min": {
      "type": "number|null",
      "description": "The minimum allowed value",
      "displayName": "Min",
      "help": "#min"
    },
    "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": []
    },
    "numberRangeExactMessageDetail": {
      "type": "string",
      "description": "Overrides the default NumberRangeValidator's exact message detail.",
      "displayName": "Number Range Exact Message Detail",
      "help": "#numberRangeExactMessageDetail",
      "translatable": true
    },
    "numberRangeOverflowMessageDetail": {
      "type": "string",
      "description": "Overrides the default NumberRangeValidator's overflow message detail.",
      "displayName": "Number Range Overflow Message Detail",
      "help": "#numberRangeOverflowMessageDetail",
      "translatable": true
    },
    "numberRangeUnderflowMessageDetail": {
      "type": "string",
      "description": "Overrides the default NumberRangeValidator's underflow message detail.",
      "displayName": "Number Range Underflow Message Detail",
      "help": "#numberRangeUnderflowMessageDetail",
      "translatable": true
    },
    "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
    },
    "step": {
      "type": "number",
      "description": "Specifies the amount to increase or decrease the value when moving in step increments. If 0, no step functionality.",
      "displayName": "Step",
      "help": "#step"
    },
    "stepperVariant": {
      "type": "string",
      "description": "Variant style of step buttons. Quantitative is recommended only for non-negative integers where the step value is 1, which is common in ecommerce or procurement cases.",
      "displayName": "Stepper Variant",
      "help": "#stepperVariant",
      "propertyEditorValues": {
        "directional": {
          "description": "Displays directional buttons, grouped together and located at end of input.",
          "displayName": "Directional"
        },
        "quantitative": {
          "description": "Displays quantitative buttons, separated and located at start and end of input.",
          "displayName": "Quantitative"
        }
      },
      "enumValues": [
        "directional",
        "quantitative"
      ],
      "value": "directional"
    },
    "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"
        }
      }
    },
    "validators": {
      "type": "Array<object>|null",
      "description": "Specifies the validators for the component.",
      "displayName": "Validators",
      "help": "#validators",
      "value": []
    },
    "value": {
      "type": "number|null",
      "description": "The value of the component.",
      "displayName": "Value",
      "help": "#value",
      "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. If using 'number', you must set the converter attribute to a converter that formats to numeric characters only, otherwise the value will not be shown. The reason for this is oj-c-input-number uses the browser native input type='number' and when you set a value that contains a non-numeric character, browsers do not display the value. For example, '1,000' would not be shown. 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"
        },
        "text": {
          "description": "Use a mobile virtual keyboard for entering text.",
          "displayName": "Text"
        }
      },
      "enumValues": [
        "number",
        "auto",
        "text"
      ],
      "value": "auto"
    },
    "width": {
      "type": "number|string",
      "description": "The width of the control.",
      "displayName": "Width",
      "help": "#width",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "rawValue": {
      "type": "string",
      "description": "Specifies how the raw value of the component",
      "displayName": "Raw Value",
      "help": "#rawValue",
      "readOnly": true,
      "writeback": true
    },
    "transientValue": {
      "type": "number|null",
      "description": "Specifies the transient value of the component",
      "displayName": "Transient Value",
      "help": "#transientValue",
      "readOnly": true,
      "writeback": true
    },
    "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
    }
  },
  "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"
    },
    "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"
    }
  }
}