@m4l/components 9.2.63 → 9.2.65-JT17072025.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +8 -0
- package/components/AppBar/AppBar.js +12 -10
- package/components/AppBar/constants.d.ts +1 -1
- package/components/AppBar/constants.js +1 -1
- package/components/AppBar/slots/AppBarEnum.d.ts +1 -5
- package/components/AppBar/slots/AppBarEnum.js +0 -4
- package/components/AppBar/slots/AppBarSlots.d.ts +4 -18
- package/components/AppBar/slots/AppBarSlots.js +3 -27
- package/components/AppBar/styles.js +0 -42
- package/components/AppBar/types.d.ts +8 -0
- package/components/Chip/ChipStyles.js +1 -1
- package/components/ContainerFlow/ContainerFlow.d.ts +7 -0
- package/components/ContainerFlow/ContainerFlow.js +25 -0
- package/components/ContainerFlow/ContainerFlow.styles.d.ts +2 -0
- package/components/ContainerFlow/ContainerFlow.styles.js +46 -0
- package/components/ContainerFlow/constants.d.ts +9 -0
- package/components/ContainerFlow/constants.js +21 -0
- package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.d.ts +7 -0
- package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.js +10 -0
- package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.test.d.ts +1 -0
- package/components/ContainerFlow/index.d.ts +2 -0
- package/components/ContainerFlow/index.js +1 -0
- package/components/ContainerFlow/slots/ContainerFlowEnum.d.ts +4 -0
- package/components/ContainerFlow/slots/ContainerFlowEnum.js +8 -0
- package/components/ContainerFlow/slots/ContainerFlowSlots.d.ts +6 -0
- package/components/ContainerFlow/slots/ContainerFlowSlots.js +16 -0
- package/components/ContainerFlow/slots/index.d.ts +0 -0
- package/components/ContainerFlow/tests/ContainerFlow.test.d.ts +1 -0
- package/components/ContainerFlow/types.d.ts +41 -0
- package/components/DataGrid/Datagrid.styles.js +95 -8
- package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js +2 -3
- package/components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js +5 -4
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js +11 -4
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/formatter.js +13 -4
- package/components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +2 -2
- package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +4 -3
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.js +13 -5
- package/components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.js +11 -4
- package/components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.d.ts +2 -2
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js +15 -6
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.d.ts +1 -1
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +4 -5
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +15 -6
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +13 -5
- package/components/DataGrid/subcomponents/Table/index.d.ts +3 -1
- package/components/DataGrid/subcomponents/Table/index.js +38 -9
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +10 -8
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +7 -7
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +15 -5
- package/components/DataGrid/types.d.ts +9 -4
- package/components/Image/Image.js +4 -2
- package/components/Image/image.styles.js +6 -3
- package/components/Image/types.d.ts +5 -0
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/PropertyValue/PropertyValue.styles.js +1 -1
- package/components/SideBar/SideBar.js +6 -2
- package/components/SideBar/constants.d.ts +8 -6
- package/components/SideBar/constants.js +8 -8
- package/components/SideBar/context/sideBarContext/index.js +9 -10
- package/components/SideBar/context/sideBarContext/types.d.ts +2 -10
- package/components/SideBar/slots/SideBarEnum.d.ts +8 -7
- package/components/SideBar/slots/SideBarEnum.js +6 -5
- package/components/SideBar/slots/SideBarSlots.d.ts +12 -9
- package/components/SideBar/slots/SideBarSlots.js +36 -28
- package/components/SideBar/styles.js +3 -3
- package/components/SideBar/subcomponents/ContentComponent/index.js +12 -68
- package/components/SideBar/subcomponents/ContentComponent/style.js +134 -107
- package/components/SideBar/subcomponents/{Promotion → FooterComponent}/index.d.ts +1 -1
- package/components/SideBar/subcomponents/{Promotion → FooterComponent}/index.js +4 -4
- package/components/SideBar/subcomponents/{Promotion → FooterComponent}/styles.js +8 -2
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +37 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.js +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.js +40 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +4 -3
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +4 -32
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.js +4 -3
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +112 -2
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +7 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +12 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +4 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +9 -7
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +1 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +11 -6
- package/components/SideBar/types.d.ts +12 -7
- package/components/commercial/HamburgerMenu/HamburgerMenu.js +1 -2
- package/components/hook-form/RHFPeriod/subcomponents/Period/Period.js +4 -4
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.d.ts +1 -1
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +7 -6
- package/components/index.d.ts +1 -0
- package/components/mui_extended/Accordion/styles.js +3 -5
- package/components/mui_extended/MenuItem/MenuItem.js +3 -2
- package/components/mui_extended/MenuItem/types.d.ts +4 -0
- package/components/mui_extended/TabContent/TabContent.js +2 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +4 -1
- package/components/mui_extended/TabContent/constants.d.ts +1 -0
- package/components/mui_extended/TabContent/constants.js +2 -0
- package/components/mui_extended/TabContent/types.d.ts +13 -1
- package/components/mui_extended/Typography/Typography.js +3 -1
- package/components/mui_extended/Typography/types.d.ts +5 -0
- package/components/mui_extended/Typography/typography.styles.js +7 -1
- package/index.js +32 -30
- package/package.json +2 -2
- package/storybook/components/ContainerFlow/ContainerFlow.stories.d.ts +32 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn1Wrappers/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn2Wrappers/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn3Wrappers/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexWrap/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/subcomponents/RenderGridLayout/index.d.ts +5 -0
- package/storybook/components/ContainerFlow/wrapperItems/index.d.ts +10 -0
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +3 -2
- package/storybook/components/SideBar/SideBar.stories.d.ts +5 -11
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +14 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +1 -0
- package/utils/getSizeStyles/getSizeStyles.d.ts +1 -1
- package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +0 -6
- package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/HeaderSidebar/styles.js +0 -24
- package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +0 -5
- package/helpers/getFieldValueWithRow.js +0 -10
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +0 -1
- /package/components/SideBar/subcomponents/{Promotion → FooterComponent}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{Promotion → FooterComponent}/types.d.ts +0 -0
- /package/storybook/components/SideBar/subcomponents/{FooterPromotion → FooterComponentHost}/constants.d.ts +0 -0
|
@@ -221,7 +221,14 @@ const dataGridStyles = {
|
|
|
221
221
|
verticalAlign: "top",
|
|
222
222
|
textAlign: "right",
|
|
223
223
|
fontFamily: "inherit",
|
|
224
|
+
background: "transparent",
|
|
224
225
|
"&:focus": {
|
|
226
|
+
outline: "none",
|
|
227
|
+
border: "none",
|
|
228
|
+
boxShadow: "none"
|
|
229
|
+
},
|
|
230
|
+
"&:hover": {
|
|
231
|
+
border: "none",
|
|
225
232
|
outline: "none"
|
|
226
233
|
},
|
|
227
234
|
"&::placeholder": {
|
|
@@ -263,6 +270,9 @@ const dataGridStyles = {
|
|
|
263
270
|
border: theme.vars.size.borderStroke.container,
|
|
264
271
|
borderColor: theme.vars.palette?.border.secondary,
|
|
265
272
|
"& .rdg ": {
|
|
273
|
+
display: "grid",
|
|
274
|
+
contain: "content",
|
|
275
|
+
boxSizing: "border-box",
|
|
266
276
|
border: "none",
|
|
267
277
|
background: theme.vars.palette.background.default,
|
|
268
278
|
gridColumnGap: theme.vars.size.baseSpacings.sp0,
|
|
@@ -291,6 +301,19 @@ const dataGridStyles = {
|
|
|
291
301
|
boxShadow: `inset 0 0.5px 0 0 ${theme.vars.palette?.border.secondary}`
|
|
292
302
|
}
|
|
293
303
|
},
|
|
304
|
+
"&.MeasuringCell": {
|
|
305
|
+
contain: "strict",
|
|
306
|
+
gridRow: "1",
|
|
307
|
+
visibility: "hidden"
|
|
308
|
+
},
|
|
309
|
+
"&::before": {
|
|
310
|
+
content: "''",
|
|
311
|
+
gridColumn: "1/-1",
|
|
312
|
+
gridRow: "1/-1"
|
|
313
|
+
},
|
|
314
|
+
'& [role="row"], & .rdg-row, & .rdg-header-row, & .rdg-summary-row': {
|
|
315
|
+
display: "contents"
|
|
316
|
+
},
|
|
294
317
|
'& [role="columnheader"]': {
|
|
295
318
|
justifyContent: "center",
|
|
296
319
|
alignItems: "center",
|
|
@@ -306,6 +329,13 @@ const dataGridStyles = {
|
|
|
306
329
|
}
|
|
307
330
|
},
|
|
308
331
|
"& .rdg-row": {
|
|
332
|
+
display: "contents",
|
|
333
|
+
'&[aria-selected="true"]': {
|
|
334
|
+
backgroundColor: theme.vars.palette.primary.toneOpacity,
|
|
335
|
+
"&:hover": {
|
|
336
|
+
backgroundColor: theme.vars.palette.primary.toneOpacity
|
|
337
|
+
}
|
|
338
|
+
},
|
|
309
339
|
"& .rdg-cell": {
|
|
310
340
|
backgroundColor: theme.vars.palette.background.default
|
|
311
341
|
},
|
|
@@ -329,18 +359,29 @@ const dataGridStyles = {
|
|
|
329
359
|
backgroundColor: "transparent"
|
|
330
360
|
},
|
|
331
361
|
"& .rdg-cell": {
|
|
362
|
+
overflow: "clip",
|
|
363
|
+
position: "sticky",
|
|
364
|
+
outline: "none",
|
|
332
365
|
color: theme.vars.palette.text.primary,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
366
|
+
paddingBlock: 0,
|
|
367
|
+
paddingInline: "8px",
|
|
368
|
+
borderInlineEnd: "1px solid var(--rdg-border-color)",
|
|
369
|
+
borderBlockEnd: "1px solid var(--rdg-border-color)",
|
|
370
|
+
gridRowStart: "var(--rdg-grid-row-start)",
|
|
371
|
+
alignContent: "center",
|
|
372
|
+
backgroundColor: "inherit",
|
|
373
|
+
whiteSpace: "nowrap",
|
|
374
|
+
textOverflow: "ellipsis",
|
|
338
375
|
...getTypographyStyles(
|
|
339
376
|
theme.generalSettings.isMobile,
|
|
340
377
|
ownerState?.size || "medium",
|
|
341
378
|
"body"
|
|
342
379
|
),
|
|
343
380
|
lineHeight: "var(--rdg-row-height)!important",
|
|
381
|
+
'&[aria-selected="true"]': {
|
|
382
|
+
outline: `2px solid var(--rdg-selection-color)`,
|
|
383
|
+
outlineOffset: "-2px"
|
|
384
|
+
},
|
|
344
385
|
"& .checkbox-checked": {
|
|
345
386
|
"& path:first-of-type": {
|
|
346
387
|
fill: theme.vars.palette.primary.main
|
|
@@ -400,6 +441,16 @@ const dataGridStyles = {
|
|
|
400
441
|
},
|
|
401
442
|
"& .m4l_icon": {
|
|
402
443
|
height: "100%"
|
|
444
|
+
},
|
|
445
|
+
'&[role="columnheader"]': {
|
|
446
|
+
position: "sticky",
|
|
447
|
+
top: 0,
|
|
448
|
+
zIndex: 2,
|
|
449
|
+
justifyContent: "center",
|
|
450
|
+
alignItems: "center",
|
|
451
|
+
'&[aria-colindex="1"]': {
|
|
452
|
+
borderTopLeftRadius: theme.vars.size.baseSpacings.sp2
|
|
453
|
+
}
|
|
403
454
|
}
|
|
404
455
|
},
|
|
405
456
|
'& .rdg-cell[role="columnheader"] .rdg-header-sort-name': {
|
|
@@ -495,7 +546,16 @@ const dataGridStyles = {
|
|
|
495
546
|
borderColor: theme.vars.palette.background.surface
|
|
496
547
|
},
|
|
497
548
|
"& .rdg-header-row": {
|
|
498
|
-
|
|
549
|
+
display: "contents",
|
|
550
|
+
backgroundColor: theme.vars.palette.background.base,
|
|
551
|
+
fontWeight: "bold",
|
|
552
|
+
"& > .rdg-cell": {
|
|
553
|
+
zIndex: 2,
|
|
554
|
+
position: "sticky"
|
|
555
|
+
},
|
|
556
|
+
"& > .rdg-cell.rdg-cell-frozen": {
|
|
557
|
+
zIndex: 3
|
|
558
|
+
}
|
|
499
559
|
},
|
|
500
560
|
// Estilado de celdas de la cabecera
|
|
501
561
|
"& .rdg-header-row .rdg-cell": {
|
|
@@ -504,9 +564,13 @@ const dataGridStyles = {
|
|
|
504
564
|
boxShadow: "unset!important",
|
|
505
565
|
borderBottom: theme.vars.size.borderStroke.container,
|
|
506
566
|
borderColor: `${theme.vars.palette?.background.surface}!important`,
|
|
567
|
+
cursor: "pointer",
|
|
507
568
|
"&:hover": {
|
|
508
569
|
boxShadow: `inset 1px 0 0 0 ${theme.vars.palette?.border.default}, inset -1px 0 0 0 ${theme.vars.palette?.border.default}!important `
|
|
509
570
|
},
|
|
571
|
+
"&[data-resize]": {
|
|
572
|
+
touchAction: "none"
|
|
573
|
+
},
|
|
510
574
|
'& [draggable="true"]': {
|
|
511
575
|
fontSize: theme.typography.body
|
|
512
576
|
},
|
|
@@ -528,6 +592,15 @@ const dataGridStyles = {
|
|
|
528
592
|
// Modificar el tamaño de la flecha
|
|
529
593
|
"& .rdg-sort-arrow": {}
|
|
530
594
|
},
|
|
595
|
+
// Estilo específico para el resize handle generado por react-data-grid
|
|
596
|
+
'& [class*="r1y6ywlx"]': {
|
|
597
|
+
cursor: "col-resize",
|
|
598
|
+
position: "absolute",
|
|
599
|
+
insetBlockStart: 0,
|
|
600
|
+
insetInlineEnd: 0,
|
|
601
|
+
insetBlockEnd: 0,
|
|
602
|
+
inlineSize: "10px"
|
|
603
|
+
},
|
|
531
604
|
// Estilado de la ultima celda Header
|
|
532
605
|
"& .rdg-header-row :last-child.rdg-cell": {
|
|
533
606
|
borderTopRightRadius: theme.vars.size.baseSpacings.sp0,
|
|
@@ -576,6 +649,7 @@ const dataGridStyles = {
|
|
|
576
649
|
alignItems: "center",
|
|
577
650
|
backgroundColor: theme.vars.palette.default.enabled,
|
|
578
651
|
padding: theme.vars.size.baseSpacings.sp1,
|
|
652
|
+
marginBottom: theme.vars.size.baseSpacings.sp2,
|
|
579
653
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
580
654
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
581
655
|
...getSizeStyles(theme, ownerState?.size || "medium", "action", (size) => ({
|
|
@@ -664,11 +738,24 @@ const dataGridStyles = {
|
|
|
664
738
|
/**
|
|
665
739
|
* Estilos para el contenedor del boton de acciones del header
|
|
666
740
|
*/
|
|
667
|
-
buttonHeaderActions: () => ({
|
|
741
|
+
buttonHeaderActions: ({ theme }) => ({
|
|
668
742
|
display: "flex",
|
|
669
743
|
alignItems: "center",
|
|
670
744
|
justifyContent: "space-between",
|
|
671
|
-
width: "100%"
|
|
745
|
+
width: "100%",
|
|
746
|
+
cursor: "pointer",
|
|
747
|
+
height: "100%",
|
|
748
|
+
"> span": {
|
|
749
|
+
display: "flex",
|
|
750
|
+
alignItems: "center",
|
|
751
|
+
justifyContent: "space-between",
|
|
752
|
+
width: "100%",
|
|
753
|
+
"& svg": {
|
|
754
|
+
width: "8px",
|
|
755
|
+
height: "8px",
|
|
756
|
+
color: theme.vars.palette.chips.default.contained.backgroundColorTone
|
|
757
|
+
}
|
|
758
|
+
}
|
|
672
759
|
}),
|
|
673
760
|
/**
|
|
674
761
|
* Estilos para el formatter de iconos
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnBooleanFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Función para formatear un booleano en una columna de un DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnBooleanFormatter<TRow>(props: ColumnBooleanFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnBooleanFormatter<TRow>(props: ColumnBooleanFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/BooleanFormatter.js";
|
|
6
5
|
function ColumnBooleanFormatter(props) {
|
|
7
6
|
const { fieldValue, presentationType, Component = React.Fragment } = props;
|
|
8
|
-
return (
|
|
9
|
-
const valueMaybeString = getPropertyByString(
|
|
7
|
+
return (renderProps) => {
|
|
8
|
+
const valueMaybeString = getPropertyByString(renderProps.row, fieldValue);
|
|
10
9
|
let fixedValue;
|
|
11
10
|
if (typeof valueMaybeString === "boolean") {
|
|
12
11
|
fixedValue = valueMaybeString;
|
|
@@ -3,7 +3,7 @@ import { ColumnBooleanFormatterProps } from './types';
|
|
|
3
3
|
* Hook function that return the formatter, filter and customSort for a boolean column
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnBoolean: <TRow>(props: ColumnBooleanFormatterProps<TRow>) => {
|
|
6
|
-
formatter: (
|
|
6
|
+
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
customFilter: (row: TRow, value: string) => boolean;
|
|
8
8
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
9
9
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ColumnChipStatusFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Formatter para mostrar un chip de estado en una columna de un DataGrid
|
|
4
5
|
* @param props - Propiedades del formatter
|
|
5
6
|
* @returns Componente ChipStatusFormatter
|
|
6
7
|
*/
|
|
7
|
-
export declare const ColumnChipStatusFormatter: (props: ColumnChipStatusFormatterProps<
|
|
8
|
+
export declare const ColumnChipStatusFormatter: <TRow>(props: ColumnChipStatusFormatterProps<TRow>) => (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
4
3
|
import { C as ChipStatusFormatterColumnWrapperStyled } from "../../../formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.js";
|
|
5
4
|
import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
|
|
6
5
|
import { C as ChipStatusFormatter } from "../../../formatters/ChipStatusFormatter/ChipStatusFormatter.js";
|
|
7
6
|
const ColumnChipStatusFormatter = (props) => {
|
|
8
7
|
const { fieldStatus, fieldLabel, statusesColors, fallbackColor } = props;
|
|
9
|
-
return (
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
return (renderProps) => {
|
|
9
|
+
const cleanFieldStatus = fieldStatus.toString().startsWith("row.") ? fieldStatus.toString().substring(4) : fieldStatus.toString();
|
|
10
|
+
const cleanFieldLabel = typeof fieldLabel === "string" && fieldLabel.startsWith("row.") ? fieldLabel.substring(4) : fieldLabel;
|
|
11
|
+
const status = getNullGuard(getPropertyByString(renderProps.row, cleanFieldStatus));
|
|
12
|
+
const label = typeof cleanFieldLabel === "string" ? getNullGuard(getPropertyByString(renderProps.row, cleanFieldLabel)) : typeof fieldLabel === "function" ? fieldLabel(renderProps.row, status) : "";
|
|
12
13
|
return /* @__PURE__ */ jsx(
|
|
13
14
|
ChipStatusFormatter,
|
|
14
15
|
{
|
|
@@ -3,7 +3,7 @@ import { ColumnChipStatusFormatterProps } from './types';
|
|
|
3
3
|
* Funcion helper que retorna el formatter, filter y customSort de la columna concatenada.
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnChipStatus: <TRow>(props: ColumnChipStatusFormatterProps<TRow>) => {
|
|
6
|
-
formatter: (
|
|
6
|
+
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
customFilter: (row: TRow, value: string | number) => boolean;
|
|
8
8
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
9
9
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnConcatenatedValuesFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Function to DataGrid that concatenates an array of strings
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnConcatenatedValuesFormatter<TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnConcatenatedValuesFormatter<TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
import { C as ConcatenatedFormatter } from "../../../formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
6
5
|
function ColumnConcatenatedValuesFormatter(props) {
|
|
7
6
|
const { fieldValue, fieldSeparator, Component = React.Fragment } = props;
|
|
8
|
-
return (
|
|
7
|
+
return (renderProps) => {
|
|
8
|
+
const rowData = renderProps.row;
|
|
9
9
|
const values = fieldValue.map((element) => {
|
|
10
|
-
const valueMaybeString = getPropertyByString(
|
|
10
|
+
const valueMaybeString = getPropertyByString(rowData, element);
|
|
11
11
|
let fixedValue;
|
|
12
12
|
if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
|
|
13
13
|
fixedValue = valueMaybeString.toString();
|
|
@@ -16,7 +16,14 @@ function ColumnConcatenatedValuesFormatter(props) {
|
|
|
16
16
|
}
|
|
17
17
|
return fixedValue;
|
|
18
18
|
});
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
ConcatenatedFormatter,
|
|
21
|
+
{
|
|
22
|
+
values,
|
|
23
|
+
separator: fieldSeparator,
|
|
24
|
+
Component
|
|
25
|
+
}
|
|
26
|
+
);
|
|
20
27
|
};
|
|
21
28
|
}
|
|
22
29
|
export {
|
|
@@ -3,7 +3,7 @@ import { ColumnConcatenatedValuesFormatterProps } from './types';
|
|
|
3
3
|
* Funcion helper que retorna el formatter, filter y customSort de la columna concatenada.
|
|
4
4
|
*/
|
|
5
5
|
export declare const useColumnConcatenatedValues: <TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>) => {
|
|
6
|
-
formatter: (
|
|
6
|
+
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
customFilter: (row: TRow, value: string) => boolean;
|
|
8
8
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
9
9
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnDateFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Function to format a date in a column of a DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnDateFormatter<TRow>(props: ColumnDateFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnDateFormatter<TRow>(props: ColumnDateFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
import { D as DateFormatter } from "../../../formatters/DateFormatter/DateFormatter.js";
|
|
6
5
|
function ColumnDateFormatter(props) {
|
|
7
6
|
const { fieldValue, presentationType, Component = React.Fragment } = props;
|
|
8
|
-
return (
|
|
9
|
-
const valueMaybeDateStringNumber = getPropertyByString(
|
|
7
|
+
return (formatterProps) => {
|
|
8
|
+
const valueMaybeDateStringNumber = getPropertyByString(
|
|
9
|
+
formatterProps.row,
|
|
10
|
+
fieldValue
|
|
11
|
+
);
|
|
10
12
|
let fixedValue;
|
|
11
13
|
if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
|
|
12
14
|
fixedValue = valueMaybeDateStringNumber;
|
|
13
15
|
} else {
|
|
14
16
|
fixedValue = "";
|
|
15
17
|
}
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
DateFormatter,
|
|
20
|
+
{
|
|
21
|
+
presentationType,
|
|
22
|
+
value: fixedValue,
|
|
23
|
+
Component
|
|
24
|
+
}
|
|
25
|
+
);
|
|
17
26
|
};
|
|
18
27
|
}
|
|
19
28
|
export {
|
|
@@ -8,7 +8,7 @@ export declare const useCustomDateFilter: <TRow>(props: ColumnDateFormatterProps
|
|
|
8
8
|
* customFilter and customSort of a date column
|
|
9
9
|
*/
|
|
10
10
|
export declare const useColumnDate: <TRow>(props: ColumnDateFormatterProps<TRow>) => {
|
|
11
|
-
formatter: (
|
|
11
|
+
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
customFilter: (row: TRow, value: string) => boolean;
|
|
13
13
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
14
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColumnIconFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Function to format an icon in a column of a DataGrid
|
|
4
5
|
* @template TRow - Tipo de datos de la fila
|
|
5
6
|
*/
|
|
6
|
-
export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (
|
|
7
|
+
export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,8 +2,8 @@ import { r as renderMultipleIcons } from "./helpers/renderMultipleIcons.js";
|
|
|
2
2
|
import { r as renderIcon } from "./helpers/renderIcon.js";
|
|
3
3
|
function ColumnIconFormatter(props) {
|
|
4
4
|
const { getIconProps } = props;
|
|
5
|
-
return (
|
|
6
|
-
const iconProps = getIconProps(
|
|
5
|
+
return (renderProps) => {
|
|
6
|
+
const iconProps = getIconProps(renderProps.row);
|
|
7
7
|
if (Array.isArray(iconProps)) {
|
|
8
8
|
return renderMultipleIcons(iconProps);
|
|
9
9
|
}
|
|
@@ -4,5 +4,5 @@ import { ColumnIconFormatterProps } from './types';
|
|
|
4
4
|
* el formatter de la columna
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnIcon: <TRow>(props: ColumnIconFormatterProps<TRow>) => {
|
|
7
|
-
formatter: (
|
|
7
|
+
formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ColumnInteractiveCheckFormatterProps<Row> =
|
|
1
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
|
+
export type ColumnInteractiveCheckFormatterProps<Row> = RenderCellProps<Row>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnNestedValueFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Function to format a nested value in a column of a DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnNestedValueFormatter<TRow>(props: ColumnNestedValueFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnNestedValueFormatter<TRow>(props: ColumnNestedValueFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPropertyByString } from "@m4l/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
|
|
6
5
|
function ColumnNestedValueFormatter(props) {
|
|
7
6
|
const { fieldValue, Component = React.Fragment } = props;
|
|
8
|
-
return (
|
|
9
|
-
const property = getNullGuard(
|
|
7
|
+
return (formatterProps) => {
|
|
8
|
+
const property = getNullGuard(
|
|
9
|
+
getPropertyByString(formatterProps.row, fieldValue)
|
|
10
|
+
);
|
|
10
11
|
const value = typeof property === "object" ? JSON.stringify(property) : property;
|
|
11
12
|
return /* @__PURE__ */ jsx(Component, { children: value });
|
|
12
13
|
};
|
|
@@ -4,7 +4,7 @@ import { ColumnNestedValueFormatterProps } from './types';
|
|
|
4
4
|
* of the column for ColumnNestedValueFormatter.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnNestedValue: <TRow>(props: ColumnNestedValueFormatterProps<TRow>) => {
|
|
7
|
-
formatter: (
|
|
7
|
+
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
customFilter: (row: TRow, value: string) => any;
|
|
9
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnPointsFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Formatter for column points in DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnPointsFormatter<TRow>(props: ColumnPointsFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnPointsFormatter<TRow>(props: ColumnPointsFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { P as PointsFormatter } from "../../../formatters/PointsFormatter/PointsFormatter.js";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
function ColumnPointsFormatter(props) {
|
|
6
5
|
const { Component = React.Fragment } = props;
|
|
7
|
-
const fieldValue =
|
|
8
|
-
const fieldUnit =
|
|
9
|
-
return (
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
+
const fieldValue = props.fieldValue;
|
|
7
|
+
const fieldUnit = props.fieldUnit;
|
|
8
|
+
return (formatterProps) => {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
PointsFormatter,
|
|
11
|
+
{
|
|
12
|
+
obProps: formatterProps.row,
|
|
13
|
+
...props,
|
|
14
|
+
fieldValue,
|
|
15
|
+
fieldUnit,
|
|
16
|
+
Component
|
|
17
|
+
}
|
|
18
|
+
);
|
|
11
19
|
};
|
|
12
20
|
}
|
|
13
21
|
export {
|
|
@@ -4,7 +4,7 @@ import { ColumnPointsFormatterProps } from './types';
|
|
|
4
4
|
* return formatter, customFilter and customSort.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnPoints: <TRow>(props: ColumnPointsFormatterProps<TRow>) => {
|
|
7
|
-
formatter: (
|
|
7
|
+
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
customFilter: (row: TRow, value: string) => boolean;
|
|
9
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnPriceFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Formatter for column price in DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnPriceFormatter<TRow>(props: ColumnPriceFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnPriceFormatter<TRow>(props: ColumnPriceFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { P as PriceFormatter } from "../../../formatters/PriceFormatter/PriceFormatter.js";
|
|
4
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
5
4
|
function ColumnPriceFormatter(props) {
|
|
6
5
|
const { Component = React.Fragment } = props;
|
|
7
|
-
const fieldValue =
|
|
8
|
-
return (
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
+
const fieldValue = props.fieldValue;
|
|
7
|
+
return (formatterProps) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
PriceFormatter,
|
|
10
|
+
{
|
|
11
|
+
obProps: formatterProps.row,
|
|
12
|
+
...props,
|
|
13
|
+
fieldValue,
|
|
14
|
+
Component
|
|
15
|
+
}
|
|
16
|
+
);
|
|
10
17
|
};
|
|
11
18
|
}
|
|
12
19
|
export {
|
|
@@ -4,7 +4,7 @@ import { ColumnPriceFormatterProps } from './types';
|
|
|
4
4
|
* Returns formatter, customFilter and customSort.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnPrice: <TRow>(props: ColumnPriceFormatterProps<TRow>) => {
|
|
7
|
-
formatter: (
|
|
7
|
+
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
customFilter: (row: TRow, value: string) => boolean;
|
|
9
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
2
|
import { ColumnSetCheckFormatterProps } from './types';
|
|
3
3
|
import { RowKey } from '../../types';
|
|
4
4
|
/**
|
|
@@ -6,4 +6,4 @@ import { RowKey } from '../../types';
|
|
|
6
6
|
* acualizando un Set/Setter por medio de un hook generico el cual es invocado con el argumento field para ,
|
|
7
7
|
* sin la necesidad de entrar en edición como lo hace un editor
|
|
8
8
|
*/
|
|
9
|
-
export declare function ColumnSetCheckFormatter<Row, TKey extends RowKey = RowKey>(parameters: ColumnSetCheckFormatterProps<Row, TKey>): (props:
|
|
9
|
+
export declare function ColumnSetCheckFormatter<Row, TKey extends RowKey = RowKey>(parameters: ColumnSetCheckFormatterProps<Row, TKey>): (props: RenderCellProps<Row>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { ColumnSetCheckFormatterProps } from './types';
|
|
|
5
5
|
* Returns formatter, customFilter and customSort.
|
|
6
6
|
*/
|
|
7
7
|
export declare const useColumnSetCheck: <TRow, TKey extends RowKey = RowKey>(props: ColumnSetCheckFormatterProps<TRow, TKey>) => {
|
|
8
|
-
formatter: (props: import('react-data-grid').
|
|
8
|
+
formatter: (props: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
customFilter: (row: TRow, value: TKey) => boolean;
|
|
10
10
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
11
11
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnUncertaintyFormatterProps } from './types';
|
|
2
|
+
import { RenderCellProps } from 'react-data-grid';
|
|
2
3
|
/**
|
|
3
4
|
* Formatter for column uncertainty in DataGrid
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnUncertaintyFormatter<TRow>(props: ColumnUncertaintyFormatterProps<TRow>): (
|
|
6
|
+
export declare function ColumnUncertaintyFormatter<TRow>(props: ColumnUncertaintyFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
|
|
4
3
|
import { U as UncertaintyFormatter } from "../../../formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
5
4
|
function ColumnUncertaintyFormatter(props) {
|
|
6
5
|
const { Component = React.Fragment } = props;
|
|
7
|
-
const fieldValue =
|
|
8
|
-
const fieldSymbol =
|
|
9
|
-
const fieldUnit =
|
|
10
|
-
return (
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
+
const fieldValue = props.fieldValue;
|
|
7
|
+
const fieldSymbol = props.fieldSymbol;
|
|
8
|
+
const fieldUnit = props.fieldUnit;
|
|
9
|
+
return (formatterProps) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
UncertaintyFormatter,
|
|
12
|
+
{
|
|
13
|
+
obProps: formatterProps.row,
|
|
14
|
+
...props,
|
|
15
|
+
fieldValue,
|
|
16
|
+
fieldSymbol,
|
|
17
|
+
fieldUnit,
|
|
18
|
+
Component
|
|
19
|
+
}
|
|
20
|
+
);
|
|
12
21
|
};
|
|
13
22
|
}
|
|
14
23
|
export {
|
|
@@ -4,7 +4,7 @@ import { ColumnUncertaintyFormatterProps } from './types';
|
|
|
4
4
|
* the filter and the customSort of the uncertainty column.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColumnUncertanity: <TRow>(props: ColumnUncertaintyFormatterProps<TRow>) => {
|
|
7
|
-
formatter: (
|
|
7
|
+
formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
customFilter: (row: TRow, value: string) => boolean;
|
|
9
9
|
customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DataGrid } from './DataGrid';
|
|
2
2
|
export * from './formatters';
|
|
3
|
-
export type { Column,
|
|
3
|
+
export type { Column, RenderEditCellProps, RenderCellProps } from 'react-data-grid';
|
|
4
4
|
export type { RowKey, ChangeUserColumn } from './types';
|
|
5
5
|
export { getDataGridComponentsDictionary } from './dictionary';
|
|
6
6
|
export { TextEditor, NumberEditor } from './subcomponents/editors/TextEditor';
|