empower-container 0.1.3 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +240 -236
  2. package/dist/cjs/DatetimeFormatter.js +24 -21
  3. package/dist/cjs/Information.js +6 -8
  4. package/dist/cjs/MenuBar.d.ts +0 -1
  5. package/dist/cjs/MenuBar.js +21 -18
  6. package/dist/cjs/Modal.d.ts +1 -0
  7. package/dist/cjs/Modal.js +2 -2
  8. package/dist/cjs/assets/Asset.d.ts +1 -0
  9. package/dist/cjs/assets/Asset.js +2 -1
  10. package/dist/cjs/inputs/Input.d.ts +0 -1
  11. package/dist/cjs/inputs/Input.js +0 -1
  12. package/dist/cjs/inputs/InputSelectionHandler.d.ts +1 -1
  13. package/dist/cjs/inputs/Select.d.ts +0 -1
  14. package/dist/cjs/inputs/Select.js +3 -3
  15. package/dist/esm/DatetimeFormatter.js +24 -21
  16. package/dist/esm/Information.js +4 -3
  17. package/dist/esm/MenuBar.d.ts +0 -1
  18. package/dist/esm/MenuBar.js +22 -19
  19. package/dist/esm/Modal.d.ts +1 -0
  20. package/dist/esm/Modal.js +2 -2
  21. package/dist/esm/assets/Asset.d.ts +1 -0
  22. package/dist/esm/assets/Asset.js +1 -0
  23. package/dist/esm/inputs/Input.d.ts +0 -1
  24. package/dist/esm/inputs/Input.js +0 -1
  25. package/dist/esm/inputs/Select.d.ts +0 -1
  26. package/dist/esm/inputs/Select.js +3 -3
  27. package/dist/scss/components/_modal.scss +41 -30
  28. package/dist/scss/elements/_button.scss +1 -3
  29. package/dist/scss/elements/_popover.scss +6 -38
  30. package/dist/scss/foundation/_mixins.scss +0 -2
  31. package/dist/scss/foundation/_typography.scss +0 -4
  32. package/dist/scss/library/_information.scss +68 -0
  33. package/dist/scss/library/{input.scss → _input.scss} +0 -2
  34. package/dist/scss/library/{menubar.scss → _menubar.scss} +0 -2
  35. package/{src/scss/library/select.scss → dist/scss/library/_select.scss} +0 -4
  36. package/dist/scss/style.scss +21 -5
  37. package/package.json +6 -3
  38. package/src/main/DatetimeFormatter.js +24 -21
  39. package/src/main/DatetimeFormatter.tsx +7 -4
  40. package/src/main/Information.js +13 -15
  41. package/src/main/Information.tsx +40 -36
  42. package/src/main/MenuBar.d.ts +0 -1
  43. package/src/main/MenuBar.js +26 -22
  44. package/src/main/MenuBar.tsx +41 -37
  45. package/src/main/Modal.d.ts +1 -0
  46. package/src/main/Modal.js +5 -5
  47. package/src/main/Modal.tsx +7 -10
  48. package/src/main/assets/Asset.d.ts +1 -0
  49. package/src/main/assets/Asset.js +5 -1
  50. package/src/main/assets/Asset.tsx +9 -0
  51. package/src/main/inputs/Input.d.ts +0 -1
  52. package/src/main/inputs/Input.js +0 -1
  53. package/src/main/inputs/Input.tsx +0 -1
  54. package/src/main/inputs/Select.d.ts +0 -1
  55. package/src/main/inputs/Select.js +3 -3
  56. package/src/main/inputs/Select.tsx +3 -3
  57. package/src/main/tsconfig.common.json +2 -1
  58. package/src/main/tsconfig.json +1 -0
  59. package/src/sample/App.d.ts +0 -1
  60. package/src/sample/App.js +1 -1
  61. package/src/sample/App.tsx +2 -1
  62. package/src/sample/TestMenuBar.js +24 -4
  63. package/src/sample/TestMenuBar.tsx +40 -10
  64. package/src/scss/components/_modal.scss +41 -30
  65. package/src/scss/elements/_button.scss +1 -3
  66. package/src/scss/elements/_popover.scss +6 -38
  67. package/src/scss/foundation/_mixins.scss +0 -2
  68. package/src/scss/foundation/_typography.scss +0 -4
  69. package/src/scss/library/_information.scss +68 -0
  70. package/src/scss/library/{input.scss → _input.scss} +0 -2
  71. package/src/scss/library/{menubar.scss → _menubar.scss} +0 -2
  72. package/{dist/scss/library/select.scss → src/scss/library/_select.scss} +0 -4
  73. package/src/scss/style.scss +21 -5
  74. package/dist/assets/Asset.d.ts +0 -14
  75. package/dist/assets/Asset.js +0 -43
  76. package/dist/assets/Asset.tsx +0 -66
  77. package/dist/assets/icons/icon-check-white-sm.svg +0 -3
  78. package/dist/assets/images/icon-arrowdown-graydark.svg +0 -3
  79. package/dist/assets/images/icon-arrowleft-graydark.svg +0 -3
  80. package/dist/assets/images/icon-arrowright-graydark.svg +0 -3
  81. package/dist/assets/images/icon-arrowup-graydark.svg +0 -3
  82. package/dist/assets/images/icon-check-graydark.svg +0 -3
  83. package/dist/scss/components/_index.scss +0 -1
  84. package/dist/scss/foundation/_index.scss +0 -5
  85. package/dist/scss/library/_index.scss +0 -3
  86. package/src/scss/components/_index.scss +0 -1
  87. package/src/scss/foundation/_index.scss +0 -5
  88. package/src/scss/library/_index.scss +0 -3
@@ -28,7 +28,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
28
28
  /* eslint-disable jsx-a11y/anchor-is-valid */
29
29
  var react_1 = require("react");
30
30
  require("../scss/style.scss");
31
- require("../scss/library/menubar.scss");
32
31
  // Imports
