Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
empower-display
Advanced tools
1. Alert 2. Alert with batch 3. Alert with Dropdown 4. Button with Dropdown 5. Badge 6. Chip 7. Card 8. Nav Tab 9. Info Single 10. Info Multiple 11. Accordion 12. Related Activities 13. Media Thumbnail 14. Snackbar
import {Alert} from 'empower-display';
const getActions = (action, data) => {
switch (data) {
case 'submit':
break;
case 'cancel':
break;
}
}
const configAlert = {
show: true,
actionable: true,
status: "success", // "success", "info", "critical", "warning"
title: "Sample Alert Title",
message: ["Sample Message Here"],
label:'optional Label',
// batch: [],
actions: [
{
label: 'Submit',
clicked: (event) => getActions(event, 'delete-batch'),
isDisabled: false
},
{
label: 'Cancel',
clicked: (event) => getActions(event, 'cancel-alert'),
isDisabled: false
}
],
}
<Alert config={configAlert} />
import {Alert} from 'empower-display';
const getActions = (action, data) => {
switch (data) {
case 'submit':
break;
case 'cancel':
break;
}
}
const configAlertBatch = {
show: true,
actionable: true,
status: "warning", // "success", "info", "critical", "warning"
title: "Sample Alert Title",
message: [
{
title: "EMPLOYEE HAS AN EXISTING BEGINNING BALANCE.",
message: [
"JUAN MARTIN PENAFLORIDA"
]
}
],
label: "optional Label",
batch: 5, //limit before see more
actions : [
{
"label": "Submit",
"isDisabled": false
},
{
"label": "Cancel",
"isDisabled": false
}
]
}
<Alert config={configAlertBatch} />
import {Alert} from 'empower-display';
const getActions = (action, data) => {
switch (data) {
case 'submit':
break;
case 'cancel':
break;
}
}
const configAlertDropdown = {
show: true,
actionable: true,
status: "success",
title: "Sample Alert Title",
message: ["Sample Message Here"],
buttons: [
{
label: 'Start Editing',
icon: <img src="https://storage.googleapis.com/empower-production-assets/images/icons/icon-arrowdown-white.svg" />,
iconPlacement: 'right', // left, right
class: '', // this is optional
withDropDown: true,
actions: [
{
label: 'As Public Template',
action: 'as_public',
isDisabled: false,
tooltip: {
delay:400, // default 400
direction: 'right' ,//top, right, bottom, left
content:'This is the content for tooltop'
}
},
{
label: 'As Assigned Template',
action: 'as_assigned',
isDisabled: false,
tooltip: {
delay:400, // default 400
direction: 'right' ,//top, right, bottom, left
content:'This is the content for tooltop'
}
}
]
},
{
label: 'Choose Another Template',
icon: <img src="https://storage.googleapis.com/empower-production-assets/images/icons/icon-arrowdown-white.svg" />,
iconPlacement: 'right', // left, right
class: 'outline', // this is optional
withDropDown: false, //set to "true" if you want to add dropdown
action: 'another_template' //replace with array "actions" if you want option.
}
]
}
<Alert config={{...configAlertDropdown}} onChange={(action, data) => getActions(action, data)} />
import {Button} from 'empower-display';
const getActions = (action, data) => {
switch (data) {
case 'submit':
break;
case 'cancel':
break;
}
}
const configButtonDropdown = {
show: true,
actionable: true,
status: "success",
title: "Sample Alert Title",
message: ["Sample Message Here"],
label: 'Start Editing',
icon: <img src="https://storage.googleapis.com/empower-production-assets/images/icons/icon-arrowdown-white.svg" />,
iconPlacement: 'left', // left, right
class: 'outline', //this is optional
actions: [
{
label: 'As Public Template',
action: 'as_public',
isDisabled: false,
tooltip: {
delay:400, // default 400
direction: 'right' ,//top, right, bottom, left
content:'This is the content for tooltop'
}
},
{
label: 'As Assigned Template',
action: 'as_assigned',
isDisabled: true,
tooltip: {
delay:400, // default 400
direction: 'right' ,//top, right, bottom, left
content:'This is the content for tooltop'
}
}
],
withDropDown: true
}
<Button config={{...configButtonDropdown}} onChange={(action, data) => getActions(action, data)} />
import {Badge} from 'empower-display';
const configBadge = {
currentStat: 'PRE_APPROVED_DONE',
historyStat: ['REQUEST_STATUS_WARNING']
}
<Badge config={configBadge} />
import {Chip} from 'empower-display';
const configChip = {
removeIcon: true,
label: 'Chip Label',
id: 'chipID',
disabled: false,
}
<Chip config={configChip} onChange={e => getActions(e, 'chip')} />
import {Card} from 'empower-display';
<Card id={'cardId'} > This is a Card Content</Card>
import {NavTab} from 'empower-display';
const configTab = {
tabs: [
{ label: 'On Time', value: 'ON_TIME', status: 'ON_TIME' },
{ label: 'Tardy', value: 'TARDY', status: 'LATE' },
{ label: 'On Leave', value: 'ON_LEAVE', status: null },
{ label: 'Not in Office', value: 'NOT_IN_OFFICE', status: '' }
],
selected: ''
}
<NavTab config={configTab} onChange={e => getActions(e, 'tab')} />
import {Info} from 'empower-display';
const configInfoSingle = {
title: 'Info Title',
info: "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>"
}
<Info config={configInfoSingle} onChange={e => getActions(e, 'info')} />
import {Info} from 'empower-display';
const configInfoMultiple = {
title: 'Info Title',
info: {
infoDetails: {
companyPolicy: "<p><strong>Certifying Daily Time Records (DTR) </strong></p>\n<p>All Employees are expected to certify all DTRs covering a pay period as true, correct, accurate and final that will serve as basis to compute their pay.</p>\n<p><strong>Failure</strong> to certify DTRs shall result to an Auto-Certification at the end of the pay cutoff. Uncertified DTRs will be deemed true, correct, accurate and final, except for Absences incurred on the day of the cutoff itself, either on the 10th or 26th of the month.</p>\n<p>For these absences, either of the following will apply:</p>\n<p>1. The employee is given until the 12th or the 27th to amend the DTR and seek approval;</p>\n<p>2. The Timekeeping & Benefits department will verify the details of the absence incurred and amend the DTR appropriately.</p>\n<p>The Company has two (2) pay cutoff periods:</p>\n<p>1. Payroll for the 15th -- 26th of the previous month to the 10th of the current month 2. Payroll for the 30th -- 11th to the 25th of the current month.</p>\n<p><strong>Clock In</strong></p>\n<p>When an employee clocks into work, the Company’s online system shall provide the applicable status:</p>\n<p><strong> ON TIME</strong> - Clock In before the start of shift and/ or before the grace period (if any) ends</p>\n<p>TARDY - Clock In within the first four (4) hours after the shift has started</p>\n<p>ABSENT (1ST HALF and TARDY) - Clock In beyond the first four (4) hours after the shift has started will be tagged as Tardy. The first four (4) hours after the shift has started will be tagged as Absent - 1st Half.</p>\n<p><strong> Tardiness</strong></p>\n<p>1. Failure to come ON TIME six (6) times or accumulation of at least 60 minutes of TARDINESS (whichever comes first) within the 11th of the current month to the 10th of the following month, shall constitute an offense of TARDINESS.</p>\n<p>Employees are expected to time in upon arriving at their respective office. However, due to unforeseen circumstances preventing the employee to timely Clock In within the Company’s online system, employees are allowed to amend their Clock In time, subject to the approval of their respective Department Head / Immediate Superior. Amendments to Clock In within the Company’s online system can be done on or before the payroll cutoff.</p>\n<p>2. Employee reporting to work after the official start of the assigned work shift and, if any, after the grace period. Applicable only to Time-bounded Work Shifts.</p>\n<p>Tardiness computed in payroll is equivalent to length of time computed as the difference between the clock in time and the grace period. If no Grace Period allowed, it will be the difference between the clock in time and the start of the shift.</p>\n<p>Example:</p>\n<p>Start Time - 6:00 AM</p>\n<p>Grace Period - 6:10 AM (10 minutes from the start of the shift)</p>\n<p>Clock In - 6:15 AM</p>\n<p>Tardiness = 5 minutes (time in excess of the end of the Grace Period)</p>\n<p>Computed Tardiness will be the basis of payroll deductions.</p>\n<p><strong>Clock Out</strong></p>\n<p>When an employee clocks out of work, the Company’s online system shall provide the applicable status:</p>\n<p><strong> SHIFT ENDED</strong> - Clock out on or beyond the end of shift will be tagged as Shift Ended</p>\n<p><strong>UNDERTIME</strong> - Clock out before the expected end of shift will tag the talent as Undertime</p>\n<p><strong>ABSENT (2ND HALF and Undertime)</strong> - Clock out within the first four (4) hours after the shift has started will be tagged as Undertime. The last four (4) hours before the shift ends will be tagged as Absent - 2nd Half.</p>\n<p><strong> Undertime </strong></p>\n<p>An employee leaving work earlier than the required end of a Work Shift. Undertime computed in payroll is equivalent to length of time computed as the difference between the end of shift and the clock out time.</p>\n<p>Example:</p>\n<p>End Time - 3:00 PM</p>\n<p>Clock In - 2:55 PM</p>\n<p>Undertime = 5 minutes (time out short of the end of the Grace Period)</p>\n<p>Computed Undertime will be the basis of payroll deductions.</p>",
systemPolicy: "<p><strong>Certify </strong></p>\n<p>1. Certification of DTR can only be done<strong> within the cutoff. </strong></p>\n<p>2. You cannot certify an <strong>incomplete DTR, current day</strong> and <strong>an ongoing shift. </strong></p>\n<p>3. Failure to certify DTRs shall result to an Auto-Certification at the end of the pay cutoff.</p>\n<p><strong>What you can do:</strong></p>\n<p>1. If with time logged (whether complete or incomplete), allows <strong>DTR amendment</strong> or <strong>Certify</strong>.</p>\n<p>2. If registered Absent, allows DTR amendment, File a Leave or Certify.</p>\n<p><strong>Amendment can be done in the following ways: </strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / DTR amendment</p>\n<p>3. Express Button - Amendment</p>\n<p><strong>Filing of leave can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / File Leave</p>\n<p>3. Express Button - File Leave</p>\n<p><strong>Amend DTR</strong></p>\n<p>1. You cannot amend an<strong> Ongoing / Current Shift.</strong> Filing of DTR amendment is allowed the next day after you have Clocked In.</p>\n<p>2. Amendments are disallowed by the end of the cutoff (10th or 25th).</p>\n<p>3. You are expected to amend your DTR within <strong>twenty-four (24) hours upon return to work</strong> in the succeeding Work Shift.</p>\n<p>4. You can only adjust your CLOCK IN DATE one (1) day prior your Chosen Work Date.</p>\n<p><strong>E.g</strong></p>\n<p>Work Date: November 08, 2019 - 12:00am to 09:00am</p>\n<p>Clock in Date: November 07, 2019 Clock In Time:11:00pm</p>\n<p>Clock out Date: November 08, 2019 Clock out Time:09:00am</p>\n<p>5. You can only adjust your CLOCK OUT DATE one (1) day after your Chosen Work Date.</p>\n<p><strong>E.g</strong></p>\n<p>Work Date: November 08, 2019 - 8:00am to 05:00pm</p>\n<p>Clock in Date: November 08, 2019 Clock In Time:08:00am</p>\n<p>Clock out Date: November 09, 2019 Clock out Time:02:00am</p>\n<p>6. DTR amendment request can be canceled / edited provided the request is still pending.</p>\n<p>7. DTR amendment requests that have already passed or requests that have already been denied cannot be canceled.</p>\n<p>8. DTRs that have been previously certified <strong>CANNOT</strong> be amended.</p>\n<p><strong> File Leave </strong></p>\n<p>1. Filing of Sick / Emergency Leave is allowed the next day after you have Clocked In.</p>\n<p>2. You cannot file a backdated Vacation Leave.</p>\n<p>3. You cannot file a future - dated Sick / Emergency Leave.</p>\n<p>4. The employee is expected to file a Sick or Emergency Leave within the Company online system within <strong>twenty-four (24) hours upon return to work</strong> in the succeeding Work Shift.</p>\n<p>5. Leave request can be edited provided the request is still pending.</p>\n<p>6. Approved leave request can be canceled before the effectivity date.</p>\n<p>7. Reporting to work on a day with a pre-approved SIL.</p>\n<p>- Will cancel the leave</p>\n<p>- Credit back the approved SIL to the Leave balance</p>\n<p>- Record the DTR for the day</p>",
instruction: "<p><strong>What you can do:</strong></p>\n<p>1. If with time logged (whether complete or incomplete), allows DTR amendment or Certify.</p>\n<p>2. If without time logged, allows DTR Amemdment.</p>\n<p>3. If registered Absent, allows DTR amendment, File a Leave or Certify.</p>\n<p><strong>Amendment can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / DTR amendment</p>\n<p>3. Express Button - Amendment</p>\n<p><strong>Filing of leave can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / File Leave</p>\n<p>3. Express Button - File Leave</p>"
},
listRow: [
"COMPANY POLICY",
"SYSTEM POLICY",
"INSTRUCTION"
],
"loaded": false,
"cardIconDesc": false
}
}
<Info config={configInfoMultiple} onChange={e => getActions(e, 'info')} />
import {Accordion} from 'empower-display';
const configAccordion = [
{
title: 'Title 1',
subText: 'Subtext Title 1',
checked:false,
checkBoxShow:true,
content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
},
{
title: 'Title 2',
subText: 'Subtext Title 2',
checked:false,
checkBoxShow:true,
content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
}
]
<Accordion config={configAccordion} onChange={(action, data) => getActions(action, data)} />
import {RelatedActivities} from 'empower-display';
const activities = [
{
badge: SVG_BADGE_APPROVE,
status: 'approved',
desc: 'Desc 1',
date: 'date here',
},
{
badge: SVG_BADGE_PENDING,
status: 'pending',
desc: 'Desc 2',
date: 'date here',
}
]
<RelatedActivities activities={activities} />
import {MediaThumbnail} from 'empower-display';
const mediaThumbProps = {
title: 'Test title',
data: [
{
filename: '123.mp4',
type: 'mp4',
id: '1',
},
{
filename: 'testimage.jpg',
type: 'jpg',
thumbnailPath: 'https://upload.wikimedia.org/wikipedia/commons/e/ee/Sample_abc.jpg',
id: '2',
},
{
filename: 'testimage2.png',
type: 'png',
id: '3',
},
{
filename: 'audio.mp3',
type: 'mp3',
id: '4',
},
{
filename: 'docu.docx',
type: 'docx',
id: '5',
},
{
filename: 'testpdf.pdf',
type: 'pdf',
id: '6',
},
],
}
<MediaThumbnail
{...mediaThumbProps}
getActions={val => getActions(val, 'mediaThumb')}
/>
import {SnackBar} from 'empower-display';
<SnackBar
duration={2}
show={showSnackbar}
onHide={(val) => setShowSnackbar(val)}>
icon={SVG_BADGE_PENDING}
<span>Dynamic Snackbar Content Here</span>
</SnackBar>
FAQs
1. Alert 2. Alert with batch 3. Alert with Dropdown 4. Button with Dropdown 5. Badge 6. Chip 7. Card 8. Nav Tab 9. Info Single 10. Info Multiple 11. Accordion 12. Related Activities 13. Media Thumbnail 14. Snackbar
The npm package empower-display receives a total of 36 weekly downloads. As such, empower-display popularity was classified as not popular.
We found that empower-display demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.