Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@synerise/ds-operators

Package Overview
Dependencies
Maintainers
0
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synerise/ds-operators

Operators UI Component for the Synerise Design System

  • 0.14.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

id: operators title: Operators

Operators UI Component

Installation

npm i @synerise/ds-operators
or
yarn add @synerise/ds-operators

Usage

import Operators from '@synerise/ds-operators'

<Operators
    texts={{
      buttonLabel: 'Choose',
      searchPlaceholder: 'Search',
      noResults: 'No results',
    }}
    onChange={(item) => {}}
    value={{
      'id': 'NUMBER_ONEEQUAL',
      'value': 'NUMBER_ONEEQUAL',
      'logic': 'EQUAL',
      'name': 'Equal',
      'groupId': 'NUMBER_ONE',
      'group': 'NUMBER_ONE',
      'icon': <HashM />,
    }}
    items={[ {
      'id': 'NUMBER_ONEEQUAL',
      'value': 'NUMBER_ONEEQUAL',
      'logic': 'EQUAL',
      'name': 'Equal',
      'groupId': 'NUMBER_ONE',
      'group': 'NUMBER_ONE',
      'icon': <HashM />,
    },
      {
        'id': 'DATE_ONEMORE',
        'value': 'DATE_ONEMORE',
        'logic': 'MORE',
        'name': 'More than',
        'groupId': 'DATE_ONE',
        'group': 'DATE_ONE',
        'icon': <CalendarM />,
        'groupName': 'Date',
      }]}
    groups={[{
      'id': 'DATE_ONE',
      'name': 'Date',
      'itemsType': null,
      'tooltip': 'Date',
      'icon': <CalendarM />,
      'defaultGroup': true,
    }, {
      'id': 'NUMBER_ONE',
      'name': 'Number',
      'itemsType': null,
      'tooltip': 'Number',
      'icon': <HashM />,
      'defaultGroup': false,
    }]}
/>

Demo

API

PropertyDescriptionTypeDefault
errorerror validationboolean-
getPopupContainerOverridePopup container function for child tooltips and dropdowns(trigger: HTMLElement \ null) => HTMLElement;-
groupsGroups of operatorsOperatorsGroup[][]
itemsArray of operatorsOperatorsItem[][]
onActivateCallback called when user opens dropdown(fieldType: string) => void-
onChangeCallback called when user selects operator(item: OperatorsItem \ OperatorsGroup \ undefined) => void-
onDeactivateCallback called when user closes dropdown() => void-
openedWhether if dropdown should opens from outside of componentbooleanfalse
textsTranslations objectOperatorTexts-
valueSelected operatorOperatorsItem \ undefinedundefined

OperatorsGroup

PropertyDescriptionTypeDefault
defaultGroupWhether if this group is defaultbooleanfalse
iconIcon of groupReact.ReactNode-
idId of groupReact.ReactText-
itemTypeType of itemsstring-
nameName of groupstring-
subGroupsSubgroups of groupsOperatorsGroup[]-
tooltipTooltip textstring-

OperatorsItem

PropertyDescriptionTypeDefault
groupGroup of itemstring-
groupIdId of groupReact.ReactText-
groupNameName of groupstring-
iconIcon of operatorReact.ReactNode-
idId of itemReact.ReactText-
logicLogic of operatorstring-
nameName of operatorstring-
subGroupsSubgroups of operatorOperatorsGroup[]-
value?Value of operatorstring-

OperatorTexts

PropertyDescriptionTypeDefault
buttonLabelButton label'Choose'
noResultsNo results info'No results'
searchPlaceholderSearch box placeholder'Search'

FAQs

Package last updated on 29 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc