Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ember-arcgis-portal-components
Advanced tools
ember install ember-arcgis-portal-components
The item picker component allows a user to search a portal for items, see a preview of the item, and then get the item returned. While commonly used in a modal, the component can be used in any context.
{{item-picker
selectAction=(action "onSelectItem")}}
As soon as the component is rendered, it will execute a search and show the results
{{item-picker
searchItemsOnInit=true
selectAction=(action "onSelectItem")}}
In this mode, an array of items will be passed to the closure action.
{{item-picker
selectMultiple=true
selectAction=(action "onSelectItem")}}
Passing a catalog
array will allows the developer to control the search to a much higher degree.
// in the controller...
facets: [
{
name: 'All',
params: {query: { access: 'public'}}
},
{
name: 'Waste Water Apps',
params: {
query: {
type: ['Web Mapping Application'],
typekeywords: ['-story'],
tags: ['Waste Water']
}
}
}
]
The entries in this array will be used to generate a AGO search. Documentation of this schema will be forthcoming.
// in template
{{item-picker
searchItemsOnInit=true
catalog=facets
selectAction=(action "onSelectItem")}}
If more the catalog
array has more than one entry, a "facets" list will be shown on the left of the component, and it will use the name
property. So - the code above will have two facets called 'All' and 'Waste Water Apps'.
Many times an application will need to do more in-depth interrogation of an item before it can use it. The validation system is designed to accomodate this need.
{{item-picker
selectAction=(action "onSelectItem")
onSelectionValidator=(action "selectionValidator") }}
// in controller...
actions: {
selectionValidator(item) {
// validation logic of whatever type...
if (item.something) {
return {
item: item,
status: 'error',
message: 'This item can not be used because ...'
}
} else {
// you can also manipulate the item here if you want...
return {
item: item,
status: 'ok'
};
}
}
}
In some applications we have need to search for items in different portals. To address this, we can pass portalOpts
into the component.
// in Controller
portalOpts: {
portalBaseUrl: 'https://someotherportal.com',
token: 'cb12---TOKEN-FOR-PORTAL---34..'
}
{{item-picker
selectAction=(action "onSelectItem")
portalOpts=portalOpts }}
All of these options can be combined
git clone <repository-url>
this repositorycd ember-arcgis-portal-components
npm install
bower install
ember serve
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.
FAQs
Ember components that help when working with ArcGIS Online/Enterprise items
We found that ember-arcgis-portal-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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.