@m4l/components 9.54.2-beta-m4lcom-764-device-picker.0 → 9.54.2

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 (157) hide show
  1. package/@types/types.d.ts +0 -8
  2. package/components/CheckableList/CheckableList.d.ts.map +1 -1
  3. package/components/CheckableList/CheckableList.js +143 -163
  4. package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
  5. package/components/CheckableList/CheckableList.styles.js +8 -20
  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 +1 -6
  9. package/components/CheckableList/hooks/useCheckableListRender.d.ts.map +1 -1
  10. package/components/CheckableList/hooks/useCheckableListRender.js +113 -126
  11. package/components/CheckableList/slots/slots.d.ts +0 -1
  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 +0 -3
  15. package/components/CheckableList/slots/styled.d.ts.map +1 -1
  16. package/components/CheckableList/slots/styled.js +51 -56
  17. package/components/CheckableList/types.d.ts +0 -20
  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/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
  22. package/components/DynamicFilter/DynamicFilter.styles.js +33 -41
  23. package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts.map +1 -0
  24. package/{hooks/useChipsOverflow → components/DynamicFilter/hooks}/useChipsOverflow.d.ts +5 -6
  25. package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +1 -0
  26. package/components/DynamicFilter/hooks/useChipsOverflow.js +83 -0
  27. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +1 -1
  28. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +1 -1
  29. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.d.ts.map +1 -1
  30. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +24 -24
  31. package/components/DynamicFilter/types.d.ts +1 -9
  32. package/components/DynamicFilter/types.d.ts.map +1 -1
  33. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
  34. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +1 -1
  35. package/components/datagrids/views/CardsView/CardsView.d.ts.map +1 -1
  36. package/components/extended/mui/Autocomplete/Autocomplete.d.ts.map +1 -1
  37. package/components/extended/mui/Autocomplete/Autocomplete.js +52 -50
  38. package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.d.ts.map +1 -1
  39. package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.js +58 -60
  40. package/components/extended/mui/CheckBox/CheckBox.js +7 -7
  41. package/components/extended/mui/Select/Select.js +6 -6
  42. package/components/hook-form/index.d.ts +0 -3
  43. package/components/hook-form/index.d.ts.map +1 -1
  44. package/components/index.d.ts +0 -1
  45. package/components/index.d.ts.map +1 -1
  46. package/index.d.ts +0 -2
  47. package/index.d.ts.map +1 -1
  48. package/index.js +760 -804
  49. package/package.json +8 -8
  50. package/components/DevicesPicker/DevicesPicker.d.ts +0 -14
  51. package/components/DevicesPicker/DevicesPicker.d.ts.map +0 -1
  52. package/components/DevicesPicker/DevicesPicker.js +0 -343
  53. package/components/DevicesPicker/DevicesPicker.styles.d.ts +0 -3
  54. package/components/DevicesPicker/DevicesPicker.styles.d.ts.map +0 -1
  55. package/components/DevicesPicker/DevicesPicker.styles.js +0 -494
  56. package/components/DevicesPicker/constants.d.ts +0 -74
  57. package/components/DevicesPicker/constants.d.ts.map +0 -1
  58. package/components/DevicesPicker/constants.js +0 -39
  59. package/components/DevicesPicker/dictionary.d.ts +0 -19
  60. package/components/DevicesPicker/dictionary.d.ts.map +0 -1
  61. package/components/DevicesPicker/dictionary.js +0 -20
  62. package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts +0 -11
  63. package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts.map +0 -1
  64. package/components/DevicesPicker/helpers/resolveDeviceGroup.js +0 -14
  65. package/components/DevicesPicker/helpers/toDeviceArray.d.ts +0 -7
  66. package/components/DevicesPicker/helpers/toDeviceArray.d.ts.map +0 -1
  67. package/components/DevicesPicker/helpers/toDeviceArray.js +0 -6
  68. package/components/DevicesPicker/hooks/types.d.ts +0 -176
  69. package/components/DevicesPicker/hooks/types.d.ts.map +0 -1
  70. package/components/DevicesPicker/hooks/useDeviceGroups.d.ts +0 -13
  71. package/components/DevicesPicker/hooks/useDeviceGroups.d.ts.map +0 -1
  72. package/components/DevicesPicker/hooks/useDeviceGroups.js +0 -51
  73. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts +0 -13
  74. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts.map +0 -1
  75. package/components/DevicesPicker/hooks/useDevicesAsyncOptions.js +0 -71
  76. package/components/DevicesPicker/hooks/useDevicesSelection.d.ts +0 -12
  77. package/components/DevicesPicker/hooks/useDevicesSelection.d.ts.map +0 -1
  78. package/components/DevicesPicker/hooks/useDevicesSelection.js +0 -26
  79. package/components/DevicesPicker/hooks/usePanelColumns.d.ts +0 -12
  80. package/components/DevicesPicker/hooks/usePanelColumns.d.ts.map +0 -1
  81. package/components/DevicesPicker/hooks/usePanelColumns.js +0 -30
  82. package/components/DevicesPicker/index.d.ts +0 -11
  83. package/components/DevicesPicker/index.d.ts.map +0 -1
  84. package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts +0 -77
  85. package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts.map +0 -1
  86. package/components/DevicesPicker/slots/DevicesPickerEnum.js +0 -4
  87. package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts +0 -112
  88. package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts.map +0 -1
  89. package/components/DevicesPicker/slots/DevicesPickerSlots.js +0 -163
  90. package/components/DevicesPicker/slots/index.d.ts +0 -3
  91. package/components/DevicesPicker/slots/index.d.ts.map +0 -1
  92. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts +0 -8
  93. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts.map +0 -1
  94. package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.js +0 -77
  95. package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts +0 -3
  96. package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts.map +0 -1
  97. package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts +0 -42
  98. package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts.map +0 -1
  99. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts +0 -11
  100. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts.map +0 -1
  101. package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.js +0 -133
  102. package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts +0 -3
  103. package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts.map +0 -1
  104. package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts +0 -68
  105. package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts.map +0 -1
  106. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts +0 -10
  107. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts.map +0 -1
  108. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.js +0 -35
  109. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts +0 -3
  110. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts.map +0 -1
  111. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts +0 -11
  112. package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts.map +0 -1
  113. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts +0 -11
  114. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts.map +0 -1
  115. package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.js +0 -61
  116. package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts +0 -3
  117. package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts.map +0 -1
  118. package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts +0 -32
  119. package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts.map +0 -1
  120. package/components/DevicesPicker/types.d.ts +0 -170
  121. package/components/DevicesPicker/types.d.ts.map +0 -1
  122. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts +0 -21
  123. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts.map +0 -1
  124. package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.js +0 -6
  125. package/components/hook-form/RHFDevicesPicker/index.d.ts +0 -3
  126. package/components/hook-form/RHFDevicesPicker/index.d.ts.map +0 -1
  127. package/components/hook-form/RHFDevicesPicker/types.d.ts +0 -8
  128. package/components/hook-form/RHFDevicesPicker/types.d.ts.map +0 -1
  129. package/components/hook-form/renderAsRegistry.d.ts +0 -33
  130. package/components/hook-form/renderAsRegistry.d.ts.map +0 -1
  131. package/components/hook-form/renderAsRegistry.js +0 -7
  132. package/helpers/resolveDeviceIconSrc/constants.d.ts +0 -14
  133. package/helpers/resolveDeviceIconSrc/constants.d.ts.map +0 -1
  134. package/helpers/resolveDeviceIconSrc/constants.js +0 -6
  135. package/helpers/resolveDeviceIconSrc/index.d.ts +0 -3
  136. package/helpers/resolveDeviceIconSrc/index.d.ts.map +0 -1
  137. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts +0 -14
  138. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts.map +0 -1
  139. package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.js +0 -8
  140. package/helpers/resolveDeviceLabels/index.d.ts +0 -3
  141. package/helpers/resolveDeviceLabels/index.d.ts.map +0 -1
  142. package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts +0 -22
  143. package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts.map +0 -1
  144. package/helpers/resolveDeviceLabels/resolveDeviceLabels.js +0 -10
  145. package/helpers/resolveDeviceLabels/types.d.ts +0 -18
  146. package/helpers/resolveDeviceLabels/types.d.ts.map +0 -1
  147. package/hooks/useChipsOverflow/helpers/calculateVisibleChipsCount.d.ts.map +0 -1
  148. package/hooks/useChipsOverflow/helpers/index.d.ts +0 -2
  149. package/hooks/useChipsOverflow/helpers/index.d.ts.map +0 -1
  150. package/hooks/useChipsOverflow/index.d.ts +0 -3
  151. package/hooks/useChipsOverflow/index.d.ts.map +0 -1
  152. package/hooks/useChipsOverflow/types.d.ts +0 -24
  153. package/hooks/useChipsOverflow/types.d.ts.map +0 -1
  154. package/hooks/useChipsOverflow/useChipsOverflow.d.ts.map +0 -1
  155. package/hooks/useChipsOverflow/useChipsOverflow.js +0 -108
  156. /package/{hooks/useChipsOverflow → components/DynamicFilter}/helpers/calculateVisibleChipsCount.d.ts +0 -0
  157. /package/{hooks/useChipsOverflow → components/DynamicFilter}/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-beta-m4lcom-764-device-picker.0",
