@m4l/components 9.1.1 → 9.1.3

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.
@@ -0,0 +1,8 @@
1
+ import "prop-types";
2
+ import "react";
3
+ function getDefaultExportFromCjs(x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
+ }
6
+ export {
7
+ getDefaultExportFromCjs as g
8
+ };
@@ -1,5 +1,5 @@
1
- import { g as getCommonActionsDictionary } from "../CommonActions/dictionary.js";
2
1
  import { g as getRHFAutocompleteComponentsDictionary } from "../hook-form/RHFAutocomplete/dictionary.js";
2
+ import { g as getCommonActionsDictionary } from "../CommonActions/dictionary.js";
3
3
  const DYNAMIC_FILTER_DICTIONARY_ID = "dynamic_filter";
4
4
  function getDynamicFilterComponentsDictionary() {
5
5
  return [DYNAMIC_FILTER_DICTIONARY_ID].concat(
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -4,7 +4,7 @@ import { u as useSplitLayoutUtilityClasses } from "./classes/index.js";
4
4
  import clsx from "clsx";
5
5
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
6
6
  import { g as getNameSplitLayoutDataTestId } from "./tests/utils.js";
7
- import SplitterLayout from "react-splitter-layout";
7
+ import { S as SplitterLayout } from "../../internal_libs/react-splitter-layout.js";
8
8
  function SplitLayout(props) {
9
9
  const {
10
10
  splitPosition,
@@ -1,4 +1,4 @@
1
- /* empty css */
1
+ import "/Users/jalinux/Documents/Dev/Frontend/M4l/m4l_monorepo/node_modules/react-resizable/css/styles.css";
2
2
  import { styled } from "@mui/material/styles";
3
3
  import { a as areasViewerClasses } from "./classes/index.js";
4
4
  const AreasViewerRoot = styled("div")`
@@ -2,7 +2,7 @@ import { styled } from "@mui/material/styles";
2
2
  import { C as COMPONET_KEY_COMPONENT } from "../constants.js";
3
3
  import { r as resizableBoxStyles } from "../../ResizableBox/ResizeableBox.styles.js";
4
4
  import { R as ResizableSlots } from "./slots.js";
5
- import { Resizable } from "react-resizable";
5
+ import { Resizable } from "/Users/jalinux/Documents/Dev/Frontend/M4l/m4l_monorepo/node_modules/react-resizable/index.js";
6
6
  const RootStyled = styled(Resizable, { name: COMPONET_KEY_COMPONENT, slot: ResizableSlots.root })(
7
7
  resizableBoxStyles?.root
8
8
  );
@@ -2,7 +2,7 @@ import { styled } from "@mui/material/styles";
2
2
  import { C as COMPONET_KEY_COMPONENT } from "../constants.js";
3
3
  import { r as resizableBoxStyles } from "../ResizeableBox.styles.js";
4
4
  import { R as ResizableBoxSlots } from "./slots.js";
5
- import { ResizableBox } from "react-resizable";
5
+ import { ResizableBox } from "/Users/jalinux/Documents/Dev/Frontend/M4l/m4l_monorepo/node_modules/react-resizable/index.js";
6
6
  const RootStyled = styled(ResizableBox, { name: COMPONET_KEY_COMPONENT, slot: ResizableBoxSlots.root })(
7
7
  resizableBoxStyles?.root
8
8
  );
@@ -0,0 +1,158 @@
1
+ import { g as getDefaultExportFromCjs } from "../commonjs/index.js";
2
+ import require$$0 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$$0, React);
8
+ }(window, function(e, t) {
9
+ return function(e2) {
10
+ var t2 = {};
11
+ function n(o) {
12
+ if (t2[o]) return t2[o].exports;
13
+ var r = t2[o] = { i: o, l: false, exports: {} };
14
+ return e2[o].call(r.exports, r, r.exports, n), r.l = true, r.exports;
15
+ }
16
+ return n.m = e2, n.c = t2, n.d = function(e3, t3, o) {
17
+ n.o(e3, t3) || Object.defineProperty(e3, t3, { enumerable: true, get: o });
18
+ }, n.r = function(e3) {
19
+ "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e3, "__esModule", { value: true });
20
+ }, n.t = function(e3, t3) {
21
+ if (1 & t3 && (e3 = n(e3)), 8 & t3) return e3;
22
+ if (4 & t3 && "object" == typeof e3 && e3 && e3.__esModule) return e3;
23
+ var o = /* @__PURE__ */ Object.create(null);
24
+ if (n.r(o), Object.defineProperty(o, "default", { enumerable: true, value: e3 }), 2 & t3 && "string" != typeof e3) for (var r in e3) n.d(o, r, function(t4) {
25
+ return e3[t4];
26
+ }.bind(null, r));
27
+ return o;
28
+ }, n.n = function(e3) {
29
+ var t3 = e3 && e3.__esModule ? function() {
30
+ return e3.default;
31
+ } : function() {
32
+ return e3;
33
+ };
34
+ return n.d(t3, "a", t3), t3;
35
+ }, n.o = function(e3, t3) {
36
+ return Object.prototype.hasOwnProperty.call(e3, t3);
37
+ }, n.p = "", n(n.s = 2);
38
+ }([function(t2, n) {
39
+ t2.exports = e;
40
+ }, function(e2, n) {
41
+ e2.exports = t;
42
+ }, function(e2, t2, n) {
43
+ e2.exports = n(3);
44
+ }, function(e2, t2, n) {
45
+ n.r(t2);
46
+ var o = n(1), r = n.n(o), i = n(0), a = n.n(i);
47
+ function s(e3) {
48
+ var t3 = e3.size || 0, n2 = e3.percentage ? "%" : "px", o2 = "layout-pane", i2 = {};
49
+ 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);
50
+ }
51
+ 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: [] };
52
+ var c = s;
53
+ function l(e3) {
54
+ return (l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
55
+ return typeof e4;
56
+ } : function(e4) {
57
+ return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
58
+ })(e3);
59
+ }
60
+ function u(e3, t3) {
61
+ for (var n2 = 0; n2 < t3.length; n2++) {
62
+ var o2 = t3[n2];
63
+ o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e3, o2.key, o2);
64
+ }
65
+ }
66
+ function p(e3) {
67
+ return (p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
68
+ return e4.__proto__ || Object.getPrototypeOf(e4);
69
+ })(e3);
70
+ }
71
+ function d(e3, t3) {
72
+ return (d = Object.setPrototypeOf || function(e4, t4) {
73
+ return e4.__proto__ = t4, e4;
74
+ })(e3, t3);
75
+ }
76
+ function h(e3) {
77
+ if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
78
+ return e3;
79
+ }
80
+ function f() {
81
+ if (document.body.createTextRange) {
82
+ var e3 = document.body.createTextRange();
83
+ e3.collapse(), e3.select();
84
+ } else window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty();
85
+ }
86
+ var y = function(e3) {
87
+ function t3(e4) {
88
+ var n3, o3, r2;
89
+ return function(e5, t4) {
90
+ if (!(e5 instanceof t4)) throw new TypeError("Cannot call a class as a function");
91
+ }(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;
92
+ }
93
+ var n2, o2;
94
+ return function(e4, t4) {
95
+ if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function");
96
+ e4.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e4, writable: true, configurable: true } }), t4 && d(e4, t4);
97
+ }(t3, r.a.Component), n2 = t3, (o2 = [{ key: "componentDidMount", value: function() {
98
+ var e4;
99
+ 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) e4 = this.props.secondaryInitialSize;
100
+ else {
101
+ var t4, n3 = this.container.getBoundingClientRect();
102
+ 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);
103
+ }
104
+ this.setState({ secondaryPaneSize: e4 });
105
+ } }, { key: "componentDidUpdate", value: function(e4, t4) {
106
+ 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());
107
+ } }, { key: "componentWillUnmount", value: function() {
108
+ 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);
109
+ } }, { key: "getSecondaryPaneSize", value: function(e4, t4, n3, o3) {
110
+ var r2, i2, a2, s2;
111
+ 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);
112
+ var c2 = r2 - i2 - (s2 = 1 === this.props.primaryIndex ? a2 : r2 - i2 - a2);
113
+ 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;
114
+ } }, { key: "handleResize", value: function() {
115
+ if (this.splitter && !this.props.percentage) {
116
+ var e4 = this.container.getBoundingClientRect(), t4 = this.splitter.getBoundingClientRect(), n3 = this.getSecondaryPaneSize(e4, t4, { left: t4.left, top: t4.top }, false);
117
+ this.setState({ secondaryPaneSize: n3 });
118
+ }
119
+ } }, { key: "handleMouseMove", value: function(e4) {
120
+ if (this.state.resizing) {
121
+ var t4 = this.container.getBoundingClientRect(), n3 = this.splitter.getBoundingClientRect(), o3 = this.getSecondaryPaneSize(t4, n3, { left: e4.clientX, top: e4.clientY }, true);
122
+ f(), this.setState({ secondaryPaneSize: o3 });
123
+ }
124
+ } }, { key: "handleTouchMove", value: function(e4) {
125
+ this.handleMouseMove(e4.changedTouches[0]);
126
+ } }, { key: "handleSplitterMouseDown", value: function() {
127
+ f(), this.setState({ resizing: true });
128
+ } }, { key: "handleMouseUp", value: function() {
129
+ this.setState(function(e4) {
130
+ return e4.resizing ? { resizing: false } : null;
131
+ });
132
+ } }, { key: "render", value: function() {
133
+ var e4 = this, t4 = "splitter-layout";
134
+ this.props.customClassName && (t4 += " ".concat(this.props.customClassName)), this.props.vertical && (t4 += " splitter-layout-vertical"), this.state.resizing && (t4 += " layout-changing");
135
+ var n3 = r.a.Children.toArray(this.props.children).slice(0, 2);
136
+ 0 === n3.length && n3.push(r.a.createElement("div", null));
137
+ for (var o3 = [], i2 = 0 !== this.props.primaryIndex && 1 !== this.props.primaryIndex ? 0 : this.props.primaryIndex, a2 = 0; a2 < n3.length; ++a2) {
138
+ var s2 = true, l2 = null;
139
+ 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]));
140
+ }
141
+ return r.a.createElement("div", { className: t4, ref: function(t5) {
142
+ e4.container = t5;
143
+ } }, o3[0], o3.length > 1 && r.a.createElement("div", { role: "separator", className: "layout-splitter", ref: function(t5) {
144
+ e4.splitter = t5;
145
+ }, onMouseDown: this.handleSplitterMouseDown, onTouchStart: this.handleSplitterMouseDown }), o3.length > 1 && o3[1]);
146
+ } }]) && u(n2.prototype, o2), t3;
147
+ }();
148
+ 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: [] };
149
+ var m = y;
150
+ t2.default = m;
151
+ }]);
152
+ });
153
+ })(lib);
154
+ var libExports = lib.exports;
155
+ const SplitterLayout = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
156
+ export {
157
+ SplitterLayout as S
158
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -44,7 +44,6 @@
44
44
  "react-resizable": "^3.0.4",
45
45
  "react-router-dom": "6.3.0",
46
46
  "react-spinners": "^0.13.8",
47
- "react-splitter-layout": "^4.0.0",
48
47
  "react-toastify": "10.0.5",
49
48
  "react-transition-group": "^4.4.5",
50
49
  "simplebar-react": "3.2.6",
@@ -54,7 +53,7 @@
54
53
  "peerDependencies": {
55
54
  "@m4l/core": "^2.0.12",
56
55
  "@m4l/graphics": "^7.0.2",
57
- "@m4l/styles": "^7.0.1",
56
+ "@m4l/styles": "^7.1.5",
58
57
  "@mui/lab": "5.0.0-alpha.173",
59
58
  "@mui/material": "^5.15.19",
60
59
  "@mui/x-date-pickers": "^6.11.1"
package/style.css DELETED
@@ -1,65 +0,0 @@
1
- .react-resizable {
2
- position: relative;
3
- }
4
- .react-resizable-handle {
5
- position: absolute;
6
- width: 20px;
7
- height: 20px;
8
- background-repeat: no-repeat;
9
- background-origin: content-box;
10
- box-sizing: border-box;
11
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');
12
- background-position: bottom right;
13
- padding: 0 3px 3px 0;
14
- }
15
- .react-resizable-handle-sw {
16
- bottom: 0;
17
- left: 0;
18
- cursor: sw-resize;
19
- transform: rotate(90deg);
20
- }
21
- .react-resizable-handle-se {
22
- bottom: 0;
23
- right: 0;
24
- cursor: se-resize;
25
- }
26
- .react-resizable-handle-nw {
27
- top: 0;
28
- left: 0;
29
- cursor: nw-resize;
30
- transform: rotate(180deg);
31
- }
32
- .react-resizable-handle-ne {
33
- top: 0;
34
- right: 0;
35
- cursor: ne-resize;
36
- transform: rotate(270deg);
37
- }
38
- .react-resizable-handle-w,
39
- .react-resizable-handle-e {
40
- top: 50%;
41
- margin-top: -10px;
42
- cursor: ew-resize;
43
- }
44
- .react-resizable-handle-w {
45
- left: 0;
46
- transform: rotate(135deg);
47
- }
48
- .react-resizable-handle-e {
49
- right: 0;
50
- transform: rotate(315deg);
51
- }
52
- .react-resizable-handle-n,
53
- .react-resizable-handle-s {
54
- left: 50%;
55
- margin-left: -10px;
56
- cursor: ns-resize;
57
- }
58
- .react-resizable-handle-n {
59
- top: 0;
60
- transform: rotate(225deg);
61
- }
62
- .react-resizable-handle-s {
63
- bottom: 0;
64
- transform: rotate(45deg);
65
- }