@m4l/components 9.54.2 → 9.55.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/@types/types.d.ts +8 -0
- package/components/CheckableList/CheckableList.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.js +163 -143
- package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.styles.js +20 -8
- package/components/CheckableList/constants.d.ts +1 -1
- package/components/CheckableList/constants.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListRender.d.ts +6 -1
- package/components/CheckableList/hooks/useCheckableListRender.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListRender.js +126 -113
- package/components/CheckableList/slots/slots.d.ts +1 -0
- package/components/CheckableList/slots/slots.d.ts.map +1 -1
- package/components/CheckableList/slots/slots.js +1 -1
- package/components/CheckableList/slots/styled.d.ts +3 -0
- package/components/CheckableList/slots/styled.d.ts.map +1 -1
- package/components/CheckableList/slots/styled.js +56 -51
- package/components/CheckableList/types.d.ts +20 -0
- package/components/CheckableList/types.d.ts.map +1 -1
- package/components/ColorPicker/ColorPicker.js +2 -2
- package/components/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/components/DevicesPicker/DevicesPicker.d.ts +14 -0
- package/components/DevicesPicker/DevicesPicker.d.ts.map +1 -0
- package/components/DevicesPicker/DevicesPicker.js +344 -0
- package/components/DevicesPicker/DevicesPicker.styles.d.ts +3 -0
- package/components/DevicesPicker/DevicesPicker.styles.d.ts.map +1 -0
- package/components/DevicesPicker/DevicesPicker.styles.js +510 -0
- package/components/DevicesPicker/constants.d.ts +85 -0
- package/components/DevicesPicker/constants.d.ts.map +1 -0
- package/components/DevicesPicker/constants.js +41 -0
- package/components/DevicesPicker/dictionary.d.ts +19 -0
- package/components/DevicesPicker/dictionary.d.ts.map +1 -0
- package/components/DevicesPicker/dictionary.js +20 -0
- package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts +11 -0
- package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts.map +1 -0
- package/components/DevicesPicker/helpers/resolveDeviceGroup.js +14 -0
- package/components/DevicesPicker/helpers/toDeviceArray.d.ts +7 -0
- package/components/DevicesPicker/helpers/toDeviceArray.d.ts.map +1 -0
- package/components/DevicesPicker/helpers/toDeviceArray.js +6 -0
- package/components/DevicesPicker/hooks/types.d.ts +176 -0
- package/components/DevicesPicker/hooks/types.d.ts.map +1 -0
- package/components/DevicesPicker/hooks/useDeviceGroups.d.ts +13 -0
- package/components/DevicesPicker/hooks/useDeviceGroups.d.ts.map +1 -0
- package/components/DevicesPicker/hooks/useDeviceGroups.js +51 -0
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts +13 -0
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts.map +1 -0
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.js +71 -0
- package/components/DevicesPicker/hooks/useDevicesSelection.d.ts +12 -0
- package/components/DevicesPicker/hooks/useDevicesSelection.d.ts.map +1 -0
- package/components/DevicesPicker/hooks/useDevicesSelection.js +26 -0
- package/components/DevicesPicker/hooks/usePanelColumns.d.ts +12 -0
- package/components/DevicesPicker/hooks/usePanelColumns.d.ts.map +1 -0
- package/components/DevicesPicker/hooks/usePanelColumns.js +30 -0
- package/components/DevicesPicker/index.d.ts +11 -0
- package/components/DevicesPicker/index.d.ts.map +1 -0
- package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts +77 -0
- package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts.map +1 -0
- package/components/DevicesPicker/slots/DevicesPickerEnum.js +4 -0
- package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts +112 -0
- package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts.map +1 -0
- package/components/DevicesPicker/slots/DevicesPickerSlots.js +163 -0
- package/components/DevicesPicker/slots/index.d.ts +3 -0
- package/components/DevicesPicker/slots/index.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts +8 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.js +77 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts +3 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts +42 -0
- package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts +11 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.js +141 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts +3 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts +68 -0
- package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts +10 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.js +35 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts +3 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts +11 -0
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts +11 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.js +61 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts +3 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts.map +1 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts +32 -0
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts.map +1 -0
- package/components/DevicesPicker/types.d.ts +171 -0
- package/components/DevicesPicker/types.d.ts.map +1 -0
- package/components/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
- package/components/DynamicFilter/DynamicFilter.styles.js +41 -33
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +24 -24
- package/components/DynamicFilter/types.d.ts +9 -1
- package/components/DynamicFilter/types.d.ts.map +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +1 -1
- package/components/extended/mui/CheckBox/CheckBox.js +7 -7
- package/components/extended/mui/Select/Select.js +6 -6
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts +21 -0
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts.map +1 -0
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.js +6 -0
- package/components/hook-form/RHFDevicesPicker/index.d.ts +3 -0
- package/components/hook-form/RHFDevicesPicker/index.d.ts.map +1 -0
- package/components/hook-form/RHFDevicesPicker/types.d.ts +8 -0
- package/components/hook-form/RHFDevicesPicker/types.d.ts.map +1 -0
- package/components/hook-form/index.d.ts +3 -0
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/hook-form/renderAsRegistry.d.ts +33 -0
- package/components/hook-form/renderAsRegistry.d.ts.map +1 -0
- package/components/hook-form/renderAsRegistry.js +7 -0
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/helpers/resolveDeviceIconSrc/constants.d.ts +14 -0
- package/helpers/resolveDeviceIconSrc/constants.d.ts.map +1 -0
- package/helpers/resolveDeviceIconSrc/constants.js +6 -0
- package/helpers/resolveDeviceIconSrc/index.d.ts +3 -0
- package/helpers/resolveDeviceIconSrc/index.d.ts.map +1 -0
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts +14 -0
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts.map +1 -0
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.js +8 -0
- package/helpers/resolveDeviceLabels/index.d.ts +3 -0
- package/helpers/resolveDeviceLabels/index.d.ts.map +1 -0
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts +22 -0
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts.map +1 -0
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.js +10 -0
- package/helpers/resolveDeviceLabels/types.d.ts +19 -0
- package/helpers/resolveDeviceLabels/types.d.ts.map +1 -0
- package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.d.ts +14 -0
- package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.d.ts.map +1 -0
- package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.js +7 -0
- package/hooks/useChipsOverflow/helpers/calculateVisibleChipsCount.d.ts.map +1 -0
- package/hooks/useChipsOverflow/helpers/index.d.ts +3 -0
- package/hooks/useChipsOverflow/helpers/index.d.ts.map +1 -0
- package/hooks/useChipsOverflow/index.d.ts +3 -0
- package/hooks/useChipsOverflow/index.d.ts.map +1 -0
- package/hooks/useChipsOverflow/types.d.ts +24 -0
- package/hooks/useChipsOverflow/types.d.ts.map +1 -0
- package/{components/DynamicFilter/hooks → hooks/useChipsOverflow}/useChipsOverflow.d.ts +7 -5
- package/hooks/useChipsOverflow/useChipsOverflow.d.ts.map +1 -0
- package/hooks/useChipsOverflow/useChipsOverflow.js +110 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +803 -757
- package/package.json +10 -10
- package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts.map +0 -1
- package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +0 -1
- package/components/DynamicFilter/hooks/useChipsOverflow.js +0 -83
- /package/{components/DynamicFilter → hooks/useChipsOverflow}/helpers/calculateVisibleChipsCount.d.ts +0 -0
- /package/{components/DynamicFilter → hooks/useChipsOverflow}/helpers/calculateVisibleChipsCount.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.55.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,24 +52,24 @@
|
|
|
52
52
|
"@hookform/resolvers": "2.9.11",
|
|
53
53
|
"nprogress": "0.2.0",
|
|
54
54
|
"react-transition-group": "4.4.5",
|
|
55
|
-
"@tanstack/react-virtual": "3.13.23",
|
|
56
|
-
"react-color": "2.19.3",
|
|
57
|
-
"react-rnd": "10.5.2",
|
|
58
55
|
"@mui/x-date-pickers": "6.20.2",
|
|
59
|
-
"react-
|
|
56
|
+
"react-color": "2.19.3",
|
|
60
57
|
"react-draggable": "4.5.0",
|
|
58
|
+
"@tanstack/react-virtual": "3.13.23",
|
|
59
|
+
"react-dropzone": "14.4.1",
|
|
60
|
+
"react-rnd": "10.5.2",
|
|
61
61
|
"react-spinners": "0.13.8",
|
|
62
|
-
"react-resizable-panels": "2.1.9",
|
|
63
|
-
"react-simple-code-editor": "0.14.1",
|
|
64
|
-
"simplebar-react": "3.2.6",
|
|
65
62
|
"chart.js": "4.5.1",
|
|
66
63
|
"chartjs-chart-error-bars": "4.4.5",
|
|
67
64
|
"qrcode.react": "3.2.0",
|
|
65
|
+
"simplebar-react": "3.2.6",
|
|
66
|
+
"react-simple-code-editor": "0.14.1",
|
|
67
|
+
"react-resizable-panels": "2.1.9",
|
|
68
68
|
"react-data-grid": "7.0.0-beta.47",
|
|
69
69
|
"react-dnd": "16.0.1",
|
|
70
70
|
"react-dnd-html5-backend": "16.0.1",
|
|
71
|
-
"
|
|
71
|
+
"date-fns": "2.30.0",
|
|
72
72
|
"react-resizable": "3.1.3",
|
|
73
|
-
"
|
|
73
|
+
"react-window": "1.8.11"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateVisibleChipsCount.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/calculateVisibleChipsCount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,CAsBR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useChipsOverflow.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/hooks/useChipsOverflow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,EAAE;;;;;qBA2HxB,MAAM,MAAM,WAAW,GAAG,IAAI;yBAc3D,WAAW,GAAG,IAAI;wBAalB,WAAW,GAAG,IAAI;wBAYlB,WAAW,GAAG,IAAI;EA8D1B"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { useRef as s, useState as J, useEffect as R, useCallback as u, useMemo as K } from "react";
|
|
2
|
-
import { calculateVisibleChipsCount as L } from "../helpers/calculateVisibleChipsCount.js";
|
|
3
|
-
function X(t) {
|
|
4
|
-
const h = s(null), m = s(null), v = s(null), C = s(null), W = s(null), p = s(/* @__PURE__ */ new Map()), i = s(/* @__PURE__ */ new Map()), [a, d] = J(null);
|
|
5
|
-
R(() => {
|
|
6
|
-
const e = new Set(t.map((r) => r.id));
|
|
7
|
-
for (const r of i.current.keys())
|
|
8
|
-
e.has(r) || i.current.delete(r);
|
|
9
|
-
t.some((r) => !i.current.has(r.id)) && d(null);
|
|
10
|
-
}, [t]);
|
|
11
|
-
const n = u(() => {
|
|
12
|
-
const e = h.current, o = m.current;
|
|
13
|
-
if (!e || !o || t.length === 0) {
|
|
14
|
-
d(null);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
if (t.forEach((c) => {
|
|
18
|
-
const g = p.current.get(c.id);
|
|
19
|
-
g && g.offsetWidth > 0 && i.current.set(c.id, g.offsetWidth);
|
|
20
|
-
}), !t.every((c) => i.current.has(c.id)))
|
|
21
|
-
return;
|
|
22
|
-
const b = getComputedStyle(e), f = getComputedStyle(o), V = parseFloat(b.paddingLeft) || 0, q = parseFloat(b.paddingRight) || 0, x = parseFloat(f.paddingLeft) || 0, z = parseFloat(f.paddingRight) || 0, l = parseFloat(f.gap) || 0, F = e.getBoundingClientRect().width || e.clientWidth;
|
|
23
|
-
if (F === 0)
|
|
24
|
-
return;
|
|
25
|
-
const w = C.current?.offsetWidth ?? 0, B = w > 0 ? w + l : 0, M = W.current?.offsetWidth ?? 0, j = M > 0 ? M + l : 0, y = F - V - q - x - z - B - j, S = t.map((c) => i.current.get(c.id) ?? 0);
|
|
26
|
-
if (L(y, l, S) >= t.length) {
|
|
27
|
-
d(t.length);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const E = v.current?.offsetWidth ?? 0, D = E > 0 ? E + l : 0, G = y - D, H = L(G, l, S);
|
|
31
|
-
d(H);
|
|
32
|
-
}, [t]), A = u((e, o) => {
|
|
33
|
-
o ? p.current.set(e, o) : p.current.delete(e);
|
|
34
|
-
}, []), P = u(
|
|
35
|
-
(e) => {
|
|
36
|
-
v.current = e, n();
|
|
37
|
-
},
|
|
38
|
-
[n]
|
|
39
|
-
), O = u(
|
|
40
|
-
(e) => {
|
|
41
|
-
C.current = e, n();
|
|
42
|
-
},
|
|
43
|
-
[n]
|
|
44
|
-
), k = u(
|
|
45
|
-
(e) => {
|
|
46
|
-
W.current = e, n();
|
|
47
|
-
},
|
|
48
|
-
[n]
|
|
49
|
-
);
|
|
50
|
-
R(() => {
|
|
51
|
-
const e = h.current;
|
|
52
|
-
if (!e)
|
|
53
|
-
return;
|
|
54
|
-
const o = new ResizeObserver(() => {
|
|
55
|
-
n();
|
|
56
|
-
});
|
|
57
|
-
return o.observe(e), () => {
|
|
58
|
-
o.disconnect();
|
|
59
|
-
};
|
|
60
|
-
}, [n]), R(() => {
|
|
61
|
-
const e = requestAnimationFrame(() => {
|
|
62
|
-
n();
|
|
63
|
-
});
|
|
64
|
-
return () => cancelAnimationFrame(e);
|
|
65
|
-
}, [t, n]);
|
|
66
|
-
const { visibleFilters: I, overflowFilters: U } = K(() => a === null || a >= t.length ? { visibleFilters: t, overflowFilters: [] } : {
|
|
67
|
-
visibleFilters: t.slice(0, a),
|
|
68
|
-
overflowFilters: t.slice(a)
|
|
69
|
-
}, [t, a]);
|
|
70
|
-
return {
|
|
71
|
-
visibleFilters: I,
|
|
72
|
-
overflowFilters: U,
|
|
73
|
-
parentRef: h,
|
|
74
|
-
containerRef: m,
|
|
75
|
-
setChipRef: A,
|
|
76
|
-
setMoreChipRef: P,
|
|
77
|
-
setActionsRef: O,
|
|
78
|
-
setLeadingRef: k
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
X as useChipsOverflow
|
|
83
|
-
};
|
/package/{components/DynamicFilter → hooks/useChipsOverflow}/helpers/calculateVisibleChipsCount.d.ts
RENAMED
|
File without changes
|
/package/{components/DynamicFilter → hooks/useChipsOverflow}/helpers/calculateVisibleChipsCount.js
RENAMED
|
File without changes
|