Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
apostrophe-anchor-field-type
Advanced tools
Readme
Improves apostrophe-schemas
to add an anchor
field type that displays all id
and name
attributes from the target remote URL.
An anchor field depends on other schema fields to tell it what URLs it should look up to find id
s and name
s. You must provide a remoteAnchorsFields
property to tell it what fields to connect to.
// ... other schema fields
{
type: 'anchor',
name: 'anchor',
label: 'Anchor ID',
remoteAnchorsFields: ['_page', 'url'],
}
remoteAnchorsFields
is an array of field names in the schema.
Shorthand makes the assumption that _page
is a join (because of the leading _ in its name) and, conversely, that url
is a string field. These assumptions also mean that:
joinByOne
field type, and should be treated as such in the context of the current site. // ... other schema fields
{
type: 'anchor',
name: 'anchor',
label: 'Anchor ID',
remoteAnchorsFields: {
fieldName: '_page',
urlType: 'relative',
fieldType: 'join'
},
}
Spells out what is assumed in shorthand syntax.
urlType
tells module how to request the remote page.fieldType
tells module what type of apostrophe field to connect to. // ... other schema fields
{
type: 'anchor',
name: 'anchor',
label: 'Anchor ID',
remoteAnchorsFields: [
{
fieldName: '_page',
urlType: 'relative',
fieldType: 'join'
},
{
fieldName: 'url',
urlType: 'absolute',
fieldType: 'string'
},
],
}
FAQs
Adds an `anchor` field type to apostrophe-schemas that populates a select with ID and name attributes from a target URL
The npm package apostrophe-anchor-field-type receives a total of 5 weekly downloads. As such, apostrophe-anchor-field-type popularity was classified as not popular.
We found that apostrophe-anchor-field-type demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.