empower-container 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/Modal.js CHANGED
@@ -27,6 +27,16 @@ var Modal = function (_a) {
27
27
  if (addedParam === void 0) { addedParam = null; }
28
28
  return getActions ? getActions(action, data, addedParam) : false;
29
29
  };
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);
30
+ var x = document.getElementsByTagName("BODY")[0];
31
+ var dvId = '';
32
+ if (x.children) {
33
+ Array.from(x.children).forEach(function (el) {
34
+ if (el.constructor == HTMLDivElement) {
35
+ dvId = el.id;
36
+ return;
37
+ }
38
+ });
39
+ }
40
+ 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(dvId)) : null);
31
41
  };
32
42
  exports.default = Modal;
@@ -23,7 +23,7 @@ exports.SVG_SUBMIT = (0, jsx_runtime_1.jsxs)("svg", __assign({ width: "20", heig
23
23
  exports.SVG_UNDO = (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 1.29289C8.08664 1.68342 8.08664 2.31658 7.69612 2.70711L3.40323 7L7.69612 11.2929C8.08664 11.6834 8.08664 12.3166 7.69612 12.7071C7.3056 13.0976 6.67243 13.0976 6.28191 12.7071L1.28191 7.70711C0.891382 7.31658 0.891382 6.68342 1.28191 6.29289L6.28191 1.29289C6.67243 0.902369 7.3056 0.902369 7.69612 1.29289Z", fill: "#393F5A" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 7C2 6.44772 2.44772 6 3 6H13C16.3137 6 19 8.68629 19 12C19 15.3137 16.3137 18 13 18H2C1.44772 18 1 17.5523 1 17C1 16.4477 1.44772 16 2 16H13C15.2091 16 17 14.2091 17 12C17 9.79086 15.2091 8 13 8H3C2.44772 8 2 7.55228 2 7Z", fill: "#393F5A" })] }));
24
24
  exports.SVG_ARROWRIGHT = (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: "M7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L12.0858 10.5L7.79289 6.20711C7.40237 5.81658 7.40237 5.18342 7.79289 4.79289C8.18342 4.40237 8.81658 4.40237 9.20711 4.79289L14.2071 9.79289C14.5976 10.1834 14.5976 10.8166 14.2071 11.2071L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071Z", fill: "#9FA5B7" }) }));
25
25
  exports.SVG_ARROWLEFT = (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: "M13.2071 4.79289C13.5976 5.18342 13.5976 5.81658 13.2071 6.20711L8.91421 10.5L13.2071 14.7929C13.5976 15.1834 13.5976 15.8166 13.2071 16.2071C12.8166 16.5976 12.1834 16.5976 11.7929 16.2071L6.79289 11.2071C6.40237 10.8166 6.40237 10.1834 6.79289 9.79289L11.7929 4.79289C12.1834 4.40237 12.8166 4.40237 13.2071 4.79289Z", fill: "#9FA5B7" }) }));
26
- exports.SVG_ARROWDOWN = (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", "clip-rule": "evenodd", d: "M4.29289 7.29289C4.68342 6.90237 5.31658 6.90237 5.70711 7.29289L10 11.5858L14.2929 7.29289C14.6834 6.90237 15.3166 6.90237 15.7071 7.29289C16.0976 7.68342 16.0976 8.31658 15.7071 8.70711L10.7071 13.7071C10.3166 14.0976 9.68342 14.0976 9.29289 13.7071L4.29289 8.70711C3.90237 8.31658 3.90237 7.68342 4.29289 7.29289Z", fill: "#9FA5B7" }) }));
26
+ exports.SVG_ARROWDOWN = (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: "M4.29289 7.29289C4.68342 6.90237 5.31658 6.90237 5.70711 7.29289L10 11.5858L14.2929 7.29289C14.6834 6.90237 15.3166 6.90237 15.7071 7.29289C16.0976 7.68342 16.0976 8.31658 15.7071 8.70711L10.7071 13.7071C10.3166 14.0976 9.68342 14.0976 9.29289 13.7071L4.29289 8.70711C3.90237 8.31658 3.90237 7.68342 4.29289 7.29289Z", fill: "#9FA5B7" }) }));
27
27
  exports.SVG_ARROW_UP = (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: "M4.29289 13.7071C4.68342 14.0976 5.31658 14.0976 5.70711 13.7071L10 9.41421L14.2929 13.7071C14.6834 14.0976 15.3166 14.0976 15.7071 13.7071C16.0976 13.3166 16.0976 12.6834 15.7071 12.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289L4.29289 12.2929C3.90237 12.6834 3.90237 13.3166 4.29289 13.7071Z", fill: "#9FA5B7" }) }));
28
28
  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" })] }));
29
29
  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" })] }));
