@m4l/components 0.1.6 → 0.1.8
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/components/DataGrid/components/editors/TextEditor/index.d.ts +6 -0
- package/components/DataGrid/index.js +66 -4
- package/components/DataGrid/types.d.ts +3 -2
- package/components/DynamicFilter/index.js +1 -1
- package/components/LanguagePopover/index.js +2 -1
- package/components/ModalDialog/index.js +1 -1
- package/components/NoItemSelected/index.d.ts +1 -2
- package/components/NoItemSelected/index.js +3 -5
- package/components/PaperForm/index.js +5 -4
- package/components/PaperForm/types.d.ts +1 -2
- package/components/PropertyValue/index.js +3 -2
- package/components/PropertyValue/types.d.ts +0 -1
- package/components/ScrollBar/index.js +2 -2
- package/components/hook-form/RHFAutocomplete/index.js +4 -2
- package/components/hook-form/RHFAutocomplete/types.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/index.js +16 -5
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +1 -2
- package/components/hook-form/RHFCheckbox/index.d.ts +2 -1
- package/components/hook-form/RHFCheckbox/index.js +24 -8
- package/components/hook-form/RHFCheckbox/types.d.ts +0 -1
- package/components/hook-form/RHFDateTime/index.js +2 -2
- package/components/hook-form/RHFDateTime/types.d.ts +0 -1
- package/components/hook-form/RHFTextField/index.js +41 -17
- package/components/hook-form/RHFTextField/types.d.ts +0 -1
- package/components/hook-form/RHFUpload/index.js +3 -2
- package/components/index.d.ts +2 -1
- package/components/mui_extended/Accordion/index.js +6 -6
- package/components/mui_extended/Accordion/types.d.ts +0 -1
- package/components/mui_extended/Button/index.js +25 -25
- package/components/mui_extended/Tab/index.js +2 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/index.js +5 -7
- package/lodash.js +23 -512
- package/package.json +3 -2
- package/react-draggable.js +4 -4
- package/react-resizable.js +4 -4
- package/react-splitter-layout.js +2 -2
- package/utils/index.js +1 -190
- package/can-use-dom.js +0 -3
- package/components/NoItemSelected/types.d.ts +0 -10
- package/core-js.js +0 -2684
- package/juggle.js +0 -325
- package/simplebar.js +0 -850
- package/style.css +0 -1
package/juggle.js
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { r as resizeObservers, f as freeze, c as global, i as isHidden, d as isSVG, e as isReplacedElement, u as updateCount, s as scheduler, h as isElement } from "./utils/index.js";
|
|
2
|
-
var hasActiveObservations = function() {
|
|
3
|
-
return resizeObservers.some(function(ro) {
|
|
4
|
-
return ro.activeTargets.length > 0;
|
|
5
|
-
});
|
|
6
|
-
};
|
|
7
|
-
var hasSkippedObservations = function() {
|
|
8
|
-
return resizeObservers.some(function(ro) {
|
|
9
|
-
return ro.skippedTargets.length > 0;
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
var msg = "ResizeObserver loop completed with undelivered notifications.";
|
|
13
|
-
var deliverResizeLoopError = function() {
|
|
14
|
-
var event;
|
|
15
|
-
if (typeof ErrorEvent === "function") {
|
|
16
|
-
event = new ErrorEvent("error", {
|
|
17
|
-
message: msg
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
event = document.createEvent("Event");
|
|
21
|
-
event.initEvent("error", false, false);
|
|
22
|
-
event.message = msg;
|
|
23
|
-
}
|
|
24
|
-
window.dispatchEvent(event);
|
|
25
|
-
};
|
|
26
|
-
var ResizeObserverBoxOptions;
|
|
27
|
-
(function(ResizeObserverBoxOptions2) {
|
|
28
|
-
ResizeObserverBoxOptions2["BORDER_BOX"] = "border-box";
|
|
29
|
-
ResizeObserverBoxOptions2["CONTENT_BOX"] = "content-box";
|
|
30
|
-
ResizeObserverBoxOptions2["DEVICE_PIXEL_CONTENT_BOX"] = "device-pixel-content-box";
|
|
31
|
-
})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
|
|
32
|
-
var ResizeObserverSize = function() {
|
|
33
|
-
function ResizeObserverSize2(inlineSize, blockSize) {
|
|
34
|
-
this.inlineSize = inlineSize;
|
|
35
|
-
this.blockSize = blockSize;
|
|
36
|
-
freeze(this);
|
|
37
|
-
}
|
|
38
|
-
return ResizeObserverSize2;
|
|
39
|
-
}();
|
|
40
|
-
var DOMRectReadOnly = function() {
|
|
41
|
-
function DOMRectReadOnly2(x, y, width, height) {
|
|
42
|
-
this.x = x;
|
|
43
|
-
this.y = y;
|
|
44
|
-
this.width = width;
|
|
45
|
-
this.height = height;
|
|
46
|
-
this.top = this.y;
|
|
47
|
-
this.left = this.x;
|
|
48
|
-
this.bottom = this.top + this.height;
|
|
49
|
-
this.right = this.left + this.width;
|
|
50
|
-
return freeze(this);
|
|
51
|
-
}
|
|
52
|
-
DOMRectReadOnly2.prototype.toJSON = function() {
|
|
53
|
-
var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
|
|
54
|
-
return { x, y, top, right, bottom, left, width, height };
|
|
55
|
-
};
|
|
56
|
-
DOMRectReadOnly2.fromRect = function(rectangle) {
|
|
57
|
-
return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
|
|
58
|
-
};
|
|
59
|
-
return DOMRectReadOnly2;
|
|
60
|
-
}();
|
|
61
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
62
|
-
var scrollRegexp = /auto|scroll/;
|
|
63
|
-
var verticalRegexp = /^tb|vertical/;
|
|
64
|
-
var IE = /msie|trident/i.test(global.navigator && global.navigator.userAgent);
|
|
65
|
-
var parseDimension = function(pixel) {
|
|
66
|
-
return parseFloat(pixel || "0");
|
|
67
|
-
};
|
|
68
|
-
var size = function(inlineSize, blockSize, switchSizes) {
|
|
69
|
-
if (inlineSize === void 0) {
|
|
70
|
-
inlineSize = 0;
|
|
71
|
-
}
|
|
72
|
-
if (blockSize === void 0) {
|
|
73
|
-
blockSize = 0;
|
|
74
|
-
}
|
|
75
|
-
if (switchSizes === void 0) {
|
|
76
|
-
switchSizes = false;
|
|
77
|
-
}
|
|
78
|
-
return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
|
|
79
|
-
};
|
|
80
|
-
var zeroBoxes = freeze({
|
|
81
|
-
devicePixelContentBoxSize: size(),
|
|
82
|
-
borderBoxSize: size(),
|
|
83
|
-
contentBoxSize: size(),
|
|
84
|
-
contentRect: new DOMRectReadOnly(0, 0, 0, 0)
|
|
85
|
-
});
|
|
86
|
-
var calculateBoxSizes = function(target, forceRecalculation) {
|
|
87
|
-
if (forceRecalculation === void 0) {
|
|
88
|
-
forceRecalculation = false;
|
|
89
|
-
}
|
|
90
|
-
if (cache.has(target) && !forceRecalculation) {
|
|
91
|
-
return cache.get(target);
|
|
92
|
-
}
|
|
93
|
-
if (isHidden(target)) {
|
|
94
|
-
cache.set(target, zeroBoxes);
|
|
95
|
-
return zeroBoxes;
|
|
96
|
-
}
|
|
97
|
-
var cs = getComputedStyle(target);
|
|
98
|
-
var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();
|
|
99
|
-
var removePadding = !IE && cs.boxSizing === "border-box";
|
|
100
|
-
var switchSizes = verticalRegexp.test(cs.writingMode || "");
|
|
101
|
-
var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || "");
|
|
102
|
-
var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || "");
|
|
103
|
-
var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);
|
|
104
|
-
var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);
|
|
105
|
-
var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);
|
|
106
|
-
var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);
|
|
107
|
-
var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);
|
|
108
|
-
var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);
|
|
109
|
-
var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);
|
|
110
|
-
var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);
|
|
111
|
-
var horizontalPadding = paddingLeft + paddingRight;
|
|
112
|
-
var verticalPadding = paddingTop + paddingBottom;
|
|
113
|
-
var horizontalBorderArea = borderLeft + borderRight;
|
|
114
|
-
var verticalBorderArea = borderTop + borderBottom;
|
|
115
|
-
var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;
|
|
116
|
-
var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;
|
|
117
|
-
var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;
|
|
118
|
-
var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
|
|
119
|
-
var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;
|
|
120
|
-
var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;
|
|
121
|
-
var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;
|
|
122
|
-
var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;
|
|
123
|
-
var boxes = freeze({
|
|
124
|
-
devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
|
|
125
|
-
borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),
|
|
126
|
-
contentBoxSize: size(contentWidth, contentHeight, switchSizes),
|
|
127
|
-
contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
|
|
128
|
-
});
|
|
129
|
-
cache.set(target, boxes);
|
|
130
|
-
return boxes;
|
|
131
|
-
};
|
|
132
|
-
var calculateBoxSize = function(target, observedBox, forceRecalculation) {
|
|
133
|
-
var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
|
|
134
|
-
switch (observedBox) {
|
|
135
|
-
case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
|
|
136
|
-
return devicePixelContentBoxSize;
|
|
137
|
-
case ResizeObserverBoxOptions.BORDER_BOX:
|
|
138
|
-
return borderBoxSize;
|
|
139
|
-
default:
|
|
140
|
-
return contentBoxSize;
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
var ResizeObserverEntry = function() {
|
|
144
|
-
function ResizeObserverEntry2(target) {
|
|
145
|
-
var boxes = calculateBoxSizes(target);
|
|
146
|
-
this.target = target;
|
|
147
|
-
this.contentRect = boxes.contentRect;
|
|
148
|
-
this.borderBoxSize = freeze([boxes.borderBoxSize]);
|
|
149
|
-
this.contentBoxSize = freeze([boxes.contentBoxSize]);
|
|
150
|
-
this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
|
|
151
|
-
}
|
|
152
|
-
return ResizeObserverEntry2;
|
|
153
|
-
}();
|
|
154
|
-
var calculateDepthForNode = function(node) {
|
|
155
|
-
if (isHidden(node)) {
|
|
156
|
-
return Infinity;
|
|
157
|
-
}
|
|
158
|
-
var depth = 0;
|
|
159
|
-
var parent = node.parentNode;
|
|
160
|
-
while (parent) {
|
|
161
|
-
depth += 1;
|
|
162
|
-
parent = parent.parentNode;
|
|
163
|
-
}
|
|
164
|
-
return depth;
|
|
165
|
-
};
|
|
166
|
-
var broadcastActiveObservations = function() {
|
|
167
|
-
var shallowestDepth = Infinity;
|
|
168
|
-
var callbacks = [];
|
|
169
|
-
resizeObservers.forEach(function processObserver(ro) {
|
|
170
|
-
if (ro.activeTargets.length === 0) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
var entries = [];
|
|
174
|
-
ro.activeTargets.forEach(function processTarget(ot) {
|
|
175
|
-
var entry = new ResizeObserverEntry(ot.target);
|
|
176
|
-
var targetDepth = calculateDepthForNode(ot.target);
|
|
177
|
-
entries.push(entry);
|
|
178
|
-
ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);
|
|
179
|
-
if (targetDepth < shallowestDepth) {
|
|
180
|
-
shallowestDepth = targetDepth;
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
callbacks.push(function resizeObserverCallback() {
|
|
184
|
-
ro.callback.call(ro.observer, entries, ro.observer);
|
|
185
|
-
});
|
|
186
|
-
ro.activeTargets.splice(0, ro.activeTargets.length);
|
|
187
|
-
});
|
|
188
|
-
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
189
|
-
var callback = callbacks_1[_i];
|
|
190
|
-
callback();
|
|
191
|
-
}
|
|
192
|
-
return shallowestDepth;
|
|
193
|
-
};
|
|
194
|
-
var gatherActiveObservationsAtDepth = function(depth) {
|
|
195
|
-
resizeObservers.forEach(function processObserver(ro) {
|
|
196
|
-
ro.activeTargets.splice(0, ro.activeTargets.length);
|
|
197
|
-
ro.skippedTargets.splice(0, ro.skippedTargets.length);
|
|
198
|
-
ro.observationTargets.forEach(function processTarget(ot) {
|
|
199
|
-
if (ot.isActive()) {
|
|
200
|
-
if (calculateDepthForNode(ot.target) > depth) {
|
|
201
|
-
ro.activeTargets.push(ot);
|
|
202
|
-
} else {
|
|
203
|
-
ro.skippedTargets.push(ot);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
var skipNotifyOnElement = function(target) {
|
|
210
|
-
return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
|
|
211
|
-
};
|
|
212
|
-
var ResizeObservation = function() {
|
|
213
|
-
function ResizeObservation2(target, observedBox) {
|
|
214
|
-
this.target = target;
|
|
215
|
-
this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;
|
|
216
|
-
this.lastReportedSize = {
|
|
217
|
-
inlineSize: 0,
|
|
218
|
-
blockSize: 0
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
ResizeObservation2.prototype.isActive = function() {
|
|
222
|
-
var size2 = calculateBoxSize(this.target, this.observedBox, true);
|
|
223
|
-
if (skipNotifyOnElement(this.target)) {
|
|
224
|
-
this.lastReportedSize = size2;
|
|
225
|
-
}
|
|
226
|
-
if (this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize) {
|
|
227
|
-
return true;
|
|
228
|
-
}
|
|
229
|
-
return false;
|
|
230
|
-
};
|
|
231
|
-
return ResizeObservation2;
|
|
232
|
-
}();
|
|
233
|
-
var ResizeObserverDetail = function() {
|
|
234
|
-
function ResizeObserverDetail2(resizeObserver, callback) {
|
|
235
|
-
this.activeTargets = [];
|
|
236
|
-
this.skippedTargets = [];
|
|
237
|
-
this.observationTargets = [];
|
|
238
|
-
this.observer = resizeObserver;
|
|
239
|
-
this.callback = callback;
|
|
240
|
-
}
|
|
241
|
-
return ResizeObserverDetail2;
|
|
242
|
-
}();
|
|
243
|
-
var observerMap = /* @__PURE__ */ new WeakMap();
|
|
244
|
-
var getObservationIndex = function(observationTargets, target) {
|
|
245
|
-
for (var i = 0; i < observationTargets.length; i += 1) {
|
|
246
|
-
if (observationTargets[i].target === target) {
|
|
247
|
-
return i;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return -1;
|
|
251
|
-
};
|
|
252
|
-
var ResizeObserverController = function() {
|
|
253
|
-
function ResizeObserverController2() {
|
|
254
|
-
}
|
|
255
|
-
ResizeObserverController2.connect = function(resizeObserver, callback) {
|
|
256
|
-
var detail = new ResizeObserverDetail(resizeObserver, callback);
|
|
257
|
-
observerMap.set(resizeObserver, detail);
|
|
258
|
-
};
|
|
259
|
-
ResizeObserverController2.observe = function(resizeObserver, target, options) {
|
|
260
|
-
var detail = observerMap.get(resizeObserver);
|
|
261
|
-
var firstObservation = detail.observationTargets.length === 0;
|
|
262
|
-
if (getObservationIndex(detail.observationTargets, target) < 0) {
|
|
263
|
-
firstObservation && resizeObservers.push(detail);
|
|
264
|
-
detail.observationTargets.push(new ResizeObservation(target, options && options.box));
|
|
265
|
-
updateCount(1);
|
|
266
|
-
scheduler.schedule();
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
ResizeObserverController2.unobserve = function(resizeObserver, target) {
|
|
270
|
-
var detail = observerMap.get(resizeObserver);
|
|
271
|
-
var index = getObservationIndex(detail.observationTargets, target);
|
|
272
|
-
var lastObservation = detail.observationTargets.length === 1;
|
|
273
|
-
if (index >= 0) {
|
|
274
|
-
lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);
|
|
275
|
-
detail.observationTargets.splice(index, 1);
|
|
276
|
-
updateCount(-1);
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
ResizeObserverController2.disconnect = function(resizeObserver) {
|
|
280
|
-
var _this = this;
|
|
281
|
-
var detail = observerMap.get(resizeObserver);
|
|
282
|
-
detail.observationTargets.slice().forEach(function(ot) {
|
|
283
|
-
return _this.unobserve(resizeObserver, ot.target);
|
|
284
|
-
});
|
|
285
|
-
detail.activeTargets.splice(0, detail.activeTargets.length);
|
|
286
|
-
};
|
|
287
|
-
return ResizeObserverController2;
|
|
288
|
-
}();
|
|
289
|
-
var ResizeObserver = function() {
|
|
290
|
-
function ResizeObserver2(callback) {
|
|
291
|
-
if (arguments.length === 0) {
|
|
292
|
-
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
293
|
-
}
|
|
294
|
-
if (typeof callback !== "function") {
|
|
295
|
-
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
296
|
-
}
|
|
297
|
-
ResizeObserverController.connect(this, callback);
|
|
298
|
-
}
|
|
299
|
-
ResizeObserver2.prototype.observe = function(target, options) {
|
|
300
|
-
if (arguments.length === 0) {
|
|
301
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
302
|
-
}
|
|
303
|
-
if (!isElement(target)) {
|
|
304
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
305
|
-
}
|
|
306
|
-
ResizeObserverController.observe(this, target, options);
|
|
307
|
-
};
|
|
308
|
-
ResizeObserver2.prototype.unobserve = function(target) {
|
|
309
|
-
if (arguments.length === 0) {
|
|
310
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
311
|
-
}
|
|
312
|
-
if (!isElement(target)) {
|
|
313
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
314
|
-
}
|
|
315
|
-
ResizeObserverController.unobserve(this, target);
|
|
316
|
-
};
|
|
317
|
-
ResizeObserver2.prototype.disconnect = function() {
|
|
318
|
-
ResizeObserverController.disconnect(this);
|
|
319
|
-
};
|
|
320
|
-
ResizeObserver2.toString = function() {
|
|
321
|
-
return "function ResizeObserver () { [polyfill code] }";
|
|
322
|
-
};
|
|
323
|
-
return ResizeObserver2;
|
|
324
|
-
}();
|
|
325
|
-
export { ResizeObserver as R, hasSkippedObservations as a, broadcastActiveObservations as b, deliverResizeLoopError as d, gatherActiveObservationsAtDepth as g, hasActiveObservations as h };
|