@m4l/components 9.3.6 → 9.3.7
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 +16 -0
- package/components/DataGrid/Datagrid.styles.js +1 -1
- package/components/DragResizeWindowRND/constants.d.ts +44 -0
- package/components/DragResizeWindowRND/constants.js +46 -1
- package/components/DragResizeWindowRND/index.d.ts +1 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +8 -4
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +3 -0
- package/components/DynamicSort/DynamicSort.styles.js +8 -4
- package/components/ImageText/ImageText.d.ts +7 -0
- package/components/ImageText/ImageText.js +62 -0
- package/components/ImageText/ImageText.styles.d.ts +2 -0
- package/components/ImageText/ImageText.styles.js +79 -0
- package/components/ImageText/constants.d.ts +16 -0
- package/components/ImageText/constants.js +10 -0
- package/components/ImageText/index.d.ts +1 -0
- package/components/ImageText/index.js +1 -0
- package/components/ImageText/slots/ImageTextEnum.d.ts +8 -0
- package/components/ImageText/slots/ImageTextEnum.js +12 -0
- package/components/ImageText/slots/ImageTextSlots.d.ts +18 -0
- package/components/ImageText/slots/ImageTextSlots.js +38 -0
- package/components/ImageText/types.d.ts +40 -0
- package/components/NoItemPrivileges/NoItemPrivileges.d.ts +7 -0
- package/components/NoItemPrivileges/NoItemPrivileges.js +33 -0
- package/components/NoItemPrivileges/NoItemPrivilegesStyles.d.ts +5 -0
- package/components/NoItemPrivileges/NoItemPrivilegesStyles.js +6 -0
- package/components/NoItemPrivileges/constants.d.ts +3 -0
- package/components/NoItemPrivileges/constants.js +10 -0
- package/components/NoItemPrivileges/dictionary.d.ts +5 -0
- package/components/NoItemPrivileges/dictionary.js +12 -0
- package/components/NoItemPrivileges/index.d.ts +3 -0
- package/components/NoItemPrivileges/index.js +1 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.d.ts +3 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.js +7 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.d.ts +3 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.js +12 -0
- package/components/NoItemPrivileges/test/NoItemPrivileges.test.d.ts +1 -0
- package/components/NoItemPrivileges/types.d.ts +36 -0
- package/components/NoItemSelected/NoItemSelected.js +16 -59
- package/components/NoItemSelected/NoItemSelected.styles.js +1 -100
- package/components/NoItemSelected/constant.d.ts +2 -2
- package/components/NoItemSelected/constant.js +4 -4
- package/components/NoItemSelected/dictionary.d.ts +0 -2
- package/components/NoItemSelected/dictionary.js +4 -3
- package/components/NoItemSelected/slots/NoItemSelectedEnum.d.ts +1 -7
- package/components/NoItemSelected/slots/NoItemSelectedEnum.js +0 -6
- package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +1 -19
- package/components/NoItemSelected/slots/NoItemSelectedSlots.js +5 -37
- package/components/NoItemSelected/test/NoItemSelected.test.d.ts +1 -0
- package/components/NoItemSelected/types.d.ts +5 -6
- package/components/ObjectLogs/helpers/Fields/filterFields.d.ts +5 -0
- package/components/ObjectLogs/helpers/Fields/filterFields.js +81 -0
- package/components/ObjectLogs/hooks/useDetailFormatter.js +2 -2
- package/components/ObjectLogs/hooks/useFilterAndSort.d.ts +15 -0
- package/components/ObjectLogs/hooks/useFilterAndSort.js +52 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +1 -2
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +39 -88
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +30 -104
- package/components/PropertyValue/PropertyValue.styles.js +1 -1
- package/components/SideBar/subcomponents/ContentComponent/style.js +3 -0
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +1 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -0
- package/components/hook-form/RHFTextField/RHFTextField.js +5 -3
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +63 -55
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
- package/components/index.d.ts +2 -0
- package/components/mui_extended/Autocomplete/Autocomplete.js +2 -1
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.d.ts +1 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +4 -2
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +1 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
- package/components/mui_extended/Tab/Tab.styles.js +7 -7
- package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
- package/components/mui_extended/TextField/TextField.js +13 -2
- package/components/mui_extended/TextField/TextField.styles.js +40 -3
- package/components/mui_extended/TextField/constants.d.ts +4 -0
- package/components/mui_extended/TextField/index.d.ts +1 -0
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +5 -1
- package/components/mui_extended/TextField/slots/TextFieldEnum.js +4 -0
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +18 -0
- package/components/mui_extended/TextField/slots/TextFieldSlots.js +22 -2
- package/components/mui_extended/TextField/types.d.ts +9 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/types.d.ts +2 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +5 -3
- package/hooks/useIsVisible/constants.d.ts +1 -0
- package/hooks/useIsVisible/constants.js +4 -0
- package/hooks/useIsVisible/index.d.ts +1 -0
- package/hooks/useIsVisible/index.js +1 -0
- package/hooks/useIsVisible/useIsVisible.d.ts +28 -0
- package/hooks/useIsVisible/useIsVisible.js +25 -0
- package/index.js +40 -30
- package/package.json +1 -1
- package/storybook/components/NoItemPrivileges/NoItemPrivileges.stories.d.ts +12 -0
- package/storybook/components/NoItemSelect/NoItemSelect.stories.d.ts +1 -1
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +7 -0
- package/storybook/hook-form/RHFTextField/RHFTextField.stories.d.ts +4 -0
- package/storybook/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.stories.d.ts +19 -0
- package/utils/getLimitCharacters/getLimitCharacters.d.ts +7 -0
- package/utils/getLimitCharacters/getLimitCharacters.js +11 -0
- package/utils/getLimitCharacters/index.d.ts +1 -0
- package/utils/getLimitCharacters/index.js +1 -0
- package/utils/getLimitCharacters/test/getLimitCharacters.test.d.ts +1 -0
- package/utils/getLimitCharacters/types.d.ts +11 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook para verificar si el contenedor debería ser visible en la pantalla.
|
|
3
|
+
* Cada vez que el contenedor cambia de tamaño, el hook revisa si su altura es al menos de 55 píxeles o mayor (o el valor que se le pasa como argumento).
|
|
4
|
+
* Si es lo suficientemente alta, dice "sí, está visible" (true), si no, dice "no, está demasiado pequeña" (false).
|
|
5
|
+
* El hook useIsVisible es esencial ya que tanto las consultas de contenedor (container queries) como las consultas de medios (media queries) en css
|
|
6
|
+
* solo responden a cambios en el eje X del contenedor. No obstante, en este escenario de desarrollo, necesitamos evaluar también el eje Y.
|
|
7
|
+
* @param containerRef - Referencia al contenedor del componente.
|
|
8
|
+
* @param minHeightThreshold - Umbral mínimo de altura en píxeles para considerar el contenedor como visible (por defecto: 55).
|
|
9
|
+
* @returns true si el contenedor debería ser visible, false en caso contrario.
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const MyComponent = () => {
|
|
13
|
+
* const containerRef = useRef<HTMLDivElement>(null);
|
|
14
|
+
* const isVisible = useIsVisible(containerRef, 100); // Visible solo si altura >= 100px
|
|
15
|
+
*
|
|
16
|
+
* return (
|
|
17
|
+
* <div ref={containerRef}>
|
|
18
|
+
* {isVisible ? (
|
|
19
|
+
* <img src="large-image.jpg" alt="Imagen grande" />
|
|
20
|
+
* ) : (
|
|
21
|
+
* <div>Contenedor demasiado pequeño para mostrar imagen</div>
|
|
22
|
+
* )}
|
|
23
|
+
* </div>
|
|
24
|
+
* );
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const useIsVisible: (containerRef: React.RefObject<HTMLDivElement>, minHeightThreshold?: number) => boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { D as DEFAULT_MIN_HEIGHT_THRESHOLD } from "./constants.js";
|
|
3
|
+
const useIsVisible = (containerRef, minHeightThreshold = DEFAULT_MIN_HEIGHT_THRESHOLD) => {
|
|
4
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const observer = new ResizeObserver((entries) => {
|
|
7
|
+
for (const entry of entries) {
|
|
8
|
+
const shouldBeVisible = entry.contentRect.height >= minHeightThreshold;
|
|
9
|
+
setIsVisible(shouldBeVisible);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
if (containerRef.current) {
|
|
13
|
+
observer.observe(containerRef.current);
|
|
14
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
15
|
+
setIsVisible(rect.height >= minHeightThreshold);
|
|
16
|
+
}
|
|
17
|
+
return () => {
|
|
18
|
+
observer.disconnect();
|
|
19
|
+
};
|
|
20
|
+
}, [containerRef]);
|
|
21
|
+
return isVisible;
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
useIsVisible as u
|
|
25
|
+
};
|
package/index.js
CHANGED
|
@@ -58,6 +58,7 @@ import { C as C13 } from "./components/DataGrid/formatters/ColumnChipStatusForma
|
|
|
58
58
|
import { u as u11 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js";
|
|
59
59
|
import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
|
|
60
60
|
import { d as d2 } from "./components/DragResizeWindowRND/classes/index.js";
|
|
61
|
+
import { W } from "./components/DragResizeWindowRND/constants.js";
|
|
61
62
|
import { g as g7 } from "./components/DynamicFilter/dictionary.js";
|
|
62
63
|
import { a as a5, g as g8 } from "./components/DynamicFilter/helpers/frontEndHelpers.js";
|
|
63
64
|
import { g as g9 } from "./components/DynamicFilter/helpers/getRawFiltersForNetwork.js";
|
|
@@ -163,9 +164,12 @@ import { a as a9, M as M3 } from "./components/MenuActions/MenuActions.js";
|
|
|
163
164
|
import { M as M4 } from "./components/MFIsolationApp/MFIsolationApp.js";
|
|
164
165
|
import { M as M5 } from "./components/MFLoader/MFLoader.js";
|
|
165
166
|
import { g as g24 } from "./components/MFLoader/dictionary.js";
|
|
167
|
+
import { I as I6 } from "./components/ImageText/ImageText.js";
|
|
166
168
|
import { N as N4 } from "./components/NoItemSelected/NoItemSelected.js";
|
|
167
169
|
import { g as g25 } from "./components/NoItemSelected/dictionary.js";
|
|
168
|
-
import {
|
|
170
|
+
import { N as N5 } from "./components/NoItemPrivileges/NoItemPrivileges.js";
|
|
171
|
+
import { g as g26 } from "./components/NoItemPrivileges/dictionary.js";
|
|
172
|
+
import { g as g27 } from "./components/ObjectLogs/dictionary.js";
|
|
169
173
|
import { O } from "./components/ObjectLogs/ObjectLogs.js";
|
|
170
174
|
import { P as P7 } from "./components/PaperForm/PaperForm.js";
|
|
171
175
|
import { P as P8 } from "./components/PDFViewer/PDFViewer.js";
|
|
@@ -178,26 +182,26 @@ import { S as S8 } from "./components/ScrollBar/ScrollBar.js";
|
|
|
178
182
|
import { S as S9 } from "./components/SideBar/SideBar.js";
|
|
179
183
|
import { T as T17 } from "./components/ToastContainer/ToastContainer.js";
|
|
180
184
|
import { T as T18 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
|
|
181
|
-
import { W } from "./components/WindowBase/WindowBase.js";
|
|
185
|
+
import { W as W2 } from "./components/WindowBase/WindowBase.js";
|
|
182
186
|
import { u as u14 } from "./components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
183
187
|
import { u as u15, a as a11 } from "./components/WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
184
|
-
import { M as M6, W as
|
|
188
|
+
import { M as M6, W as W3, a as a12 } from "./components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js";
|
|
185
189
|
import { c as c3 } from "./components/WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
186
190
|
import { D as D10, a as a13, M as M7 } from "./components/WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js";
|
|
187
|
-
import { W as
|
|
188
|
-
import { a as a14, g as
|
|
191
|
+
import { W as W4 } from "./components/WindowConfirm/WindowConfirm.js";
|
|
192
|
+
import { a as a14, g as g28 } from "./components/ModalDialog/dictionary.js";
|
|
189
193
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
190
194
|
import { S as S10 } from "./components/SettingsLayout/SettingsLayout.js";
|
|
191
195
|
import { P as P13 } from "./components/Pager/Pager.js";
|
|
192
196
|
import { F as F2, R as R23, u as u16 } from "./components/hook-form/RHFormContext/index.js";
|
|
193
|
-
import { g as
|
|
197
|
+
import { g as g29 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
194
198
|
import { u as u17 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
195
199
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
196
200
|
import { a as a15, M as M9 } from "./contexts/ModalContext/index.js";
|
|
197
201
|
import { u as u18 } from "./hooks/useFormAddEdit/index.js";
|
|
198
202
|
import { u as u19 } from "./hooks/useModal/index.js";
|
|
199
203
|
import { u as u20 } from "./hooks/useTab/index.js";
|
|
200
|
-
import { g as
|
|
204
|
+
import { g as g30 } from "./hooks/useFormAddEdit/dictionary.js";
|
|
201
205
|
import { u as u21 } from "./hooks/useFormFocus/index.js";
|
|
202
206
|
import { u as u22 } from "./hooks/useInterval/index.js";
|
|
203
207
|
import { u as u23 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
@@ -208,18 +212,19 @@ import { u as u26 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
|
208
212
|
import { u as u27 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
209
213
|
import { u as u28 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
210
214
|
import { u as u29 } from "./hooks/usePopoverContainer/usePopoverContainer.js";
|
|
215
|
+
import { u as u30 } from "./hooks/useIsVisible/useIsVisible.js";
|
|
211
216
|
import { c as c4 } from "./utils/capitalizeFirstLetter.js";
|
|
212
217
|
import { i as i2 } from "./utils/isValidDate.js";
|
|
213
|
-
import { g as
|
|
214
|
-
import { g as
|
|
215
|
-
import { g as
|
|
216
|
-
import { g as
|
|
217
|
-
import { a as a16, g as
|
|
218
|
+
import { g as g31 } from "./utils/getComponentUtilityClass.js";
|
|
219
|
+
import { g as g32 } from "./utils/getPaletteColor.js";
|
|
220
|
+
import { g as g33 } from "./utils/getTypographyStyles.js";
|
|
221
|
+
import { g as g34 } from "./utils/getIconColor.js";
|
|
222
|
+
import { a as a16, g as g35 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
218
223
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
219
|
-
import { g as
|
|
224
|
+
import { g as g36, a as a17 } from "./utils/getComponentSlotRoot.js";
|
|
220
225
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
221
|
-
import { g as
|
|
222
|
-
import { g as
|
|
226
|
+
import { g as g37 } from "./utils/getValidDate.js";
|
|
227
|
+
import { g as g38 } from "./utils/getNullGuard.js";
|
|
223
228
|
export {
|
|
224
229
|
A7 as AREAS_DICCTIONARY,
|
|
225
230
|
a3 as AREAS_DICTIONARY_ID,
|
|
@@ -287,6 +292,7 @@ export {
|
|
|
287
292
|
I as IconButtonAnimate,
|
|
288
293
|
I5 as Image,
|
|
289
294
|
I3 as ImageButton,
|
|
295
|
+
I6 as ImageText,
|
|
290
296
|
L2 as LABEL_FILTER_BUTTON,
|
|
291
297
|
L6 as Label,
|
|
292
298
|
L7 as LanguagePopover,
|
|
@@ -309,6 +315,7 @@ export {
|
|
|
309
315
|
M as MotionContainer,
|
|
310
316
|
M2 as MotionLazyContainer,
|
|
311
317
|
N2 as NavLink,
|
|
318
|
+
N5 as NoItemPrivileges,
|
|
312
319
|
N4 as NoItemSelected,
|
|
313
320
|
N as NumberEditor,
|
|
314
321
|
N3 as NumberInputStyled,
|
|
@@ -384,9 +391,10 @@ export {
|
|
|
384
391
|
T8 as Typography,
|
|
385
392
|
U as UncertaintyFormatter,
|
|
386
393
|
V as VariableSizeList,
|
|
387
|
-
W as
|
|
388
|
-
|
|
389
|
-
|
|
394
|
+
W as WINDOW_SIZES,
|
|
395
|
+
W2 as WindowBase,
|
|
396
|
+
W4 as WindowConfirm,
|
|
397
|
+
W3 as WindowToolsMFContext,
|
|
390
398
|
a12 as WindowToolsMFProvider,
|
|
391
399
|
c2 as addLayoutItemToBreakPointIfNoExists,
|
|
392
400
|
e2 as addLayoutItemToBreakPoints,
|
|
@@ -402,44 +410,45 @@ export {
|
|
|
402
410
|
b2 as getAreasComponentsDictionary,
|
|
403
411
|
g3 as getAreasDictionary,
|
|
404
412
|
g4 as getCommonActionsDictionary,
|
|
405
|
-
|
|
413
|
+
g36 as getComponentClasses,
|
|
406
414
|
a17 as getComponentSlotRoot,
|
|
407
|
-
|
|
415
|
+
g31 as getComponentUtilityClass,
|
|
408
416
|
g5 as getDataGridComponentsDictionary,
|
|
409
417
|
g6 as getDataGridRowsFromSet,
|
|
410
418
|
g17 as getDistanceToNowFormatterComponentsDictionary,
|
|
411
419
|
g7 as getDynamicFilterComponentsDictionary,
|
|
412
420
|
a6 as getDynamicSortComponentsDictionary,
|
|
413
421
|
a5 as getFilterGroupFieldsByName,
|
|
414
|
-
|
|
422
|
+
g29 as getFormComponentsDictionary,
|
|
415
423
|
g15 as getFormatConcatenated,
|
|
416
424
|
g12 as getFormatDate,
|
|
417
425
|
g14 as getFormatPoints,
|
|
418
426
|
g16 as getFormatPrice,
|
|
419
427
|
g18 as getFormattersComponentsDictionary,
|
|
420
428
|
a16 as getHeightSizeStyles,
|
|
421
|
-
|
|
429
|
+
g34 as getIconColor,
|
|
422
430
|
g8 as getIsIfInDynamicFilter,
|
|
423
431
|
g22 as getLoadingErrorComponentsDictionary,
|
|
424
432
|
g24 as getMFLoaderComponentsDictionary,
|
|
425
433
|
g23 as getMenuActionsComponentsDictionary,
|
|
426
434
|
a14 as getModalDialogComponentsDictionary,
|
|
427
|
-
|
|
435
|
+
g28 as getModalDictionary,
|
|
436
|
+
g26 as getNoItemPrivilegesComponentsDictionary,
|
|
428
437
|
g25 as getNoItemSelectedComponentsDictionary,
|
|
429
|
-
|
|
430
|
-
|
|
438
|
+
g38 as getNullGuard,
|
|
439
|
+
g27 as getObjectLogsComponentsDictionary,
|
|
431
440
|
g11 as getPagerComponentsDictionary,
|
|
432
|
-
|
|
441
|
+
g32 as getPaletteColor,
|
|
433
442
|
g21 as getPeriodComponetsDictionary,
|
|
434
443
|
g20 as getRHFAutocompleteAsyncComponentsDictionary,
|
|
435
444
|
g19 as getRHFAutocompleteComponentsDictionary,
|
|
436
445
|
g9 as getRawFiltersForNetwork,
|
|
437
446
|
g10 as getRawSortsForNetwork,
|
|
438
|
-
|
|
439
|
-
|
|
447
|
+
g35 as getSizeStyles,
|
|
448
|
+
g33 as getTypographyStyles,
|
|
440
449
|
g13 as getUncertaintyFormat,
|
|
441
|
-
|
|
442
|
-
|
|
450
|
+
g37 as getValidDate,
|
|
451
|
+
g30 as getformAddEditDictionary,
|
|
443
452
|
i as isEqualLayout,
|
|
444
453
|
k as isEqualLayouts,
|
|
445
454
|
i2 as isValidDate,
|
|
@@ -469,6 +478,7 @@ export {
|
|
|
469
478
|
u24 as useFormReadyForUpdate,
|
|
470
479
|
u12 as useFormatPeriod,
|
|
471
480
|
u22 as useInterval,
|
|
481
|
+
u30 as useIsVisible,
|
|
472
482
|
u19 as useModal,
|
|
473
483
|
u29 as usePopoverContainer,
|
|
474
484
|
u13 as usePopupsStore,
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { NoItemPrivileges } from '../../../src/components/NoItemPrivileges';
|
|
3
|
+
declare const meta: Meta<typeof NoItemPrivileges>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof NoItemPrivileges>;
|
|
6
|
+
/** Base component */
|
|
7
|
+
export declare const NoItemPrivilegesComponent: Story;
|
|
8
|
+
/**
|
|
9
|
+
* Version skeleton del componente
|
|
10
|
+
*/
|
|
11
|
+
export declare const Skeleton: Story;
|
|
12
|
+
export declare const WithSplitLayout: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { NoItemSelected } from '../../../src/components/NoItemSelected
|
|
2
|
+
import { NoItemSelected } from '../../../src/components/NoItemSelected';
|
|
3
3
|
declare const meta: Meta<typeof NoItemSelected>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof NoItemSelected>;
|
|
@@ -21,5 +21,12 @@ export declare const MultipleLines: Story;
|
|
|
21
21
|
* disabled
|
|
22
22
|
*/
|
|
23
23
|
export declare const WhitAdorment: Story;
|
|
24
|
+
/**
|
|
25
|
+
* Se aplica cuando el input tiene un limite de caracteres.
|
|
26
|
+
*/
|
|
27
|
+
export declare const WithMaxLength: Story;
|
|
28
|
+
/**
|
|
29
|
+
* Se aplica cuando el input tiene un skeleton.
|
|
30
|
+
*/
|
|
24
31
|
export declare const WithSkeleton: Story;
|
|
25
32
|
export default meta;
|
|
@@ -16,6 +16,10 @@ export declare const RHFTextFieldReadOnly: Story;
|
|
|
16
16
|
* endAdornment
|
|
17
17
|
*/
|
|
18
18
|
export declare const RHFTextFieldAdornment: Story;
|
|
19
|
+
/**
|
|
20
|
+
* Input con límite de caracteres.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RHFTextFieldMaxLength: Story;
|
|
19
23
|
export declare const RHFTextFieldError: Story;
|
|
20
24
|
export declare const SkeletonBase: Story;
|
|
21
25
|
export default meta;
|
|
@@ -2,7 +2,26 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { RHFTextFieldPassword } from '../../../src/components/hook-form/RHFTextFieldPassword';
|
|
3
3
|
declare const meta: Meta<typeof RHFTextFieldPassword>;
|
|
4
4
|
type Story = StoryObj<typeof RHFTextFieldPassword>;
|
|
5
|
+
/**
|
|
6
|
+
* Input con valor por defecto.
|
|
7
|
+
*/
|
|
5
8
|
export declare const RHFTextFieldPasswordDefault: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Input con límite de caracteres.
|
|
11
|
+
*
|
|
12
|
+
* maxLength
|
|
13
|
+
*/
|
|
14
|
+
export declare const RHFTextFieldPasswordMaxLength: Story;
|
|
15
|
+
/**
|
|
16
|
+
* Input con error.
|
|
17
|
+
*
|
|
18
|
+
* error
|
|
19
|
+
*/
|
|
6
20
|
export declare const RHFTextFieldPasswordError: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Input con skeleton.
|
|
23
|
+
*
|
|
24
|
+
* skeleton
|
|
25
|
+
*/
|
|
7
26
|
export declare const SkeletonBase: Story;
|
|
8
27
|
export default meta;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetLimitCharactersProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Obtiene el valor limitado de caracteres del campo de texto.
|
|
4
|
+
* @param props - Propiedades del campo de texto.
|
|
5
|
+
* @returns El valor limitado de caracteres del campo de texto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getLimitCharacters: (props: GetLimitCharactersProps) => unknown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const getLimitCharacters = (props) => {
|
|
2
|
+
const { limitCharacters, value } = props;
|
|
3
|
+
let finalValue = value;
|
|
4
|
+
if (limitCharacters && value) {
|
|
5
|
+
finalValue = value.toString().slice(0, limitCharacters);
|
|
6
|
+
}
|
|
7
|
+
return finalValue;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
getLimitCharacters as g
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getLimitCharacters } from './getLimitCharacters';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextFieldProps } from '../../components/mui_extended/TextField/types';
|
|
2
|
+
export interface GetLimitCharactersProps {
|
|
3
|
+
/**
|
|
4
|
+
* Límite de caracteres.
|
|
5
|
+
*/
|
|
6
|
+
limitCharacters?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Valor a limitar.
|
|
9
|
+
*/
|
|
10
|
+
value?: TextFieldProps['value'];
|
|
11
|
+
}
|