Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
ember-railio-form-components
Advanced tools
An Ember addon for data-down/action-up based form-fields for (Ember) objects. By installing this addon, you can use the form-field component to add form-fields that can be used on data-down / action-up.
If you want to use our paper form fields, you install the addon as described below. Click here for the documentation.
In your application's directory:
$ ember install ember-railio-form-components
The form-field component can be used directly with some build-in types:
Is like a normal text-field, but calls the update function not on each change / keydown, but only on pressing enter or leaving the input.
Is a lazy-text-field, but only accepts numeric values. You'll be able to use the arrow-up and arrow-down key to increase or decrease the value.
Indicates a boolean value, so can only be false or true.
Needs a datetime as a value, and uses a datepicker for selecting the date. Also you are able to set the current datetime and empty the value.
Button that opens a file dialog, and uses an EmberArray
containing the files selected by the user (as native File
objects) as a value.
Unlike the other fields this field does not show an initial value, as it can only handle files after the user selects them in a browser dialog (its behaviour mimics that of an HTMLInputElement
with type=file
)
Available options:
false
'file'
type
when it is one of image, video or audio) defaults to '*/*'
'upload'
Other form-components that are need to be used with the block-form:
By using the block-form you could use your own written components when they have a 'value' and call the update action for using data-down/action-up.
Because the form-field component is build for using data-down/action-up, you need to have an action in your project that handles the changes. So in your project's component, you need an update action. This way you have your data handling on just one place, so when you want to do something on each change, like a validation, you are able to put this on just one location in your code.
actions: {
update(object, propertyPath, newValue) {
Ember.set(object, propertyPath, newValue);
}
}
The form-field component can be used by calling it with the wanted field type. In your Handlebars templates:
{{form-field type="text-area"
object=movie
propertyPath="description"
updated=(action "update")
disabled=locked}}
On each change of the value, the updated action is called with the new value.
You could use the block-form usage of the form-field component with components that are not directly usable of if you need to add more information to the used component.
{{#form-field object=movie
propertyPath="description"
updated=(action "update")
disabled=locked
as |value updated disabled|}}
{{text-area value=value
updated=updated
disabled=disabled}}
{{/form-field}}
You can use your own components by using the form-field component in block form, like shown above.
FAQs
Addon for all shared railio components.
The npm package ember-railio-form-components receives a total of 0 weekly downloads. As such, ember-railio-form-components popularity was classified as not popular.
We found that ember-railio-form-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.