@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.
- package/@types/types.d.ts +0 -8
- package/components/CheckableList/CheckableList.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.js +143 -163
- package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.styles.js +8 -20
- package/components/CheckableList/constants.d.ts +1 -1
- package/components/CheckableList/constants.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListRender.d.ts +1 -6
- package/components/CheckableList/hooks/useCheckableListRender.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListRender.js +113 -126
- package/components/CheckableList/slots/slots.d.ts +0 -1
- 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 +0 -3
- package/components/CheckableList/slots/styled.d.ts.map +1 -1
- package/components/CheckableList/slots/styled.js +51 -56
- package/components/CheckableList/types.d.ts +0 -20
- 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/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
- package/components/DynamicFilter/DynamicFilter.styles.js +33 -41
- package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts.map +1 -0
- package/{hooks/useChipsOverflow → components/DynamicFilter/hooks}/useChipsOverflow.d.ts +5 -6
- package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +1 -0
- package/components/DynamicFilter/hooks/useChipsOverflow.js +83 -0
- 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 +1 -9
- 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/datagrids/views/CardsView/CardsView.d.ts.map +1 -1
- package/components/extended/mui/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/components/extended/mui/Autocomplete/Autocomplete.js +52 -50
- package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.d.ts.map +1 -1
- package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.js +58 -60
- package/components/extended/mui/CheckBox/CheckBox.js +7 -7
- package/components/extended/mui/Select/Select.js +6 -6
- package/components/hook-form/index.d.ts +0 -3
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/index.d.ts +0 -1
- package/components/index.d.ts.map +1 -1
- package/index.d.ts +0 -2
- package/index.d.ts.map +1 -1
- package/index.js +760 -804
- package/package.json +8 -8
- package/components/DevicesPicker/DevicesPicker.d.ts +0 -14
- package/components/DevicesPicker/DevicesPicker.d.ts.map +0 -1
- package/components/DevicesPicker/DevicesPicker.js +0 -343
- package/components/DevicesPicker/DevicesPicker.styles.d.ts +0 -3
- package/components/DevicesPicker/DevicesPicker.styles.d.ts.map +0 -1
- package/components/DevicesPicker/DevicesPicker.styles.js +0 -494
- package/components/DevicesPicker/constants.d.ts +0 -74
- package/components/DevicesPicker/constants.d.ts.map +0 -1
- package/components/DevicesPicker/constants.js +0 -39
- package/components/DevicesPicker/dictionary.d.ts +0 -19
- package/components/DevicesPicker/dictionary.d.ts.map +0 -1
- package/components/DevicesPicker/dictionary.js +0 -20
- package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts +0 -11
- package/components/DevicesPicker/helpers/resolveDeviceGroup.d.ts.map +0 -1
- package/components/DevicesPicker/helpers/resolveDeviceGroup.js +0 -14
- package/components/DevicesPicker/helpers/toDeviceArray.d.ts +0 -7
- package/components/DevicesPicker/helpers/toDeviceArray.d.ts.map +0 -1
- package/components/DevicesPicker/helpers/toDeviceArray.js +0 -6
- package/components/DevicesPicker/hooks/types.d.ts +0 -176
- package/components/DevicesPicker/hooks/types.d.ts.map +0 -1
- package/components/DevicesPicker/hooks/useDeviceGroups.d.ts +0 -13
- package/components/DevicesPicker/hooks/useDeviceGroups.d.ts.map +0 -1
- package/components/DevicesPicker/hooks/useDeviceGroups.js +0 -51
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts +0 -13
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.d.ts.map +0 -1
- package/components/DevicesPicker/hooks/useDevicesAsyncOptions.js +0 -71
- package/components/DevicesPicker/hooks/useDevicesSelection.d.ts +0 -12
- package/components/DevicesPicker/hooks/useDevicesSelection.d.ts.map +0 -1
- package/components/DevicesPicker/hooks/useDevicesSelection.js +0 -26
- package/components/DevicesPicker/hooks/usePanelColumns.d.ts +0 -12
- package/components/DevicesPicker/hooks/usePanelColumns.d.ts.map +0 -1
- package/components/DevicesPicker/hooks/usePanelColumns.js +0 -30
- package/components/DevicesPicker/index.d.ts +0 -11
- package/components/DevicesPicker/index.d.ts.map +0 -1
- package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts +0 -77
- package/components/DevicesPicker/slots/DevicesPickerEnum.d.ts.map +0 -1
- package/components/DevicesPicker/slots/DevicesPickerEnum.js +0 -4
- package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts +0 -112
- package/components/DevicesPicker/slots/DevicesPickerSlots.d.ts.map +0 -1
- package/components/DevicesPicker/slots/DevicesPickerSlots.js +0 -163
- package/components/DevicesPicker/slots/index.d.ts +0 -3
- package/components/DevicesPicker/slots/index.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts +0 -8
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DeviceCard/DeviceCard.js +0 -77
- package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts +0 -3
- package/components/DevicesPicker/subcomponents/DeviceCard/index.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts +0 -42
- package/components/DevicesPicker/subcomponents/DeviceCard/types.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts +0 -11
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPanel/DevicesPanel.js +0 -133
- package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts +0 -3
- package/components/DevicesPicker/subcomponents/DevicesPanel/index.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts +0 -68
- package/components/DevicesPicker/subcomponents/DevicesPanel/types.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts +0 -10
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/DevicesPickerSkeleton.js +0 -35
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts +0 -3
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/index.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts +0 -11
- package/components/DevicesPicker/subcomponents/DevicesPickerSkeleton/types.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts +0 -11
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/SelectedDevicesList.js +0 -61
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts +0 -3
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/index.d.ts.map +0 -1
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts +0 -32
- package/components/DevicesPicker/subcomponents/SelectedDevicesList/types.d.ts.map +0 -1
- package/components/DevicesPicker/types.d.ts +0 -170
- package/components/DevicesPicker/types.d.ts.map +0 -1
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts +0 -21
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.d.ts.map +0 -1
- package/components/hook-form/RHFDevicesPicker/RHFDevicesPicker.js +0 -6
- package/components/hook-form/RHFDevicesPicker/index.d.ts +0 -3
- package/components/hook-form/RHFDevicesPicker/index.d.ts.map +0 -1
- package/components/hook-form/RHFDevicesPicker/types.d.ts +0 -8
- package/components/hook-form/RHFDevicesPicker/types.d.ts.map +0 -1
- package/components/hook-form/renderAsRegistry.d.ts +0 -33
- package/components/hook-form/renderAsRegistry.d.ts.map +0 -1
- package/components/hook-form/renderAsRegistry.js +0 -7
- package/helpers/resolveDeviceIconSrc/constants.d.ts +0 -14
- package/helpers/resolveDeviceIconSrc/constants.d.ts.map +0 -1
- package/helpers/resolveDeviceIconSrc/constants.js +0 -6
- package/helpers/resolveDeviceIconSrc/index.d.ts +0 -3
- package/helpers/resolveDeviceIconSrc/index.d.ts.map +0 -1
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts +0 -14
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.d.ts.map +0 -1
- package/helpers/resolveDeviceIconSrc/resolveDeviceIconSrc.js +0 -8
- package/helpers/resolveDeviceLabels/index.d.ts +0 -3
- package/helpers/resolveDeviceLabels/index.d.ts.map +0 -1
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts +0 -22
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.d.ts.map +0 -1
- package/helpers/resolveDeviceLabels/resolveDeviceLabels.js +0 -10
- package/helpers/resolveDeviceLabels/types.d.ts +0 -18
- package/helpers/resolveDeviceLabels/types.d.ts.map +0 -1
- package/hooks/useChipsOverflow/helpers/calculateVisibleChipsCount.d.ts.map +0 -1
- package/hooks/useChipsOverflow/helpers/index.d.ts +0 -2
- package/hooks/useChipsOverflow/helpers/index.d.ts.map +0 -1
- package/hooks/useChipsOverflow/index.d.ts +0 -3
- package/hooks/useChipsOverflow/index.d.ts.map +0 -1
- package/hooks/useChipsOverflow/types.d.ts +0 -24
- package/hooks/useChipsOverflow/types.d.ts.map +0 -1
- package/hooks/useChipsOverflow/useChipsOverflow.d.ts.map +0 -1
- package/hooks/useChipsOverflow/useChipsOverflow.js +0 -108
- /package/{hooks/useChipsOverflow → components/DynamicFilter}/helpers/calculateVisibleChipsCount.d.ts +0 -0
- /package/{hooks/useChipsOverflow → components/DynamicFilter}/helpers/calculateVisibleChipsCount.js +0 -0
|
@@ -1,494 +0,0 @@
|
|
|
1
|
-
import { getContrastTextColor as l } from "@m4l/graphics";
|
|
2
|
-
import { getTypographyStyles as p } from "../../utils/getTypographyStyles.js";
|
|
3
|
-
import { BUTTON_CLASSES as c } from "../extended/mui/Button/constants.js";
|
|
4
|
-
import { SWITCH_CLASSES as n } from "../extended/mui/Switch/constants.js";
|
|
5
|
-
import { CHECKABLE_LIST_CLASSES as o } from "../CheckableList/constants.js";
|
|
6
|
-
import { DEVICES_PICKER_WIDTH as d, DEVICES_PICKER_PANEL_WIDTH as g, DEVICES_PICKER_PANEL_LIST_HEIGHT as t, DEVICES_PICKER_SKELETON as b, DEVICES_PICKER_SELECTED_LIST_WIDTH as v, DEVICES_PICKER_CLASSES as s } from "./constants.js";
|
|
7
|
-
import { getSizeStyles as a } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
8
|
-
const m = {
|
|
9
|
-
/**
|
|
10
|
-
* root: Full-width wrapper. The overflow measurement reads its width, so it
|
|
11
|
-
* must not depend on how many cards are currently painted.
|
|
12
|
-
*/
|
|
13
|
-
root: () => ({
|
|
14
|
-
// El ancho definido es lo que ve un padre shrink-to-fit, así no crece con
|
|
15
|
-
// cada card. El mínimo sigue al padre cuando es mayor y se planta en el
|
|
16
|
-
// ancho base cuando es menor, para no deformarse al encoger la ventana.
|
|
17
|
-
width: d,
|
|
18
|
-
minWidth: `max(100%, ${d}px)`
|
|
19
|
-
}),
|
|
20
|
-
/**
|
|
21
|
-
* trigger: The visible row. It takes the full width of the field, as the
|
|
22
|
-
* master asks for the picker inside a form field, and what does not fit goes
|
|
23
|
-
* to the +N toggle, never to a silent clipping.
|
|
24
|
-
* The master paints no stroke and no fill at rest: only the two expanded
|
|
25
|
-
* surfaces paint it, in primary, and error replaces that tone. The stroke is
|
|
26
|
-
* kept transparent so turning it on never shifts the layout by a pixel.
|
|
27
|
-
*/
|
|
28
|
-
trigger: ({ theme: e, ownerState: i }) => ({
|
|
29
|
-
display: "inline-flex",
|
|
30
|
-
alignItems: "center",
|
|
31
|
-
width: "100%",
|
|
32
|
-
maxWidth: "100%",
|
|
33
|
-
gap: e.vars.size.baseSpacings["sp1-5"],
|
|
34
|
-
padding: e.vars.size.baseSpacings["sp0-5"],
|
|
35
|
-
borderRadius: e.vars.size.borderRadius.r2,
|
|
36
|
-
border: "1px solid transparent",
|
|
37
|
-
...(i?.panelOpen || i?.listOpen) && {
|
|
38
|
-
borderColor: e.vars.palette.primary.enabled
|
|
39
|
-
},
|
|
40
|
-
...i?.error && {
|
|
41
|
-
borderColor: e.vars.palette.error.enabled
|
|
42
|
-
},
|
|
43
|
-
...i?.disabled && {
|
|
44
|
-
opacity: 0.6,
|
|
45
|
-
pointerEvents: "none"
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
/**
|
|
49
|
-
* deviceCardWrapper: Carries the measuring ref of each card. inline-flex and
|
|
50
|
-
* flexShrink 0 keep its width equal to the card's natural width.
|
|
51
|
-
*/
|
|
52
|
-
deviceCardWrapper: () => ({
|
|
53
|
-
display: "inline-flex",
|
|
54
|
-
flexShrink: 0
|
|
55
|
-
}),
|
|
56
|
-
/**
|
|
57
|
-
* measuringLayer: Holds the cards whose width is still unknown. It is taken
|
|
58
|
-
* out of the layout so they can be measured without the row opening up for a
|
|
59
|
-
* frame, which is what made the +N jump on every addition.
|
|
60
|
-
*/
|
|
61
|
-
measuringLayer: () => ({
|
|
62
|
-
position: "fixed",
|
|
63
|
-
top: 0,
|
|
64
|
-
left: 0,
|
|
65
|
-
visibility: "hidden",
|
|
66
|
-
pointerEvents: "none",
|
|
67
|
-
display: "flex"
|
|
68
|
-
}),
|
|
69
|
-
/**
|
|
70
|
-
* partialCardWrapper: The card that does not fit whole. It is the only one
|
|
71
|
-
* allowed to shrink, so it takes the leftover space and truncates instead of
|
|
72
|
-
* leaving a gap next to the +N toggle.
|
|
73
|
-
*/
|
|
74
|
-
partialCardWrapper: () => ({
|
|
75
|
-
display: "inline-flex",
|
|
76
|
-
flexShrink: 1,
|
|
77
|
-
minWidth: 0,
|
|
78
|
-
[`& .${s.deviceCard}`]: {
|
|
79
|
-
flexShrink: 1,
|
|
80
|
-
minWidth: 0
|
|
81
|
-
}
|
|
82
|
-
}),
|
|
83
|
-
/**
|
|
84
|
-
* cardsContainer: Holds the cards that fit in the available space.
|
|
85
|
-
* overflow is hidden on purpose: the hidden ones are reported by the +N
|
|
86
|
-
* toggle, which is the only supported way to reach them.
|
|
87
|
-
*/
|
|
88
|
-
cardsContainer: ({ theme: e }) => ({
|
|
89
|
-
display: "flex",
|
|
90
|
-
alignItems: "center",
|
|
91
|
-
// Abraza las cards en lugar de estirarse: si se estira, el +N se va al
|
|
92
|
-
// borde y deja un hueco que parece sitio libre sin serlo.
|
|
93
|
-
flex: "0 1 auto",
|
|
94
|
-
minWidth: 0,
|
|
95
|
-
overflow: "hidden",
|
|
96
|
-
gap: e.vars.size.baseSpacings["sp1-5"]
|
|
97
|
-
}),
|
|
98
|
-
/**
|
|
99
|
-
* placeholderContainer: Leading icon plus placeholder text.
|
|
100
|
-
*/
|
|
101
|
-
placeholderContainer: ({ theme: e }) => ({
|
|
102
|
-
display: "flex",
|
|
103
|
-
alignItems: "center",
|
|
104
|
-
flex: "1 1 auto",
|
|
105
|
-
minWidth: 0,
|
|
106
|
-
gap: e.vars.size.baseSpacings.sp2
|
|
107
|
-
}),
|
|
108
|
-
/**
|
|
109
|
-
* placeholderIcon: Tinted box around the device icon, as in the master.
|
|
110
|
-
*/
|
|
111
|
-
placeholderIcon: ({ theme: e }) => ({
|
|
112
|
-
display: "flex",
|
|
113
|
-
alignItems: "center",
|
|
114
|
-
justifyContent: "center",
|
|
115
|
-
flexShrink: 0,
|
|
116
|
-
padding: e.vars.size.baseSpacings.sp1,
|
|
117
|
-
borderRadius: e.vars.size.borderRadius.r2,
|
|
118
|
-
backgroundColor: e.vars.palette.chips.default.contained.backgroundColor,
|
|
119
|
-
...a(e, "medium", "container", (i) => ({
|
|
120
|
-
width: i,
|
|
121
|
-
height: i
|
|
122
|
-
}))
|
|
123
|
-
}),
|
|
124
|
-
/**
|
|
125
|
-
* placeholder: Text shown when there is no selection.
|
|
126
|
-
*/
|
|
127
|
-
placeholder: ({ theme: e }) => ({
|
|
128
|
-
padding: `0 ${e.vars.size.baseSpacings.sp1}`,
|
|
129
|
-
whiteSpace: "nowrap"
|
|
130
|
-
}),
|
|
131
|
-
/**
|
|
132
|
-
* overflowToggle: ToggleButton with the number of hidden cards.
|
|
133
|
-
* Stretches to the full height of the cards row, as in the master, and turns
|
|
134
|
-
* primary while the selected-devices list is open.
|
|
135
|
-
*/
|
|
136
|
-
overflowToggle: ({ theme: e, ownerState: i }) => ({
|
|
137
|
-
flexShrink: 0,
|
|
138
|
-
alignSelf: "stretch",
|
|
139
|
-
height: "auto",
|
|
140
|
-
"&&": {
|
|
141
|
-
backgroundColor: i?.listOpen ? e.vars.palette.chips.primary.contained.backgroundColor : e.vars.palette.default.enabled
|
|
142
|
-
},
|
|
143
|
-
// El Button pinta su label con su propia tipografía; hay que ganarle.
|
|
144
|
-
[`&&&& .${c.textButton}`]: {
|
|
145
|
-
...p(
|
|
146
|
-
!!e.generalSettings?.isMobile,
|
|
147
|
-
i?.size || "medium",
|
|
148
|
-
"bodyDens"
|
|
149
|
-
),
|
|
150
|
-
...i?.listOpen && {
|
|
151
|
-
color: e.vars.palette.chips.primary.contained.color
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}),
|
|
155
|
-
/**
|
|
156
|
-
* chevronButton: Opens and closes the selection panel.
|
|
157
|
-
* The IconButton sets its own square size inside a `&&&` block, so it is
|
|
158
|
-
* centered in the row instead of stretched: stretching against that fixed
|
|
159
|
-
* height pins it to the top of the cross axis.
|
|
160
|
-
*/
|
|
161
|
-
chevronButton: ({ theme: e }) => ({
|
|
162
|
-
flexShrink: 0,
|
|
163
|
-
alignSelf: "center",
|
|
164
|
-
marginLeft: "auto",
|
|
165
|
-
borderRadius: e.vars.size.borderRadius["r1-5"]
|
|
166
|
-
}),
|
|
167
|
-
/**
|
|
168
|
-
* deviceCard: One selected device. Sits on top of the system Card, so only
|
|
169
|
-
* the layout of the internal slot is defined here: the master places it at
|
|
170
|
-
* 6px horizontal and 4px vertical, with the icon 6px from the text block.
|
|
171
|
-
* The width is reset because the system Card is full width by default and
|
|
172
|
-
* the trigger card has to hug its content.
|
|
173
|
-
*/
|
|
174
|
-
deviceCard: ({ theme: e }) => ({
|
|
175
|
-
display: "flex",
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
flexShrink: 0,
|
|
178
|
-
width: "auto",
|
|
179
|
-
gap: e.vars.size.baseSpacings["sp1-5"],
|
|
180
|
-
padding: `${e.vars.size.baseSpacings.sp1} ${e.vars.size.baseSpacings["sp1-5"]}`
|
|
181
|
-
}),
|
|
182
|
-
/**
|
|
183
|
-
* deviceCardIcon: Device icon wrapper inside the card.
|
|
184
|
-
*/
|
|
185
|
-
deviceCardIcon: ({ theme: e }) => ({
|
|
186
|
-
display: "flex",
|
|
187
|
-
alignItems: "center",
|
|
188
|
-
justifyContent: "center",
|
|
189
|
-
flexShrink: 0,
|
|
190
|
-
borderRadius: e.vars.size.borderRadius.r1,
|
|
191
|
-
...a(e, "medium", "container", (i) => ({
|
|
192
|
-
width: i,
|
|
193
|
-
height: i
|
|
194
|
-
}))
|
|
195
|
-
}),
|
|
196
|
-
/**
|
|
197
|
-
* deviceCardContent: Column with name, subtitle and id.
|
|
198
|
-
*/
|
|
199
|
-
deviceCardContent: () => ({
|
|
200
|
-
display: "flex",
|
|
201
|
-
flexDirection: "column",
|
|
202
|
-
minWidth: 0,
|
|
203
|
-
flex: "1 1 auto"
|
|
204
|
-
}),
|
|
205
|
-
/**
|
|
206
|
-
* deviceCardName: First line of the card.
|
|
207
|
-
* No line-height override on purpose: `bodyStandard` is 11px on a 1.5 ratio,
|
|
208
|
-
* which already lands on the 16px line box the master declares.
|
|
209
|
-
*/
|
|
210
|
-
deviceCardName: () => ({
|
|
211
|
-
whiteSpace: "nowrap"
|
|
212
|
-
}),
|
|
213
|
-
/**
|
|
214
|
-
* deviceCardSubtitle: Second line of the card (plate/alias).
|
|
215
|
-
*/
|
|
216
|
-
deviceCardSubtitle: () => ({
|
|
217
|
-
whiteSpace: "nowrap"
|
|
218
|
-
}),
|
|
219
|
-
/**
|
|
220
|
-
* deviceCardId: Third line of the card.
|
|
221
|
-
*/
|
|
222
|
-
deviceCardId: () => ({
|
|
223
|
-
whiteSpace: "nowrap"
|
|
224
|
-
}),
|
|
225
|
-
/**
|
|
226
|
-
* deviceCardRemove: Removes this device from the selection.
|
|
227
|
-
*/
|
|
228
|
-
deviceCardRemove: ({ theme: e, ownerState: i }) => ({
|
|
229
|
-
flexShrink: 0,
|
|
230
|
-
...a(e, i?.size || "medium", "base", (r) => ({
|
|
231
|
-
width: r,
|
|
232
|
-
height: r
|
|
233
|
-
}))
|
|
234
|
-
}),
|
|
235
|
-
/**
|
|
236
|
-
* panel: Selection panel surface. Fixed width taken from the Figma master;
|
|
237
|
-
* the height follows the content and the list scrolls inside.
|
|
238
|
-
*/
|
|
239
|
-
panel: ({ theme: e }) => ({
|
|
240
|
-
width: g,
|
|
241
|
-
display: "flex",
|
|
242
|
-
flexDirection: "column",
|
|
243
|
-
borderRadius: e.vars.size.borderRadius.r3,
|
|
244
|
-
// `clip` instead of `hidden`: hidden still leaves a scrollable area, so
|
|
245
|
-
// focusing a control inside could scroll the panel sideways.
|
|
246
|
-
overflowY: "hidden",
|
|
247
|
-
overflowX: "clip"
|
|
248
|
-
}),
|
|
249
|
-
/**
|
|
250
|
-
* panelHeader: Row with the "Ver departamentos" and "Ver ID" switches.
|
|
251
|
-
*/
|
|
252
|
-
panelHeader: ({ theme: e }) => ({
|
|
253
|
-
display: "flex",
|
|
254
|
-
alignItems: "center",
|
|
255
|
-
justifyContent: "space-between",
|
|
256
|
-
gap: e.vars.size.baseSpacings.sp2,
|
|
257
|
-
padding: e.vars.size.baseSpacings.sp2
|
|
258
|
-
}),
|
|
259
|
-
/**
|
|
260
|
-
* panelSwitch: Each column switch inside the panel header. The master wraps
|
|
261
|
-
* the label and the toggle in their own outlined pill, so the Switch root is
|
|
262
|
-
* given the stroke and the padding here. `r4` is the largest radius token and
|
|
263
|
-
* CSS clamps it to half the 28px height, which is what fully rounds the box.
|
|
264
|
-
*/
|
|
265
|
-
panelSwitch: ({ theme: e }) => ({
|
|
266
|
-
// Pinning the pills made the header wider than the fixed panel, and
|
|
267
|
-
// focusing a switch scrolled the whole panel sideways.
|
|
268
|
-
minWidth: 0,
|
|
269
|
-
height: e.vars.size.baseSpacings.sp7,
|
|
270
|
-
padding: `0 ${e.vars.size.baseSpacings.sp2}`,
|
|
271
|
-
borderRadius: e.vars.size.borderRadius.r4,
|
|
272
|
-
border: e.vars.size.borderStroke.container,
|
|
273
|
-
borderColor: e.vars.palette.border.disabled,
|
|
274
|
-
[`& .${n.label}`]: {
|
|
275
|
-
minWidth: 0,
|
|
276
|
-
overflow: "hidden",
|
|
277
|
-
textOverflow: "ellipsis",
|
|
278
|
-
whiteSpace: "nowrap"
|
|
279
|
-
},
|
|
280
|
-
[`& .${n.muiSwitch}`]: {
|
|
281
|
-
flexShrink: 0
|
|
282
|
-
}
|
|
283
|
-
}),
|
|
284
|
-
/**
|
|
285
|
-
* panelList: Wrapper of the CheckableList; caps the height so long fleets
|
|
286
|
-
* scroll instead of growing the popover past the viewport.
|
|
287
|
-
* The master draws no dividers inside the panel and no stroke around the
|
|
288
|
-
* search field, so both are cleared here instead of in the shared list.
|
|
289
|
-
*/
|
|
290
|
-
panelList: ({ theme: e }) => ({
|
|
291
|
-
display: "flex",
|
|
292
|
-
flexDirection: "column",
|
|
293
|
-
minHeight: 0,
|
|
294
|
-
height: t,
|
|
295
|
-
padding: e.vars.size.baseSpacings.sp1,
|
|
296
|
-
[`& .${o.selectAllContainer}`]: {
|
|
297
|
-
borderBottom: "none"
|
|
298
|
-
},
|
|
299
|
-
// Sin esto un nombre largo ensancha la fila en vez de recortarse: un flex
|
|
300
|
-
// item no encoge por debajo de su contenido salvo que se le permita.
|
|
301
|
-
[`& .${o.itemContentWrapper}`]: {
|
|
302
|
-
minWidth: 0
|
|
303
|
-
},
|
|
304
|
-
[`&&& .${o.searchInput} .MuiInputBase-root`]: {
|
|
305
|
-
border: "none",
|
|
306
|
-
// Sin borde el foco solo deja el halo suave; hay que devolverlo para que
|
|
307
|
-
// el TextField pinte su `primary.selected`.
|
|
308
|
-
"&:focus-within": {
|
|
309
|
-
border: e.vars.size.borderStroke.actionInput,
|
|
310
|
-
borderColor: e.vars.palette.primary.selected
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}),
|
|
314
|
-
/**
|
|
315
|
-
* rowName: Device name inside a panel row.
|
|
316
|
-
* Same as the card: the variant carries the master's line box, so no
|
|
317
|
-
* override is needed here either.
|
|
318
|
-
*/
|
|
319
|
-
rowName: () => ({
|
|
320
|
-
// El popover nunca hace scroll horizontal: lo que no cabe salta de renglón
|
|
321
|
-
// y la fila crece, porque TanStack mide su alto real.
|
|
322
|
-
whiteSpace: "normal",
|
|
323
|
-
overflowWrap: "anywhere"
|
|
324
|
-
}),
|
|
325
|
-
/**
|
|
326
|
-
* rowSubtitle: Device plate/alias inside a panel row.
|
|
327
|
-
*/
|
|
328
|
-
rowSubtitle: () => ({
|
|
329
|
-
whiteSpace: "normal",
|
|
330
|
-
overflowWrap: "anywhere"
|
|
331
|
-
}),
|
|
332
|
-
/**
|
|
333
|
-
* rowId: Device id inside a panel row.
|
|
334
|
-
*/
|
|
335
|
-
rowId: () => ({
|
|
336
|
-
whiteSpace: "normal",
|
|
337
|
-
overflowWrap: "anywhere"
|
|
338
|
-
}),
|
|
339
|
-
/**
|
|
340
|
-
* groupRow: Lays out the group header. The CheckableList drops custom group
|
|
341
|
-
* content into a plain block, so the flex row that separates the label from
|
|
342
|
-
* the count badge has to be provided here.
|
|
343
|
-
*/
|
|
344
|
-
groupRow: ({ theme: e }) => ({
|
|
345
|
-
display: "flex",
|
|
346
|
-
alignItems: "center",
|
|
347
|
-
justifyContent: "space-between",
|
|
348
|
-
gap: e.vars.size.baseSpacings.sp2
|
|
349
|
-
}),
|
|
350
|
-
/**
|
|
351
|
-
* groupLabel: Group header label inside the panel.
|
|
352
|
-
*/
|
|
353
|
-
groupLabel: () => ({
|
|
354
|
-
flex: 1,
|
|
355
|
-
minWidth: 0,
|
|
356
|
-
whiteSpace: "normal",
|
|
357
|
-
overflowWrap: "anywhere"
|
|
358
|
-
}),
|
|
359
|
-
/**
|
|
360
|
-
* groupBadge: Group count badge. The background comes from the department
|
|
361
|
-
* color when the endpoint provides it, same contract the geofences
|
|
362
|
-
* assignment already feeds into CheckableListGroup.color.
|
|
363
|
-
* The specificity bump is needed because Typography resolves its own color
|
|
364
|
-
* from the `color` prop, which defaults to text.primary.
|
|
365
|
-
*/
|
|
366
|
-
groupBadge: ({ theme: e, ownerState: i }) => ({
|
|
367
|
-
flexShrink: 0,
|
|
368
|
-
padding: `0 ${e.vars.size.baseSpacings.sp1}`,
|
|
369
|
-
borderRadius: e.vars.size.borderRadius.r3,
|
|
370
|
-
"&&": {
|
|
371
|
-
...i?.color ? {
|
|
372
|
-
backgroundColor: i.color,
|
|
373
|
-
color: l(i.color)
|
|
374
|
-
} : {
|
|
375
|
-
backgroundColor: e.vars.palette.action.hover,
|
|
376
|
-
color: e.vars.palette.text.secondary
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}),
|
|
380
|
-
/**
|
|
381
|
-
* selectedList: Surface of the selected-devices list, opened from the +N
|
|
382
|
-
* toggle. It is the only way to reach the cards that do not fit.
|
|
383
|
-
*/
|
|
384
|
-
selectedList: ({ theme: e }) => ({
|
|
385
|
-
width: v,
|
|
386
|
-
display: "flex",
|
|
387
|
-
flexDirection: "column",
|
|
388
|
-
borderRadius: e.vars.size.borderRadius.r3,
|
|
389
|
-
overflow: "hidden"
|
|
390
|
-
}),
|
|
391
|
-
/**
|
|
392
|
-
* selectedListHeader: Title row of the selected-devices list. The master
|
|
393
|
-
* groups the icon and the label on the left and pushes the count chip to
|
|
394
|
-
* the opposite edge.
|
|
395
|
-
*/
|
|
396
|
-
selectedListHeader: ({ theme: e }) => ({
|
|
397
|
-
display: "flex",
|
|
398
|
-
alignItems: "center",
|
|
399
|
-
justifyContent: "space-between",
|
|
400
|
-
gap: e.vars.size.baseSpacings.sp2,
|
|
401
|
-
padding: e.vars.size.baseSpacings.sp2
|
|
402
|
-
}),
|
|
403
|
-
/**
|
|
404
|
-
* selectedListTitle: Icon and label group at the start of the header.
|
|
405
|
-
*/
|
|
406
|
-
selectedListTitle: ({ theme: e }) => ({
|
|
407
|
-
display: "flex",
|
|
408
|
-
alignItems: "center",
|
|
409
|
-
minWidth: 0,
|
|
410
|
-
gap: e.vars.size.baseSpacings.sp2
|
|
411
|
-
}),
|
|
412
|
-
/**
|
|
413
|
-
* selectedListCount: Count chip at the end of the header.
|
|
414
|
-
*/
|
|
415
|
-
selectedListCount: () => ({
|
|
416
|
-
flexShrink: 0
|
|
417
|
-
}),
|
|
418
|
-
/**
|
|
419
|
-
* selectedListItems: Scrollable body of the selected-devices list.
|
|
420
|
-
*/
|
|
421
|
-
selectedListItems: ({ theme: e }) => ({
|
|
422
|
-
display: "flex",
|
|
423
|
-
flexDirection: "column",
|
|
424
|
-
gap: e.vars.size.baseSpacings["sp1-5"],
|
|
425
|
-
maxHeight: t,
|
|
426
|
-
overflowY: "auto",
|
|
427
|
-
padding: e.vars.size.baseSpacings.sp2,
|
|
428
|
-
// Aquí sí hay sitio para el texto entero: el recorte es cosa del trigger,
|
|
429
|
-
// donde la card compite por el ancho de la fila.
|
|
430
|
-
[`&& .${s.deviceCardName},
|
|
431
|
-
&& .${s.deviceCardSubtitle},
|
|
432
|
-
&& .${s.deviceCardId}`]: {
|
|
433
|
-
whiteSpace: "normal",
|
|
434
|
-
overflowWrap: "anywhere",
|
|
435
|
-
textOverflow: "clip"
|
|
436
|
-
}
|
|
437
|
-
}),
|
|
438
|
-
/**
|
|
439
|
-
* skeletonCard: Ghost row shown while the devices are loading. Keeps the
|
|
440
|
-
* trigger geometry so nothing jumps when the data arrives.
|
|
441
|
-
*/
|
|
442
|
-
skeletonCard: ({ theme: e }) => ({
|
|
443
|
-
display: "flex",
|
|
444
|
-
alignItems: "center",
|
|
445
|
-
width: "100%",
|
|
446
|
-
gap: e.vars.size.baseSpacings.sp2,
|
|
447
|
-
padding: e.vars.size.baseSpacings["sp0-5"]
|
|
448
|
-
}),
|
|
449
|
-
/**
|
|
450
|
-
* skeletonIcon: Ghost icon; same container size as the real device icon.
|
|
451
|
-
*/
|
|
452
|
-
skeletonIcon: ({ theme: e, ownerState: i }) => ({
|
|
453
|
-
flexShrink: 0,
|
|
454
|
-
// El Skeleton fuerza 100% en `&.MuiSkeleton-root`; hay que ganarle.
|
|
455
|
-
"&&.MuiSkeleton-root": {
|
|
456
|
-
borderRadius: e.vars.size.borderRadius.r2,
|
|
457
|
-
backgroundColor: e.vars.palette.skeleton.default,
|
|
458
|
-
...a(e, i?.size || "medium", "container", (r) => ({
|
|
459
|
-
width: r,
|
|
460
|
-
height: r
|
|
461
|
-
}))
|
|
462
|
-
}
|
|
463
|
-
}),
|
|
464
|
-
/**
|
|
465
|
-
* skeletonLine: Ghost text bar. `r4` is the largest radius token and CSS
|
|
466
|
-
* clamps it to half the height, which is the pill the master draws.
|
|
467
|
-
*/
|
|
468
|
-
skeletonLine: ({ theme: e }) => ({
|
|
469
|
-
flexShrink: 0,
|
|
470
|
-
"&&.MuiSkeleton-root": {
|
|
471
|
-
width: b.textLineWidth,
|
|
472
|
-
height: e.vars.size.baseSpacings["sp2-5"],
|
|
473
|
-
borderRadius: e.vars.size.borderRadius.r4,
|
|
474
|
-
backgroundColor: e.vars.palette.skeleton.default
|
|
475
|
-
}
|
|
476
|
-
}),
|
|
477
|
-
/**
|
|
478
|
-
* skeletonChevron: Ghost chevron; same base size as the real icons.
|
|
479
|
-
*/
|
|
480
|
-
skeletonChevron: ({ theme: e, ownerState: i }) => ({
|
|
481
|
-
flexShrink: 0,
|
|
482
|
-
"&&.MuiSkeleton-root": {
|
|
483
|
-
borderRadius: e.vars.size.borderRadius.r4,
|
|
484
|
-
backgroundColor: e.vars.palette.skeleton.default,
|
|
485
|
-
...a(e, i?.size || "medium", "base", (r) => ({
|
|
486
|
-
width: r,
|
|
487
|
-
height: r
|
|
488
|
-
}))
|
|
489
|
-
}
|
|
490
|
-
})
|
|
491
|
-
};
|
|
492
|
-
export {
|
|
493
|
-
m as devicesPickerStyles
|
|
494
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export declare const DEVICES_PICKER_KEY_COMPONENT = "M4LDevicesPicker";
|
|
2
|
-
export declare const DEVICES_PICKER_CLASSES: Record<"root" | "placeholder" | "panel" | "trigger" | "cardsContainer" | "placeholderContainer" | "placeholderIcon" | "overflowToggle" | "chevronButton" | "deviceCardWrapper" | "measuringLayer" | "partialCardWrapper" | "deviceCard" | "deviceCardIcon" | "deviceCardContent" | "deviceCardName" | "deviceCardSubtitle" | "deviceCardId" | "deviceCardRemove" | "panelHeader" | "panelSwitch" | "panelList" | "rowName" | "rowSubtitle" | "rowId" | "groupRow" | "groupLabel" | "groupBadge" | "selectedList" | "selectedListHeader" | "selectedListTitle" | "selectedListCount" | "selectedListItems" | "skeletonCard" | "skeletonIcon" | "skeletonLine" | "skeletonChevron", string>;
|
|
3
|
-
/**
|
|
4
|
-
* Base width of the picker: two cards plus the +N toggle and the chevron,
|
|
5
|
-
* taken from the master's Multiselect variant.
|
|
6
|
-
*/
|
|
7
|
-
export declare const DEVICES_PICKER_WIDTH = 440;
|
|
8
|
-
export declare const DEVICES_PICKER_ICON_SIZE = 31;
|
|
9
|
-
/**
|
|
10
|
-
* Fixed width of the selection panel (Popover).
|
|
11
|
-
* Situational measure taken from the Figma master; it is a layout decision,
|
|
12
|
-
* not a design token.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DEVICES_PICKER_PANEL_WIDTH = 320;
|
|
15
|
-
/**
|
|
16
|
-
* Fixed width of the selected-devices list opened from the +N toggle.
|
|
17
|
-
* Matches the selection panel: the names wrap instead of truncating here, and
|
|
18
|
-
* the master's narrower box left them breaking after a couple of words.
|
|
19
|
-
*/
|
|
20
|
-
export declare const DEVICES_PICKER_SELECTED_LIST_WIDTH = 320;
|
|
21
|
-
/**
|
|
22
|
-
* Height reserved for the list inside the panel.
|
|
23
|
-
* The CheckableList is virtualized and needs a measurable height; capping it
|
|
24
|
-
* here keeps long fleets scrolling instead of growing the popover past the
|
|
25
|
-
* viewport.
|
|
26
|
-
*/
|
|
27
|
-
export declare const DEVICES_PICKER_PANEL_LIST_HEIGHT = 320;
|
|
28
|
-
/**
|
|
29
|
-
* Group id used for devices with no department.
|
|
30
|
-
* It is rendered last so a selection is never hidden by the grouping.
|
|
31
|
-
*/
|
|
32
|
-
export declare const DEVICES_PICKER_DEFAULT_GROUP_ID = "default";
|
|
33
|
-
/**
|
|
34
|
-
* Row heights of the panel list.
|
|
35
|
-
*
|
|
36
|
-
* The CheckableList is virtualized and cannot measure its rows: it falls back
|
|
37
|
-
* to its own defaults, which assume one line (or two when the item carries a
|
|
38
|
-
* `description`). The picker rows carry two or three lines depending on the
|
|
39
|
-
* "Ver ID" switch, so the height must be declared or the rows overlap.
|
|
40
|
-
*
|
|
41
|
-
* The master reserves 56px for a three-line Item on a 4px inner padding; the
|
|
42
|
-
* shared CheckableList pads its rows with `sp1-5` (6px) instead, so the values
|
|
43
|
-
* here are the master's geometry plus that extra padding. Undershooting makes
|
|
44
|
-
* the rows overlap, so they err on the generous side.
|
|
45
|
-
*/
|
|
46
|
-
export declare const DEVICES_PICKER_ROW_HEIGHT: {
|
|
47
|
-
/** Name + plate: bodyStandard (16.5) + microSlim (15) + 12 of padding. */
|
|
48
|
-
readonly twoLines: 44;
|
|
49
|
-
/** Name + plate + id: adds a second microSlim line. */
|
|
50
|
-
readonly threeLines: 60;
|
|
51
|
-
/** Collapsible group header, a single bodyDens line. */
|
|
52
|
-
readonly group: 36;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Proportions of the loading skeleton bars, from the Figma master: the name bar
|
|
56
|
-
* takes 60-70% of the card width and the plate/id bar 40%.
|
|
57
|
-
* Only the proportions live here — every measurement of the skeleton (icon,
|
|
58
|
-
* chevron, bar height) comes from the size tokens, never from a literal.
|
|
59
|
-
*/
|
|
60
|
-
export declare const DEVICES_PICKER_SKELETON: {
|
|
61
|
-
/** Ghost text bar width, taken from the master's Skeleton variant. */
|
|
62
|
-
readonly textLineWidth: 140;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Keys owned by the async engine. They are consumed by DevicesPicker itself and
|
|
66
|
-
* must never reach the DOM or the presentational subcomponents.
|
|
67
|
-
*/
|
|
68
|
-
export declare const DEVICES_PICKER_ASYNC_ONLY_KEYS: readonly ["endPoint", "timeout", "parms", "resultField", "isRemote", "isExternalUrl", "responseToCamelCase", "shouldFetch"];
|
|
69
|
-
/**
|
|
70
|
-
* Placeholder shown when a device has no subtitle, so every card keeps the
|
|
71
|
-
* same height.
|
|
72
|
-
*/
|
|
73
|
-
export declare const DEVICES_PICKER_EMPTY_VALUE = "--";
|
|
74
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DevicesPicker/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAE/D,eAAO,MAAM,sBAAsB,2pBAGlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAQxC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,MAAM,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,YAAY,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB;IACpC,0EAA0E;;IAE1E,uDAAuD;;IAEvD,wDAAwD;;CAEhD,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;IAClC,sEAAsE;;CAE9D,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,8BAA8B,6HASjC,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,0BAA0B,OAAO,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { getComponentClasses as E } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { DevicesPickerSlots as _ } from "./slots/DevicesPickerEnum.js";
|
|
3
|
-
const I = "M4LDevicesPicker", e = E(
|
|
4
|
-
I,
|
|
5
|
-
_
|
|
6
|
-
), o = 440, s = 31, S = 320, n = 320, D = 320, P = "default", c = {
|
|
7
|
-
/** Name + plate: bodyStandard (16.5) + microSlim (15) + 12 of padding. */
|
|
8
|
-
twoLines: 44,
|
|
9
|
-
/** Name + plate + id: adds a second microSlim line. */
|
|
10
|
-
threeLines: 60,
|
|
11
|
-
/** Collapsible group header, a single bodyDens line. */
|
|
12
|
-
group: 36
|
|
13
|
-
}, i = {
|
|
14
|
-
/** Ghost text bar width, taken from the master's Skeleton variant. */
|
|
15
|
-
textLineWidth: 140
|
|
16
|
-
}, K = [
|
|
17
|
-
"endPoint",
|
|
18
|
-
"timeout",
|
|
19
|
-
"parms",
|
|
20
|
-
"resultField",
|
|
21
|
-
"isRemote",
|
|
22
|
-
"isExternalUrl",
|
|
23
|
-
"responseToCamelCase",
|
|
24
|
-
"shouldFetch"
|
|
25
|
-
], R = "--";
|
|
26
|
-
export {
|
|
27
|
-
K as DEVICES_PICKER_ASYNC_ONLY_KEYS,
|
|
28
|
-
e as DEVICES_PICKER_CLASSES,
|
|
29
|
-
P as DEVICES_PICKER_DEFAULT_GROUP_ID,
|
|
30
|
-
R as DEVICES_PICKER_EMPTY_VALUE,
|
|
31
|
-
s as DEVICES_PICKER_ICON_SIZE,
|
|
32
|
-
I as DEVICES_PICKER_KEY_COMPONENT,
|
|
33
|
-
D as DEVICES_PICKER_PANEL_LIST_HEIGHT,
|
|
34
|
-
S as DEVICES_PICKER_PANEL_WIDTH,
|
|
35
|
-
c as DEVICES_PICKER_ROW_HEIGHT,
|
|
36
|
-
n as DEVICES_PICKER_SELECTED_LIST_WIDTH,
|
|
37
|
-
i as DEVICES_PICKER_SKELETON,
|
|
38
|
-
o as DEVICES_PICKER_WIDTH
|
|
39
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const DEVICES_PICKER_DICTIONARY_ID = "devices_picker";
|
|
2
|
-
/**
|
|
3
|
-
* getDevicesPickerComponentsDictionary: Returns the dictionary ids used by the
|
|
4
|
-
* DevicesPicker component.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getDevicesPickerComponentsDictionary(): string[];
|
|
7
|
-
export declare const DICCTIONARY: {
|
|
8
|
-
readonly label_placeholder: "devices_picker.label_placeholder";
|
|
9
|
-
readonly label_show_departments: "devices_picker.label_show_departments";
|
|
10
|
-
readonly label_show_ids: "devices_picker.label_show_ids";
|
|
11
|
-
readonly label_search_placeholder: "devices_picker.label_search_placeholder";
|
|
12
|
-
readonly label_select_all: "devices_picker.label_select_all";
|
|
13
|
-
readonly label_default_department: "devices_picker.label_default_department";
|
|
14
|
-
readonly label_selected_title: "devices_picker.label_selected_title";
|
|
15
|
-
readonly label_open_panel: "devices_picker.label_open_panel";
|
|
16
|
-
readonly label_remove_device: "devices_picker.label_remove_device";
|
|
17
|
-
};
|
|
18
|
-
export type TypeDictionary = typeof DICCTIONARY;
|
|
19
|
-
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DevicesPicker/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,oCAAoC,aAEnD;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAUd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,OAAO,WAAW,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const e = "devices_picker";
|
|
2
|
-
function l() {
|
|
3
|
-
return [e];
|
|
4
|
-
}
|
|
5
|
-
const _ = {
|
|
6
|
-
label_placeholder: `${e}.label_placeholder`,
|
|
7
|
-
label_show_departments: `${e}.label_show_departments`,
|
|
8
|
-
label_show_ids: `${e}.label_show_ids`,
|
|
9
|
-
label_search_placeholder: `${e}.label_search_placeholder`,
|
|
10
|
-
label_select_all: `${e}.label_select_all`,
|
|
11
|
-
label_default_department: `${e}.label_default_department`,
|
|
12
|
-
label_selected_title: `${e}.label_selected_title`,
|
|
13
|
-
label_open_panel: `${e}.label_open_panel`,
|
|
14
|
-
label_remove_device: `${e}.label_remove_device`
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
e as DEVICES_PICKER_DICTIONARY_ID,
|
|
18
|
-
_ as DICCTIONARY,
|
|
19
|
-
l as getDevicesPickerComponentsDictionary
|
|
20
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DevicePickerGroupRef, DevicePickerOption } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Default group resolver for a device option.
|
|
4
|
-
* Accepts the department both as a plain name and as an object, because the
|
|
5
|
-
* devices endpoints in the workspace expose it in either shape: the geofences
|
|
6
|
-
* assignment consumes `{ id, name, color }` while the GPS history module
|
|
7
|
-
* receives it as a plain string. Returns null when the device has none, so the
|
|
8
|
-
* caller can place it in the default group.
|
|
9
|
-
*/
|
|
10
|
-
export declare function resolveDeviceGroup(option: DevicePickerOption): DevicePickerGroupRef | null;
|
|
11
|
-
//# sourceMappingURL=resolveDeviceGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDeviceGroup.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DevicesPicker/helpers/resolveDeviceGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAW5F;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,oBAAoB,GAAG,IAAI,CAkB7B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
function n(r) {
|
|
2
|
-
return typeof r == "object" && r !== null;
|
|
3
|
-
}
|
|
4
|
-
function t(r) {
|
|
5
|
-
const { department: e } = r;
|
|
6
|
-
return e ? n(e) ? {
|
|
7
|
-
id: e.id,
|
|
8
|
-
label: e.name,
|
|
9
|
-
color: e.color
|
|
10
|
-
} : { id: e, label: e } : null;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
t as resolveDeviceGroup
|
|
14
|
-
};
|