Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time-picker and generate the code #4452

Merged
merged 1 commit into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"name": "Vaadin.TimePickerTextFieldElement",
"tag": "vaadin-time-picker-text-field",
"baseUrl": "vaadin-time-picker/src/vaadin-time-picker-text-field.html",
"version": "UNKNOWN",
"properties": [
{
"name": "autofocus",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Specify that this control should have input focus when the page loads.\n "
},
{
"name": "disabled",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "If true, the user cannot interact with this element.\n "
},
{
"name": "autocomplete",
"type": [
"STRING"
],
"objectType": [],
"description": "Whether the value of the control can be automatically completed by the browser.\nList of available options at:\nhttps://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n "
},
{
"name": "autocorrect",
"type": [
"STRING"
],
"objectType": [],
"description": "This is a property supported by Safari that is used to control whether\nautocorrection should be enabled when the user is entering/editing the text.\nPossible values are:\non: Enable autocorrection.\noff: Disable autocorrection.\n "
},
{
"name": "autocapitalize",
"type": [
"STRING"
],
"objectType": [],
"description": "This is a property supported by Safari and Chrome that is used to control whether\nautocapitalization should be enabled when the user is entering/editing the text.\nPossible values are:\ncharacters: Characters capitalization.\nwords: Words capitalization.\nsentences: Sentences capitalization.\nnone: No capitalization.\n "
},
{
"name": "errorMessage",
"type": [
"STRING"
],
"objectType": [],
"description": "Error to show when the input value is invalid.\n "
},
{
"name": "label",
"type": [
"STRING"
],
"objectType": [],
"description": "String used for the label element.\n "
},
{
"name": "maxlength",
"type": [
"NUMBER"
],
"objectType": [],
"description": "Maximum number of characters (in Unicode code points) that the user can enter.\n "
},
{
"name": "minlength",
"type": [
"NUMBER"
],
"objectType": [],
"description": "Minimum number of characters (in Unicode code points) that the user can enter.\n "
},
{
"name": "name",
"type": [
"STRING"
],
"objectType": [],
"description": "The name of the control, which is submitted with the form data.\n "
},
{
"name": "placeholder",
"type": [
"STRING"
],
"objectType": [],
"description": "A hint to the user of what can be entered in the control.\n "
},
{
"name": "readonly",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "This attribute indicates that the user cannot modify the value of the control.\n "
},
{
"name": "required",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Specifies that the user must fill in a value.\n "
},
{
"name": "value",
"type": [
"STRING"
],
"objectType": [],
"description": "The initial value of the control.\nIt can be used for two-way data binding.\n ",
"notify": true
},
{
"name": "invalid",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "This property is set to true when the control value is invalid.\n ",
"notify": true
},
{
"name": "preventInvalidInput",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.\n "
},
{
"name": "list",
"type": [
"STRING"
],
"objectType": [],
"description": "Identifies a list of pre-defined options to suggest to the user.\nThe value must be the id of a <datalist> element in the same document.\n "
},
{
"name": "pattern",
"type": [
"STRING"
],
"objectType": [],
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.\n "
},
{
"name": "title",
"type": [
"STRING"
],
"objectType": [],
"description": "Message to show to the user when validation fails.\n "
}
],
"methods": [
{
"name": "checkValidity",
"description": "Returns true if the current input value satisfies all constraints (if any)",
"parameters": [],
"returns": "BOOLEAN"
},
{
"name": "validate",
"description": "Returns true if `value` is valid.\n`<iron-form>` uses this to check the validity or all its elements.",
"parameters": [],
"returns": "BOOLEAN"
}
],
"events": [
{
"name": "change",
"description": "change",
"properties": []
}
],
"slots": [],
"behaviors": [],
"mixins": [],
"variants": {},
"description": "The text-field element.\n\n### Styling\n\nSee [`<vaadin-text-field>` documentation](https://github.com/vaadin/vaadin-text-field/blob/master/src/vaadin-text-field.html)\nfor `<vaadin-time-picker-text-field>` parts and available slots (prefix, suffix etc.)\n\nSee [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"name": "Vaadin.TimePickerElement",
"tag": "vaadin-time-picker",
"baseUrl": "vaadin-time-picker/src/vaadin-time-picker.html",
"version": "1.0.0-beta1",
"properties": [
{
"name": "autofocus",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Specify that this control should have input focus when the page loads.\n "
},
{
"name": "disabled",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Set to true to disable this input.\n "
},
{
"name": "name",
"type": [
"STRING"
],
"objectType": [],
"description": "The name of this element.\n "
},
{
"name": "value",
"type": [
"STRING"
],
"objectType": [],
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`\n ",
"notify": true
},
{
"name": "label",
"type": [
"STRING"
],
"objectType": [],
"description": "The label for this element.\n "
},
{
"name": "required",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Set to true to mark the input as required.\n "
},
{
"name": "preventInvalidInput",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Set to true to prevent the user from entering invalid input.\n "
},
{
"name": "pattern",
"type": [
"STRING"
],
"objectType": [],
"description": "A pattern to validate the `input` with.\n "
},
{
"name": "errorMessage",
"type": [
"STRING"
],
"objectType": [],
"description": "The error message to display when the input is invalid.\n "
},
{
"name": "placeholder",
"type": [
"STRING"
],
"objectType": [],
"description": "A placeholder string in addition to the label.\n "
},
{
"name": "readonly",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Set to true to prevent user picking a date or typing in the input.\n "
},
{
"name": "invalid",
"type": [
"BOOLEAN"
],
"objectType": [],
"description": "Set to true if the value is invalid.\n ",
"notify": true
},
{
"name": "step",
"type": [
"NUMBER"
],
"objectType": [],
"description": "Specifies the number of valid intervals in a day or in an hour used for\nconfiguring the items displayed in the selection box.\n\nIt also configures the precission of the value string. By default\nthe component formats values as `hh:mm` but setting a step value\nlower than one minute or one second, format resolution changes to\n`hh:mm:ss` and `hh:mm:ss.fff` respectively.\n\nUnit must be set in seconds, and for correctly configuring intervals\nin the dropdown, it need to evenly divide a day or an hour.\n "
},
{
"name": "i18n",
"type": [
"OBJECT"
],
"objectType": [],
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure:\n\n {\n // A function to format given `Object` as\n // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`\n formatTime: (time) => {\n // returns a string representation of the given\n // object in `hh` / 'hh:mm' / 'hh:mm:ss' / 'hh:mm:ss.fff' - formats\n },\n\n // A function to parse the given text to an `Object` in the format\n // `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`.\n // Must properly parse (at least) text\n // formatted by `formatTime`.\n parseTime: text => {\n // Parses a string in object/string that can be formatted by`formatTime`.\n }\n\n // Translation of the time selector icon button title.\n selector: 'Time selector',\n }\n "
}
],
"methods": [
{
"name": "validate",
"description": "Returns true if `value` is valid, and sets the `invalid` flag appropriately.",
"parameters": [],
"returns": "BOOLEAN"
},
{
"name": "checkValidity",
"description": "Returns true if the current input value satisfies all constraints (if any)\n\nYou can override the `checkValidity` method for custom validations.\n ",
"parameters": [],
"returns": "UNDEFINED"
}
],
"events": [
{
"name": "value-changed",
"description": "Fired when the `value` property changes.",
"properties": []
},
{
"name": "invalid-changed",
"description": "Fired when the `invalid` property changes.",
"properties": []
}
],
"slots": [],
"behaviors": [],
"mixins": [
"Vaadin.ElementMixin",
"Vaadin.ControlStateMixin",
"Vaadin.ThemableMixin"
],
"variants": {},
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered."
}
Loading