[Spec][InputEvolution]Update schema and documentation files to match the latest spec (#4255)
* Update schema and documentation files to match the latest spec * Update to remove documentation of optional suffixes as they are not supported. * Update with latest design decisions * Regenerate the schema file
This commit is contained in:
Родитель
f6ee876359
Коммит
86e3a64e7f
|
@ -20,7 +20,6 @@
|
|||
"iconUrl": {},
|
||||
"style": {},
|
||||
"fallback": {},
|
||||
"inputs": {},
|
||||
"requires": {}
|
||||
},
|
||||
"type": "object",
|
||||
|
@ -51,7 +50,6 @@
|
|||
"iconUrl": {},
|
||||
"style": {},
|
||||
"fallback": {},
|
||||
"inputs": {},
|
||||
"requires": {}
|
||||
},
|
||||
"type": "object",
|
||||
|
@ -82,60 +80,19 @@
|
|||
],
|
||||
"description": "Initial data that input fields will be combined with. These are essentially ‘hidden’ properties."
|
||||
},
|
||||
"inputs": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ActionInputs"
|
||||
}
|
||||
],
|
||||
"description": "None, All, or an array of ids for inputs (or containers of inputs) that should be submitted with this action and validated before allowing it.",
|
||||
"version": "1.3",
|
||||
"default": "All"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "Label for button or link that represents this action."
|
||||
},
|
||||
"iconUrl": {
|
||||
"type": "string",
|
||||
"format": "uri-reference",
|
||||
"description": "Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+",
|
||||
"version": "1.1"
|
||||
},
|
||||
"style": {
|
||||
"$ref": "#/definitions/ActionStyle",
|
||||
"description": "Controls the style of an Action, which influences how the action is displayed, spoken, etc.",
|
||||
"version": "1.2"
|
||||
},
|
||||
"fallback": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ImplementationsOf.Action"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/FallbackOption"
|
||||
}
|
||||
],
|
||||
"description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.",
|
||||
"version": "1.2"
|
||||
},
|
||||
"requires": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.",
|
||||
"version": "1.2"
|
||||
}
|
||||
"title": {},
|
||||
"iconUrl": {},
|
||||
"style": {},
|
||||
"fallback": {},
|
||||
"requires": {}
|
||||
},
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Extendable.Action"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Action.ToggleVisibility": {
|
||||
"description": "An action that toggles the visibility of associated card elements.",
|
||||
|
@ -158,7 +115,6 @@
|
|||
"iconUrl": {},
|
||||
"style": {},
|
||||
"fallback": {},
|
||||
"inputs": {},
|
||||
"requires": {}
|
||||
},
|
||||
"type": "object",
|
||||
|
@ -261,7 +217,7 @@
|
|||
"version": "1.0"
|
||||
}
|
||||
],
|
||||
"description": "Specifies the background image of the card. Acceptable formats are PNG, JPEG, and GIF",
|
||||
"description": "Specifies the background image of the card.",
|
||||
"version": "1.2"
|
||||
},
|
||||
"minHeight": {
|
||||
|
@ -288,12 +244,6 @@
|
|||
"es"
|
||||
]
|
||||
},
|
||||
"showRequiredInputHints": {
|
||||
"type": "boolean",
|
||||
"description": "True if required fields should be visually indicated",
|
||||
"version": "1.3",
|
||||
"default": true
|
||||
},
|
||||
"verticalContentAlignment": {
|
||||
"$ref": "#/definitions/VerticalContentAlignment",
|
||||
"description": "Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a `minHeight` specified.",
|
||||
|
@ -2419,22 +2369,6 @@
|
|||
"description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.",
|
||||
"version": "1.2"
|
||||
},
|
||||
"inputs": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ActionInputs"
|
||||
}
|
||||
],
|
||||
"description": "None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action.",
|
||||
"version": "1.3",
|
||||
"default": "None"
|
||||
},
|
||||
"requires": {}
|
||||
},
|
||||
"type": "object",
|
||||
|
@ -2500,17 +2434,7 @@
|
|||
"version": "1.3"
|
||||
},
|
||||
"label": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/TextBlock"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/RichTextBlock"
|
||||
}
|
||||
],
|
||||
"type": "string",
|
||||
"description": "Label for this input",
|
||||
"version": "1.3"
|
||||
},
|
||||
|
|
|
@ -6,13 +6,6 @@
|
|||
"data": {
|
||||
"type": "string|object",
|
||||
"description": "Initial data that input fields will be combined with. These are essentially ‘hidden’ properties."
|
||||
},
|
||||
"inputs": {
|
||||
"type": "string[]|ActionInputs",
|
||||
"description": "None, All, or an array of ids for inputs (or containers of inputs) that should be submitted with this action and validated before allowing it.",
|
||||
"version": "1.3",
|
||||
"default":"All",
|
||||
"override": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,12 +21,6 @@
|
|||
"type": "Action|FallbackOption",
|
||||
"description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.",
|
||||
"version": "1.2"
|
||||
},
|
||||
"inputs": {
|
||||
"type": "string[]|ActionInputs",
|
||||
"description": "None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action.",
|
||||
"version": "1.3",
|
||||
"default":"None"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@
|
|||
"version": "1.3"
|
||||
},
|
||||
"label": {
|
||||
"type": "string|TextBlock|RichTextBlock",
|
||||
"type": "string",
|
||||
"description": "Label for this input",
|
||||
"version": "1.3"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
| **iconUrl** | `uri` | No | Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+ | 1.1 |
|
||||
| **style** | `ActionStyle` | No | Controls the style of an Action, which influences how the action is displayed, spoken, etc. | 1.2 |
|
||||
| **fallback** | `Action`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **inputs** | `string[]`, `ActionInputs` | No, default: `"None"` | None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action. | 1.3 |
|
||||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
|
@ -45,25 +44,10 @@ Describes what to do when an unknown element is encountered or the requires of t
|
|||
* `Action.Submit`
|
||||
* `Action.ToggleVisibility`
|
||||
* `"drop"`: Causes this element to be dropped immediately when unknown elements are encountered. The unknown element doesn't bubble up any higher.
|
||||
|
||||
|
||||
## inputs
|
||||
|
||||
None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action.
|
||||
|
||||
* **Type**: `string[]`, `ActionInputs`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No, default: `"None"`
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `"All"`: All inputs will be validated and submitted for this Action.
|
||||
* `"None"`: None of the inputs will be validated or submitted for this Action.
|
||||
<!-- END AUTO-GENERATED -->
|
||||
|
||||
## Rendering
|
||||
|
||||
See `ActionSet`.
|
||||
|
||||
When user invokes this action, invoke the `ActionInvoked` event, passing along this action, so that host can take the appropriate action.
|
||||
|
||||
The action button should be greyed out if any of the inputs referenced in `inputs` do not meet the requirements specified by the card author.
|
||||
When user invokes this action, invoke the `ActionInvoked` event, passing along this action, so that host can take the appropriate action.
|
|
@ -15,7 +15,6 @@
|
|||
| **iconUrl** | `uri` | No | Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+ | 1.1 |
|
||||
| **style** | `ActionStyle` | No | Controls the style of an Action, which influences how the action is displayed, spoken, etc. | 1.2 |
|
||||
| **fallback** | `Action`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **inputs** | `string[]`, `ActionInputs` | No, default: `"None"` | None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action. | 1.3 |
|
||||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
|
@ -55,25 +54,10 @@ Describes what to do when an unknown element is encountered or the requires of t
|
|||
* `Action.Submit`
|
||||
* `Action.ToggleVisibility`
|
||||
* `"drop"`: Causes this element to be dropped immediately when unknown elements are encountered. The unknown element doesn't bubble up any higher.
|
||||
|
||||
|
||||
## inputs
|
||||
|
||||
None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action.
|
||||
|
||||
* **Type**: `string[]`, `ActionInputs`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No, default: `"None"`
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `"All"`: All inputs will be validated and submitted for this Action.
|
||||
* `"None"`: None of the inputs will be validated or submitted for this Action.
|
||||
<!-- END AUTO-GENERATED -->
|
||||
|
||||
## Rendering
|
||||
|
||||
Only allowed inside an `ActionSet` or `card.actions`. If anywhere else, drop and trigger warning.
|
||||
|
||||
See `ActionSet` for rendering.
|
||||
|
||||
The action button should be greyed out if any of the inputs referenced in `inputs` do not meet the requirements specified by the card author.
|
||||
See `ActionSet` for rendering.
|
|
@ -6,7 +6,6 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **type** | `"Action.Submit"` | Yes | Must be `"Action.Submit"`. | 1.0 |
|
||||
| **data** | `string`, `object` | No | Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. | 1.0 |
|
||||
| **inputs** | `string[]`, `ActionInputs` | No, default: `"All"` | None, All, or an array of ids for inputs (or containers of inputs) that should be submitted with this action and validated before allowing it. | 1.3 |
|
||||
|
||||
**Inherited properties**
|
||||
|
||||
|
@ -19,19 +18,6 @@
|
|||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
## inputs
|
||||
|
||||
None, All, or an array of ids for inputs (or containers of inputs) that should be submitted with this action and validated before allowing it.
|
||||
|
||||
* **Type**: `string[]`, `ActionInputs`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No, default: `"All"`
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `"All"`: All inputs will be validated and submitted for this Action.
|
||||
* `"None"`: None of the inputs will be validated or submitted for this Action.
|
||||
|
||||
|
||||
## style
|
||||
|
||||
Controls the style of an Action, which influences how the action is displayed, spoken, etc.
|
||||
|
@ -64,6 +50,4 @@ Describes what to do when an unknown element is encountered or the requires of t
|
|||
|
||||
See `ActionSet`.
|
||||
|
||||
When user invokes this action, invoke the `ActionInvoked` event, passing along this action, so that host can take the appropriate action.
|
||||
|
||||
The action button should be greyed out if any of the inputs referenced in `inputs` do not meet the requirements specified by the card author. These referenced inputs should be returned to the host when the submit action is invoked by the user.
|
||||
When user invokes this action, invoke the `ActionInvoked` event, passing along this action, so that host can take the appropriate action.
|
|
@ -17,7 +17,6 @@
|
|||
| **iconUrl** | `uri` | No | Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+ | 1.1 |
|
||||
| **style** | `ActionStyle` | No | Controls the style of an Action, which influences how the action is displayed, spoken, etc. | 1.2 |
|
||||
| **fallback** | `Action`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **inputs** | `string[]`, `ActionInputs` | No, default: `"None"` | None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action. | 1.3 |
|
||||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
|
@ -56,19 +55,6 @@ Describes what to do when an unknown element is encountered or the requires of t
|
|||
* `Action.Submit`
|
||||
* `Action.ToggleVisibility`
|
||||
* `"drop"`: Causes this element to be dropped immediately when unknown elements are encountered. The unknown element doesn't bubble up any higher.
|
||||
|
||||
|
||||
## inputs
|
||||
|
||||
None, All, or an array of ids for inputs (or containers of inputs) that should be validated before allowing this action.
|
||||
|
||||
* **Type**: `string[]`, `ActionInputs`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No, default: `"None"`
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `"All"`: All inputs will be validated and submitted for this Action.
|
||||
* `"None"`: None of the inputs will be validated or submitted for this Action.
|
||||
<!-- END AUTO-GENERATED -->
|
||||
|
||||
## Rendering
|
||||
|
@ -82,6 +68,4 @@ When the user invokes this action, for each object in `targetElements`...
|
|||
1. Look up the element using the `elementId`
|
||||
1. If not found, issue warning and continue to next in loop
|
||||
1. If the `isVisible` property is NOT supplied, toggle the element's visibility
|
||||
1. Else, if the `isVisible` property is supplied, set the element's visibility to the value of `isVisible`.
|
||||
|
||||
The action button should be greyed out if any of the inputs referenced in `inputs` do not meet the requirements specified by the card author.
|
||||
1. Else, if the `isVisible` property is supplied, set the element's visibility to the value of `isVisible`.
|
|
@ -18,7 +18,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -46,19 +46,6 @@
|
|||
* `"expanded"`
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -116,14 +103,16 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered above the choice set. In the case of a compact choice set, clicking/tapping on the rendered label should put focus on the input.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text for the choice set when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `isRequired`, property should be validated for this input type. The input should be validated when it loses focus for the first time.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
The `isRequired` property should be validated for this input type. The input should be validated when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and `isRequired` is set, a warning should be returned.
|
|
@ -17,7 +17,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -26,19 +26,6 @@
|
|||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -96,17 +83,16 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered above the input box or date picker. Clicking/tapping on the rendered label should put focus on the input.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set, and otherwise be placed next to the date picker.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select dates outside the specified range. For the `isRequired` (and for `max` and `min` if that's not possible), the validation should take place as follows:
|
||||
|
||||
- Validate the input when it loses focus for the first time.
|
||||
- Once the field has been marked invalid, validate on each keystroke or selection so the user can see when it becomes valid.
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select dates outside the specified range. For the `isRequired` (and for `max` and `min` if not enforced by the control), the validation should take place when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and a property validated by input validation is set, a warning should be returned.
|
|
@ -17,7 +17,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -26,19 +26,6 @@
|
|||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -96,17 +83,17 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered above the input box. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set, and otherwise be placed next to the number input.
|
||||
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select values outside the specified range. For the `isRequired` (and for `max` and `min` if that's not possible), the validation should take place as follows:
|
||||
|
||||
- Validate the input when it loses focus for the first time.
|
||||
- Once the field has been marked invalid, validate on each keystroke or selection so the user can see when it becomes valid.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select values outside the specified range. For the `isRequired` (and for `max` and `min` if not enforced by the control), the validation should take place when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and a property validated by input validation is set, a warning should be returned.
|
|
@ -20,7 +20,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -55,19 +55,6 @@ The inline action for the input. Typically displayed to the right of the input.
|
|||
* `Action.ToggleVisibility`
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -125,18 +112,17 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered above the input box. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set, and otherwise be placed next to the input box.
|
||||
|
||||
The `regex`, `isRequired`, and `maxLength` properties should be validated for this input type. If possible, `maxLength` should be enforced by providing a control that does not allow the user to enter more than the maximum number of characters. For the other properties (and for `maxLength` if that's not possible), the validation should take place as follows:
|
||||
|
||||
- Validate the input when it loses focus for the first time.
|
||||
- Once the field has been marked invalid, validate on each keystroke so the user can see when it becomes valid.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `regex`, `isRequired`, and `maxLength` properties should be validated for this input type. If possible, `maxLength` should be enforced by providing a control that does not allow the user to enter more than the maximum number of characters. For the other properties (and for `maxLength` if not enforced by the control), the validation should take place when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and a property validated by input validation is set, a warning should be returned.
|
|
@ -17,7 +17,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -26,19 +26,6 @@
|
|||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -96,17 +83,16 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered above the input box or time picker. Clicking/tapping on the rendered label should put focus on the input.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set, and otherwise be placed next to the date picker.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select a time outside of the specified range. For the `isRequired` (and for `max` and `min` if that's not possible), the validation should take place as follows:
|
||||
|
||||
- Validate the input when it loses focus for the first time.
|
||||
- Once the field has been marked invalid, validate on each keystroke or selection so the user can see when it becomes valid.
|
||||
The `isRequired`, `min`, and `max` properties should be validated for this input type. If possible, `min` and `max` should be enforced by providing a control that does not allow the user to select a time outside of the specified range. For the `isRequired` (and for `max` and `min` if not enforced by the control), the validation should take place when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and a property validated by input validation is set, a warning should be returned.
|
|
@ -18,7 +18,7 @@
|
|||
| -------- | ---- | -------- | ----------- | ------- |
|
||||
| **errorMessage** | `string` | No | Error message to display when entered input is invalid | 1.3 |
|
||||
| **isRequired** | `boolean` | No | Whether or not this input is required | 1.3 |
|
||||
| **label** | `string`, `TextBlock`, `RichTextBlock` | No | Label for this input | 1.3 |
|
||||
| **label** | `string` | No | Label for this input | 1.3 |
|
||||
| **fallback** | `Element`, `FallbackOption` | No | Describes what to do when an unknown element is encountered or the requires of this or any children can't be met. | 1.2 |
|
||||
| **height** | `BlockElementHeight` | No | Specifies the height of the element. | 1.1 |
|
||||
| **separator** | `boolean` | No | When `true`, draw a separating line at the top of the element. | 1.0 |
|
||||
|
@ -27,19 +27,6 @@
|
|||
| **requires** | `Dictionary<string>` | No | A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered. | 1.2 |
|
||||
|
||||
|
||||
## label
|
||||
|
||||
Label for this input
|
||||
|
||||
* **Type**: `string`, `TextBlock`, `RichTextBlock`
|
||||
* **Version** : 1.3
|
||||
* **Required**: No
|
||||
* **Allowed values**:
|
||||
* `string`
|
||||
* `TextBlock`
|
||||
* `RichTextBlock`
|
||||
|
||||
|
||||
## fallback
|
||||
|
||||
Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.
|
||||
|
@ -97,17 +84,16 @@ Controls the amount of spacing between this element and the preceding element.
|
|||
## Rendering
|
||||
|
||||
### Labels
|
||||
The `label` property should be rendered to the left of the toggle box. Clicking/tapping on the rendered label should toggle the input.
|
||||
The `label` property should be rendered above the input box if present. Clicking/tapping on the rendered label should put focus in the input box.
|
||||
|
||||
The `color`, `isSubtle`, `size`, and `weight` properties provided in the host config under `"inputs":"label":"requiredInputs"` for inputs with `"isRequired":true`, and under `"inputs":"label":"optionalInputs"` for inputs with `"isRequired":false` should be respected. The spacing between the label and the input should be set to the value of `inputSpacing` specified in those same locations in host config.
|
||||
|
||||
### Accessibility
|
||||
The `label` property should be set as the accessibility text when present. If the `label` property is not present, the `placeholder` property should be used instead if present.
|
||||
|
||||
### Input Validation
|
||||
If the input has `isRequired` true, and the card has `showRequiredInputHints`, the input should be marked with a * in the host's `attention` color. The * should be placed on the label in the case where the label is set, and otherwise be placed next to the title string.
|
||||
If the input has `"isRequired":true` the label of the input should be marked with the `"inputs":"label":"requiredInputs":"suffix"` value from the host config, or with a * by default. If a required input does not have a label, the suffix should not be used and a warning should be returned.
|
||||
|
||||
The `isRequired` property should be validated for this input type.The validation should take place as follows:
|
||||
|
||||
- Validate the input when it loses focus for the first time.
|
||||
- Once the field has been marked invalid, validate when the user click the toggle so they can see that is has become valid.
|
||||
The `isRequired` property should be validated for this input type the validation should take place when the user activates a submit action on the card.
|
||||
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input.
|
||||
If the input does not pass validation, it should be outlined in the host's `attention` color, and the `errorMessage` should be displayed below the input in the host's `attention` color. If an error message is not present and `isRequired` is set, a warning should be returned.
|
||||
|
|
Загрузка…
Ссылка в новой задаче