Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@wework/inventory-manager-components
Advanced tools
An embedded Inventory Manager Tool
NPM
You might need npm login
You will need to be logged in to install a dependency. Execute
npm login
and use the username, password, and e-mail found in 1Password under npmjs (dev-team).
npm install @wework/inventory-manager-components
# Yarn
yarn add @wework/inventory-manager-components
import React from 'react'
import { SessionInventoryManager } from '@wework/inventory-manager-components'
const ApplicationComponent = () => {
return (
<SessionInventoryManager
configuration={{
appId: 'appId',
appSecret: 'appSecret',
baseUrl: 'https://occupancy-api.phoenix.dev.wwrk.co/v2',
}}
buildingId="b308b94c-bca6-4318-b906-1c148f7ca183"
/>
)
}
In order to release a new version, first after making PR and merging to master, we pull the latest master version, and run
yarn run publish:v2
This will release a new version on npm of each updated package, and we'll be able to use it to update.
In order to deploy a new version on standalone, we'll have first to release a new version of Inventory manager components on NPM then update according to the new version the package.json located in Inventory-manager-tool repo, After updating and pushing to master it will automatically update both standalone production and staging.
In order to deploy a new version on spacestation, after releasing a new update of inventory-manager-componenets we will go to spacestation's repo package.json and update accordinly the version. After updating, making a PR and pushing to master it will automatically update production of inventory manager. a staging as well as a preproduction will be automatically deployed upon PR.
Sidebars are controlled from the HOC WithSidebars
value={{ isOpen, openSideBar, closeSideBar, sideBarName }}
isOpen: Is to determine wheter the sidebar is open.
openSideBar('name'): Takes name as a parameter and opens the sidebar with the selected option.
sideBarName: The current sidebar name
closeSidebar: Will close the sidebar and set the name to null
If we want to open a sidebar after an action we just call the following:
ex: openSideBar("BuildingInfo")
If we want to close a sidebar after an action we call:
closeSideBar()
Snackbars are also controlled via a HOC , withSnackbar, we can edit the behavior if needed on SnackBarProvider.js
If we want to display an alert we need to attach our component to the HOC, example:
export default withSnackbar(OfficeNoteEditModal)
Then we call snackBars from the props, and we can add an alert:
snackBars.addAlert({
text: `Note has been saved.`,
variant: 'success',
})
There are 3 types of snackbars,
Modals can be called anytime via their components and controlled by the parent,
We usually control if they are open or no via the following props
open
and onClose
We can also customise them depending on the use Case,
Example
<Modal
open={modalData.open}
title={'Confirm Action'}
content={modalData.content}
confirmText={'YES'}
cancelText={'NO'}
onConfirm={modalData.onConfirm}
onClose={() => setModalData({ ...modalData, open: false })}
/>
Or we can create our own Modal and call it directly.
FAQs
Embedded Inventory Manager Components
The npm package @wework/inventory-manager-components receives a total of 18 weekly downloads. As such, @wework/inventory-manager-components popularity was classified as not popular.
We found that @wework/inventory-manager-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.