33
32
  var Asset_1 = require("./assets/Asset");
34
33
  var Constant_1 = require("./constants/Constant");
@@ -60,15 +59,16 @@ var MenuBar = function (_a) {
60
59
  var _s = (0, react_1.useState)(undoButton && undoButton.show ? true : false), undoShow = _s[0], setUndoShow = _s[1];
61
60
  var _t = (0, react_1.useState)(false), doneTimer = _t[0], setDoneTimer = _t[1];
62
61
  (0, react_1.useEffect)(function () {
62
+ var filteredMonthList = [];
63
63
  if (dropdown && dropdown.minMonth) {
64
- var filteredMonthList = __spreadArray([], Constant_1.MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.minMonth.toLowerCase()); });
64
+ filteredMonthList = __spreadArray([], Constant_1.MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.minMonth.toLowerCase()); });
65
65
  if (filteredMonthList.length > 0) {
66
66
  minMonthIdx = Constant_1.MONTH_LIST.indexOf(filteredMonthList[0]);
67
67
  setMinMonthIdx(minMonthIdx);
68
68
  }
69
69
  }
70
70
  if (dropdown && dropdown.maxMonth) {
71
- var filteredMonthList = __spreadArray([], Constant_1.MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.maxMonth.toLowerCase()); });
71
+ filteredMonthList = __spreadArray([], Constant_1.MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.maxMonth.toLowerCase()); });
72
72
  if (filteredMonthList.length > 0) {
73
73
  maxMonthIdx = Constant_1.MONTH_LIST.indexOf(filteredMonthList[0]);
74
74
  setMaxMonthIdx(maxMonthIdx);
@@ -330,6 +330,11 @@ var MenuBar = function (_a) {
330
330
  var dateMonthlyPickerHandler = function (e, action, data) {
331
331
  if (data === void 0) { data = ''; }
332
332
  var _a = __assign({}, dropdown), maxYear = _a.maxYear, minYear = _a.minYear;
333
+ var newDateValue = null;
334
+ var standardDate = null;
335
+ var selectedMonthDate = null;
336
+ var monthIdx = null;
337
+ var fullYear = null;
333
338
  if (action === 'next') {
334
339
  if (!maxYear || (maxYear && parseInt(maxYear) >= calendarYear + 1)) {
335
340
  calendarYear += 1;
@@ -343,15 +348,14 @@ var MenuBar = function (_a) {
343
348
  }
344
349
  }
345
350
  else if (action === 'month-selection') {
346
- var newDateValue = (0, DatetimeFormatter_1.default)(data + ' ' + calendarYear, 'month-year');
351
+ newDateValue = (0, DatetimeFormatter_1.default)(data + ' ' + calendarYear, 'month-year');
347
352
  actionRequestHandler(e, 'dropdown', newDateValue);
348
353
  }
349
354
  else if (action === 'next-month') {
350
- var standardDate = (0, DatetimeFormatter_1.default)(dropdown.selection.startDate, 'date-standard');
351
- var selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
352
- // selectedMonthDate = new Date(selectedMonthDate);
353
- var monthIdx = selectedMonthDate.getMonth();
354
- var fullYear = selectedMonthDate.getFullYear();
355
+ standardDate = (0, DatetimeFormatter_1.default)(dropdown.selection.startDate, 'date-standard');
356
+ selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
357
+ monthIdx = selectedMonthDate.getMonth();
358
+ fullYear = selectedMonthDate.getFullYear();
355
359
  if (monthIdx + 1 < 12) {
356
360
  monthIdx = monthIdx + 1;
357
361
  }
@@ -360,16 +364,15 @@ var MenuBar = function (_a) {
360
364
  fullYear = fullYear + 1;
361
365
  }
362
366
  if ((!maxYear && !maxMonthIdx) || fullYear < parseInt(maxYear) || (fullYear === parseInt(maxYear) && monthIdx <= parseInt(maxMonthIdx))) {
363
- var newDateValue = (0, DatetimeFormatter_1.default)(Constant_1.MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
367
+ newDateValue = (0, DatetimeFormatter_1.default)(Constant_1.MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
364
368
  actionRequestHandler(e, 'dropdown', newDateValue, false);
365
369
  }
366
370
  }
367
371
  else if (action === 'prev-month') {
368
- var standardDate = (0, DatetimeFormatter_1.default)(dropdown.selection.startDate, 'date-standard');
369
- var selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
370
- // selectedMonthDate = new Date(selectedMonthDate);
371
- var monthIdx = selectedMonthDate.getMonth();
372
- var fullYear = selectedMonthDate.getFullYear();
372
+ standardDate = (0, DatetimeFormatter_1.default)(dropdown.selection.startDate, 'date-standard');
373
+ selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
374
+ monthIdx = selectedMonthDate.getMonth();
375
+ fullYear = selectedMonthDate.getFullYear();
373
376
  if (monthIdx - 1 >= 0) {
374
377
  monthIdx = monthIdx - 1;
375
378
  }
@@ -378,8 +381,8 @@ var MenuBar = function (_a) {
378
381
  fullYear = fullYear - 1;
379
382
  }
380
383
  if ((!minYear && !minMonthIdx) || fullYear > parseInt(minYear) || (fullYear === parseInt(minYear) && monthIdx >= parseInt(minMonthIdx))) {
381
- var newDateValue = (0, DatetimeFormatter_1.default)(Constant_1.MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
382
- actionRequestHandler(e, 'dropdown', newDateValue, false);
384
+ var newDateValue_1 = (0, DatetimeFormatter_1.default)(Constant_1.MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
385
+ actionRequestHandler(e, 'dropdown', newDateValue_1, false);
383
386
  }
384
387
  }
385
388
  };
@@ -451,7 +454,7 @@ var MenuBar = function (_a) {
451
454
  // Title Information Configuration
452
455
  config && config.titleDescription ? ((0, jsx_runtime_1.jsx)("p", { children: config.titleDescription })) : null] })),
453
456
  // Information Configuration
454
- config && config.nativePopover === undefined && config.showInfo && config.showInfo.constructor === Boolean ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("a", __assign({ href: "#", className: "belt-info", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: (0, jsx_runtime_1.jsx)("i", { className: "belt-icon" }) })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: (0, jsx_runtime_1.jsx)(Information_1.default, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) : null,
457
+ config && config.showInfo.constructor === Boolean && config.showInfo === true ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-belt-info" }, { children: [(0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-info-icon" }, { children: Asset_1.SVG_INFORMATION })) })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: (0, jsx_runtime_1.jsx)(Information_1.default, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) })) : null,
455
458
  // Additional title on the modal
