@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.
Files changed (155) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/CheckableList/CheckableList.d.ts.map +1 -1
  3. package/components/CheckableList/CheckableList.js +163 -143
  4. package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
  5. package/components/CheckableList/CheckableList.styles.js +20 -8
  6. package/components/CheckableList/constants.d.ts +1 -1
  7. package/components/CheckableList/constants.d.ts.map +1 -1
  8. package/components/CheckableList/hooks/useCheckableListRender.d.ts +6 -1
  9. package/components/CheckableList/hooks/useCheckableListRender.d.ts.map +1 -1
  10. package/components/CheckableList/hooks/useCheckableListRender.js +126 -113
  11. package/components/CheckableList/slots/slots.d.ts +1 -0
  12. package/components/CheckableList/slots/slots.d.ts.map +1 -1
  13. package/components/CheckableList/slots/slots.js +1 -1
  14. package/components/CheckableList/slots/styled.d.ts +3 -0
  15. package/components/CheckableList/slots/styled.d.ts.map +1 -1
  16. package/components/CheckableList/slots/styled.js +56 -51
  17. package/components/CheckableList/types.d.ts +20 -0
  18. package/components/CheckableList/types.d.ts.map +1 -1
  19. package/components/ColorPicker/ColorPicker.js +2 -2
  20. package/components/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  21. package/components/DevicesPicker/DevicesPicker.d.ts +14 -0
  22. package/components/DevicesPicker/DevicesPicker.d.ts.map +1 -0
  23. package/components/DevicesPicker/DevicesPicker.js +344 -0
  24. package/components/DevicesPicker/DevicesPicker.styles.d.ts +3 -0
  25. package/components/DevicesPicker/DevicesPicker.styles.d.ts.map +1 -0
  26. package/components/DevicesPicker/DevicesPicker.styles.js +510 -0
  27. package/components/DevicesPicker/constants.d.ts +85 -0
  28. package/components/DevicesPicker/constants.d.ts.map +1 -0
  29. package/components/DevicesPicker/constants.js +41 -0
  30. package/components/DevicesPicker/dictionary.d.ts +19 -0
  31. package/components/DevicesPicker/dictionary.d.ts.map +1 -0
  32. package/components/DevicesPicker/dictionary.js +20 -0
  33. package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts +11 -0
  34. package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts.map +1 -0
  35. package/components/DevicesPicker/helpers/resolveDeviceGroup.js +14 -0
  36. package/components/DevicesPicker/helpers/toDeviceArray.d.ts +7 -0
  37. package/components/DevicesPicker/helpers/toDeviceArray.d.ts.map +1 -0
  38. package/components/DevicesPicker/helpers/toDeviceArray.js +6 -0
  39. package/components/DevicesPicker/hooks/types.d.ts +176 -0
  40. package/components/DevicesPicker/hooks/types.d.ts.map +1 -0
  41. package/components/DevicesPicker/hooks/useDeviceGroups.d.ts +13 -0
  42. package/components/DevicesPicker/hooks/useDeviceGroups.d.ts.map +1 -0
  43. package/components/DevicesPicker/hooks/useDeviceGroups.js +51 -0
  44. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts +13 -0
  45. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts.map +1 -0
  46. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.js +71 -0
  47. package/components/DevicesPicker/hooks/useDevicesSelection.d.ts +12 -0
  48. package/components/DevicesPicker/hooks/useDevicesSelection.d.ts.map +1 -0
  49. package/components/DevicesPicker/hooks/useDevicesSelection.js +26 -0
  50. package/components/DevicesPicker/hooks/usePanelColumns.d.ts +12 -0
  51. package/components/DevicesPicker/hooks/usePanelColumns.d.ts.map +1 -0
  52. package/components/DevicesPicker/hooks/usePanelColumns.js +30 -0
  53. package/components/DevicesPicker/index.d.ts +11 -0
  54. package/components/DevicesPicker/index.d.ts.map +1 -0
  55. package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts +77 -0
  56. package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts.map +1 -0
  57. package/components/DevicesPicker/slots/DevicesPickerEnum.js +4 -0
  58. package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts +112 -0
  59. package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts.map +1 -0
  60. package/components/DevicesPicker/slots/DevicesPickerSlots.js +163 -0
  61. package/components/DevicesPicker/slots/index.d.ts +3 -0
  62. package/components/DevicesPicker/slots/index.d.ts.map +1 -0
  63. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts +8 -0
  64. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts.map +1 -0
  65. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.js +77 -0
  66. package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts +3 -0
  67. package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts.map +1 -0
  68. package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts +42 -0
  69. package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts.map +1 -0
  70. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts +11 -0
  71. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts.map +1 -0
  72. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.js +141 -0
  73. package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts +3 -0
  74. package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts.map +1 -0
  75. package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts +68 -0
  76. package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts.map +1 -0
  77. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts +10 -0
  78. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts.map +1 -0
  79. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.js +35 -0
  80. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts +3 -0
  81. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts.map +1 -0
  82. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts +11 -0
  83. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts.map +1 -0
  84. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts +11 -0
  85. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts.map +1 -0
  86. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.js +61 -0
  87. package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts +3 -0
  88. package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts.map +1 -0
  89. package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts +32 -0
  90. package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts.map +1 -0
  91. package/components/DevicesPicker/types.d.ts +171 -0
  92. package/components/DevicesPicker/types.d.ts.map +1 -0
  93. package/components/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
  94. package/components/DynamicFilter/DynamicFilter.styles.js +41 -33
  95. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +1 -1
  96. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +1 -1
  97. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.d.ts.map +1 -1
  98. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +24 -24
  99. package/components/DynamicFilter/types.d.ts +9 -1
  100. package/components/DynamicFilter/types.d.ts.map +1 -1
  101. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
  102. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +1 -1
  103. package/components/extended/mui/CheckBox/CheckBox.js +7 -7
  104. package/components/extended/mui/Select/Select.js +6 -6
  105. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts +21 -0
  106. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts.map +1 -0
  107. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.js +6 -0
  108. package/components/hook-form/RHFDevicesPicker/index.d.ts +3 -0
  109. package/components/hook-form/RHFDevicesPicker/index.d.ts.map +1 -0
  110. package/components/hook-form/RHFDevicesPicker/types.d.ts +8 -0
  111. package/components/hook-form/RHFDevicesPicker/types.d.ts.map +1 -0
  112. package/components/hook-form/index.d.ts +3 -0
  113. package/components/hook-form/index.d.ts.map +1 -1
  114. package/components/hook-form/renderAsRegistry.d.ts +33 -0
  115. package/components/hook-form/renderAsRegistry.d.ts.map +1 -0
  116. package/components/hook-form/renderAsRegistry.js +7 -0
  117. package/components/index.d.ts +1 -0
  118. package/components/index.d.ts.map +1 -1
  119. package/helpers/resolveDeviceIconSrc/constants.d.ts +14 -0
  120. package/helpers/resolveDeviceIconSrc/constants.d.ts.map +1 -0
  121. package/helpers/resolveDeviceIconSrc/constants.js +6 -0
  122. package/helpers/resolveDeviceIconSrc/index.d.ts +3 -0
  123. package/helpers/resolveDeviceIconSrc/index.d.ts.map +1 -0
  124. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts +14 -0
  125. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts.map +1 -0
  126. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.js +8 -0
  127. package/helpers/resolveDeviceLabels/index.d.ts +3 -0
  128. package/helpers/resolveDeviceLabels/index.d.ts.map +1 -0
  129. package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts +22 -0
  130. package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts.map +1 -0
  131. package/helpers/resolveDeviceLabels/resolveDeviceLabels.js +10 -0
  132. package/helpers/resolveDeviceLabels/types.d.ts +19 -0
  133. package/helpers/resolveDeviceLabels/types.d.ts.map +1 -0
  134. package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.d.ts +14 -0
  135. package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.d.ts.map +1 -0
  136. package/hooks/useChipsOverflow/helpers/calculateLeftoverWidth.js +7 -0
  137. package/hooks/useChipsOverflow/helpers/calculateVisibleChipsCount.d.ts.map +1 -0
  138. package/hooks/useChipsOverflow/helpers/index.d.ts +3 -0
  139. package/hooks/useChipsOverflow/helpers/index.d.ts.map +1 -0
  140. package/hooks/useChipsOverflow/index.d.ts +3 -0
  141. package/hooks/useChipsOverflow/index.d.ts.map +1 -0
  142. package/hooks/useChipsOverflow/types.d.ts +24 -0
  143. package/hooks/useChipsOverflow/types.d.ts.map +1 -0
  144. package/{components/DynamicFilter/hooks → hooks/useChipsOverflow}/useChipsOverflow.d.ts +7 -5
  145. package/hooks/useChipsOverflow/useChipsOverflow.d.ts.map +1 -0
  146. package/hooks/useChipsOverflow/useChipsOverflow.js +110 -0
  147. package/index.d.ts +2 -0
  148. package/index.d.ts.map +1 -1
  149. package/index.js +803 -757
  150. package/package.json +10 -10
  151. package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts.map +0 -1
  152. package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +0 -1
  153. package/components/DynamicFilter/hooks/useChipsOverflow.js +0 -83
  154. /package/{components/DynamicFilter → hooks/useChipsOverflow}/helpers/calculateVisibleChipsCount.d.ts +0 -0
  155. /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.54.2",
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-dropzone": "14.4.1",
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
- "react-window": "1.8.11",
71
+ "date-fns": "2.30.0",
72
72
  "react-resizable": "3.1.3",
73
- "date-fns": "2.30.0"
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
- };