@m4l/components 0.1.26 → 0.1.28

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 (112) hide show
  1. package/assets/Logo/index.228dcb5a.js +42 -35
  2. package/commonjs.565e6834.js +5 -5
  3. package/components/CommonActions/components/ActionCancel/index.e498eeb2.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.4ff0ad73.js +64 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +28 -22
  6. package/components/CommonActions/components/ActionIntro/index.60ef7bd7.js +18 -0
  7. package/components/CommonActions/components/Actions/index.0645e30f.js +867 -0
  8. package/components/DataGrid/index.76d8fd25.js +1075 -0
  9. package/components/DynamicFilter/index.342ba5fe.js +1577 -0
  10. package/components/ErrorLabel/index.c8615f16.js +13 -12
  11. package/components/Icon/index.619c31c4.js +96 -0
  12. package/components/Icon/types.d.ts +2 -1
  13. package/components/Image/index.93d5f37f.js +190 -0
  14. package/components/Loadable/index.f5518558.js +8 -8
  15. package/components/ModalDialog/index.9ea10764.js +184 -0
  16. package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
  17. package/components/ObjectLogs/index.f941fb79.js +288 -0
  18. package/components/Page/index.4237c241.js +22 -20
  19. package/components/PaperForm/index.ec9cb8c9.js +112 -0
  20. package/components/Period/index.2941fbda.js +249 -0
  21. package/components/PropertyValue/index.dfcfe1ba.js +147 -0
  22. package/components/PropertyValue/styles.d.ts +2 -1
  23. package/components/PropertyValue/types.d.ts +3 -3
  24. package/components/Resizeable/index.45995d2b.js +19 -19
  25. package/components/ScrollBar/index.39eeb2de.js +26 -21
  26. package/components/ScrollToTop/index.e06f98f6.js +8 -7
  27. package/components/SplitLayout/index.4032673d.js +35 -33
  28. package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
  29. package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
  30. package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
  31. package/components/animate/features.0fbf41e1.js +3 -3
  32. package/components/animate/variants/bounce.784aaaaa.js +16 -13
  33. package/components/animate/variants/container.11f82b76.js +8 -6
  34. package/components/animate/variants/fade.b561c0fc.js +32 -28
  35. package/components/animate/variants/transition.bd46b9ce.js +17 -12
  36. package/components/formatters/BooleanFormatter/index.8da35c9c.js +55 -0
  37. package/components/formatters/DateFormatter/index.1b9baacc.js +69 -0
  38. package/components/formatters/index.689a8086.js +119 -0
  39. package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
  40. package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
  41. package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
  42. package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
  43. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
  44. package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
  45. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
  46. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
  47. package/components/hook-form/RHFTextField/index.f9aaaa90.js +146 -0
  48. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/index.d.ts +0 -0
  49. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/styles.d.ts +4 -3
  50. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/index.d.ts +0 -0
  51. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -0
  52. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/types.d.ts +0 -0
  53. package/components/hook-form/RHFUpload/index.d5cc7c13.js +285 -0
  54. package/components/mui_extended/Accordion/index.a02ac6ae.js +107 -0
  55. package/components/mui_extended/Avatar/index.fe06afd7.js +51 -0
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
  58. package/components/mui_extended/Button/index.53b56958.js +178 -0
  59. package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
  60. package/components/mui_extended/IconButton/index.a321e5cb.js +120 -0
  61. package/components/mui_extended/IconButton/index.d.ts +1 -1
  62. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
  63. package/components/mui_extended/Pager/index.c0865b70.js +141 -0
  64. package/components/mui_extended/Popover/index.705275a4.js +278 -0
  65. package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
  66. package/components/mui_extended/Typography/index.e5494696.js +25 -21
  67. package/contexts/ModalContext/index.b92fa565.js +153 -0
  68. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
  69. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
  70. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
  71. package/contexts/RHFormContext/index.b142190a.js +63 -0
  72. package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
  73. package/hooks/useModal/index.5fee01a3.js +11 -0
  74. package/index.js +153 -153
  75. package/package.json +2 -1
  76. package/react-data-grid.d46d625e.js +2206 -1663
  77. package/react-draggable.20e95c61.js +800 -553
  78. package/react-json-view.f56a7f8e.js +2344 -2340
  79. package/react-resizable.5277deaf.js +470 -298
  80. package/react-splitter-layout.7810ac1b.js +130 -128
  81. package/utils/index.214d9542.js +500 -354
  82. package/components/CommonActions/components/ActionCancel/index.6736b782.js +0 -17
  83. package/components/CommonActions/components/ActionFormCancel/index.281ee166.js +0 -49
  84. package/components/CommonActions/components/ActionIntro/index.4665a611.js +0 -18
  85. package/components/CommonActions/components/Actions/index.cd7b2671.js +0 -742
  86. package/components/DataGrid/index.2caf6231.js +0 -894
  87. package/components/DynamicFilter/index.f2377369.js +0 -1157
  88. package/components/Icon/index.f569765b.js +0 -82
  89. package/components/Image/index.c9da2d5a.js +0 -152
  90. package/components/ModalDialog/index.bee344a5.js +0 -168
  91. package/components/ObjectLogs/index.6b6f95e6.js +0 -266
  92. package/components/PaperForm/index.3f8c7ef2.js +0 -105
  93. package/components/Period/index.a112ce37.js +0 -175
  94. package/components/PropertyValue/index.ab3dd7e9.js +0 -116
  95. package/components/contexts/RHFormContext/index.33dba822.js +0 -56
  96. package/components/formatters/BooleanFormatter/index.3ec56305.js +0 -42
  97. package/components/formatters/DateFormatter/index.08d8823b.js +0 -57
  98. package/components/formatters/index.6959c2de.js +0 -106
  99. package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
  100. package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
  101. package/components/hook-form/RHFPeriod/index.979d0898.js +0 -51
  102. package/components/hook-form/RHFTextField/index.ba2a8f67.js +0 -129
  103. package/components/hook-form/RHFUpload/index.6347159a.js +0 -258
  104. package/components/mui_extended/Accordion/index.49f5df8e.js +0 -103
  105. package/components/mui_extended/Avatar/index.dadb0528.js +0 -37
  106. package/components/mui_extended/Button/index.52d18aea.js +0 -144
  107. package/components/mui_extended/IconButton/index.4b5ce8b5.js +0 -103
  108. package/components/mui_extended/Pager/index.951b6975.js +0 -126
  109. package/components/mui_extended/Popover/index.4da8587a.js +0 -252
  110. package/contexts/ModalContext/index.5388dfd5.js +0 -136
  111. package/hooks/useModal/index.3b1ff084.js +0 -11
  112. package/node_modules.168cb897.js +0 -55