3
+ "version": "9.54.2",
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",
55
56
  "react-color": "2.19.3",
56
57
  "react-rnd": "10.5.2",
57
- "@tanstack/react-virtual": "3.13.23",
58
58
  "@mui/x-date-pickers": "6.20.2",
59
+ "react-dropzone": "14.4.1",
59
60
  "react-draggable": "4.5.0",
60
61
  "react-spinners": "0.13.8",
61
- "react-dropzone": "14.4.1",
62
+ "react-resizable-panels": "2.1.9",
63
+ "react-simple-code-editor": "0.14.1",
64
+ "simplebar-react": "3.2.6",
62
65
  "chart.js": "4.5.1",
63
66
  "chartjs-chart-error-bars": "4.4.5",
64
67
  "qrcode.react": "3.2.0",
65
- "react-resizable-panels": "2.1.9",
66
- "simplebar-react": "3.2.6",
67
- "react-simple-code-editor": "0.14.1",
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
- "date-fns": "2.30.0",
71
+ "react-window": "1.8.11",
72
72
  "react-resizable": "3.1.3",
73
- "react-window": "1.8.11"
73
+ "date-fns": "2.30.0"
74
74
  }
75
75
  }
@@ -1,14 +0,0 @@
1
- import { DevicePickerOption, DevicesPickerProps } from './types';
2
- /**
3
- * DevicesPicker: device selector with a card-based trigger and a grouped
4
- * selection panel.
5
- *
6
- * It reuses the AutocompleteAsync engine (same reducer and `useFetchOptions`)
7
- * so the fetch contract — lazy first load, param changes, abort — behaves
8
- * exactly like the async autocomplete, while rendering its own UI.
9
- *
10
- * The trigger hugs its content: it shows the cards that fit and reports the
11
- * rest through the +N toggle instead of clipping them silently.
12
- */
13
- export declare function DevicesPicker<T extends DevicePickerOption = DevicePickerOption>(props: DevicesPickerProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
14
- //# sourceMappingURL=DevicesPicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevicesPicker.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DevicesPicker/DevicesPicker.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAE,kBAAkB,EAA2B,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1F;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,EAC7E,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,oDAkX7B"}
@@ -1,343 +0,0 @@
1
- import { jsx as o, jsxs as C, Fragment as Pe } from "@emotion/react/jsx-runtime";
2
- import { useRef as Ne, useState as Z, useCallback as l, createElement as Ee, useMemo as Le } from "react";
3
- import q from "clsx";
4
- import { useModuleDictionary as _e, useEnvironment as xe } from "@m4l/core";
5
- import { Icon as ke } from "@m4l/base";
6
- import { ConectivityDispositiveOutlined as Fe, ArrowChevronMdUpOutlined as Ae, ArrowChevronMdDownOutlined as Me } from "@m4l/icons";
7
- import { useDevicesAsyncOptions as ze } from "./hooks/useDevicesAsyncOptions.js";
8
- import { useDeviceGroups as We } from "./hooks/useDeviceGroups.js";
9
- import { useDevicesSelection as $e } from "./hooks/useDevicesSelection.js";
10
- import { usePanelColumns as Ge } from "./hooks/usePanelColumns.js";
11
- import { resolveDeviceGroup as Be } from "./helpers/resolveDeviceGroup.js";
12
- import { DEVICES_PICKER_ICON_SIZE as H, DEVICES_PICKER_CLASSES as r } from "./constants.js";
13
- import { DICCTIONARY as E } from "./dictionary.js";
14
- import { resolveDeviceTitle as je, resolveDeviceSubtitle as Ke } from "../../helpers/resolveDeviceLabels/resolveDeviceLabels.js";
15
- import { resolveDeviceIconSrc as Ue } from "../../helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.js";
16
- import { useChipsOverflow as Ve } from "../../hooks/useChipsOverflow/useChipsOverflow.js";
17
- import { RootStyled as J, TriggerStyled as Ye, PlaceholderContainerStyled as Ze, PlaceholderIconStyled as qe, PlaceholderStyled as He, CardsContainerStyled as Je, DeviceCardWrapperStyled as Q, PartialCardWrapperStyled as Qe, MeasuringLayerStyled as Xe, OverflowToggleStyled as eo, ChevronButtonStyled as oo } from "./slots/DevicesPickerSlots.js";
18
- import { DevicesPickerSkeleton as ro } from "./subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.js";
19
- import { DevicesPanel as to } from "./subcomponents/DevicesPanel/DevicesPanel.js";
20
- import { SelectedDevicesList as no } from "./subcomponents/SelectedDevicesList/SelectedDevicesList.js";
21
- import { Image as ao } from "../Image/Image.js";
22
- import { DeviceCard as L } from "./subcomponents/DeviceCard/DeviceCard.js";
23
- import { Popover as X } from "../extended/mui/Popover/Popover.js";
24
- function Eo(ee) {
25
- const {
26
- endPoint: oe,
27
- timeout: re,
28
- parms: te,
29
- resultField: ne,
30
- isRemote: ae,
31
- isExternalUrl: ie,
32
- responseToCamelCase: le,
33
- shouldFetch: se,
34
- value: ce,
35
- onChange: de,
36
- multiple: s = !0,
37
- disabled: _ = !1,
38
- loading: x = !1,
39
- error: me = !1,
40
- size: c = "medium",
41
- showOverflowToggle: pe = !0,
42
- showDepartments: he,
43
- showIds: ge,
44
- searchable: fe = !0,
45
- placeholder: ue,
46
- className: k,
47
- dataTestid: F,
48
- getOptionLabel: b,
49
- getDeviceGroup: A = Be,
50
- getDeviceSubtitle: D,
51
- getDeviceIcon: S,
52
- onChangeFilterParms: M
53
- } = ee;
54
- if (s && M)
55
- throw new Error(
56
- "multiple cannot be enabled when onChangeFilterParms is defined; define the filter in parms if needed."
57
- );
58
- const { getLabel: I } = _e(), { hostApiRemote: z } = xe(), w = Ne(null), [d, W] = Z(!1), [$, O] = Z(!1), {
59
- options: y,
60
- loading: G,
61
- onOpen: B,
62
- onClose: g,
63
- onSearchChange: ve
64
- } = ze({
65
- endPoint: oe,
66
- timeout: re,
67
- parms: te,
68
- resultField: ne,
69
- isRemote: ae,
70
- isExternalUrl: ie,
71
- responseToCamelCase: le,
72
- shouldFetch: se,
73
- onChangeFilterParms: M
74
- }), m = l(
75
- (e) => b ? b(e) : je(e),
76
- [b]
77
- ), p = l(
78
- (e) => D ? D(e) : Ke(e),
79
- [D]
80
- ), h = l(
81
- (e) => S ? S(e) : Ee(ao, {
82
- src: Ue(z, e.deviceIcon?.iconId),
83
- width: H,
84
- height: H,
85
- enableIntersectionObserver: !1
86
- }),
87
- [S, z]
88
- ), { selectedIds: Ce, selectedDevices: f, handleSelectionChange: be, handleRemove: R } = $e({ value: ce, options: y, multiple: s, onChange: de }), i = Ge({
89
- options: y,
90
- showDepartments: he,
91
- showIds: ge,
92
- getDeviceGroup: A
93
- }), { groups: De, items: Se } = We({
94
- options: y,
95
- grouped: i.showDepartments,
96
- getDeviceGroup: A,
97
- defaultGroupLabel: I(E.label_default_department),
98
- getOptionLabel: m,
99
- getDeviceSubtitle: p,
100
- getDeviceIcon: h
101
- }), {
102
- visibleFilters: j,
103
- overflowFilters: T,
104
- measuringFilters: u,
105
- parentRef: Ie,
106
- containerRef: we,
107
- setChipRef: K,
108
- setMoreChipRef: Oe,
109
- setActionsRef: ye
110
- } = Ve(f, { deferMeasurement: !0 }), { visibleCards: Re, partialCard: n, hiddenCards: U } = Le(() => {
111
- const e = new Set(u.map((a) => a.id)), t = T.find((a) => !e.has(a.id));
112
- return {
113
- visibleCards: j,
114
- partialCard: t,
115
- hiddenCards: T.filter((a) => a.id !== t?.id)
116
- };
117
- }, [j, T, u]), V = l((e) => {
118
- e?.stopPropagation(), O(!1), W((t) => {
119
- const a = !t;
120
- return a ? B() : g(), a;
121
- });
122
- }, [B, g]), P = l(() => {
123
- W(!1), g();
124
- }, [g]), N = l((e) => {
125
- e?.stopPropagation(), d && P(), O((t) => !t);
126
- }, [d, P]), Te = l(() => O(!1), []), Y = x || G, v = {
127
- size: c,
128
- panelOpen: d,
129
- listOpen: $,
130
- error: me,
131
- disabled: _,
132
- loading: Y,
133
- hasSelection: f.length > 0
134
- };
135
- return x ? /* @__PURE__ */ o(
136
- J,
137
- {
138
- ownerState: v,
139
- className: q(k, r.root),
140
- "data-testid": F,
141
- children: /* @__PURE__ */ o(ro, { size: c })
142
- }
143
- ) : /* @__PURE__ */ C(Pe, { children: [
144
- /* @__PURE__ */ o(
145
- J,
146
- {
147
- ref: Ie,
148
- ownerState: v,
149
- className: q(k, r.root),
150
- "data-testid": F,
151
- children: /* @__PURE__ */ C(
152
- Ye,
153
- {
154
- ref: w,
155
- ownerState: v,
156
- className: r.trigger,
157
- onClick: V,
158
- children: [
159
- f.length === 0 ? /* @__PURE__ */ C(
160
- Ze,
161
- {
162
- className: r.placeholderContainer,
163
- children: [
164
- /* @__PURE__ */ o(qe, { className: r.placeholderIcon, children: /* @__PURE__ */ o(ke, { src: /* @__PURE__ */ o(Fe, {}), color: "text.secondary" }) }),
165
- /* @__PURE__ */ o(
166
- He,
167
- {
168
- className: r.placeholder,
169
- variant: "bodyStandard",
170
- color: "text.disabled",
171
- children: ue ?? I(E.label_placeholder)
172
- }
173
- )
174
- ]
175
- }
176
- ) : /* @__PURE__ */ C(
177
- Je,
178
- {
179
- ref: we,
180
- className: r.cardsContainer,
181
- children: [
182
- Re.map((e) => /* @__PURE__ */ o(
183
- Q,
184
- {
185
- ref: (t) => K(e.id, t),
186
- className: r.deviceCardWrapper,
187
- children: /* @__PURE__ */ o(
188
- L,
189
- {
190
- deviceId: e.id,
191
- name: m(e),
192
- subtitle: p(e),
193
- icon: h(e),
194
- disableRemove: !s,
195
- onRemove: () => R(e),
196
- onClick: N,
197
- dataTestid: `${r.deviceCard}-${e.id}`
198
- }
199
- )
200
- },
201
- e.id
202
- )),
203
- n && // No lleva ref de medición a propósito: su ancho natural ya se
204
- // cacheó en la pasada inicial y aquí sale encogido, así que
205
- // registrarlo corrompería el cálculo del overflow.
206
- /* @__PURE__ */ o(
207
- Qe,
208
- {
209
- className: r.partialCardWrapper,
210
- children: /* @__PURE__ */ o(
211
- L,
212
- {
213
- deviceId: n.id,
214
- name: m(n),
215
- subtitle: p(n),
216
- icon: h(n),
217
- disableRemove: !s,
218
- onRemove: () => R(n),
219
- onClick: N,
220
- dataTestid: `${r.deviceCard}-${n.id}`
221
- }
222
- )
223
- },
224
- n.id
225
- )
226
- ]
227
- }
228
- ),
229
- u.length > 0 && /* @__PURE__ */ o(
230
- Xe,
231
- {
232
- className: r.measuringLayer,
233
- "aria-hidden": !0,
234
- children: u.map((e) => /* @__PURE__ */ o(
235
- Q,
236
- {
237
- ref: (t) => K(e.id, t),
238
- className: r.deviceCardWrapper,
239
- children: /* @__PURE__ */ o(
240
- L,
241
- {
242
- deviceId: e.id,
243
- name: m(e),
244
- subtitle: p(e),
245
- icon: h(e),
246
- disableRemove: !s
247
- }
248
- )
249
- },
250
- e.id
251
- ))
252
- }
253
- ),
254
- pe && U.length > 0 && /* @__PURE__ */ o(
255
- eo,
256
- {
257
- ref: Oe,
258
- ownerState: v,
259
- className: r.overflowToggle,
260
- dataTestId: r.overflowToggle,
261
- variant: "contained",
262
- color: "default",
263
- size: c,
264
- label: `+${U.length}`,
265
- onToggle: N
266
- }
267
- ),
268
- /* @__PURE__ */ o(
269
- oo,
270
- {
271
- ref: ye,
272
- className: r.chevronButton,
273
- dataTestId: r.chevronButton,
274
- icon: d ? /* @__PURE__ */ o(Ae, {}) : /* @__PURE__ */ o(Me, {}),
275
- variant: "text",
276
- size: c,
277
- disabled: _ || Y,
278
- "aria-label": I(E.label_open_panel),
279
- onClick: V
280
- }
281
- )
282
- ]
283
- }
284
- )
285
- }
286
- ),
287
- /* @__PURE__ */ o(
288
- X,
289
- {
290
- open: d,
291
- anchorEl: w.current,
292
- onClose: P,
293
- arrowType: "no-arrow",
294
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
295
- transformOrigin: { vertical: "top", horizontal: "right" },
296
- children: /* @__PURE__ */ o(
297
- to,
298
- {
299
- groups: De,
300
- items: Se,
301
- selectedIds: Ce,
302
- onSelectionChange: be,
303
- multiple: s,
304
- loading: G,
305
- searchable: fe,
306
- onSearchChange: ve,
307
- size: c,
308
- showDepartments: i.showDepartments,
309
- showIds: i.showIds,
310
- canShowDepartments: i.canShowDepartments,
311
- canShowIds: i.canShowIds,
312
- onToggleDepartments: i.toggleDepartments,
313
- onToggleIds: i.toggleIds
314
- }
315
- )
316
- }
317
- ),
318
- /* @__PURE__ */ o(
319
- X,
320
- {
321
- open: $,
322
- anchorEl: w.current,
323
- onClose: Te,
324
- arrowType: "no-arrow",
325
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
326
- transformOrigin: { vertical: -3, horizontal: "right" },
327
- children: /* @__PURE__ */ o(
328
- no,
329
- {
330
- devices: f,
331
- getOptionLabel: m,
332
- getDeviceSubtitle: p,
333
- getDeviceIcon: h,
334
- onRemove: R
335
- }
336
- )
337
- }
338
- )
339
- ] });
340
- }
341
- export {
342
- Eo as DevicesPicker
343
- };
@@ -1,3 +0,0 @@
1
- import { DevicesPickerStyles } from './types';
2
- export declare const devicesPickerStyles: DevicesPickerStyles;
3
- //# sourceMappingURL=DevicesPicker.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevicesPicker.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DevicesPicker/DevicesPicker.styles.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,mBAAmB,EAAE,mBAuejC,CAAC"}