456
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: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ className: "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) {
457
460
  return (0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import '../scss/style.scss';
2
3
  interface IModalProps {
3
4
  id?: string;
4
5
  show: boolean;
package/dist/cjs/Modal.js CHANGED
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var react_dom_1 = __importDefault(require("react-dom"));
19
19
  var MenuBar_1 = __importDefault(require("./MenuBar"));
20
+ require("../scss/style.scss");
20
21
  var Modal = function (_a) {
21
22
  var id = _a.id, show = _a.show, hideMenuBar = _a.hideMenuBar, config = _a.config, getActions = _a.getActions, children = _a.children, button = _a.button, dropdown = _a.dropdown, search = _a.search, pagination = _a.pagination, pivot = _a.pivot, check = _a.check, toggle = _a.toggle, undoButton = _a.undoButton, mainButton = _a.mainButton, buttonFooter = _a.buttonFooter, info = _a.info, customClass = _a.customClass;
22
23
  var sendActions = function (actions, data) {
@@ -26,7 +27,6 @@ var Modal = function (_a) {
26
27
  if (addedParam === void 0) { addedParam = null; }
27
28
  return getActions ? getActions(action, data, addedParam) : false;
28
29
  };
29
- console.log(hideMenuBar, 'hideMenuBar');
30
- return (show ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", __assign({ className: "e-modal" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "e-modal-container", "data-testid": id ? id : 'default-modal-test' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "card card-modal modal-".concat(config.modalSize ? config.modalSize : 'md') }, { children: !hideMenuBar ? ((0, jsx_runtime_1.jsx)(MenuBar_1.default, __assign({ config: config, button: button, pagination: pagination, pivot: pivot, dropdown: dropdown, search: search, toggle: toggle, undoButton: undoButton, buttonFooter: buttonFooter, check: check, info: info, getActions: function (actions, data) { return sendActions(actions, data); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "card-content" }, { children: children })) }))) : (0, jsx_runtime_1.jsx)("div", __assign({ className: "card-content" }, { children: children })) })) })) })), document.getElementById('root')) : null);
30
+ return (show ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", __assign({ className: "em-modal " + customClass }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-modal-container", "data-testid": id ? id : 'default-modal-test' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-card card-modal modal-".concat(config.modalSize ? config.modalSize : 'md') }, { children: !hideMenuBar ? ((0, jsx_runtime_1.jsx)(MenuBar_1.default, __assign({ config: config, button: button, pagination: pagination, pivot: pivot, dropdown: dropdown, search: search, toggle: toggle, undoButton: undoButton, buttonFooter: buttonFooter, check: check, info: info, getActions: function (actions, data) { return sendActions(actions, data); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-card-content" }, { children: children })) }))) : (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-card-content card-content" }, { children: children })) })) })) })), document.getElementById('root')) : null);
31
31
  };
32
32
  exports.default = Modal;
@@ -12,3 +12,4 @@ export declare const SVG_ARROWLEFT: JSX.Element;
12
12
  export declare const SVG_ARROWDOWN: JSX.Element;
13
13
  export declare const SVG_REQUEST: JSX.Element;
14
14
  export declare const SVG_ADD: JSX.Element;
15
+ export declare const SVG_INFORMATION: JSX.Element;
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.SVG_ADD = exports.SVG_REQUEST = exports.SVG_ARROWDOWN = exports.SVG_ARROWLEFT = exports.SVG_ARROWRIGHT = exports.SVG_UNDO = exports.SVG_SUBMIT = exports.SVG_CLOSE_GRAY = exports.SVG_CHECK_NEUTRAL = exports.SVG_CHECK_INACTIVE = exports.SVG_CHECK_ACTIVE = exports.SVG_CHECK = exports.SVG_BACK = void 0;
14
+ exports.SVG_INFORMATION = exports.SVG_ADD = exports.SVG_REQUEST = exports.SVG_ARROWDOWN = exports.SVG_ARROWLEFT = exports.SVG_ARROWRIGHT = exports.SVG_UNDO = exports.SVG_SUBMIT = exports.SVG_CLOSE_GRAY = exports.SVG_CHECK_NEUTRAL = exports.SVG_CHECK_INACTIVE = exports.SVG_CHECK_ACTIVE = exports.SVG_CHECK = exports.SVG_BACK = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  exports.SVG_BACK = (0, jsx_runtime_1.jsxs)("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.69612 4.29289C8.08664 4.68342 8.08664 5.31658 7.69612 5.70711L3.40323 10L7.69612 14.2929C8.08664 14.6834 8.08664 15.3166 7.69612 15.7071C7.3056 16.0976 6.67243 16.0976 6.28191 15.7071L1.28191 10.7071C0.891382 10.3166 0.891382 9.68342 1.28191 9.29289L6.28191 4.29289C6.67243 3.90237 7.3056 3.90237 7.69612 4.29289Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.989014 10C0.989014 9.44772 1.43673 9 1.98901 9H17.989C18.5413 9 18.989 9.44772 18.989 10C18.989 10.5523 18.5413 11 17.989 11H1.98901C1.43673 11 0.989014 10.5523 0.989014 10Z", fill: "#5C7FF3" })] }));
17
17
  exports.SVG_CHECK = (0, jsx_runtime_1.jsx)("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.6823 4.26895C18.0861 4.64578 18.1079 5.27857 17.7311 5.68232L8.39773 15.6823C8.2086 15.885 7.94385 16 7.66667 16C7.38949 16 7.12474 15.885 6.93562 15.6823L2.26895 10.6823C1.89211 10.2786 1.91393 9.64578 2.31769 9.26895C2.72144 8.89211 3.35423 8.91393 3.73106 9.31769L7.66667 13.5344L16.2689 4.31769C16.6458 3.91393 17.2786 3.89211 17.6823 4.26895Z", fill: "#393F5A" }) }));
