@mcurros2/microm 1.1.101-0 → 1.1.103-0
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/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +67 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36574,41 +36574,36 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
|
|
|
36574
36574
|
children: (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Stack), {
|
|
36575
36575
|
spacing: "sm",
|
|
36576
36576
|
children: [
|
|
36577
|
-
showToolbar && (0, $b4te3$reactjsxruntime.
|
|
36578
|
-
children:
|
|
36579
|
-
|
|
36580
|
-
|
|
36581
|
-
|
|
36582
|
-
|
|
36583
|
-
|
|
36584
|
-
|
|
36585
|
-
|
|
36586
|
-
|
|
36587
|
-
|
|
36588
|
-
|
|
36589
|
-
|
|
36590
|
-
|
|
36591
|
-
|
|
36592
|
-
|
|
36593
|
-
|
|
36594
|
-
|
|
36595
|
-
|
|
36596
|
-
|
|
36597
|
-
|
|
36598
|
-
|
|
36599
|
-
|
|
36600
|
-
|
|
36601
|
-
|
|
36602
|
-
|
|
36603
|
-
|
|
36604
|
-
|
|
36605
|
-
|
|
36606
|
-
|
|
36607
|
-
})),
|
|
36608
|
-
(0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Space), {
|
|
36609
|
-
h: "xs"
|
|
36610
|
-
})
|
|
36611
|
-
]
|
|
36577
|
+
showToolbar && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$reactjsxruntime.Fragment), {
|
|
36578
|
+
children: (0, $b4te3$reactjsxruntime.jsx)((0, $3vFhj.DataGridToolbar), Object.assign({}, labels, {
|
|
36579
|
+
enableExport: enableExport,
|
|
36580
|
+
onExportClick: dataViewAPI.handleExport,
|
|
36581
|
+
onRefreshClick: dataViewAPI.handleRefresh,
|
|
36582
|
+
onCheckboxToggle: dataViewAPI.handleToggleSelectable,
|
|
36583
|
+
autoFocus: autoFocus,
|
|
36584
|
+
toolbarIconVariant: toolbarIconVariant,
|
|
36585
|
+
searchText: viewState.searchText,
|
|
36586
|
+
setSearchText: viewState.setSearchText,
|
|
36587
|
+
searchData: searchData,
|
|
36588
|
+
setSearchData: setSearchData,
|
|
36589
|
+
client: entity === null || entity === void 0 ? void 0 : entity.API.client,
|
|
36590
|
+
FiltersEntity: entity && viewName && (entity === null || entity === void 0 ? void 0 : entity.def.views[viewName]) ? entity === null || entity === void 0 ? void 0 : entity.def.views[viewName].FiltersEntity : undefined,
|
|
36591
|
+
filterValues: viewState.filterValues,
|
|
36592
|
+
setFilterValues: viewState.setFilterValues,
|
|
36593
|
+
filtersDescription: viewState.filtersDescription,
|
|
36594
|
+
setFiltersDescription: viewState.setFiltersDescription,
|
|
36595
|
+
filtersFormSize: filtersFormSize,
|
|
36596
|
+
size: toolbarSize,
|
|
36597
|
+
showAppliedFilters: showAppliedFilters,
|
|
36598
|
+
showRefreshButton: showRefreshButton,
|
|
36599
|
+
showFiltersButton: showFiltersButton,
|
|
36600
|
+
showSearchInput: showSearchInput,
|
|
36601
|
+
showSelectRowsButton: showSelectRowsButton,
|
|
36602
|
+
hideCheckboxToggle: hideCheckboxToggle,
|
|
36603
|
+
searchPlaceholder: searchPlaceholder,
|
|
36604
|
+
visibleFilters: visibleFilters,
|
|
36605
|
+
initialColumnFilters: setInitialFiltersFromColumns && entity ? entity.def.columns : undefined
|
|
36606
|
+
}))
|
|
36612
36607
|
}),
|
|
36613
36608
|
showActions && (0, $b4te3$reactjsxruntime.jsx)((0, $j8hoz.DataGridActionsToolbar), Object.assign({}, labels, {
|
|
36614
36609
|
viewName: viewName,
|
|
@@ -47876,17 +47871,28 @@ parcelRegister("lwxCY", function(module, exports) {
|
|
|
47876
47871
|
|
|
47877
47872
|
$parcel$export(module.exports, "useAncestorResize", function () { return $fab6abe4da65ff17$export$d994cf386c6f1d98; });
|
|
47878
47873
|
|
|
47874
|
+
function $fab6abe4da65ff17$var$parseUnit(value, ancestorWidth, ancestorHeight, baseFontSize) {
|
|
47875
|
+
if (value.endsWith("px")) return parseFloat(value);
|
|
47876
|
+
if (value.endsWith("vw")) return window.innerWidth * parseFloat(value) / 100;
|
|
47877
|
+
if (value.endsWith("vh")) return window.innerHeight * parseFloat(value) / 100;
|
|
47878
|
+
if (value.endsWith("rem")) return parseFloat(value) * baseFontSize;
|
|
47879
|
+
if (value.endsWith("em")) return parseFloat(value) * baseFontSize;
|
|
47880
|
+
if (value.endsWith("%")) return parseFloat(value) / 100 * (ancestorWidth || ancestorHeight);
|
|
47881
|
+
return parseFloat(value);
|
|
47882
|
+
}
|
|
47879
47883
|
function $fab6abe4da65ff17$export$d994cf386c6f1d98(minSize = {
|
|
47880
|
-
width:
|
|
47881
|
-
height:
|
|
47884
|
+
width: "300px",
|
|
47885
|
+
height: "400px"
|
|
47882
47886
|
}) {
|
|
47883
47887
|
const ref = (0, $b4te3$react.useRef)(null);
|
|
47884
|
-
const [size, setSize] = (0, $b4te3$react.useState)(
|
|
47888
|
+
const [size, setSize] = (0, $b4te3$react.useState)({
|
|
47889
|
+
width: 0,
|
|
47890
|
+
height: 0
|
|
47891
|
+
});
|
|
47885
47892
|
(0, $b4te3$react.useEffect)(()=>{
|
|
47886
47893
|
var _a;
|
|
47887
47894
|
if (!ref.current) return;
|
|
47888
|
-
|
|
47889
|
-
const findTargetAncestor = (el)=>{
|
|
47895
|
+
const findFirstScrollableAncestor = (el)=>{
|
|
47890
47896
|
while(el){
|
|
47891
47897
|
const overflowY = getComputedStyle(el).overflowY;
|
|
47892
47898
|
if (overflowY === "auto" || overflowY === "scroll") return el;
|
|
@@ -47894,17 +47900,30 @@ function $fab6abe4da65ff17$export$d994cf386c6f1d98(minSize = {
|
|
|
47894
47900
|
}
|
|
47895
47901
|
return null;
|
|
47896
47902
|
};
|
|
47897
|
-
const ancestor = (_a =
|
|
47898
|
-
if (!ancestor)
|
|
47899
|
-
|
|
47900
|
-
|
|
47903
|
+
const ancestor = (_a = findFirstScrollableAncestor(ref.current.parentElement)) !== null && _a !== void 0 ? _a : ref.current.parentElement;
|
|
47904
|
+
if (!ancestor) {
|
|
47905
|
+
console.warn("cant resize, noancestor");
|
|
47906
|
+
return;
|
|
47907
|
+
}
|
|
47908
|
+
const baseFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
47909
|
+
const minWidth = $fab6abe4da65ff17$var$parseUnit(minSize.width, ancestor.clientWidth, ancestor.clientHeight, baseFontSize);
|
|
47910
|
+
const minHeight = $fab6abe4da65ff17$var$parseUnit(minSize.height, ancestor.clientWidth, ancestor.clientHeight, baseFontSize);
|
|
47911
|
+
const resize = ()=>{
|
|
47912
|
+
const width = ancestor.clientWidth;
|
|
47913
|
+
const height = ancestor.clientHeight;
|
|
47901
47914
|
setSize({
|
|
47902
|
-
width: Math.max(
|
|
47903
|
-
height: Math.max(
|
|
47915
|
+
width: Math.max(minWidth, width),
|
|
47916
|
+
height: Math.max(minHeight, height)
|
|
47904
47917
|
});
|
|
47905
|
-
}
|
|
47918
|
+
};
|
|
47919
|
+
const observer = new ResizeObserver(resize);
|
|
47906
47920
|
observer.observe(ancestor);
|
|
47907
|
-
|
|
47921
|
+
window.addEventListener("resize", resize);
|
|
47922
|
+
resize();
|
|
47923
|
+
return ()=>{
|
|
47924
|
+
observer.disconnect();
|
|
47925
|
+
window.removeEventListener("resize", resize);
|
|
47926
|
+
};
|
|
47908
47927
|
}, [
|
|
47909
47928
|
minSize.width,
|
|
47910
47929
|
minSize.height
|