@@ -1,165 +1,167 @@
1
- import { g as k } from "./commonjs.565e6834.js";
2
- import L from "prop-types";
3
- import I from "react";
4
- var D = { exports: {} };
5
- (function(R, U) {
6
- (function(P, M) {
7
- R.exports = M(L, I);
8
- })(window, function(P, M) {
9
- return function(g) {
10
- var v = {};
11
- function o(t) {
12
- if (v[t])
13
- return v[t].exports;
14
- var r = v[t] = { i: t, l: !1, exports: {} };
15
- return g[t].call(r.exports, r, r.exports, o), r.l = !0, r.exports;
1
+ import { g as getDefaultExportFromCjs } from "./commonjs.565e6834.js";
2
+ import require$$1 from "prop-types";
3
+ import React from "react";
4
+ var lib = { exports: {} };
5
+ (function(module, exports) {
6
+ !function(e, t) {
7
+ module.exports = t(require$$1, React);
8
+ }(window, function(e, t) {
9
+ return function(e2) {
10
+ var t2 = {};
11
+ function n(o) {
12
+ if (t2[o])
13
+ return t2[o].exports;
14
+ var r = t2[o] = { i: o, l: false, exports: {} };
15
+ return e2[o].call(r.exports, r, r.exports, n), r.l = true, r.exports;
16
16
  }
17
- return o.m = g, o.c = v, o.d = function(t, r, S) {
18
- o.o(t, r) || Object.defineProperty(t, r, { enumerable: !0, get: S });
19
- }, o.r = function(t) {
20
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
21
- }, o.t = function(t, r) {
22
- if (1 & r && (t = o(t)), 8 & r || 4 & r && typeof t == "object" && t && t.__esModule)
23
- return t;
24
- var S = /* @__PURE__ */ Object.create(null);
25
- if (o.r(S), Object.defineProperty(S, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string")
26
- for (var i in t)
27
- o.d(S, i, function(z) {
28
- return t[z];
29
- }.bind(null, i));
30
- return S;
31
- }, o.n = function(t) {
32
- var r = t && t.__esModule ? function() {
33
- return t.default;
17
+ return n.m = e2, n.c = t2, n.d = function(e3, t3, o) {
18
+ n.o(e3, t3) || Object.defineProperty(e3, t3, { enumerable: true, get: o });
19
+ }, n.r = function(e3) {
20
+ "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e3, "__esModule", { value: true });
21
+ }, n.t = function(e3, t3) {
22
+ if (1 & t3 && (e3 = n(e3)), 8 & t3)
23
+ return e3;
24
+ if (4 & t3 && "object" == typeof e3 && e3 && e3.__esModule)
25
+ return e3;
26
+ var o = /* @__PURE__ */ Object.create(null);
27
+ if (n.r(o), Object.defineProperty(o, "default", { enumerable: true, value: e3 }), 2 & t3 && "string" != typeof e3)
28
+ for (var r in e3)
29
+ n.d(o, r, function(t4) {
30
+ return e3[t4];
31
+ }.bind(null, r));
32
+ return o;
33
+ }, n.n = function(e3) {
34
+ var t3 = e3 && e3.__esModule ? function() {
35
+ return e3.default;
34
36
  } : function() {
35
- return t;
37
+ return e3;
36
38
  };
37
- return o.d(r, "a", r), r;
38
- }, o.o = function(t, r) {
39
- return Object.prototype.hasOwnProperty.call(t, r);
40
- }, o.p = "", o(o.s = 2);
41
- }([function(g, v) {
42
- g.exports = P;
43
- }, function(g, v) {
44
- g.exports = M;
45
- }, function(g, v, o) {
46
- g.exports = o(3);
47
- }, function(g, v, o) {
48
- o.r(v);
49
- var t = o(1), r = o.n(t), S = o(0), i = o.n(S);
50
- function z(c) {
51
- var a = c.size || 0, h = c.percentage ? "%" : "px", u = "layout-pane", n = {};
52
- return c.primary ? u += " layout-pane-primary" : c.vertical ? n.height = "".concat(a).concat(h) : n.width = "".concat(a).concat(h), r.a.createElement("div", { className: u, style: n }, c.children);
39
+ return n.d(t3, "a", t3), t3;
40
+ }, n.o = function(e3, t3) {
41
+ return Object.prototype.hasOwnProperty.call(e3, t3);
42
+ }, n.p = "", n(n.s = 2);
43
+ }([function(t2, n) {
44
+ t2.exports = e;
45
+ }, function(e2, n) {
46
+ e2.exports = t;
47
+ }, function(e2, t2, n) {
48
+ e2.exports = n(3);
49
+ }, function(e2, t2, n) {
50
+ n.r(t2);
51
+ var o = n(1), r = n.n(o), i = n(0), a = n.n(i);
52
+ function s(e3) {
53
+ var t3 = e3.size || 0, n2 = e3.percentage ? "%" : "px", o2 = "layout-pane", i2 = {};
54
+ return e3.primary ? o2 += " layout-pane-primary" : e3.vertical ? i2.height = "".concat(t3).concat(n2) : i2.width = "".concat(t3).concat(n2), r.a.createElement("div", { className: o2, style: i2 }, e3.children);
53
55
  }
54
- z.propTypes = { vertical: i.a.bool, primary: i.a.bool, size: i.a.number, percentage: i.a.bool, children: i.a.oneOfType([i.a.arrayOf(i.a.node), i.a.node]) }, z.defaultProps = { vertical: !1, primary: !1, size: 0, percentage: !1, children: [] };
55
- var T = z;
56
- function x(c) {
57
- return (x = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
58
- return typeof a;
59
- } : function(a) {
60
- return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
61
- })(c);
56
+ s.propTypes = { vertical: a.a.bool, primary: a.a.bool, size: a.a.number, percentage: a.a.bool, children: a.a.oneOfType([a.a.arrayOf(a.a.node), a.a.node]) }, s.defaultProps = { vertical: false, primary: false, size: 0, percentage: false, children: [] };
57
+ var c = s;
58
+ function l(e3) {
59
+ return (l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
60
+ return typeof e4;
61
+ } : function(e4) {
62
+ return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
63
+ })(e3);
62
64
  }
63
- function j(c, a) {
64
- for (var h = 0; h < a.length; h++) {
65
- var u = a[h];
66
- u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(c, u.key, u);
65
+ function u(e3, t3) {
66
+ for (var n2 = 0; n2 < t3.length; n2++) {
67
+ var o2 = t3[n2];
68
+ o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e3, o2.key, o2);
67
69
  }
68
70
  }
69
- function E(c) {
70
- return (E = Object.setPrototypeOf ? Object.getPrototypeOf : function(a) {
71
- return a.__proto__ || Object.getPrototypeOf(a);
72
- })(c);
71
+ function p(e3) {
72
+ return (p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
73
+ return e4.__proto__ || Object.getPrototypeOf(e4);
74
+ })(e3);
73
75
  }
74
- function O(c, a) {
75
- return (O = Object.setPrototypeOf || function(h, u) {
76
- return h.__proto__ = u, h;
77
- })(c, a);
76
+ function d(e3, t3) {
77
+ return (d = Object.setPrototypeOf || function(e4, t4) {
78
+ return e4.__proto__ = t4, e4;
79
+ })(e3, t3);
78
80
  }
79
- function y(c) {
80
- if (c === void 0)
81
+ function h(e3) {
82
+ if (void 0 === e3)
81
83
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
82
- return c;
84
+ return e3;
83
85
  }
84
- function C() {
86
+ function f() {
85
87
  if (document.body.createTextRange) {
86
- var c = document.body.createTextRange();
87
- c.collapse(), c.select();
88
+ var e3 = document.body.createTextRange();
89
+ e3.collapse(), e3.select();
88
90
  } else
89
91
  window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty();
90
92
  }
91
- var w = function(c) {
92
- function a(n) {
93
- var e, s, d;
94
- return function(p, l) {
95
- if (!(p instanceof l))
93
+ var y = function(e3) {
94
+ function t3(e4) {
95
+ var n3, o3, r2;
96
+ return function(e5, t4) {
97
+ if (!(e5 instanceof t4))
96
98
  throw new TypeError("Cannot call a class as a function");
97
- }(this, a), s = this, (e = !(d = E(a).call(this, n)) || x(d) !== "object" && typeof d != "function" ? y(s) : d).handleResize = e.handleResize.bind(y(y(e))), e.handleMouseMove = e.handleMouseMove.bind(y(y(e))), e.handleMouseUp = e.handleMouseUp.bind(y(y(e))), e.handleTouchMove = e.handleTouchMove.bind(y(y(e))), e.handleSplitterMouseDown = e.handleSplitterMouseDown.bind(y(y(e))), e.state = { secondaryPaneSize: 0, resizing: !1 }, e;
99
+ }(this, t3), o3 = this, (n3 = !(r2 = p(t3).call(this, e4)) || "object" !== l(r2) && "function" != typeof r2 ? h(o3) : r2).handleResize = n3.handleResize.bind(h(h(n3))), n3.handleMouseMove = n3.handleMouseMove.bind(h(h(n3))), n3.handleMouseUp = n3.handleMouseUp.bind(h(h(n3))), n3.handleTouchMove = n3.handleTouchMove.bind(h(h(n3))), n3.handleSplitterMouseDown = n3.handleSplitterMouseDown.bind(h(h(n3))), n3.state = { secondaryPaneSize: 0, resizing: false }, n3;
98
100
  }
99
- var h, u;
100
- return function(n, e) {
101
- if (typeof e != "function" && e !== null)
101
+ var n2, o2;
102
+ return function(e4, t4) {
103
+ if ("function" != typeof t4 && null !== t4)
102
104
  throw new TypeError("Super expression must either be null or a function");
103
- n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), e && O(n, e);
104
- }(a, r.a.Component), h = a, (u = [{ key: "componentDidMount", value: function() {
105
- var n;
106
- if (window.addEventListener("resize", this.handleResize), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchend", this.handleMouseUp), document.addEventListener("touchmove", this.handleTouchMove), this.props.secondaryInitialSize !== void 0)
107
- n = this.props.secondaryInitialSize;
105
+ e4.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e4, writable: true, configurable: true } }), t4 && d(e4, t4);
106
+ }(t3, r.a.Component), n2 = t3, (o2 = [{ key: "componentDidMount", value: function() {
107
+ var e4;
108
+ if (window.addEventListener("resize", this.handleResize), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchend", this.handleMouseUp), document.addEventListener("touchmove", this.handleTouchMove), void 0 !== this.props.secondaryInitialSize)
109
+ e4 = this.props.secondaryInitialSize;
108
110
  else {
109
- var e, s = this.container.getBoundingClientRect();
110
- e = this.splitter ? this.splitter.getBoundingClientRect() : { width: 4, height: 4 }, n = this.getSecondaryPaneSize(s, e, { left: s.left + (s.width - e.width) / 2, top: s.top + (s.height - e.height) / 2 }, !1);
111
+ var t4, n3 = this.container.getBoundingClientRect();
112
+ t4 = this.splitter ? this.splitter.getBoundingClientRect() : { width: 4, height: 4 }, e4 = this.getSecondaryPaneSize(n3, t4, { left: n3.left + (n3.width - t4.width) / 2, top: n3.top + (n3.height - t4.height) / 2 }, false);
111
113
  }
112
- this.setState({ secondaryPaneSize: n });
113
- } }, { key: "componentDidUpdate", value: function(n, e) {
114
- e.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange && this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize), e.resizing !== this.state.resizing && (this.state.resizing ? this.props.onDragStart && this.props.onDragStart() : this.props.onDragEnd && this.props.onDragEnd());
114
+ this.setState({ secondaryPaneSize: e4 });
115
+ } }, { key: "componentDidUpdate", value: function(e4, t4) {
116
+ t4.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange && this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize), t4.resizing !== this.state.resizing && (this.state.resizing ? this.props.onDragStart && this.props.onDragStart() : this.props.onDragEnd && this.props.onDragEnd());
115
117
  } }, { key: "componentWillUnmount", value: function() {
116
118
  window.removeEventListener("resize", this.handleResize), document.removeEventListener("mouseup", this.handleMouseUp), document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("touchend", this.handleMouseUp), document.removeEventListener("touchmove", this.handleTouchMove);
117
- } }, { key: "getSecondaryPaneSize", value: function(n, e, s, d) {
118
- var p, l, f, m;
119
- this.props.vertical ? (p = n.height, l = e.height, f = s.top - n.top) : (p = n.width, l = e.width, f = s.left - n.left), d && (f -= l / 2), f < 0 ? f = 0 : f > p - l && (f = p - l);
120
- var b = p - l - (m = this.props.primaryIndex === 1 ? f : p - l - f);
121
- return this.props.percentage && (m = 100 * m / p, b = 100 * b / p, l = 100 * l / p, p = 100), b < this.props.primaryMinSize ? m = Math.max(m - (this.props.primaryMinSize - b), 0) : m < this.props.secondaryMinSize && (m = Math.min(p - l - this.props.primaryMinSize, this.props.secondaryMinSize)), m;
119
+ } }, { key: "getSecondaryPaneSize", value: function(e4, t4, n3, o3) {
120
+ var r2, i2, a2, s2;
121
+ this.props.vertical ? (r2 = e4.height, i2 = t4.height, a2 = n3.top - e4.top) : (r2 = e4.width, i2 = t4.width, a2 = n3.left - e4.left), o3 && (a2 -= i2 / 2), a2 < 0 ? a2 = 0 : a2 > r2 - i2 && (a2 = r2 - i2);
122
+ var c2 = r2 - i2 - (s2 = 1 === this.props.primaryIndex ? a2 : r2 - i2 - a2);
123
+ return this.props.percentage && (s2 = 100 * s2 / r2, c2 = 100 * c2 / r2, i2 = 100 * i2 / r2, r2 = 100), c2 < this.props.primaryMinSize ? s2 = Math.max(s2 - (this.props.primaryMinSize - c2), 0) : s2 < this.props.secondaryMinSize && (s2 = Math.min(r2 - i2 - this.props.primaryMinSize, this.props.secondaryMinSize)), s2;
122
124
  } }, { key: "handleResize", value: function() {
123
125
  if (this.splitter && !this.props.percentage) {
124
- var n = this.container.getBoundingClientRect(), e = this.splitter.getBoundingClientRect(), s = this.getSecondaryPaneSize(n, e, { left: e.left, top: e.top }, !1);
125
- this.setState({ secondaryPaneSize: s });
126
+ var e4 = this.container.getBoundingClientRect(), t4 = this.splitter.getBoundingClientRect(), n3 = this.getSecondaryPaneSize(e4, t4, { left: t4.left, top: t4.top }, false);
127
+ this.setState({ secondaryPaneSize: n3 });
126
128
  }
127
- } }, { key: "handleMouseMove", value: function(n) {
129
+ } }, { key: "handleMouseMove", value: function(e4) {
128
130
  if (this.state.resizing) {
129
- var e = this.container.getBoundingClientRect(), s = this.splitter.getBoundingClientRect(), d = this.getSecondaryPaneSize(e, s, { left: n.clientX, top: n.clientY }, !0);
130
- C(), this.setState({ secondaryPaneSize: d });
131
+ var t4 = this.container.getBoundingClientRect(), n3 = this.splitter.getBoundingClientRect(), o3 = this.getSecondaryPaneSize(t4, n3, { left: e4.clientX, top: e4.clientY }, true);
132
+ f(), this.setState({ secondaryPaneSize: o3 });
131
133
  }
132
- } }, { key: "handleTouchMove", value: function(n) {
133
- this.handleMouseMove(n.changedTouches[0]);
134
+ } }, { key: "handleTouchMove", value: function(e4) {
135
+ this.handleMouseMove(e4.changedTouches[0]);
134
136
  } }, { key: "handleSplitterMouseDown", value: function() {
135
- C(), this.setState({ resizing: !0 });
137
+ f(), this.setState({ resizing: true });
136
138
  } }, { key: "handleMouseUp", value: function() {
137
- this.setState(function(n) {
138
- return n.resizing ? { resizing: !1 } : null;
139
+ this.setState(function(e4) {
140
+ return e4.resizing ? { resizing: false } : null;
139
141
  });
140
142
  } }, { key: "render", value: function() {
141
- var n = this, e = "splitter-layout";
142
- this.props.customClassName && (e += " ".concat(this.props.customClassName)), this.props.vertical && (e += " splitter-layout-vertical"), this.state.resizing && (e += " layout-changing");
143
- var s = r.a.Children.toArray(this.props.children).slice(0, 2);
144
- s.length === 0 && s.push(r.a.createElement("div", null));
145
- for (var d = [], p = this.props.primaryIndex !== 0 && this.props.primaryIndex !== 1 ? 0 : this.props.primaryIndex, l = 0; l < s.length; ++l) {
146
- var f = !0, m = null;
147
- s.length > 1 && l !== p && (f = !1, m = this.state.secondaryPaneSize), d.push(r.a.createElement(T, { vertical: this.props.vertical, percentage: this.props.percentage, primary: f, size: m }, s[l]));
143
+ var e4 = this, t4 = "splitter-layout";
144
+ this.props.customClassName && (t4 += " ".concat(this.props.customClassName)), this.props.vertical && (t4 += " splitter-layout-vertical"), this.state.resizing && (t4 += " layout-changing");
145
+ var n3 = r.a.Children.toArray(this.props.children).slice(0, 2);
146
+ 0 === n3.length && n3.push(r.a.createElement("div", null));
147
+ for (var o3 = [], i2 = 0 !== this.props.primaryIndex && 1 !== this.props.primaryIndex ? 0 : this.props.primaryIndex, a2 = 0; a2 < n3.length; ++a2) {
148
+ var s2 = true, l2 = null;
149
+ n3.length > 1 && a2 !== i2 && (s2 = false, l2 = this.state.secondaryPaneSize), o3.push(r.a.createElement(c, { vertical: this.props.vertical, percentage: this.props.percentage, primary: s2, size: l2 }, n3[a2]));
148
150
  }
149
- return r.a.createElement("div", { className: e, ref: function(b) {
150
- n.container = b;
151
- } }, d[0], d.length > 1 && r.a.createElement("div", { role: "separator", className: "layout-splitter", ref: function(b) {
152
- n.splitter = b;
153
- }, onMouseDown: this.handleSplitterMouseDown, onTouchStart: this.handleSplitterMouseDown }), d.length > 1 && d[1]);
154
- } }]) && j(h.prototype, u), a;
151
+ return r.a.createElement("div", { className: t4, ref: function(t5) {
152
+ e4.container = t5;
153
+ } }, o3[0], o3.length > 1 && r.a.createElement("div", { role: "separator", className: "layout-splitter", ref: function(t5) {
154
+ e4.splitter = t5;
155
+ }, onMouseDown: this.handleSplitterMouseDown, onTouchStart: this.handleSplitterMouseDown }), o3.length > 1 && o3[1]);
156
+ } }]) && u(n2.prototype, o2), t3;
155
157
  }();
156
- w.propTypes = { customClassName: i.a.string, vertical: i.a.bool, percentage: i.a.bool, primaryIndex: i.a.number, primaryMinSize: i.a.number, secondaryInitialSize: i.a.number, secondaryMinSize: i.a.number, onDragStart: i.a.func, onDragEnd: i.a.func, onSecondaryPaneSizeChange: i.a.func, children: i.a.arrayOf(i.a.node) }, w.defaultProps = { customClassName: "", vertical: !1, percentage: !1, primaryIndex: 0, primaryMinSize: 0, secondaryInitialSize: void 0, secondaryMinSize: 0, onDragStart: null, onDragEnd: null, onSecondaryPaneSizeChange: null, children: [] };
157
- var _ = w;
158
- v.default = _;
158
+ y.propTypes = { customClassName: a.a.string, vertical: a.a.bool, percentage: a.a.bool, primaryIndex: a.a.number, primaryMinSize: a.a.number, secondaryInitialSize: a.a.number, secondaryMinSize: a.a.number, onDragStart: a.a.func, onDragEnd: a.a.func, onSecondaryPaneSizeChange: a.a.func, children: a.a.arrayOf(a.a.node) }, y.defaultProps = { customClassName: "", vertical: false, percentage: false, primaryIndex: 0, primaryMinSize: 0, secondaryInitialSize: void 0, secondaryMinSize: 0, onDragStart: null, onDragEnd: null, onSecondaryPaneSizeChange: null, children: [] };
159
+ var m = y;
160
+ t2.default = m;
159
161
  }]);
160
162
  });
161
- })(D);
162
- const $ = /* @__PURE__ */ k(D.exports);
163
+ })(lib);
164
+ const SplitterLayout = /* @__PURE__ */ getDefaultExportFromCjs(lib.exports);
163
165
  export {
164
- $ as S
166
+ SplitterLayout as S
165
167
  };