@@ -26,3 +26,4 @@ exports.SVG_ARROWLEFT = (0, jsx_runtime_1.jsx)("svg", __assign({ width: "20", he
26
26
  exports.SVG_ARROWDOWN = (0, jsx_runtime_1.jsx)("svg", __assign({ width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L6 4.58579L10.2929 0.292893C10.6834 -0.0976311 11.3166 -0.0976311 11.7071 0.292893C12.0976 0.683417 12.0976 1.31658 11.7071 1.70711L6.70711 6.70711C6.31658 7.09763 5.68342 7.09763 5.29289 6.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z", fill: "#9FA5B7" }) }));
27
27
  exports.SVG_REQUEST = (0, jsx_runtime_1.jsxs)("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 2L6 4L14 4L14 2L6 2ZM4 4C4 5.10457 4.89543 6 6 6L14 6C15.1046 6 16 5.10457 16 4L16 2C16 0.895431 15.1046 -8.55899e-09 14 3.97233e-08L6 3.89414e-07C4.89543 4.37697e-07 4 0.895431 4 2L4 4Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { d: "M16 10C16 10.5523 15.5523 11 15 11L5 11C4.44771 11 4 10.5523 4 10C4 9.44772 4.44772 9 5 9L15 9C15.5523 9 16 9.44771 16 10Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { d: "M12 14C12 14.5523 11.5523 15 11 15L5 15C4.44772 15 4 14.5523 4 14C4 13.4477 4.44772 13 5 13L11 13C11.5523 13 12 13.4477 12 14Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14 4H18V18H2V4H6L6 2H2C0.895431 2 0 2.89543 0 4V18C0 19.1046 0.895431 20 2 20H18C19.1046 20 20 19.1046 20 18V4C20 2.89543 19.1046 2 18 2H14V4Z", fill: "#393F5A" })] }));
28
28
  exports.SVG_ADD = (0, jsx_runtime_1.jsxs)("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 2C10.5523 2 11 2.44772 11 3V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V3C9 2.44772 9.44772 2 10 2Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 10C2 9.44772 2.44772 9 3 9L17 9C17.5523 9 18 9.44772 18 10C18 10.5523 17.5523 11 17 11L3 11C2.44772 11 2 10.5523 2 10Z", fill: "#393F5A" })] }));
