@m4l/components 0.1.12 → 0.1.13

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 (143) hide show
  1. package/assets/Logo/index.228dcb5a.js +86 -0
  2. package/commonjs.565e6834.js +12 -0
  3. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
  6. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
  7. package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
  8. package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
  9. package/components/DataGrid/index.b688877d.js +894 -0
  10. package/components/DynamicFilter/index.82ce857e.js +1158 -0
  11. package/components/ErrorLabel/index.c8615f16.js +19 -0
  12. package/components/Icon/index.cbca79b0.js +70 -0
  13. package/components/Image/index.e790b50b.js +122 -0
  14. package/components/LanguagePopover/index.3d9611cb.js +87 -0
  15. package/components/Loadable/index.f5518558.js +15 -0
  16. package/components/ModalDialog/index.3850c053.js +168 -0
  17. package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
  18. package/components/ObjectLogs/index.27ef875d.js +266 -0
  19. package/components/Page/index.6d69977e.js +35 -0
  20. package/components/Page/index.d.ts +1 -1
  21. package/components/PaperForm/index.d7c74064.js +105 -0
  22. package/components/Period/index.5e68286a.js +160 -0
  23. package/components/PropertyValue/index.ab3dd7e9.js +116 -0
  24. package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
  25. package/components/ScrollBar/index.39eeb2de.js +49 -0
  26. package/components/ScrollToTop/index.e06f98f6.js +11 -0
  27. package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
  28. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  29. package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
  30. package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
  31. package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
  32. package/components/animate/features.0fbf41e1.js +5 -0
  33. package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
  34. package/components/animate/variants/container.11f82b76.js +20 -0
  35. package/components/animate/variants/fade.b561c0fc.js +59 -0
  36. package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
  37. package/components/animate/variants/transition.bd46b9ce.js +15 -0
  38. package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
  39. package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
  40. package/components/formatters/index.55856d65.js +106 -0
  41. package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
  42. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
  43. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
  44. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
  45. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
  46. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
  47. package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
  48. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
  49. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
  50. package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
  51. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  52. package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
  53. package/components/mui_extended/Accordion/index.2116e423.js +103 -0
  54. package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
  55. package/components/mui_extended/Avatar/index.d.ts +1 -1
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
  58. package/components/mui_extended/Button/index.84d8898c.js +110 -0
  59. package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
  60. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
  61. package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
  62. package/components/mui_extended/Pager/index.0576814f.js +126 -0
  63. package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
  64. package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
  65. package/contexts/ModalContext/index.2188b69e.js +150 -0
  66. package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
  67. package/hooks/useModal/index.6571d2d9.js +6 -0
  68. package/index.js +162 -70
  69. package/lodash.e09401f0.js +32 -0
  70. package/node_modules.168cb897.js +55 -0
  71. package/package.json +1 -1
  72. package/react-data-grid.d46d625e.js +2115 -0
  73. package/react-draggable.20e95c61.js +714 -0
  74. package/react-json-view.f56a7f8e.js +2762 -0
  75. package/react-lazy-load-image-component.45b56650.js +784 -0
  76. package/react-resizable.5277deaf.js +371 -0
  77. package/react-splitter-layout.7810ac1b.js +165 -0
  78. package/utils/index.214d9542.js +435 -0
  79. package/assets/Logo/index.js +0 -91
  80. package/commonjs.js +0 -9
  81. package/components/CommonActions/components/ActionCancel/index.js +0 -15
  82. package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
  83. package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
  84. package/components/CommonActions/components/ActionIntro/index.js +0 -16
  85. package/components/CommonActions/components/Actions/index.js +0 -859
  86. package/components/DataGrid/index.js +0 -1067
  87. package/components/DynamicFilter/index.js +0 -1573
  88. package/components/ErrorLabel/index.js +0 -18
  89. package/components/Icon/index.js +0 -80
  90. package/components/Image/index.js +0 -128
  91. package/components/LanguagePopover/index.js +0 -93
  92. package/components/Loadable/index.js +0 -13
  93. package/components/ModalDialog/index.js +0 -180
  94. package/components/ObjectLogs/index.js +0 -284
  95. package/components/Page/index.js +0 -36
  96. package/components/PaperForm/index.js +0 -110
  97. package/components/Period/index.js +0 -230
  98. package/components/PropertyValue/index.js +0 -142
  99. package/components/ScrollBar/index.js +0 -52
  100. package/components/ScrollToTop/index.js +0 -10
  101. package/components/animate/MotionContainer/index.js +0 -31
  102. package/components/animate/MotionLazyContainer/index.js +0 -13
  103. package/components/animate/features.js +0 -2
  104. package/components/animate/variants/container.js +0 -20
  105. package/components/animate/variants/fade.js +0 -61
  106. package/components/animate/variants/transition.js +0 -16
  107. package/components/formatters/BooleanFormatter/index.js +0 -52
  108. package/components/formatters/DateFormatter/index.js +0 -66
  109. package/components/formatters/index.js +0 -112
  110. package/components/hook-form/FormProvider/index.js +0 -61
  111. package/components/hook-form/RHFAutocomplete/index.js +0 -144
  112. package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
  113. package/components/hook-form/RHFCheckbox/index.js +0 -65
  114. package/components/hook-form/RHFDateTime/index.js +0 -79
  115. package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
  116. package/components/hook-form/RHFPeriod/index.js +0 -47
  117. package/components/hook-form/RHFRadioGroup/index.js +0 -41
  118. package/components/hook-form/RHFSelect/index.js +0 -34
  119. package/components/hook-form/RHFTextField/index.js +0 -87
  120. package/components/hook-form/RHFUpload/index.js +0 -255
  121. package/components/mui_extended/Accordion/index.js +0 -105
  122. package/components/mui_extended/Avatar/index.js +0 -33
  123. package/components/mui_extended/BoxIcon/index.js +0 -20
  124. package/components/mui_extended/Breadcrumbs/index.js +0 -92
  125. package/components/mui_extended/Button/index.js +0 -131
  126. package/components/mui_extended/IconButton/index.js +0 -108
  127. package/components/mui_extended/LinkWithRoute/index.js +0 -30
  128. package/components/mui_extended/MenuPopover/index.js +0 -135
  129. package/components/mui_extended/Pager/index.js +0 -137
  130. package/components/mui_extended/Tab/index.js +0 -30
  131. package/components/mui_extended/Typography/index.js +0 -21
  132. package/contexts/ModalContext/index.js +0 -165
  133. package/hooks/useFormAddEdit/index.js +0 -42
  134. package/hooks/useModal/index.js +0 -4
  135. package/lodash.js +0 -62
  136. package/node_modules.js +0 -54
  137. package/react-data-grid.js +0 -2652
  138. package/react-draggable.js +0 -960
  139. package/react-json-view.js +0 -2764
  140. package/react-lazy-load-image-component.js +0 -792
  141. package/react-resizable.js +0 -541
  142. package/react-splitter-layout.js +0 -165
  143. package/utils/index.js +0 -572
