empower-container 0.1.22 → 0.1.25

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -372,6 +372,7 @@ info: 'Sample Information'
372
372
  ```
373
373
 
374
374
  ## Changelog
375
+ * **0.1.24** - Fix close icon not appearing in info menubar
375
376
  * **0.1.22** - Added close icon on info menubar
376
377
  * **0.1.21** - Added mainbutton on modal
377
378
  * **0.1.18** - Fixed dynamic root issues
@@ -54,7 +54,7 @@ var Information = function (_a) {
54
54
  setRowAnchorEl(rowAnchorEl);
55
55
  };
56
56
  var View = function () {
57
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i" }, { children: typeof desc != 'undefined' && desc ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "em-popover-i-close", onClick: hide })] })), (0, jsx_runtime_1.jsx)("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-close", onClick: hide }, { children: Asset_1.SVG_CLOSE }))] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h6", { children: item }) }), rowAnchorEl === key ? (Asset_1.SVG_ARROW_UP) : (Asset_1.SVG_ARROWDOWN)] })), rowAnchorEl === key ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
57
+ return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i" }, { children: typeof desc != 'undefined' && desc ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-close", onClick: hide }, { children: Asset_1.SVG_CLOSE }))] })), (0, jsx_runtime_1.jsx)("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-close", onClick: hide }, { children: Asset_1.SVG_CLOSE }))] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h6", { children: item }) }), rowAnchorEl === key ? (Asset_1.SVG_ARROW_UP) : (Asset_1.SVG_ARROWDOWN)] })), rowAnchorEl === key ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
58
58
  (item === 'SYSTEM POLICY' ? (typeof items != 'undefined' && typeof items.systemPolicy != 'undefined' && items.systemPolicy ? renderHtml(items.systemPolicy) : '') :
59
59
  (typeof items != 'undefined' && typeof items.instruction != 'undefined' && items.instruction ? renderHtml(items.instruction) : '')) }))) : null] }, key)); })) : null) : null] }))) })) });
60
60
  };
@@ -458,20 +458,20 @@ var MenuBar = function (_a) {
458
458
  // Additional title on the modal
459
459
  config && config.addedTitle ? ((0, jsx_runtime_1.jsx)("p", { children: config.addedTitle })) : null] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-beltleft-cta" }, { children: [
460
460
  // Main Button
461
- mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 0 ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-dropdown" }, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ className: "em-button belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
461
+ mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 0 ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-dropdown" }, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ className: "em-button", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
462
462
  return (0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
463
463
  }) })) }))] })) })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
464
- return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? 'belt-action ' + btn.class : 'belt-action', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: btn.label ? btn.label : '' })] }), idx));
464
+ return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? 'em-button ' + btn.class : 'em-button', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: btn.label ? btn.label : '' })] }), idx));
465
465
  })) : null) : null,
466
466
  // Button Actions Configuration
467
467
  button && button.show && button.show.constructor === Boolean &&
468
468
  button.actions && button.actions.constructor === Array && button.actions.length > 0 ? (button.actions.map(function (btn, idx) {
469
- return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : ' belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
469
+ return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : ' em-button' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
470
470
  })) : null,
471
471
  // UndoButton Actions Configuration
472
472
  undoButton && undoButton.show && !undoButton.isFooter &&
473
473
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
474
- return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
474
+ return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'em-button' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
475
475
  })) : null] }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-belt-right" }, { children: [
476
476
  // Dropdown Actions Configuration
477
477
  dropdown && dropdown.show && dropdown.show.constructor === Boolean ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-dropdown" }, { children: [dropdown.type === 'list' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-add" }, { children: dropdown.icon ? dropdown.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle })] }))) : dropdown.type === 'date-picker-weekly' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-arrowdown" }, { children: Asset_1.SVG_ARROWDOWN }))] }))) : dropdown.type === 'date-picker-monthly' ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-arrowdown" }, { children: Asset_1.SVG_ARROWDOWN }))] })), dropdown.showPagination ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("a", __assign({ className: 'belt-prev' + isDisabledDropdownPagination('prev'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'prev-month'); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: Asset_1.SVG_ARROWLEFT })) })), (0, jsx_runtime_1.jsx)("a", __assign({ className: 'belt-next' + isDisabledDropdownPagination('next'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'next-month'); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: Asset_1.SVG_ARROWRIGHT })) }))] })) : null] })) : dropdown.type === 'date-picker-cutoff' ? (((0, jsx_runtime_1.jsx)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: (0, jsx_runtime_1.jsx)("span", { children: dropdown.cutoffValue && dropdown.cutoffValue.label ? dropdown.cutoffValue.label : '' }) })))) : dropdown.type === 'button' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', dropdown.action); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: dropdown.icon ? dropdown.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle })] }))) : ((0, jsx_runtime_1.jsx)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }) }))), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "dropdownPopover", className: Boolean(dropdownPopover) ? 'open-popover' : '', open: Boolean(dropdownPopover), onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: dropdown.type === 'list' ? (dropdown.actions && dropdown.actions.constructor === Array && dropdown.actions.length > 0 ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "popover em-popover-list" }, { children: dropdown.actions.map(function (drpdwn, idx) {
@@ -29,7 +29,7 @@ var Information = function (_a) {
29
29
  setRowAnchorEl(rowAnchorEl);
30
30
  };
31
31
  var View = function () {
32
- return _jsx(React.Fragment, { children: _jsx("div", __assign({ className: "em-popover-i" }, { children: typeof desc != 'undefined' && desc ? (_jsxs("div", __assign({ className: "em-popover-i-content" }, { children: [_jsxs("div", __assign({ className: "em-popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", { className: "em-popover-i-close", onClick: hide })] })), _jsx("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : (_jsxs("div", __assign({ className: "em-popover-i-content" }, { children: [_jsxs("div", __assign({ className: "em-popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", __assign({ className: "em-close", onClick: hide }, { children: SVG_CLOSE }))] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: "em-popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [_jsx("div", { children: _jsx("h6", { children: item }) }), rowAnchorEl === key ? (SVG_ARROW_UP) : (SVG_ARROWDOWN)] })), rowAnchorEl === key ? (_jsx("div", __assign({ className: "em-popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
32
+ return _jsx(React.Fragment, { children: _jsx("div", __assign({ className: "em-popover-i" }, { children: typeof desc != 'undefined' && desc ? (_jsxs("div", __assign({ className: "em-popover-i-content" }, { children: [_jsxs("div", __assign({ className: "em-popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", __assign({ className: "em-close", onClick: hide }, { children: SVG_CLOSE }))] })), _jsx("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : (_jsxs("div", __assign({ className: "em-popover-i-content" }, { children: [_jsxs("div", __assign({ className: "em-popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", __assign({ className: "em-close", onClick: hide }, { children: SVG_CLOSE }))] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: "em-popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [_jsx("div", { children: _jsx("h6", { children: item }) }), rowAnchorEl === key ? (SVG_ARROW_UP) : (SVG_ARROWDOWN)] })), rowAnchorEl === key ? (_jsx("div", __assign({ className: "em-popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
33
33
  (item === 'SYSTEM POLICY' ? (typeof items != 'undefined' && typeof items.systemPolicy != 'undefined' && items.systemPolicy ? renderHtml(items.systemPolicy) : '') :
34
34
  (typeof items != 'undefined' && typeof items.instruction != 'undefined' && items.instruction ? renderHtml(items.instruction) : '')) }))) : null] }, key)); })) : null) : null] }))) })) });
35
35
  };
@@ -453,20 +453,20 @@ var MenuBar = function (_a) {
453
453
  // Additional title on the modal
454
454
  config && config.addedTitle ? (_jsx("p", { children: config.addedTitle })) : null] })), _jsxs("div", __assign({ className: "em-beltleft-cta" }, { children: [
455
455
  // Main Button
456
- mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 0 ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-dropdown" }, { children: [_jsxs("a", __assign({ className: "em-button belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), _jsx("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), _jsx(Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: _jsx("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
456
+ mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 0 ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-dropdown" }, { children: [_jsxs("a", __assign({ className: "em-button", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), _jsx("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), _jsx(Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: _jsx("div", __assign({ className: "em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
457
457
  return _jsx("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
458
458
  }) })) }))] })) })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
459
- return (_jsxs("a", __assign({ className: btn.class ? 'belt-action ' + btn.class : 'belt-action', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [_jsx("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), _jsx("span", { children: btn.label ? btn.label : '' })] }), idx));
459
+ return (_jsxs("a", __assign({ className: btn.class ? 'em-button ' + btn.class : 'em-button', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [_jsx("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), _jsx("span", { children: btn.label ? btn.label : '' })] }), idx));
460
460
  })) : null) : null,
461
461
  // Button Actions Configuration
462
462
  button && button.show && button.show.constructor === Boolean &&
463
463
  button.actions && button.actions.constructor === Array && button.actions.length > 0 ? (button.actions.map(function (btn, idx) {
464
- return (_jsxs("a", __assign({ className: btn.class ? btn.class : ' belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [_jsx("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
464
+ return (_jsxs("a", __assign({ className: btn.class ? btn.class : ' em-button' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [_jsx("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
465
465
  })) : null,
466
466
  // UndoButton Actions Configuration
467
467
  undoButton && undoButton.show && !undoButton.isFooter &&
468
468
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
469
- return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
469
+ return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'em-button' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
470
470
  })) : null] }))] })), _jsxs("div", __assign({ className: "em-belt-right" }, { children: [
471
471
  // Dropdown Actions Configuration
472
472
  dropdown && dropdown.show && dropdown.show.constructor === Boolean ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-dropdown" }, { children: [dropdown.type === 'list' ? (_jsxs("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("div", __assign({ className: "icon-add" }, { children: dropdown.icon ? dropdown.icon : '' })), _jsx("span", { children: dropdownTitle })] }))) : dropdown.type === 'date-picker-weekly' ? (_jsxs("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("span", { children: dropdownTitle }), _jsx("div", __assign({ className: "icon-arrowdown" }, { children: SVG_ARROWDOWN }))] }))) : dropdown.type === 'date-picker-monthly' ? (_jsxs(Fragment, { children: [_jsxs("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("span", { children: dropdownTitle }), _jsx("div", __assign({ className: "icon-arrowdown" }, { children: SVG_ARROWDOWN }))] })), dropdown.showPagination ? (_jsxs(Fragment, { children: [_jsx("a", __assign({ className: 'belt-prev' + isDisabledDropdownPagination('prev'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'prev-month'); } }, { children: _jsx("div", __assign({ className: "belt-icon" }, { children: SVG_ARROWLEFT })) })), _jsx("a", __assign({ className: 'belt-next' + isDisabledDropdownPagination('next'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'next-month'); } }, { children: _jsx("div", __assign({ className: "belt-icon" }, { children: SVG_ARROWRIGHT })) }))] })) : null] })) : dropdown.type === 'date-picker-cutoff' ? ((_jsx("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: _jsx("span", { children: dropdown.cutoffValue && dropdown.cutoffValue.label ? dropdown.cutoffValue.label : '' }) })))) : dropdown.type === 'button' ? (_jsxs("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', dropdown.action); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: dropdown.icon ? dropdown.icon : '' })), _jsx("span", { children: dropdownTitle })] }))) : (_jsx("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: _jsx("span", { children: dropdownTitle }) }))), _jsx(Popover, __assign({ id: "dropdownPopover", className: Boolean(dropdownPopover) ? 'open-popover' : '', open: Boolean(dropdownPopover), onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: dropdown.type === 'list' ? (dropdown.actions && dropdown.actions.constructor === Array && dropdown.actions.length > 0 ? (_jsx("div", __assign({ className: "popover em-popover-list" }, { children: dropdown.actions.map(function (drpdwn, idx) {
@@ -1,6 +1,10 @@
1
1
  .em-belt-info {
2
2
  position: relative;
3
3
 
4
+ .em-popover {
5
+ width: 650px;
6
+ }
7
+
4
8
  .em-info-icon {
5
9
  display: flex;
6
10
  justify-content: center;
@@ -49,6 +53,11 @@
49
53
  display: flex;
50
54
  justify-content: space-between;
51
55
  align-items: center;
56
+
57
+ h6 {
58
+ font-size: $text-sm;
59
+ text-transform: uppercase;
60
+ }
52
61
  }
53
62
 
54
63
  .em-popover-i-category {
@@ -7,12 +7,13 @@
7
7
 
8
8
  .em-dropdown {
9
9
  position: relative;
10
+ min-width: 100px;
10
11
  }
11
12
 
12
13
  .em-belt-left {
13
14
  display: flex;
14
15
  align-items: center;
15
- flex-wrap: wrap;
16
+ flex-wrap: nowrap;
16
17
 
17
18
  .belt-info {
18
19
  margin-left: 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "empower-container",
3
- "version": "0.1.22",
3
+ "version": "0.1.25",
4
4
  "private": false,
5
5
  "main": "./dist/cjs/ndex.js",
6
6
  "module": "./dist/esm/index.js",
@@ -19,6 +19,7 @@
19
19
  "react-dom": "^17.0.2",
20
20
  "react-native": "^0.68.0",
21
21
  "react-native-render-html": "^6.3.4",
22
+ "react-refresh": "^0.14.0",
22
23
  "react-scripts": "5.0.0",
23
24
  "sass": "^1.49.9",
24
25
  "scss": "^0.2.4",