@m4l/components 0.1.13 → 0.1.15
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.
- package/assets/Logo/index.js +91 -0
- package/commonjs.js +9 -0
- package/components/CommonActions/components/ActionCancel/index.js +15 -0
- package/components/CommonActions/components/ActionFormCancel/index.js +62 -0
- package/components/CommonActions/components/ActionFormIntro/index.js +35 -0
- package/components/CommonActions/components/ActionIntro/index.js +16 -0
- package/components/CommonActions/components/Actions/index.js +859 -0
- package/components/CompanyLogo/{index.f81c179c.js → index.js} +48 -42
- package/components/DataGrid/index.js +1067 -0
- package/components/DynamicFilter/index.js +1573 -0
- package/components/ErrorLabel/index.js +18 -0
- package/components/Icon/index.js +80 -0
- package/components/Image/index.js +128 -0
- package/components/LanguagePopover/index.js +93 -0
- package/components/Loadable/index.js +13 -0
- package/components/ModalDialog/index.js +180 -0
- package/components/NoItemSelected/{index.12f0ca67.js → index.js} +50 -43
- package/components/ObjectLogs/index.js +284 -0
- package/components/Page/index.js +36 -0
- package/components/PaperForm/index.js +110 -0
- package/components/Period/index.js +230 -0
- package/components/PropertyValue/index.js +142 -0
- package/components/Resizeable/{index.45995d2b.js → index.js} +19 -21
- package/components/ScrollBar/index.js +52 -0
- package/components/ScrollToTop/index.js +10 -0
- package/components/SplitLayout/{index.4032673d.js → index.js} +35 -35
- package/components/animate/LoadingScreen/{index.f1cec7db.js → index.js} +27 -29
- package/components/animate/MotionContainer/index.js +31 -0
- package/components/animate/MotionLazyContainer/index.js +13 -0
- package/components/animate/features.js +2 -0
- package/components/animate/variants/{bounce.784aaaaa.js → bounce.js} +16 -15
- package/components/animate/variants/container.js +20 -0
- package/components/animate/variants/fade.js +61 -0
- package/components/animate/variants/{index.7a912140.js → index.js} +0 -0
- package/components/animate/variants/transition.js +16 -0
- package/components/formatters/BooleanFormatter/index.js +52 -0
- package/components/formatters/DateFormatter/index.js +66 -0
- package/components/formatters/index.js +112 -0
- package/components/hook-form/FormProvider/index.js +61 -0
- package/components/hook-form/RHFAutocomplete/index.js +144 -0
- package/components/hook-form/RHFAutocompleteAsync/index.js +191 -0
- package/components/hook-form/RHFCheckbox/index.js +65 -0
- package/components/hook-form/RHFDateTime/index.js +79 -0
- package/components/hook-form/RHFMultiCheckbox/index.js +32 -0
- package/components/hook-form/RHFPeriod/index.js +47 -0
- package/components/hook-form/RHFRadioGroup/index.js +41 -0
- package/components/hook-form/RHFSelect/index.js +34 -0
- package/components/hook-form/RHFTextField/index.js +87 -0
- package/components/hook-form/RHFUpload/index.js +255 -0
- package/components/mui_extended/Accordion/index.js +105 -0
- package/components/mui_extended/Avatar/index.js +33 -0
- package/components/mui_extended/BoxIcon/index.js +20 -0
- package/components/mui_extended/Breadcrumbs/index.js +92 -0
- package/components/mui_extended/Button/index.js +131 -0
- package/components/mui_extended/IconButton/index.js +108 -0
- package/components/mui_extended/LinkWithRoute/index.js +30 -0
- package/components/mui_extended/MenuPopover/index.js +135 -0
- package/components/mui_extended/Pager/index.js +137 -0
- package/components/mui_extended/Tab/index.js +30 -0
- package/components/mui_extended/Typography/index.js +21 -0
- package/contexts/ModalContext/index.js +165 -0
- package/hooks/useFormAddEdit/index.js +42 -0
- package/hooks/useModal/index.js +4 -0
- package/index.js +70 -162
- package/lodash.js +62 -0
- package/node_modules.js +54 -0
- package/package.json +2 -1
- package/react-data-grid.js +2652 -0
- package/react-draggable.js +960 -0
- package/react-json-view.js +2764 -0
- package/react-lazy-load-image-component.js +792 -0
- package/react-resizable.js +541 -0
- package/react-splitter-layout.js +165 -0
- package/utils/index.js +572 -0
- package/assets/Logo/index.228dcb5a.js +0 -86
- package/commonjs.565e6834.js +0 -12
- package/components/CommonActions/components/ActionCancel/index.cba1b460.js +0 -17
- package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +0 -49
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +0 -31
- package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +0 -18
- package/components/CommonActions/components/Actions/index.e8148d98.js +0 -743
- package/components/DataGrid/index.b688877d.js +0 -894
- package/components/DynamicFilter/index.82ce857e.js +0 -1158
- package/components/ErrorLabel/index.c8615f16.js +0 -19
- package/components/Icon/index.cbca79b0.js +0 -70
- package/components/Image/index.e790b50b.js +0 -122
- package/components/LanguagePopover/index.3d9611cb.js +0 -87
- package/components/Loadable/index.f5518558.js +0 -15
- package/components/ModalDialog/index.3850c053.js +0 -168
- package/components/ObjectLogs/index.27ef875d.js +0 -266
- package/components/Page/index.6d69977e.js +0 -35
- package/components/PaperForm/index.d7c74064.js +0 -105
- package/components/Period/index.5e68286a.js +0 -160
- package/components/PropertyValue/index.ab3dd7e9.js +0 -116
- package/components/ScrollBar/index.39eeb2de.js +0 -49
- package/components/ScrollToTop/index.e06f98f6.js +0 -11
- package/components/animate/MotionContainer/index.8d9f9d80.js +0 -30
- package/components/animate/MotionLazyContainer/index.572dd012.js +0 -15
- package/components/animate/features.0fbf41e1.js +0 -5
- package/components/animate/variants/container.11f82b76.js +0 -20
- package/components/animate/variants/fade.b561c0fc.js +0 -59
- package/components/animate/variants/transition.bd46b9ce.js +0 -15
- package/components/formatters/BooleanFormatter/index.cca53b7f.js +0 -42
- package/components/formatters/DateFormatter/index.ad8d9b8e.js +0 -57
- package/components/formatters/index.55856d65.js +0 -106
- package/components/hook-form/FormProvider/index.257acd9f.js +0 -55
- package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
- package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
- package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
- package/components/hook-form/RHFDateTime/index.fc5cbafe.js +0 -68
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
- package/components/hook-form/RHFPeriod/index.23c254e9.js +0 -45
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +0 -43
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
- package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
- package/components/hook-form/RHFUpload/index.ed3d739f.js +0 -244
- package/components/mui_extended/Accordion/index.2116e423.js +0 -103
- package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -89
- package/components/mui_extended/Button/index.84d8898c.js +0 -110
- package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
- package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
- package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
- package/components/mui_extended/Pager/index.0576814f.js +0 -126
- package/components/mui_extended/Tab/index.e0653a0a.js +0 -28
- package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
- package/contexts/ModalContext/index.2188b69e.js +0 -150
- package/hooks/useFormAddEdit/index.d4845f1a.js +0 -26
- package/hooks/useModal/index.6571d2d9.js +0 -6
- package/lodash.e09401f0.js +0 -32
- package/node_modules.168cb897.js +0 -55
- package/react-data-grid.d46d625e.js +0 -2115
- package/react-draggable.20e95c61.js +0 -714
- package/react-json-view.f56a7f8e.js +0 -2762
- package/react-lazy-load-image-component.45b56650.js +0 -784
- package/react-resizable.5277deaf.js +0 -371
- package/react-splitter-layout.7810ac1b.js +0 -165
- package/utils/index.214d9542.js +0 -435
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { g as getDefaultExportFromCjs } from "./commonjs.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
|
+
}
|
|
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;
|
|
36
|
+
} : function() {
|
|
37
|
+
return e3;
|
|
38
|
+
};
|
|
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);
|
|
55
|
+
}
|
|
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);
|
|
64
|
+
}
|
|
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);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function p(e3) {
|
|
72
|
+
return (p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
|
|
73
|
+
return e4.__proto__ || Object.getPrototypeOf(e4);
|
|
74
|
+
})(e3);
|
|
75
|
+
}
|
|
76
|
+
function d(e3, t3) {
|
|
77
|
+
return (d = Object.setPrototypeOf || function(e4, t4) {
|
|
78
|
+
return e4.__proto__ = t4, e4;
|
|
79
|
+
})(e3, t3);
|
|
80
|
+
}
|
|
81
|
+
function h(e3) {
|
|
82
|
+
if (void 0 === e3)
|
|
83
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
84
|
+
return e3;
|
|
85
|
+
}
|
|
86
|
+
function f() {
|
|
87
|
+
if (document.body.createTextRange) {
|
|
88
|
+
var e3 = document.body.createTextRange();
|
|
89
|
+
e3.collapse(), e3.select();
|
|
90
|
+
} else
|
|
91
|
+
window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty();
|
|
92
|
+
}
|
|
93
|
+
var y = function(e3) {
|
|
94
|
+
function t3(e4) {
|
|
95
|
+
var n3, o3, r2;
|
|
96
|
+
return function(e5, t4) {
|
|
97
|
+
if (!(e5 instanceof t4))
|
|
98
|
+
throw new TypeError("Cannot call a class as a function");
|
|
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;
|
|
100
|
+
}
|
|
101
|
+
var n2, o2;
|
|
102
|
+
return function(e4, t4) {
|
|
103
|
+
if ("function" != typeof t4 && null !== t4)
|
|
104
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
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;
|
|
110
|
+
else {
|
|
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);
|
|
113
|
+
}
|
|
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());
|
|
117
|
+
} }, { key: "componentWillUnmount", value: function() {
|
|
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);
|
|
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;
|
|
124
|
+
} }, { key: "handleResize", value: function() {
|
|
125
|
+
if (this.splitter && !this.props.percentage) {
|
|
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 });
|
|
128
|
+
}
|
|
129
|
+
} }, { key: "handleMouseMove", value: function(e4) {
|
|
130
|
+
if (this.state.resizing) {
|
|
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 });
|
|
133
|
+
}
|
|
134
|
+
} }, { key: "handleTouchMove", value: function(e4) {
|
|
135
|
+
this.handleMouseMove(e4.changedTouches[0]);
|
|
136
|
+
} }, { key: "handleSplitterMouseDown", value: function() {
|
|
137
|
+
f(), this.setState({ resizing: true });
|
|
138
|
+
} }, { key: "handleMouseUp", value: function() {
|
|
139
|
+
this.setState(function(e4) {
|
|
140
|
+
return e4.resizing ? { resizing: false } : null;
|
|
141
|
+
});
|
|
142
|
+
} }, { key: "render", value: function() {
|
|
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]));
|
|
150
|
+
}
|
|
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;
|
|
157
|
+
}();
|
|
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;
|
|
161
|
+
}]);
|
|
162
|
+
});
|
|
163
|
+
})(lib);
|
|
164
|
+
const SplitterLayout = /* @__PURE__ */ getDefaultExportFromCjs(lib.exports);
|
|
165
|
+
export { SplitterLayout as S };
|