29
+ exports.SVG_INFORMATION = (0, jsx_runtime_1.jsxs)("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [(0, jsx_runtime_1.jsx)("rect", { x: "1", y: "1", width: "18", height: "18", rx: "9", stroke: "#9FA5B7", strokeWidth: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M10 9V14", stroke: "#9FA5B7", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("circle", { cx: "10", cy: "6", r: "1", fill: "#9FA5B7" })] }));
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import '../../scss/style.scss';
3
- import '../../scss/library/input.scss';
4
3
  interface IProps {
5
4
  config: {
6
5
  id: string | keyof Object;
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var react_1 = require("react");
16
16
  require("../../scss/style.scss");
17
- require("../../scss/library/input.scss");
18
17
  var sanitizeValue = function (txt, props) {
19
18
  var pattern = null;
20
19
  var newTxt = txt;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const InputSelectionHandler: (props: any) => JSX.Element | null;
2
+ declare const InputSelectionHandler: (props: any) => JSX.Element;
3
3
  export default InputSelectionHandler;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import '../../scss/style.scss';
3
- import '../../scss/library/select.scss';
4
3
  interface IPropsPopover {
5
4
  id: String;
6
5
  className: String;
@@ -24,7 +24,6 @@ exports.Popover = void 0;
24
24
  var jsx_runtime_1 = require("react/jsx-runtime");
25
25
  var react_1 = require("react");
26
26
  require("../../scss/style.scss");
27
- require("../../scss/library/select.scss");
28
27
  // Imports
29
28
  var Asset_1 = require("../assets/Asset");
30
29
  var Popover = function (_a) {
@@ -199,9 +198,10 @@ var Dropdown = function (_a) {
199
198
  * @param {*} values - selected values of multi-select
200
199
  */
201
200
  function filterOptions(search, values) {
201
+ var selectedOptionsVariable = null;
202
202
  if (type === 'multi-select') {
203
203
  if (optionsArray && optionsArray.constructor === Array) {
204
- var selectedOptionsVariable = selectedOptions(values);
204
+ selectedOptionsVariable = selectedOptions(values);
205
205
  if (options && options.constructor === Array && options.length > 0) {
206
206
  optionsArray = options.filter(function (item) {
207
207
  return values.indexOf(item.value) < 0 && item.label.toLowerCase().search(search.toLowerCase()) > -1;
@@ -214,7 +214,7 @@ var Dropdown = function (_a) {
214
214
  }
215
215
  else if (optionsArray && optionsArray.constructor === Object) {
216
216
  var optionsArrayCopy_1 = {};
217
- var selectedOptionsVariable = selectedOptions(values);
217
+ selectedOptionsVariable = selectedOptions(values);
218
218
  if (selectedOptionsVariable.length > 0) {
219
219
  selectedOptionsVariable = selectedOptionsVariable.filter(function (item) {
220
220
  return item.label.toLowerCase().search(search.toLowerCase()) > -1;
@@ -131,6 +131,8 @@ var datetimeFormatter = function (timestamp, format, todayServer, type, getServe
131
131
  newFormat = dayName + ", " + dayDate + " " + monthName + " " + year;
132
132
  break;
133
133
  case "momentsAgo":
134
+ var diff = 0;
135
+ var diffMinute = 0;
134
136
  if (todayTS >= dateTS) {
135
137
  //check if 24hours has been passed
136
138
  if (todayTS >= (dateTS + 86400)) {
@@ -139,28 +141,28 @@ var datetimeFormatter = function (timestamp, format, todayServer, type, getServe
139
141
  else {
140
142
  //check if hour has been passed
141
143
  if (todayTS >= dateTS + 3600) {
142
- var diff = todayTS - dateTS;
144
+ diff = todayTS - dateTS;
143
145
  if (diff === 0) {
144
146
  newFormat = "An hour ago";
145
147
  }
146
- var diffHour = diff / 3600;
147
- diffHour = ~~diffHour;
148
- newFormat = diffHour === 1 ? "An hour ago" : diffHour + " hours ago";
148
+ var diffHour_1 = diff / 3600;
149
+ diffHour_1 = ~~diffHour_1;
150
+ newFormat = diffHour_1 === 1 ? "An hour ago" : diffHour_1 + " hours ago";
149
151
  }
150
152
  else {
151
153
  //check if a minute has been passed
152
154
  if (todayTS >= dateTS + 60) {
153
- var diff = todayTS - dateTS;
155
+ diff = todayTS - dateTS;
154
156
  if (diff === 0) {
155
157
  newFormat = "A minute ago";
156
158
  }
157
- var diffMinute = diff / 60;
159
+ diffMinute = diff / 60;
158
160
  diffMinute = ~~diffMinute;
159
161
  newFormat = diffMinute === 1 ? "A minute ago" : diffMinute + " minutes ago";
160
162
  }
161
163
  else {
162
- var diff = todayTS - dateTS;
163
- if (diff === 0 || diff <= 10) {
164
+ var diff_1 = todayTS - dateTS;
165
+ if (diff_1 === 0 || diff_1 <= 10) {
164
166
  newFormat = "Few seconds ago";
165
167
  }
166
168
  else {
@@ -175,6 +177,7 @@ var datetimeFormatter = function (timestamp, format, todayServer, type, getServe
175
177
  }
176
178
  break;
177
179
  case "momentsAgoConvo":
180
+ var diffHour = 0;
178
181
  if (todayTS >= dateTS) {
179
182
  //check if 24hours has been passed
180
183
  if (todayTS >= (dateTS + 86400)) {
@@ -183,28 +186,28 @@ var datetimeFormatter = function (timestamp, format, todayServer, type, getServe
183
186
  else {
184
187
  //check if hour has been passed
185
188
  if (todayTS >= dateTS + 3600) {
186
- var diff = todayTS - dateTS;
187
- if (diff === 0) {
189
+ var diff_2 = todayTS - dateTS;
190
+ if (diff_2 === 0) {
188
191
  newFormat = "An hour ago";
189
192
  }
190
- var diffHour = diff / 3600;
193
+ diffHour = diff_2 / 3600;
191
194
  diffHour = ~~diffHour;
192
195
  newFormat = diffHour === 1 ? "An hour ago" : diffHour + " hours ago";
193
196
  }
194
197
  else {
195
198
  //check if a minute has been passed
196
199
  if (todayTS >= dateTS + 60) {
197
- var diff = todayTS - dateTS;
198
- if (diff === 0) {
200
+ var diff_3 = todayTS - dateTS;
201
+ if (diff_3 === 0) {
199
202
  newFormat = "A minute ago";
200
203
  }
201
- var diffMinute = diff / 60;
202
- diffMinute = ~~diffMinute;
203
- newFormat = diffMinute === 1 ? "A minute ago" : diffMinute + " minutes ago";
204
+ var diffMinute_1 = diff_3 / 60;
205
+ diffMinute_1 = ~~diffMinute_1;
206
+ newFormat = diffMinute_1 === 1 ? "A minute ago" : diffMinute_1 + " minutes ago";
204
207
  }
205
208
  else {
206
- var diff = todayTS - dateTS;
207
- if (diff === 0 || diff <= 10) {
209
+ var diff_4 = todayTS - dateTS;
210
+ if (diff_4 === 0 || diff_4 <= 10) {
208
211
  newFormat = "Few moments ago";
209
212
  }
210
213
  else {
@@ -223,11 +226,11 @@ var datetimeFormatter = function (timestamp, format, todayServer, type, getServe
223
226
  if (todayTS >= dateTS) {
224
227
  //check if 24hours has been passed
225
228
  if (todayTS >= (dateTS + 86400)) {
226
- var diff = todayTS - dateTS;
227
- if (diff === 0) {
229
+ var diff_5 = todayTS - dateTS;
230
+ if (diff_5 === 0) {
228
231
  newFormat = "1 day";
229
232
  }
230
- var diffDay = diff / 86400;
233
+ var diffDay = diff_5 / 86400;
231
234
  diffDay = ~~diffDay;
232
235
  newFormat = diffDay === 1 ? "1 day" : diffDay + " days";
233
236
  }
@@ -11,11 +11,12 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import React, { useState } from 'react';
14
- // @ts-ignore
15
- import renderHtml from 'react-render-html';
16
14
  var Information = function (_a) {
17
15
  var items = _a.items, listRow = _a.listRow, desc = _a.desc, title = _a.title, hide = _a.hide;
18
16
  var _b = useState(null), rowAnchorEl = _b[0], setRowAnchorEl = _b[1];
17
+ var renderHtml = function (html) {
18
+ return _jsx("div", { dangerouslySetInnerHTML: { __html: html } });
19
+ };
19
20
  var showRowDetails = function (e, idx) {
20
21
  e && e.preventDefault();
21
22
  if (rowAnchorEl === idx) {
@@ -27,7 +28,7 @@ var Information = function (_a) {
27
28
  setRowAnchorEl(rowAnchorEl);
28
29
  };
29
30
  var View = function () {
30
- return _jsx(React.Fragment, { children: _jsx("div", __assign({ className: "popover popover-i" }, { children: typeof desc != 'undefined' && desc ? (_jsxs("div", __assign({ className: "popover-i-content" }, { children: [_jsxs("div", __assign({ className: "popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", { className: "popover-i-close", onClick: hide })] })), _jsx("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : (_jsxs("div", __assign({ className: "popover-i-content" }, { children: [_jsxs("div", __assign({ className: "popover-i-title" }, { children: [_jsx("h6", { children: title }), _jsx("div", { className: "popover-i-close", onClick: hide })] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: "popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [_jsx("div", { children: _jsx("h6", { children: item }) }), rowAnchorEl === key ? (_jsx("img", { src: "/images/icons/icon-arrowup-gray.svg", alt: "" })) : (_jsx("img", { src: "/images/icons/icon-arrowdown-gray.svg", alt: "" }))] })), rowAnchorEl === key ? (_jsx("div", __assign({ className: "popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
31
+ 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", { className: "em-popover-i-close", onClick: hide })] })), 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 ? (_jsx("img", { src: "/images/icons/icon-arrowup-gray.svg", alt: "" })) : (_jsx("img", { src: "/images/icons/icon-arrowdown-gray.svg", alt: "" }))] })), 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) : '') :
31
32
  (item === 'SYSTEM POLICY' ? (typeof items != 'undefined' && typeof items.systemPolicy != 'undefined' && items.systemPolicy ? renderHtml(items.systemPolicy) : '') :
32
33
  (typeof items != 'undefined' && typeof items.instruction != 'undefined' && items.instruction ? renderHtml(items.instruction) : '')) }))) : null] }, key)); })) : null) : null] }))) })) });
33
34
  };
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import '../scss/style.scss';
3
- import '../scss/library/menubar.scss';
4
3
  interface IMenuBarProps {
5
4
  config?: any;
6
5
  info?: any;
@@ -23,9 +23,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  /* eslint-disable jsx-a11y/anchor-is-valid */
24
24
  import { useState, Fragment, useEffect } from "react";
25
25
  import '../scss/style.scss';
26
- import '../scss/library/menubar.scss';
27
26
  // Imports
28
- import { SVG_BACK, SVG_CLOSE_GRAY, SVG_ARROWLEFT, SVG_ARROWRIGHT, SVG_CHECK, SVG_ARROWDOWN } from './assets/Asset';
27
+ import { SVG_BACK, SVG_CLOSE_GRAY, SVG_ARROWLEFT, SVG_ARROWRIGHT, SVG_CHECK, SVG_ARROWDOWN, SVG_INFORMATION } from './assets/Asset';
29
28
  import { CHECKBOX, MONTH_LIST, INFO_LOADER, PAGE_OPTION } from "./constants/Constant";
30
29
  import Information from './Information';
31
30
  import Input from './inputs/InputSelectionHandler';
@@ -55,15 +54,16 @@ var MenuBar = function (_a) {
55
54
  var _s = useState(undoButton && undoButton.show ? true : false), undoShow = _s[0], setUndoShow = _s[1];
56
55
  var _t = useState(false), doneTimer = _t[0], setDoneTimer = _t[1];
57
56
  useEffect(function () {
57
+ var filteredMonthList = [];
58
58
  if (dropdown && dropdown.minMonth) {
59
- var filteredMonthList = __spreadArray([], MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.minMonth.toLowerCase()); });
59
+ filteredMonthList = __spreadArray([], MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.minMonth.toLowerCase()); });
60
60
  if (filteredMonthList.length > 0) {
61
61
  minMonthIdx = MONTH_LIST.indexOf(filteredMonthList[0]);
62
62
  setMinMonthIdx(minMonthIdx);
63
63
  }
64
64
  }
65
65
  if (dropdown && dropdown.maxMonth) {
66
- var filteredMonthList = __spreadArray([], MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.maxMonth.toLowerCase()); });
66
+ filteredMonthList = __spreadArray([], MONTH_LIST, true).filter(function (item) { return (item.value.toLowerCase() === dropdown.maxMonth.toLowerCase()); });
67
67
  if (filteredMonthList.length > 0) {
68
68
  maxMonthIdx = MONTH_LIST.indexOf(filteredMonthList[0]);
69
69
  setMaxMonthIdx(maxMonthIdx);
@@ -325,6 +325,11 @@ var MenuBar = function (_a) {
325
325
  var dateMonthlyPickerHandler = function (e, action, data) {
326
326
  if (data === void 0) { data = ''; }
327
327
  var _a = __assign({}, dropdown), maxYear = _a.maxYear, minYear = _a.minYear;
328
+ var newDateValue = null;
329
+ var standardDate = null;
330
+ var selectedMonthDate = null;
331
+ var monthIdx = null;
332
+ var fullYear = null;
328
333
  if (action === 'next') {
329
334
  if (!maxYear || (maxYear && parseInt(maxYear) >= calendarYear + 1)) {
330
335
  calendarYear += 1;
@@ -338,15 +343,14 @@ var MenuBar = function (_a) {
338
343
  }
339
344
  }
340
345
  else if (action === 'month-selection') {
341
- var newDateValue = datetimeFormatter(data + ' ' + calendarYear, 'month-year');
346
+ newDateValue = datetimeFormatter(data + ' ' + calendarYear, 'month-year');
342
347
  actionRequestHandler(e, 'dropdown', newDateValue);
343
348
  }
344
349
  else if (action === 'next-month') {
345
- var standardDate = datetimeFormatter(dropdown.selection.startDate, 'date-standard');
346
- var selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
347
- // selectedMonthDate = new Date(selectedMonthDate);
348
- var monthIdx = selectedMonthDate.getMonth();
349
- var fullYear = selectedMonthDate.getFullYear();
350
+ standardDate = datetimeFormatter(dropdown.selection.startDate, 'date-standard');
351
+ selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
352
+ monthIdx = selectedMonthDate.getMonth();
353
+ fullYear = selectedMonthDate.getFullYear();
350
354
  if (monthIdx + 1 < 12) {
351
355
  monthIdx = monthIdx + 1;
352
356
  }
@@ -355,16 +359,15 @@ var MenuBar = function (_a) {
355
359
  fullYear = fullYear + 1;
356
360
  }
357
361
  if ((!maxYear && !maxMonthIdx) || fullYear < parseInt(maxYear) || (fullYear === parseInt(maxYear) && monthIdx <= parseInt(maxMonthIdx))) {
358
- var newDateValue = datetimeFormatter(MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
362
+ newDateValue = datetimeFormatter(MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
359
363
  actionRequestHandler(e, 'dropdown', newDateValue, false);
360
364
  }
361
365
  }
362
366
  else if (action === 'prev-month') {
363
- var standardDate = datetimeFormatter(dropdown.selection.startDate, 'date-standard');
364
- var selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
365
- // selectedMonthDate = new Date(selectedMonthDate);
366
- var monthIdx = selectedMonthDate.getMonth();
367
- var fullYear = selectedMonthDate.getFullYear();
367
+ standardDate = datetimeFormatter(dropdown.selection.startDate, 'date-standard');
368
+ selectedMonthDate = new Date(new Date(standardDate).toLocaleString('en-US', { timeZone: 'Asia/Manila' })); //making the date picked as the default gmt so that the new date wont adjust by timezone;
369
+ monthIdx = selectedMonthDate.getMonth();
370
+ fullYear = selectedMonthDate.getFullYear();
368
371
  if (monthIdx - 1 >= 0) {
369
372
  monthIdx = monthIdx - 1;
370
373
  }
@@ -373,8 +376,8 @@ var MenuBar = function (_a) {
373
376
  fullYear = fullYear - 1;
374
377
  }
375
378
  if ((!minYear && !minMonthIdx) || fullYear > parseInt(minYear) || (fullYear === parseInt(minYear) && monthIdx >= parseInt(minMonthIdx))) {
376
- var newDateValue = datetimeFormatter(MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
377
- actionRequestHandler(e, 'dropdown', newDateValue, false);
379
+ var newDateValue_1 = datetimeFormatter(MONTH_LIST[monthIdx].value + ' ' + fullYear, 'month-year');
380
+ actionRequestHandler(e, 'dropdown', newDateValue_1, false);
378
381
  }
379
382
  }
380
383
  };
@@ -446,7 +449,7 @@ var MenuBar = function (_a) {
446
449
  // Title Information Configuration
447
450
  config && config.titleDescription ? (_jsx("p", { children: config.titleDescription })) : null] })),
448
451
  // Information Configuration
449
- config && config.nativePopover === undefined && config.showInfo && config.showInfo.constructor === Boolean ? (_jsxs(Fragment, { children: [_jsx("a", __assign({ href: "#", className: "belt-info", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: _jsx("i", { className: "belt-icon" }) })), _jsx(Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: _jsx(Information, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) : null,
452
+ config && config.showInfo.constructor === Boolean && config.showInfo === true ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-belt-info" }, { children: [_jsx("a", __assign({ href: "#", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: _jsx("div", __assign({ className: "em-info-icon" }, { children: SVG_INFORMATION })) })), _jsx(Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: _jsx(Information, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) })) : null,
450
453
  // Additional title on the modal
451
454
  config && config.addedTitle ? (_jsx("p", { children: config.addedTitle })) : null] })), _jsxs("div", __assign({ className: "em-beltleft-cta" }, { children: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? (_jsxs(Fragment, { children: [_jsxs("a", __assign({ className: "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) {
452
455
  return _jsx("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import '../scss/style.scss';
2
3
  interface IModalProps {
3
4
  id?: string;
4
5
  show: boolean;
package/dist/esm/Modal.js CHANGED
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import ReactDOM from "react-dom";
14
14
  import MenuBar from "./MenuBar";
15
+ import '../scss/style.scss';
15
16
  var Modal = function (_a) {
16
17
  var id = _a.id, show = _a.show, hideMenuBar = _a.hideMenuBar, config = _a.config, getActions = _a.getActions, children = _a.children, button = _a.button, dropdown = _a.dropdown, search = _a.search, pagination = _a.pagination, pivot = _a.pivot, check = _a.check, toggle = _a.toggle, undoButton = _a.undoButton, mainButton = _a.mainButton, buttonFooter = _a.buttonFooter, info = _a.info, customClass = _a.customClass;
17
18
  var sendActions = function (actions, data) {
@@ -21,7 +22,6 @@ var Modal = function (_a) {
21
22
  if (addedParam === void 0) { addedParam = null; }
22
23
  return getActions ? getActions(action, data, addedParam) : false;
23
24
  };
24
- console.log(hideMenuBar, 'hideMenuBar');
25
- return (show ? ReactDOM.createPortal(_jsx("div", __assign({ className: "e-modal" }, { children: _jsx("div", __assign({ className: "e-modal-container", "data-testid": id ? id : 'default-modal-test' }, { children: _jsx("div", __assign({ className: "card card-modal modal-".concat(config.modalSize ? config.modalSize : 'md') }, { children: !hideMenuBar ? (_jsx(MenuBar, __assign({ config: config, button: button, pagination: pagination, pivot: pivot, dropdown: dropdown, search: search, toggle: toggle, undoButton: undoButton, buttonFooter: buttonFooter, check: check, info: info, getActions: function (actions, data) { return sendActions(actions, data); } }, { children: _jsx("div", __assign({ className: "card-content" }, { children: children })) }))) : _jsx("div", __assign({ className: "card-content" }, { children: children })) })) })) })), document.getElementById('root')) : null);
25
+ return (show ? ReactDOM.createPortal(_jsx("div", __assign({ className: "em-modal " + customClass }, { children: _jsx("div", __assign({ className: "em-modal-container", "data-testid": id ? id : 'default-modal-test' }, { children: _jsx("div", __assign({ className: "em-card card-modal modal-".concat(config.modalSize ? config.modalSize : 'md') }, { children: !hideMenuBar ? (_jsx(MenuBar, __assign({ config: config, button: button, pagination: pagination, pivot: pivot, dropdown: dropdown, search: search, toggle: toggle, undoButton: undoButton, buttonFooter: buttonFooter, check: check, info: info, getActions: function (actions, data) { return sendActions(actions, data); } }, { children: _jsx("div", __assign({ className: "em-card-content" }, { children: children })) }))) : _jsx("div", __assign({ className: "em-card-content card-content" }, { children: children })) })) })) })), document.getElementById('root')) : null);
26
26
  };
27
27
  export default Modal;
@@ -12,3 +12,4 @@ export declare const SVG_ARROWLEFT: JSX.Element;
12
12
  export declare const SVG_ARROWDOWN: JSX.Element;
13
13
  export declare const SVG_REQUEST: JSX.Element;
14
14
  export declare const SVG_ADD: JSX.Element;
15
+ export declare const SVG_INFORMATION: JSX.Element;
@@ -23,3 +23,4 @@ export var SVG_ARROWLEFT = _jsx("svg", __assign({ width: "20", height: "20", vie
23
23
  export var SVG_ARROWDOWN = _jsx("svg", __assign({ width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L6 4.58579L10.2929 0.292893C10.6834 -0.0976311 11.3166 -0.0976311 11.7071 0.292893C12.0976 0.683417 12.0976 1.31658 11.7071 1.70711L6.70711 6.70711C6.31658 7.09763 5.68342 7.09763 5.29289 6.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z", fill: "#9FA5B7" }) }));
24
24
  export var SVG_REQUEST = _jsxs("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 2L6 4L14 4L14 2L6 2ZM4 4C4 5.10457 4.89543 6 6 6L14 6C15.1046 6 16 5.10457 16 4L16 2C16 0.895431 15.1046 -8.55899e-09 14 3.97233e-08L6 3.89414e-07C4.89543 4.37697e-07 4 0.895431 4 2L4 4Z", fill: "#393F5A" }), _jsx("path", { d: "M16 10C16 10.5523 15.5523 11 15 11L5 11C4.44771 11 4 10.5523 4 10C4 9.44772 4.44772 9 5 9L15 9C15.5523 9 16 9.44771 16 10Z", fill: "#393F5A" }), _jsx("path", { d: "M12 14C12 14.5523 11.5523 15 11 15L5 15C4.44772 15 4 14.5523 4 14C4 13.4477 4.44772 13 5 13L11 13C11.5523 13 12 13.4477 12 14Z", fill: "#393F5A" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14 4H18V18H2V4H6L6 2H2C0.895431 2 0 2.89543 0 4V18C0 19.1046 0.895431 20 2 20H18C19.1046 20 20 19.1046 20 18V4C20 2.89543 19.1046 2 18 2H14V4Z", fill: "#393F5A" })] }));
25
25
  export var SVG_ADD = _jsxs("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 2C10.5523 2 11 2.44772 11 3V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V3C9 2.44772 9.44772 2 10 2Z", fill: "#393F5A" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 10C2 9.44772 2.44772 9 3 9L17 9C17.5523 9 18 9.44772 18 10C18 10.5523 17.5523 11 17 11L3 11C2.44772 11 2 10.5523 2 10Z", fill: "#393F5A" })] }));
26
+ export var SVG_INFORMATION = _jsxs("svg", __assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("rect", { x: "1", y: "1", width: "18", height: "18", rx: "9", stroke: "#9FA5B7", strokeWidth: "2" }), _jsx("path", { d: "M10 9V14", stroke: "#9FA5B7", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "10", cy: "6", r: "1", fill: "#9FA5B7" })] }));
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import '../../scss/style.scss';
3
- import '../../scss/library/input.scss';
4
3
  interface IProps {
5
4
  config: {
6
5
  id: string | keyof Object;
@@ -12,7 +12,6 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { Fragment } from "react";
14
14
  import '../../scss/style.scss';
15
- import '../../scss/library/input.scss';
16
15
  var sanitizeValue = function (txt, props) {
17
16
  var pattern = null;
18
17
  var newTxt = txt;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import '../../scss/style.scss';
3
- import '../../scss/library/select.scss';
4
3
  interface IPropsPopover {
5
4
  id: String;
6
5
  className: String;
@@ -21,7 +21,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import { useState, Fragment } from "react";
23
23
  import '../../scss/style.scss';
24
- import '../../scss/library/select.scss';
25
24
  // Imports
26
25
  import { SVG_CLOSE_GRAY, SVG_ARROWDOWN } from '../assets/Asset';
27
26
  export var Popover = function (_a) {
@@ -195,9 +194,10 @@ var Dropdown = function (_a) {
195
194
  * @param {*} values - selected values of multi-select
196
195
  */
197
196
  function filterOptions(search, values) {
197
+ var selectedOptionsVariable = null;
198
198
  if (type === 'multi-select') {
199
199
  if (optionsArray && optionsArray.constructor === Array) {
200
- var selectedOptionsVariable = selectedOptions(values);
200
+ selectedOptionsVariable = selectedOptions(values);
201
201
  if (options && options.constructor === Array && options.length > 0) {
202
202
  optionsArray = options.filter(function (item) {
203
203
  return values.indexOf(item.value) < 0 && item.label.toLowerCase().search(search.toLowerCase()) > -1;
@@ -210,7 +210,7 @@ var Dropdown = function (_a) {
210
210
  }
211
211
  else if (optionsArray && optionsArray.constructor === Object) {
212
212
  var optionsArrayCopy_1 = {};
213
- var selectedOptionsVariable = selectedOptions(values);
213
+ selectedOptionsVariable = selectedOptions(values);
214
214
  if (selectedOptionsVariable.length > 0) {
215
215
  selectedOptionsVariable = selectedOptionsVariable.filter(function (item) {
216
216
  return item.label.toLowerCase().search(search.toLowerCase()) > -1;