@@ -0,0 +1,435 @@
1
+ import B from "react";
2
+ const Pe = function(e, t) {
3
+ t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
4
+ let r = e;
5
+ const n = t.split(".");
6
+ for (let a = 0, o = n.length; a < o; ++a) {
7
+ const c = n[a];
8
+ if (c in r)
9
+ r = r[c];
10
+ else
11
+ return e.action.active;
12
+ }
13
+ return r;
14
+ }, Oe = (e) => {
15
+ switch (e) {
16
+ case "warning":
17
+ return "warning";
18
+ case "delete":
19
+ return "error";
20
+ case "info":
21
+ return "info";
22
+ }
23
+ return "primary";
24
+ }, Se = (e, t) => {
25
+ switch (t) {
26
+ case "warning":
27
+ e.palette.warning.main;
28
+ break;
29
+ case "delete":
30
+ e.palette.error.main;
31
+ break;
32
+ case "info":
33
+ e.palette.info.main;
34
+ break;
35
+ }
36
+ return e.palette.text.primary;
37
+ };
38
+ var i = {}, f = {};
39
+ Object.defineProperty(f, "__esModule", {
40
+ value: !0
41
+ });
42
+ f.dontSetMe = $;
43
+ f.findInArray = F;
44
+ f.int = V;
45
+ f.isFunction = j;
46
+ f.isNum = H;
47
+ function F(e, t) {
48
+ for (var r = 0, n = e.length; r < n; r++)
49
+ if (t.apply(t, [e[r], r, e]))
50
+ return e[r];
51
+ }
52
+ function j(e) {
53
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
54
+ }
55
+ function H(e) {
56
+ return typeof e == "number" && !isNaN(e);
57
+ }
58
+ function V(e) {
59
+ return parseInt(e, 10);
60
+ }
61
+ function $(e, t, r) {
62
+ if (e[t])
63
+ return new Error("Invalid prop ".concat(t, " passed to ").concat(r, " - do not set this, set it on the child."));
64
+ }
65
+ var p = {};
66
+ Object.defineProperty(p, "__esModule", {
67
+ value: !0
68
+ });
69
+ p.browserPrefixToKey = C;
70
+ p.browserPrefixToStyle = I;
71
+ p.default = void 0;
72
+ p.getPrefix = E;
73
+ var w = ["Moz", "Webkit", "O", "ms"];
74
+ function E() {
75
+ var e, t, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
76
+ if (typeof window > "u")
77
+ return "";
78
+ var n = (e = window.document) === null || e === void 0 || (t = e.documentElement) === null || t === void 0 ? void 0 : t.style;
79
+ if (!n || r in n)
80
+ return "";
81
+ for (var a = 0; a < w.length; a++)
82
+ if (C(r, w[a]) in n)
83
+ return w[a];
84
+ return "";
85
+ }
86
+ function C(e, t) {
87
+ return t ? "".concat(t).concat(A(e)) : e;
88
+ }
89
+ function I(e, t) {
90
+ return t ? "-".concat(t.toLowerCase(), "-").concat(e) : e;
91
+ }
92
+ function A(e) {
93
+ for (var t = "", r = !0, n = 0; n < e.length; n++)
94
+ r ? (t += e[n].toUpperCase(), r = !1) : e[n] === "-" ? r = !0 : t += e[n];
95
+ return t;
96
+ }
97
+ var U = E();
98
+ p.default = U;
99
+ function b(e) {
100
+ return b = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
101
+ return typeof t;
102
+ } : function(t) {
103
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
104
+ }, b(e);
105
+ }
106
+ Object.defineProperty(i, "__esModule", {
107
+ value: !0
108
+ });
109
+ i.addClassName = X;
110
+ i.addEvent = z;
111
+ i.addUserSelectStyles = oe;
112
+ i.createCSSTransform = te;
113
+ i.createSVGTransform = re;
114
+ i.getTouch = ne;
115
+ i.getTouchIdentifier = ae;
116
+ i.getTranslation = P;
117
+ i.innerHeight = Q;
118
+ i.innerWidth = Z;
119
+ i.matchesSelector = W;
120
+ i.matchesSelectorAndParentsTo = K;
121
+ i.offsetXYFromParent = ee;
122
+ i.outerHeight = k;
123
+ i.outerWidth = J;
124
+ i.removeClassName = N;
125
+ i.removeEvent = G;
126
+ i.removeUserSelectStyles = ie;
127
+ var s = f, S = q(p);
128
+ function D(e) {
129
+ if (typeof WeakMap != "function")
130
+ return null;
131
+ var t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
132
+ return (D = function(a) {
133
+ return a ? r : t;
134
+ })(e);
135
+ }
136
+ function q(e, t) {
137
+ if (!t && e && e.__esModule)
138
+ return e;
139
+ if (e === null || b(e) !== "object" && typeof e != "function")
140
+ return { default: e };
141
+ var r = D(t);
142
+ if (r && r.has(e))
143
+ return r.get(e);
144
+ var n = {}, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
145
+ for (var o in e)
146
+ if (o !== "default" && Object.prototype.hasOwnProperty.call(e, o)) {
147
+ var c = a ? Object.getOwnPropertyDescriptor(e, o) : null;
148
+ c && (c.get || c.set) ? Object.defineProperty(n, o, c) : n[o] = e[o];
149
+ }
150
+ return n.default = e, r && r.set(e, n), n;
151
+ }
152
+ function T(e, t) {
153
+ var r = Object.keys(e);
154
+ if (Object.getOwnPropertySymbols) {
155
+ var n = Object.getOwnPropertySymbols(e);
156
+ t && (n = n.filter(function(a) {
157
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
158
+ })), r.push.apply(r, n);
159
+ }
160
+ return r;
161
+ }
162
+ function x(e) {
163
+ for (var t = 1; t < arguments.length; t++) {
164
+ var r = arguments[t] != null ? arguments[t] : {};
165
+ t % 2 ? T(Object(r), !0).forEach(function(n) {
166
+ L(e, n, r[n]);
167
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : T(Object(r)).forEach(function(n) {
168
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
169
+ });
170
+ }
171
+ return e;
172
+ }
173
+ function L(e, t, r) {
174
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
175
+ }
176
+ var v = "";
177
+ function W(e, t) {
178
+ return v || (v = (0, s.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(r) {
179
+ return (0, s.isFunction)(e[r]);
180
+ })), (0, s.isFunction)(e[v]) ? e[v](t) : !1;
181
+ }
182
+ function K(e, t, r) {
183
+ var n = e;
184
+ do {
185
+ if (W(n, t))
186
+ return !0;
187
+ if (n === r)
188
+ return !1;
189
+ n = n.parentNode;
190
+ } while (n);
191
+ return !1;
192
+ }
193
+ function z(e, t, r, n) {
194
+ if (!!e) {
195
+ var a = x({
196
+ capture: !0
197
+ }, n);
198
+ e.addEventListener ? e.addEventListener(t, r, a) : e.attachEvent ? e.attachEvent("on" + t, r) : e["on" + t] = r;
199
+ }
200
+ }
201
+ function G(e, t, r, n) {
202
+ if (!!e) {
203
+ var a = x({
204
+ capture: !0
205
+ }, n);
206
+ e.removeEventListener ? e.removeEventListener(t, r, a) : e.detachEvent ? e.detachEvent("on" + t, r) : e["on" + t] = null;
207
+ }
208
+ }
209
+ function k(e) {
210
+ var t = e.clientHeight, r = e.ownerDocument.defaultView.getComputedStyle(e);
211
+ return t += (0, s.int)(r.borderTopWidth), t += (0, s.int)(r.borderBottomWidth), t;
212
+ }
213
+ function J(e) {
214
+ var t = e.clientWidth, r = e.ownerDocument.defaultView.getComputedStyle(e);
215
+ return t += (0, s.int)(r.borderLeftWidth), t += (0, s.int)(r.borderRightWidth), t;
216
+ }
217
+ function Q(e) {
218
+ var t = e.clientHeight, r = e.ownerDocument.defaultView.getComputedStyle(e);
219
+ return t -= (0, s.int)(r.paddingTop), t -= (0, s.int)(r.paddingBottom), t;
220
+ }
221
+ function Z(e) {
222
+ var t = e.clientWidth, r = e.ownerDocument.defaultView.getComputedStyle(e);
223
+ return t -= (0, s.int)(r.paddingLeft), t -= (0, s.int)(r.paddingRight), t;
224
+ }
225
+ function ee(e, t, r) {
226
+ var n = t === t.ownerDocument.body, a = n ? {
227
+ left: 0,
228
+ top: 0
229
+ } : t.getBoundingClientRect(), o = (e.clientX + t.scrollLeft - a.left) / r, c = (e.clientY + t.scrollTop - a.top) / r;
230
+ return {
231
+ x: o,
232
+ y: c
233
+ };
234
+ }
235
+ function te(e, t) {
236
+ var r = P(e, t, "px");
237
+ return L({}, (0, S.browserPrefixToKey)("transform", S.default), r);
238
+ }
239
+ function re(e, t) {
240
+ var r = P(e, t, "");
241
+ return r;
242
+ }
243
+ function P(e, t, r) {
244
+ var n = e.x, a = e.y, o = "translate(".concat(n).concat(r, ",").concat(a).concat(r, ")");
245
+ if (t) {
246
+ var c = "".concat(typeof t.x == "string" ? t.x : t.x + r), d = "".concat(typeof t.y == "string" ? t.y : t.y + r);
247
+ o = "translate(".concat(c, ", ").concat(d, ")") + o;
248
+ }
249
+ return o;
250
+ }
251
+ function ne(e, t) {
252
+ return e.targetTouches && (0, s.findInArray)(e.targetTouches, function(r) {
253
+ return t === r.identifier;
254
+ }) || e.changedTouches && (0, s.findInArray)(e.changedTouches, function(r) {
255
+ return t === r.identifier;
256
+ });
257
+ }
258
+ function ae(e) {
259
+ if (e.targetTouches && e.targetTouches[0])
260
+ return e.targetTouches[0].identifier;
261
+ if (e.changedTouches && e.changedTouches[0])
262
+ return e.changedTouches[0].identifier;
263
+ }
264
+ function oe(e) {
265
+ if (!!e) {
266
+ var t = e.getElementById("react-draggable-style-el");
267
+ t || (t = e.createElement("style"), t.type = "text/css", t.id = "react-draggable-style-el", t.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
268
+ `, t.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
269
+ `, e.getElementsByTagName("head")[0].appendChild(t)), e.body && X(e.body, "react-draggable-transparent-selection");
270
+ }
271
+ }
272
+ function ie(e) {
273
+ if (!!e)
274
+ try {
275
+ if (e.body && N(e.body, "react-draggable-transparent-selection"), e.selection)
276
+ e.selection.empty();
277
+ else {
278
+ var t = (e.defaultView || window).getSelection();
279
+ t && t.type !== "Caret" && t.removeAllRanges();
280
+ }
281
+ } catch {
282
+ }
283
+ }
284
+ function X(e, t) {
285
+ e.classList ? e.classList.add(t) : e.className.match(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"))) || (e.className += " ".concat(t));
286
+ }
287
+ function N(e, t) {
288
+ e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp("(?:^|\\s)".concat(t, "(?!\\S)"), "g"), "");
289
+ }
290
+ var l = {};
291
+ Object.defineProperty(l, "__esModule", {
292
+ value: !0
293
+ });
294
+ l.canDragX = se;
295
+ l.canDragY = fe;
296
+ l.createCoreData = pe;
297
+ l.createDraggableData = de;
298
+ l.getBoundPosition = ce;
299
+ l.getControlPosition = le;
300
+ l.snapToGrid = ue;
301
+ var u = f, m = i;
302
+ function ce(e, t, r) {
303
+ if (!e.props.bounds)
304
+ return [t, r];
305
+ var n = e.props.bounds;
306
+ n = typeof n == "string" ? n : me(n);
307
+ var a = O(e);
308
+ if (typeof n == "string") {
309
+ var o = a.ownerDocument, c = o.defaultView, d;
310
+ if (n === "parent" ? d = a.parentNode : d = o.querySelector(n), !(d instanceof c.HTMLElement))
311
+ throw new Error('Bounds selector "' + n + '" could not find an element.');
312
+ var y = d, g = c.getComputedStyle(a), h = c.getComputedStyle(y);
313
+ n = {
314
+ left: -a.offsetLeft + (0, u.int)(h.paddingLeft) + (0, u.int)(g.marginLeft),
315
+ top: -a.offsetTop + (0, u.int)(h.paddingTop) + (0, u.int)(g.marginTop),
316
+ right: (0, m.innerWidth)(y) - (0, m.outerWidth)(a) - a.offsetLeft + (0, u.int)(h.paddingRight) - (0, u.int)(g.marginRight),
317
+ bottom: (0, m.innerHeight)(y) - (0, m.outerHeight)(a) - a.offsetTop + (0, u.int)(h.paddingBottom) - (0, u.int)(g.marginBottom)
318
+ };
319
+ }
320
+ return (0, u.isNum)(n.right) && (t = Math.min(t, n.right)), (0, u.isNum)(n.bottom) && (r = Math.min(r, n.bottom)), (0, u.isNum)(n.left) && (t = Math.max(t, n.left)), (0, u.isNum)(n.top) && (r = Math.max(r, n.top)), [t, r];
321
+ }
322
+ function ue(e, t, r) {
323
+ var n = Math.round(t / e[0]) * e[0], a = Math.round(r / e[1]) * e[1];
324
+ return [n, a];
325
+ }
326
+ function se(e) {
327
+ return e.props.axis === "both" || e.props.axis === "x";
328
+ }
329
+ function fe(e) {
330
+ return e.props.axis === "both" || e.props.axis === "y";
331
+ }
332
+ function le(e, t, r) {
333
+ var n = typeof t == "number" ? (0, m.getTouch)(e, t) : null;
334
+ if (typeof t == "number" && !n)
335
+ return null;
336
+ var a = O(r), o = r.props.offsetParent || a.offsetParent || a.ownerDocument.body;
337
+ return (0, m.offsetXYFromParent)(n || e, o, r.props.scale);
338
+ }
339
+ function pe(e, t, r) {
340
+ var n = e.state, a = !(0, u.isNum)(n.lastX), o = O(e);
341
+ return a ? {
342
+ node: o,
343
+ deltaX: 0,
344
+ deltaY: 0,
345
+ lastX: t,
346
+ lastY: r,
347
+ x: t,
348
+ y: r
349
+ } : {
350
+ node: o,
351
+ deltaX: t - n.lastX,
352
+ deltaY: r - n.lastY,
353
+ lastX: n.lastX,
354
+ lastY: n.lastY,
355
+ x: t,
356
+ y: r
357
+ };
358
+ }
359
+ function de(e, t) {
360
+ var r = e.props.scale;
361
+ return {
362
+ node: t.node,
363
+ x: e.state.x + t.deltaX / r,
364
+ y: e.state.y + t.deltaY / r,
365
+ deltaX: t.deltaX / r,
366
+ deltaY: t.deltaY / r,
367
+ lastX: e.state.x,
368
+ lastY: e.state.y
369
+ };
370
+ }
371
+ function me(e) {
372
+ return {
373
+ left: e.left,
374
+ top: e.top,
375
+ right: e.right,
376
+ bottom: e.bottom
377
+ };
378
+ }
379
+ function O(e) {
380
+ var t = e.findDOMNode();
381
+ if (!t)
382
+ throw new Error("<DraggableCore>: Unmounted during event!");
383
+ return t;
384
+ }
385
+ var Y = {};
386
+ Object.defineProperty(Y, "__esModule", {
387
+ value: !0
388
+ });
389
+ Y.default = ge;
390
+ function ge() {
391
+ }
392
+ var R = {};
393
+ R.__esModule = !0;
394
+ R.cloneElement = we;
395
+ var he = ve(B);
396
+ function ve(e) {
397
+ return e && e.__esModule ? e : { default: e };
398
+ }
399
+ function _(e, t) {
400
+ var r = Object.keys(e);
401
+ if (Object.getOwnPropertySymbols) {
402
+ var n = Object.getOwnPropertySymbols(e);
403
+ t && (n = n.filter(function(a) {
404
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
405
+ })), r.push.apply(r, n);
406
+ }
407
+ return r;
408
+ }
409
+ function M(e) {
410
+ for (var t = 1; t < arguments.length; t++) {
411
+ var r = arguments[t] != null ? arguments[t] : {};
412
+ t % 2 ? _(Object(r), !0).forEach(function(n) {
413
+ ye(e, n, r[n]);
414
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : _(Object(r)).forEach(function(n) {
415
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
416
+ });
417
+ }
418
+ return e;
419
+ }
420
+ function ye(e, t, r) {
421
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
422
+ }
423
+ function we(e, t) {
424
+ return t.style && e.props.style && (t.style = M(M({}, e.props.style), t.style)), t.className && e.props.className && (t.className = e.props.className + " " + t.className), /* @__PURE__ */ he.default.cloneElement(e, t);
425
+ }
426
+ export {
427
+ Se as a,
428
+ Oe as b,
429
+ i as d,
430
+ Pe as g,
431
+ Y as l,
432
+ l as p,
433
+ f as s,
434
+ R as u
435
+ };
@@ -1,91 +0,0 @@
1
- import { Link } from "react-router-dom";
2
- import { useTheme } from "@mui/material/styles";
3
- import { Box } from "@mui/material";
4
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
- function Logo({
6
- disabledLink = false,
7
- sx
8
- }) {
9
- const theme = useTheme();
10
- const PRIMARY_LIGHT = theme.palette.primary.light;
11
- const PRIMARY_MAIN = theme.palette.primary.main;
12
- const PRIMARY_DARK = theme.palette.primary.dark;
13
- const logo = /* @__PURE__ */ jsx(Box, {
14
- sx: {
15
- width: 40,
16
- height: 40,
17
- ...sx
18
- },
19
- children: /* @__PURE__ */ jsxs("svg", {
20
- xmlns: "http://www.w3.org/2000/svg",
21
- width: "100%",
22
- height: "100%",
23
- viewBox: "0 0 512 512",
24
- children: [/* @__PURE__ */ jsxs("defs", {
25
- children: [/* @__PURE__ */ jsxs("linearGradient", {
26
- id: "BG1",
27
- x1: "100%",
28
- x2: "50%",
29
- y1: "9.946%",
30
- y2: "50%",
31
- children: [/* @__PURE__ */ jsx("stop", {
32
- offset: "0%",
33
- stopColor: PRIMARY_DARK
34
- }), /* @__PURE__ */ jsx("stop", {
35
- offset: "100%",
36
- stopColor: PRIMARY_MAIN
37
- })]
38
- }), /* @__PURE__ */ jsxs("linearGradient", {
39
- id: "BG2",
40
- x1: "50%",
41
- x2: "50%",
42
- y1: "0%",
43
- y2: "100%",
44
- children: [/* @__PURE__ */ jsx("stop", {
45
- offset: "0%",
46
- stopColor: PRIMARY_LIGHT
47
- }), /* @__PURE__ */ jsx("stop", {
48
- offset: "100%",
49
- stopColor: PRIMARY_MAIN
50
- })]
51
- }), /* @__PURE__ */ jsxs("linearGradient", {
52
- id: "BG3",
53
- x1: "50%",
54
- x2: "50%",
55
- y1: "0%",
56
- y2: "100%",
57
- children: [/* @__PURE__ */ jsx("stop", {
58
- offset: "0%",
59
- stopColor: PRIMARY_LIGHT
60
- }), /* @__PURE__ */ jsx("stop", {
61
- offset: "100%",
62
- stopColor: PRIMARY_MAIN
63
- })]
64
- })]
65
- }), /* @__PURE__ */ jsxs("g", {
66
- fillRule: "evenodd",
67
- clipRule: "evenodd",
68
- children: [/* @__PURE__ */ jsx("path", {
69
- fill: "url(#BG1)",
70
- d: "m1.9 136.9 208.3 120.3v240.5L1.9 377.5z"
71
- }), /* @__PURE__ */ jsx("path", {
72
- fill: "url(#BG2)",
73
- d: "m226.8 257.2 208.5-120.3v240.6L226.8 497.8z"
74
- }), /* @__PURE__ */ jsx("path", {
75
- fill: "url(#BG3)",
76
- d: "M218.6 242.8 10.2 122.5 218.6 2.2 427 122.5z"
77
- })]
78
- })]
79
- })
80
- });
81
- if (disabledLink) {
82
- return /* @__PURE__ */ jsx(Fragment, {
83
- children: logo
84
- });
85
- }
86
- return /* @__PURE__ */ jsx(Link, {
87
- to: "/",
88
- children: logo
89
- });
90
- }
91
- export { Logo as L };
package/commonjs.js DELETED
@@ -1,9 +0,0 @@
1
- import "react";
2
- import "prop-types";
3
- import "react-dom";
4
- import "clsx";
5
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6
- function getDefaultExportFromCjs(x) {
7
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
8
- }
9
- export { commonjsGlobal as c, getDefaultExportFromCjs as g };
@@ -1,15 +0,0 @@
1
- import { useModuleDictionary } from "@m4l/core";
2
- import { B as Button } from "../../../mui_extended/Button/index.js";
3
- import { jsx } from "react/jsx-runtime";
4
- const ActionCancel = (props) => {
5
- const {
6
- getLabel
7
- } = useModuleDictionary();
8
- return /* @__PURE__ */ jsx(Button, {
9
- variant: "outlined",
10
- color: "inherit",
11
- ...props,
12
- children: getLabel("common_actions.cancel")
13
- });
14
- };
15
- export { ActionCancel as A };
@@ -1,62 +0,0 @@
1
- import { useFormContext, useFormState } from "react-hook-form";
2
- import { useNavigate } from "react-router-dom";
3
- import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
4
- import { Skeleton } from "@mui/material";
5
- import { B as Button } from "../../../mui_extended/Button/index.js";
6
- import { useCallback } from "react";
7
- import { u as useModal } from "../../../../hooks/useModal/index.js";
8
- import { jsx } from "react/jsx-runtime";
9
- function ActionFormCancel(props) {
10
- const {
11
- to,
12
- navigateOptions = {
13
- replace: false
14
- }
15
- } = props;
16
- const {
17
- getLabel
18
- } = useModuleDictionary();
19
- const isSkeleton = useModuleSkeleton();
20
- const {
21
- openModalConfirm
22
- } = useModal();
23
- const navigate = useNavigate();
24
- const {
25
- control
26
- } = useFormContext();
27
- const {
28
- isDirty
29
- } = useFormState({
30
- control
31
- });
32
- const onConfirmCancel = () => {
33
- navigate(to, navigateOptions);
34
- };
35
- const onClickCancel = useCallback(() => {
36
- if (isDirty) {
37
- openModalConfirm({
38
- variant: "warning",
39
- title: getLabel("common_actions.confirm_quit_title"),
40
- msg: getLabel("common_actions.confirm_quit_msg"),
41
- onClickIntro: onConfirmCancel
42
- });
43
- } else {
44
- onConfirmCancel();
45
- }
46
- }, [getLabel, isDirty, onConfirmCancel, openModalConfirm]);
47
- if (isSkeleton) {
48
- return /* @__PURE__ */ jsx(Skeleton, {
49
- variant: "text",
50
- width: 57,
51
- height: 30
52
- });
53
- }
54
- return /* @__PURE__ */ jsx(Button, {
55
- variant: "outlined",
56
- color: "inherit",
57
- onClick: onClickCancel,
58
- ...props,
59
- children: getLabel("common_actions.cancel")
60
- });
61
- }
62
- export { ActionFormCancel as A };
@@ -1,35 +0,0 @@
1
- import { useFormContext, useFormState } from "react-hook-form";
2
- import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
3
- import { LoadingButton } from "@mui/lab";
4
- import { Skeleton } from "@mui/material";
5
- import { jsx } from "react/jsx-runtime";
6
- function ActionFormIntro(props) {
7
- const {
8
- getLabel
9
- } = useModuleDictionary();
10
- const isSkeleton = useModuleSkeleton();
11
- const {
12
- control
13
- } = useFormContext();
14
- const {
15
- isSubmitting
16
- } = useFormState({
17
- control
18
- });
19
- if (isSkeleton) {
20
- return /* @__PURE__ */ jsx(Skeleton, {
21
- variant: "text",
22
- width: 57,
23
- height: 30
24
- });
25
- }
26
- return /* @__PURE__ */ jsx(LoadingButton, {
27
- variant: "contained",
28
- type: "submit",
29
- color: "primary",
30
- loading: isSubmitting,
31
- ...props,
32
- children: getLabel("common_actions.intro")
33
- });
34
- }
35
- export { ActionFormIntro as A };
@@ -1,16 +0,0 @@
1
- import { useModuleDictionary } from "@m4l/core";
2
- import { B as Button } from "../../../mui_extended/Button/index.js";
3
- import { jsx } from "react/jsx-runtime";
4
- const ActionIntro = (props) => {
5
- const {
6
- getLabel
7
- } = useModuleDictionary();
8
- return /* @__PURE__ */ jsx(Button, {
9
- variant: "contained",
10
- type: "submit",
11
- color: "primary",
12
- ...props,
13
- children: getLabel("common_actions.intro")
14
- });
15
- };
16
- export { ActionIntro as A };