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.
@refinitiv-ui/core
Advanced tools
Core functionality for building Element Framework elements, it exports the following classes:
A base class for extending simple element that have minimal functionality.
import { BasicElement } from '@refinitiv-ui/core';
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
@customElement('my-avatar')
class MyAvatar extends BasicElement {
...
}
A base class for extending control element, usually referred to as form elements. These controls have additional functionality, such as, disabled and read-only states.
import { ControlElement } from '@refinitiv-ui/core';
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
@customElement('my-button')
class MyButton extends ControlElement {
...
}
A base class for extending element which needs to respond to their dimensions e.g data visualizations. The base class provides resize observer callback which will trigger whenever that the element's dimensions are changed.
import { ResponsiveElement } from '@refinitiv-ui/core';
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
@customElement('my-chart')
class MyChart extends ResponsiveElement {
...
}
The core provides a way of showing uniform deprecation notices, when deprecated features are used in elements.
import { BasicElement, DeprecationNotice } from '@refinitiv-ui/core';
class MyElement extends BasicElement {
private deprecationNotice = new DeprecationNotice(
'The feature of hopping has be replaced by skipping. Please update to use the latest API.',
'https://a.support.link'
)
private showDeprecationNotice () {
// you can some logic to check if deprecated features are being used
if (!this.deprecationNotice.shown && deprecatedFeatureUsed) {
this.deprecationNotice.show();
}
}
}
All errors handling in the core should use the GenericError
class. Also, where possible, you should provide an additional support URL. Additional error types can be added to ./src/errors/
.
import { GenericError } from './src/errors/GenericError';
throw new GenericError(
// Message
'Something has gone wrong',
// Support URL
'https://support/error/something'
);
FAQs
Element Framework Core
We found that @refinitiv-ui/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.