package/dist/esm/Modal.js CHANGED
@@ -22,6 +22,16 @@ var Modal = function (_a) {
22
22
  if (addedParam === void 0) { addedParam = null; }
23
23
  return getActions ? getActions(action, data, addedParam) : false;
24
24
  };
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);
25
+ var x = document.getElementsByTagName("BODY")[0];
26
+ var dvId = '';
27
+ if (x.children) {
28
+ Array.from(x.children).forEach(function (el) {
29
+ if (el.constructor == HTMLDivElement) {
30
+ dvId = el.id;
31
+ return;
32
+ }
33
+ });
34
+ }
35
+ 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(dvId)) : null);
26
36
  };
27
37
  export default Modal;
@@ -20,7 +20,7 @@ export var SVG_SUBMIT = _jsxs("svg", __assign({ width: "20", height: "20", viewB
20
20
  export var SVG_UNDO = _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: "M7.69612 1.29289C8.08664 1.68342 8.08664 2.31658 7.69612 2.70711L3.40323 7L7.69612 11.2929C8.08664 11.6834 8.08664 12.3166 7.69612 12.7071C7.3056 13.0976 6.67243 13.0976 6.28191 12.7071L1.28191 7.70711C0.891382 7.31658 0.891382 6.68342 1.28191 6.29289L6.28191 1.29289C6.67243 0.902369 7.3056 0.902369 7.69612 1.29289Z", fill: "#393F5A" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2 7C2 6.44772 2.44772 6 3 6H13C16.3137 6 19 8.68629 19 12C19 15.3137 16.3137 18 13 18H2C1.44772 18 1 17.5523 1 17C1 16.4477 1.44772 16 2 16H13C15.2091 16 17 14.2091 17 12C17 9.79086 15.2091 8 13 8H3C2.44772 8 2 7.55228 2 7Z", fill: "#393F5A" })] }));
21
21
  export var SVG_ARROWRIGHT = _jsx("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: "M7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L12.0858 10.5L7.79289 6.20711C7.40237 5.81658 7.40237 5.18342 7.79289 4.79289C8.18342 4.40237 8.81658 4.40237 9.20711 4.79289L14.2071 9.79289C14.5976 10.1834 14.5976 10.8166 14.2071 11.2071L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071Z", fill: "#9FA5B7" }) }));
22
22
  export var SVG_ARROWLEFT = _jsx("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: "M13.2071 4.79289C13.5976 5.18342 13.5976 5.81658 13.2071 6.20711L8.91421 10.5L13.2071 14.7929C13.5976 15.1834 13.5976 15.8166 13.2071 16.2071C12.8166 16.5976 12.1834 16.5976 11.7929 16.2071L6.79289 11.2071C6.40237 10.8166 6.40237 10.1834 6.79289 9.79289L11.7929 4.79289C12.1834 4.40237 12.8166 4.40237 13.2071 4.79289Z", fill: "#9FA5B7" }) }));
23
- export var SVG_ARROWDOWN = _jsx("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", "clip-rule": "evenodd", d: "M4.29289 7.29289C4.68342 6.90237 5.31658 6.90237 5.70711 7.29289L10 11.5858L14.2929 7.29289C14.6834 6.90237 15.3166 6.90237 15.7071 7.29289C16.0976 7.68342 16.0976 8.31658 15.7071 8.70711L10.7071 13.7071C10.3166 14.0976 9.68342 14.0976 9.29289 13.7071L4.29289 8.70711C3.90237 8.31658 3.90237 7.68342 4.29289 7.29289Z", fill: "#9FA5B7" }) }));
23
+ export var SVG_ARROWDOWN = _jsx("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: "M4.29289 7.29289C4.68342 6.90237 5.31658 6.90237 5.70711 7.29289L10 11.5858L14.2929 7.29289C14.6834 6.90237 15.3166 6.90237 15.7071 7.29289C16.0976 7.68342 16.0976 8.31658 15.7071 8.70711L10.7071 13.7071C10.3166 14.0976 9.68342 14.0976 9.29289 13.7071L4.29289 8.70711C3.90237 8.31658 3.90237 7.68342 4.29289 7.29289Z", fill: "#9FA5B7" }) }));
24
24
  export var SVG_ARROW_UP = _jsx("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: "M4.29289 13.7071C4.68342 14.0976 5.31658 14.0976 5.70711 13.7071L10 9.41421L14.2929 13.7071C14.6834 14.0976 15.3166 14.0976 15.7071 13.7071C16.0976 13.3166 16.0976 12.6834 15.7071 12.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289L4.29289 12.2929C3.90237 12.6834 3.90237 13.3166 4.29289 13.7071Z", fill: "#9FA5B7" }) }));
25
25
  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" })] }));
26
26
  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" })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "empower-container",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "private": false,
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",